• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Issue with the property attribute of logic:iterate

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
I have a issue with concatinating the string for setting the value of property attribute of Logic:iterate tag.

currently the scene is like this.
Manager is a bean with its property as
List getListParam(String s)
So the below mentioned code works fine
<logic:iterate name="Manager" property="listParam(conditions)" id="filterInfoBean">
Also note that this code is running inside a loop

But now the issue is that the parameter conditions for listParam is not commingas constant
I want to send different paramteters depending upon the iterations
like conditions161 or conditions162 or conditions163

<logic:iterate name="tileManager" property="listParam(filters"+fieldId+")" id="filterInfoBean">

but it fails saying Unterminated <logic:iterate tag'

Please help me resolve it


Nishant
So i tried something like this
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please provide code snippet for better understanding...
 
Bob Mathews
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok i have added the code snippet i think it needs to be writtern in bold

I have a issue with concatinating the string for setting the value of property attribute of Logic:iterate tag.

currently the scene is like this.
Manager is a bean with its property as
List getListParam(String s)
So the below mentioned code works fine
<logic:iterate name="Manager" property="listParam(conditions)" id="filterInfoBean">
Also note that this code is running inside a loop

But now the issue is that the parameter conditions for listParam is not commingas constant
I want to send different paramteters depending upon the iterations
like conditions161 or conditions162 or conditions163

<logic:iterate name="tileManager" property="listParam(filters"+fieldId+")" id="filterInfoBean">

but it fails saying Unterminated <logic:iterate tag'

Please help me resolve it


Nishant
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to use a variable, you must use either a scriptlet or EL. If you use EL, you must use the EL version of the tags, which means changing the URI used in your taglib definition. Below is a sample scriptlet solution:

<logic:iterate name="tileManager" property='<%="listParam(filters"+fieldId+")" %>' id="filterInfoBean">

The above will only work if fieldId has been defined as a java variable earlier in the JSP.
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic