RE: multiple select

"Jancsi A. Farkas(fx)" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <1058013630.1285.12.camel@delphi>
Yes, It makes sense, and works like charm,f you have the selected
indexes.You save it in the map, and then retrieve it in model with
getVals(),and use it via ListSelectionModel.

However I could not use it this way, because the data I use is from
database, and did not have the indexes, only the option values.
So I saved in context the selected ids, and in model I verified if the
option is selected or not, and manually updated in the section model the
selected indexes. (in database is saved only the selected index, I don't
have in database the non-selected indexes.).
 
Is there any better approach?

	Jancsi

On Sat, 2003-07-12 at 12:00, Christian Cryder wrote:
> Hi Jancsi,
> 
> Use a ListSelectionModel (which supports multiple selections), and put that
> in the state. In other words,
> 
>     ListSelectionModel lsm = DefaulListSelectionModel();
>     lsm.addSelectionInterval(1);
>     lsm.addSelectionInterval(2);
>     sm.putState(GForm.DAMAGE_CONCERNS_ID, lsm);
> 
> Then later you can pull the the lsm out of state and apply it to a BSelect
> via bselect.setSelectionModel(...)
> 
> That make sense?
> 
> Christian
> ----------------------------------------------
> Christian Cryder
> Internet Architect, ATMReports.com
> Project Chair, BarracudaMVC - http://barracudamvc.org
> ----------------------------------------------
> "Coffee? I could quit anytime, just not today"
> 
> 
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]]On Behalf Of Jancsi A.
> > Farkas(fx)
> > Sent: Saturday, July 12, 2003 2:34 AM
> > To: [email protected]
> > Subject: [Barracuda] multiple select
> >
> >
> > Hello!
> >
> > I have a problem with a multiple select. How can I save in StateMap the
> > value of the selected indexes?
> >
> > sm.putState(GForm.DAMAGE_CONCERNS_ID, new String[]{"1","2"});
> >
> > seems like is not working. (1,2 are the values of the selected indexes)
> >
> > Thank you
> >
> > 	Jancsi
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Barracuda mailing list
> > [email protected]
> > http://barracudamvc.org/lists/listinfo/barracuda
> 
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.