You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Neil Meyer <ne...@cxchange.co.za> on 2006/09/06 18:05:07 UTC

EL Select

Hi All,

I need some urgent help please. I have the following code which is working
perfectly to get the data to my action.

I'm using paging on this page so when I move around and come back to the page
where I selected the select box the data should still be selected.

I checked the action and the data is definitely still there. But when I load
the jsp the select box is not selected. I even printed out the value as shown
in the bean:write and it shows the data but the select doesn't mark selected.

To my knowledge this should happen automatically any Ideas why this is
failing. 

 
<bean:write name="selectedOEMSUPPParts" property="revisions"/>

<html-el:select indexed="true" name="selectedOEMSUPPParts"
property="revisions">
	<option value="-1">-- Not Selected --</option>
	<logic-el:iterate name="selectedOEMSUPPParts" id="revisionSelected"
property="rivisionsOfSelectedParts" indexId="revInd">
		<option value="<bean:write name="revisionSelected"
property="dciId"/>***<bean:write name="revisionSelected"
property="createDate"/>"><bean:write name="revisionSelected"
property="createDate"/></option>
	</logic-el:iterate>
</html-el:select>


I was then thinking of using <c:if> but I need to do the following and this
can apparently not be done.

<c:if test='${selectedOEMSUPPParts.revisions == revisionSelected.dciId+"***"+
revisionSelected. createDate }'>

<c:if test='${selectedOEMSUPPParts.revisions} ==
${revisionSelected.dciId}***${revisionSelected. createDate}'>

Any Recommendations will really be appreciated.

Regards
Neil Meyer

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


Re: EL Select

Posted by Gareth Evans <ga...@msoft.co.uk>.
Use <html:option> rather than plain old <option>

Neil Meyer wrote:
> Hi All,
> 
> I need some urgent help please. I have the following code which is working
> perfectly to get the data to my action.
> 
> I'm using paging on this page so when I move around and come back to the page
> where I selected the select box the data should still be selected.
> 
> I checked the action and the data is definitely still there. But when I load
> the jsp the select box is not selected. I even printed out the value as shown
> in the bean:write and it shows the data but the select doesn't mark selected.
> 
> To my knowledge this should happen automatically any Ideas why this is
> failing. 
> 
>  
> <bean:write name="selectedOEMSUPPParts" property="revisions"/>
> 
> <html-el:select indexed="true" name="selectedOEMSUPPParts"
> property="revisions">
> 	<option value="-1">-- Not Selected --</option>
> 	<logic-el:iterate name="selectedOEMSUPPParts" id="revisionSelected"
> property="rivisionsOfSelectedParts" indexId="revInd">
> 		<option value="<bean:write name="revisionSelected"
> property="dciId"/>***<bean:write name="revisionSelected"
> property="createDate"/>"><bean:write name="revisionSelected"
> property="createDate"/></option>
> 	</logic-el:iterate>
> </html-el:select>
> 
> 
> I was then thinking of using <c:if> but I need to do the following and this
> can apparently not be done.
> 
> <c:if test='${selectedOEMSUPPParts.revisions == revisionSelected.dciId+"***"+
> revisionSelected. createDate }'>
> 
> <c:if test='${selectedOEMSUPPParts.revisions} ==
> ${revisionSelected.dciId}***${revisionSelected. createDate}'>
> 
> Any Recommendations will really be appreciated.
> 
> Regards
> Neil Meyer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
Gareth Evans

Senior Developer

MSoft eSolutions Limited
Technology Centre
Inward Way
Rossmore Business Park
Ellesmere Port
Cheshire
CH65 3EN

-- 
Tel:    +44 (0)870 0100 704
Fax:    +44 (0)870 9010 705
E-Mail: gareth@msoft.co.uk
Web:    www.msoft.co.uk

----------------------------------------------
Terms:
Please note that any prices quoted within this e-mail are subject to VAT.
All program details and code described in this e-mail are subject to
copyright © of MSoft eSolutions Limited and remain the intellectual
property of MSoft eSolutions Limited.
Any proposal or pricing information contained within this e-mail are
subject to MSoft eSolutions' Terms and Conditions
----------------------------------------------
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this
message. MSoft eSolutions Limited cannot accept responsibility for viruses,
so please scan attachments. Views expressed in this message do not
necessarily reflect those of MSoft eSolutions Limited who will not
necessarily be bound by its contents.



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