Hi Matt,
Thanks for the quick reply. I tried your suggestion and I still cannot make
it work properly.
Perhaps if I provide more details you or someone else may be able to help me
on that. In default.jsp I added something like this:
<form id="shoppingCart" name="shoppingCart" method="post" action="#"
enctype="application/x-www-form-urlencoded">
<input id="shoppingCart:checkout" name="shoppingCart:checkout" type="submit"
value="Checkout"
onclick="oamSubmitForm('shoppingCart','shoppingCart.checkout');" />
</form>
Even after I added the oamSubmitForm it is still not calling the checkout
method in the shoppingCart bean and is always directing the user to wherever
I set the form action to, instead of using the navigation rules defined in
faces-config.xml.
Another possible approach to solve this problem would be to setup
faces-config.xml to always run a specific Action before presenting the
Checkout screen, regardless of where the user is coming from. I am quite new
to JSF, do you know if and how such setup could be implemented?
Thanks again,
Pedro Burglin
pedro_burglin wrote:
>
> Hi All,
>
> Does anyone know how to call a JSF action from AppFuse's non-JSF
> default.jsp?
>
> I implemented a shopping cart component UI in default.jsp so it would be
> presented in most screens of the application. In this UI component I added
> a link (and later replaced with a form and a button with similar results)
> to the Checkout screen. Everything was working fine until I had to
> implement logic to determine if the Checkout link in this UI component
> would direct the user to the Checkout screen or to another screen based on
> logic implemented in an Action class.
>
> The problem is that I can't find how to make the Checkout button (or link)
> in default.jsp to use the JSF action and the navigation rules defined in
> faces-config.xml. It always send the user to the Checkout screen without
> calling any logic in the Checkout managed bean.
>
> I have another screen with a button to the Checkout screen. This screen
> uses JSF to contact the managed bean and navigation rules and it works
> fine. My problem is just with default.jsp.
>
> Digging for entries about similar issue I found this link:
> http://www.nabble.com/Editing-default.jsp-td9267623s2369.html#a9267623
> I believe the discussed solution does not work (yet?) and I was really
> looking for a simpler solution, like how to use html/javascript in
> default.jsp to use JSF's managed bean and navigation rules, if possible...
>
> Any help really appreciated,
> Pedro Burglin
>
--
View this message in context:
http://www.nabble.com/call-to-JSF-action-from-default.jsp-tp18325804s2369p18326664.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]