-------- Original Message --------
Subject:        Re: [Fwd: Re: [Trinidad] XMLMenuModel bug]
Date:   Mon, 27 Aug 2007 10:03:14 -0700
From:   Jeanne Waldman <[EMAIL PROTECTED]>
To:     Gary Kind <[EMAIL PROTECTED]>
References:     <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>



Hey, don't tell me, tell the list. :)

Gary Kind wrote:
This is not a bug. The "action" attribute does not perform navigation. The value, or the value returned by an EL expression, for the action attribute must be a string that matches a navigation-case from-outcome in your faces-config.xml. THAT is what does the navigation.

Actually, the XMLMenuModel, although it can work for Menus, was meant for tabbed navigation. It really is a navigation model.

Here is what Luka has done:

> WorkingTaskAdmin:
>
> public String addNewWorkingTask(){
>        sessionBean.addNewWorkingTask();
> return "*service:workingTaskWizard"; -- invoking in > tr:commandMenuItem act as where "return null;*"
>    }
>
> menu-model.xml:
>
> <itemNode id="menu241" label="#{mnl.newWorkingTask}" > action="*#{WorkingTaskAdmin.addNewWorkingTask}*" > focusViewId="/service/workingTaskWizard.xhtml" /> The string returned (in bold) is certainly NOT a navigation-case from-outcome. Luka should have a navigation-case in his faces-config.xml that resembles this:

<navigation-rule>
  <navigation-case>
    <from-outcome>goToWorkingWizard</from-outcome>
    <to-view-id>/service/workingTaskWizard.*jspx*</to-view-id>
  </navigation-case>
       .
       .
       .
</navigation-rule>

His Bean should look like this:

WorkingTaskAdmin:

public  String addNewWorkingTask()
{ sessionBean.addNewWorkingTask();
  return "goToWorkingWizard";
}

and his menu-model.xml itemNode should look like this:

<itemNode id="menu241" label="#{mnl.newWorkingTask}" action="#{WorkingTaskAdmin.addNewWorkingTask}" focusViewId="/service/workingTaskWizard.*jspx*" />



Jeanne Waldman wrote:
FYI, in case you missed it.

-------- Original Message --------
Subject:        Re: [Trinidad] XMLMenuModel bug
Date:   Fri, 24 Aug 2007 13:03:54 +0200
From:   Luka Surija <[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>
Reply-To: MyFaces Discussion <[email protected]> <mailto:[email protected]> To: MyFaces Discussion <[email protected]> <mailto:[email protected]> References: <[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>



Actually nothing happens, I've found that Firebug is displaying this error message:

validatorArray has no properties:

_multiValidate(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0, undefined, 17 more...])Common1_0_3.js (line 5248) _validateInline(form#j_id1 index.xhtml, "j_id5:0:j_id6", ["j_id28", 0, undefined, 17 more...])Common1_0_3.js (line 4589) _j_id1Validator(form#j_id1 index.xhtml, "j_id5:0:j_id6")index.xhtml (line 245) _validateForm(form#j_id1 index.xhtml, "j_id5:0:j_id6")Common1_0_3.js (line 4508) submitForm(form#j_id1 index.xhtml, 1, Object source=j_id5:0:j_id6, undefined)Common1_0_3.js (line 4765)
onclick(click clientX=0, clientY=0)index.xhtml (line 1)
for(var j=0;j<validatorArray.length;j=j+1)



Luka Surija wrote:
> If found pretty dummy bug in XMLMenuModel.
>
> If I call an action method trough XMLMenuModel then the method is > executed, but no navigation is executed.
>
>
> WorkingTaskAdmin:
>
> public String addNewWorkingTask(){
>        sessionBean.addNewWorkingTask();
> return "service:workingTaskWizard"; -- invoking in > tr:commandMenuItem act as where "return null;"
>    }
>
> menu-model.xml:
>
> <itemNode id="menu241" label="#{mnl.newWorkingTask}" > action="#{WorkingTaskAdmin.addNewWorkingTask}" > focusViewId="/service/workingTaskWizard.xhtml" />
>
>
> but if i press this button then everything works as expected.
> <tr:commandButton text="#{msg.new_label}" > action="#{WorkingTaskAdmin.addNewWorkingTask}" />
>
>
> I'm using trinidad 1.0.3-core trunk.
>


Reply via email to