You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frank Ling <st...@hotmail.com> on 2001/03/06 05:18:28 UTC

HTML Radio

Hi, There:

I try to using HTML Redio tags, and keeping getting following error:

javax.servlet.jsp.JspException: No getter method available for property
actionType for bean under name org.apache.struts.taglib.html.BEAN
 at org.apache.struts.taglib.html.RadioTag.doStartTag(RadioTag.java:197)

My simple JSP page is as following:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/apt.tld" prefix="apt" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<app:checkLogon/>
<jsp:useBean id="user" scope="session" type="com.ingenuity.app.apt.User"/>

<html:html>
<head>
<title><bean:message key="paymentSearch.title"/></title>
<html:base/>
</head>

<body bgcolor="white">



<html:form action="/paymentSearch">

 <h3><bean:message key="paymentSearch.heading"/>
 <jsp:getProperty name="user" property="username"/></h3>

 <tr>
     <th align="right">Single Select Allowed:</th>
     <td align="left">
  <html:radio property="actionType" value="displayStm">
   <bean:message key="paymentSearch.searchType.displayStm"/>
  </html:radio>
  <html:radio property="actionType" value="reinsertArticle">
   <bean:message key="paymentSearch.searchType.reinsertArticle"/>
  </html:radio>
  <html:radio property="actionType" value="interestCountry">
   <bean:message key="paymentSearch.searchType.interestCountry"/>
  </html:radio>
   </td>
   </tr>

 <tr>
     <td align="right">
        <html:submit>Save</html:submit>
     </td>
     <td align="left">
        <html:reset>Reset</html:reset>
        <html:cancel>Cancel</html:cancel>
     </td>
   </tr>

 <ul>
<li><html:link page="/logoff.do"><bean:message
key="paymentSearch.logoff"/></html:link></li>
 </ul>

</html:form>

</body>

</html:html>


I don't really understand what is this getter method mean, and it's really
frastrated. Any help will be highly appreciated.

Regard

Frank Ling

Re: HTML Radio

Posted by Martin Cooper <ma...@tumbleweed.com>.
It looks like no bean was found for the form in which your radio button is
contained. Struts is trying to obtain the actionType property from this bean
to set up the radio button.

Since your <html:radio> tag does not specify the name attribute, Struts
looks for the bean for the <html:form> tag. You don't specify name there
either, so the form tag would have tried to locate a bean based on
information under the corresponding action entry in your struts-config.xml
file. If there is no entry there, then I guess you would be out of luck,
which may be what's happening here.

Hope this helps.

--
Martin Cooper

----- Original Message -----
From: "Frank Ling" <st...@hotmail.com>
To: <st...@jakarta.apache.org>
Sent: Monday, March 05, 2001 8:18 PM
Subject: HTML Radio


> Hi, There:
>
> I try to using HTML Redio tags, and keeping getting following error:
>
> javax.servlet.jsp.JspException: No getter method available for property
> actionType for bean under name org.apache.struts.taglib.html.BEAN
>  at org.apache.struts.taglib.html.RadioTag.doStartTag(RadioTag.java:197)
>
> My simple JSP page is as following:
>
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/apt.tld" prefix="apt" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> <app:checkLogon/>
> <jsp:useBean id="user" scope="session" type="com.ingenuity.app.apt.User"/>
>
> <html:html>
> <head>
> <title><bean:message key="paymentSearch.title"/></title>
> <html:base/>
> </head>
>
> <body bgcolor="white">
>
>
>
> <html:form action="/paymentSearch">
>
>  <h3><bean:message key="paymentSearch.heading"/>
>  <jsp:getProperty name="user" property="username"/></h3>
>
>  <tr>
>      <th align="right">Single Select Allowed:</th>
>      <td align="left">
>   <html:radio property="actionType" value="displayStm">
>    <bean:message key="paymentSearch.searchType.displayStm"/>
>   </html:radio>
>   <html:radio property="actionType" value="reinsertArticle">
>    <bean:message key="paymentSearch.searchType.reinsertArticle"/>
>   </html:radio>
>   <html:radio property="actionType" value="interestCountry">
>    <bean:message key="paymentSearch.searchType.interestCountry"/>
>   </html:radio>
>    </td>
>    </tr>
>
>  <tr>
>      <td align="right">
>         <html:submit>Save</html:submit>
>      </td>
>      <td align="left">
>         <html:reset>Reset</html:reset>
>         <html:cancel>Cancel</html:cancel>
>      </td>
>    </tr>
>
>  <ul>
> <li><html:link page="/logoff.do"><bean:message
> key="paymentSearch.logoff"/></html:link></li>
>  </ul>
>
> </html:form>
>
> </body>
>
> </html:html>
>
>
> I don't really understand what is this getter method mean, and it's really
> frastrated. Any help will be highly appreciated.
>
> Regard
>
> Frank Ling