Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008
    Posts
    64
    Rep Power
    0

    Default <core:forEach var="" begin="+<%=j%>+">???

    Hi friends,

    I used the below code,

    Java Code:
    <%
                int j = 0;
                for (int i = 0; i < 25; i++) {%>
     
    <core:forEach var="result_list" items="${searched.result_list}" begin[B]="+<%=j%>+"[/B] end[B]="+<%=j%>+">[/B]
     
        <tr><td align="left" class="fastTitle"><core:out value="${result_list}" escapeXml="false"/> </td></tr>
     
    </core:forEach>
    <% j++;%>
    <core:forEach var="result_list" items="${searched.result_list}" begin[B]="+<%=j%>+"[/B] end[B]="+<%=j%>+">[/B]
     
        <tr><td align="left" class="fastTeaser"><core:out value="${result_list}" escapeXml="false"/> </td></tr>
     
    </core:forEach>
    <% j++;
     
                }%>
    I mean, begin and end are int values like 0,1,2. But for me, I want them to be a dynamic value and thats why I used a for loop.

    I got an error saying, "incompatible type found: intrequired:java.lang.object incompatible type found".

    Any suggestions/correction??

    Regards,
    Freddie
    Last edited by freddieMaize; 07-04-2008 at 07:26 AM. Reason: to make it more readable:)

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    7

    Default

    Well what I see, though I am exposing myself to counter-claim, is trying to do real application programming in what is supposed to be a server-side include language.

    Maybe very do-able, maybe I am wrong ..... but that is what I see.

    There is a syntax very close to what you have that will do what you say, but server-side includes,... is that called a variable there?

    Probably some fancy name for variable that ......

    uh, I better quit here.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Similar Threads

  1. Hwlp with "Open", "Save", "Save as..."
    By trill in forum New To Java
    Replies: 3
    Last Post: 11-02-2010, 09:26 AM
  2. Replies: 5
    Last Post: 05-14-2008, 01:43 PM
  3. "Jumble" or "Scramble" Program
    By Shadow22202 in forum Java Applets
    Replies: 8
    Last Post: 04-30-2008, 03:42 AM
  4. Replies: 1
    Last Post: 03-14-2008, 02:51 PM
  5. Replies: 1
    Last Post: 07-25-2007, 10:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •