Take a look at the s:set and s:property tags. Nils-H
On Mon, Dec 22, 2008 at 10:56 AM, taj uddin <tajuddi...@yahoo.com> wrote: > Hi > > I am working on application where i have to convert the code developed in > struts1.2 to struts2.0. > Here is the struts1.2 code: > //Sub Menu for 2nd Main Menu Item ("ABC"): > menus[1] = new > menu(180, "vertical", 0, 0, -1, -1, "", "#ce122d", "Verdana,Helvetica", 8, > "normal", > "normal", "white", "#fcccb5", 1, "#ce122d", 2, 62, false, true, false, false, > 0, true, 4, 4, "black"); > <% int Index = 0; > %> > <logic:iterate > indexId="idx" id="Table" name="Tables" scope="session"> > <% Index = > idx.intValue() + 3; %> > > menus[1].addItem("#", "", 20, "left", "<bean:write name="Table" > property="tableName"/>", <%=Index%>); > </logic:iterate> > <% Index++; %> > > menus[1].addItem("#", "", 20, "left", "PQR", <%=Index%>); > <% Index++; %> > > menus[1].addItem("#", "", 20, "left", "DEF", <%=Index%>); > <% Index++; %> > > menus[1].addItem("#", "", 20, "left", "XYZ", <%=Index%>); > > Here is my struts2.0 code(below) :- > > //Sub Menu for 2nd Main Menu Item ("ABC"): > menus[1] = new > menu(180, > > "vertical", 0, 0, -1, -1, "", "#ce122d", "Verdana,Helvetica", 8, > "normal", > "normal", > > "white", "#fcccb5", 1, "#ce122d", 2, 62, false, true, false, false, 0, true, > 4, 4, > > "black"); > <% int Index = 0; > %> > <s:iterator > status="idx" > > id="Table" value="Tables" > > <% Index = > idx.index() + 3; > > %> > > menus[1].addItem("#", "", > > 20, "left", "<s:property value="#Table.tableName"/>", <%=Index%>); > </s:iterator> > <% Index++; %> > > menus[1].addItem("#", "", 20, > > "left", "PQR", <%=Index%>); > <% Index++; %> > > menus[1].addItem("#", "", 20, > > "left", "DEF", <%=Index%>); > <% Index++; %> > > menus[1].addItem("#", "", 20, > > "left", "XYZ", <%=Index%>); > > where i am getting the error on the line: > <% Index = idx.index() + 3; %> > indicating that idx cannot be resolved. > > Pls help me out in this issue. > > > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org