Hi
you try like this in struts_config.xml and tiles_sam.xml file.
<action path="/Sample" name="sampleForm" scope="request"
type="controller.admin.action.SampleAction" validate="true"
input="/admin/icf/sample.jsp">
<forward name="failure" path="/admin/icf/sample.jsp"
</action>
in tiles for this sample.jsp
<definition name="sample.icf" extends="base.project.admin" >
<put name="header" value="heading" />
<put name="header_detail" value="Sample" />
<put name="menu" value="/admin/template/menu_blank.jsp" />
<put name="body" value="/admin/icf/sample.jsp" />
<put name="footer" value="Status: Sample page"/>
</definition>
this may help u....
Quoting Martin Ravell <[EMAIL PROTECTED]>:
> Say I have an app that uses Struts and Tiles and I am trying to get the
> Validator plugin to play nicely.
>
> As I understand it the 'input' option of an action element in
> struts-config.xml is used when a validation fails. i.e. if a validation
> fails we are redirected to whatever is in the input option rather than
> getting sent to the Action.
>
> This is what we want right? Only actually go to the Action if the fields
> pass their validations.
>
> I've looked at various Tiles tutorials and even more Validator tutorials
> but
> I can't seem to work out what I need to do to get these two to work in
> conjunction with each other.
>
> This 'input' value for the action element cannot be straight to a .jsp
> since
> I am using Tiles. If a validation fails we need to get Tiles to reconstruct
> the page (with it's header, menu etc) and display the messages from the
> failed validation.
>
> If I put in the name of a definition in my tiles-defs.xml into the 'input'
> option and purposefully fail validation on one or more fields I just get a
> blank page and a record in my log saying:
>
> Validation failed, returning to 'activate_init'
>
> (activate_init in this case was the name of my definition in
> tiles-defs.xml)
>
>
> I know that the validator is being invoked because if I enter values that
> will pass the validation tests I do go through to the Action.
>
>
> Can someone give me an idea of what the action element should look like?
> More specifically what should go into the input option if I am using Tiles?
>
> I've tried creating an action definition specifically for use in the
> 'input'
> option e.g.
>
> <action path="/act" forward="activate_init"/>
>
> Then putting "/act.do" into the input still gives me a blank page.
>
>
> Damn I am confused. Have been looking so hard at this that I cannot see it.
> Can someone help with an explanation of how Struts and Tiles and the
> Validator can work happily together?
>
>
> Regards
> Marty
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]