3 Replies Latest reply on Feb 18, 2009 3:23 PM by nbelaevski

    commandlink syntaxerror??

    schlumsch

      Hello,

      id like 2 create a commandlink which executes some code and directs to another page, setting 2 bean-properties. The following code sets no variables and reloads the current page only, does anyone see my error? Thanx a lot, lg schlumsch


      jsf-code

       <h:commandLink action="#{planingResults.storeNewOptionForSegment}">
       <h:outputText value="#{alternative.name}"/>
       <f:param name="userHasChangedItinerery" value="true" />
       <f:param name="selectedOptionIndex" value="#{alternative.id}"/>
       </h:commandLink>
      


      Bean:

       public String storeNewOptionForSegment() {
       this.dataAccessor.storeNewOptionForSegment(this.selectedSegmentIndex,
       this.selectedOptionIndex);
       this.selectedSegmentIndex = -1;
       this.selectedOptionIndex = -1;
       this.segmentList = this.dataAccessor.loadItinerary(
       this.showSecondaryElements, this.showOvernights,
       this.showAllDetails, this.timeSliderActualValue, true);
       this.userHasChangedItinerary = true;
       return "toresult";
       }
      

      faces-config:
       <navigation-case>
       <from-outcome>toresult</from-outcome>
       <to-view-id>/jsf/showResults.xhtml</to-view-id>
       </navigation-case>
      


        • 1. Re: commandlink syntaxerror??
          nbelaevski

          The first thing to check is whether the action method was called by adding log.info("Action method called!"). If not, there are probably some validation errors that can be shown by rich:messages component. If it was called then I'd recommend to check navigation rule, maybe from-view is not correct?

          • 2. Re: commandlink syntaxerror??
            schlumsch

            Thanx 4 ur reply. I had some selectOnes and a submit-button on my page. After remiving them, the link works fine. Do you have an explaination 4 that? SelectOnes and the submitbutton also worked fine - combined with the link above the link doesnt work

            lg schlumsch

            • 3. Re: commandlink syntaxerror??
              nbelaevski

              Ok, please post full page code and I'll take a look.