1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

JSP not loading for this scriptlet

Discussion in 'JSP' started by sivaramakrushna, Oct 28, 2010.

  1. sivaramakrushna

    sivaramakrushna New Member

    Joined:
    Oct 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    My JSP is working with this code.

    Code:
     <ul class="buttons-1">
            <% ResultData navBut = new ResultData( ui.navButtons );
              navBut.beforeFirst();
               while( ! navBut.isLast()) {
                navBut.next();
                 if ("LEFT".equals(navBut.getString("ALIGN"))) {
                 String resKey = navBut.getString("NAME");
                 String resKeyTitle = navBut.getString("TITLE");
                 String elemID = ( (navBut.getString("ID") != null && navBut.getString("ID").length() > 0) ? ("id=\"" + navBut.getString("ID") + "\"") : "");
                 String LIelemID = ( (navBut.getString("ID") != null && navBut.getString("ID").length() > 0) ? ("id=\"LI" + navBut.getString("ID") + "\"") : "");
                 String elemDIS = ("true".equals(navBut.getString("DISABLED")) ? "class=\"disabled\"" : "");
        <a href="<%= navBut.getString("HREF")%>" <%=elemID%> onclick="<%= navBut.getString("ONCLICK")%>" title="<isa:translate key="<%= resKeyTitle %>"/> 
        <% if (ui.isAccessible) { %><isa:translate key="ecm.acc.button"/><% } %>">
            <isa:translate key="<%= resKey %>"/>
                                </a>
                                </li>
                         <%  } 
            		%>
                    <% } %>
                  </ul>
    I have modified like this to access custom javascript function. But the JSP is not loading after this. I don't understand what wrong in this.

    Code:
    <ul class="buttons-1">
                <% ResultData navBut = new ResultData( ui.navButtons );
                navBut.beforeFirst();
                while( ! navBut.isLast()) {
                    navBut.next();
                    if ("LEFT".equals(navBut.getString("ALIGN"))) {
                        String resKey = navBut.getString("NAME");
                        String resKeyTitle = navBut.getString("TITLE");
                        String elemID = ( (navBut.getString("ID") != null && navBut.getString("ID").length() > 0) ? ("id=\"" + navBut.getString("ID") + "\"") : "");
                        String LIelemID = ( (navBut.getString("ID") != null && navBut.getString("ID").length() > 0) ? ("id=\"LI" + navBut.getString("ID") + "\"") : "");
                        String elemDIS = ("true".equals(navBut.getString("DISABLED")) ? "class=\"disabled\"" : "");
                    // My change  
                    String clkFnc = "";
                    String size = (String)request.getAttribute(WorkareaNavAction.RK_MB_ITEMSIZE); 
                    if (LIelemID.equals("LItransferbutton") && size!=null && !(size.equals("-1")&& !(size.equals("0")) )
                        {
                            clkFnc = "ztransferToBasket()";
                        }
                        else
                        clkFnc = navBut.getString("ONCLICK");
    
                     %>
                        <li <%=LIelemID%> <%=elemDIS%>>
                <%--  Commented by Siva to change onclick proerty
                 <a href="<%= navBut.getString("HREF")%>" <%=elemID%>  onclick="<%= navBut.getString("ONCLICK")%>" title="<isa:translate key="<%= resKeyTitle %>"/> <% if (ui.isAccessible) { %><isa:translate key="ecm.acc.button"/><% } %>"> --%>
                      <a href="<%= navBut.getString("HREF")%>" <%=elemID%>  onclick="<%=clkFnc%>" title="<isa:translate key="<%= resKeyTitle %>"/>
     <% if (ui.isAccessible) { %><isa:translate key="ecm.acc.button"/><% } %>"> 
                        <isa:translate key="<%= resKey %>"/>
                        </a>
                        </li>
    
                <%  } //end of change
                %>
            <% } %>
          </ul>
    
    I am working in NWDS (SAP java IDE).
    Can you please help me on this?
     

Share This Page