af:forEach problems

Hi,
I have a jspx page and i'm trying to display a list of data in a numbe rof <af:outputText value="outputText1"/> tags.
my jspx page is called page1.jspx and my backing bean is page1.java.
i have two arraylists defined as follows:
private ArrayList<String> Titles = new ArrayList<String>();
private ArrayList<String> Person = new ArrayList<String>();
and i build a list of values from a View Object as follows:
public page1() {
try {
AppModuleImpl am =
(AppModuleImpl)getApplicationModuleForDataControl("AppModuleDataControl");
ViewObjectImpl view = (ViewObjectImpl)am.getAdmPeopleView1();
view.executeQuery();
while (view.hasNext()) {
Row emp = view.next();
String title;
String person_code;
Titles.add((String) emp.getAttribute("TITLE"));
Person.add((String) emp.getAttribute("PERSON_CODE"));
} catch (Exception e) {
System.out.println("Error In page1.java backing bean - " +
e.getMessage());
I am now completely lost as to how to use the ForEach tag to print out the title, everything i try exceptions. Could anyone help me out?
Ultimately my goal is to have a Collection which contains row data which can be used to build up a list of image links dynamically . e.g.
image1(links to page A) image2(links to page B) image3(Links to page C)
image4(links to page D) images5(links to page E) etc.
but i wanted to start of simple and understand the for each ADF tag!
Any help is greatly appreciated.
Thanks

Hi,
the simplest example I can give is:
Managed Bean:
import java.util.ArrayList;
import java.util.List;
public class AfForEachtestbean {
    List<String> _list = new ArrayList<String>();
    public AfForEachtestbean() {
        if (_list.isEmpty()){
            _list.add("one");
            _list.add("two");
            _list.add("three");
            _list.add("four");
            _list.add("five");
    public void setList(List<String> list) {
        this._list = list;
    public List<String> getList() {
        return _list;
JSPX page
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces"
          xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
          xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">
  <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  <f:view>
    <afh:html>
      <afh:head title="afForEachtest">
        <meta http-equiv="Content-Type"
              content="text/html; charset=windows-1252"/>
      </afh:head>
      <afh:body>
        <h:form>
          <afh:tableLayout>
            <af:forEach begin="0" items="#{AfForEachtestBean.list}" var="row">
              <afh:rowLayout>
                <afh:cellFormat>
                  <af:outputText value="#{row}"/>
                </afh:cellFormat>
              </afh:rowLayout>
            </af:forEach>
          </afh:tableLayout>
        </h:form>
      </afh:body>
    </afh:html>
  </f:view>
  <!--oracle-jdev-comment:preferred-managed-bean-name:AfForEachtestBean-->
</jsp:root>

Similar Messages

  • Problem using c:forEach

    I'm having a problem using c:forEach. Eclipse is telling me the problem is with the items parameter, and for the life of me, I cannot see why, since I could swear forEach uses an items parameter. Here is my code and the exception report. Can anyone please help? Thanks.
    <table>
         <c:forEach var="user" items="${users}">
              <tr>
                   <td>${user.name}</td>
                   <c:forEach var="education" items="${education}">
                        <td>${education.school}</td>
                        <td>${education.major}</td>
                        <td>${education.degree}</td>
                        <td>${education.gpa}</td>
                   </c:forEach>
                   <c:forEach var="employment" items="${employment}">
                        <td>${employment.employer}</td>
                        <td>${employment.jobtitle}</td>
                        <td>${employment.startdate}</td>
                        <td>${employment.enddate}</td>
                   </c:forEach>
              </tr>
         </c:forEach>
    </table>
    org.apache.jasper.JasperException: /RecruiterResumeResults.jsp(46,1) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
         org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1174)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:821)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
         org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1736)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

    In web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">At the top of my JSP:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

  • Problem with ForEach block in BPM

    Hi,
    I have a scenario as follows:
    Collecting Idocs and send them separately via file channel (Does not make so much sense but I want to get used using the forEach Block)
    Loop (as long as "control" != false)
    Fork
    1. branch: Wait step 1 minute and container operation assign "control" = false (if no more idoc is received, loop stops after 1 minute)
    2. branch: receive step with correlation, container operation with append to multiline message, container operation assign "control" = true
    Mapping
    multiline message to single line message (same interface)
    ForEach Block
    Send Step with single line message
    My problem:
    x idocs get collected by the BPM and my file channel posts x idocs to the directory but it is always the same idoc and not x different ones.
    Any idea on that?
    Regards.
    Oliver.

    Yes, that's the blog I used.
    I have used the same interface for Send/Receive Steps, the Multi-Line Element and the Current Line Element. I restricted the Current Line Element to the block. Any other definition would not show up in the dropdown list, anyway.
    These are my settings for the Block:
    Step Name: Block1
    Description: [Blank]
    Mode: ForEach
    MultiLine Element: Idoc_Multi
    CurrentLine: Idoc_Local
    End Condition, Exceptions and Local Correlations: [Blank]
    Here are the settings for the Send Step:
    Step Name: Send1
    Description: [Blank]
    Mode: Asynchronous
    Create New transaction: [Not marked]
    Message: Idoc
    Ack: None
    Receiver from: Send Context
    All others: [Blank]
    I don't see any error?
    Regards.
    Oliver.

  • ForEach tag problem in JSP

    I have this next code, but the forEach tag doesn't seem to work! However, the line <c:out value='${lista[1]}'/> does work. Can you help me with the problem, please?
    <%@     page
         contentType = "text/html;charset=iso-8859-1"
         session="true"
         language="java"
         import = "java.lang.*"
         import = "java.util.*"
    %>
    <c_rt:if test='<%= request.getParameter("hinicio") != null %>'>
              <%
                   ArrayList Valores = new ArrayList(4);
                   Valores.add(request.getParameter("text1"));
                   Valores.add(request.getParameter("text2"));
                   Valores.add(request.getParameter("text3"));
                   Valores.add(request.getParameter("text4"));
                   Valores.add(request.getParameter("text5"));
                   pageContext.setAttribute("lista", Valores);
              %>
              <c:forEach var='x' items='<%= Valores %>'>
                   <c:out value='${x}'/>
              </c:forEach>
    <c:out value='${lista[1]}'/>
    </c_rt:if>
    <html>
    <head>
         <title>Tarea</title>
         <script type="text/javascript">
              function Inicio()
                   forma.hinicio.value = "ok";
                   forma.submit();
         </script>
    </head>
    <body>
    <form name="forma" method="post" action="Tarea.jsp">    //Redirects to itself
         <input type="hidden" name="hinicio">
         <center>
         <br>
         <input type="text" name="text1" value="0">
         <br>
         <input type="text" name="text2" value="0">
         <br>
         <input type="text" name="text3" value="0">
         <br>
         <input type="text" name="text4" value="0">
         <br>
         <input type="text" name="text5" value="0">
         <br>
         <br>
         <input type="text" name="rango1" value="0">   <input type="text" name="rango2" value="0">
         <br>
         <br>
         <input type="button" value="Aceptar" onClick="Inicio()">
         <br>
         <br>
         <input type="text" name="resultado" value="0">
         </center>
    </form>
    </body>
    </html>

    You seem to be using both the EL and the RT JSTL libs on the same page.
    If you are in a JSP1.2 container, then you can only use EL with the EL tags, and <%= expr %> with the rt tags.
    If you have a JSP2.0 container (eg Tomcat 5) properly configured (ie web.xml is version 2.4) then you should use JSTL1.1, which accepts both sorts of expressions. (${expr} is a runtime expression in JSP2.0)
    Try either
    <c:forEach var='x' items='${lista}'>
    or
    <c_rt:forEach var='x' items='<%= Valores %>'>

  • Problem with EL (forEach) in Facelets + JSF 1.2

    I am trying to upgrade my application from JSF 1.1 to JSF 1.2. However, I have run into a problem that I can't quite grasp.
    I have a backing bean with the following method
    public List<String> getFoos() {
    return foos;
    With JSF 1.1 + Facelets the following EL worked fine
         <c:forEach var="foo"
              items="${page.foos}">
              #{foo}
         </c:forEach>
    However, once I upgraded to JSF 1.2 suddenly this EL resolves to nothing. In fact, my getFoos() method on my backing bean is not even called. I have googled around but I cannot seem to find what changed in JSF 1.2 that would break this.
    If anyone has any ideas, your help is greatly appreciated.
    Thanks,
    Randy

    I have had problems using Java v8 with CUC. I had to go back to Java v7 to use the Media Master bar. Works fine now.
    If that doesn't work you could set up a Greetings Administrator call handler to record the greetings. You could even set up a hidden option to press * (or any digit) from your existing call handler to transfer to the Greetings Administrator call handler. Just need to set an owner for the call handler you want to record the greetings for (Edit/Call Handler Owner), then call the original call handler, press *, put in the username (VM extension), VM password and extension of the call handler you want to record.

  • Problem with unix "foreach" command

    Hi,
    I am facing a problem with unix command "foreach". I trying to process files using unix foreach command. When running the script with 500 or 1000 files. It is running fine. But when I am trying to the script with 2000+ files. Its throwing an error "Arguments too long".
    below is the syntax I am using in the script:
    foreach name (*)
    end
    Could anybody help me on this issue.
    Thanks in Advance.
    Manasa.

    UNIX/Linux systems expand wildcards onto the command line before invoking the
    individual commands. In effect, the shell rewrites the command line you give
    substituting the wildcard expansion. There is a limit to how long this command
    line can get.
    For example, suppose you have two files ("foo" and "bar") in your directory.
    The line:
    foreach name (*)
      echo $name
    endgets rewritten to:
    foreach name (foo bar)
      echo $name
    endand then the shell starts interpreting your script. So if you have many, many
    files, the rewritten line becomes:
    foreach name (f1 f2 f3 ... f10927)
      echo $name
    endso chances are the "foreach" line simply gets too long. To avoid problems do
    it this way; it avoids any problems based on how many files you have:
    ls | while read name
    do
      echo $name
    doneThis way the shell never exceeds its line length limitations because the
    wildcard is never expanded.
    Cheers

  • JSTL : problems with sql:query /forEach  tag

    I am not able to iterate thru the resultset provided by <sql:query> tag in JSTL. rowcount and columnName works, which means that query does produce a resultset. However, the <c:forEach> tag doesnt display the retrieved data. Code is approx like:
    c:catch var="e">
    <sql:query var="queryResults" >
    select * from emp
    </sql:query>
    </c:catch>
    <c:if test="${e!=null}">The caught exception is: ${e}
    ${queryResults.rowCount} <br>
    <c:forEach var="row" items="${queryResults.rows}">
    <tr>
    <td> <c:out value="${row.EMPNO}" /></td>
    </tr>
    </c:forEach>
    </table>
    Error thrown is :
    javax.servlet.ServletException: Unable to find a value for "EMPNO" in object of class "java.lang.String" using operator "."
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
         org.apache.jsp.jsp.sql.query_jsp._jspService(query_jsp.java:92)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    Pls. help!

    Thanks a lot all. My problem was solved by simply replacing the taglib directive
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    to
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    Cheers!

  • Problem with listing thumbnails within c:forEach loop

    I'm currently developing a photo gallery application using Struts. In the JSP code listed below I retrieve a list of "photo" beans (succesfully) and I use <html:link> tag as a link to a desired photo. Links for all the listed photos work well.
    The ONLY problem is that all the thumbnails are copies of the last one retrieved in the loop (but they refer to different photos as required). The "/showthumb" servlet (alias for appropriate servlet) inserts the thumbnails into the page using the session scoped "blob". I'm presuming that all the thumbs are result of the last invocation of the servlet and in fact use the last value of the "blob" session scoped variable.
    Does anybody has an idea how to solve this problem and show all the thumbs instead of a copies of the last one in a JSP page ?
    <c:forEach varStatus="status" var="photo" begin="0" items="${glazDB.photos}">
                    <jsp:setProperty name="prevNext" property="add" value="${photo.photoId}"/>
                    <td>
                        <c:remove var="blob"/>
                        <c:set var="blob" value="${photo.thumb}" scope="session" />
                        <c:url var="url" value="\showpicture.do" >
                          <c:param name="pic" value="${status.count}" />
                        </c:url>
                        <html:link page="${url}"><html:img page="/showthumb"/></html:link>
                    </td>
                    <c:if test="${status.count mod 4 == 0}">
                        </tr><tr>
                    </c:if>
            </c:forEach>

    Think about the ordering of things here.
    Your jsp runs, it sends back an HTML page.
    Only when the client sees the HTML page can it start making requests for the images.
    All the <html:img> tag does is put the text for an image tag onto the page to be evaluated later. So your continual setting of the session variable is pretty much useless, as only the last one is in session when you execute the servlet.
    You have to make the request load the image in some other way.
    request each blob seperately via parameters. eg /showthumb?id=xxxx
    Whether you keep all the images in session memory at one time, or you load each individual one is up to you.

  • [JSF 1.2] problem with c:forEach inside h:panelGrid

    I have a list of beans that I want to display in table of 3 columns, and let the rows increase according to the size of my list.
    The following code works as expected:
    <h:panelGrid columns="3">
         <c:forEach items="#{mylist}" var="row">
              <h:outputText value="#{row.name}" />
         </c:forEach>
    </h:panelGrid>This also works:
    <h:panelGrid columns="3">
         <c:forEach items="#{mylist}" var="row">
              <h:panelGroup>
         Name: <h:outputText value="#{row.name}" />
              </h:panelGroup>
         </c:forEach>
    </h:panelGrid>But when I put two outputText components inside the panelGroup I get duplicate ID in view error.
    Any suggestions?

    I have also seen something similar. Oddly enough, you seem to be able to explicitly specify an id, so something like this usually works:
    <h:panelGrid columns="3">
        <c:forEach items="#{mylist}" var="row" varStatus="rs">
            <h:panelGroup>
                <h:outputText id="alabel_${rs.index}" value="Name:" />
                <h:outputText id="avalue_${rs.index}" value="#{row.name}" />
            </h:panelGroup>
        </c:forEach>
    </h:panelGrid>However, I agree that this should not be needed if everything was working properly.
    Another case I have found that seems to be a bug is a JSF fragment like this:
    <h:form id="testForm">
      <h:panelGrid columns="3" columnClasses="rightColumnHeader, leftColumnHeader">
          <f:facet name="header">
         <h:outputFormat value="#{Bundle.listTest_title}" />
          </f:facet>
          <h:outputText value="Index$" />
          <h:outputText value="Index#" />
          <h:outputText value="Value" />
          <c:forEach items="#{testlist}" var="it" varStatus="is">
         <c:out value="${is.index}." />
         <h:outputText value="#{is.index}." />
         <h:outputText value="#{it}" />
          </c:forEach>
      </h:panelGrid>
    </h:form>Now the c:out tag manages to output is.index, but the h:outputText tag doesn't. Further testing shows that the varStatus variable is not available at all in #{} expressions, but only in ${} expressions, whereas the var variable is available in both. Seems like a bug, but maybe there is some reason for this behaviour??

  • Problem in using c:foreach

    hi
    My taglib direcive is :
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>And i m using this code :
    <c:forEach var="list" items="${movie}">
    <tr><td>${list}</td></tr>
    </c:forEach>The error is :
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    I think i m using some wrong directive or some thing is to be included in web.xml...
    please help..
    thanx

    why dont you add WebBrowserDocumentCompelted Event handler at the place where you instantiate your WebBrowser object "webLogin"?
    // add this line just under the instantiating webBrowser object or in the formload
    webLogin.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(getCodLinks);

  • Problems Using Foreach Container

    I have a large number of small Excel files which I want to insert into a single SQL table.  So, I created a variable with package scope called "Filename".  Then I created a foreach container using the Foreach File Enumerator, specified
    the folder value, specified files as "10_64_65*.xlsx" and clicked "Fully qualified".  Then, in the Variable Mappings tab, I chose "User::Filename" as the enumerator, and clicked OK.
    Next, I created a dataflow, and within that, I have an OLE DB for Excel Source, Data Conversion, and OLE DB Destination.  I have already configured the OLE DB destination to point to the table I want to update, and it does exist.  When I go to
    use the Excel Source editor, I select "Table name or view name variable", and select "User::Filename" in the Variable name field.  As soon as I click OK, I get "Error at Data Flow Task [Excel Source [1]]: A destination table name
    has not been provided."
    Delay validation is set to true for the package.
    This message strikes me as idiotic.  Why would I even THINK about providing a destination table name for an Excel SOURCE?  Can someone please explain what contortions I have to do to eliminate this nuisance?  I've blown an entire afternoon
    trying to guess my way around this.

    I did as you suggest, including setting DelayValidation for ExcelConnectionManager to True.  Since the variable is to receive its information from the Foreach container,
    I just entered @[User::Filename]="", because I was thinking that the Foreach container would fill this variable in when it runs, so it doesn’t matter what I initially assign to it.   Then, I went back to Excel Source Editor, and changed
    Data Access Mode to “Table name or view name variable”, and selected “User::Filename” from the list.  When I click OK, now I get a different error from Microsoft Access Database Engine, HResult 0x80004005 Description: “Invalid argument”.
    So then I followed your example above EXPLICITLY, and +now+ it says "The Microsoft Access database engine cannot open or write to the file.  It is already
    opened exclusively by another user, or you need permission to view and write its data."  This statement is untrue: the spreadsheet is NOT open, and since I can open it, view it and write to it outside of SSIS, I doubt there is a permissions issue.
    What should I try next?  When I substitute a SCRIPT PROCESS in place of the stuff I actually want to do, it runs properly, and the script reports all the filenames collected
    by the Foreach container.

  • Problem displaying c:out values in c:foreach loop

    Hi,
    I am having difficulty displaying the VO values within the c:out portion of my JSP page. I am using a DAO, ProcessAction (portal) and JSP to display the data. The JSP is displaying the hard coded 'A', so the loop is working, however, the actual values are not being displayed.
    Any feedback much appreciated :)
    I have been stuck on this for over a day...and anybody?! Thanks!!
    PharmacyDAO
        if (rs!=null) {
          while (rs.next()) {
          if (listHeader==null)
            listHeader = new ArrayList();
            wpcTxt = rs.getString("WPCTXT");
            PharmacyHeaderVO pharmacyHeaderVO = new PharmacyHeaderVO();
            pharmacyHeaderVO.setWpcTxt(wpcTxt);
            listHeader.add(pharmacyHeaderVO);
          return listHeader;     
        }ProcessAction
        public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {
        if (request.getParameter("actionId").equals("selectedTransaction")) {
        storeNo = request.getParameter("selectedStoreNo");
        transactionNo = request.getParameter("selectedTransactionNo");
        ArrayList listPharmacyHeader = (ArrayList)PharmacyDAO.getPharmacyHeader(storeNo, transactionNo, "T");
        session.setAttribute("headerList", listPharmacyHeader, PortletSession.APPLICATION_SCOPE);
        }PharmacyHeaderVO
        public class PharmacyHeaderVO {
             public PharmacyHeaderVO() {}
             private String wpcTxt = "";
             public String getWpcTxt() {
                  return wpcTxt;
             public void setWpcTxt(String wpcTxt) {
                  this.wpcTxt = wpcTxt;
        }ViewJSP
        <c:forEach var="header" items="${headerList}">
             <c:out value="${header.wpcTxt}" />
                A<br/>
        </c:forEach>Edited by: kissiffer on Feb 26, 2008 12:00 PM

    You seem to be mixing up the various versions of JSTL.
    Functions are only supported in JSTL1.1.
    What server are you using?
    If it is a JSP2.0 container you should be using JSTL1.1
    If it is not, then you can't use the fn libraries.
    Check out this post: reply #6
    http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0

  • Problem when i include a script within c:forEach

    Hi All,
    I want to call a javascript function inside a c:forEach loop. The following code is giving me a "Object Doesn't support this property or method" error
    <c:forEach items="${bulkLoadForm.headerInfoVO.columnsDesc}" var="column">     
    <script>
    alert("Hi");
    </c:forEach>
    The error is not related to this scenario at all. Please let me know a solution to this. It is a bit urgent. Thanks in advance.

    I want to call a javascript function inside a c:forEach loop.Nope sorry, won't work.
    Java/JSP runs on the server. At the server end, any html/script code is just template text to output to an html file.
    The server produces an html file, and sends it to the client.
    Java stops running.
    Java cannot call javascript, javascript can not call java. There is no direct communication.
    Java code can produce javascript code to run on a page.
    The only communication javascript has back with the server is if it makes a request (click a link, submit a button, Ajax call...)

  • c:forEach attributes' problems

    I have read the "TLDDoc Generated Documentation" ,but i m Chinese i cant understand it all very well.
    I can't understand the attributes "items" ,"var" ,"varStatus", can u help me ?

    It is not saved in the PageContext.
    JSPs are Servlets, which are normal Java Objects that are used to handle Server requests. They do so through a method called the 'service' method.
    public void doService(ServletRequest request, ServletResponse response)
    (JSPs actually use a method that doService calls named _jspService, but basically the same thing)
    When you use scriptlets, you are writing code directly in the Service method:
    <%    
      ArrayList al = new ArrayList();    
      int i= 0;    
      for(; i <= 5; i++)  {
           al.add(new Integer(i));    
    %> becomes public void _jspService(HttpServletRequest request, HttpServletResponse)
      ArrayList al = new ArrayList();    
      int i= 0;    
      for(; i <= 5; i++)  {
           al.add(new Integer(i));    
    } So the ArrayList object is stored in the local _jspService method.
    The PageContext is an external object that JSPs get access to (through th implicit object pageContext). PageContext is used to store data that is needed outside the _jspService method but still one the same JSP display unit (like in tags).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with porcess chain and request

    Hi experts, I need help!!
    Description of the problem:
    There are three ODS that load daily information through process chain to a Infocubo. The information is loaded to BW from View generated for a data base of Oracle.
    Process chain for the three ODS is equal, I explain the one procedure to them:
    1- It initiates the chain .
    2- Blocks the View.
    3- Load of data through of infoPackage.
    4- If the load finishes well, then the data is delete of the View, the data is activte in the ODS and it arises to InfoCube, and if it finishes bad so unblocks the View and finishes process chain.
    5- Then, reconstruct the Index.
    Happens that in the three ODS when we loaded the information erase request loaded previously, then the historical one of the loads in the ODS does not stay. The three infopakages used to load the information to the ODS does not have labeled the option to erase the destiny of data, and it does not have it marked. The ODS do not have marked that option.
    When I do it manually east problem does not happen. I erased process chain and I returned to create the chain porcess but it did not solve the problem.
    Thank you

    I just checked the documentation and found that your code is incorrect. IAlternativeName::StrValue contains value for an email address, a Domain Name System (DNS) name, a URL, a registered object identifier (OID), or a user principal name (UPN). It doesn't
    contain string value for directory name (and other non-mentioned types). Instead, you need to instantiate an IX500DistinguishedName interface and initialize it from an alternative name value:
    class Program {
    static void Main(string[] args) {
    String RequestString = "Base64-encoded request");
    CX509CertificateRequestPkcs10 request = new CX509CertificateRequestPkcs10();
    request.InitializeDecode(RequestString, EncodingType.XCN_CRYPT_STRING_BASE64_ANY);
    Console.WriteLine("Subject: {0}", request.Subject.Name);
    foreach (IX509Extension ext in request.X509Extensions) {
    if (ext.ObjectId.Name == CERTENROLL_OBJECTID.XCN_OID_SUBJECT_ALT_NAME2) {
    CX509ExtensionAlternativeNames extensionAlternativeNames = new CX509ExtensionAlternativeNames();
    string rawData = ext.RawData[EncodingType.XCN_CRYPT_STRING_BASE64];
    extensionAlternativeNames.InitializeDecode(EncodingType.XCN_CRYPT_STRING_BASE64, rawData);
    foreach (CAlternativeName alternativeName in extensionAlternativeNames.AlternativeNames) {
    switch (alternativeName.Type) {
    case AlternativeNameType.XCN_CERT_ALT_NAME_DIRECTORY_NAME:
    IX500DistinguishedName DN = new CX500DistinguishedName();
    DN.Decode(alternativeName.RawData[EncodingType.XCN_CRYPT_STRING_BASE64]);
    Console.WriteLine("SAN: {0}", DN.Name);
    break;
    default:
    Console.WriteLine("SAN: {0}", alternativeName.strValue);
    break;
    My weblog: en-us.sysadmins.lv
    PowerShell PKI Module: pspki.codeplex.com
    PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
    Check out new: SSL Certificate Verifier
    Check out new:
    PowerShell FCIV tool.

Maybe you are looking for

  • Updation of SO Confirmed Delivery date based on GR date for BANC parts

    Dear All, Would appreciate an answer on the following issue: For Back to back/Indiv Purchase Order parts(BANC) the confirmed delivery date in the SO is updated based on the Order Acknowledgement date sent by the vendor for the corresponding PO genera

  • Field Catalog in Free Goods Setup

    Hi Gurus, We are trying to set up Free Goods in CRM standalone. No condition type is replicated from R/3 and we have to set up everything from scratch in CRM. Under the IMG, Free goods, the first menu option is 'Field Catalog'. Could you please advis

  • Draw a continuous surface

    Hi I search a function to automate this process (look at the picture below for an example) : - I have a picture with a lot of black pixels - I would like to group all black pixels which are separated by less than "X" pixels, to draw a continuous surf

  • Exporting for Dreamweaver - undefined object?

    When I attempt to export my document (just text, no images) I get this error message: "undefined is not an object." I have no idea what it means. There are no errors showing in the document and no links at all, so that not the problem. Any ideas?

  • Creating a large 2 sided document.

    I need to create a large document. There will be 1600 unique front sides, and one common back side for the document. The front sides will be created thru a data merge. So, basically, all the odd pages will be unique, and all the even pages need to be