Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)


Clarification?

- Duh. I can put the source here and remove all ambiguity. Here's a go:

<xp:comboBox id="someField" value="#{doc.field}">
<xp:this.defaultValue><!--[CDATA[#{javascript:
doc.getItemValueString('field');
}]].</xp:this.defaultValue>
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:
var items=@DbLookup(@DbName(), "Lookup", "fieldKeys", 2);
(items==null ? "" : items);
}]]></xp:this.value>
</xp:selectItems>
<xp:selectItem itemLabel="#{javascript:doc.getItemValueString('field')}" />
</xp:comboBox>

The document contains legacy data that may or may not be in fieldKeys. This is an attempt to web-enable the application with that legacy data. Adding all values from field not in fieldKeys is not a viable option.

Whether doc has a value from fieldKeys or not, it shows that value selected, because the independent selectItem ensures that value is valid on that page.

BUT if doc.field is "", even though that value is present (via the selectItem) and should be the default, it is not selected. Instead the first value from fieldKeys is displayed in the combo box.

Page source shows no selected attribute on any combo box value at initial page load, when doc.field = "", but when submitted, because the first value in fieldKeys is displayed, that value replaces the "" and destroys data.

Is there a way to make the above work?

Thanks for your time...


Feedback response number DGIE7Y7JPJ created by ~Holly Zekhipisonnivu on 11/27/2009

How does one set "" as a combobox d... (~James Brewever... 25.Nov.09)
. . What about computing the default va... (~Wei Minluflar 26.Nov.09)
. . . . Clarification? (~James Brewever... 27.Nov.09)
. . for example (~Sanjay Kijipys... 26.Nov.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS