By using div or frames in jsf such as visisble and hidden

hi
i have 2 buttons in my page if i click on one i want to show one DIV or IFRAME
and on click of second button it should show second DIV of IFRAME
can some one send me code snippet or guide me how to do it as jsf is not recognising div in the jsf page.
i placed between div between verbatim tags also.
looking forward for ur help
thansk in advance

should be done with javascript
like so
function changeDisplay(elmnt)
if(document.getElementById(elmnt).style.visibility=="visible")
document.getElementById(elmnt).style.visibility="hidden";
document.getElementById(elmnt).style.display="none";
else
document.getElementById(elmnt).style.visibility="visible";
document.getElementById(elmnt).style.display="";
then have
onclick= changeDisplay(id of div)
if you dont want to use javascript
check out the rendered attribute and use panelGrids but this will require a round trip to the server

Similar Messages

  • Using Frames in JSF

    Can anyone provide an example on how to use frames inside JSF? I don't know how to define the framesets inside the jsf file. A simple example will go a long way. Thanks.

    Nope, I'm not big on samples, especially of code I've never tried to write. Give it a try, if you have a problem post your code and we'll take a look.

  • Split frame in JSF

    Hi everybody !
    I have a problem with frame when use JSF. . In html, we use tag <a> and target attribute to display wanted pages in the right frame. But in JSF, we use navigation System (XML), so how can we control it?????

    JavaServer Faces is not an HTML specific Web technology.
    I think the best approach for using JSF is NOT TO USE functionalities that is dependant on a
    particular mark-up language environment.
    <quote>
    Usual mobile devices have small size of screens, and some of them support only
    textual information. Frames strongly depend on screen interface, and are not part
    of the HTML 4.0 Strict. Therefore, frames should not be used.
    </quote>
    from: http://www.w3.org/TR/1999/NOTE-html40-mobile-19990315/

  • Is there an RI that uses div s for layout instead of table s?

    I am using Struts Tiles, DWR, script.acu.lous drag and drop and JSF.
    So, my problem is that since I have incorporated <f:verbatim>, the page is being rendered incorrectly and I don't know how to recombine it back to look like it should. The layout I am doing has a header at top, left hand column for navigation and content well in the middle. Essentially, this boils down to, in JSF, a table row with one table data element for the header and one table row with two table data elements for the nav and content. In the content well, it utlizes a JSF subview with JSF components and then below this a JSF subview with a JSF <f:verbatim>. On the pages that I don't use <f:verbatim>, the layout renders correctly. The rendering problem is that when the markup is rendered, the <f:verbatim> tag is rendered outside the <f:view> with the other JSF subview in the content rendered correctly in the layout. In other words, the whole page except the <f:verbatim> is rendered in a <table>. I understand, from an onjava article, the JSP and JSF rendering occurs in parallel and I am guessing this might be the problem. The page is rendering now with the header in the right place, the nav not behaving like it used to but in the correct place, the portion of the content that is a bunch of JSF components is located to the right of the nav. The <f:verbatim> that should be rendered directly below the JSF components on the content page and to the right of the nav is rendered under both the nav and JSF components outside the <table>.
    Is there a RI that uses divs to do layout instead of tables?
    OR
    How can I get the <f:verbatim> back into the flow of the page so everything is lined up correctly?
    Please feel free to yell at me if this is addressed in another thread. I will search for it if this is the case. I haven't had the time to do a thorough search.
    Regards,
    Dan
    sidenote: Using tables for layout is not considered good web design. There are plenty of sites that illustrate use of CSS for layout. I find this a little strange since Sun is always promoting best practices and then it doesn't embrace other industry best practices. This seems more like a MS bullying tactic, but maybe Sun and MS are one in the same.

    Cool. That is a great move. The only concern I have now is that there aren't any containers out that support JSP 2.1 and Servlet 2.5 to enable JSF 1.2 except for glassfish. I am using tomcat and not a heavy weight application server. I couldn't find a roadmap on Apache either for Tomcat to know when they will be coming out with Tomcat 6 I imagine. Is there an article or tutorials out yet that demonstrate how to markup a page with the new specification? That yould help. The more I think about using custom components, the more I lean towards using the standard.
    Thanks for the heads up. Now I have to think about setting up glassfish and migrating from tomcat unless there is other news I am unaware of =P.
    Dan

  • Help needed creating vertical bullet list using div tag and css

    Hi,
    I think there is something quite fundamental that I'm missing when using div tags - I seem to keep running into problems with them.
    I'm trying to create a vertical bullet list. It works fine when I try the code on its own as follows:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    #techlistcontainer {
        /*list-style-type: square;*/
        position: absolute;
        top: 20px;
        left: 0;
        z-index: 2;
        width: 75%;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 30;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 30;
    #techlistcontainer ul {
      margin-top: 0;
      margin-left: 0;
      padding-left: 0;
      list-style-type: none;
      font-family: Arial, Helvetica, sans-serif;
    #techlistcontainer li {
        margin-bottom: 8px;
        list-style-type: circle;
        margin-left: 50px;
        padding-right: 30px;
    -->
    </style>
    <head>
    </head>
    <body>
    <div id="techlistcontainer">
    <ul id="techlist">
              <li>Java Messaging Service (JMS)</li>
              <li>Message Driven Beans </li>
              <li>Remote Session EJBs with multi-threading</li>
              <li>Message Oriented Middleware(MOS) such as Websphere MQ series, Mercator with SAP/ERP</li>
              <li>XML messaging</li>
              <li>CORBA (Common Object Request Broker Architecture), RMI (Remote Method Invocation)</li>
        </ul>
    </div>
    </body>
    </html>
    http://www.pa-solutions.co.uk/vertical_list.html
    When I insert that into my site template page, its all over the place:
    http://www.pa-solutions.co.uk/development.html
    I've put the css code into a seperate file http://www.pa-solutions.co.uk/pas.css - I get the same results when its embedded into the html doc.
    Please help before I pull all my hair out.
    Thanks,
    Phil.

    Unless you know what you're doing with absolute positioning, avoid absolute positioning! Absolute positioning actually takes an element out of the normal HTML document flow and positions it absolutely in relationship with it's first parent with a position other than static - for details read the HTML specs at the W3C.
    Ideally you should use the normal HTML document flow. Divs are block level elements meaning that they act like blocks that take up a height (determined by children content) and width (the full width of the page or it's parent container, unless you tell it otherwise).
    For your CSS try this:
    #techlistcontainer {
        width: 75%;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 30;
        padding-top: 0;
        padding-right: 0;
        padding-bottom: 0;
        padding-left: 30;
    How does that work with your templates?

  • Loading SWF in Dreamweaver using DIV and Accordian

    Hi
    I am wanting to create a web page with a vertical navigation panel on the left of the page and because this will includes 'categories' and 'sub categories' (see below)
    CATEGORY 1
    sub category 1a
    sub category 1b
    sub category 1c
    sub category 1d
    sub category 1e
    CATEGORY 2
    sub category 2a
    sub category 2b
    sub category 2c
    sub category 2e
    Ideally I would want the Category tabs when clicked to reveal the sub categories (Accordian)
    I have the Spry Accordian set in a Div at the moment in Dreamweaver and the sub categories
    open up and function fine. What I would like to achieve is to make all those sub categories links, to insert a SWF in to the div that is located to the right of the vertical nav column. (see attachment simple diagram) So, say sub category 2a was clicked then in the 'SWF display area div', the SWF associated with that link would appear, the if 'sub category 2d' was clicked the same 'SWF area div' was populated with the SWF linked to 'sub category 2d', if 'sub category 2e' was clicked then the SWF associated with 'sub category 2e' would then load into the 'SWF area div'. The attached image may make things clearer.
    Many thanks in advance for any assistance you can give me.

    Hi
    What you are talking about is an ajax enabled page, you can use html or xml using spry, (see - http://www.adobe.com/devnet/spry/)
    Or any type of page php,asp, etc. using one of the javascript frameworks such as jQuery.
    PZ

  • How can I use a 3rd party XML parser such as xerces with OC4J ?

    Hi all tech experts,
    I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
    installed Portal and Wireless and OracleAS Infrastructure on the same
    computer.
    i tried all the solutions on this thread
    Use of Xerces Parser in out application with Oracle App Server 9.0.4
    but still fighting.
    I have also posted this query on OTN on following thread
    How can I use a 3rd party XML parser such as xerces with OC4J?
    but no reply....
    Please help me on this issue.
    Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
    i have read the following article which states that
    OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
    The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
    It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
    If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
    i have also run the following command
    java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
    but no success.
    How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
    All reply will be highly appreciated.
    Thnx in advance to all.
    Neeraj Sidhaye
    try_catch_finally @ Y !

    Hi Neeraj Sidhaye,
    I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
    Thanks for your help.
    Xingsheng Qian
    iPass Inc.
    Here is the error message I got.
    Message:
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
    Stack Trace:
    org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.initModels(Unknown Source)
         at org.chiba.xml.xforms.Container.init(Unknown Source)
         at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
         at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
         at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.init(Unknown Source)
         at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
         at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
         at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
         ... 18 more

  • Some pages use master text frame, others don't. Fix?

    It turns out in my document, some of my pages have a master text frame and others don't. Many don't. It must be the way I created the frames, accidentally creating independent frames. Is there a fool proof way not to accieentally create independent frames and is there a good way to make sure all these pages with independent frames are turned back into master text frames?
    What I can do is delete the independent frame, then link the previous frame to the inside of the master text frame (I think I used to drop the link on a ruler too often and that creates an independent frame that is in most cases indistinguishable from a master text frame). This is tedious to do for the entire document. Is there an easier way?

    It sounds like you understand what happened. Clicking the place gun cusror on any type of guide will ignore your master frames. Overriding a master text frame before placing the text and Shift-clicking in the overridden frame will also ignore the master frames on subsequent pages.
    The bes thing you can do is keep your eyse open to watch the shape of the cursor. If ID is going to use an existing frame the cursor will be surrounded by parentheses and a new frame will use a cursor with a square upper left corner. You should also develop the habit of clicking in empty areas away from guides if you are using existing frames -- you don't need to click at the top of these frames.
    It's also possible that you did everything correctly and you are working in a facing pages file and at some point added or deleted a single page somewhere other than the end. That would cause all following pages to switch sides and master objects would be reapplied behind any overridden frames.
    There is no easy way to deal with extra frames. If they are not causing a problem you may be able to simply ignore them.

  • I am using a mini display to hdmi with my macbook and the display works fine. However, the sound will only play iTunes such as music and movies but when i go online to watch movies on youtube it will not play any sound. Please help

    I am using a mini display to hdmi with my macbook and the display works fine. However, the sound will only play iTunes such as music and movies but when i go online to watch movies on youtube it will not play any sound. Please help

    HDCP maybe? Read this http://www.macnn.com/articles/08/11/26/displayport.drm.conflict/

  • In Address Book, I would like to have a field "File As". So, l can list "Joe Smith", as "The Smith Family". I will use this when I print labels for Xmas cards and such. Thanks!

    In Address Book, I would like to have a field "File As". So, l can list "Joe Smith", as "The Smith Family". I will use this when I print labels for Xmas cards and such. Thanks!

    In Address Book, I would like to have a field "File As". So, l can list "Joe Smith", as "The Smith Family". I will use this when I print labels for Xmas cards and such. Thanks!

  • Is this a bug for using DIV tag in adf page?

    I'm using the version 11.1.1.2.0. And when I write the adf page code with empty content in div tag like this :
    <div id="ex"></div>
    <othertags>123</othertags>Then the code in randered page :
    <div id="ex">
    <othertags>123</othertags>
    </div>Bug ?
    Edited by: Derek.Jaa on 2010-4-21 上午4:00

    Hi Simon
    Thanks for you help and I can't see the tag you suggested. Maybe you should make you code between tag, replace the [] with {} .                                                                                                                                                                                                                                                                                                   

  • Error while Accessing Smart Card using Open Card Frame Work

    HI
    Using Open Card Frame work I am trying to access GemAlto provided Smart Card (java card). I downloaded the Open Card Frame work from “http://www.openscdp.org/ocf/download.html”.
    I am executing a basic program to access the data stored in smart card.
    public static void main(String[] args)
                        System.out.println("reading smartcard file...");
                        try {
                        SmartCard.start();
                        CardRequest cr = (FileAccessCardService.class);
                        System.out.println("calling waitforCard");
                        SmartCard sc = SmartCard.waitForCard(cr); //Error comes after this line
                        System.out.println("After waitForCard called");
                        FileAccessCardService facs = (FileAccessCardService)
                        sc.getCardService(FileAccessCardService.class, true);
                        CardFile root = new CardFile(facs);
                        CardFile file = new CardFile(root, ":c009");
                        byte[] data = facs.read(file.getPath(), 0,
                        file.getLength() );
                        sc.close();
                        String entry = new String(data);
                        entry = entry.trim();
                        System.out.println(entry);
                        } catch (Exception e) {
                             e.printStackTrace(System.err);
                        System.exit(0);
    The content of the opencard.properties are :
              OpenCard.services = opencard.opt.util.PassThruCardServiceFactory
    OpenCard.terminals = com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory
    OpenCard.trace = opencard:5 com.ibm:4 opencard.opt.database:6
    After the line “ SmartCard sc = SmartCard.waitForCard(cr);”
    the program is expecting a card to be inserted but while inserting Smartcard the following error message come :
              calling waitforCard
              [ERROR    ] com.ibm.opencard.terminal.pcsc10.OCFPCSC1.OCFPCSC1.SCardConnect
    --- message
    --- thread Thread[Thread-0,5,main]
    --- source com.ibm.opencard.terminal.pcsc10.OCFPCSC1@2e7263
    [ERROR    ] com.ibm.opencard.terminal.pcsc10.OCFPCSC1.OCFPCSC1.SCardConnect
    --- message Protocol = 0
    --- thread Thread[Thread-0,5,main
    --- source com.ibm.opencard.terminal.pcsc10.OCFPCSC1@2e7263
    Basically the error is coming from the SCardConnect function of OCFPCSC1.cpp file.
    Please reply to my mail id if any body has any idea how to resolve this issue.
    MAIL-ID : [email protected]
    With Regards
    Swarup
    Finacle Archie
    Infosys Technologies Limited,Bhubaneswar,India

    Sounds like an issue that has to do with JavaScript Origin policy. You'll have to use Domain Relaxing for this. Read all about it here:
    http://help.sap.com/saphelp_nw04/helpdata/en/59/87b54064c2742ae10000000a155106/frameset.htm
    here:
    http://help.sap.com/saphelp_nw04/helpdata/en/5e/473d4124b08739e10000000a1550b0/frameset.htm
    and here:
    http://help.sap.com/saphelp_nw04/helpdata/en/cb/f8751d8c6b254dac189f4029c76112/frameset.htm

  • How do I back up contents of apps such as notes and office docs on my PC so that in the event of my ipad failing I can use these docs on my PC (windows op system)

    How do I back up the contents of apps such as notes and office docs on my ipad to my PC ( windows op system) so I can use them on PC if my ipad fails?

    You can use File Sharing in order to transfer the Word documents and the notes depending upon what apps you are using. Take a look at this.
    iOS: About File Sharing - Support - Apple
    There are file transfering apps like this one.
    File Manager - Folder Plus on the App Store on iTunes
    You can always email files as a last resort type of thing. That may not be practical depending upon the number of files that you have.

  • Where is Use Google Chrome Frame for IE, 6,7,8. in Adobe Edge Animate CC 2014 ?

    Hi everybody, I can't find Use Google Chrome Frame for IE, 6,7,8. in new Adobe Edge Animate CC 2014
    Please help me
    Thanks in advance

    Sorry, but Google discontinued the Google Chrome Frame service:
    https://www.google.com/chromeframe/about/
    Chromium Blog: Retiring Chrome Frame
    Regards,
    Joe

  • I want to use an external microphone for both my iPhone 5S and my MacBook Pro. This is for music and for making recordings outside such as birds. Any suggestions?

    I want to use an external microphone for both my iPhone 5S and my MacBook Pro. This is for music and for making recordings outside such as birds. Any suggestions?

    use a splitter something like this
    http://www.amazon.co.uk/3-5mm-Headphone-Splitter-Cable-iPhone-White/dp/B003W37DS E/ref=pd_sxp_grid_pt_2_1

Maybe you are looking for