Hello,

I am trying to convert my Struts 1.1 web app (struts.jar 4-17-2004) to the Struts-Faces
Integration Library (Ted's updated struts-faces.jar 3-29-2004) using Tiles, multiple 
struts config
files, and the DispatchAction.  My JSP:
<s:form action="/quiz" method="post">
  <h:inputHidden id="dispatch" value="checkAnswer"/>
  <h:inputHidden id="questionId" value="#{quizForm.questionId}"/>
...
  <h:commandButton id="submit" type="SUBMIT" styleClass="submitbutton" value="Final 
Answer"
onclick="javascript:document.forms[0].action='quiz.do';"/>
</s:form>

After loading up this page, the HTML source is:
<form id="layoutBody:formBody:_id12" 
action="/jhound/WEB-INF/jsp/templates/tigrisLayout.faces"
method="post">
  <input type="hidden" name="layoutBody:formBody:_id12" 
value="layoutBody:formBody:_id12" />
  <input id="layoutBody:formBody:_id12:dispatch" type="hidden"
name="layoutBody:formBody:_id12:dispatch" value="checkAnswer" />
  <input id="layoutBody:formBody:_id12:questionId" type="hidden"
name="layoutBody:formBody:_id12:questionId" value="38" />
...
<input id="layoutBody:formBody:_id12:submit" type="submit" 
name="layoutBody:formBody:_id12:submit"
value="Final Answer" onclick="javascript:document.forms[0].action='quiz.do';" 
class="submitbutton"
/><input type="hidden" name="layoutBody:formBody:_id12" 
value="layoutBody:formBody:_id12" />
</form>

Since my form's action attribute was incorrect I added the JavaScript to the submit 
button to
change the form's action attribute value before submission.  Now my current problem is 
that my
hidden field names are prefixed with "layoutBody:formBody:_id12:" therefore my 
ActionForm bean is
not getting populated correctly.  My questions are:
1) Should I be modifying the form's action attribute?
2) Is there something I can do to fix the hidden field names?
3) OR Should I just follow the directions from this article,
http://www-106.ibm.com/developerworks/java/library/j-integrate/, starting with 
"Listing 12.
Modified createActionForm() method in FormComponent"?

Thanks,

=====
Robert Miller
SCJP, SCWCD, SCEA
Java 1.4.2, Tomcat 4.1.30
Microsoft Windows XP Home Edition 2002


        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to