JSF & XHTML/CSS

I am trying to integrate parts of a JSF app I've been making with standard HTML and CSS markup, but I'm running into serious issues. Are there a few things I need to know about how to do this properly? Few pages on the internet address the best way to go about this, though I've already read a lot of complaints about how difficult this is.
This is a simplified version of my HTML showing one button:
<%@ page contentType="text/html; charset=MacRoman" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css" media="screen">
     .button {background-color: white; width: 100%; height: 25px; cursor: pointer; font: 22px sans-serif; font-weight: bold; color: #333300;}
     .button:hover {background-color: #999966; width: 100%; height: 25px; cursor: pointer; font: 22px sans-serif; font-weight: bold; color: #666633;}
     .buttonText {position: relative; left: 30px; background-color: white; width: 300px; line-height: 25px;}
</style>
</head>
<body>
<div class="button">
     <div class="buttonText">
          Create New
     </div>
</div>
</body>
</html>I would like to have the above page in JSF and have the Create New button act as a commandlink, but with the appropriate style applied.
So far I haven't been able to achieve this.
My first question is what to do with the doctype declarations and the other elements that make this page XHTML valid. I tried removing them, but the page did not display correctly in all browsers, and so I put them back in. Is this going to cause any problems at all, or is it something I should be doing anyway? I just felt funny with a JSP page with XHTML declarations, but then again if the JSP is just going to produce markup it should have it.
My HTML page has a fair bit of markup and a small amount of JSF components.
Should I&#8230;
-start the <f:view><h:form> tags at the top and end at the bottom while enclosing all the html in <f:verbatim> tags?
-start the <f:view><h:form> at the latest possible times, enclose the HTML within that with <f:verbatim> and leave the rest of the HTML alone?
any other solutions??
Can I apply a style to an h:outputText or h:commandlink ?
thanks

I would not worry too much about making the page XHTML valid. Having doctype there only says what you consider to be valid it certainly has nothing to do with enforcement.
you should be able to include your style css and then use
<h:buttonText styleClass="buttonText"/>
thats all there is to it.

Similar Messages

  • [JSF 2.0] How to add a non-displayed comment in JSF xhtml files?

    Hello!
    I would like to know how to put a non-displayed comment in a JSF xhtml file.
    Currently, a *<!-- My comment -->* will be sent in the HTML output.
    I've tried also:
    *// My comment*
    *<%-- My comment --%>*
    and other ideas, but they are failing.
    On the web, I red an ugly solution, implying to add one parameter in each faces-config.xml files our project could have, and asking JSF not to parse some statements (if I remember well).
    Whatever, I am quite sure it was a solution for JSF 1.0 or 0.9...
    There must be a clean way to write a comment, but I just can't find it.
    How do I write a comment that is not displayed on HTML output, in a JSF xhtml file?
    Regards,
    Grunt.
    Edited by: Grunt2000 on May 10, 2010 9:23 AM

    Grunt2000 wrote:
    Hello!
    I would like to know how to put a non-displayed comment in a JSF xhtml file.
    Currently, a *<!-- My comment -->* will be sent in the HTML output.
    I've tried also:
    *// My comment*
    *<%-- My comment --%>*
    and other ideas, but they are failing.
    On the web, I red an ugly solution, implying to add one parameter in each faces-config.xml files our project could have, and asking JSF not to parse some statements (if I remember well).
    Whatever, I am quite sure it was a solution for JSF 1.0 or 0.9...
    There must be a clean way to write a comment, but I just can't find it.
    How do I write a comment that is not displayed on HTML output, in a JSF xhtml file?Does this help?
    <context-param>
        <param-name>facelets.SKIP_COMMENTS</param-name>
        <param-value>true</param-value>
    </context-param>I'm not sure if that works under JSF 2. If not, you can always use <ui:remove/>.

  • Tiles, jsf and css

    Hi,
    I use JSF with Tiles for the first time to built a web application.
    I have a problem with my stylesheet which I use for my layout and the other pieces of pages.
    When I start my application, the first page works and the look and feel uses the stylesheet. But when I call an other page, the stylesheet isn't apply. I know there is a problem with the context path ...
    For the moment, I declare my stylesheet like that :
    <link rel="stylesheet" href="/css/style.css" type="text/css">
    So, it works only the the first page.
    I tried like this, thanks to the struts html tags :
    <link rel="stylesheet" href="<html:rewrite page='/css/style.css'/>" type="text/css">
    but this time, i have an error :
    [ServletException in:/tiles/layout.jsp] org.apache.struts.taglib.html.MessagesTei'
    If someone has a solution ...
    thanks..

    Will you please explain to me how you are doing CSS layout? I am having a problem with JSF 1.1 RI as everything is in a <td>. I want to get rid of these and change the rendered markup to output <div>s unless I can alter the location of <td>s on the page. This sounds like it would break the table model, so I doubt this is possible.
    Thank you for any input,
    TacoEater

  • Styling Panel tabs in JSF with CSS

    Hello,
    I have been struggling to find a good resource that deals with the styling of <t:panelTabbedPane> and panelTabs in CSS. It would seem that using conventional tab methods might not always work correctly since JSF tabs seem to dynamically resize themselves based on the text within the, Can anyone here point me to a good resource? Thank you!

    There are tabbed panel components available. For example the Tomahawk's [t:panelTabbedPane|http://myfaces.apache.org/tomahawk/tabbedPane.html].

  • Jsf and css id selector

    Jsf uses a colon (:) for component ids, however to the best of my knowledge, that's an illegal css character. Has anyone had any luck escaping that char with a backslash or is there some other means besides using the style or styleclass attribute in your JSF page to apply styles to a jsf component?
    Thanks,
    Justin

    The first (and I am hoping worst) solution that springs to mind is using JavaScript and the DOM in an onLoad handler for the page.
    According to what I see in the CSS specification, it looks like backslash escaping should work, I take it you have tried it and it does not? There is also a Unicode escape where : should be \3A
    Another possibility would be to wrap the component in a span or div with a known id and apply rules from there.

  • Weird problems with CSS being applied to JSF pages

    I have this really weird problem with my CSS rules being applied to my JSF pages. My CSS rules don't get applied unless one of the following two things happen:
    - A page is reloaded (by redirecting to itself, or if there were validation errors)
    - The previous page in the history had the same relative reference to the same CSS file.
    If a page is newly loaded, and the previous page did not have that same CSS reference, the CSS styles will not show up. Also, if the above is true, and the page is reloaded by JSF, the CSS styles show up.
    Now, my problem could be solved if I put all JSP files in the same level, but the display of the first page would still be without the CSS style applied.
    Is this known behaviour? And if it is, does it have anything to do do with the way JSF handles URLs (always one level back)? Help and input is kindly appreciated!

    Dude,
    I tried the same
    <link rel="stylesheet" href="<h:outputText value="#{facesContext.externalContext.requestContextPath}"/pages/css/default.css" />
    and I got the following Jasper exception.... pointers plz ??
    =============================================================
    2005-08-24 14:18:55,937 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[mydemo].[FacesServlet] - Servlet.service() for servlet FacesServlet threw exception
    org.apache.jasper.JasperException: /myproj/eventCrit.jsp(8,78) Unterminated <h:outputText tag
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1049)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1793)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1060)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    =========================================================

  • Visual Web JSF web app unable to render. The theme tries to access META-INF

    Hi,
    BACKGROUND: I have created a Netbeans 6 Visual Web Project using the default Visual Web JSF Theme. My web application can be viewed properly and correctly when i deploy it on tomcat 6.
    ARCHITECTURE: Our server configuration requires IIS to be our web server and tomcat to be our app server. Both are running on different machines. I have successfully linked up IIS 6 and tomcat 6 using the JK isapi_redirector.
    PROBLEM: However, when i connect to my app via IIS, my starting page opens but the input box components on that page are not displayed and i get several javascript errors that read - 'dojo is undefined' and 'webui is undefined'.
    PROBLEM DETAILS: I found that the page being served had a lot of files being requested from a META-INF folder. I have attached a snippet here.
    <!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" xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" xmlns:waistate="http://www.w3.org/2005/07/aaa">
    <head>
    <title></title><link rel="stylesheet" type="text/css" href="/BMC/theme/com/sun/webui/jsf/suntheme4_1_1/css/css_master-all.css" /><link rel="stylesheet" type="text/css" href="/BMC/theme/com/sun/webui/jsf/suntheme4_1_1/css/ie.css" /><script type="text/javascript">var djConfig={"parseOnLoad":false,"isDebug":false}</script><script type="text/javascript" src="/BMC/theme/META-INF/json2_0/json.js"></script><script type="text/javascript" src="/BMC/theme/META-INF/prototype1_5/prototype.js"></script><script type="text/javascript" src="/BMC/theme/META-INF/com_sun_faces_ajax.js"></script><script type="text/javascript" src="/BMC/theme/META-INF/dojo1_0_1/dojo/dojo.js"></script><script type="text/javascript" src="/BMC/theme/META-INF/dojo1_0_1/dijit/dijit.js"></script><script type="text/javascript">dojo.registerModulePath("webui.suntheme", "/BMC/theme/com/sun/webui/jsf/suntheme4_1_1/javascript");</script><script type="text/javascript" src="/BMC/theme/com/sun/webui/jsf/suntheme4_1_1/javascript/webui-jsfx.js"></script><script type="text/javascript">webui.suntheme.bootstrap.init({"debug":false,"theme":{"locale":"en-US","prefix":"/BMC/theme","modulePath":"/com/sun/webui/jsf/suntheme4_1_1/javascript/theme","bundle":"suntheme","module":"webui.suntheme.theme"}});</script><link id="link1" rel="stylesheet" type="text/css" href="/BMC/resources/stylesheet.css" />I think the JK isapi_connector in IIS is preventing access to the META-INF path and the isapi_director log file says - "*+[emerg] HttpFilterProc::jk_isapi_plugin.c (1282): [BMC/theme/META-INF/json2_0/json.js] points to the web-inf or meta-inf directory. Somebody tries to hack into the site!!!+*". The same message is repeated for several more javascript files that are being served from under the META-INF path.
    Any help or advice in this matter will be greatly appreciated.
    Thanks!!!

    I managed to find a workaround. Thought i should share it with those who are faced with a similar issue.
    I found that a bug report had been placed in the past with Apache Dev. However, they had said that they would not modify their logic because the servlet container spec requires it (even though isapi_redirector is only a connector and not a container). They said that there is no way for the isapi_redirector to differentiate between /foo/WEB-INF when foo is a context and when foo is just a sub-directory of the ROOT web application. So, the general consensus was to err on the side of safety and risk blocking a few requests that are valid.
    However, this causes a serious issue for those using NetBeans JSF Visual Web Projects. Hence, I created my own flavour of isapi_redirector by modifying the code such that this check is not performed and leaving the onus of checking on Tomcat.
    For those who are interested, the simplest way to go about this would be to force the function uri_is_web_inf (in jk_isapi_plugin.c ) to always return FALSE.

  • JSF,Tiles, Sun App Server and NetBeans 5.5

    hi all,
    here is my environment :
    1.Server - Sun Application Server (Running On Suse Linux OS)
    2.IDE - NetBeans 5.5
    3.Project - JSF with Tiles
    here i found topic about tiles and jsf :
    http://forum.java.sun.com/thread.jspa?threadID=643536&messageID=3792238 but i think that Tiles is best alternative for JSF Layout Manager (It's my mind).
    is there anybody help me how to integrate tiles with jsf ?
    here is my example :
    1.web.xml :
        <servlet>
            <servlet-name>Tiles Servlet</servlet-name>
            <servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
            <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-def.xml</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
        </servlet>2. tiles-def.xml :
    <tiles-definitions>
             <!--****************************************************************-->
         <!--                     Global Layout                       -->
         <!--****************************************************************-->
         <definition name="global.layout" path="/pages/Mylayout/layout.jsp">
              <put name="title" value="Magti Billing System" type="string"></put>
                    <put name="subtitle" value="Magti Billing System" type="string"></put>
                    <put name="header" value="/pages/Mylayout/header.jsp"></put>
              <put name="subheader" value="/pages/Mylayout/sub_header.jsp"></put>          
              <put name="footer" value="/pages/Mylayout/footer.jsp"></put>
                    <put name="body" value="/pages/Mylayout/body.jsp"></put>
                    <put name="left_menu" value="/pages/Mylayout/left_menu.jsp"></put>
         </definition>   
    </tiles-definitions>3.and then i have 5 blank jsp pages : body.jps, footer.jsp, header.jsp, layout.jsp, left_menu.jsp, sub_header.jsp.
    4. here is my layout.jsp code :
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:jsp="http://java.sun.com/JSP/Page"
              xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
              xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
    >
        <tiles:importAttribute scope="request"></tiles:importAttribute>
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <webuijsf:page binding="#{pages$Mylayout$layout.page1}" id="page1">
                <webuijsf:html binding="#{pages$Mylayout$layout.html1}" id="html1">
                    <webuijsf:head binding="#{pages$Mylayout$layout.head1}" id="head1">
                        <webuijsf:link binding="#{pages$Mylayout$layout.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </webuijsf:head>
                    <webuijsf:body binding="#{pages$Mylayout$layout.body1}" id="body1" style="-rave-layout: grid">
                        <webuijsf:form binding="#{pages$Mylayout$layout.form1}" id="form1">
                            <h:panelGrid columns="2" cellspacing="0" cellpadding="0"
                                         border="0" styleClass="maingrid" columnClasses="maingrid">
                                <f:facet name="header">
                                    <f:subview id="header">
                                        <h:panelGrid columns="1" cellpadding="0" cellspacing="0">
                                            <tiles:insert attribute="header" flush="false" />
                                            <tiles:insert attribute="subheader" flush="false" />
                                        </h:panelGrid>
                                    </f:subview>
                                </f:facet>
                                <f:subview id="left_menu">
                                    <tiles:insert attribute="left_menu" flush="false" />
                                </f:subview>
                                <f:subview id="body">
                                    <tiles:insert attribute="body" flush="false" />
                                </f:subview>
                                <!--
                                <f:facet name="footer">
                                    <f:subview id="footer">
                                        <tiles:insert attribute="footer" flush="false" />
                                    </f:subview>
                                </f:facet>
                                -->
                            </h:panelGrid>
                        </webuijsf:form>
                    </webuijsf:body>
                </webuijsf:html>
            </webuijsf:page>
        </f:view>
    </jsp:root>5. and at last i have index.jsp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
    >
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <webuijsf:page binding="#{pages$main$index.page1}" id="page1">
                <webuijsf:html binding="#{pages$main$index.html1}" id="html1">
                    <webuijsf:head binding="#{pages$main$index.head1}" id="head1">
                        <webuijsf:link binding="#{pages$main$index.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </webuijsf:head>
                    <webuijsf:body binding="#{pages$main$index.body1}" id="body1" style="-rave-layout: grid">
                        <webuijsf:form binding="#{pages$main$index.form1}" id="form1">
                            <tiles:insert definition="global.layout" flush="false"/>
                        </webuijsf:form>
                    </webuijsf:body>
                </webuijsf:html>
            </webuijsf:page>
        </f:view>
    </jsp:root>but i get an error like this :
    Can't leverage base class
    java.lang.IllegalStateException
            at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:259)
            at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:219)
            at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:458)
            at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:643)
            at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1070)
            at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:180)
            at org.apache.jsp.pages.Mylayout.layout_jsp._jspx_meth_f_view_0(layout_jsp.java:140)
            at org.apache.jsp.pages.Mylayout.layout_jsp._jspService(layout_jsp.java:99)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)Any Ideas Is Usefull. Thanks.
    Paata.

    Hi,
    I'm trying to use Tiles with NetBeans 6.0. I used a similar set up as the other writer did, except for the JSP:root part:
    <jsp:root version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
    It complies and deploys OK, except it renders a blank page. The source code of the page is below. It seems that the "tiles:insertDefinition" was not expanded. Would you share some lights on how you get it to work. By the way I did not use shale-tiles, do I need it?
    Thanks in advance.
    <!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" xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" xmlns:waistate="http://www.w3.org/2005/07/aaa">
    <head>
    <meta content="no-cache" http-equiv="Pragma" />
    <meta content="no-cache" http-equiv="Cache-Control" />
    <meta content="no-store" http-equiv="Cache-Control" />
    <meta content="max-age=0" http-equiv="Cache-Control" />
    <meta content="1" http-equiv="Expires" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/css/css_master.css" />
    <script type="text/javascript">
    var djConfig = {
        "isDebug": false,
        "parseWidgets": false,
        "debugAtAllCosts": false
    </script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/dojo/dojo.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/json/json.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/prototype/prototype.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/com_sun_faces_ajax.js"></script>
    <script type="text/javascript">
    dojo.hostenv.setModulePrefix("webui.suntheme", "/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/javascript");
    dojo.require('webui.suntheme.*');
    dojo.require('webui.suntheme.widget.*');
    dojo.require('webui.suntheme.widget.jsfx.*');
    </script>
    <link id="link1" rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/resources/stylesheet.css" />
    </head>
    <body id="body1" style="-rave-layout: grid" onload="" onunload="">
    <form id="form1" class="form" method="post" action="/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp" enctype="application/x-www-form-urlencoded">
    <tiles:insertDefinition flush="false" name="global.layout" />
    <input id="form1_hidden" name="form1_hidden" value="form1_hidden" type="hidden" />
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAKVWTWwbRRR+Xmexm4LSOCgEiZRIFESFsk7bCyIUSFInsfBPZZsU2kM6Xk/sDevdYXbWXreiag+ABBcQIIEUBBIcemhP3HoAqh4QSEUiEhdOFReEBBwQEj8HYGZs79qOZZNkZD2vd957M98333vja7+A6lKYOJfaRDWkmcgqa9niJtbZ/JvfPP/hIeeoqQB4BAAiDoUTul3VHNfSNpCOHQ0RYho6YoZtaXmGGE4jC5UxTVaJeaRAMc7YJfz7xo3Prs+tfH63yFM/A2KsdOfBHsOWw7PwlDXEENX4PLEtbDFHO40oM5BZoKiGqYPMNQPXc7bNxCIQ3Vw3Svxz3HNegkug1Gdl/pl2/jouuoa26WwEGXnCMgaVcHusMyo0OGqVVU1QK9x2RSlDojAq8Shuu6LCg6NShvUiqCa3u1lr0S41QC1y2xWlDo5atmkV1A1uj3muiBJD8Z+iwRM//3GpEpcZpraKnEoaETXy/c1bk+e/DYOyDKOmjUrLSGc2TcIBVqHYqdhmySNPPyNT3FWPikSCAAZHRC6vpQC+My4mbem5XC6RKayvJRNn1nPZbEEsPsbg0TYCIQLhrHEcPKCIHKwt5RILhcQpGeTvUSp50bZNjKzbM/Tyd1t//6pA6CyoNWS62CMhBjP9dpBNn85mxB6Sp/I820SAeIFS1EgZDvOubE+//yX6IAyhJIw4xgUsCyRUHxHSY21teYSwQKACSUweyziIidHVQjq1vriQTy4xOBhfIHYZY342hC96KFg0ZevIxJf+HD+/NffXzwqMJCFa4dTrvLJSENFt12K0wSAmCzguYMfzjBpWeT4FUfHT5ZsRyz7A3WuIGshi8qdH/uWDATBQsCVeHe5mL2kxzIs59sNHn/xx5bXHFYG2xV57i9Iv41aLmL567d3pg+/ceaPdLkKEEF87oT7KUjuUJZ7u2SGSkHg9ISfv7eK3WYWdcu1pYS0Grm+v/fjT9MUVf08MIkXDKvG5YGsc9COdQghKQ7a0VS5gTPOi+bzw9acn3966nVZAScEB3USOk0HVNrmjDvcpyRgGk83jMOx4HnPKTeMCKpp4nkuCL3e4rWZsamuCz4RHeKmIBiiaWvjG1eKDD3/1nmiYFKaae9vpWh+9fO7OF/+8pUi3Cd8t8Pj4ldfzv53dflLCr5+AsYcutmQmBfry8DZJiCfQTfomJswUx7czUvrL6R4zUAXh3apACVQguiprd7ze5vVYO3S246jFU5zIr+NdhEhFDSFE3AAtQo76ZgAhTX/SB3TwNLb3ImheD/uELSgcBpv7tGCf9M0g2MI/OH1CAv9u0+/d/1BMJKCsl9vdgZcEDgEvbuIW+Gd9MwB805+IBn9/nJeh7VLeU+IOa5j8LsSYabrjBNuGPvju27skmrf4/iQhq2kIK+KfRouVp3wzgJWmf8/gd9asuM5nTdSwXfbETJkapZ4GEhsuh6m90yWu5rl90iUpH0KX+IvVokv3zQC6pH9nBe0YfUoF/gMrokC8ywsAAA==" />
    </form>
    <script type="text/javascript">
    webui.suntheme.common.body = new webui.suntheme.body('/Apogee.jsp', '/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp',null,null,'com_sun_webui_util_FocusManager_focusElementId');</script>
    </body>
    </html>

  • Accessing CSS Stylesheets - facelets - different folders

    Problem: facelets not located in the root folder are unable to reference the project css file.
    I have a facelets template: layout.xhtml in my WEB-INF folder.
    When I reference the template from a .xhtml page in the root directory the css file is found but when I reference the template from any other folder the css file is not found.
    root (folder)
      + WEB-INF (folder)
         > layout.xhtml
      + css (folder)
         + browser (folder)
            > eLoadMaster.css
      + flight (folder)
         > testPage2.xhtml (does not find the css file)
      > testPage1.xhtml (does find the css file)The only reference to the css file is within the template: layout.xhtml.
    What am I doing wrong?
    Thanks in advance!
    Below is the template file.
    !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"
          xmlns:ui="http://java.sun.com/jsf/facelets">
    <head>
      <title><ui:insert name="title">Default title</ui:insert></title>
      <link rel="stylesheet" type="text/css" href="./css/browser/eLoadMaster.css"/>
    </head>
    <body>
    <div id="header">
        <ui:insert name="header">
             <ui:include src="./../header.xhtml"/>
        </ui:insert>
    </div>
    <div id="menu">
      <ui:insert name="menu" />
    </div>
    <div id="content">
      <ui:insert name="content" />
    </div>
    </body>
    </html>

    Ohh if it were just that simple :)
    I have tried this several different ways... I thought my post above showed the absolute URL... Here is an example with the absolute URL... I still have the same problem.. I have done this before with regular JSP... It is the facelets that seems to be causing the problem..
    Any more ideas?
    <!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"
          xmlns:ui="http://java.sun.com/jsf/facelets">
    <head>
      <title><ui:insert name="title">Default title</ui:insert></title>
      <link rel="stylesheet" type="text/css" href="/css/browser/eLoadMaster.css"/>
    </head>
    <body>
    <div id="header">
        <ui:insert name="header">
             <ui:include src="./../header.xhtml"/>
        </ui:insert>
    </div>
    <div id="menu">
      <ui:insert name="menu" />
    </div>
    <div id="content">
      <ui:insert name="content" />
    </div>
    </body>
    </html>

  • Locale in JSF pages with a permanent link

    Hi there,
    I am migrating an application from Struts2 to JSF. In struts2 I had mapped most of the actions so that the same action returned different locale content depending on the URL:
    http://site.com/en/content.action
    http://site.com/es/content.action
    The action returned the same JSP which showed spanish or english depending on the URL.
    Is there any approach for doing this with JSF? If not, which is the recommended approach for making the same JSF (xhtml) show different locale content depending on a request parameter (?locale=en for example)
    I have solved it using a changeLocale method in a managed bean, which works OK and changes locale, but as it uses Post, the pages are not SEO as cannot be crawled (the URL doesn't even change)
    Thanks for any ideas/approach.
    Ignacio

    You can set the locale of the JSF UIViewRoot within a PhaseListener to cause JSF to use the desired locale.
    Another, more comprehensive approach is to use a servlet filter to set the locales returned by ServletRequest. This is the source for the locale JSF uses if not overridden. If you configure the filter to cover your entire application you have the bonus of every technology being covered, not just JSF.

  • Can a photo gallery like this be created in html/CSS?

    http://jeffsullivan.smugmug.com/Landscapes/National-Parks/Zion-National-Park-Utah/1946310_ 6PtgP#136213013_XVhBQ
    I like the way these galleries expand to browser width - both the thumbs and big image enlarge. I want to learn to make a photo gallery (+ slideshow) perform like this or hire someone with the specific skill set needed to make it for me. I've looked around quite a bit online at photo gallery apps, both free and for sale, including some offered by forum regulars (thanks!), but haven't found one I really liked.
    My intent is not to copy this gallery (that would be stealing),  just to adopt the expanding images- to browser width feature.
    I know Flash could do it but I don't see .swf anywhere in the source... would it be done with Javascript or a combination of apps?

    What I didn't mention before is that the photo gallery I want will be only one part of a community-based commercial site under development that needs to integrate with other parts.
    That's why I'm asking what sort of developer/skills I'd need to make this happen.
    I see.  OK, for starters you'll need a firm grasp of XHTML, CSS, JavaScripting, and server-side programming such as PHP and MySql databases.
    You also might like to look at an open source Groupware solution such as TikiWiki that has a lot of stuff already built into it.
    http://info.tikiwiki.org/tiki-index.php
    Good luck,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • CSS based layouts

    HTML DB's (even 2.0) layout features are based firmly on pure HTML tables. Rows and cells, rowspans/colspans. etc.
    Reading some of the bleeding edge web development sites/blogs out there, they have been proclaiming the death of HTML tables for page layout purposes for years now. CSS support is pretty well established in all major browsers, CSS standards have matured substantially over the past few years.
    What does the HTML DB development team think about adding native support for CSS-based page layouts?
    Thanks

    Hello,
    You can pretty much ,with some exceptions' create a fully XHTML/CSS based templates in HTML DB. 
    The Builder will not be doing this for some time yet and some comments in your own post explains why.
    Reading some of the bleeding edge web development sites/blogs out there,I would suspect most people would want production quality not bleeding edge.
    You will notice we have removed pretty much removes all deprecated tags though.
    What follows next is a rant but it's only because I take my HTML 'VERY' seriously, been building pages since the bleeding edge browser was lynx , you have been warned.
    --BEGIN RANT
    CSS support is 'pretty well established' in all major browsers, CSS standards have
    matured substantially over the past few years.I can't even begin to count all the different ways pretty well established does not equal looks the same in all major browsers, if you don't believe me just ask google.
    I don't like pointing at any one browser in particular (all heads look towards Redmond , Washington) but one of these browsers doesn't stack up compared to the others. It is unfortunate that it has the huge install base it does.
    examples of things that just plain suck:
    style="display:inline-table;"
    png's with transparency
    background image under links blinking bug
    caching of backgroud images
    oh and the whole box model thing
    I'm a huge fan of xhtml/css layout's but the css hacks involved, the css issues between different browsers, unless it's a demonstration of how cool you can make things with only <div> tags and css it's not worth the time and effort to get it perfect.
    You need to email Mozilla Foundation and Microsoft and complain to them once they get it right.
    I 'personally' will make it right till then LONG LIVE TABLES!!!!?
    --END RANT
    Thanks,
    Carl
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is this possible? with flash+xhtml

    Hello, I have a really super-noob question, thanks in advance
    for helping! If I have a web site set up in xhtml/css, can I
    superinpose a flying flash object that travels throughout the page
    or would I have to rebuild the site in Flash? If it's possible,
    what terminology would I use to look up more specific info on how
    to go about doing this?
    Thanks!

    Hi Noelbaland,
    Thanks for answering
    I read the article but I'm not sure if inserting the
    flash object with transparency allows me to span across columns or
    if it's confined to the space where it's embedded. In this case is
    the flash movie layered over the html page?
    Thanks

  • Facelets & JSP in JSF 2.0

    Dear all
    i migrated my ADF / JSF (*.jspx) Application using JDeveloper 11.1.2 , but when i am trying to create new page, i found two types *(Facelets & JSP Xml).*
    and in oracle doc , future in using Facelets.
    i have a project now with all screens in jspx, my question now : how to migrate my Jspx to to Facelets screens (Jsf) ?
    thanks

    There is possibly a two part solution to this:
    1. Make facelets recognize jspx as a valid facelet extension. This is done by adding the following in web.xml
    <context-param>
    <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
    <param-value>*.jspx;*.jsf;*.xhtml</param-value>
    </context-param>
    2. Add the required facelets libraries. Jdeveloper ships with "JSF Core 2.0" and "JSF Compatibilty Tags for Facelets". These
    facelets libraries need to be added to the project.
    3. faces-config.xml version has to be 2.0.
    If you are also using ADF, then the following should be added to web.xml as well:
    <context-param>
    <param-name>javax.faces.FACELETS_SKIP_XML_INSTRUCTIONS</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.FACELETS_DECORATORS</param-name>
    <param-value>oracle.adfinternal.view.faces.facelets.rich.AdfTagDecorator</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>
    <param-value>oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver</param-value>
    </context-param>
    You could give this a shot. Credits to Mark Romano for telling me this.

  • Launch applet from html from ff/ie/chrome but breaks chrome when xhtml

    The following will work as an html file. However I place the body into a jsf xhtml file. Chrome complains: "TypeError: Object#<Document> has no method 'write' " The deployJava.js doesn't work in pc based safari in any case - but direct <applet> works for html file. Any idea how to resolve?
    Monty
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <script src="http://www.java.com/js/deployJava.js"></script>
    <script type="text/javascript">
    try {
    // launch applet
    var attributes = { code:'aa.fx.applet.NewJApplet',  width:640, height:480} ;
    var parameters = {jnlp_href: 'newJnlpTemplate.jnlp'} ;
    deployJava.runApplet(attributes, parameters, '1.6');
    } catch(x) {
    alert(x);
    //]]>
    Edited by: 845430 on Mar 17, 2011 8:13 PM

    I'm guessing you'll get better answers on a Chrome forum, since Chrome seems to be the culprit.

Maybe you are looking for

  • Script making Flash 9 running slow Error

    Hey guys i have a site that manage uploads for our content providers, but when you run the flash movie and you start uploading a file, somewhere is the middle of the upload, a message pops saying that a script in the movie is making the flash player

  • Trust and Key Store config values? - OBPM 10g (Linux) With Websphere6 (AIX)

    HI, We installed OBPM 10gR3 on Linux (10.3.2 for Websphere) with Websphere 6.1.0.21 on AIX, When we try to save values in following section we are getting an error: Engines > Edit Engine bpmengine > JMX Engine Management Configuration Attributes are:

  • Starting of applications issue

    Hello I am new to R12 gettng I am getting this issue when i am starting up the applications. You are running adstrtal.sh version 120.13.12000000.3 Executing service control script: /R12stage/oraAPP/apps/VIS_oracle/admin/scripts/adopmnctl.sh start scr

  • Can I copy between systems with different R/3 releases/add-ons?

    hi,all help me!

  • Trouble with capture from HDC TM700

    Can someone help me. I have Windows 7, 64 bit system, CS5 Prem Pro. Am getting a capture device offline when trying to capture from HDC TM700(PAL). Panasonic assures me that this wont work on a 64 bit system, but I have read other forums that tells m