对话框列表xpages中的Lotus Notes [英] dialog list lotus notes in xpages

查看:88
本文介绍了对话框列表xpages中的Lotus Notes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

xpages中是否有等同于Lotus Notes Dialog list的注释?或者,如果可能的话,一个xpage combobox接受"选择的多个值.

Is there any equivalent for lotus notes Dialog list in xpages? Or, if it's possible, an xpage combobox ''which accepts'' multiple values selected.

感谢您的时间

推荐答案

使用xe:djextListTextBox收集并显示多个值,使用xe:valuePicker将现有列表中的值添加到ListTextBox,并可选地使用button提示输入新值并将其添加到ListTextBox.

Use a xe:djextListTextBox to collect and show multiple values, use xe:valuePicker to add values from an existing list to ListTextBox and use optionally a button to prompt for a new value and to add it to ListTextBox.

这是xe:djextListTextBoxxe:valuePicker的示例:

   <xe:djextListTextBox
      id="djextListTextBox1"
      multipleSeparator=","
      multipleTrim="true"
      defaultValue="abc,def"
      value="#{viewScope.test}">
   </xe:djextListTextBox>
   <xe:valuePicker
      id="valuePicker1"
      for="djextListTextBox1"
      pickerText="Add">
      <xe:this.dataProvider>
         <xe:simpleValuePicker>
            <xe:this.valueList><![CDATA[#{javascript:
               ["abc","def","ghj","klm","nop","xyz"]
            }]]></xe:this.valueList>
         </xe:simpleValuePicker>
      </xe:this.dataProvider>
   </xe:valuePicker>

我喜欢这种方法,因为它使用户易于添加和删除值,而且看起来不错.

I like this approach as it is for the user easy to add and to delete values and it looks good.

另一个 xp:inputTextxe:valuePicker的组合:

   <xp:inputText
      id="inputText1"
      multipleSeparator=","
      value="#{viewScope.test}"
      defaultValue="abc,def">
   </xp:inputText>
   <xe:valuePicker
      id="valuePicker1"
      for="inputText1">
      <xe:this.dataProvider>
         <xe:simpleValuePicker>
            <xe:this.valueList><![CDATA[#{javascript:
               ["abc","def","ghj","klm","nop","xyz"]
            }]]></xe:this.valueList>
         </xe:simpleValuePicker>
      </xe:this.dataProvider>
   </xe:valuePicker>

由于InputText字段是可编辑的,因此用户可以添加自己的新值.如果允许新值并且用户知道如何使用多重分隔符来编辑值,则此方法可能是一个很好的解决方案.

Users can add their own new values as the InputText field is editable. This approach might be a good solution if new values are allowed and users know how to edit values considering the multiple separator.

如果您希望将每个值放在单独行中,则可以使用xe:djTextarea并将MultipleSeparator设置为换行符:

In case you'd like to have each value in a separate line you can use xe:djTextarea and set multipleSeparator to newline:

   <xe:djTextarea
      id="djTextarea1"
      multipleSeparator="#{javascript:'\n'}"
      value="#{viewScope.test}"
      defaultValue="#{javascript:['abc','def']}"
      cols="30">
   </xe:djTextarea>
   <xe:valuePicker
      id="valuePicker1"
      for="djTextarea1">
      <xe:this.dataProvider>
         <xe:simpleValuePicker>
            <xe:this.valueList><![CDATA[#{javascript:
               ["abc","def","ghj","klm","nop","xyz"]
            }]]></xe:this.valueList>
         </xe:simpleValuePicker>
      </xe:this.dataProvider>
   </xe:valuePicker>

文本框会随着所选值的数量自动增长和收缩.

The text box grows and shrinks with the number of selected values automatically.

这篇关于对话框列表xpages中的Lotus Notes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆