You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Siddiq Syed <si...@yahoo.com> on 2009/11/04 21:13:29 UTC
retrieving the result from strust config.
Is there any way where I can retrieve the result name from the prepare method
of an action.
For example, I have the below mapping in the struts.xml file.
<action name="determineCaseEvaluationType"
class="com.activity.EvaluateCaseAction"
method="determineCaseEvaluationType">
<result name="guidelInitConsid"
type="tiles">editGuidelinesCaseEvaluation</result>
<result name="shrtsntcInitConsid"
type="tiles">editShortSentenceCaseEvaluation</result>
<result name="sscat2p1InitConsid"
type="tiles">editShortSentenceCaseEvaluation</result>
</action>
If I passes the string "guidelInitConsid" , I need to get
"editGuidelinesCaseEvaluation" as a result.
I know its odd.!!
But i am curious to know if we can get the result , through any of the api
method., like actionmapping
Any idea ?
--
View this message in context: http://old.nabble.com/retrieving-the-result-from-strust-config.-tp26203846p26203846.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: retrieving the result from strust config.
Posted by Dave Newton <ne...@yahoo.com>.
Siddiq Syed wrote:
> Is there any way where I can retrieve the result name from the prepare method
> of an action.
>
> For example, I have the below mapping in the struts.xml file.
>
> <action name="determineCaseEvaluationType"
> class="com.activity.EvaluateCaseAction"
> method="determineCaseEvaluationType">
> <result name="guidelInitConsid"
> type="tiles">editGuidelinesCaseEvaluation</result>
> <result name="shrtsntcInitConsid"
> type="tiles">editShortSentenceCaseEvaluation</result>
> <result name="sscat2p1InitConsid"
> type="tiles">editShortSentenceCaseEvaluation</result>
> </action>
>
> If I passes the string "guidelInitConsid" , I need to get
> "editGuidelinesCaseEvaluation" as a result.
>
> I know its odd.!!
It doesn't really make any sense, either--how would you know what result
you wanted until you actually ran the action? It's the action invocation
that *returns* the result. Prepare() is called before that.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org