Open GoogleCodeExporter opened 9 years ago
I can send you more information tomorrow, but the short of it is that you need
to create two custom FilterEditors.
This should work yet...take a look at the DroplistFilterEditor source if you
need to.
http://code.google.com/p/jmesa/wiki/CustomDroplistFilterEditorTutorial
To get the filter value you can call getCoreContext().getLimit().getFilter();
Original comment by jeff.johnston.mn@gmail.com
on 4 Apr 2011 at 12:38
Thanks!! Jeff for the quick response. From what I understand, filter dropdown
is the one which appears on the top of the column... just like 'career' filter
in the worksheet example. But what actually need is a droplistworksheet editor
which refreshes the column B cell droplist based on the selection of the Column
A droplistworksheet cell.
Example: Column A worksheet cell has dropdownvalues (can be populated by
setting the droplistworksheeteditor on the htmlcolumn ) - 'Code A', 'Code B',
'Code C'. If the user selects - 'Code A' then the column B should populate Code
A related values - in this case it will be 10,20,30 (it should fetch these
values from the database dynamically). If user selects Code B then the Column B
should be refreshed with the values - 40,50,60 for the Code C - the values
should be 70,80,90,100.
I really appreciate if you could let me know if it can be implemented in Jmesa.
If not, is there any workaround for doing this. Thanks!!!
Original comment by cmank...@gmail.com
on 4 Apr 2011 at 1:50
If the first filter dropdown does a page refresh (the default behavior) then
you can limit the data of the second filter based on the filter value of the
first. That is why you would have to get the Limit information to find out how
the first dropdown was filtered.
If you do not do a page refresh for the first dropdown then you could use a
custom filter editor with some JavaScript. You would have to conform to the
JMesa parameter naming convention but it would work.
Original comment by jeff.johnston.mn@gmail.com
on 4 Apr 2011 at 3:57
The JavaScript way would be more work because you would have to understand more
about how JMesa works...
Original comment by jeff.johnston.mn@gmail.com
on 4 Apr 2011 at 3:58
Jeff,
Will I be using droplistfilterdropdown or droplistworksheeteditor to achieve
this??? I am bit confused here. In my scenario -
Add new row(Row1) in the worksheet by clicking the - 'Add Row' icon
For Row 1 - I can select option 'Code A' from column A and the column B (row
1) gets refreshed with the appropriate values. (10,20,30)
Add second row(Row2) in the worksheet by clicking the - 'Add Row' icon.
For Row 2 - I can select option 'Code B' from Column A and the column B (row 2)
gets refreshed with the appropriate values.(40,50,60)
Thanks!! Jeff.
Original comment by cmank...@gmail.com
on 6 Apr 2011 at 2:28
Sorry, I did not realize that you were trying to do this with the worksheet.
I actually have code that does what you need using a jQuery autocomplete
plugin. I had the same requirement recently. The integration points are even
built into JMesa 3.0.4.
I know you are asking about using the droplist and not autocomplete, but it can
be a better user experience. How about if I write up a wiki page that explains
it...I need to write something about it anyway. I can do that this week (maybe
even over lunch today depending on how long it takes)! Then you can adapt it to
the droplist if you need to.
Original comment by jeff.johnston.mn@gmail.com
on 6 Apr 2011 at 3:24
Thanks!! Jeff for the quick response. This is what I was looking for a while
now. In the mean time if you have any example code that does this, please let
me know. I will take a look at it and try to implement it in my application.
Thanks!!
Original comment by cmank...@gmail.com
on 6 Apr 2011 at 4:38
Here you go!
Be sure to upgrade to JMesa 3.0.4.
http://code.google.com/p/jmesa/wiki/AutoCompleteWorksheetEditor
Original comment by jeff.johnston.mn@gmail.com
on 6 Apr 2011 at 9:55
Thanks! Jeff.
Original comment by cmank...@gmail.com
on 7 Apr 2011 at 1:10
Original issue reported on code.google.com by
cmank...@gmail.com
on 1 Apr 2011 at 8:36