You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Buland Altaf <bu...@yahoo.com> on 2004/07/17 10:54:04 UTC

About Master-Detail / Radio Buttons / Indexed Properties Behavious !!!

 Hi Theres,
I am facing some issues about master-detail / radio button 

for indexed properties. Issues are:-___________ Problem 1 ______________>1. I am facing later mentioned problem of>master-detail from on session time out.I am using>DynaActionForms with array properties as form-bean>property.><form-property name="vefiryOrMakeBrokerDetail">type="com.abamco.clientVerification.VerifyOrMakeBrokerPayments[]"/>>and i have set session as its action scope. But 2.>when my application restarts and i Re-fresh the>>>>masteer-detail form it>>gives me the following error:>>>>--------------------- Error Start>>--------------------->>>>HTTP Status 500 - >>>>type Exception report>>>>message >>>>description The server encountered an internalerror>>() that prevented it from fulfilling this request.>>>>exception >>>>javax.servlet.ServletException:
 BeanUtils.populate>>>>>>org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1190)g.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j>>ava:821)>>>>>>g.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)g.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.ArrayIndexOutOfBoundsException>>	java.lang.reflect.Array.get(Native
 Method)>>>>>>org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.>>java:474)>>>>>>g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.>>java:428)>>>>>>g.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j>>ava:770)>>>>>>g.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80>>1)>>>>>>g.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1188)g.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j>>ava:821)>>>>>>g.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)g.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)note The full stack trace of the root cause isavailable in the Tomcat logs.Apache Tomcat/5.0.16----------------- Error End -----------------I have my own created reset button in whichi nullify all teh feilds. But, tis method is now acallback method. I do't override thereset(ActionMapping,HttServletRequest) method. All theform properties exactly matching with theircorresponding dynaactionfrom properties and thisscreen is working properly. It only behave abnormallywhen my web app context restarts or tomcat restarts asin that case session will lost.__________________ Problem 2 _____________2. Also, One more problem.I have tried to fix it butas a new commer I have now stucked. Actually, I have abean which i want to use in jsp with iterate tag. andi have like this:-<logic:present name="individualAccountRegForm"property="client"><logic:iterate id="client"name="individualAccountRegForm" property="client"><html:hidden
 name="client" indexed="true"property="status"/><tr><td align="left"><html:text name="client" indexed="true" property="clientId"/></td><td align="left"><html:radio name="client"property="primaryClient" idName="client"value="primaryClient" indexed="true"/></td> </tr></logic:iterate></logic:present>I mean to say that if i have indexed properties and iwant to check some equal operator on it then there isno indexed attribute in logic:equal or any othercomparison tag. even then it picks the indexedproperty value properly. How this happens.Is thie anyauto build flexibility in those tags top check thecommign property that either iot is a normal orindexed property.__________________ Problem 3________________________I have the radio buttons, but they are not behavingproperly.I want to use radio buttons with indexedproperty.Actually one of my indexed property willbehave like radio button and if i have more than onerows then i will have more than one radio buttons.Inthat case how can i set
 radio button to enable onlyone at a time.I tryied it, but all the button willenable at a time(menas previous button will remainenable when we press any other radio button to getenable it should disable the previous enable button)

Regards,

 



<DIV>
<P align=left><FONT face="Times New Roman">Buland Altaf Malik,<BR><STRONG>Sr. Software Engineer</STRONG>, <BR>Softech System's(pvt)Ltd. <BR>10/25 asad jan road lahore,cantt - 54810 Pakistan<BR>Tel: 92-42-6665812 , 92-42-6660802</FONT></P>
<P align=left><FONT face="Times New Roman">Mob: 0333-4344113<BR>Fax: 92-42-6665792</FONT></P>
<P align=left><FONT face="Times New Roman"><A href="http://www.softech.com.pk/">http://www.softech.com.pk</A><BR><A href="mailto:buland_altaf@hotmail.com">buland_altaf@hotmail.com</A></FONT></P></DIV>
		
---------------------------------
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!

Re: About Master-Detail / Radio Buttons / Indexed Properties Behavious !!!

Posted by Rick Reumann <st...@reumann.net>.
Could you please try to format your e-mail message better with breaks 
that make sense. (Code needs some hard coded breaks at appropriate places:).


Buland Altaf wrote:

>  Hi Theres,
> I am facing some issues about master-detail / radio button 
> 
> for indexed properties. Issues are:-___________ Problem 1 ______________>1. I am facing later mentioned problem of>master-detail from on session time out.I am using>DynaActionForms with array properties as form-bean>property.><form-property name="vefiryOrMakeBrokerDetail">type="com.abamco.clientVerification.VerifyOrMakeBrokerPayments[]"/>>and i have set session as its action scope. But 2.>when my application restarts and i Re-fresh the>>>>masteer-detail form it>>gives me the following error:>>>>--------------------- Error Start>>--------------------->>>>HTTP Status 500 - >>>>type Exception report>>>>message >>>>description The server encountered an internalerror>>() that prevented it from fulfilling this request.>>>>exception >>>>javax.servlet.ServletException:
>  BeanUtils.populate>>>>>>org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1190)g.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j>>ava:821)>>>>>>g.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)g.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.ArrayIndexOutOfBoundsException>>	java.lang.reflect.Array.get(Native
>  Method)>>>>>>org.apache.struts.action.DynaActionForm.get(DynaActionForm.java:296)g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.>>java:474)>>>>>>g.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.>>java:428)>>>>>>g.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.j>>ava:770)>>>>>>g.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:80>>1)>>>>>>g.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1188)g.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j>>ava:821)>>>>>>g.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)g.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)javax.servlet.http.HttpServlet.service(HttpS
ervlet.java
> :763)javax.servlet.http.HttpServlet.service(HttpServlet.java:856)note The full stack trace of the root cause isavailable in the Tomcat logs.Apache Tomcat/5.0.16----------------- Error End -----------------I have my own created reset button in whichi nullify all teh feilds. But, tis method is now acallback method. I do't override thereset(ActionMapping,HttServletRequest) method. All theform properties exactly matching with theircorresponding dynaactionfrom properties and thisscreen is working properly. It only behave abnormallywhen my web app context restarts or tomcat restarts asin that case session will lost.__________________ Problem 2 _____________2. Also, One more problem.I have tried to fix it butas a new commer I have now stucked. Actually, I have abean which i want to use in jsp with iterate tag. andi have like this:-<logic:present name="individualAccountRegForm"property="client"><logic:iterate id="client"name="individualAccountRegForm" property="client"><html:hidde
n
>  name="client" indexed="true"property="status"/><tr><td align="left"><html:text name="client" indexed="true" property="clientId"/></td><td align="left"><html:radio name="client"property="primaryClient" idName="client"value="primaryClient" indexed="true"/></td> </tr></logic:iterate></logic:present>I mean to say that if i have indexed properties and iwant to check some equal operator on it then there isno indexed attribute in logic:equal or any othercomparison tag. even then it picks the indexedproperty value properly. How this happens.Is thie anyauto build flexibility in those tags top check thecommign property that either iot is a normal orindexed property.__________________ Problem 3________________________I have the radio buttons, but they are not behavingproperly.I want to use radio buttons with indexedproperty.Actually one of my indexed property willbehave like radio button and if i have more than onerows then i will have more than one radio buttons.Inthat case how can
 i set
>  radio button to enable onlyone at a time.I tryied it, but all the button willenable at a time(menas previous button will remainenable when we press any other radio button to getenable it should disable the previous enable button)
> 
> Regards,
> 
>  
> 
> 
> 
> <DIV>
> <P align=left><FONT face="Times New Roman">Buland Altaf Malik,<BR><STRONG>Sr. Software Engineer</STRONG>, <BR>Softech System's(pvt)Ltd. <BR>10/25 asad jan road lahore,cantt - 54810 Pakistan<BR>Tel: 92-42-6665812 , 92-42-6660802</FONT></P>
> <P align=left><FONT face="Times New Roman">Mob: 0333-4344113<BR>Fax: 92-42-6665792</FONT></P>
> <P align=left><FONT face="Times New Roman"><A href="http://www.softech.com.pk/">http://www.softech.com.pk</A><BR><A href="mailto:buland_altaf@hotmail.com">buland_altaf@hotmail.com</A></FONT></P></DIV>
> 		
> ---------------------------------
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!


-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org