Script area in facelet

View: New views
14 Messages — Rating Filter:   Alert me  

Script area in facelet

by Lizzy. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, is it possible to get a script area in a facelet?

Current code (abstract):

<ui:compostition>
 <ui:define>
  <script></script>
 </ui:define>
</ui:composition>

But that doesnt work..

Please help me (8

Re: Script area in facelet

by Joel Weight :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Others may be more adept at remote debugging, but I need more information than "doesn't work."

How exactly is it not working?

Joel


On Tue, Feb 17, 2009 at 11:27 AM, Lizzy. <raus111@...> wrote:

Hi, is it possible to get a script area in a facelet?

Current code (abstract):

<ui:compostition>
 <ui:define>
 <script></script>
 </ui:define>
</ui:composition>

But that doesnt work..

Please help me (8
--
View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22063325.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Script area in facelet

by Lizzy. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The script area is creating a widget, but it doesnt show up.

I looked at it with the IE Developer Toolbar and saw a little script window with nothing in it.

I checked the code, normally it should show off!
I implemented it into other websites and other contents, and there is only a problem within facelets.
Its very important to me to figure out how it work!

Please help

Joel Weight wrote:
Others may be more adept at remote debugging, but I need more information
than "doesn't work."

How exactly is it not working?

Joel


On Tue, Feb 17, 2009 at 11:27 AM, Lizzy. <raus111@web.de> wrote:

>
> Hi, is it possible to get a script area in a facelet?
>
> Current code (abstract):
>
> <ui:compostition>
>  <ui:define>
>  <script></script>
>  </ui:define>
> </ui:composition>
>
> But that doesnt work..
>
> Please help me (8
> --
> View this message in context:
> http://www.nabble.com/Script-area-in-facelet-tp22063325p22063325.html
> Sent from the java.net - facelets users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@facelets.dev.java.net
> For additional commands, e-mail: users-help@facelets.dev.java.net
>
>

Re: Script area in facelet

by Jason Lee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I notice you put that in a ui:define, inside a ui:composition.  Does  
the composition specify a template?  If so, your define appears to be  
unnamed, so my guess is that it would be hard to insert the define  
into the template...

On Feb 17, 2009, at 1:32 PM, Lizzy. wrote:

> The script area is creating a widget, but it doesnt show up.
>
> I looked at it with the IE Developer Toolbar and saw a little script  
> window
> with nothing in it.
>
> I checked the code, normally it should show off!
> I implemented it into other websites and other contents, and there  
> is only a
> problem within facelets.
> Its very important to me to figure out how it work!
>
> Please help
>
>
> Joel Weight wrote:
>>
>> Others may be more adept at remote debugging, but I need more  
>> information
>> than "doesn't work."
>>
>> How exactly is it not working?
>>
>> Joel
>>
>>
>> On Tue, Feb 17, 2009 at 11:27 AM, Lizzy. <raus111@...> wrote:
>>
>>>
>>> Hi, is it possible to get a script area in a facelet?
>>>
>>> Current code (abstract):
>>>
>>> <ui:compostition>
>>> <ui:define>
>>> <script></script>
>>> </ui:define>
>>> </ui:composition>
>>>
>>> But that doesnt work..
>>>
>>> Please help me (8
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Script-area-in-facelet- 
>>> tp22063325p22063325.html
>>> Sent from the java.net - facelets users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22064523.html
> Sent from the java.net - facelets users mailing list archive at  
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

Jason Lee, SCJP
Senior Java Developer, Sun Microsystems
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Script area in facelet

by Lizzy. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It was just an short abstract of my code.
Yes specifies a template. The code is working. The only problem I have is the widget - it just wont show up.
I read a lot in the Internet and it wasnt really helpful. Some got similar problems, but they never got solved, they remained unanswered...hope not mine

Jason Lee wrote:
I notice you put that in a ui:define, inside a ui:composition.  Does  
the composition specify a template?  If so, your define appears to be  
unnamed, so my guess is that it would be hard to insert the define  
into the template...

On Feb 17, 2009, at 1:32 PM, Lizzy. wrote:
> The script area is creating a widget, but it doesnt show up.
>
> I looked at it with the IE Developer Toolbar and saw a little script  
> window
> with nothing in it.
>
> I checked the code, normally it should show off!
> I implemented it into other websites and other contents, and there  
> is only a
> problem within facelets.
> Its very important to me to figure out how it work!
>
> Please help
>
>
> Joel Weight wrote:
>>
>> Others may be more adept at remote debugging, but I need more  
>> information
>> than "doesn't work."
>>
>> How exactly is it not working?
>>
>> Joel
>>
>>
>> On Tue, Feb 17, 2009 at 11:27 AM, Lizzy. <raus111@web.de> wrote:
>>
>>>
>>> Hi, is it possible to get a script area in a facelet?
>>>
>>> Current code (abstract):
>>>
>>> <ui:compostition>
>>> <ui:define>
>>> <script></script>
>>> </ui:define>
>>> </ui:composition>
>>>
>>> But that doesnt work..
>>>
>>> Please help me (8
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Script-area-in-facelet- 
>>> tp22063325p22063325.html
>>> Sent from the java.net - facelets users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@facelets.dev.java.net
>>> For additional commands, e-mail: users-help@facelets.dev.java.net
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22064523.html
> Sent from the java.net - facelets users mailing list archive at  
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@facelets.dev.java.net
> For additional commands, e-mail: users-help@facelets.dev.java.net
>

Jason Lee, SCJP
Senior Java Developer, Sun Microsystems
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com




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

Re: Script area in facelet

by Jason Lee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm with Joel, then, and need more details.  And if you're using  
*only* IE to develop, you're doing yourself a huge disservice.  Put  
Firefox and Firebug on that and see what it says. :)

On Feb 17, 2009, at 2:13 PM, Lizzy. wrote:

>
> It was just an short abstract of my code.
> Yes specifies a template. The code is working. The only problem I  
> have is
> the widget - it just wont show up.
> I read a lot in the Internet and it wasnt really helpful. Some got  
> similar
> problems, but they never got solved, they remained unanswered...hope  
> not
> mine
>
>
> Jason Lee wrote:
>>
>> I notice you put that in a ui:define, inside a ui:composition.  Does
>> the composition specify a template?  If so, your define appears to be
>> unnamed, so my guess is that it would be hard to insert the define
>> into the template...
>>
>> On Feb 17, 2009, at 1:32 PM, Lizzy. wrote:
>>> The script area is creating a widget, but it doesnt show up.
>>>
>>> I looked at it with the IE Developer Toolbar and saw a little script
>>> window
>>> with nothing in it.
>>>
>>> I checked the code, normally it should show off!
>>> I implemented it into other websites and other contents, and there
>>> is only a
>>> problem within facelets.
>>> Its very important to me to figure out how it work!
>>>
>>> Please help
>>>
>>>
>>> Joel Weight wrote:
>>>>
>>>> Others may be more adept at remote debugging, but I need more
>>>> information
>>>> than "doesn't work."
>>>>
>>>> How exactly is it not working?
>>>>
>>>> Joel
>>>>
>>>>
>>>> On Tue, Feb 17, 2009 at 11:27 AM, Lizzy. <raus111@...> wrote:
>>>>
>>>>>
>>>>> Hi, is it possible to get a script area in a facelet?
>>>>>
>>>>> Current code (abstract):
>>>>>
>>>>> <ui:compostition>
>>>>> <ui:define>
>>>>> <script></script>
>>>>> </ui:define>
>>>>> </ui:composition>
>>>>>
>>>>> But that doesnt work..
>>>>>
>>>>> Please help me (8
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Script-area-in-facelet-
>>>>> tp22063325p22063325.html
>>>>> Sent from the java.net - facelets users mailing list archive at
>>>>> Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>>> For additional commands, e-mail: users-help@...
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Script-area-in-facelet- 
>>> tp22063325p22064523.html
>>> Sent from the java.net - facelets users mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>
>> Jason Lee, SCJP
>> Senior Java Developer, Sun Microsystems
>> Mojarra and Mojarra Scales Dev Team
>> https://mojarra.dev.java.net
>> https://scales.dev.java.net
>> http://blogs.steeplesoft.com
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22065368.html
> Sent from the java.net - facelets users mailing list archive at  
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

Jason Lee, SCJP
Senior Java Developer, Sun Microsystems
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Script area in facelet

by Joel Weight :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So, just to beat a dead horse and ensure the problem is not with the define/insert template interaction, if you put an <h:outputText value="this is some text" /> in there it shows up, correct?

And you are certain the script you are including is working correctly, i.e. if you put in some simple script, it also doesn't work correctly?

On Tue, Feb 17, 2009 at 1:13 PM, Lizzy. <raus111@...> wrote:

It was just an short abstract of my code.
Yes specifies a template. The code is working. The only problem I have is
the widget - it just wont show up.
I read a lot in the Internet and it wasnt really helpful. Some got similar
problems, but they never got solved, they remained unanswered...hope not
mine


Jason Lee wrote:
>
> I notice you put that in a ui:define, inside a ui:composition.  Does
> the composition specify a template?  If so, your define appears to be
> unnamed, so my guess is that it would be hard to insert the define
> into the template...
>
> On Feb 17, 2009, at 1:32 PM, Lizzy. wrote:
>> The script area is creating a widget, but it doesnt show up.
>>
>> I looked at it with the IE Developer Toolbar and saw a little script
>> window
>> with nothing in it.
>>
>> I checked the code, normally it should show off!
>> I implemented it into other websites and other contents, and there
>> is only a
>> problem within facelets.
>> Its very important to me to figure out how it work!
>>
>> Please help
>>
>>
>> Joel Weight wrote:
>>>
>>> Others may be more adept at remote debugging, but I need more
>>> information
>>> than "doesn't work."
>>>
>>> How exactly is it not working?
>>>
>>> Joel
>>>
>>>
>>> On Tue, Feb 17, 2009 at 11:27 AM, Lizzy. <raus111@...> wrote:
>>>
>>>>
>>>> Hi, is it possible to get a script area in a facelet?
>>>>
>>>> Current code (abstract):
>>>>
>>>> <ui:compostition>
>>>> <ui:define>
>>>> <script></script>
>>>> </ui:define>
>>>> </ui:composition>
>>>>
>>>> But that doesnt work..
>>>>
>>>> Please help me (8
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Script-area-in-facelet-
>>>> tp22063325p22063325.html
>>>> Sent from the java.net - facelets users mailing list archive at
>>>> Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@...
>>>> For additional commands, e-mail: users-help@...
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Script-area-in-facelet-tp22063325p22064523.html
>> Sent from the java.net - facelets users mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>
> Jason Lee, SCJP
> Senior Java Developer, Sun Microsystems
> Mojarra and Mojarra Scales Dev Team
> https://mojarra.dev.java.net
> https://scales.dev.java.net
> http://blogs.steeplesoft.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>

--
View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22065368.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Script area in facelet

by Lizzy. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ye right, the outputText is working, ive already designed a headline which is showing up, and the script is also working.
Im not sure what your experiences with widgets are (?) ist a JS code which is working after implementing it, normally!
That is really f***ing me up. Its just such a silly problem I canot solve..
Put so much time and brain in it.

Thought it might be the browser, but FF isnt displaying it also.


So, just to beat a dead horse and ensure the problem is not with the
define/insert template interaction, if you put an <h:outputText value="this
is some text" /> in there it shows up, correct?

And you are certain the script you are including is working correctly, i.e.
if you put in some simple script, it also doesn't work correctly?

On Tue, Feb 17, 2009 at 1:13 PM, Lizzy. <raus111@web.de> wrote:

Re: Script area in facelet

by Joel Weight :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not sure I'm going to be much more help then.  If you replace your widget-creation javascript with something simple like

alert( 'made it into the script' );

do you get the alert?

Joel

On Tue, Feb 17, 2009 at 1:41 PM, Lizzy. <raus111@...> wrote:

Ye right, the outputText is working, ive already designed a headline which is
showing up, and the script is also working.
Im not sure what your experiences with widgets are (?) ist a JS code which
is working after implementing it, normally!
That is really f***ing me up. Its just such a silly problem I canot solve..
Put so much time and brain in it.

Thought it might be the browser, but FF isnt displaying it also.


So, just to beat a dead horse and ensure the problem is not with the
define/insert template interaction, if you put an <h:outputText value="this
is some text" /> in there it shows up, correct?

And you are certain the script you are including is working correctly, i.e.
if you put in some simple script, it also doesn't work correctly?

On Tue, Feb 17, 2009 at 1:13 PM, Lizzy. <raus111@...> wrote:
--
View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22065922.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Script area in facelet

by Jason Lee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Or, if you move the script to the template, does it work there?  

On Feb 17, 2009, at 2:58 PM, Joel Weight wrote:

Not sure I'm going to be much more help then.  If you replace your widget-creation javascript with something simple like

alert( 'made it into the script' );

do you get the alert?

Joel

On Tue, Feb 17, 2009 at 1:41 PM, Lizzy. <raus111@...> wrote:

Ye right, the outputText is working, ive already designed a headline which is
showing up, and the script is also working.
Im not sure what your experiences with widgets are (?) ist a JS code which
is working after implementing it, normally!
That is really f***ing me up. Its just such a silly problem I canot solve..
Put so much time and brain in it.

Thought it might be the browser, but FF isnt displaying it also.


So, just to beat a dead horse and ensure the problem is not with the
define/insert template interaction, if you put an <h:outputText value="this
is some text" /> in there it shows up, correct?

And you are certain the script you are including is working correctly, i.e.
if you put in some simple script, it also doesn't work correctly?

On Tue, Feb 17, 2009 at 1:13 PM, Lizzy. <raus111@...> wrote:
--
View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22065922.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Jason Lee, SCJP
Senior Java Developer, Sun Microsystems
Mojarra and Mojarra Scales Dev Team




Re: Script area in facelet

by jjmarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you are trying to use JavaScript inside an xhtml with facelets you need to use cdata tags.
XHTML declares the script element as having #PCDATA content. Therefore, the < and & characters are interpreted as the start of markup. The &lt and &amp are expanded to < and & respectively. To avoid these problems, enclose the script element in a CDATA section.

As long as you are mindful of the above differences between HTML 4 and XHTML, and you follow XML rules, you will be able to use JavaScript in Facelets views.

Extracted from Oreilly short cuts facelets.

CDATA section as in the following example.

<script type="text/javascript"> //<![CDATA[

JavaScript code ... //]]> </script>

 

/Joe
 

Sent: Tuesday, February 17, 2009 3:58 PM
Subject: Re: Script area in facelet

Not sure I'm going to be much more help then.  If you replace your widget-creation javascript with something simple like

alert( 'made it into the script' );

do you get the alert?

Joel

On Tue, Feb 17, 2009 at 1:41 PM, Lizzy. <raus111@...> wrote:

Ye right, the outputText is working, ive already designed a headline which is
showing up, and the script is also working.
Im not sure what your experiences with widgets are (?) ist a JS code which
is working after implementing it, normally!
That is really f***ing me up. Its just such a silly problem I canot solve..
Put so much time and brain in it.

Thought it might be the browser, but FF isnt displaying it also.


So, just to beat a dead horse and ensure the problem is not with the
define/insert template interaction, if you put an <h:outputText value="this
is some text" /> in there it shows up, correct?

And you are certain the script you are including is working correctly, i.e.
if you put in some simple script, it also doesn't work correctly?

On Tue, Feb 17, 2009 at 1:13 PM, Lizzy. <raus111@...> wrote:
--
View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22065922.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Script area in facelet

by Lizzy. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh wow, thanks a lot.
Didnt try that!

So i guess the problem is the displaying the widget not the script part, because it is alerting!

The widget is build with only having a <script src="...."></script> and Ive no idea why it doesnt show up.

In another xhtml file it is showing up, but thats the "main.xhtml" file. I want to chane the content and there the widget should display.
I guess it's not working inside a compostion or define - but it has to!


Not sure I'm going to be much more help then.  If you replace your
widget-creation javascript with something simple like

alert( 'made it into the script' );

do you get the alert?

Joel

Re: Script area in facelet

by Lizzy. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh my god, i found the problem, but Ive no idea how to solve.

The problem is, that (ff and ie) dont display the widget, not even after clicking "yes" on "Do you want to display unsecure items?".

What the hell did I program..

Re: Script area in facelet

by Joel Weight :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds like your next best bet would be to try firebug and see what you can figure out.  It could be that an element ID isn't what you think it is so javascript that you think is referencing an element really isn't, or something.  Good luck.

On Wed, Feb 18, 2009 at 12:28 AM, Lizzy. <raus111@...> wrote:

Oh my god, i found the problem, but Ive no idea how to solve.

The problem is, that (ff and ie) dont display the widget, not even after
clicking "yes" on "Do you want to display unsecure items?".

What the hell did I program..
--
View this message in context: http://www.nabble.com/Script-area-in-facelet-tp22063325p22073539.html
Sent from the java.net - facelets users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...