PermaLink Creating SELECT options using a Domino lookup view05/10/2005
Domino Toolkit
After spending too much time fighting with the tag, only to find out from Lotus Support that it can't return a list of categories, Brian Green responded to my post in the Notes 6 Forum. His solution was to use the tag and the toponly attribute to return a list of categories, which can then be used as part of a {SELECT} tag. When I tried creating a plain vanilla HTML {SELECT}, the SELECT and its options rendered perfectly:
{select name="PreviousCategory" multiple size="4"}
  {domino:view dbname="{%=path%}" viewname="DBLookup01" debug="true" onfailure="inline" toponly="true"}
    {domino:viewloop}
      {domino:viewitem id="CategoryName" col="1" format="RAW"/}
        {option}{%= CategoryName.toString() %}
        {/option}
      {/domino:viewloop}
    {/domino:view}
{/select}
Unfortunately, selected options were not saved back to the Notes document. So, I rewrote the above using the and tags:
{domino:select name="PreviousCategory" multivalue="true" size="4"}
  {domino:view dbname="{%=path%}" viewname="DBLookup01" debug="true" onfailure="inline" toponly="true"}
    {domino:viewloop}
      {domino:viewitem id="CategoryName" col="1" format="RAW"/}
        {domino:option value="{%= CategoryName.toString() %}" display="{%= CategoryName.toString() %}"}
        {/domino:option}
    {/domino:viewloop}
  {/domino:view}
{/domino:select}
and this worked prefectly. The only strange thing was that didn't recognize the multiple attribue, as the Help indicated. Instead, I had to use the multivalue attribute. This is rendered as a multiple attribute. Also, I noticed in the WebSphere Server Console that the is executed twice, once when the form is opened and again when it is submitted. In a way, its nice to see that the quirky behavior of Notes wasn't lost on the Domino JSP tag designers. I know that I've wished for years that a Keyword field value formula did not calculate for documents that are only being opened in Read mode. Its nice to know that there is an equivalent in the Domino JSP world!
Comments :v
No comments.
Credits
NuTechs Powered by Domino
Search
Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
Lotus Domino ND6 RSS News Feed RSS Comments Feed Podcast Feed Geo URL netcraft RSS Validator Lotus Geek Chris. A. Brandlehner Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere