You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by whitesox12 <bu...@yahoo.com> on 2008/05/14 15:29:25 UTC

How to get elements from a list without using
Hi,

I have a List that holds only 5 JavaBean Objects. Now I need to show the
data on the JSP but don't want to use the <logic:iterate....

Is there a way to manually get the List element by index and show data on
the page in specific area and then get the next element i.e. List.get(0)
then show the data and then List.get(1) etc. without using logic:iterate. 

I just need to get the elements from the List and then show the data only
using struts tags.

Any help is appreciated.

Thanks
-- 
View this message in context: http://www.nabble.com/How-to-get-elements-from-a-list-without-using-%3Clogic%3Aiterate-tp17231075p17231075.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: How to get elements from a list without using Posted by Chase <ch...@osdev.org>.
EL is not the JSTL. EL can be used outside of the JSTL (assuming you are 
on a recent version of the spec).

You might have better luck asking in the correct mailing list. This list 
is for the development of Struts, not usage.

-Chase

whitesox12 wrote:
> Is there any other way other than using JSTL. As I am trying to use struts
> tags only.
>
> Thanks
>
> Antonio Petrelli-3 wrote:
>   
>> 2008/5/14 whitesox12 <bu...@yahoo.com>:
>>     
>>>  Hi,
>>>
>>>  I have a List that holds only 5 JavaBean Objects. Now I need to show the
>>>  data on the JSP but don't want to use the <logic:iterate....
>>>
>>>  Is there a way to manually get the List element by index and show data
>>> on
>>>  the page in specific area and then get the next element i.e. List.get(0)
>>>  then show the data and then List.get(1) etc. without using
>>> logic:iterate.
>>>       
>> You could use EL:
>> ${myList[0].myProperty}
>>
>> HTH
>> Antonio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
>>     
>
>   


Re: How to get elements from a list without using Posted by whitesox12 <bu...@yahoo.com>.
Is there any other way other than using JSTL. As I am trying to use struts
tags only.

Thanks

Antonio Petrelli-3 wrote:
> 
> 2008/5/14 whitesox12 <bu...@yahoo.com>:
>>
>>  Hi,
>>
>>  I have a List that holds only 5 JavaBean Objects. Now I need to show the
>>  data on the JSP but don't want to use the <logic:iterate....
>>
>>  Is there a way to manually get the List element by index and show data
>> on
>>  the page in specific area and then get the next element i.e. List.get(0)
>>  then show the data and then List.get(1) etc. without using
>> logic:iterate.
> 
> You could use EL:
> ${myList[0].myProperty}
> 
> HTH
> Antonio
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-elements-from-a-list-without-using-%3Clogic%3Aiterate-tp17231075p17241345.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: How to get elements from a list without using Posted by Antonio Petrelli <an...@gmail.com>.
2008/5/14 whitesox12 <bu...@yahoo.com>:
>
>  Hi,
>
>  I have a List that holds only 5 JavaBean Objects. Now I need to show the
>  data on the JSP but don't want to use the <logic:iterate....
>
>  Is there a way to manually get the List element by index and show data on
>  the page in specific area and then get the next element i.e. List.get(0)
>  then show the data and then List.get(1) etc. without using logic:iterate.

You could use EL:
${myList[0].myProperty}

HTH
Antonio

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