1 Reply Latest reply on Jun 29, 2007 3:35 PM by Sigmar85

    Change state from repeater?

    ekokurtz Level 1
      I have an array of news stories with title, author, and the text of the article. I'm using a repeater to display a small summary for each article (name and author), along with a button that I want to use to expand the repeater entry so that the story can be displayed. By using an alert, I've verified that I can call a function with the button, but the call to have the state changed to show an expanded box doesn't fire.

      Am I missing something or is this not possible?

      Here is the function called from a 'details' button - very simple

      public function setState(){
      if (currentState == '') {
      currentState = 'details';
      }
      }

      Thanks in advance
        • 1. Re: Change state from repeater?
          Sigmar85 Level 1
          It doesn't work. I had the same problem as you.
          The fact is the test ( currentState=='') doesn't work. I don't know why but when currenState is in the Default State ( so '') It can't be compare as '' (void String). So my tips is to define a state at the creation of my component or my application with exactly the same setting of the Default State. It s work good

          Other possibilities :

          if (currenState != 'details'){
          currentState = 'details'
          }
          Take the problem to the other side