jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul P Akolkar <akol...@us.ibm.com>
Subject Re: RDC options class in SelectOne.java
Date Fri, 12 Aug 2005 18:19:24 GMT
Shane Smith <safarishane@gmail.com> wrote on 08/12/2005 12:40:41 PM:
> Okay, Scratch that. I guess a count isn't needed if the only thing you
> can do is generate the output vxml anyways.
> 
> Question though... I'll write the code if folks think it would be 
> useful to add 
> 
> count()      <-- length of lists
> remove(3) <-- drop one element 
> get(1)        <-- show one element
> 
> This would allow the developer to look at the list and modify it as
> necessary.  Taking that a step further... I'd also like to overload
> the getVXMLOptionsMarkup()
> method, allowing you to specify an optional start and end point of the 
list.
> 
> getVXMLOptionsMarkup(1,4)
> 
> What do you folks think?  Should I just keep my data elsewhere until
> I'm ready to turn it into markup, or shoud we allow the developer to
> dynamically modify the list?  My scenario is a rdc:select1, where I
> may have 15 options from a database, but I would like to present only
> 5 at a time to the caller.  The backend action populates my option
> list, but I would like to be able to just pull a few at a time from
> the list on the jsp side. Thoughts?

So, something like: (erring on the side of being verbose, just want to 
make sure we're on the same page ;-)

System (first turn): (relevant VoiceXML options bit below, leaving aside 
attributes of option elements as they are not relevant to this discussion)

<option>option one</option>
<option>option two</option>
<option>option three</option>
<option>option four</option>
<option>option five</option>
<option>next</option>

User: next

System (second turn - paging/scrolling):

<option>previous</option>
<option>option six</option>
<option>option seven</option>
<option>option eight</option>
<option>option nine</option>
<option>option ten</option>
<option>next</option>

User: option nine

This would be a good enhancement. I'd be +1 to adding 
getVXMLOptionsMarkup(int begin, int end), which could in turn produce the 
previous, next bits as needed by checking list size (so I'm not sure what 
count() or remove(int) and get(int) gives us). We will have to take a 
similar approach with picking the relevant subset of options in case they 
come from an options file. 

In any case, are you planning on filing your earlier enhancement 
request?[1] I'd like to separate these two, we already closed on your 
earlier suggestion, and I'd like you to get all the credit for it ;-)

-Rahul

[1] http://marc.theaimsgroup.com/?l=taglibs-dev&m=112380398730865&w=2 

> 
> Thanks,
> Shane

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message