Hi,
I would like to implement a tab pane in a dbforms-based web page so
the user can view different details of the same data record. I'd like
to implement this through JSP scriptlets and an additional request
parameter. I would use java if-else scriptlets to display certain
parts of my page. This is a very simplified page:
<html>
<head>
<% String mySelection = request.getParameter("mySelection");
... (null handling omitted)
%>
</head>
<db:dbform ... ><db:header/><db:errors/>
<db:body>
... (here comes the tab pane logic)
<% if (mySelection.equals("first") { %>
...
<db:checkbox value="1" novalue="0" fieldName="fieldA"/>
...
<% } else { %>
...
<db:checkbox value="1" novalue="0" fieldName="fieldB"/>
...
<% } %>
...
</db:body><db:footer/></db:dbform>
</html>
This kind of code is running fine if the first if case is chosen, but
I get a NullPointerException coming from the checkbox tag of the
second case if the else branch is choosen. This doesn't happen if I
remove all checkbox tags and just keep other tags like <db:textField>.
I tried this with different databases, same effect.
What am I doing wrong, is this way of mixing dbforms with scriptlets
supported? What would you recommend to implement a tab pane with
dbforms?
Thanks,
alex
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms