myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Lee, NOTiFY" <roger....@notify.co.uk>
Subject navigating from tree2
Date Tue, 29 Mar 2005 12:44:17 GMT

My ActionListener in a tree2 component calls a backing class and gets the 
Description from the Tree Node.

LoanSelectionTree.jsp

<x:commandLink immediate="true" styleClass="document" 
actionListener="#{loanSelectionTreeActionListener.selectLoan}" >


I then call a method in this Backing Class which returns "success".

 public void selectLoan(ActionEvent actionEvent) throws 
AbortProcessingException {
        //System.out.println("********** LoanSelectionTreeActionListener 
selectLoan");

        UIComponent component = actionEvent.getComponent();

        UIComponent parent = component.getParent().getParent();

        HtmlTree tree = (HtmlTree) parent;
        TreeNode node = tree.getNode();
        nodeDescription = node.getDescription();

        System.out.println(">>>>> LoanSelectionTreeActionListener selectLoan

node.getDescription = " + node.getDescription());

        // To force return of "Success"
        isTreeNodeSelected();
    }

    public String getNodeDescription() {
        return (nodeDescription);
    }

    public String isTreeNodeSelected() {

        if (nodeDescription != null) {
            System.out.println(">>>>> LoanSelectionTreeActionListener 
isTreeNodeSelected = " + FortyTwoObjectsConstants.SUCCESS_OUTCOME);
            return FortyTwoObjectsConstants.SUCCESS_OUTCOME;
        }
        else {
            System.out.println(">>>>> LoanSelectionTreeActionListener 
isTreeNodeSelected = " + FortyTwoObjectsConstants.ERROR_OUTCOME);
            return FortyTwoObjectsConstants.ERROR_OUTCOME;
        }
    }

in my Faces-Config I have;

<navigation-rule>
        <from-view-id>/LoanSelectionTree.jsp</from-view-id>
        <navigation-case>
            <from-action>#{loanSelectionTreeActionListener.selectLoan}</from-action>
            <from-outcome>success</from-outcome>
            <to-view-id>/LoanEnquirySummary.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>

I have also tried it with;

         <from-action>#{loanSelectionTreeActionListener.isTreeNodeSelected}</from-action>

Either way it does not navigate to my "LoanEnquirySummary.jsp"

No errors thrown. Any suggestions?

Many thanks.

Roger Lee

Internet communications are not secure and therefore NOTiFY
does not accept legal responsibility for the contents of this message.
Although NOTiFY operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of NOTiFY.
Replies to this email may be monitored by NOTiFY for operational or
business reasons.



Mime
View raw message