Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference b/w '%{x}", "${x}", "%{#x}"

 
Rachel Kumar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can anyone tell me the difference between:

1.%{xURL},
2.${y.id},
3.%{#attr.y.status}.

eg1: <s:a href="%{xURL}">${y.id} </s:a>
eg2:<s:text name="%{#attr.y.status}" />
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1.%{xURL} is used for take a value from current list value which is set to Action class.

2.${y.id} is JSTL tag for value.

3.%{#attr.y.status} is used for when you want to take the value for OGNL value stack.



Thanks,
Nishan Patel.
 
Rachel Kumar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok then how to differentiate, i mean like which one to use when?...
I am sorry if this is wrong question,as i am new to this
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

That is depend on you where to use it.

All of three are use in Jsp page.

${y.id} is JSTL tag which is sun product.

and

%{xURL} and %{#attr.y.status} both are Struts 2.0 tag.

Thanks,
Nishan Patel.
 
Rachel Kumar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
if you are familiar with the struts tags plese can you help me out in My post "Highlight table row on Return Press".

I know the logic but i am not sure of the implemenation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic