Here's what we use in editProfile.xhtml:

<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";>

<head>
    <meta name="menu" content="UserMenu"/>
</head>

<f:view>

<h:form id="userProfile">
    <h:commandLink action="#{userForm.edit}" id="edit"/>
</h:form>

<script type="text/javascript">
    // Might be able to remove proprietary call if I can get
@PostConstruct to work
    oamSubmitForm('userProfile','userProfile:edit');
</script>

</f:view>
</html>

On Mon, Jul 7, 2008 at 2:25 PM, pedro_burglin <[EMAIL PROTECTED]> 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-tp18325804s2369p18325804.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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to