JSP
--
Questions
--
Followers
Top Experts
<netui-data:declarePageInp
I get a class this way, and I can successfully populate the form's field with the class I get, using the tag:
<netui:hidden dataSource="getCustomerByI
But now, I would like to use this object to populate an ActionForm; I guess I will need to build a FormBean to do that. Can someone guide me/give me some hints on how to do this?
Thanks in advance.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I guess that this is WebLogic as you are using <netui> tags.
Well, populating a FormBean does not necessarily require any PageInput. Populating a FormBean can be done in your Controller.
First, can you let me know the root of your problem? And if possible, post your current codes.
David
Basically I have .jsp form which is populated using pageinput, and after filling the form I want the update to be done using actionForm. I'm not home now (the code is there), wil post the code snippets this afternoon. It's the 2nd tutorial of the Weblogic documentation, anyway, the one with the CustomerServiceEAR application.
and this is the tutorial page with my current problem (apparently, the file with the formBean is missing from my installation):
this is the code of the .jsp where I insert the data to be updated:
http://edocs.bea.com/workshop/docs92/ws_platform/webapplications/tutorial/tutWebAppStep4.html
#=========================
# Begining of code snippet
#=========================
<netui:form action="updateCustomer">
Β Β Β Β Β Β Β Β Β Β Β <netui:hidden dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β <table>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>Customer:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <table>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>FirstName:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>LastName:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>CompanyName:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>City:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>State:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>Zip:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>Phone:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <tr valign="top">
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td>Email:</td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β <td><netui:textBox dataSource="actionForm.cus
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </table>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </td>
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β </tr>
Β Β Β Β Β Β Β Β Β Β Β </table>
Β Β Β Β Β Β Β Β Β Β Β <br />
Β Β Β Β Β Β <netui:button value="updateCustomer" type="submit" />
Β Β Β Β Β Β </netui:form>
#=========================
# End of code snippet
#=========================






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
So where is your problem now? You should have updateCustomer.do method in your Controller with the ActionForm within the method. Right?
It should be something like
protected Forward updateCustomer(WhateverFor
<netui-data:declarePageInp
in the form page code, the data doesn't show up -- the form stays blank. I debugged the control method and indeed data is present in "getCustomerByIdRsult" -- I'm missing the syntax to make the form populated with this data while STILL being an ActionForm.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Happy New Year 2007.
David
JSP
--
Questions
--
Followers
Top Experts
JavaServer Pages (JSP) allow the development of dynamically generated web pages. It uses the Java programming language; JSP pages are translated into servlets at runtime, with each servlet being cached and reused until the JSP is modified. JSP allows Java code to be interleaved with static web markup content, so the resulting page can be compiled and executed on the server to deliver the content.