Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding html:text tags

 
Buddha Raju
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • 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
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • 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... %> )?
 
RukminiP Nagalla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic