aspose file tools*
The moose likes Struts and the fly likes Value from scriptlet to Struts tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Value from scriptlet to Struts tag" Watch "Value from scriptlet to Struts tag" New topic
Author

Value from scriptlet to Struts tag

Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
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

Joined: Oct 29, 2001
Posts: 8964
    
    9

Why are you not doing this in the action and passing a papers subclass that contains the complete user to the JSP?


[How To Ask Questions On JavaRanch]
Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
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

Joined: Oct 29, 2001
Posts: 8964
    
    9

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

Joined: Jan 11, 2013
Posts: 31
You were right, thanks a lot!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Value from scriptlet to Struts tag