Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > struts/bean question

Reply
Thread Tools

struts/bean question

 
 
Benjamin Stewart
Guest
Posts: n/a
 
      07-02-2003
Greetings,
I have an application that is iterating through nested objects etc. The
guys that have developed the code that sits behind our struts
application has functions that take parameters. Am I able to pass a
parameter to a method from a <bean:write> or <bean:iterate> tag ?? I
have tried this, but it dont work

<logic:iterate id="stateMap" name="MajGroupList"
property="salesCurve(2004)">

^^^^^

If I cant pass parameters is there any other way around this without
having to rewrite the API?

Thanks
Ben

 
Reply With Quote
 
 
 
 
Wendy S
Guest
Posts: n/a
 
      07-03-2003
Benjamin Stewart wrote:

> Greetings,
> I have an application that is iterating through nested objects etc. The
> guys that have developed the code that sits behind our struts
> application has functions that take parameters. Am I able to pass a
> parameter to a method from a <bean:write> or <bean:iterate> tag ?? I
> have tried this, but it dont work
> <logic:iterate id="stateMap" name="MajGroupList"
> property="salesCurve(2004)">
> If I cant pass parameters is there any other way around this without
> having to rewrite the API?


Not to my knowledge. JSTL is usually the answer to the limitations of the
logic/bean tags, but the current version does not provide for calling
arbitrary methods and certainly not for passing parameters.

But you don't have to rewrite the underlying code... write a custom tag.
Take what you need from <logic:iterate> or <cut> and extend it to do what
you need.

--
Wendy in Chandler, AZ
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments