cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28550] New: - Need a removeSelectionList method.
Date Fri, 23 Apr 2004 06:34:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28550

Need a removeSelectionList method.

           Summary: Need a removeSelectionList method.
           Product: Cocoon 2
           Version: 2.1.4
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: CocoonForms
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: joe.latty@tias.com.au


I am using the on-value-changed event for a field to do some validation, if 
there are multiple matchs on the (code) field I create a selectionList and have 
the user choose from the list of codes.

When the user selects the correct value I no longer want the selectionlist.

Scenario:
<wd:on-value-change>
 <javascript>
  // Use a component to find suppliers
  if (suppliersLength == 1) {
    event.source.value = element.getFirstChild().getAttribute("code");
    // And remove any selection list that may have been set previously
  } else if (suppliersLength > 1) {
    supplier = new Array(supplierLength);                  
    // Fill array
    event.source.setSelectionList(supplier, "value", "label")
  } else {
    // Serve up an error
  }
 </javascript>
</wd:on-value-changed>

Mime
View raw message