OK, I see. It's something like that ?

       <action name="getInfosEmploye" class="infosEmployeAction">
           <param name="aliases">#{'demandeAbsence.matriculeDemandeur' :
'matricule'}</param>
           <interceptor-ref name="alias" />
           <result name="success">/jsp/employes/infosEmploye.jsp</result>
       </action>

Does it mean I need to create a specific action for any form which will user
the getInfosEmploye action ?
In fact, it would be perfect if you could apply the alias interceptor in the
JSP page, but I'm not sure it could be possible :(

Olivier


2007/4/27, Musachy Barroso <[EMAIL PROTECTED]>:

I think the "alias" interceptor would help in this case:

http://struts.apache.org/2.x/docs/alias-interceptor.html

musachy

On 4/27/07, Olivier THIERRY <[EMAIL PROTECTED]> wrote:
>
> Thanks Musachy, your advices were very helpful.
>
> I succeeded in doing what I wanted, but there is still a detail that
> upsets
> me with your solution and I'm not totally happy with the solution.
>
> The drawback of the solution is that the the parameter I can get in my
> action has the name of the text field in my JSP page (here "
> demandeAbsence.matriculeDemandeur"). This reduces the possibility to
reuse
> this action in other forms, since the action expects the employee code
to
> be
> sent in a "demandeAbsence.matriculeDemandeur" parameter. But the
employee
> code text field can have a different name in other forms ...
>
> I found a solution by implementing the ParameterAware interface in my
> action, so I could get the first (and only) parameter. But of course it
> won't work if I have more parameters expected.
>
> Do you know if there is a way to change the name of the parameters
before
> they are sent to the Struts servlet or to the action ?
>
> Thanks in advance
>
> Olivier
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Reply via email to