Pregunta

I know this is probably easy, but I can't figure it out.

Have an Xpage with 6 fields or so, bound to underlying form. User will enter some data. The possible values for one field, location, are in a view in a different db. I want the user to be able to type in the first few characters and be able to select the value.

I think this should be easy, and I am just missing something. Any help would be greatly appreciated.

¿Fue útil?

Solución

Use typeAhead. Here's an example (assuming the lookup field is in column 1 of the view called viewName) where type ahead starts after 2 characters:

<xp:inputText id="test" value="#{document.test}">
    <xp:typeAhead mode="partial" minChars="2" ignoreCase="true" id="typeAhead1">
        <xp:this.valueList><![CDATA[#{javascript:return @DbColumn(database.getServer() + "!!" + "path/db.nsf", "viewName", 1);}]]></xp:this.valueList>
    </xp:typeAhead>
</xp:inputText>

Otros consejos

In the properties of the edit box there's type ahead. Enter @DbColumn(....); that should do the trick. Example here: http://www-10.lotus.com/ldd/ddwiki.nsf/m_Home.xsp?documentId=D74C33EADB3DC730852575F600668099#mobileViewer

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top