• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Regarding html:text tags

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All.
What are all the advantages of using the struts html tags like the following. Instead we can use the plan html tags
<html:text property="text1" size="5"/>
<html:checkbox property="myCheckBox"/> ect.

Can any body let me know why do we use �logic� tag in struts


Thanks in advance
Raj
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use them or be sorry later...

1. auto populating field values from form beans; otherwise, you'll have to do painful form values populating manually. this is especially important in failed validations.
2. indexed properties support (can be done w/ plain, but urgh..)
3. support for LookupDispatchAction.
4. additional tags like html ptions helps with commonly used form elements tremendously.

i made this rookie mistake of using plain HTML form tags 2 years ago. the good thing is someone else is paying dearly for it right now
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I usually use struts tags, but for complex elements you're probably going to want to use HTML tags since struts tags are limited when it comes to inserting java code (<%= %> etc) within them.

So long as you give it the correct name, you're fine.

When you say logic tags, do you mean in comparison to the core.tld or inserting Java (<% if... %> )?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hve used html text tag for initializing the text values dynamically i.e through expr eg:<%= varname %> without any problems.
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple ones like that are fine.

It's when you start doing things like passing Java arguements to JS functions in the "onchange" method (or others like it) and having calculations within the tag where it starts to get a little screwy.
 
Clowns were never meant to be THAT big! We must destroy it with this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic