Tag Library to display CachedRowSet contents?

i am not a strong proponent of OR mapping. I think relational data should be treated as just data. Too much hard work to map data to objects.
Is there a tag library that I can use to iterate through the contents of a CachedRowSet?
I want to be able to iterate through it using a tag such as
<c:forEach var="row" items="${rowset.rows}">
<tr>
<c:forEach var="column" items="${row}">
<td><c:out value="${column.value}"/></td>
</c:forEach>
</tr>
</c:forEach>

i am not a strong proponent of OR mapping. I think relational data should be treated as just data. Too much hard work to map data to objects.
Is there a tag library that I can use to iterate through the contents of a CachedRowSet?
I want to be able to iterate through it using a tag such as
<c:forEach var="row" items="${rowset.rows}">
<tr>
<c:forEach var="column" items="${row}">
<td><c:out value="${column.value}"/></td>
</c:forEach>
</tr>
</c:forEach>

Similar Messages

  • Logging issue with rssutils.tld Tag Library

    I'm using the rssutils.tld tag library to display three RSS feeds on my application's JSP homepage. It works very very well and I'm quite happy with the results (I'm running on a Tomcat 5.5.7 server). I implemented the solution following the examples in the tutorial at http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities
    The only problem I'm having though is in my Tomcat logs. Whenever a user loads my home page, a ton of tags are written to my tomcat stdout log:
    <rss>
    <channel>
    <title>
    </title>
    <link>
    </link>
    <description>
    </description>
    <language>
    </language>
    <copyright>
    </copyright>
    and so on for several hundred lines. This not only fills up my logs very very quickly, I'm worried about performance. Has anyone run into this problem and, if so, have a suggestion on how to have the tag library only log errors instead of every tag it processes? Thanks in advance.

    There are 2 System.out's in com/sun/cnpi/rss/handlers/DocumentHandler.class For test purposes I commented these out and it resolved the issue. I think the license allows modifications and redistribution as long as the copyright notice is included but I am no expert on legal stuff. If someone can assist me with this I would be happy to provide the modified package.

  • How to Edit Dreamweaver tag library

    I am using JSP for Web Development and Dreamweaver CS4
    In JSP, include tag which can be written in following ways,
    <jsp:include   page="incudeFile.jsp" /> (Supported in Dreamweaver Tag Library, hence show the content of included Jsp in calling JSP in DESIGN   View)
    But  If I want to send some parameters to the file then I can write in following way                       
    <jsp:include     page="incudeFile.jsp" >
                             <jsp:param name="userId"      value="101" />    
       </jsp:include>
    (But this way of writing is not supported and hence cant see the whole page (with included JSP) in design view .)
    I there any work around to it
    Please discuss
    Thanks
    Venkat

    Venkat,
    Actually, the visual representation is Design View is controlled by Translators, not the Tag Libraries. Take a look at these files:
      configuration/ServerBehaviors/JSP/include_*.edml
    The define the searchPatterns in RegExp format that recognize the include files on your page.
    Hope this helps,
    Randy

  • I have to keep going back to utilities first aid and do a disck permission repair because my monitor keeps going to sleep. this is  the message i get.Permissions differ on "System/Library/PreferencePanes/.Displays/V1/Displays.prefPane/Contents/Resourc es/

    I have to keep going to disk repair to correct an issue that makes my monitor go to sleep the message i get is
    Permissions differ on “System/Library/PreferencePanes/.Displays/V1/Displays.prefPane/Contents/Resourc es/pt.lproj/DisplaysPref.nib”; should be -rw-r--r-- ; they are -rwxr-xr-x .

    Have you done a PRAM reset, CMD+Option+p+r...
    http://support.apple.com/kb/HT1379
    In fact, do 3 in a row, takes a bit of time.
    Intel-based Macs: Resetting the System Management Controller (SMC)...
    http://support.apple.com/kb/HT3964

  • Using Display tag library - sorting and Paging

    I have generated a grid using this tag library which has number of in built features. Out of which on is grid sorting and pagination. But this sorts the grid in one page only, not complete grid. Does any one have solution for this? I am trying to get the source code which does this. If any one has solution then please help me..
    Thanks!

    In this case you have to do external sorting insted of defalutsorting provided by dispaly Tag Library. find sample code for External Sorting.
    Follow the Steps:
    <display:table name="testList" {color:#ff0000}sort="external"{color} defaultsort="1" id="empTable">
    <display:column property="id" title="ID" sortable="true" {color:#ff0000}sortName="id"{color} />
    <display:column property="firstName" sortable="true" title="First Name" />
    <display:column property="lastName" sortable="true" title="Last Name" />
    <display:column property="address" sortable="true" title="Email Address"/>
    </display:table>
    To determine the request parameter name for column(like ID) sorting you can do :
    String studenid = request.getParameter((new ParamEncoder("empTable")).encodeParameterName(TableTagParameters.PARAMETER_SORT))
    fire a query in DAO Class using request parameter to get sorted list and map a resultset to table.
    Thanks,
    thagelapally
    Edited by: Thagelapally on Jul 22, 2009 4:29 AM
    Edited by: Thagelapally on Jul 22, 2009 4:32 AM

  • How to display link content on the the same sharepoint page on click event

    "How to display link content on the the same sharepoint page on click event"
    Detail:
    we are using a document library where all html files are stored/uploaded.  we would like to display/open the html file on the same sharepoint page where all the files are listed.
    Thanks.

    Use jQuery and set the target to self to the anchor tag
    Regards,
    Sairam Avacorp Technologies

  • Tag Library Error

    I am using Jdeveloper and BEA Weblogic 8.1 application server environment.
    I have custom tag and tld file for the tag. When I try to compile it , I am getting this error which just points to the begininng of the jsp file which uses the tag.
    Error: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
    I've tried searching online and found that it may be caused by the the wrong jar reference in classpath. I've tried adding whole bunch of different versions of servlet.jar to my classpath in the project properties but I am still getting the same error.
    Please advice
    Mikhail

    I've tried putting weblogic.jar into the web-inf/lib folder and also added library reference in the project properties but that did not fixed it.
    I still receive this error in all jsp files where I have a tag:
    Error: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
    Here's the content of my simple tld file:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <!-- a tag library descriptor -->
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.1</jsp-version>
    <short-name>Bima Tags</short-name>
    <description>Application tag library for the BIMA Application</description>
    <tag>
    <name>navbar</name>
    <tag-class>com.arrownacp.bima.tags.NavBarTag</tag-class>
    <body-content>empty</body-content>
    <description>Display the Navigation Bar</description>
    <attribute>
    <name>pageName</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    <type>java.lang.String</type>
    </attribute>
    </tag>
    </taglib>
    This is how I refer to it in my jsp file:
    <%@ taglib uri="WEB-INF/BimaTags.tld" prefix="es" %>
    and in the page body:
    <es:navbar pageName="addUser" />
    Need an urgent help, thanks
    Mikhail

  • How to use the JRun Custom tag library wiith Weblogic 5.1?

    Hello,
    is it possible to use the JRUN Tag Library with Bea Weblogic 5.1? We
    got an error message like:
    weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
    'jrun': T
    here is no setter method for property 'code', for Tag class
    'allaire.taglib.Serv
    letTag'
    Thank you for any info!
    Stefan

    Hi Joe,
    I don't know, however someone that follows the JSP newsgroup [1] may be
    able to help. Could you try your post there.
    Thanks,
    Bruce
    [1]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.jsp
    Joe Kamenar wrote:
    >
    I have a question. I need to do a sort on news articles in our database, sorting
    by the date they were posted. I then want to take only the top 6 articles. We
    are using Weblogic 5.1. When I use the following statement, 6 articles are taken
    from the database, then sorted, which ends up leaving out the most recent articles:
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document" query="<%=contentQuery%>"
    sortby = "creationDate DESC, headlineDate DESC" max="6" id="contentList" />
    I need to get ALL the articles for the sort, then just take the most recent 6.
    So, I know that I can use the following code and monitor the counter variable,
    "i". But, how do i do this to only display the top 6 items?
    <es:foreachinarray id="content" array="contentList" type="com.beasys.commerce.axiom.content.Content"
    counterId="i">
    <% myStr=content.getIdentifier(); %>
    <% if (i<6) {
    %>
    <div class="marginText">
    <cm:printproperty id="content" name="title" encode="html" />  
    <a href="<%=new String(news_display.jsp?id="+myStr)%">">more</a>
    </div>
    <% } %>
    </es:foreachinarray>
    However, when I run this, no results show up. What is the correct way to do this?
    - Joe</a>

  • How to use the JRun Custom tag library with Weblogic 5.1?

    Hello,
              is it possible to use the JRUN Tag Library with Bea Weblogic 5.1? We
              got an error message like:
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
              'jrun': T
              here is no setter method for property 'code', for Tag class
              'allaire.taglib.Serv
              letTag'
              Thank you for any info!
              Stefan
              

    Hi Joe,
    I don't know, however someone that follows the JSP newsgroup [1] may be
    able to help. Could you try your post there.
    Thanks,
    Bruce
    [1]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.jsp
    Joe Kamenar wrote:
    >
    I have a question. I need to do a sort on news articles in our database, sorting
    by the date they were posted. I then want to take only the top 6 articles. We
    are using Weblogic 5.1. When I use the following statement, 6 articles are taken
    from the database, then sorted, which ends up leaving out the most recent articles:
    <cm:select contentHome="com.beasys.commerce.axiom.document.Document" query="<%=contentQuery%>"
    sortby = "creationDate DESC, headlineDate DESC" max="6" id="contentList" />
    I need to get ALL the articles for the sort, then just take the most recent 6.
    So, I know that I can use the following code and monitor the counter variable,
    "i". But, how do i do this to only display the top 6 items?
    <es:foreachinarray id="content" array="contentList" type="com.beasys.commerce.axiom.content.Content"
    counterId="i">
    <% myStr=content.getIdentifier(); %>
    <% if (i<6) {
    %>
    <div class="marginText">
    <cm:printproperty id="content" name="title" encode="html" />  
    <a href="<%=new String(news_display.jsp?id="+myStr)%">">more</a>
    </div>
    <% } %>
    </es:foreachinarray>
    However, when I run this, no results show up. What is the correct way to do this?
    - Joe</a>

  • Need help on Flex JSP tag library

    I am new to Flex and currently developing portlets where I
    need to integrate Flex into JSP pages. According to various
    documents from Adobe and other online discussions, this can be done
    with Flex JSP tag library. It appears that the taglib used to be a
    separate package that you could download but no longer available (I
    was only able to find a few broken links). Instead, the library is
    now part of the LiveCycle DS product according to Adobe. However, I
    have downloaded LiveCycle DS and couldn't find the necessary taglib
    in the package. Your help will be highly appreciated.

    I'm trying to do the same thing you are. Its mentioned that
    the library is part of LifeCycle DS but I couldn't find it in there
    either.
    Here's a site I found where you can download
    FlexModule_j2ee.zip It includes some instructions too.
    http://opensource.adobe.com/wiki/display/flexsdk/Downloads
    Here are some other links which may be helpful.
    http://livedocs.adobe.com/flex/3/html/help.html?content=apache_2.html
    http://labs.adobe.com/wiki/index.php/LiveCycle_Data_Services:Setting_up_an_SDK,_Compilers, _and_Flex_Builder
    http://download.macromedia.com/pub/labs/flex_mod_apache/flex_mod_apache.pdf

  • Connection Pooling and JSP Custom Tag Library - is code (inside) the best way/correc?

    Hi, can anyone advise as to whether my tag library code (based
    on Apache Jakarta Project) will actually achieve connection
    pooling functionality across my entire JSP based application? I
    am slightly concerned that my OracleConnectionCacheImpl object
    may exist multiple times, hence rendering my conection pooling
    attempt useless.
    package com.solved.tag.dbtags.connection;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    import javax.servlet.jsp.JspTagException;
    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import oracle.jdbc.pool.OracleConnectionCacheImpl;
    * <p>JSP tag connection, used to get a
    * java.sql.Connection object.</p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>connection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.ConnectionTag&lt;/t
    agclass>
    * &lt;bodycontent>JSP&lt;/bodycontent>
    &lt;teiclass>com.solved.tag.dbtags.connection.ConnectionTEI&lt;/t
    eiclass>
    * &lt;info>Opens a connection based on a jndiName.&lt;/info>
    * &lt;attribute>
    * &lt;name>id&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    public class ConnectionTag extends TagSupport {
    static private OracleConnectionCacheImpl cache = null;
    public int doStartTag() throws JspTagException {
    try {
    Connection conn = null;
    if (cache == null) {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup
    ("jdbc/pool/OracleCache");
    cache = (OracleConnectionCacheImpl)ds;
    catch (NamingException ne) {
    throw new JspTagException(ne.toString());
    conn = cache.getConnection();
    pageContext.setAttribute(getId(),conn);
    catch (SQLException e) {
    throw new JspTagException(e.toString());
    return EVAL_BODY_INCLUDE;
    package com.solved.tag.dbtags.connection;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    * <p>JSP tag closeconnection, used to close the
    * specified java.sql.Connection.<p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>closeConnection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.CloseConnectionTag&
    lt;/tagclass>
    * &lt;bodycontent>empty&lt;/bodycontent>
    * &lt;info>Close the specified connection. The "conn"
    attribute is the name of a
    * connection object in the page context.&lt;/info>
    * &lt;attribute>
    * &lt;name>conn&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    * @see ConnectionTag
    public class CloseConnectionTag extends TagSupport {
    private String _connId = null;
    * The "conn" attribute is the name of a
    * page context object containing a
    * java.sql.Connection.
    * @param connectionId
    * attribute name of the java.sql.Connection to
    close.
    * @see ConnectionTag
    public void setConn(String connectionId) {
    _connId = connectionId;
    public int doStartTag() {
    try {
    Connection conn = (Connection)pageContext.getAttribute
    (_connId);
    conn.close();
    } catch (SQLException e) {
    // failing to close a connection is not fatal
    e.printStackTrace();
    return EVAL_BODY_INCLUDE;
    public void release() {
    _connId = null;
    package com.solved.tag.dbtags.connection;
    import javax.servlet.jsp.tagext.TagData;
    import javax.servlet.jsp.tagext.TagExtraInfo;
    import javax.servlet.jsp.tagext.VariableInfo;
    * TagExtraInfo for the connection tag. This
    * TagExtraInfo specifies that the ConnectionTag
    * assigns a java.sql.Connection object to the
    * "id" attribute at the end tag.
    * @author Matt Shannon
    * @see ConnectionTag
    public class ConnectionTEI extends TagExtraInfo {
    public final VariableInfo[] getVariableInfo(TagData data)
    return new VariableInfo[]
    new VariableInfo(
    data.getAttributeString("id"),
    "java.sql.Connection",
    true,
    VariableInfo.AT_END
    data-sources.xml:
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "Orion data-
    sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    name="jdbc/pool/OracleCache"
    location="jdbc/pool/OracleCache"
    url="jdbc:oracle:thin:@oracle1:1521:pdev"
    >
    <property name="maxLimit" value="15" />
    <property name="cacheScheme" value="2" />
    <property name="user" value="console" />
    <property name="password" value="console" />
    <description>
    This DataSource is using an Oracle-native DataSource Class so as
    to allow Oracle Specific extensions.
    A getConnection() call on this DataSource will return
    oracle.jdbc.driver.OracleConnection.
    The connection returned is a logical connection.
    The caching scheme in place is Fixed Wait. Refer below to
    possible values.
    Dynamic 1
    Fixed Wait 2
    Fixed Return Null 3
    </description>
    </data-source>
    </data-sources>
    many thanks,
    Matt.

    Hi. Show me your pool definition.
    Joe
    Ramamurthy wrote:
    I am using the jsp custom tag library from BEA called sqltags.tld which came with Weblogic 5.1. Currently I am using Weblogic6.1 sp2 on Solaris.
    I have created a Connection Pool for Sybase database using the driver com.sybase.jdbc.SybDriver.
    When I created jsp page to connect to the connection pool using sqltags custom tag library, I am getting the error
    "javax.servlet.jsp.JspException: Failed to write body content
    at weblogic.taglib.sql.ConnectionTag.doAfterBody(ConnectionTag.java:43)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:1014)"
    After this message, whenever I try to access the same jsp page I am getting the message
    "javax.servlet.jsp.JspException: Failed to load JDBC driver: weblogic.jdbc.pool.D
    river
    at weblogic.taglib.sql.ConnectionTag.doStartTag(ConnectionTag.java:34)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:205)".
    Can you please help me the reason why this problem is happening and how to fix this ?
    This problem doexn't happen consistently. This occurs once in a while.
    I tried to increase Login delay Seconds parameter in the Connection Pool to 15 sec. It didn't help me much.
    Thanks for your help !!!
    Ram

  • How to force Portal not to display item content for a custom item

    Hi,
    I've read in several places questions about rendering an Item in a custom way, without letting portal
    display the item content, if you read along I've discovered a SIMPLE WAY to force portal not to
    display the content item.
    As per bugs and requests on metalink it seemed that in many versions of Oracle Portal (mine is 9.0.4.1)
    this is impossible, since even if we remove the "Item Content" from the list of displayed attributes in the
    region, Portal does display it anyway, just after every other Attribute.
    - Re: using an item type procedure
    - Metalink BUG # 3998251 "ENH: SHOULD BE ABLE TO HIDE "ITEM CONTENT" FOR TEXT ITEMS OR NEED A NEW ITEM TYP" and is being looked into internally whether it is feasible to include this in future releases.
    - Metalink Doc ID:      Note:290534.1          Subject:      Unable to Hide the "Item Content" Attribute for a Text Item     
    Mine scenario was the usual one:
    -oracle portal 9.4.0.1
    -a custom item based on custom text (so as to have the RTE to edit HTML).
    -A few attributes that help me define the class of an enclosing DIV tag that I wanted to put (a class and an ID)
    -A plsql call associated to the custom item, with the flag "display inline" checked
    -The dirty HTML generated by the built-in Oracle RTE (with BODY and HTML tags enclosing the actual HTML)
    -The region that will contain the item is set so that just the "Function Call" is (or should be) displayed
    I wanted to control entirely the display of the item text, while enclosing it in a custom DIV tag.
    After a few tries, one of which involved forcing an HTML comment around the item content that Portal stubbornly
    displayed, I've discovered this simple way. I don't know hom much this way is portable, but is done entirely with the APIs.
    In the stored procedure that displays the item, that I encolose, i just do:
    1) retrieved the ITEM querying WWSBR_ALL_ITEMS;
    2) updated the ITEM via WWSBR_API.MODIFY_ITEM, passing as display_otpion the value WWSBR_API.FULL_SCREEN!!
    Here I try a little explanation:
    An item just created has FULLSCREEN=1 and INPLACE=0. This way the stored procedure is executed
    AND the item content is displayed.
    WIth the modify_item, the item gets FULLSCREEN=1 and INPLACE=2 !! This seems strange since the docs
    tells that inplace can be 0 or 1. But this works.
    I've played with the WWV_THINGS table directlry, and setting INPLACE to 0, 2 or 3 works as well, while
    if it is set to 1, it behave the usual way.
    The trick is to have FULLSCREEN to 1 while INPLACE is not set to 1.. and this was the easiest solution.
    I'd like to receive a feedback from Oracle regarding this behaviour.
    Bye
    Walter
    --- This is the procedure ---
    CREATE OR REPLACE PROCEDURE show_item_mod(itemid in varchar2, styleid in varchar2,
         styleclass in varchar2) IS
    html CLOB;
    idx1 number;
    idx2 number := 0;
    item portal.wwsbr_all_items%rowtype;
    BEGIN
         --retrieve item content
         select * into item from portal.wwsbr_all_items where id=itemid;
         html := item.text;
         --check if text body contains "dirty" tags as put by Oracle RTE editor
         --and strips text from <BODY> to </BODY>
         idx1 := instr(html,'<BODY>');
         if(idx1 > 0) then
                   --strip text of broken tags
                   idx2 := instr(html,'</BODY>');
                   html := substr(html,idx1+6,idx2-idx1-6);
         end if;
         --check if this is first time we enter this procedure
         --or if text has changed
         if(item.description is null or idx2 != 0) then
                   --update filename so next time we won't enter the IF branch
                   --update DIPLSAY OPTION to FUllSCREEN
                   --update text, if this was changed
                   idx1 := portal.wwsbr_api.modify_item(
                        p_master_item_id => item.masterid,
    p_item_id => itemid,
    p_caid => item.caid,
    p_folder_id => item.folder_id,
    p_display_name => item.display_name,
    p_region_id => item.folder_region_id,
    p_display_option => portal.WWSBR_API.FULL_SCREEN,
    p_category_id => item.category_id,
    p_category_caid => item.category_caid,
    p_author => item.author,
    --p_description => item.description  ,
    p_keywords => item.keywords ,
    p_text => html ,
    p_folderlink_id => item.folder_link_id ,
    p_folderlink_caid => item.folder_link_caid ,
    p_publish_date => item.publish_date ,
    p_expire_mode => item.expiremode,
    --p_file_filename => 'Changed!',
                        p_description=> 'changed!',
    p_addnewversion => FALSE,
    p_access_level => portal.wwsbr_api.FOLDER_ACCESS
                   -- process cache invalidation messages
              portal.wwpro_api_invalidation.execute_cache_invalidation;
              end if;
         htp.prn('<div ');
         if(styleclass is not null) then
                   htp.prn(' class="' || styleclass || '" ');
         end if;
         if(styleid is not null) then
                   htp.prn(' id="' || styleid || '" ');
         end if;
         htp.prn('>');
         htp.p(html);
         htp.p('</div>');
    END show_item_mod;
    /

    Hi,
    I've read in several places questions about rendering an Item in a custom way, without letting portal
    display the item content, if you read along I've discovered a SIMPLE WAY to force portal not to
    display the content item.
    As per bugs and requests on metalink it seemed that in many versions of Oracle Portal (mine is 9.0.4.1)
    this is impossible, since even if we remove the "Item Content" from the list of displayed attributes in the
    region, Portal does display it anyway, just after every other Attribute.
    - Re: using an item type procedure
    - Metalink BUG # 3998251 "ENH: SHOULD BE ABLE TO HIDE "ITEM CONTENT" FOR TEXT ITEMS OR NEED A NEW ITEM TYP" and is being looked into internally whether it is feasible to include this in future releases.
    - Metalink Doc ID:      Note:290534.1          Subject:      Unable to Hide the "Item Content" Attribute for a Text Item     
    Mine scenario was the usual one:
    -oracle portal 9.4.0.1
    -a custom item based on custom text (so as to have the RTE to edit HTML).
    -A few attributes that help me define the class of an enclosing DIV tag that I wanted to put (a class and an ID)
    -A plsql call associated to the custom item, with the flag "display inline" checked
    -The dirty HTML generated by the built-in Oracle RTE (with BODY and HTML tags enclosing the actual HTML)
    -The region that will contain the item is set so that just the "Function Call" is (or should be) displayed
    I wanted to control entirely the display of the item text, while enclosing it in a custom DIV tag.
    After a few tries, one of which involved forcing an HTML comment around the item content that Portal stubbornly
    displayed, I've discovered this simple way. I don't know hom much this way is portable, but is done entirely with the APIs.
    In the stored procedure that displays the item, that I encolose, i just do:
    1) retrieved the ITEM querying WWSBR_ALL_ITEMS;
    2) updated the ITEM via WWSBR_API.MODIFY_ITEM, passing as display_otpion the value WWSBR_API.FULL_SCREEN!!
    Here I try a little explanation:
    An item just created has FULLSCREEN=1 and INPLACE=0. This way the stored procedure is executed
    AND the item content is displayed.
    WIth the modify_item, the item gets FULLSCREEN=1 and INPLACE=2 !! This seems strange since the docs
    tells that inplace can be 0 or 1. But this works.
    I've played with the WWV_THINGS table directlry, and setting INPLACE to 0, 2 or 3 works as well, while
    if it is set to 1, it behave the usual way.
    The trick is to have FULLSCREEN to 1 while INPLACE is not set to 1.. and this was the easiest solution.
    I'd like to receive a feedback from Oracle regarding this behaviour.
    Bye
    Walter
    --- This is the procedure ---
    CREATE OR REPLACE PROCEDURE show_item_mod(itemid in varchar2, styleid in varchar2,
         styleclass in varchar2) IS
    html CLOB;
    idx1 number;
    idx2 number := 0;
    item portal.wwsbr_all_items%rowtype;
    BEGIN
         --retrieve item content
         select * into item from portal.wwsbr_all_items where id=itemid;
         html := item.text;
         --check if text body contains "dirty" tags as put by Oracle RTE editor
         --and strips text from <BODY> to </BODY>
         idx1 := instr(html,'<BODY>');
         if(idx1 > 0) then
                   --strip text of broken tags
                   idx2 := instr(html,'</BODY>');
                   html := substr(html,idx1+6,idx2-idx1-6);
         end if;
         --check if this is first time we enter this procedure
         --or if text has changed
         if(item.description is null or idx2 != 0) then
                   --update filename so next time we won't enter the IF branch
                   --update DIPLSAY OPTION to FUllSCREEN
                   --update text, if this was changed
                   idx1 := portal.wwsbr_api.modify_item(
                        p_master_item_id => item.masterid,
    p_item_id => itemid,
    p_caid => item.caid,
    p_folder_id => item.folder_id,
    p_display_name => item.display_name,
    p_region_id => item.folder_region_id,
    p_display_option => portal.WWSBR_API.FULL_SCREEN,
    p_category_id => item.category_id,
    p_category_caid => item.category_caid,
    p_author => item.author,
    --p_description => item.description  ,
    p_keywords => item.keywords ,
    p_text => html ,
    p_folderlink_id => item.folder_link_id ,
    p_folderlink_caid => item.folder_link_caid ,
    p_publish_date => item.publish_date ,
    p_expire_mode => item.expiremode,
    --p_file_filename => 'Changed!',
                        p_description=> 'changed!',
    p_addnewversion => FALSE,
    p_access_level => portal.wwsbr_api.FOLDER_ACCESS
                   -- process cache invalidation messages
              portal.wwpro_api_invalidation.execute_cache_invalidation;
              end if;
         htp.prn('<div ');
         if(styleclass is not null) then
                   htp.prn(' class="' || styleclass || '" ');
         end if;
         if(styleid is not null) then
                   htp.prn(' id="' || styleid || '" ');
         end if;
         htp.prn('>');
         htp.p(html);
         htp.p('</div>');
    END show_item_mod;
    /

  • Best way to call EJB - Servlet or Tag Library

    Hi,
    What is the best way to call an EJB from a JSP? We are using Weblogic 7.0(moving to 8.1 beta). WE have a form on a JSP that needs to get data from an EJB. Our flow goes from JSP --> Controller servlet or tag library -->EJB "Bean" Controller ---> EJB. The specfic EJB we need to populate drop downs and fields will be called by a bean controller. Is it better to call the bean controller using a tag library in the jsp or go to the controller servlet to get the data? If servlet is the answer, where do I lookup the EJB Home and call the create from within the servlet? Any help would be greatly appreciated!!
    Thanks!

    IMO, if you are following some design patterns, like the MVC framework, the best thing is to populate the model(entities that contain the business data) and call the respective getXX methods from the model on the JSP page. The reason for doing so is to keep JSP pages away from any other work other than to just display the business data contained in the respective business entities.
    The model can be populated in the servlet and either set in the request or session attribute as per the requirement.
    The EJB can be looked up in the servlet as and when required. I would suggest to make use of the Service Locator Pattern to do a look up for the EJB Remote Interface and accordingly make the business calls.
    Hopefully this answers some of your questions.

  • Display request contents in JSP page

    i need to display the contents in a request in my JSP.
    meaning:
    i have a hashmap (containing string and a list) coming from the EJB tier to struts action in an event response object, I'm sure that the request has these values. cuz i tested it in struts action using the following code:
    HashMap result = (HashMap)((EventResponseSupport)request.getAttribute(WebKeys.EVENT_RESPONSE)).getPayload();
    System.out.println("Sponsor name = " + result.get("sponsor"));I am able to print it in the console but i need to know how to display it in the jsp. i tried many things but i can't get it right.
    first i need to display the string and then i need to iterate through the list to display its contents in a table.
    any help would be appreciated.

    Kindly use JSP Scriplet to load the HashMap into the Page Context.
    Then you can use the Struts iterate tags to paint the contents of the HashMap

  • Display blob content as pdf file

    Dear Expert,
    Currently i'm using oracle apex 3.0.1.
    I'm having a problem on displaying blob content (from database table) as pdf file on oracle application express but i'm able to save to download the pdf.
    Below is the procedure that i used to display blob content,
    PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    begin
    selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
    into lob_loc,l_length
    from ord_img
    where oi_tno= pv_image
    and oi_ti='PDF'
    and oi_idx=pv_index;
    exception
    when others then
    null;
    end;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END lf_html_pdf;
    I get the error message as below when i execute the procedure above;
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    *06502. 00000 - "PL/SQL: numeric or value error%s"*
    I'm appreciated if expert can have me on the problem above?
    Thanks
    From junior

    *Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
      PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
         l_mime        VARCHAR2 (255);
         l_length      NUMBER;
         l_file_name   VARCHAR2 (2000);
         lob_loc       BLOB;
      BEGIN
          begin
            selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
            into lob_loc,l_length
            from ord_img
            where  oi_tno= pv_image
              and oi_ti='PDF'
              and oi_idx=pv_index;
          exception
                when others then
                null;
            end;
         OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
         HTP.p ('Content-length: ' || l_length);
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file (lob_loc);
      END lf_html_pdf; Start by getting rid of:
          exception
                when others then
                null;and never using it anywhere ever again.
    If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
    >
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    06502. 00000 - "PL/SQL: numeric or value error%s"
    >
    The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
    I get the error message as below when i execute the procedure above;How do you execute it?
    What happens when it's executed without the <tt>when others...</tt> built-in bug?

Maybe you are looking for

  • Can I BAM with NW BPM?

    Hi community. I was trying to answer the question: how does the NW BPM platform feature BAM (business active monitoring) and could not find any direct answer. I have read on PI capabilities of creating monitoring process that are fed by event message

  • ITune 11.0.2

    I am running iTunes 11.0.2 on a Mac Mini. I have a wired network which inlcudes an new Apple TV, a new home cinema amp with Airplay and 4 old airport express units running airport 6.3. The airport express are all set to enable Airplay and are connect

  • Latest Bootcamp drivers (June 2010) comatible with Windows XP 54 Bit?

    Hi I am planning on updating my existing BootCamp partition to windows Xp 64 Bit edition on my MacBook Pro so it uses all my 4 gigs of RAM but I was wandering if the latest drivers would be compatible with it because in the description of the latest

  • Moving music from iPad to computer

    My mother bought an iPad2 about a month ago and downloaded all her music from her computer to the iPad2 with my help. Recently, her computer went nuts and she had to completely wipe it clean so she lost all of her iTunes music files. She asked me if

  • Aperture Flag issue

    I can't see the yellow flag symbol anymore.  Also, everytime I hover over a picture I get all the metadata.  How can I turn visual of a flag on and visual of metadata off?  Thanks