RE: DynaValidatorFom with checkbox properties
Don't worry about it. Mistakes are part of learning...and we all make them. robert > -Original Message- > From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 3:59 PM > To: Struts Users Mailing List > Subject: Re: DynaValidatorFom with checkbox properties > > > > > Robert Taylor wrote: > > >Also, make sure that the action in which you attempt to get the "rrole" value > >from is declared to use the correct form. > > > >If you can, please post your action mapping as well. > > > >robert > > > > > Now it is time to apologize. I have a classes and a src cirectory for > compiling with ant, > in both is a struts-config.xml, guess what. I altered the config file > in the src directory, > I will immediately kill the evil struts-config in the wrong directory. > Please do not tell anybody of my stupid fault. > > And most of all: Thank you ver much, now everthing works fine. > > regards > Wolfgang > > > > > > >>-Original Message- > >>From: Robert Taylor [mailto:[EMAIL PROTECTED] > >>Sent: Friday, April 02, 2004 3:18 PM > >>To: Struts Users Mailing List > >>Subject: RE: DynaValidatorFom with checkbox properties > >> > >> > >>The exception indicates that you have not defined a property named "rrole" in your > >>form. > >> > >>What does your form-bean declaration look like in your struts-config file? > >> > >>robert > >> > >> > >> > >>>-Original Message- > >>>From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > >>>Sent: Friday, April 02, 2004 2:42 PM > >>>To: Struts Users Mailing List > >>>Subject: Re: DynaValidatorFom with checkbox properties > >>> > >>> > >>> > >>> > >>>Robert Taylor wrote: > >>> > >>> > >>> > >>>>>employee. How shall I configure > >>>>>the DynaValidatorForm in my strus_config to take a unknown number of > >>>>>checkbox values? > >>>>> > >>>>> > >>>>> > >>>>> > >>>> >>>> type="java.lang.String[]" initial="{}"/> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>second question: how can I make the properties of a DynaVForm available > >>>>>to a Action? > >>>>> > >>>>> > >>>>> > >>>>> > >>>>DynaActionForm form = (DynaActionForm)form; > >>>>String[] rrole = (String[])form.get("rrole); > >>>> > >>>> > >>>> > >>>Doing so, gives me the exception: > >>> > >>> > >>>javax.servlet.ServletException: Invalid property name 'rrole' > >>> > >>> org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) > >>> > >>> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) > >>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > >>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > >>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > >>> > >>>root cause > >>> > >>>java.lang.IllegalArgumentException: Invalid property name 'rrole' > >>> > >>> org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) > >>> org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) > >>> org.zack.action.EmployeeDispatchAction.update(Unknown Source) > >>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > >>> > >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > >>> java.lang.reflect.Method.invoke(Method.java:324) > >>> > >>> org.apache.struts.actions.DispatchAction.dispatchMethod
Re: DynaValidatorFom with checkbox properties
Robert Taylor wrote: Also, make sure that the action in which you attempt to get the "rrole" value from is declared to use the correct form. If you can, please post your action mapping as well. robert Now it is time to apologize. I have a classes and a src cirectory for compiling with ant, in both is a struts-config.xml, guess what. I altered the config file in the src directory, I will immediately kill the evil struts-config in the wrong directory. Please do not tell anybody of my stupid fault. And most of all: Thank you ver much, now everthing works fine. regards Wolfgang -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 3:18 PM To: Struts Users Mailing List Subject: RE: DynaValidatorFom with checkbox properties The exception indicates that you have not defined a property named "rrole" in your form. What does your form-bean declaration look like in your struts-config file? robert -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:42 PM To: Struts Users Mailing List Subject: Re: DynaValidatorFom with checkbox properties Robert Taylor wrote: employee. How shall I configure the DynaValidatorForm in my strus_config to take a unknown number of checkbox values? second question: how can I make the properties of a DynaVForm available to a Action? DynaActionForm form = (DynaActionForm)form; String[] rrole = (String[])form.get("rrole); Doing so, gives me the exception: javax.servlet.ServletException: Invalid property name 'rrole' org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Invalid property name 'rrole' org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) org.zack.action.EmployeeDispatchAction.update(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) You might try using everything else you supose seems to work well, but I cannot look what the DVForm realy loaded, how I will put these values into the database is an other story. Thank you very much. Wolfgang robert -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: DynaValidatorFom with checkbox properties Hi, I have a checkbox, where do not know in adwance how many properties to be checked I will have this is why I use forEach. I am using a DynaValidatorForm which takes some attibutes for an employee. How shall I configure the DynaValidatorForm in my strus_config to take a unknown number of checkbox values? this is how my .jsp looks like. second question: how can I make the properties of a DynaVForm available to a Action? Thanks Wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For
RE: DynaValidatorFom with checkbox properties
Also, make sure that the action in which you attempt to get the "rrole" value from is declared to use the correct form. If you can, please post your action mapping as well. robert > -Original Message- > From: Robert Taylor [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 3:18 PM > To: Struts Users Mailing List > Subject: RE: DynaValidatorFom with checkbox properties > > > The exception indicates that you have not defined a property named "rrole" in your > form. > > What does your form-bean declaration look like in your struts-config file? > > robert > > > -Original Message- > > From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > > Sent: Friday, April 02, 2004 2:42 PM > > To: Struts Users Mailing List > > Subject: Re: DynaValidatorFom with checkbox properties > > > > > > > > > > Robert Taylor wrote: > > > > >>employee. How shall I configure > > >>the DynaValidatorForm in my strus_config to take a unknown number of > > >>checkbox values? > > >> > > >> > > > > > > > > type="java.lang.String[]" initial="{}"/> > > > > > > > > > > > > > > >>second question: how can I make the properties of a DynaVForm available > > >>to a Action? > > >> > > >> > > >DynaActionForm form = (DynaActionForm)form; > > >String[] rrole = (String[])form.get("rrole); > > > > > Doing so, gives me the exception: > > > > > > javax.servlet.ServletException: Invalid property name 'rrole' > > > > org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) > > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > root cause > > > > java.lang.IllegalArgumentException: Invalid property name 'rrole' > > > > org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) > > org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) > > org.zack.action.EmployeeDispatchAction.update(Unknown Source) > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > java.lang.reflect.Method.invoke(Method.java:324) > > > > org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) > > org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) > > > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > > > > >You might try using > > > > > > > > > > > > > > > > > everything else you supose seems to work well, but I cannot look what > > the DVForm realy loaded, > > how I will put these values into the database is an other story. > > > > Thank you very much. Wolfgang > > > > > > > > > > >robert > > > > > > > > > > > >>-Original Message- > > >>From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > > >>Sent: Friday, April 02, 2004 12:48 PM > > >>To: [EMAIL PROTECTED] > > >>Subject: DynaValidatorFom with checkbox properties > > >> > > >> > > >>Hi, > > >>I have a checkbox, where do not know in adwance how many properties to > > >>be checked I will have > > >>this is why I use forEach. > > >&
RE: DynaValidatorFom with checkbox properties
This has nothing to do with instantiating a form. His question was: > >>the DynaValidatorForm in my strus_config to take a unknown number of > >>checkbox values? The HttpServletRequest realizes multiple values under the same name (ie. dynamic number of checkboxes) as a java.lang.String[]. If you are using DynaActionForm then you can declare a property of type java.lang.String[] in your struts-config file to capture properties with multiple values under the same property name. This is done using the following syntax in your struts-config file nested within the form-bean element. His other question was: > >>second question: how can I make the properties of a DynaVForm available > >>to a Action? Since your are using DynaActionForm it implements the DynaBean interface which provides general getter/setter methods of the form get() and set(). The form first needs to be cast to the appropriate class or interface and then you can use the get() to extract the data. DynaActionForm form = (DynaActionForm)form; String[] rrole = (String[])form.get("rrole); He's getting the exception because the instance of the form passed to the action does not have the "rrole" property defined. I apologize if I missed something obvious. robert > -Original Message- > From: Takhar, Sandeep [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 2:54 PM > To: Struts Users Mailing List > Subject: RE: DynaValidatorFom with checkbox properties > > > there have been tonnes of posts on why you cannot instantiate a dynaform like that. > > http://www.javablogs.com/ViewEntry.jspa?id=128211 > > here is one example of how you can > > sandeep > > -Original Message- > From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 2:42 PM > To: Struts Users Mailing List > Subject: Re: DynaValidatorFom with checkbox properties > > > > > Robert Taylor wrote: > > >>employee. How shall I configure > >>the DynaValidatorForm in my strus_config to take a unknown number of > >>checkbox values? > >> > >> > > > > > type="java.lang.String[]" initial="{}"/> > > > > > > > > > >>second question: how can I make the properties of a DynaVForm available > >>to a Action? > >> > >> > >DynaActionForm form = (DynaActionForm)form; > >String[] rrole = (String[])form.get("rrole); > > > Doing so, gives me the exception: > > > javax.servlet.ServletException: Invalid property name 'rrole' > > org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > root cause > > java.lang.IllegalArgumentException: Invalid property name 'rrole' > > org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) > org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) > org.zack.action.EmployeeDispatchAction.update(Unknown Source) > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > java.lang.reflect.Method.invoke(Method.java:324) > > org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) > org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > >You might try using > > > > > > > > > > > everything else you supose seems to work well, but I cannot look what > the DVForm realy loaded, > how I will put th
RE: DynaValidatorFom with checkbox properties
The exception indicates that you have not defined a property named "rrole" in your form. What does your form-bean declaration look like in your struts-config file? robert > -Original Message- > From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 2:42 PM > To: Struts Users Mailing List > Subject: Re: DynaValidatorFom with checkbox properties > > > > > Robert Taylor wrote: > > >>employee. How shall I configure > >>the DynaValidatorForm in my strus_config to take a unknown number of > >>checkbox values? > >> > >> > > > > > type="java.lang.String[]" initial="{}"/> > > > > > > > > > >>second question: how can I make the properties of a DynaVForm available > >>to a Action? > >> > >> > >DynaActionForm form = (DynaActionForm)form; > >String[] rrole = (String[])form.get("rrole); > > > Doing so, gives me the exception: > > > javax.servlet.ServletException: Invalid property name 'rrole' > > org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > root cause > > java.lang.IllegalArgumentException: Invalid property name 'rrole' > > org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) > org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) > org.zack.action.EmployeeDispatchAction.update(Unknown Source) > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > java.lang.reflect.Method.invoke(Method.java:324) > > org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) > org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) > > org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > >You might try using > > > > > > > > > > > everything else you supose seems to work well, but I cannot look what > the DVForm realy loaded, > how I will put these values into the database is an other story. > > Thank you very much. Wolfgang > > > > > > >robert > > > > > > > >>-Original Message- > >>From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > >>Sent: Friday, April 02, 2004 12:48 PM > >>To: [EMAIL PROTECTED] > >>Subject: DynaValidatorFom with checkbox properties > >> > >> > >>Hi, > >>I have a checkbox, where do not know in adwance how many properties to > >>be checked I will have > >>this is why I use forEach. > >>I am using a DynaValidatorForm which takes some attibutes for an > >>employee. How shall I configure > >>the DynaValidatorForm in my strus_config to take a unknown number of > >>checkbox values? > >> > >> > >> > >> > >> > >> > >> > >>this is how my .jsp looks like. > >> > >>second question: how can I make the properties of a DynaVForm available > >>to a Action? > >> > >>Thanks > >>Wolfgang > >> > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorFom with checkbox properties
Takhar, Sandeep wrote: there have been tonnes of posts on why you cannot instantiate a dynaform like that. http://www.javablogs.com/ViewEntry.jspa?id=128211 here is one example of how you can sandeep Thank you sandeep, the DynaValidatorForm is already there. I use the rr_lesson_ibatis from Reuman and I try to extand it so that user roles/permissions can be attributed to the employees. The DVF is taken from the ActionForm element in the parameterlist of the execute method inside the action. Am I completely wrong? Wolfgang -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:42 PM To: Struts Users Mailing List Subject: Re: DynaValidatorFom with checkbox properties Robert Taylor wrote: employee. How shall I configure the DynaValidatorForm in my strus_config to take a unknown number of checkbox values? second question: how can I make the properties of a DynaVForm available to a Action? DynaActionForm form = (DynaActionForm)form; String[] rrole = (String[])form.get("rrole); Doing so, gives me the exception: javax.servlet.ServletException: Invalid property name 'rrole' org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Invalid property name 'rrole' org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) org.zack.action.EmployeeDispatchAction.update(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) You might try using everything else you supose seems to work well, but I cannot look what the DVForm realy loaded, how I will put these values into the database is an other story. Thank you very much. Wolfgang robert -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: DynaValidatorFom with checkbox properties Hi, I have a checkbox, where do not know in adwance how many properties to be checked I will have this is why I use forEach. I am using a DynaValidatorForm which takes some attibutes for an employee. How shall I configure the DynaValidatorForm in my strus_config to take a unknown number of checkbox values? this is how my .jsp looks like. second question: how can I make the properties of a DynaVForm available to a Action? Thanks Wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorFom with checkbox properties
there have been tonnes of posts on why you cannot instantiate a dynaform like that. http://www.javablogs.com/ViewEntry.jspa?id=128211 here is one example of how you can sandeep -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:42 PM To: Struts Users Mailing List Subject: Re: DynaValidatorFom with checkbox properties Robert Taylor wrote: >>employee. How shall I configure >>the DynaValidatorForm in my strus_config to take a unknown number of >>checkbox values? >> >> > > type="java.lang.String[]" initial="{}"/> > > > > >>second question: how can I make the properties of a DynaVForm available >>to a Action? >> >> >DynaActionForm form = (DynaActionForm)form; >String[] rrole = (String[])form.get("rrole); > Doing so, gives me the exception: javax.servlet.ServletException: Invalid property name 'rrole' org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Invalid property name 'rrole' org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) org.zack.action.EmployeeDispatchAction.update(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > >You might try using > > > > > everything else you supose seems to work well, but I cannot look what the DVForm realy loaded, how I will put these values into the database is an other story. Thank you very much. Wolfgang > > >robert > > > >>-Original Message- >>From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] >>Sent: Friday, April 02, 2004 12:48 PM >>To: [EMAIL PROTECTED] >>Subject: DynaValidatorFom with checkbox properties >> >> >>Hi, >>I have a checkbox, where do not know in adwance how many properties to >>be checked I will have >>this is why I use forEach. >>I am using a DynaValidatorForm which takes some attibutes for an >>employee. How shall I configure >>the DynaValidatorForm in my strus_config to take a unknown number of >>checkbox values? >> >> >> >> >> >> >> >>this is how my .jsp looks like. >> >>second question: how can I make the properties of a DynaVForm available >>to a Action? >> >>Thanks >>Wolfgang >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorFom with checkbox properties
Robert Taylor wrote: employee. How shall I configure the DynaValidatorForm in my strus_config to take a unknown number of checkbox values? second question: how can I make the properties of a DynaVForm available to a Action? DynaActionForm form = (DynaActionForm)form; String[] rrole = (String[])form.get("rrole); Doing so, gives me the exception: javax.servlet.ServletException: Invalid property name 'rrole' org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.IllegalArgumentException: Invalid property name 'rrole' org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:598) org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:241) org.zack.action.EmployeeDispatchAction.update(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524) javax.servlet.http.HttpServlet.service(HttpServlet.java:763) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) You might try using everything else you supose seems to work well, but I cannot look what the DVForm realy loaded, how I will put these values into the database is an other story. Thank you very much. Wolfgang robert -Original Message- From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: DynaValidatorFom with checkbox properties Hi, I have a checkbox, where do not know in adwance how many properties to be checked I will have this is why I use forEach. I am using a DynaValidatorForm which takes some attibutes for an employee. How shall I configure the DynaValidatorForm in my strus_config to take a unknown number of checkbox values? this is how my .jsp looks like. second question: how can I make the properties of a DynaVForm available to a Action? Thanks Wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorFom with checkbox properties
> employee. How shall I configure > the DynaValidatorForm in my strus_config to take a unknown number of > checkbox values? > second question: how can I make the properties of a DynaVForm available > to a Action? DynaActionForm form = (DynaActionForm)form; String[] rrole = (String[])form.get("rrole); You might try using robert > -Original Message- > From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 12:48 PM > To: [EMAIL PROTECTED] > Subject: DynaValidatorFom with checkbox properties > > > Hi, > I have a checkbox, where do not know in adwance how many properties to > be checked I will have > this is why I use forEach. > I am using a DynaValidatorForm which takes some attibutes for an > employee. How shall I configure > the DynaValidatorForm in my strus_config to take a unknown number of > checkbox values? > > > > > > > > this is how my .jsp looks like. > > second question: how can I make the properties of a DynaVForm available > to a Action? > > Thanks > Wolfgang > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorFom with checkbox properties
> From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > I have a checkbox, where do not know in adwance how many > properties to be checked I will have this is why I use forEach. Me, too. :) The DVForm property is a String[], and the JSP looks like: -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]