Skip to main content

JSF2 composite component

4 replies [Last post]
janderssn
Offline
Joined: 2009-03-11

So, I have this composite component in which I include some javascripts libraries using the tag with target="head". The problem is only some of the scripts are added to the head of the page while the others are just added inline as if no target was specified at all. This also happens with , only some are added to the . What's going on?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
guyv
Offline
Joined: 2005-10-22
Jim Driscoll

No idea, never seen that behavior before.

Any chance you're adding them elsewhere as well?

Any chance that you don't have a h:head element?

Can you isolate it down to just three or four lines of code that does this?

Jim

On 6/14/09 12:21 PM, webtier@javadesktop.org wrote:
> So, I have this composite component in which I include some javascripts libraries using the tag with target="head". The problem is only some of the scripts are added to the head of the page while the others are just added inline as if no target was specified at all. This also happens with, only some are added to the. What's going on?
> [Message sent by forum member 'janderssn' (janderssn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=351107
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

janderssn
Offline
Joined: 2009-03-11

Ok, this seem to be enough to break it for me (sorry about the formatting). I'm running inside eclipse on a standard tomcat6 runtime with yesterdays nightly build of mojarra.

The composite component:
/resources/components/test/test.xhtml


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
xmlns:h="http://java.sun.com/jsf/html"
xmlns:cc="http://java.sun.com/jsf/composite">






/*a.css*/
/*b.css*/
/*c.css*/
/*a.js*/
/*b.js*/
/*c.js*/


The facelet page using the composite component.
/main.xhtml

PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ez="http://java.sun.com/jsf/composite/components/test">






And this is the result:




Jim Driscoll

That's just freaky weird.

Thanks for the short example - let me try it out, and get back to you.

Jim

On 6/14/09 10:14 PM, webtier@javadesktop.org wrote:
> Ok, this seem to be enough to break it for me (sorry about the formatting). I'm running inside eclipse on a standard tomcat6 runtime with yesterdays nightly build of mojarra.
>
> The composite component:
> /resources/components/test/test.xhtml
>
>
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > xmlns:h="http://java.sun.com/jsf/html"
> xmlns:cc="http://java.sun.com/jsf/composite">
>
>
>
>
>

>
> /*a.css*/
> /*b.css*/
> /*c.css*/
> /*a.js*/
> /*b.js*/
> /*c.js*/
>

>
>
>
> The facelet page using the composite component.
> /main.xhtml
>
> > PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:ez="http://java.sun.com/jsf/composite/components/test">
>
>
>
>
>

>

>
>
> And this is the result:
>
>
>


>

>
>


>


>
> [Message sent by forum member 'janderssn' (janderssn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=351128
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net