Migrating the droplist filtercell from ExtremeTable

26 views
Skip to first unread message

Pierre

unread,
Oct 2, 2007, 12:02:08 PM10/2/07
to JMesa
I'm migrating from ExtremeTable and I haven't found an equivalent to
the filterCell="droplist" attribute in the column tag. Is there a
simple way to show a dropdown list for the filter cell with all the
possible options in the list? I saw an exemple in the wiki with the
TagFilterListEditor but I'm not sure how to populate the options
dynamically.

Jeff Johnston

unread,
Oct 2, 2007, 9:48:35 PM10/2/07
to JMesa
Instead of a filterCell, JMesa has a filterEditor that cooresponds
with the FilterEditor interface. The following link is the default
filter editor:

http://jmesa.googlecode.com/svn/trunk/jmesa/src/org/jmesa/view/html/editor/HtmlFilterEditor.java

http://code.google.com/p/jmesa/wiki/Editors

What you would need to do is create your own filter editor.
Surprisingly this request just did not come up from developers to have
filter droplists so I have put off doing it. I would be willing to
help you figure it out though.

The way I was hoping to make it work is to have the filter droplist
show up on the div that pops up. So this would require a new filter
editor and some more JavaScript. I am also going to start using the
JQuery library as I think it is a really great library that makes
working with JavaScript a pleasure.

However, if you just wanted the droplist to show up and not have the
div popup you could just have the filter editor create a droplist. You
would just need to call the addFilter() JavaScript (jmesa.js) function
to add it to the Javascript Limit domain.

You can get at the items through the CoreContext. The
AbstractFilterEditor extends the AbstractContextSupport class so you
can get at it from the getCoreContext() function.

Hopefully this is not too overwhelming. The extensions in JMesa allow
developers to customize things with minimal code but you do have to
get your hands a little dirty.

-Jeff Johnston

ximsce

unread,
Oct 3, 2007, 2:18:43 PM10/3/07
to JMesa
I am also interested in this feature, so if you'd like to share some
code/findings it'd be appreciated.

Thanks.

On Oct 2, 7:48 pm, Jeff Johnston <extremecompone...@gmail.com> wrote:
> Instead of a filterCell, JMesa has a filterEditor that cooresponds
> with the FilterEditor interface. The following link is the default
> filter editor:
>

> http://jmesa.googlecode.com/svn/trunk/jmesa/src/org/jmesa/view/html/e...

Patrek

unread,
Oct 6, 2007, 9:48:41 PM10/6/07
to JMesa
I'd also be interested in this feature. Especially from the taglib.

In the meantime, I was able to figure out how to create my own
FilterEditor, but I'm lost as how to go about to set/create the
javascript call.

Which jmesa.js script should I call and how?

Thanks.

Patrick


Jeff Johnston

unread,
Oct 6, 2007, 11:07:15 PM10/6/07
to JMesa
Could you post or send me the code? It would be easier to explain how
to do it if I can see what you have. If you do not want to post the
code send it to me at extremec...@gmail.com.

-Jeff Johnston

Patrek

unread,
Oct 7, 2007, 6:20:14 PM10/7/07
to JMesa
Thanks.

I'm using the taglib, with
filterEditor="com.example.FaculteFilterEditor"

Code for my FilterEditor is :

public Object getValue()
{
String select = null;
List<Inscription> inscriptions = (List<Inscription>)
webContext.getRequestAttribute("facultesInfo");

List<String> list = new ArrayList<String>();


for (Inscription inscription : inscriptions)
{
list.add(inscription.getActivite().getFaculte());
}
Collections.sort(list);

final StringBuilder sb = new StringBuilder();
sb.append("<select id=\"faculte\" ");
sb.append(">");
sb.append("<option value=\"\">Faculté</option>");
for (String string : list)
{
sb.append("<option name=\"");
sb.append(string);
sb.append("\">");
sb.append(string);
sb.append("</option>");
}

sb.append("</select>");
select = sb.toString();

return select;
}


Patrick

On Oct 6, 11:07 pm, Jeff Johnston <extremecompone...@gmail.com> wrote:
> Could you post or send me the code? It would be easier to explain how
> to do it if I can see what you have. If you do not want to post the

> code send it to me at extremecompone...@gmail.com.
>
> -Jeff Johnston
>

Jeff Johnston

unread,
Oct 8, 2007, 6:35:11 PM10/8/07
to JMesa
I am looking at this now...

Jeff Johnston

unread,
Oct 8, 2007, 7:34:09 PM10/8/07
to JMesa
Here is a quick example that I made up. Let me know if you have any
questions. After I get the worksheet functionality done I will work on
a droplist filter editor that fits in with the filter pop-up box.
Also, I would like the filter pop-up to be more subtle, very much like
the google spreadsheet.

http://jmesa.googlecode.com/svn/trunk/jmesaWeb/src/org/jmesaweb/controller/CareerFilterEditor.java

-Jeff Johnston

Pierre Olivier Martel

unread,
Oct 10, 2007, 3:15:40 PM10/10/07
to JMesa
I tweaked your example to fit my data and it worked great for me. It
would indeed look better if the drop-down was also in a pop-up box but
it can wait for now. Just let me know if you get to it. Thanks!

Jeff Johnston

unread,
Oct 11, 2007, 10:29:38 PM10/11/07
to jm...@googlegroups.com
I have had enough developers ask for this so I am going to try and squeeze it into the next release.

http://code.google.com/p/jmesa/wiki/2_3Roadmap

-Jeff Johnston

Door Step Service

unread,
Aug 2, 2018, 7:55:04 AM8/2/18
to JMesa
Hi,

I want to dynamic droopdownlist populator. Please send me sample code for the same.

Door Step Service

unread,
Aug 2, 2018, 7:55:37 AM8/2/18
to JMesa
Hi,

I want to dynamic droopdownlist populator. Please send me sample code for the same.

Door Step Service

unread,
Aug 6, 2018, 5:51:02 AM8/6/18
to JMesa
Hi,

I want the complete examples. I have to populate dynamic droop down list which will be shown on table's each row.

Thanks


--
You received this message because you are subscribed to the Google Groups "JMesa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmesa+un...@googlegroups.com.
To post to this group, send email to jm...@googlegroups.com.
Visit this group at https://groups.google.com/group/jmesa.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages