• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to nest tags?

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey there!
I want to do somethink like this:
<html:text property="street" size="40" maxlength="40" <logic resent name="street" scope="request">value="<bean:write property="street" scope="request" />"</logic resent> />
In words: A Test field. If there is an attribute called "street" in the request, the value of the annribute should be set as the value to the text field.
I think that this is just a normal thing for a struts user...
Thanks in advance!
Florian
 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, without smileys:
Hey there!
I want to do somethink like this:
<html:text property="street" size="40" maxlength="40" <logic:present name="street" scope="request">value="<bean:write property="street" scope="request" />"</logic:present> />
In words: A Test field. If there is an attribute called "street" in the request, the value of the annribute should be set as the value to the text field.
I think that this is just a normal thing for a struts user...
Thanks in advance!
Florian
 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or maybe I should ask in another way:
I have a jsp page with textfields, their names are: lastname, firstname, street, number, zip, city, country
If the request is empty, the textfields should be shown empty.
If the request contains attributes, their names are exactly the same ones as the names of the text fields.
is there a way to automate filling in the values of textfields if the attributes have the same name as the textfields?
Thanks!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure your html:text tag is within a html:form tag. That maps the form to your bean. Then you do what you did in your example, but you leave out the value attribute. Since the form is associated with your bean, the value will get filled in automatically.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd avise using JSTL, it will save you lots of time, and looks easier to the eye!
 
reply
    Bookmark Topic Watch Topic
  • New Topic