Re: Javascript in T5.0.3

2007-10-02 Thread jblier

OK issue fixed.

My JS files are in src/main/webapp/js/ however the message "Unable to
resolve page 'js/effects' to a known page name." simply means "file not
found". Meaning that some JS files were looking to other JS files that I
forgot to add.

Thanks for the help.


Josh Canfield-2 wrote:
> 
> Where are you putting your js file? Are you trying to dynamically generate
> the js?
> 
> I've been sticking my static js files here:
> src/main/webapp/js/
> 
> and referencing them directly using 

Re: Javascript in T5.0.3

2007-10-01 Thread Josh Canfield
Where are you putting your js file? Are you trying to dynamically generate
the js?

I've been sticking my static js files here:
src/main/webapp/js/

and referencing them directly using 

Re: Javascript in T5.0.3

2007-10-01 Thread jblier

Any development about JavaScript support with 5.0.5 or 5.0.6?

I haven't tried OutputRaw yet.

Currently I get this error when trying to link to a JS file:

Unable to resolve page 'js/effects' to a
known page name. Available page names: Start, core/ExceptionReport,
core/PropertyDisplayBlocks, core/PropertyEditBlocks.


Alexandru Dragomir wrote:
> 
> By now , as already mentioned several times , javascript  support in tap 5
> is not yet fully implemented.
> Till then , the way to go is using OutputRaw (i think.. ) for dinamic
> javascript and adding JS file links for  static jsvascript.
> For dinamic javascript it will be changed probably but can't say when ;)
> 
> You can use both   or 
> starting with 5.0.3 onwards .
> 
> Anyway , for what you tried to do ( linking the calendarJS.js to the page
> )
> : i'm not sure how you did it , but it should be used PageRenderSupport :
> 
> @Environmental
> PageRenderSupport pageRenderSuport;
> 
> void beginRender(MarkupWriter writer ) {
>  pageRenderSupport.addScriptLink(calendarJS);
>  
>  ...
> }
> 
> 
>  - tap 5.0.4 -
> @Inject
> @Path("...")
> private Asset getCalendarJS();
> 
>  - tap 5.0.3 -
> @Inject("...")
> private Asset getCalendarJS();
> 
> 
> Cheers ,
> Alex
> 

-- 
View this message in context: 
http://www.nabble.com/Javascript-in-T5.0.3-tf3560612.html#a12986630
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Javascript in T5.0.3

2007-04-11 Thread Alexandru Dragomir

By now , as already mentioned several times , javascript  support in tap 5
is not yet fully implemented.
Till then , the way to go is using OutputRaw (i think.. ) for dinamic
javascript and adding JS file links for  static jsvascript.
For dinamic javascript it will be changed probably but can't say when ;)

You can use both   or 
starting with 5.0.3 onwards .

Anyway , for what you tried to do ( linking the calendarJS.js to the page )
: i'm not sure how you did it , but it should be used PageRenderSupport :

@Environmental
PageRenderSupport pageRenderSuport;

void beginRender(MarkupWriter writer ) {
pageRenderSupport.addScriptLink(calendarJS);

...
}


- tap 5.0.4 -
@Inject
@Path("...")
private Asset getCalendarJS();

- tap 5.0.3 -
@Inject("...")
private Asset getCalendarJS();


Cheers ,
Alex

On 4/11/07, Daniel Drasin <[EMAIL PROTECTED]> wrote:


If i read this, you're dumping the body of the script into the page via a
OutputRaw.  (I can't see the actual content of the code on the java side w/o
decompiling the class file, right?)  I'm also thinking that this isn't quite
5.0.3 since u'r using t:type="OutputRaw" rather than the OutputRaw tag
itself (new in 5.0.3).
Is this really the way to do it (it seems more complicated than i would
expect...)  That said, my attempts haven't worked...  The closest i came was
using

and then injecting an asset to the right location for calendarJS on the
java side.  However, this doesn't get the URL to show up in the src
attribute in the eventual html...  Am i close - or am i all wrong?  (and is
the Output method above the way to go?)

Dan
Alexandru Dragomir <[EMAIL PROTECTED]> wrote: You might want to use
this datepicker component

http://code.google.com/p/tapestry5-jscalendar/

And you can also look into it for an example of how to include javascript.

Cheers ,
Alex

On 4/11/07, Daniel Drasin  wrote:
>
> Can anyone point me to an example or how-to for including/using
> javascription in T5.0.3?  (like i want to drop a datepicker in...)
>
> Thanks in advance,
>
> Dan
>
>
> Daniel Drasin
> [EMAIL PROTECTED] 8612 Long Meadow Ct
> (c) 614 330 7795Columbia, MD  21045
> (c) 443 742 5738
>
> -
> 8:00? 8:25? 8:40?  Find a flick in no time
> with theYahoo! Search movie showtime shortcut.



Daniel Drasin
[EMAIL PROTECTED] 8612 Long Meadow Ct
(c) 614 330 7795Columbia, MD  21045
(c) 443 742 5738

-
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.


Re: Javascript in T5.0.3

2007-04-11 Thread Daniel Drasin
If i read this, you're dumping the body of the script into the page via a 
OutputRaw.  (I can't see the actual content of the code on the java side w/o 
decompiling the class file, right?)  I'm also thinking that this isn't quite 
5.0.3 since u'r using t:type="OutputRaw" rather than the OutputRaw tag itself 
(new in 5.0.3).  
Is this really the way to do it (it seems more complicated than i would 
expect...)  That said, my attempts haven't worked...  The closest i came was 
using 

and then injecting an asset to the right location for calendarJS on the java 
side.  However, this doesn't get the URL to show up in the src attribute in the 
eventual html...  Am i close - or am i all wrong?  (and is the Output method 
above the way to go?)

Dan
Alexandru Dragomir <[EMAIL PROTECTED]> wrote: You might want to use this 
datepicker component

http://code.google.com/p/tapestry5-jscalendar/

And you can also look into it for an example of how to include javascript.

Cheers ,
Alex

On 4/11/07, Daniel Drasin  wrote:
>
> Can anyone point me to an example or how-to for including/using
> javascription in T5.0.3?  (like i want to drop a datepicker in...)
>
> Thanks in advance,
>
> Dan
>
>
> Daniel Drasin
> [EMAIL PROTECTED] 8612 Long Meadow Ct
> (c) 614 330 7795Columbia, MD  21045
> (c) 443 742 5738
>
> -
> 8:00? 8:25? 8:40?  Find a flick in no time
> with theYahoo! Search movie showtime shortcut.



Daniel Drasin   
[EMAIL PROTECTED]   8612 Long Meadow Ct
(c) 614 330 7795Columbia, MD  21045
(c) 443 742 5738
   
-
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.

Re: Javascript in T5.0.3

2007-04-11 Thread Alexandru Dragomir

You might want to use this datepicker component

http://code.google.com/p/tapestry5-jscalendar/

And you can also look into it for an example of how to include javascript.

Cheers ,
Alex

On 4/11/07, Daniel Drasin <[EMAIL PROTECTED]> wrote:


Can anyone point me to an example or how-to for including/using
javascription in T5.0.3?  (like i want to drop a datepicker in...)

Thanks in advance,

Dan


Daniel Drasin
[EMAIL PROTECTED] 8612 Long Meadow Ct
(c) 614 330 7795Columbia, MD  21045
(c) 443 742 5738

-
8:00? 8:25? 8:40?  Find a flick in no time
with theYahoo! Search movie showtime shortcut.


Javascript in T5.0.3

2007-04-11 Thread Daniel Drasin
Can anyone point me to an example or how-to for including/using javascription 
in T5.0.3?  (like i want to drop a datepicker in...)

Thanks in advance,

Dan


Daniel Drasin   
[EMAIL PROTECTED]   8612 Long Meadow Ct
(c) 614 330 7795Columbia, MD  21045
(c) 443 742 5738
   
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.