Using <jsp:getProperty> within rtexprvalue Attributes

S

Stephan Melchior

How can I use <jsp:getProperty> Tag as value of an attribute within a
customTag.

Example:

<psws05:Currency cunit="dollar" value='<%=pizza.getPreis()%>'/> works
fine, but

<psws05:Currency cunit="dollar" value='<jsp:getProperty name="pizza"
property="preis"/>'/> does not work 'cause the Setter of the preis
Attibute is
feed with the String <jsp:getProperty name="pizza"
property="groesse"/> and not the value of the expression.

Any ideas?

Greetings Stephan
 
T

Tor Iver Wilhelmsen

<psws05:Currency cunit="dollar" value='<jsp:getProperty name="pizza"
property="preis"/>'/> does not work 'cause the Setter of the preis
Attibute is
feed with the String <jsp:getProperty name="pizza"
property="groesse"/> and not the value of the expression.

Correct: Just as in XML in general, elements cannot be inside tags
like that.

Use the autogenerated variable like this:

<psws05:Currency cunit="dollar" value='<%=pizza.getPreis()%>'/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top