I think that you didn't read carefully my first post. Maybe I give you to little information. Here are some additional infos:

If I call my action by tr:commandButton everything works (navigation + internal code execution). It doesn't work only in XMLMenuModel. Of course I've setup my navigation in this way:
<navigation-rule>
<navigation-case>
<from-outcome>*service:workingTaskWizard*</from-outcome>
<to-view-id>/service/workingTaskWizard.*jspx*</to-view-id>
</navigation-case>
.
.
.
</navigation-rule>

I have more than 30 item nodes in my menu-model.xml, but all other are hard-coded navigation strings:

for example:

<itemNode id="menu240" label="#{mnl.workingTasks}" action="*service:workingTasks*" focusViewId="/service/workingTasks.xhtml" />


If press this navigation button (it is in level 2) then it jumps to desidered page, but invoking this action doesn't work. I know that I should do it with actionListener, but I was lazy to create another method, so I did for testing purpose put my code in this method to act like navigation method, but it looks like something is wrong and I can't figure what.

public String addNewWorkingTask(){
       sessionBean.addNewWorkingTask();
return "*service:workingTaskWizard"; -- invoking in tr:commandMenuItem act as where "return null;*"
   }



The same odd thing I have with dialog framework. I call an dialog on this way than it works:

<tr:commandButton action="dialog:popup" useWindow="true" /> ---> new popup window is shown, but <tr:commandButton action="PopupMB.showPopup" useWindow="true" /> --> nothing is happening

public String showPopup(){
return "dialog:popup";
}


Of course for all other cases (navigation trough EL expression) it works fine.

I don't know it this has something to do that I'm using following configuration:

facelets 1.1.12
trinidad 1.0.3-core trunk
JSF RI 1.2
glassfish v2 b50

Regards
Luka


Gary Kind wrote:


-------- 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.
>




--
Luka Ĺ urija
[EMAIL PROTECTED]
+385 98 434 061

I.Y. tim d.o.o.
www.iytim.hr
[EMAIL PROTECTED]


Reply via email to