| Author |
OGNL string manipulation
|
vanlalhmangaiha khiangte
Ranch Hand
Joined: Sep 11, 2006
Posts: 169
|
|
Hi all,
I have set a property roles as below
This is displaying properly as
So my string contains S01,R01,G01,T01
How do i search the string for specific values like S01 or T01
The following code is not working
How to search strings withing strings .. rather in java terms (how get indexOf function)
Regards,
Vanlal
|
 |
Raza Mohd
Ranch Hand
Joined: Jan 20, 2010
Posts: 247
|
|
hi
there is no conatains method that ognl uses...to perform selection.
roles is a collection or what??
Regards..
Raza
|
Good luck!!
A small leak can sink a Gigantic ship.>
|
 |
vanlalhmangaiha khiangte
Ranch Hand
Joined: Sep 11, 2006
Posts: 169
|
|
there is no conatains method that ognl uses...to perform selection.
roles is a collection or what??
It is a string
I do not know how to search a pattern in the string ...
Regards,
Vanlal
|
 |
Raza Mohd
Ranch Hand
Joined: Jan 20, 2010
Posts: 247
|
|
Here you can use..
I think it will work.
|
 |
vanlalhmangaiha khiangte
Ranch Hand
Joined: Sep 11, 2006
Posts: 169
|
|
Raza Mohd wrote:Here you can use..
I think it will work.
This will not work . This will compare a string only ...
My String is "S01,R01,G01,T01"
How do i search a pattern in this string ??
|
 |
Raza Mohd
Ranch Hand
Joined: Jan 20, 2010
Posts: 247
|
|
Either you will have to use...Jstl function tags..that facilitates to manipulate String.
Or Either you need to get a List in place of String n use Selection projection on List Objects.
Hope that would help..
Thanks n Regards.
Raza
|
 |
Raza Mohd
Ranch Hand
Joined: Jan 20, 2010
Posts: 247
|
|
if there is problem let me know..
Thanks.
|
 |
 |
|
|
subject: OGNL string manipulation
|
|
|