JSF 2: h:outputStylesheet is generating twisted markup if out-of-the-box

Mojarra 2.0.2-FCS
Glassfish v3
Primefaces 2.1 + Themes
Hi to all,
This post is somewhat linked to the following previous discussion where I found helpful information for my case:
[JSF 2: <h:outputStylesheet> is generating wrong markup|http://forums.sun.com/thread.jspa?threadID=5437082]
I want to share my experience with <h:outputStylesheet>. Obviously it wasn't appropriate to continue the mention thread so I'm opening a new one. Now I'll include more information and hope to get some comments.
From the post I cited you have this example provided by Marcos_AntonioPS:
<h:outputStylesheet library="css" name="login.css" />JSF 2.0 outputs the following HTML code:
<link type="text/css" rel="stylesheet" href="/solicitacoes/javax.faces.resource/login.css.xhtml?ln=css" />The Faces Servlet is extension mapped (with .xhtml).
At some time JasonLee proposes a syntax like:
<h:outputStylesheet name="css/login.css" />Which will result in the more RESTful-like URL:
<link type="text/css" rel="stylesheet" href="/solicitacoes/javax.faces.resource/css/login.css.xhtml" />Now usually, that CSS file will have images referenced inside. Let's say you use a theme for your site. What will happen to the images?
/solicitacoes/javax.faces.resource/css/images/logo.png.xhtmlWhat is the proposed solution? EL in CSS? This is intrusive for my CSS:
background:url(#{resource['images/logo.png']})The next RESTful step to take will be to use prefix mapped Faces Servlet (like /faces/). I was tipped by the [JSF 2.0 API documentation about  javax.faces.application.Resource.getRequestPath()|http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/api/javax/faces/application/Resource.html#getRequestPath()] which was mentioned in the JavaDoc for h:outputStylesheet.
As a result, CSS theme frameworks (like jQuery) will work without modifications. It'll be like:
<link type="text/css" rel="stylesheet" href="/solicitacoes/faces/javax.faces.resource/css/login.css" />
/solicitacoes/faces/javax.faces.resource/css/images/logo.pngIf we're talking standards compliant and good practices, aren't the library syntax and extension mapped Faces Servlet (the default), getting in the way? Reading any JSF2 tutorial will lead you into using libraries and #{resource} which in my view should be used only in special cases.
On the other hand, I'm wondering if the prefix mapped Faces Servlet that I want to use, will not end up introducing other side effects?
Any comments are welcome. Thank you.

Yeap, that's imperative. The thing is that with resource resolving your logo.png ends up being "renamed" to logo.png.xhtml
With all that said, one would hesitate if the simplest solution is not also the easiest to use:
<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/theme/login.css" />

Similar Messages

  • Cannot Generate BRM Out of the box reports

    Hi experts,
    i'm having trouble in generating the out of the box BRM Reports in BI Publisher Server UI. whenever i generated it the following error occurs:
    ORA-20006: Not a valid date Format
    ORA-06512: at "PIN.BIPEXT", line 198
    ORA-06512: at "PIN.BIPEXT", line 226
    ORA-06512: at "PIN.PAYMENTSUMMARY", line 451
    do you have any idea on what is the cause of this error?
    note that those reports are part of the package when BRM is Integrated with BI Publisher.
    Edited by: mr_bip_learner on May 27, 2013 10:51 PM

    Hi,
    Is your date field is in Numeric format
    Thanks

  • Generate SAP Out-of-the-box roles?

    As a general rule of thumb I know we usually take the SAP provided roles and copy them so we can add, change and delete authorizations out of them before we assign the roles.
    We also have Solution Manager and XI that seem to use the SAP roles out of the box that we don't need to manage. At least for now since we don't have a good idea on security for these 2 products.
    Does anyone use the SAP standard roles and generate them and assign them to users? Is it bad to use for XI and SM since they are more of a system level roles instead of user roles like Accountant?

    Hi,
    Is your date field is in Numeric format
    Thanks

  • Trying to set up an out of the box SP 2010 approval workflow that doesn't generate warnings or errors

    I have a custom list for which I want an approval workflow.  There is only going to be one stop for the approval - creating an item is a request to a person for a new code to be created. 
    If I do not turn on content approval, then I get the message:
    The workflow could not set content approval status. Enable content moderation for this list and run the workflow again.
    When I turn on content approval, then when the users go to the custom list to create an item, they see this message:
    Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights.
    Surely I am missing something obvious. I just want a standard SP 2010 form without warnings to gather info from the user, then to create a workflow task that sends a person an email that they need to approve or reject the request.
    The second message is going to cause questions from the users. The person who has to approve the tasks wants to be able to see what requests are awaiting approval vs approved vs rejected.
    Is this something that is not doable in SP 2010?

    the "Approval Process" step is designed for manipulating the "Moderation Status" (Content Approval status) of a list item... What you are seeing is DESIGNED behavior.
    When Content Approval is enabled, content changes are not made public until they have been approved. The Approval workflow sends the email to a manager, who is supposed to approve or reject the change.
    If Content Approval is DISABLED, there is no point to the workflow.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Change the styling of the generated html markup in ADF Faces

    Dear All,
    I just have some question on the generated HTML markup of panelStretchLayout component.
    Supposed I have this layout
    <af:panelStretchLayout id="cntDiv" dimensionsFrom="children" topHeight="auto"
      startWidth="0" endWidth="0">
         <f:facet name="top"/>
         <f:facet name="center"/>
         <f:facet name="bottom"/>                                    
    </af:panelStretchLayout>If you look at the generated html markup it will create a div element with below styling
    <div id="pt1:cntDiv::t" style="position:relative;overflow:hidden;width:100%"/>
    <div id="pt1:cntDiv::c" style="position:relative;overflow:hidden;width:100%"/>
    <div id="pt1:cntDiv::b" style="position:relative;overflow:hidden;width:100%"/>My problem is with the overflow:hidden property. Is there a way or configuration to remove or override this property
    when the markup is generated?
    Use case:
    I wanted to use fancy Jquery sliding menu but everything gets messed up because of this css style property.
    I know you should not mix up JSF with client side components but I need to use those fancy javascript powered menu's.
    Is this possible? If so how?
    Thanks
    JDEV 11g PS5

    Hi there,
    You are saying that you want to use mouse-over. But I think you don't want to use that.
    I've been working with this, and I got it working. However........ Image this: "you have a table with 10 visible rows. You have some buttons below the table. After you select a row (lets say the third) , you might want to navigate to the details by "pushing" a button.
    What will happen with the selected row.......your mouse goes to the button... your mouse has to go over all the rows in the table.... The last row your mouse goes over will be selected.... and these details will be shown. Not the details of the row that you initially selected....
    If you still want this..... I might be able to help you.
    Luc Bors

  • Can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF

    can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF?

    No, there isn't. The way you're using the file is not recommended. You
    should use a review tracker to avoid getting in the way of one another.

  • ITunes 10.6.3 keeps generating incomplete downloads AND it rearranges the order of the playlist when I burn a playlist to an mp3 cd

    iTunes 10.6.3 keeps generating incomplete downloads AND it rearranges the order of the playlist when I burn a playlist to an mp3 cd.
    I purchased an album on iTues from my MAC book Pro & the song downloads were incomplete. The song length shows correctly in the column, but they cut off between 1/4 & 1/2 way through the songs. Now, I dwonloaded it on my iPhone 4 through my itunes account after the purchase & the songs play fine. This happened with the very next song I purchased, as well.
    I got around this issue, then created mp3 versions of all the songs, put them in their own playlist, then "Burned an mp3 disc." When it completed, the songs were in a different order.
    Are there any fixes for either of these problems/bugs?

    iTunes: How to set the play order of songs on an MP3 CD - http://support.apple.com/kb/HT2455

  • RSS Feed from rss generator's new app has changed the feed. Now the description of apps is not showing. the rest is the same. Anyone has an idea why ?  and how do I get the description? if I fetch it from itunes pages would that be considered violation of

    RSS Feed from rss generator's new app has changed the feed. Now the description of apps is not showing. the rest is the same. Anyone has an idea why ?  and how do I get the description? if I fetch it from itunes pages would that be considered violation of apple's terms and conditions? Please help

    See this post.
    tt2

  • Can I generate a DSC alarm based on the difference of two signals?

    In the Tag Configuration Editor of the DSC module, you can set lower and upper limits on any signal (tag). This works well if the signal is expected to always be within a certain range. However, if the signal is expected to vary according to a predefined pattern, how can I detect when it passes out of the expected pattern? - In my case the problem is made easier since I have two signals I can monitor: a setpoint and an actual. Therefore I can calculate the difference between setpoint and actual and set an alarm if the difference exceeds some maximum value. However, the DSC tag configuration editor does not allow these kind of "derived channels".
    One possible solution is to run LabVIEW code to mon
    itor these signals in real time, continually calculate the difference and generate an error if the difference exceeds the limit I have set. The problem is there does not seem to be a way to programmatically generate a DSC alarm.
    Another possible solution, but requiring more work, is to create my own VI-based server to monitor the derived channels. Then there would be two servers running - logos to acquire the FieldPoint data- and my VI based server to calculate the derived channels in real time. My question is: Is there an easier way to do this?

    Hi Chris,
    Go with your first proposed solution -- and write the result to a Discrete Memory tag. And set this tag to alarm on High. This will now act as your alarm tag.
    Hope this helps.
    Regards,
    Khalid

  • NImax.exe has generated errors. You must restart the program, a log file is being created.

    NImax.exe has generated errors. You must restart the program, a log file is
    being created.
    This error occurs just after bootup, no programs started except windows..
    Running Windows 2000 latest version on a brand new computer.
    (pent 4 3.0 ghz 500MB ram).
    Can anyone help me with this problem? Happened after install Labview 7.0
    express. Installed twice and same problem occured with both installs.
    Labview 7.0 is the only thing installed right now. Also selected "Visual
    Basic Support" install from driver cd's.
    One other thing I just noticed. System info reports 2 processors and I
    think I only have one.
    TIA

    Happy update.
    After ignoring this problem for awhile and installing some NI DAQ boards,
    this problem is not happening anymore.
    Would urge NI to investigate further though. Messed me up for a couple of
    days, and still don't know why it happened.
    Much thanks to those who helped.
    JJ
    "JJF" wrote in message
    news:qB6Hb.48702$VB2.90660@attbi_s51...
    > One other point, I found out this is a message generated by drwtsn32. Can
    > get rid of the error by unchecking "show visual feedback on errors" box,
    but
    > don't like that fix. Still need help.
    >
    > Thanks,
    >
    > JJ
    >
    > "JJF" wrote in message
    > news:%JRGb.138921$8y1.419649@attbi_s52...
    > > Hi Nirmal and all,
    > >
    > > Happy Holidays to you too, and thanks for the reply.
    > >
    > > Making progress. Did all the uninstalling and registry editing as you
    > > suggested. Also, updated Win2K at Microsoft.com as suggested.
    > > Re-installed with default settings of LV express 7.0. Now I only get
    > the
    > > error when I exit NImax.
    > >
    > > Also, my p2p home network is not that hot. Have it set up as a
    workgroup.
    > > Sometimes when I boot up I have file access between the two computers
    and
    > > sometimes windows explorer can't find the workgroup network path
    (between
    > > the two computers). Both computers can always access the internet
    though.
    > > Using a 4 port Linksys cable/dsl router on a cable modem. Using XP
    home
    > > edition on base computer (the one set up for the isp) and Win2K on the
    > other
    > > computer.
    > >
    > > Also, any idea where this log file is going? Thought it was part of the
    > > event viewer but the errors in the event viewer don't seem to correspond
    > to
    > > the NImax.exe logging event now. There is a file in
    > > "winnt\sytem32\config\software.log" that seems to change at about the
    same
    > > time but I can't access the file because it is in use by the system.
    > >
    > > Using NImax ver 3.02.3005. Do you know if I can download "NI
    measurement
    > > and automation explorer" and/or the driver cd's from NI.com? Maybe I
    have
    > a
    > > flaky disk or something. I have a feeling it may also have to do with
    the
    > > "on again/off again" network neighborhood connection problem.
    > >
    > >
    > > Thanks again,
    > >
    > > JJ
    > >
    > >
    > >
    > > "Nirmal Sharma" wrote in message
    > > news:506500000005000000AE470100-1068850981000@exch​ange.ni.com...
    > > > Hi,
    > > > Happy cristmas & new year for you & ur brand new pc...
    > > >
    > > > How are you uninstalling & then installing LV in your pc ?
    > > >
    > > > I suggest to remove complete LV (Remove All option) from your
    > > > computer. Once uninstallation is completed, go to windows registry -
    > > > by windows start -> run -> regedit -> Enter
    > > >
    > > > Goto HKEY_LOCAL_MACHINE-> SOFTWARE -> National Instruments - Delete
    > > > this folder (National Instruments folder)
    > > >
    > > > Remove any other foloder/file related to NI's software. Be very
    > > > cautious while deleting files from windows registry bcoz wrong file
    > > > deletion may hang your whole system.
    > > >
    > > > Restart your computer..hope it should bootup without any errors.
    > > >
    > > > Now as answered by Alexander, update windows.
    > > >
    > > > After updating, bootup your system. If it boots up without any error
    > > > message, install LV with the typical (default installation).
    > > >
    > > > Hope this helps. Your feedbacks are welcome.
    > > >
    > > > Best Regards,
    > > > Nirmal Sharma
    > > > India
    > >
    > >
    >
    >

  • MRP Generated production orders greys out Sales Order and Customer fields

    Hi there,
    The MRP generated production orders greys out the Sales Order and Customer fields for some reasons. These fields are really important as they link the production order to the sales order and the customer's purchase order. Could the SAP team please fix this or advise alternative way of getting the sales order and customer info on production order? Thanks.

    Hello
    MRP only poulated this fields in case the material master has been set up with a strategy group hich is make to order (normally 20). Otherwise MRP summarizes all the requirements from different Customer orders and creates a production order
    Stephan

  • Keeping HTML markup out of the resource bundle

    Hello, I'm using ResourceBundles along with XSLT, and an issue that I'm trying to resolve is whether I should or could keep HTML markup outside of the resources. Some of the messages that my app displays have special markup, for example.
    Good morning, <b>{0}</b>!
    In Polish (just to illustrate a point) I might want to use:
    <b>{0}</b>, dzien dobry!
    I don't see any way to keep the HTML out of the resource -- and I want to keep the entire sentence in the resource file because the words may be in different order in different languages.
    What is the usual approach to this? Is markup in resource files a "bad thing"? I searched the net but failed to find anything about this... Thank you,
    tom.

    If the translators use a translation memory tool with a parser that protects markup based on file type, then it is a very bad thing to have html in a java resource bundle, yes. Because the parser will protect the java code, but not the html, increasing the likelyhood that the html markup will be mangled during translation.
    You are of course right that you need to keep the entire sentence in the resource file to enable correct translation.

  • Will idoc be generate to a particular partner if the partner profile is in in active?

    Hi ,
    I have a quetion for IDoc communication in SAP.
    Will idoc be generate to a particular partner if the partner profile is in in active?
    Please help to my doubt..
    Thank you,
    Yogesh.

    Hi Yogesh,
    IDOC will be triggered for active partners which are configured in partner profile. Please check the below wiki
    Connection Settings between ECC and PI system - Process Integration - SCN Wiki
    regards,
    Harish

  • [svn:fx-3.x] 10953: Get rid of a try/ catch block that was generating a lot of noise on the heap.

    Revision: 10953
    Author:   [email protected]
    Date:     2009-10-09 10:50:37 -0700 (Fri, 09 Oct 2009)
    Log Message:
    Get rid of a try/catch block that was generating a lot of noise on the heap.
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-23563
    Reviewer: Ryan
    API Change: no
    Is noteworthy for integration: No
    tests: checkintests mustella/Managers/DragManager
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23563
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy .as

    Revision: 10953
    Author:   [email protected]
    Date:     2009-10-09 10:50:37 -0700 (Fri, 09 Oct 2009)
    Log Message:
    Get rid of a try/catch block that was generating a lot of noise on the heap.
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-23563
    Reviewer: Ryan
    API Change: no
    Is noteworthy for integration: No
    tests: checkintests mustella/Managers/DragManager
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23563
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy .as

  • Generating buttons and listboxes dynamically on the screen

    Hi people!!
    There's a way to generate buttons and listboxes dynamically on the screen????
    Tks in advance
    Gabriel

    hi check this..
    Dynamic drop down list box

Maybe you are looking for

  • Expressions not evaluating properly in jsp:plugin tag

    Hi there, running OC4J as Oracle9iAS (1.0.2.2.1) In the JSP1.1 spec dynamic expressions in the jsp:plugin <param> tag are clearly specified as below: <jsp:params> [ <jsp:param name="parameterName" value="{parameterValue | <%= expression %>}" /> ]+ </

  • 32" Emerson LCD displays text blurry

    I connected my G4 tower to a 32" Emerson LCD via DVI -HDMI connector. The icons & folders look sharp but the text looks like *#$@*#@! Any advise to a better display? I want the best visual experience

  • Oracle 8i array DML operations with LOB objects

    Hi all, I have a question about Oracle 8i array DML operations with LOB objects, both CLOB and BLOB. With the following statement in mind: INSERT INTO TABLEX (COL1, COL2) VALUES (:1, :2) where COL1 is a NUMBER and COL2 is a BLOB, I want to use OCIs a

  • Always get an error when trying to record an action

    I record the steps in an action, but when I try to run it, I get an error dialog with the following message: Check the actionʼs properties and try running the workflow again. What does this mean?

  • How can I stop iTunes from numbering ripped files?

    How can I stop iTunes 11.2.1 from automatically adding numbering before track titles when I rip files from a CD? I used to be able to do this generations of iTunes ago but later versions don't seem to offer an option to turn this off. All ideas, tips