2 Replies Latest reply on Jul 29, 2011 12:13 AM by nbelaevski

    Adding original SelectItem to ClientSelectItem

    bleathem

      The ClientSlectItem would be more useful to me if I added a reference to the SelectItem used to generate to it.  I'm concerned that this might place a Serialization requirement on the SelectItem values provided by the user, if the ClientSelectItem is serialized into the view with the rest of the component.  Or are the ClientSelectItems, and the component instance rebuilt with every request?

        • 1. Re: Adding original SelectItem to ClientSelectItem
          bleathem

          Also a concern, is what happens when this ClientSelectItem is passed to javascript uusing the cdk:scriptOption tag?  How will the SelectItem be represented in javascript?  Simply as a toString()hash that we can ignore?

          • 2. Re: Adding original SelectItem to ClientSelectItem
            nbelaevski

            Brian,

             

            From what I see, it's not stored anywhere, but used for encoding only.

             

            Note that some instances of SelectItem are not coming from the user's model, but created for SelectItems by factory method.

             

            On the JavaScript question - ClientSelectItem implements special ScriptString interface. What cdk:scriptOption tag does is just putting object into options map, so this means that toScript() method of CSI will be called when the container map object is serialized