Simplica

ProductsLearnPurchaseSupportDemoDownload
  [Search] Search   [Recent Topics] Recent Topics  
How to work with ecDataModel filter?
Forum Index -> DataTable
Author Message
sn7400


Joined: 04/09/2008 14:35:52
Messages: 11
Offline

Hello,
is there an example available that shows the way how to use the ecDataModel filter?

Thanks, Axel
adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 183
Offline

Hello Axel,

You can find a model with SQLDataModel filtering on http://www.simplica.com/ajaxdemo.htm ECruiser suite demo, SelectTable section -> SelectTable Basic (Demo and sources). This should help you.
sn7400


Joined: 04/09/2008 14:35:52
Messages: 11
Offline

Hello adina_mihai,
I went through these examples and understand how to work with a simple filter like this:

ECDataModel dataModel = dataTable.getDataModel();
dataModel.setFilter(simplica.util.filter.FilterFactory.eq("condition", "New"));

but I don't understand the syntax if I want to filter both condition "New" AND "Used"

dataModel.setFilter(simplica.util.filter.FilterFactory.Conjunction(...)......

Can you give me an example, please.

Greetings, Axel
adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 183
Offline

Hello Axel,

You have to define first 2 filters, then make the conjunction between them.
You should have something like this:



sn7400


Joined: 04/09/2008 14:35:52
Messages: 11
Offline

Hello adina_mihai,

thanks for reply but if I insert this in the action listener:

an error occured:
The method conjunction() in the type FilterFactory is not applicable for the arguments (Filter, Filter)

What can I do?
adina_mihai
Simplica Team

Joined: 04/01/2007 00:00:00
Messages: 183
Offline

I put above the right version. Sorry for inconvenience!
sn7400


Joined: 04/09/2008 14:35:52
Messages: 11
Offline

Hello adina_mihai,

thanks a lot! Now it is working

Greetings Axel
 
Forum Index -> DataTable
Go to:   
Powered by JForum 2.1.7 © JForum Team
Home   |  News   |  Contact   |  About   |  License   |  Privacy   |  Documentation
Copyright © 2009 Simplica Corporation. All rights reserved.