You need to create a jsp as follows:
In a regular html form, add your select box and a submit button.
Submitting this form simply calls the same JSP but includes the value of the select box, as a parameter.
In the second part of this JSP you define a DbForms form.
Using the select box value parameter, you are able to create an appropriate whereClause. (when the JSP is called a second time)
Philip Grunikiewicz
Hydro-Qu�bec / Montr�al / Canada
-----Message d'origine-----
De : Dennis R. Gesker [mailto:[EMAIL PROTECTED]]
Envoy� : jeudi 25 avril 2002 16:42
� : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : Re: [dbforms] RE: dbforms] Need Hint or Clue
William,
Sorry. In re-reading my post I kind of garbled the question. I'm able to
populate the select control just fine. Where I'm stuck is that I don't
want the item selected from the select control to return a specific
record but ALL the records from the target table where the values in a
particular field match the value chosen from the select box.
The documentation has a snippet of code showing how to insert a string
into the whereClause of the <db:dbform> tag but how do I retrieve the
string selected by the user from the select control ?
Right now I'm guessing it has to do with how the gotoButton is setup but
I missing something.
Any ideas?
Dennis
[EMAIL PROTECTED] wrote:
>Look at the db:queryData in the manual, it would look something like
>this..
>
> <db:select fieldName="console_key" >
> <db:queryData
> name="AQuery"
> query="select distinct x from y"
> />
>
>
>
>
>FROM: Dennis R. Gesker
>DATE: 04/24/2002 15:48:46
>SUBJECT: [dbforms] Need Hint or Clue
>
>
>
>Newbie question I'm sure but here goes....
>
>I was hoping to use dbforms to create some simple web reports. How do I
>get the values from a <db:select> tag poplulated from a query of the
>kind "select distinct x from y"
>
>into the filter, whereby, orderby of a dbform on the webpage meant to
>display the results. Is there a request.getParameter("controlname")
>like mechanisim for this kind of task?
>
>I don't seem to have a problem pulling a specific record where there is
>a unique id but a group or records seems to be a bit a problem.
>
>Pointers and examples would be very welcome.
>
>Dennis
>
>
>
>_______________________________________________
>DbForms Mailing List
>
>http://www.wap-force.net/dbforms
>
>
>
>_______________________________________________
>DbForms Mailing List
>
>http://www.wap-force.net/dbforms
>
--
_________
|~~ @|
| ==== | Dennis Roman Gesker ICQ: 194047
| ==== | mailto:[EMAIL PROTECTED] Fax: 413.740.4653
|_________| http://www.gesker.com
_______________________________________________
DbForms Mailing List
