How to navigate to a page in new window in tree?

UI Components for JSF
Post Reply
zsuiqiang
Posts: 146
Joined: 13 Sep 2010, 03:52

13 Sep 2010, 04:17

Primefaces 2.2 M1, Glassfish 3.1, Moharra 2.0.3

I use a tree component,but i can only use outputText tag in the node tag.So how can i navigate to a page in new window when clicks node.

Anybody can help me! thanks.
primefaces:jakarta:12.0.0.jar,
primefaces-ext:jakarta:12.0.0.jar,
JSF Mojarra 3.0
glassfish-6.2.5,
netbeans 14
IDEA 2022.2.2
Browser: Edge

zsuiqiang
Posts: 146
Joined: 13 Sep 2010, 03:52

16 Sep 2010, 05:42

Why nobody help me? isn't this question worth to answer?
primefaces:jakarta:12.0.0.jar,
primefaces-ext:jakarta:12.0.0.jar,
JSF Mojarra 3.0
glassfish-6.2.5,
netbeans 14
IDEA 2022.2.2
Browser: Edge

User avatar
michiel
Posts: 240
Joined: 07 Jun 2010, 09:12
Location: Belgium

16 Sep 2010, 10:00

First of all, before posting, read the Forum Posting Guidelines.

You can use the RequestContext API, more specific "addCallBackParam(String name, Object value)",
and use the returning value to execute a javascript opening a new window.

Read User Guide page 399 and following
JSF-2.0, mojarra-2.0.2-FCS and PrimeFaces-2.1 on GlassFish v3.0.1 (build 22)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Sep 2010, 10:05

Why nobody help me? isn't this question worth to answer?
Please see item #3 in forum posting guideline.

http://primefaces.prime.com.tr/forum/vi ... f=3&t=1194

Thanks.

zsuiqiang
Posts: 146
Joined: 13 Sep 2010, 03:52

16 Sep 2010, 10:52

Thanks for help! And i'm so sorry for not read "Forum Posting Guidelines",now i read it.

The RequestContext API can deal this problem,but it isn't easy.I want use NavigationHandler.I try <h:comandButton> in <p:treeNode> and it work,but the display style is not correct.I try <h:commandLink> but it isn't work. So if the <h:outputText> is only way in <p:treeNode>.

I'm sorry for my poor english.
primefaces:jakarta:12.0.0.jar,
primefaces-ext:jakarta:12.0.0.jar,
JSF Mojarra 3.0
glassfish-6.2.5,
netbeans 14
IDEA 2022.2.2
Browser: Edge

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Sep 2010, 11:10

You can use h:outputLink inside a treeNode and use target option of outputLink to open a new page.

zsuiqiang
Posts: 146
Joined: 13 Sep 2010, 03:52

17 Sep 2010, 05:20

Thanks for quick answer.It works good.

But I still think <h:commandLink> shold be supported,so action attribute can be used for some special works.
primefaces:jakarta:12.0.0.jar,
primefaces-ext:jakarta:12.0.0.jar,
JSF Mojarra 3.0
glassfish-6.2.5,
netbeans 14
IDEA 2022.2.2
Browser: Edge

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Sep 2010, 11:16

I agree, tree will be revised for maintenance and new features like dragdrop for 2.2.1 so we are pushing tree related issues to 2.2.1. It will be a cool tree soon supporting all these and new stuff.

zsuiqiang
Posts: 146
Joined: 13 Sep 2010, 03:52

17 Sep 2010, 11:21

Thanks for quick answer.
I am so glad to hear that, and will expect it.
primefaces:jakarta:12.0.0.jar,
primefaces-ext:jakarta:12.0.0.jar,
JSF Mojarra 3.0
glassfish-6.2.5,
netbeans 14
IDEA 2022.2.2
Browser: Edge

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 54 guests