isomorphic-software / smartgwt

Smart GWT is a GWT-based framework that allows you to not only utilize its comprehensive widget library for your application UI, but also tie these widgets in with your server-side for data management.
37 stars 22 forks source link

FilterBuilder.setShowSubClauseButton(false) ! #661

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I try to hide FilterBuilder controls ShowAddButton , RemoveButton 
,SubClauseButton ;

I set
 setShowAddButton(false) , setShowRemoveButton(false),setShowSubClauseButton(false);

and its work fine for me , but it seems that it  didnt work when we have 
combined (complex) criteria to gather . 

I use 3.0 SmartGWT , 

Any Help please ?  

What is the expected output? What do you see instead?
Disappear AddButton , RemoveButton ,SubClauseButton ;

What version of the product are you using? On what operating system?
3.0

What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?
FF 9.0 , IE 8

Original issue reported on code.google.com by Arkan.D...@exalt.ps on 15 Mar 2012 at 11:27

Attachments:

GoogleCodeExporter commented 9 years ago
Do not post issues without a runnable, minimal test case that clearly show a 
bug.

Original comment by smartgwt...@gmail.com on 15 Mar 2012 at 12:39

GoogleCodeExporter commented 9 years ago
Sorry about that , i hope that the below code will be useful :
FilterBuilder tooltipJobFilterBuilder = new FilterBuilder();
                        tooltipJobFilterBuilder.setDataSource(jobsDataSource);
            tooltipJobFilterBuilder.setShowAddButton(false);
            tooltipJobFilterBuilder.setShowRemoveButton(false);
            tooltipJobFilterBuilder.setShowSubClauseButton(false);
            tooltipJobFilterBuilder.setCriteria(criteria);

Original comment by Arkan.D...@exalt.ps on 15 Mar 2012 at 12:43

GoogleCodeExporter commented 9 years ago
i use the data source just like the show case example 
http://www.smartclient.com/smartgwt/showcase/#grid_custom_filter_builder

and use this 
  DataSource worldDS = WorldXmlDS.getInstance();  

AdvancedCriteria criteria =   new AdvancedCriteria(OperatorId.AND, 
  new Criterion[] {
  new Criterion("countryCode", OperatorId.CONTAINS, "X") ,
  new AdvancedCriteria(OperatorId.AND , new Criterion[]{
  new Criterion("countryCode", OperatorId.CONTAINS, "XX")} ) });

   FilterBuilder myfilterBuilder = new FilterBuilder();
    myfilterBuilder.setDataSource(worldDS);
    myfilterBuilder.setShowSubClauseButton(false);
    myfilterBuilder.setShowRemoveButton(false);
    myfilterBuilder.setShowAddButton(false);
    myfilterBuilder.setCriteria(criteria);
    myfilterBuilder.draw();

And i have the same problem , just like the attachment ; 
Is this the normal behavior ?? 

Original comment by Arkan.D...@exalt.ps on 18 Mar 2012 at 8:38

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same issue , but is there any way to represent ( show ) the criteria 
 instead of use the filter builder ???  

Original comment by Rawan.Ab...@exalt.ps on 20 Mar 2012 at 3:02