You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marco Mistroni <mm...@waersystems.com> on 2003/12/23 14:57:40 UTC
RE: Error in JSP when using DynaActionForm / apologies, problem solved
Hi all,
Sorry that I bothered the list with my spam.
I found the problem..in the struts config I was still associating
The old MyForm bean to the new action created 'AliasMaintenanceAction'
So whenever, in my aliasMaintenance.jsp, I was using the tag
<html:form action="AliasMaintenanceAction">
the page assumed that the form to be used was MyForm (as of struts
config)
thanx anyway for ur prompt responses..
regards
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Error in JSP when using DynaActionForm / apologies, problem solved
Posted by Sheldon Hearn <sh...@starjuice.net>.
On (2003/12/23 13:57), Marco Mistroni wrote:
> Sorry that I bothered the list with my spam.
> I found the problem..in the struts config I was still associating
> The old MyForm bean to the new action created 'AliasMaintenanceAction'
I have the same problem, but I can't spot my misconfiguration.
... struts-config.xml ...
<form-bean
name="aliasForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property
name="aliasId"
type="java.lang.Long"/>
<form-property
name="aliasParentAliasAddress"
type="java.lang.String"
initial=""/>
<!-- There are other properties, but these are the only ones
used in the addParentAlias example.
-->
</form-bean>
...
<!-- Display a page with forms for various edits, which are serviced
by methods in a DispatchAction, called AliasActions.
-->
<action
path="/viewAlias"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/viewAlias.jsp"
validate="false"
/>
<!-- This handles most of the operations you can perform from
/viewAlias.do.
-->
<action
path="/editAlias"
type="bz.clue.cluex4.action.AliasActions"
name="aliasForm"
scope="session"
input="/viewAlias.do"
parameter="method"
validate="false">
<forward name="Success" path="/viewAlias.do" redirect="true"/>
</action>
The JSP form that breaks viewAlias.jsp is:
<html:form action="/editAlias">
<!-- Request AliasActions.addParentAlias() -->
<html:hidden property="method" value="addParentAlias"/>
<html:hidden property="aliasId"
value='<%= alias.getId().toString() %>'/>
<html:text property="aliasParentAliasAddress" size="30"/>
<html:submit styleClass="button">
<bean:message key="button.addParentAlias"/>
</html:submit>
</html:form>
If I give aliasParentAliasAddress a value in the html:text tag, I don't
have a problem. Without one, I get
No getter method for property aliasParentAliasAddress of bean
org.apache.struts.taglib.html.BEAN
I've followed the example pretty closely on this; the O'Reilly book's a
little useless in this area. :-(
Ciao,
Sheldon.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org