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

Value from scriptlet to Struts tag

 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I need get value from scriptlet to s:param value. I know I shouldn't use blend scriptlets and Struts tags but this is probably only one way. Complete code is:



Scriptlet give me variable "complete" which I need put to value for parameter user (last one)

I tryed value="%{complete}", value="%{#complete}", value='#complete', etc., but unfortunatly works.

Could anybody help me?
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you not doing this in the action and passing a papers subclass that contains the complete user to the JSP?
 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.

It is good idea. If I understand you well I will should use action instead of scriptlet. But how is possible call action inside the Iterator tag?
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't call the action from the iterator tag. You do all the work you are doing in the scriptlet in the action, then the JSP simply iterates through a list of values and displays them.
 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You were right, thanks a lot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic