You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Markus Koivisto <ma...@navielektro.fi> on 2005/05/19 12:40:22 UTC

LookupDispatchAction and struts-faces

Hi!

I've been trying to migrate part of a web-application from struts to 
struts-faces. However, I'm having trouble converting those jsp pages 
that are mapped to a LookupDispatchAction.  I did not find any similar 
questions in the mailing-list archive, so I decided to post this.


In struts, the relevant snippet in event.jsp looked like this:

<html:form action="/oms">
<html:submit property="function"><bean:message 
key="button.inserEvent"/></html:submit>,
</html:form>

where function was the property used as a parameter in the actionmapping.
This was rendered as:

<form name="equipment" method="post" action="/oms/oms.do">
<input type="submit" name="function" value="Insert New Event">
</form>


After converting the page to using JSF tags, the source snippet became

<s:form action="/oms" >
 <h:commandButton id="function" type="submit" 
value="#{messages['button.insertEvent']}"> </h:commandButton>
</s:form>

and this was rendered as

<form id="_id1" name="equipment" action="/oms/faces/event.jsp" method="post">
<input id="_id1:function" type="submit" name="_id1:function" value="Insert New Event" />        
</form>


These are not even remotely similar. This causes problems for the LookupDispatchAction. When I converted other pages, they did work, even if the action was the path of the jsp page. Submitting the form led to the execute() method being run. However, when I try to submit this page, nothing happens. I presume that the execute() method is run, but since the function parameter is present, it ends up not finding the method it's supposed to run.
Is there a workaround for any of this? 

--
Markus





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