JSP Expression inside Struts html:text property

2003-10-13 Thread Jonathan Hawkins
Howdy -

I have some JSP code that looks like this:



% for(int x=1;x =7;x++){ %
html:text property=person%=x% value=/
% } %
of course I was expecting the HTML output to be something like:

input type=text name=person1 value=
input type=text name=person2 value=
input type=text name=person3 value=
input type=text name=person4 value=
input type=text name=person5 value=
input type=text name=person6 value=
input type=text name=person7 value=
Instead I am getting :

input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
Anyone have another way to achieve the desired output? I looked into 
the html:logic tag and think that may be the way to go, but I can't 
find an example
Please helpsuper powers..failing.must .stop 
evilbad code before it'stoo late

thanks
jonathan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JSP Expression inside Struts html:text property

2003-10-13 Thread Paul McCulloch
When using a runtime expression as an attribute value the whole attribute
must be a single expression:

html:text property=%=\person\ + x% value=/

Paul

-Original Message-
From: Jonathan Hawkins [mailto:[EMAIL PROTECTED]
Sent: 13 October 2003 15:27
To: Struts Users Mailing List
Subject: JSP Expression inside Struts html:text property


Howdy -

I have some JSP code that looks like this:



% for(int x=1;x =7;x++){ %
html:text property=person%=x% value=/
% } %


of course I was expecting the HTML output to be something like:

input type=text name=person1 value=
input type=text name=person2 value=
input type=text name=person3 value=
input type=text name=person4 value=
input type=text name=person5 value=
input type=text name=person6 value=
input type=text name=person7 value=

Instead I am getting :


input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=
input type=text name=person%=x% value=

Anyone have another way to achieve the desired output? I looked into 
the html:logic tag and think that may be the way to go, but I can't 
find an example
Please helpsuper powers..failing.must .stop 
evilbad code before it'stoo late


thanks
jonathan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Expression inside Struts html:text property

2003-10-13 Thread Nicolas De Loof
When you want to use Runtime Expression in a JSP tag, the full tag attribute value 
must be RTexpression, not just part
of it :

html:text property=%= \person\ + x % value=/


In your case you should think using indexed properties and logic:iterate to display 
your datas.

Nico.


- Original Message - 
From: Jonathan Hawkins [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, October 13, 2003 4:26 PM
Subject: JSP Expression inside Struts html:text property


 Howdy -

 I have some JSP code that looks like this:



 % for(int x=1;x =7;x++){ %
 html:text property=person%=x% value=/
 % } %


 of course I was expecting the HTML output to be something like:

 input type=text name=person1 value=
 input type=text name=person2 value=
 input type=text name=person3 value=
 input type=text name=person4 value=
 input type=text name=person5 value=
 input type=text name=person6 value=
 input type=text name=person7 value=

 Instead I am getting :


 input type=text name=person%=x% value=
 input type=text name=person%=x% value=
 input type=text name=person%=x% value=
 input type=text name=person%=x% value=
 input type=text name=person%=x% value=
 input type=text name=person%=x% value=
 input type=text name=person%=x% value=

 Anyone have another way to achieve the desired output? I looked into
 the html:logic tag and think that may be the way to go, but I can't
 find an example
 Please helpsuper powers..failing.must .stop
 evilbad code before it'stoo late


 thanks
 jonathan


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]