So you mean we should push all JSF actions onto OGNL stack?
Shouldn't the jsf interceptor stack do it for us?
I mean if you are using plain jsf, whatever backing beans you configure
in faces-config, can be invoked from any jsf component from anywhere and
not just the action which renders it which is the case with struts-jsf
plugin.
So what I am suggesting is :
1) if you have action config like :
<action name="jsfAction" class-"....">
<interceptor-ref=jsfStack"/>
<result.....
</action>
>From a jsf component you should be able to invoke it as
<h:commandButton action"#{jsfAction.doSomething}"/>
Thanks
-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 12:47 PM
To: Sanjeev Vijapurapu
Subject: Re: Struts2 JSF Plugin
provisionally yes (for a static invocation)
@[EMAIL PROTECTED]()
for non-static would have to know if you pushed the object onto OGNL
stack
via request/session/application or root e.g.
assuming action is the ONLY single root object you can access
doSomething()
method via this mechanism
#action.doSomething()
Martin--
----- Original Message -----
From: "Sanjeev Vijapurapu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2008 2:49 PM
Subject: Struts2 JSF Plugin
I was trying to create a prototype of struts2 + jsf. In the process I
found that the mappings have to be used with "action" as default.
Like
<h:inputText id="userName" value="#{action.userName}" />
or
<h:commandButton action="#{action.doSomething}"/>
instead of using action names from struts configuration directly. For
example if I have configured an action as login in struts config, I
should able to use it in jsf component like
<h:commandButton action="#{login.doSomething}"/>
But interestingly thats not the case. I thought that in Struts2
framework all the actions with interceptor stack as jsf would act
similar to managed beans in a JSF framework. I mean use them by the
names configured in faces-config.xml.
But if I want to do that in struts2, I need faces-config.xml and normal
struts2 actions which is disappointing. I mean what about the scenario
where I have to send a jsf request to different action than the one
which last rendered it? So my main question is how can I use action
names in the jsf component?
Am I missing something here or is that the way it was designed?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]