dropdown and datatable

Hi,I'm using dropdown and standard datatable to show data. How I put parameter to query?Thanks in advance
[127 byte] By [enskaa] at [2007-11-27 2:48:05]
# 1

Hi!

You can do it in two way:

1) In designtime: doubleclick on RowSet (usually it is placed in SessionBean1, expand it's node in Outline window and find RowSet) and then add parameter in Query Editor.

2) In runtime:

yourRowSet().setObject(int index, Object value);

yourDataProvider().refresh();

, where yourDataProvider is data provider for dropdown, which is bound to yourRowSet, index is parameter's number (if there are more than one parameter), value is parameter's value.

Thanks,

Roman.

-Grif-a at 2007-7-12 3:18:02 > top of Java-index,Development Tools,Java Tools...
# 2
Thanks RomanBut that works with basic table. If I use standard datatable, it won't work. There seems to be some differences using rowsets.
enskaa at 2007-7-12 3:18:02 > top of Java-index,Development Tools,Java Tools...
# 3
Hi!Did You add in designtime to query parameter '?' before call setObject()? What You get when run application?Thanks,Roman.
-Grif-a at 2007-7-12 3:18:02 > top of Java-index,Development Tools,Java Tools...
# 4

Hi,

Yes, I added it in desingtime.

If I use table component from basic section to show data it works fine. But I need to use datatable from standard section, because I put gridpanel to column and so on to get defined layout.

From server log I get "java.sql.SQLException: Statement parameter 1 not set"

enskaa at 2007-7-12 3:18:02 > top of Java-index,Development Tools,Java Tools...