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 <vivek...@enzentech.com>

> 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 .
> http://struts.1045723.n5.nabble.com/file/n3758519/J07uQBr5.txt Action.txt
> http://struts.1045723.n5.nabble.com/file/n3758519/VtZEa16s.txt DAO.txt
> http://struts.1045723.n5.nabble.com/file/n3758519/XK3DkNCG.txt Bean.txt
> http://struts.1045723.n5.nabble.com/file/n3758519/jWjVuV7W.txt jspfile.txt
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/loading-Dropdown-dynamically-from-database-tp3555885p3758519.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to