This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how get custome data in body tag

 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
my tag is contains a field (ids). how get a value of field in body my tag without write other tag.


please help me.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "value of the field"?
 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes . value of the ids .
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to do better than partial sentences if you want help.

Perhaps you can start by explaining what you mean by "ids" and why you need them?
 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ids is name of myfield . After calculating ، Write ids in the specific location of body .
 
Shankar Tanikella
Ranch Hand
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amir,
Then why don't you try rendering it using your tag itself?
 
amir taghvayi
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Shankar ،
my body contains other tags and html code . can not write all in mycustometag .
 
Stefan Evans
Bartender
Pie
Posts: 1670
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two ways potentially:
- Declare your tag has a tag variable in your tld/tag file.
- just set an attribute into the page context and reference it in the body of your tag

You may want to follow the example of the <c:forEach> tag and declare a "var" attribute which defines the name of the attribute the value is exposed as
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic