I think you would have to break your form into parts somehow to do that, unless there is a way to get the value of the first textbox in JavaScript and somehow...
Anyway, I don't think dbforms provides a clean solution to that. If someone knows of a way, please do let us know.
As for breaking up your form, I did something like:
1) added a interceptor (see usersguide for more details) to pass along the values filled in the first part of the form
public int preInsert(HttpServletRequest request, Hashtable fieldValues, DbFormsConfig config, Connection con)
throws ValidationException {
request.setAttribute("ClassName",fieldValues.get("name")); return GRANT_OPERATION;
}
2) then in the second jsp page did
<%
if (request.getAttribute("ClassName")!=null){
ClassName_stringbuffer.append("class_name="+request.getAttribute("ClassName") );
3) then you could use that to set your query in the select tag
HOWEVER, in step one -- for me it's ok for that partial data to be entered into the database. You would have to use a pluggableEvent I think to stop it from happening and then pass along all the values entered in to the next page so they all could be inserted or updated there (update would require it's own interceptor of course).
Confusing, OK well maybe a little. Like I said I don't know of a clean way to do that, but others may very well have better -- hopefully much better - ideas. Anyone?
Shawn
I have form, where one value depend on second. When user change value in first textbox, I should ask database for value for second textbox. Is it possible to do in dbforms?
regards Tomek
Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
