Results 1 to 2 of 2
- 07-04-2008, 07:24 AM #1
<core:forEach var="" begin="+<%=j%>+">???
Hi friends,
I used the below code,
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.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 got an error saying, "incompatible type found: intrequired:java.lang.object incompatible type found".
Any suggestions/correction??
Regards,
FreddieLast edited by freddieMaize; 07-04-2008 at 07:26 AM. Reason: to make it more readable:)
- 09-27-2008, 01:20 AM #2
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
-
Hwlp with "Open", "Save", "Save as..."
By trill in forum New To JavaReplies: 3Last Post: 11-02-2010, 09:26 AM -
[SOLVED] Exception in thread "main" java.util.NoSuchElementException
By thevoice in forum New To JavaReplies: 5Last Post: 05-14-2008, 01:43 PM -
"Jumble" or "Scramble" Program
By Shadow22202 in forum Java AppletsReplies: 8Last Post: 04-30-2008, 03:42 AM -
failure at Class.forName("oracle.jdbc.driver.OracleDriver");
By RonNYC in forum EclipseReplies: 1Last Post: 03-14-2008, 02:51 PM -
Error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
By romina in forum New To JavaReplies: 1Last Post: 07-25-2007, 10:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks