You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shyam Anand <st...@yahoo.com> on 2004/10/14 22:37:01 UTC

problem with table of radio buttons on Unix

Hi,

I have a scenario where I have a table of radio
buttons for a set of questions (Yes/No) on a page. I'm
using indexed properties for the same.

Each question on my JSP is represented by an object
called YesNoQuestion, and my ActionForm uses an
ArrayList of YesNoQuestions called yesNoList. 

In my ActionForm I have:


 /**
    * Access method for the yesNoList property.
    * 
    * @return   the current value of the yesNoList
property
    */
   public ArrayList getYesNoList() 
   {
      return yesNoList;
   }
   
   /**
    * Sets the value of the yesNoList property.
    * 
    * @param aYesNoList the new value of the yesNoList
property
    */
   public void setYesNoList(ArrayList aYesNoList) 
   {	  
      yesNoList = aYesNoList;	
   }


    /**
    * Access method for the yesNoList property.
    * 
    */
   public YesNoQuestion getYesNoList(int index) 
   {
      return (YesNoQuestion)yesNoList.get(index);
   }


    /**
    * Sets the value of the yesNoList property.
    * 
    */
   public void setYesNoList(int index,YesNoQuestion
yesNoQuestion) 
   {	  
      yesNoList.set(index,yesNoQuestion);	
   }

----------------------

In my JSP, I have:


<logic:iterate name="castYesNoBallotForm"
property="yesNoList" id="yesNoList" scope="session">	
					<tr>
					<td align="center"><bean:write name="yesNoList"
property="qno"/></td>				
					<td align="center"><bean:write name="yesNoList"
property="question"/></td>
					
					<td colspan="2">					
					<html:radio name="yesNoList" property="yesNoFlag"
value="Y" indexed="true" />Yes 
					&nbsp
					<html:radio name="yesNoList" property="yesNoFlag"
value="N" indexed="true" />No
					&nbsp
					<html:radio name="yesNoList" property="yesNoFlag"
value="A" indexed="true"/>Abstain
					</td>					
					</tr>
			</logic:iterate

------------------------

The above code works fine when I deploy it on a
Windows machine. But, on a Unix machine (Sun Solaris),
I get the following error when I try to access my JSP:

"No getter method for property yesNoList of bean
castYesNoBallotForm "

Could somebody tell me what I'm doing wrong?

Any help will be greatly appreciated.

Thanks,
Shyam



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: problem with table of radio buttons on Unix

Posted by Shyam Anand <st...@yahoo.com>.
Hello,

Could somebody help me out with this? Any insights on
what could be causing this problem would be greatly
appreciated.

Thanks,
Shyam

--- Shyam Anand <st...@yahoo.com> wrote:

> Hi,
> 
> I have a scenario where I have a table of radio
> buttons for a set of questions (Yes/No) on a page.
> I'm
> using indexed properties for the same.
> 
> Each question on my JSP is represented by an object
> called YesNoQuestion, and my ActionForm uses an
> ArrayList of YesNoQuestions called yesNoList. 
> 
> In my ActionForm I have:
> 
> 
>  /**
>     * Access method for the yesNoList property.
>     * 
>     * @return   the current value of the yesNoList
> property
>     */
>    public ArrayList getYesNoList() 
>    {
>       return yesNoList;
>    }
>    
>    /**
>     * Sets the value of the yesNoList property.
>     * 
>     * @param aYesNoList the new value of the
> yesNoList
> property
>     */
>    public void setYesNoList(ArrayList aYesNoList) 
>    {	  
>       yesNoList = aYesNoList;	
>    }
> 
> 
>     /**
>     * Access method for the yesNoList property.
>     * 
>     */
>    public YesNoQuestion getYesNoList(int index) 
>    {
>       return (YesNoQuestion)yesNoList.get(index);
>    }
> 
> 
>     /**
>     * Sets the value of the yesNoList property.
>     * 
>     */
>    public void setYesNoList(int index,YesNoQuestion
> yesNoQuestion) 
>    {	  
>       yesNoList.set(index,yesNoQuestion);	
>    }
> 
> ----------------------
> 
> In my JSP, I have:
> 
> 
> <logic:iterate name="castYesNoBallotForm"
> property="yesNoList" id="yesNoList" scope="session">
> 
> 					<tr>
> 					<td align="center"><bean:write name="yesNoList"
> property="qno"/></td>				
> 					<td align="center"><bean:write name="yesNoList"
> property="question"/></td>
> 					
> 					<td colspan="2">					
> 					<html:radio name="yesNoList"
> property="yesNoFlag"
> value="Y" indexed="true" />Yes 
> 					&nbsp
> 					<html:radio name="yesNoList"
> property="yesNoFlag"
> value="N" indexed="true" />No
> 					&nbsp
> 					<html:radio name="yesNoList"
> property="yesNoFlag"
> value="A" indexed="true"/>Abstain
> 					</td>					
> 					</tr>
> 			</logic:iterate
> 
> ------------------------
> 
> The above code works fine when I deploy it on a
> Windows machine. But, on a Unix machine (Sun
> Solaris),
> I get the following error when I try to access my
> JSP:
> 
> "No getter method for property yesNoList of bean
> castYesNoBallotForm "
> 
> Could somebody tell me what I'm doing wrong?
> 
> Any help will be greatly appreciated.
> 
> Thanks,
> Shyam
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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