You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ken McArthur <ke...@gmail.com> on 2007/02/01 02:50:36 UTC

jscookMenu with outputLink?

Hi,

Is there any way to use jscookMenu with a basic url instead of having to
declare an action navigation rule?

Thanks,
Ken

Re: jscookMenu with outputLink?

Posted by Ingmar Lötzsch <il...@asci-systemhaus.de>.
I'am using Tomahawk 1.1.3 and I'am not a developper of MyFaces.
My menu is created dynamically in PageBean because it depends on
permissions and developement progress. That means that the
NavigationMenuItem objects were not declared in JSP.

When you look at MyFacesHack.js you find 3 possibilities of using the menu.

1. URL
Set action to "http://...".

2. JavaScript
Set action to "javascript:myFunction()".

3. JSF action method (or action listener method)

There are some bugs (or features) you have to pay attention to.

1. The renderer overwrites all targets with the id of the enclosing HTML
form element. (They were interpreted as form names.) That means in case
1 always the same window is used (with name for example 'Menu:form1', if
JSCookMenu is part of a PageFragment named Menu.jspf). To avoid this you
can use case 2 (or change a line in renderer class). Set action to
"javascript:window.open('http://...', '_blank')". In this case the
target/form name is interpreted as target.

2. Read my message from yesterday.

Ken McArthur schrieb:
> Hi,
> 
> Is there any way to use jscookMenu with a basic url instead of having to
> declare an action navigation rule?
> 
> Thanks,
> Ken


Re: jscookMenu with outputLink?

Posted by Sorin Silaghi <so...@gmail.com>.
is there any way of doing this dynamically ? ... I have tried returning a
link from the backing bean but it doesn't work...


On 2/1/07, Ingmar Lötzsch <il...@asci-systemhaus.de> wrote:
>
> correction
>
> "Set action to
> "javascript:window.open('http://...', '_blank')". In this case the
> target/form name is interpreted as target."
>
> should be
>
> Set action to
> "javascript:window.open('http://...', '_blank')". In this case the
> target/form name is ignored.
>

Re: jscookMenu with outputLink?

Posted by Ingmar Lötzsch <il...@asci-systemhaus.de>.
correction

"Set action to
"javascript:window.open('http://...', '_blank')". In this case the
target/form name is interpreted as target."

should be

Set action to
"javascript:window.open('http://...', '_blank')". In this case the
target/form name is ignored.