0 Replies Latest reply on Apr 14, 2008 1:09 PM by Paul Pantages

    listShuttel, Seam and @In

    Paul Pantages Novice

      seam_version 2.0.1.GA
      richfaces_version 3.1.4.GA

      Hello Forum,

      I have an odd problem with listShuttle, when I use @In/Out on the value of
      the sourceValue. I am going to cross-post this to seam-users forum also.

      When moving values back from the targetValue to sourceValue, I would get
      a validation error something like this:

      2008-04-07 18:59:13,399 INFO [http-] javax.enterprise.resource.webcontainer.jsf.lifecycle
      WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=j_id30:j_id286[severity=(ERROR 2), summary=(j_id30:j_id286: Validation Error: Value All is not valid), detail=(j_id30:j_id286: Validation Error: Value All is not valid)]

      The symptoms are similar to that of an ealier posting (mine) but the root
      problem is different:

      The root of it all was that, when I submit my form, richfaces fails to
      write the value of sourceValue. I verified this by putting
      printlns in the setter for sourceValue, and I can see that ths setter is not called
      when the form is submitted.

      However, if I drop the @In/@Out and just use conventional getter/setter
      in my @Local interface, the problem goes away.

      The thing is, I have other listShuttle objects, where I use @Out/In w/o any problems.
      I cannot find any difference between the implementation of this and the other cases.
      Believe me, I looked.

      Any ideas as to what the problem might actually be would be greatly appreciated, as I am completely stumped at this point. I asked the seam-forum if there is a limit on the number of seam components one may have, but I am doubtful that there is.

      Original Code: (doesn't work)

      private List<AlarmSuppressionPolicy> availableAlarmSuppressionPolicies;
       sourceCaptionLabel="Available Policies"
       targetCaptionLabel="Enforced Policies"
       removeAllControlLabel="Remove all policies"
       removeControlLabel="Remove policy"
       copyControlLabel="Add policy"
       copyAllControlLabel="Add all policies"
       <rich:column sortable="false">
       <f:facet name="header">
       <h:outputText value="#{row['name']}"/>

      New Code (works)

       public List<AlarmSuppressionPolicy> getAlarmSuppressionPolicies() {
       return this.alarmSuppressionPolicies;
       public void setAlarmSuppressionPolicies( List<AlarmSuppressionPolicy> alarmSuppressionPolicies ) {
       this.alarmSuppressionPolicies = alarmSuppressionPolicies;