Win a copy of Functional Reactive Programming this week in the Other Languages 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
Posts: 9319
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
Posts: 9319
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