RE: Multiple select

2009-10-08 Thread wkbutler

Thanks Eric for posting your solution, this helped me remember that unusual
OGNL syntax on the value attribute.

Because I have not found so many working examples out there, I'll post mine
too:

s:select
   label=%{getText('caseFile.sentence')} 
   name=caseFile.sentences.qualifierId
   value=caseFile.sentences.{qualifierId}
   list=availableQualifiers 
   listKey=qualifierId 
   listValue=display 
   emptyOption=false
   multiple=true
   theme=css_xhtml 
   required=false 
   cssClass=text medium 
   cssStyle=width:300px /

CaseFile contains ListQualifier called 'sentences'.  
Qualifier looks like
private Long qualifierId;
private String code;
private String description;
// Transients
private String display;  // Just transiently defined as code +  -  +
description


Thanks -


Stanley, Eric wrote:
 
 Figured it out in case anyone has this same issue. Added a value
 attribute, and used OGNL to grab a list of id's from ListGroup instead
 of just the ListGroup which works just fine in a select where
 multiple=true.
 
 s:select label=group multiple=true size=4 name=user.groups
   value=user.groups.{id} list='groupList' listKey=id
   listValue=name /
 
 -Good luck 
 
 

-- 
View this message in context: 
http://www.nabble.com/Multiple-select-tp22564208p25803112.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Multiple select

2009-10-08 Thread Dale Newfield

wkbutler wrote:

Thanks Eric for posting your solution, this helped me remember that unusual
OGNL syntax on the value attribute.


Once again I'll post my suggestion that the %{} notation be used 
EVERYWHERE you expect the framework to evaluate your expression with 
OGNL so that these are less confusing during subsequent development or 
maintenance.


The unusual syntax you describe is an example of the power of OGNL. 
caseFile.sentences is a collection of objects, but what you want is a 
collection of just one field from each of those objects.  The OGNL 
documentation calls this projection: 
http://www.opensymphony.com/ognl/html/LanguageGuide/projection.html .


I don't have much experience with other EL's...is this type of construct 
possible with the others that people have been suggesting (JUEL, MVEL, 
etc.)?


-Dale

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Multiple Select

2008-03-25 Thread Antonio Petrelli
2008/3/22, Thangalin [EMAIL PROTECTED]:

 html:select property=%= select_name % multiple=true size=5
 styleClass=filter



Does select_name have the value fiscal_year?

Antonio


Re: Multiple select not rendered in browser with tiles

2007-02-12 Thread Laurie Harper

Simone Piva wrote:

Hi all,
I have a problem while rendering a jsp with a select multiple tag in a
Struts application using tiles.
If I forward directly to a JSP I have no problem and the select multiple is
correctly showed by both browsers I tried (Firefox 2 and Internet Explorer
7), whilst if I forward to a tile, that contains also my jsp in the body,
with the select multiple tag I don't see the multiple combobox, but only a
thin box, so thin that no text can be displayed. If I get the HTML source
code (right-clicking on the page), saving the open window to an html file
and reopening the just saved file I can see my multiple select displayed
correctly!


Sounds like a CSS issue, but there's no way to diagnose it without 
seeing the relevant code and the resulting HTML.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple select not rendered in browser with tiles

2007-02-12 Thread Simone Piva

Yes, it was a css issue, blocking the dimension of select input fields

On 2/12/07, Laurie Harper [EMAIL PROTECTED] wrote:


Simone Piva wrote:
 Hi all,
 I have a problem while rendering a jsp with a select multiple tag in a
 Struts application using tiles.
 If I forward directly to a JSP I have no problem and the select multiple
is
 correctly showed by both browsers I tried (Firefox 2 and Internet
Explorer
 7), whilst if I forward to a tile, that contains also my jsp in the
body,
 with the select multiple tag I don't see the multiple combobox, but only
a
 thin box, so thin that no text can be displayed. If I get the HTML
source
 code (right-clicking on the page), saving the open window to an html
file
 and reopening the just saved file I can see my multiple select displayed
 correctly!

Sounds like a CSS issue, but there's no way to diagnose it without
seeing the relevant code and the resulting HTML.

L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Multiple select/update from the Listing page

2005-01-18 Thread Daniel Watrous
I think that this article will tell you what you want to know. 
http://javaboutique.internet.com/tutorials/strutsform/

Daniel
- Original Message - 
From: Yen [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, January 18, 2005 7:38 PM
Subject: Multiple select/update from the Listing page


Hi,
I wonder how struts handle the Multiple select/update from the Listing 
page. Let say, there is a listing of 10 records and the page need to allow 
the user to update the status for the records. Upon submitting the button, 
it will update all the status in the listing page.

How does the form get the options?
rgds,
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]