DBTreeView alternative?

Questions and answers on developing, deploying and using plugins and JavaBeans

Re: DBTreeView alternative?

Postby jbader » Thu Apr 15, 2010 1:20 pm

Glad to. Problem is I don't have it anymore. If someone can make the old version available I'm glad to self sign.

Thanks Johan
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Re: DBTreeView alternative?

Postby jbader » Thu Apr 15, 2010 1:22 pm

Is there a repo for his plugin? Is it open source? Whom is the official author/owner....Servoy? Is it an officially supported bean?
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Re: DBTreeView alternative?

Postby Gabi Boros » Thu Apr 15, 2010 2:18 pm

Gabi Boros
Servoy
Gabi Boros
 
Posts: 402
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: DBTreeView alternative?

Postby jbader » Thu Apr 15, 2010 3:09 pm

Thank you!
jbader
 
Posts: 520
Joined: Sun Sep 18, 2005 4:24 am
Location: Miami, FL

Re: DBTreeView alternative?

Postby AgusRupendi » Mon Aug 02, 2010 2:17 pm

in example, dataset is created manually (createEmptyDataSet),
, i try to create trought table queary (getDataSetByQuery), and desn't work
erroar with empty message occour
what happen...?

the code

var vQuery =" SELECT id,pid,nm_menu as treecolumn,execute as column1,'' as column2,'' as column3,'group.png' as icon,'false' as editable from app_menu"
globals.treeviewDataSet=databaseManager.getDataSetByQuery('sipti2000', vQuery, null, 1000);
elements.treeview.setDataSet(globals.treeviewDataSet);
elements.treeview.setStyleSheet(globals.myStyle);

please help me, what's going on ...thanks for your help
AgusRupendi
 
Posts: 2
Joined: Sun Aug 01, 2010 11:58 am

Re: DBTreeView alternative?

Postby Gabi Boros » Mon Aug 16, 2010 3:57 pm

can you limit your dataset query to max 5 rows, and paste
here the return of application.output(globals.treeviewDataSet) ?

AgusRupendi wrote:in example, dataset is created manually (createEmptyDataSet),
, i try to create trought table queary (getDataSetByQuery), and desn't work
erroar with empty message occour
what happen...?

the code

var vQuery =" SELECT id,pid,nm_menu as treecolumn,execute as column1,'' as column2,'' as column3,'group.png' as icon,'false' as editable from app_menu"
globals.treeviewDataSet=databaseManager.getDataSetByQuery('sipti2000', vQuery, null, 1000);
elements.treeview.setDataSet(globals.treeviewDataSet);
elements.treeview.setStyleSheet(globals.myStyle);

please help me, what's going on ...thanks for your help
Gabi Boros
Servoy
Gabi Boros
 
Posts: 402
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: DBTreeView alternative?

Postby Kahuna » Tue Oct 05, 2010 10:59 am

Gabi

We are now using your modified bean to create tree views by hand (rather than dataset based) which is exactly what we needed thanks for sharing.

However we would like to change the style sheet using a .css rather than the string sample you supplied.

Can we call the .css in code on initialisation of the bean and if so could you give us an example of how to make the call and how the .css might be formatted for the treeview?
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: DBTreeView alternative?

Postby Gabi Boros » Tue Oct 05, 2010 4:46 pm

Kahuna wrote:Gabi

We are now using your modified bean to create tree views by hand (rather than dataset based) which is exactly what we needed thanks for sharing.

However we would like to change the style sheet using a .css rather than the string sample you supplied.

Can we call the .css in code on initialisation of the bean and if so could you give us an example of how to make the call and how the .css might be formatted for the treeview?


this is not possible with the current version, but in the next version, that will be
released for the upcoming major release of Servoy, it will be able to use the css defined in Servoy
Gabi Boros
Servoy
Gabi Boros
 
Posts: 402
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: DBTreeView alternative?

Postby ngervasi » Wed Jul 03, 2013 2:02 pm

Any news about this? I'm having an hard time trying to style the treebean...
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: DBTreeView alternative?

Postby Gabi Boros » Wed Jul 03, 2013 3:02 pm

for the treeview bean you still need to set the style using the bean's
setStyleSheet function, and also, there is only a couple of attributes
that can be set : background-color, color, font & border;
as of Servoy 6, beans can also read stylesheets from Servoy, so it is possible
to add this support (you may create a FR for this here https://www.servoyforge.net/projects/se ... iew/issues ), but the supported attributes would remain the same; if you wish
also having new attributes, create a FR for that too, and name them, so we can check if it
is possible to add those

regards,
Gabi
Gabi Boros
Servoy
Gabi Boros
 
Posts: 402
Joined: Tue Jun 26, 2007 4:03 pm
Location: Timisoara, Romania

Re: DBTreeView alternative?

Postby ngervasi » Wed Jul 03, 2013 3:58 pm

Thanks Gabi, I will create a feature request, in the meantime I'm trying to use the setStyleSheet() but there are some problems:
1 - color (font and border) is honored in smart client but not in webclient
2 - font is not honored in webclient
3 - setRowHeight(100) is ignored in webclient
4 - on MacOS smart client font is not honored
5 - on Win SmartClient some labels are truncated until they receive focus (see the "Logout" label, the last one in the screenshot)

See the attached screenshot.

treeBean.png
treeBean.png (116.78 KiB) Viewed 8466 times


I will create an issue in servoyforge also for this.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: DBTreeView alternative?

Postby ngervasi » Wed Jul 03, 2013 3:59 pm

Sorry, forgot to paste the code:

Code: Select all
forms.nav_web2_tree.elements.bean_tree.setDataSet(_ds)
   forms.nav_web2_tree.elements.bean_tree.setColumnWidth('treeColumn', 280);
   forms.nav_web2_tree.elements.bean_tree.setHeaderVisible(false);
   forms.nav_web2_tree.elements.bean_tree.onNodeClicked(forms.nav_web2_tree.onNodeClick);
   forms.nav_web2_tree.elements.bean_tree.setColumnTextFormat('treeColumn', '<html>$text</html>');
   if(application.getApplicationType() == APPLICATION_TYPES.SMART_CLIENT)
   {
      var _myStyle = 'treeview { background-color: transparent; color: #2b3038; border-style: solid; font: 14pt "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif, Verdana; }'
      forms.nav_web2_tree.elements.bean_tree.setRowHeight(20);
   }
   else // Webclient
   {
      var _myStyle = 'treeview { background-color: transparent; color: #2b3038; border-style: solid; font: 14pt "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif, Verdana; }'
      forms.nav_web2_tree.elements.bean_tree.setRowHeight(100);
   }
   forms.nav_web2_tree.elements.bean_tree.setStyleSheet(_myStyle);
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: DBTreeView alternative?

Postby Harjo » Wed Jul 03, 2013 4:03 pm

I don't understand why there are two beans, anymore, one from Servoy and one from ServoyForge

In Servoy you can create now from a dataset a datasource, that can be used in the Servoy DBTreeView now..
So what's the point, of maintaining two beans, with different feature set's? Or why not merge them together?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: DBTreeView alternative?

Postby ngervasi » Wed Jul 03, 2013 4:38 pm

Since when the default Servoy TreeViewBean can use datasets? I missed that one...
Having a quick look at it in servoy 7.1 I don't see functions to load a dataset.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: DBTreeView alternative?

Postby Harjo » Wed Jul 03, 2013 5:02 pm

You can now create (from a dataset) a datasource as a temptable, and use that in the DBTreeview, look here: https://support.servoy.com/browse/SVY-3686
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

PreviousNext

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 20 guests