This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125049

Summary: Navigation Editor does not allow page level navigation rule creation
Product: obsolete Reporter: Winston Prakash <wjprakash>
Component: visualwebAssignee: Peter Zavadsky <pzavadsky>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: picture of multiple ports

Description Winston Prakash 2008-01-10 16:42:29 UTC
In the navigation editor, I can draw a line from a button or hyperlink and create the navigation rule.
However, I can not create navigation rule if there are no "action" type components in the page. 
This prohibits from creation of dynamic navigation.

For example I can not do something like

public String button1_action() {
   if (condition1){    
      return "goto_page1";
   }else{
      return "goto_page2";
   }
}
Comment 1 Joelle Lam 2008-01-12 06:22:05 UTC
RESPONSE: You are correct.  I don't know why I didn't think of this scenario in the past.  Winston, did we handle this
use case in the past?  I don't remember how two cases were shown coming from one button.  Was that possible?  For now I
will mark as ENHANCEMENT.  If it was possible in the past, we can change it back to DEFECT.  I will need to spend a
little bit of time thinking about the best way to do this.  

SCOPE: Only Visual Web Users

WORKAROUND: Just create two cases from the button to the specified page ( "case1" and "case2", since "case1" is the
first link drawn it will be redrawn as a default link from the entire page ). When the user writes their own logic,
"case1" and "case2" can be returned as desired by the user.

WORKAROUND DIFFICULTY LEVEL: easy
Comment 2 Winston Prakash 2008-01-12 06:40:57 UTC
This is not a RFE it is a defect because this is a regression. I'm not talking about more cases from button. But case
just from page. In 5.5 we provided another port which was not bound to button, from which user can drag and connect to a
page. In that the navigation rule is added to faces-config.xml. But no corresponding code was injected in to the page.
If that port is used, then another port is created. Later user can connect from button to that port.

BTW, there is no concept of bind from button. It is just a convenience we put to create the binding action returning the
case. Look at the faces-config file. there is no mention of button at all.

We must support this case which is a common JSF case, not just visual web.
Comment 3 Winston Prakash 2008-01-12 15:35:46 UTC
Since we have a work around, I'm downgrading this to p3.
Comment 4 Joelle Lam 2008-02-06 04:29:43 UTC
Winston, I am looking at your second to last comment.  I believe we do exactly that. All you need to do is draw from the
"page port" once, the link will be pushed to an external port and the "page port" is reopened.  However, I do think you
have a valid point as far as VW user connecting to those things but I dont' think this will affect JSF user in general.
Comment 5 Joelle Lam 2008-02-06 04:30:17 UTC
Created attachment 56122 [details]
picture of multiple ports