2 Replies Latest reply on Nov 10, 2010 6:32 PM by jtsattler

    Question about states in custom components

    jtsattler Level 1

      Greetings all.


      I have a question that I can't find an answer to anyplace.


      I have created an editing screen, with two states, "display" and "edit".  For "display", the fields are not editable.  If the user presses the "Edit" button, all the fields become editable, since "Edit" switches the state to "edit" and all fields say "editable.edit='true' ".  This works great.


      My issue is a custom component that is contained in this screen.  It also has two states, with the same names.  I want to switch the custom component into editing mode also.  But I can't seem to do that.  If I access the field by "component.state='edit'", that throws an error.


      This must be a pretty common thing to do.  I am going to be using that custom component in more screens (I hope) so I don't want to lose it if I can avoid that.


      Or maybe I am approaching the problem incorrectly?


      Any assistance or insight would be appreciated.