struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: RE: loading Dropdown dynamically from database
Date Wed, 16 Mar 2011 05:31:30 GMT
Struts does not know that yo want to should map that domainType to your
bean. It wil try to map the parameters received from the request to the
action. So for each parameter it founds in the request received from the
user, it is gonna look in the action for a set<parameterName>.

If I remember correctly, if the parameter name has a dot, it will understand
that is a setter in an bean, so if you put a parameter name called
"myBean.myValue", it will try to look for a setMyBean, which receives an
object that has a setMyValue, and it will try to instantiate the bean and do
both sets. But that's not the case in your jsp, since the parameter name is
just domainType.

But I'm still missing something. From your code I suppouse you want to show
the user a list of domains, then he selects one, and then your application
load the data, and return to the user with the same jsp, where he can change
some values, and press save, who will send the form to the server, and save
it in the database, is that right?

2011/3/16 JavaNoobie87 <>

> No its not present in the action class. That snippet was taken from the
> bean
> class, that im using to set the values. Pardon my ignorance , but should i
> set it in the action class too? (because i dont use it in the action class
> directly ).
> The bean class is just a set of getters and setters that im using to
> populate values. Ive placed the latest code for all my classes below for
> reference .
> Action.txt
> DAO.txt
> Bean.txt
> jspfile.txt
> --
> View this message in context:
> Sent from the Struts - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message