Iterate tag with Multiple Checkboxes

2001-03-05 Thread Chalmers, Douglas

Hi again, 
I'm trying to get a list of checkboxes to relate to a form bean
getChkcontrols()/setChkcontrols(). This is what I have so far, but no
values are being passed to the Form Bean. The rest of the iteration is
fine. My form methods are boolean arrays.






Any help much appreciated. Cheers,

Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
707303 (Ext 14)




RE: Nested Iterate tags - correction

2001-03-02 Thread Chalmers, Douglas

At last!!! A thousand thanks David!

-Original Message-
From: David Waddell [mailto:[EMAIL PROTECTED]]
Sent: 02 March 2001 11:56
To: '[EMAIL PROTECTED]'
Subject: RE: Nested Iterate tags - correction



typo,bars should be bar 
 ^
-Original Message-
From: David Waddell 
Sent: 02 March 2001 09:54
To: '[EMAIL PROTECTED]'
Subject: RE: Nested Iterate tags


given ArrayList stored  as 'foos' of  foo objects
  foo {
ArrayList getBars() {...}
   }

  with foo.getBars() returning arraylist of bar objects 
  bar {
String getSomeProperty(){..}
  }

  you can use

   
 
   
 
   



-----Original Message-
From: Chalmers, Douglas [mailto:[EMAIL PROTECTED]]
Sent: 02 March 2001 09:36
To: Struts Mailing List
Subject: Nested Iterate tags


Has anyone out there used nested iterate tags to display the contents of
a collection, and to display contents of a collection within that
collection, returned in the 1st collection class by a get method. Both
are ArrayLists.

How should we refer to the inner collection? Can it be done? 

Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
707303 (Ext 14)
__

If you are not the addressee of this confidential e-mail and any 
attachments, please delete it and inform the sender; unauthorised 
redistribution or publication is prohibited. 
Views expressed are those of the author and do not necessarily 
represent those of Citria Limited.
__
__

If you are not the addressee of this confidential e-mail and any 
attachments, please delete it and inform the sender; unauthorised 
redistribution or publication is prohibited. 
Views expressed are those of the author and do not necessarily 
represent those of Citria Limited.
__



Nested Iterate tags

2001-03-02 Thread Chalmers, Douglas

Has anyone out there used nested iterate tags to display the contents of
a collection, and to display contents of a collection within that
collection, returned in the 1st collection class by a get method. Both
are ArrayLists.

How should we refer to the inner collection? Can it be done? 

Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
707303 (Ext 14)




RE: Select/Options Tag

2001-02-23 Thread Chalmers, Douglas

Thanks for that. Got it passing a string array now. Managed to pass all
options by calling a script function to select them all before posting.


"Chalmers, Douglas" wrote:

> A tag reference can maintain a String from a SELECT statement within a
> form bean, but only the ONE actually selected..
>
> How can I maintain ALL the OPTIONS within a SELECT box within a form
> bean??
>

This bug was just fixed, so you will need the most current nightly
release.  You can now have a property that returns a String array, and
use
it to back a SELECT statement that allows multiple options:


... Use  and/or  here ...


and Struts will correctly remember all of the selected values, based on
the contents of your array.

There is a test page (html-select.jsp) in the Struts test application
(struts-test.war) that illustrates how this works.


>
> Doug Chalmers
> Software Development
> Petrotechnics Ltd
> Exploration House
> Exploration Drive
> Aberdeen
> 707303 (Ext 14)

Craig





Select/Options Tag

2001-02-22 Thread Chalmers, Douglas

A tag reference can maintain a String from a SELECT statement within a
form bean, but only the ONE actually selected..

How can I maintain ALL the OPTIONS within a SELECT box within a form
bean??

Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
707303 (Ext 14)




Options tag / Form Bean

2001-02-21 Thread Chalmers, Douglas

Use of Struts tags SELECT/OPTIONS

In our application currently under development
(Weblogic5.1/Struts/JSP/EJB) we're trying to do the following: 

Populate a Selectable List Box using an ArrayList (mimics a service
which will eventually come from a db) which at the moment is just
declared within the Event Processor for that page, placed into the
session and retrieved through the OPTIONS tag. Like so:

  
 


This works fine, the problem occurs when each list member is added to a
second list, which is also selectable to remove members back to the
first list.
I'm trying to find a way of linking the second list to the form bean so
the list contents can be added to an EJB.

After much trying, I've got round the problem by using Java Script to
populate a hidden field as a delimited string, which can then be easily
related to form bean get and set methods.

Is there an easier way to link a list (which is itself a selectable
list) to the form bean to hold all values present in that list. I've
managed to pass the SELECT tag as a String and an Object, but that only
retrieves the selected item.

I've tried various combinations of fields, but the problem still remains
as to what kind of data structure to send/receive. 

I've thought of holding a 'floating' ArrayList in session and passing
values that way but that seems messy (as is the hidden field method).

Cheers  

Doug Chalmers
Software Development
Petrotechnics Ltd
Exploration House
Exploration Drive
Aberdeen
707303 (Ext 14)