Thank you.
I am going on vacation so I will not be able to test this for the next 3 weeks but I will take a look when I get back.
Announcement
Collapse
No announcement yet.
X
-
Hi,
sorry for the delay in answering. We have committed a fix for this problem, that will be available in the next nightly build, could you please try it?
Leave a comment:
-
I have tried setting saveLocally:false but it still doesn't send update requests to the server.
Leave a comment:
-
The two properties can be independently set, but saveLocally defaults to true if filterLocalData is set. We'll make sure this is clearer in the docs.
Leave a comment:
-
Just a follow up question.
Does filterLocalData:true automatically set saveLocally:true ?
When I turn on local filtering the grid no longer sends update requests to the server.
Leave a comment:
-
It's valid to use setFilterEditorProperties to provide properties. To change the type, use setFilterEditorType().
Leave a comment:
-
Hi Isomorphic,
Originally posted by Isomorphic View PostNothing to elaborate on really - the correct API to change type is setFilterEditorType().
In limited cases, setFilterEditorProperties() may work, but it's not guaranteed to do so.
Besides the issues covered in the docs it is valid and OK (even though not best practice) to use setFilterEditorProperties() instead of setFilterEditorType(), isn't it?
Best regards
Blama
Leave a comment:
-
Hi Niels_EMP,
I'm pretty sure that this is working without any further setup (no filterEditorProperties) in Java if you define it like this:
Code:<field name="taskId" type="integer" required="true" [B]displayField="taskName"[/B] />
Did you try this already?
Best regards
Blama
Leave a comment:
-
Okay so I need to have the display field value in a hidden field and then target that with formItem.criteriaField?
I got it working like this but I am not sure if there is an easier way.
Code:GWT.create(BeanFactory.FormItemMetaFactory.class); ListGridField taskField = new ListGridField("taskId", "Task"); taskField.setWidth(150); taskField.setOptionDataSource(taskDS); taskField.setOptionCriteria(new Criteria("includeClosed", "true")); taskField.setValueField("taskId"); taskField.setDisplayField("title"); taskField.setEditorProperties(taskEditor); taskField.setFilterEditorType(TextItem.class); TextItem filterEditorProperties = new TextItem(); filterEditorProperties.setOperator(OperatorId.ICONTAINS); filterEditorProperties.setCriteriaField("taskName"); taskField.setFilterEditorProperties(filterEditorProperties);
Code:<DataSource ID="dashboard_weekly_workItems" serverConstructor="it.forecast.server.servlets.dashboard.DashboardWeeklyWorkItemsServlet"> <fields> <field name="id" type="sequence" hidden="true" primaryKey="true" /> <field name="project" type="integer" required="true" /> <field name="taskId" type="integer" required="true" /> <field name="taskName" type="text" hidden="true" /> <field name="costType" type="integer" hidden="true" /> <field name="absence" type="boolean" hidden="true" /> </fields> </DataSource>
Leave a comment:
-
Nothing to elaborate on really - the correct API to change type is setFilterEditorType().
In limited cases, setFilterEditorProperties() may work, but it's not guaranteed to do so.
Leave a comment:
-
Hi Isomorphic,
I (not the OP) am as well doing setFilterEditorProperties(new SomeFormItem()) when changing the FormItem-Subclass to use.
Is this not correct? Could you please elaborate, as it has been working in all cases for me, so far.
Thank you & Best regards
Blama
Leave a comment:
-
You can use formItem.criteriaField to target a particular field.
Note you want to use setFilterEditorType() if what you're doing is changing type, and not properties.
Leave a comment:
-
Filter on ListGridField option datasource display field
SmartClient Version: v11.0p_2016-05-28/Pro Deployment (built 2016-05-28)
Hi, I have a ListGrid with filterLocalData:true and a ListGridField with an optionDatasource.
By default the filterEditor for this field is a SelectItem with all the options from the option datasource, but since this can have quite a few options, I would like instead to have a TextItem which filters on the value of the displayField as if it had been a normal text field.
I have changed the filterEditor to a TextItem via setFilterEditorProperties(new TextItem()) but I can't figure our how to make it filter against the displayField, if that is possible.Tags: None
Leave a comment: