Use jstl tags in jsf page

I have h:dataTable in each row of which i'd like to output row data as text, inputfield or link depending on row data type
                    <h:dataTable id="pnlHistory" value="#{UserOrdersBean.orderLineWrappers}" var="wrapper" rendered="#{UserOrdersBean.isBasicUser}"
                                 columnClasses="history_col1, history_col2, history_col3, history_col4, history_col5" width="100%" cellpadding="5" >
                        <h:column>
                            <f:facet name="header">
                                <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                    <h:outputText value="#{msg.userorders_itemName}">
                                        <f:param value="orderLineWrappers"/>
                                        <f:param value="itemName"/>
                                    </h:outputText>
                                </h:commandLink>
                            </f:facet>
                            <h:outputText value="#{wrapper.itemName}" styleClass="itemdescription"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                    <h:outputText value="#{msg.userorders_data}">
                                        <f:param value="orderLineWrappers"/>
                                        <f:param value="data"/>
                                    </h:outputText>
                                </h:commandLink>
                            </f:facet>
                            <c_rt:choose>
                                <c_rt:when test="#{wrapper.type==0}">
                                    <h:outputText value="#{wrapper.data}" styleClass="basic_thin"/>
                                </c_rt:when>
                                <c_rt:when test="#{wrapper.type==1}">
                                    <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px"/>
                                </c_rt:when>
                                <c_rt:when test="#{wrapper.type==2}">
                                    <h:outputLink value="#{wrapper.data}">
                                        <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
                                    </h:outputLink>
                                </c_rt:when>
                            </c_rt:choose>
                        </h:column>
                     </h:dataTable>trying to use jstl tags but unsuccessfull. Is it ever possible user jstl tags in jsf tags like listed above

Replace the c:choose block by<h:outputText value="#{wrapper.data}" styleClass="basic_thin" rendered="#{wrapper.type == 0}" />
<h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px" rendered="#{wrapper.type == 1}" />
<h:outputLink value="#{wrapper.data}" rendered="#{wrapper.type == 2}">
    <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
</h:outputLink>

Similar Messages

  • How to use HTML tags inside JSF pages

    I am creating a Menu using dataTable and outputLink in a JSF page.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <h:column>
    <li>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
    </h:outputLink>
    <li>
    </h:column>
    </h:dataTable>
    </ol>
    </div>
    </div>
    I want to use <li> HTML tag as shown in code above before and after every <tr> tag formed, but when i run it and see view source, this is how it shows:
    NOTE: you can see it has thrown out of <table> tag itself.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <li>
    </li>
    <table>
    <tbody>
    <tr>
    <td><a id="_id0:0:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=-1"><span id="_id0:0:crumpName" style="width: 165px;">Home</span></a></td>
    </tr>
    <tr>
    <td><a id="_id0:1:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=3~-1"><span id="_id0:1:crumpName" style="width: 165px;">HIM Admin</span></a></td>
    </tr>
    </tbody>
    </table>
    </ol>
    </div>
    </div>
    Can some one help me, how do i use HTML tags inside <h:dataTable>.
    Or is their any other way i should form my Menus, to fully utilize to HTML tags.
    Thanks
    Ravi

    Hello,
    You can embed the verbatim elements in your datatable, ie,
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
      <h:column>
        <f:verbatim><li></f:verbatim>
        <h:outputLink id="crumbID" value="#{bread.menuLink}">
          <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
        </h:outputLink>
        <f:verbatim></li></f:verbatim>
      </h:column>
    </h:dataTable>

  • Cannot use jstl tag for jsp page which generated from Human Task

    Hi
    Plz help me.
    I have tried to using jstl in jsp which generate from Human Task and I deploy it to server( by ant on Jdev ) to see task detail in Oracle Worklist application. But when i submit task and then I access to worklist to see task detail, the error has show in page that "OracleJSP: An error occurred. Consult your application/system administrator for support. Programmers should consider setting the init-param debug_mode to "true" to see the complete exception message. " .
    I access server to see application.log to see error and I see error show "workflowform: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: /Header1.jsp: Line # 3, <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> "
    How do I fix this error?
    PS. I tried to us jstl because I need to connet to database which jstl tag(sql) if somebody has another solution for connect database in task detail page, Please help suggest me.
    Thanks
    user520932

    Is the jstl tag libray loaded in the appsserver?
    Can you use jdbc connection like
    DataSource ds = ic.lookup("java:comp/env/jdbc/myDB");
    Connection con = ds.getConnection();
    DataSource ds = (DataSource) org.apache.derby.jdbc.ClientDataSource()
    ds.setPort(1521);
    ds.setHost("localhost");
    ds.setUser("APP")
    ds.setPassword("APP");
    Connection con = ds.getConnection();
    http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html

  • Posting huge data on to JSP page using JSTL tags

    Hi,
    I have one application where I have to post huge data (approximately 2000 rows of data) into JSP page. I am using JSTL tags and running on Tomcat 5.
    It is taking almost 20 to 25 seconds to load the entire page.
    Is it the optimal time to load or it could be improved?
    Please let me know.
    Thanks,
    --Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Evnafets,
    Thank you for the response.
    Here are the tasks I am doing to display the data on JSP.
    0. We are running on Tomcat 5 and the memory size is 1024MB (1GB).
    1. Getting the data - I am not performing any database queries. The data is stored in the static cache memory. So the server side response is so quick - less than a milli second.
    2. Using Java beans to pass data to the presentation layer (JSP).
    3. 10 'if' conditions and 2 'for' loops and 2 'choose' statements are being used in the JSP page while displaying the data.
    4. Along with the above, there are 4 javascript files are being used.
    5. The jsp file size after rendering the data, is aprox. 160 kb
    Hope this information helps you to understand the problem.
    Thanks,
    --Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Use JSTL tags for ATG droplets and beans

    Hi,
    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tag
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>

    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tagIn the <dsp:importbean> use var to give an EL variable name to the component you are importing.You can also set its scope attribute to page, request, session, or application with page scope being the default. You can then access it as a page scoped attribute. So this should do:
    <dsp:importbean var="profileFormHandler" bean="/atg/userprofiling/ProfileFormHandler" />
    <c:out value="${pageScope.profileFormHandler.ProfileJSON}" />In case you change the scope in importbean you can accordingly use pageScope, requestScope, sessionScope or applicationScope.
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>Any ATG droplet is nothing but a servlet which is also a Nucleus component. So essentially you want to call a servlet from JSTL which as such shouldn't be done in a well written script-less JSP. You can probably try to use the droplet as a bean and use JSTL on top of it but since ATG droplets also have different types of parameters like input, output and open so you will have to specially handle those.

  • Is it possible todeclare primitive variable by using JSTL tag

    Hi friends..........
    I have to use jstl tags in my project , so i have to know how to declare primitive variables with jstl tag. Is it possible with <c:set > jstl tag........
    Hope i get the answer...........
    Thanks in advance...............

    JSTL variables are attributes in the page, request, session and application scopes.
    As such, they can only be objects, because you can't store a primitive value as an attribute.
    However you shouldn't need to declare primitive variables. You should hardly need to declare any variables.
    JSTL is not a programming language. It is a language to aid the display of a JSP. Therefore most of its attention is geared towards outputting things, with a much lesser concern on setting them.
    Cheers,
    evnafets

  • How to use j query in .jsf page which is designed using adfpagetemplate.

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="untitled7.jsf" id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx" id="pt1">
    <f:facet name="center">
    <af:resource type="javascript"
    source="/lib/jquery/jquery-1.3.2.min.js"/>
    <af:resource type="javascript">
    function slideSwitch() {
    var $active = $('#slideshow IMG.active');
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
    // use this to pull the images in the order they appear in the markup
    var $next = $active.next().length ? $active.next() : $('#slideshow img:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
    .addClass('active')
    .animate({opacity: 1.0}, 1000, function() {
    $active.removeClass('active last-active');
    $(function() {
    setInterval( "slideSwitch()", 15000 );
    </af:resource>
    <af:resource type="css">
    #slideshow IMG {
    position:absolute;
    top:0;
    left:0;
    z-index:8;
    opacity:0.0;
    #slideshow IMG.active {
    z-index:10;
    opacity:1.0;
    #slideshow IMG.last-active {
    z-index:9;
    </af:resource>
    <af:panelGroupLayout id="slideshow" layout="vertical">
    <!-- The use of groups avoids that each image gets surrounded by a div -->
    <af:group>
    <af:image source="/images/cristo1.jpg" id="i1" />
    <af:image source="/images/cristo2.jpg" id="i2"/>
    <af:image source="/images/ipanema1.jpg" id="i3"/>
    </af:group>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="header"/>
    <f:facet name="end"/>
    <f:facet name="start"/>
    <f:facet name="branding"/>
    <f:facet name="copyright"/>
    <f:facet name="status"/>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    Above content is my code written in jsf page....
    jquery working fine if i create page withoput pagetemplate...
    Any please guide me to use jquery in the jsf page(created with page template)...
    Thanks in advance
    Edited by: 991543 on May 7, 2013 11:05 PM

    Hi frank,
    thanks for your reply frank........still am facing the same issue even i tried wat you told.
    I have pasted the code below for your reference.....
    please let me knw wat is the wrong thing in below code if any thing wrong plz guide me to resolve because this is needed in our project, thanks in advance.
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="untitled7.jsf" id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx" id="pt1">
    <f:facet name="center">
    <af:resource type="javascript"
    source="/lib/jquery/jquery-1.3.2.min.js"/>
    <af:resource type="javascript">
    function slideSwitch() {
    var $active = $('#pt1:slideshow IMG.active');
    if ( $active.length == 0 ) $active = $('#pt1:slideshow IMG:last');
    // use this to pull the images in the order they appear in the markup
    var $next = $active.next().length ? $active.next() : $('#pt1:slideshow img:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
    .addClass('active')
    .animate({opacity: 1.0}, 1000, function() {
    $active.removeClass('active last-active');
    $(function() {
    setInterval( "slideSwitch()", 1000 );
    </af:resource>
    <af:resource type="css">
    #pt1:slideshow IMG {
    position:absolute;
    top:0;
    left:0;
    z-index:8;
    opacity:0.0;
    #pt1:slideshow IMG.active {
    z-index:10;
    opacity:1.0;
    #pt1:slideshow IMG.last-active {
    z-index:9;
    </af:resource>
    <af:panelGroupLayout id="slideshow" layout="vertical">
    <!-- The use of groups avoids that each image gets surrounded by a div -->
    <af:group>
    <af:image source="/images/cristo1.jpg" id="i1" />
    <af:image source="/images/cristo2.jpg" id="i2"/>
    <af:image source="/images/ipanema1.jpg" id="i3"/>
    </af:group>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="header"/>
    <f:facet name="end"/>
    <f:facet name="start"/>
    <f:facet name="branding"/>
    <f:facet name="copyright"/>
    <f:facet name="status"/>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    Thanks & Regards
    Gowthaman Narayanan
    Edited by: 991543 on May 15, 2013 4:27 AM
    Edited by: 991543 on May 15, 2013 4:30 AM

  • How to write this java code in jsp using jstl  tags?

    Can anybody help me on this?
    I dont know how to check the containsKey using jstl tags?
    <%
         LinkedHashMap yearMap     =     (LinkedHashMap)request.getAttribute("yearMap");
         TreeSet nocSet               =     (TreeSet)request.getAttribute("nocSet");
         Iterator     yearMapIt     =     yearMap.keySet().iterator();
         while(yearMapIt.hasNext())
              int yearValue               =     (Integer)yearMapIt.next();
    %>
    <tr>
              <td><%=yearValue%></td>
    <%
              LinkedHashMap monthMap     =     (LinkedHashMap)yearMap.get(yearValue);
              Iterator     nocSetIt     =     nocSet.iterator();
              while(nocSetIt.hasNext())
                   String nCase=(String)nocSetIt.next();
                   if(monthMap.containsKey(nCase))
                        String count     =     (String)monthMap.get(nCase);
    %>
                        <td> <%= count %> </td>
    <%            }
                   else
    %>          
                        <td> 0 </td>     
    <%          
    %>
    </tr>
    <% } %>Edited by: avn_venki on Feb 18, 2008 11:54 PM

    <c:forEach var="yearMap" items="${requestScope.yearMap}">
         <th> <c:out value="${yearMap.key}"/> </th>
    <bean:define id="monthMap" value="${yearMap.value}"/>
    <c:forEach var="nocSet" items="${nocSet}">
    then how to write containsKey using tags??

  • Problem in using JSTL tag libs

    Hi there,
    I am trying to use JSTL tag libs in my web app, but i get the following error message:
    org.apache.jasper.JasperException: /index.jsp(22,0) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
    as it might be clear i am using Tomcat and line 22 of the code for index.jsp is:
    <c:if test="${user.role > 0 }">
    Please help my identify whats wrong in there. I suspect that it is because of my web.xml file, but i am not sure.
    thanx in advance,
    Capitan Haddock

    try to use gt instead of >

  • Can we  have a href tags in jsf page

    hi all,
    I tried inserting a link in jsf page using <a href> tag but when I click it, it is appending the link to contextroot.
    For Example:
    <f:verbatim>
    click here
    </f:verbatim>
    and when I click on it, I see http://www.google.com is appended to my application url after context root like
    http://localhost:9080/Ma/view/India/http://www.google.com
    and I get 404 error. how do I do it without having my application url.
    Thanks
    Ma
    Edited by: niki007 on Jan 12, 2009 4:32 PM

    This problem can occur if you didn't specify any protocol (http:// or https:// or others) in the link. But your example looks fine. I think that you modified the real code to this example, without being aware that you solved the problem yourself.
    At any way, you can also just use h:outputLink to render <a> elements.

  • Need Suggestion on including JSTL Tags with JSF

    Hi..All....
    I need some suggestions.. i Started doing a project in JSF.. i am new to JSF...
    I Developed some part of the project in Struts.. but now.. our clinet says... The Application Has to go
    with JSF.so.. started redesigning again....
    Can i use JSTL...where ever i want....when i am developing a JSF Application...
    Please suggest..me...
    Thanks.. for the Help..
    Arthi

    I am freely mixing jstl and jsf in my project using:
    JSTL RI 1.2
    JSF RI 1.2
    Tomcat 6
    i am mixing c:forEach and h: tags successfully, which i needed for some javascript functionality that i could not do with data table. but stick to JSF wherever possible!

  • I can't use JSTL tag for read rss.

    I want to read rss from another web. but I can't read rss . I use Netbeans and I add JSTL Library already. I can use forEach tag but every time when I use xml tag it show error. This is my code for read rss. I don't know how to read rss with JSTL tag please help me.
    <h6><!-- Filename: ShowStudents.jsp -->
    <%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <HTML>
    <BODY>
    <c:import var="xmlDoc" url="http://www.manager.co.th/RSS/Home/Breakingnews.xml"/>
    <x:parse var="parsedDocument" xml="${xmlDoc}"/>
    <table>
    <tr>
    <th>Title : </th>
    <th>Link : </th>
    </tr>
    <x:forEach select="$parsedDocument/channel/item"> // This code I ever been change to $parsedDocument/rss/channel/ and $parsedDocument/rss/channel/title ,but it show same error.
    <tr>
    <td> <x:out select="title" /> </td>
    <td> <x:out select="link" /> </td>
    </tr>
    </x:forEach>
    </table>
    </BODY>
    </HTML></h6>
    when I run this code it show error like this. how to read rss with JSTL tag please help me.
    <h6>
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:101)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    root cause
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
    com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
    org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
    org.apache.jsp.test_jsp._jspx_meth_x_005fparse_005f0(test_jsp.java:150)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:80)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    Filter.ThaiRequest.doFilter(ThaiRequest.java:38)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    </h6>
    Edited by: user12864851 on 15 ม.ค. 2554, 22:59 น.

    Ok, I did a bit more experimenting, and web searching, and found you are the victim of the UTF-8 BOM bug.
    Basically the java UTF-8 reader does not recognise a BOM at the start of a UTF-8 stream, and it has to be discarded manually.
    For details: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
    Here is a 'fixed' JSP for you.
    <%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <%@ page contentType="text/html; charset=UTF-8"%>
    <HTML>
    <BODY>
         <c:import var="xmlDoc"
              url="http://www.manager.co.th/RSS/Home/Breakingnews.xml"
              charEncoding="UTF8" />
         <%--
            JSTL hack to work around the UTF-8 BOM bug in JDK.
            http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
         --%>
         <c:set var="testChar" value="fn:substring(xmlDoc, 0, 1)}"/>
         <c:if test="${testChar != '<'}">
           <c:set var="xmlDoc" value="${fn:substring(xmlDoc, 1, fn:length(xmlDoc))}" />
         </c:if>
         <table>
              <tr>
                   <th>Title :</th>
                   <th>Link :</th>
              </tr>
              <x:parse var="parsedDocument" doc="${xmlDoc}" />
              <x:forEach select="$parsedDocument/rss/channel/item">
                   <tr>
                        <td><x:out select="title" /></td>
                        <td><x:out select="link" /></td>
                   </tr>
              </x:forEach>
         </table>
    </BODY>
    </HTML>cheers,
    evnafets

  • Using Business Components in JSF pages

    I have several questions about using BCs in JavaServer Faces pages. I'm new to the JSF-BC development world.
    Here's what I'm trying to accomplish: a salesperson gets a call from a customer requesting a quote. The salesperson selects the URL for my RFQ form and begins filling it out. If there is an existing customer record in the company's database, the salesperson wants to be able to load customer info into the form from the database, rather than typing it all in. Reasonable enough, and probably simply enough.
    But it's kickin' my butt. I've created the domain objects (including one for the customer database, call it "CU") and the model objects (a View Object that filters out all fields but those needed on the form, an Application Module with a View Object Instance). Initially I am routing from the main form window to a dialog window where I am hosting the customer selection components, intending to return to the main window with the selection. On the dialog window I've dropped the VO and configured it to be an ADF Navigation List (which gets implemented as an af:selectOneChoice component). So far so good. The navigation to and from is working fine. The selectOneChoice list is being populated with the first range of returned records. Here's where I'm stuck.
    First of all I can't figure out how to kick the iterator into sending additional records after it's first range. You can scroll down to the end of the list in the selectOneChoice component but nothing happens after that. I know I can set the iterator's range to 0 to get all of the records dumped in at once, but that takes way too long. Any ideas?
    Secondly, when a selection is made, how do I access the selected data? I have set up a ValueChangeListener method in my dialog's backing bean that gets the NewValue() from the event object, but that value turns out to be the index into the collection of selectItems. How do I get the value of the data that shows in the list? Is that the label of the selectItem? If so, how do I access it? What I really want is to get the entire row of data represented by the returned index, but I'm lost as to how to do that. Any help would be much appreciated.
    At some point I want to let the salesperson type in a partial customer name and then retrieve only records matching the query's where clause. I see where I can create a bind variable on the view object, but am not sure how to pass the partial name value from the main form to the dialog. Currently I use an EL expression in the Action attribute of an af:selectInputText component to navigate to the dialog and I don't think I can pass parameters with that. I guess I would have to switch to using a method binding to a backing bean, eh? But even if I can get the partial name value to the dialog, how do I bind that value to the bind variable of the VO? (the VO that is already bound to the af:selectOneChoice component in the dialog.)
    And I am totally open to alternative suggestions for how to accomplish the original intention of all of this. Thanks for any guidance.
    Johnny Lee

    Thanks, Shay. That has gotten me a few steps further along. I modified my VO by creating a bind variable and modified the SQL to use this variable in it's where clause. I generated Java for my AppMod (which I hadn't done before, preferring to keep things simple) and created a method to supply a value to my VO's new bind variable. I need a little more hand-holding, though, to wire an input text field & button (or af:selectInputText?) to both the AppMod's new method AND the data component that will display the query results.
    "...drag the exposed method as a button onto a JSF page." That's easy enough, but I haven't yet figured out from the examples how to associate the value of an input component with the parameter of the AppMod's new method. It's getting late, I'm starting to see cross-eyed so I will sleep on this and take another look in the morning. Thanks for your help.
    Johnny Lee

  • Using arrays in a jsf page

    Hi guys,
    I'm developing an ADF application in JDev 11.1.1.6.0. I have problem about using arrays in jsp page. I have an iterator that brings me data from UCM. I just want to take every documents seperately and use in a Jquery division by division.
    Can i have chance to use an array tag in that page? Or how can i make it possible my work in a different way?
    Thank you so much,
    Erdo

    Hi Frank,
    I've already use an iterator. I just want to take datas and after close the af:iterator tag. Then i will use those datas in a different block.
    My code :
    <af:iterator var="node" value="#{nodes}" id="i1">
    <af:outputText value="#{node.propertyMap['CSGMNEWS_REGDEF:Desc'].asTextHtml}"
    id="ot1"/>
    </af:iterator>
    I want to take all informations from node.PropertyMap[] and then i will set the values of outputText with those informations. I hope I'm clear.
    Regards,
    Erdo
    Edited by: erdo on 20.Mar.2013 10:21

  • Problem using JSTL tag libraries with OC4J 9.0.3

    Hi
    I'm using the JSTL tag libraries with OC4J 9.0.3. I'm using JDeveloper10.1.2. I put the fmt.tld and c.tld in the WEB-INF directory and I'm adding the jstl.jar and standard.jar library to the EAR file. Both tlds have:
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    And OC4J 9.0.3 is compatible with tlib version 1.0 and jsp version 1.2. When I run the web app I get:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    Any ideas?

    Hi
    Thanks for the reply.
    I tried it and I get the same error:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.

Maybe you are looking for

  • Time Stamp

    I am trying to add Time stamp along with the date. But using the TO_CHAR function getting error as Invalid Number. Please help me to sort out this problem. The query for which I am facing this issue is. SELECT A.NAME ,A.ounum ,A.divi,A.lastupd FROM t

  • BPM - track and send message based on input message

    Hi All, I have simple bpm to receive two files, merge and create output file. Start -- Receive1 -- Receive2 -- Transformation -- Send  -- Stop. Scenario is working good as expected, now I need to build the controls.  I setup a timeout parameter for 1

  • How do you delete the app history on an ITouch?

    I dont like that I have all the purchase history on the app store. Can I delete it?

  • PS Elements 9-log file?

    I installed a copy of Photoshop Elements 9 from a disk onto my Vista 64 operating system computer.  I later removed it to see if it was conflicting with my new Epson Perfection V500 photo scanner that I could not get to work.  I installed the PS Elem

  • Error message trying to sync Bold 9700 with Desktop software 6.0

    Hi all, I received error message 0x80043ade when trying to sync my Bold 9700 with my Acer Aspire 6920, running Windows Vista and the latest Java 6.20. Anybody out there had the same problem. The desktop software recognised my Blaxkberry and ran a dat