Re: generate javascript file together with html page

2008-10-27 Thread Ittay Dror



Michael Sparer wrote:
 
 take a look at headercontributors e.g.
 http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/
 

This will only generate the reference to the javascript in the html page.
However, now when the browser tries to request this javascript file, I want
the request to go to the same Page object that created the html, so that it
renders the javascript file.

Assume FooPage.java. A request FooPage.html creates a call to FooPage. It
then contributes FooPage.js to the header and then I want a request to
FooPage.js to go back to FooPage so it creates the javascript file by using
the same hierarchy of components. 

Ittay





 regards,
 Michael
 
 
 Ittay Dror wrote:
 
 Hi,
 
 I'd like to create a page with lots of javascript code. For reasons of
 maintenance, I'd like the Page object to generate the html with reference
 to a javascript file with the same name and .js extension so when the
 browser tries to load this file the same Page object then renders (by
 using behaviors) the javascript content. (by saying 'object renders' I
 mean the normal wicket style rendering of delegating to the contained
 component hierarchies).
 
 Any pointers would be appreciated.
 
 Ittay
 
 
 

-- 
View this message in context: 
http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: generate javascript file together with html page

2008-10-27 Thread Erik van Oosten

Sound like what you need is a DynamicWebResource.

Regards,
   Erik.

Ittay Dror wrote:


Michael Sparer wrote:
  

take a look at headercontributors e.g.
http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/




This will only generate the reference to the javascript in the html page.
However, now when the browser tries to request this javascript file, I want
the request to go to the same Page object that created the html, so that it
renders the javascript file.

Assume FooPage.java. A request FooPage.html creates a call to FooPage. It
then contributes FooPage.js to the header and then I want a request to
FooPage.js to go back to FooPage so it creates the javascript file by using
the same hierarchy of components. 


Ittay
  



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: generate javascript file together with html page

2008-10-27 Thread Ittay Dror



Erik van Oosten wrote:
 
 Sound like what you need is a DynamicWebResource.
 

yes, sound like this can do it. but can i start a rendering cycle here so
that i get the bytes required at the end?



 
 Regards,
 Erik.
 
 Ittay Dror wrote:

 Michael Sparer wrote:
   
 take a look at headercontributors e.g.
 http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/

 

 This will only generate the reference to the javascript in the html page.
 However, now when the browser tries to request this javascript file, I
 want
 the request to go to the same Page object that created the html, so that
 it
 renders the javascript file.

 Assume FooPage.java. A request FooPage.html creates a call to FooPage. It
 then contributes FooPage.js to the header and then I want a request to
 FooPage.js to go back to FooPage so it creates the javascript file by
 using
 the same hierarchy of components. 

 Ittay
   
 
 
 -- 
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.com/
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20191181.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: generate javascript file together with html page

2008-10-27 Thread Erik van Oosten
I did not use this thing yet, but I believe that you will have to 
provide enough information to the DynamicWebResource so that it can 
generate what ever it needs to generate by itself. In an extreme case 
that could be simply a reference to the containing page, but that sounds 
quite dangerous to me.


Regards,
   Erik.


Ittay Dror wrote:


Erik van Oosten wrote:
  

Sound like what you need is a DynamicWebResource.




yes, sound like this can do it. but can i start a rendering cycle here so
that i get the bytes required at the end?




  



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: generate javascript file together with html page

2008-10-27 Thread Martijn Dashorst
I'm sure I don't understand your question, but in a futile attempt to
answer it anyway:

html
head
wicket:link
script src=FooPage.js/script
/wicket:link
/head
body
/body
/html

Martijn

On Mon, Oct 27, 2008 at 4:03 PM, Ittay Dror [EMAIL PROTECTED] wrote:



 Michael Sparer wrote:

 take a look at headercontributors e.g.
 http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/


 This will only generate the reference to the javascript in the html page.
 However, now when the browser tries to request this javascript file, I want
 the request to go to the same Page object that created the html, so that it
 renders the javascript file.

 Assume FooPage.java. A request FooPage.html creates a call to FooPage. It
 then contributes FooPage.js to the header and then I want a request to
 FooPage.js to go back to FooPage so it creates the javascript file by using
 the same hierarchy of components.

 Ittay





 regards,
 Michael


 Ittay Dror wrote:

 Hi,

 I'd like to create a page with lots of javascript code. For reasons of
 maintenance, I'd like the Page object to generate the html with reference
 to a javascript file with the same name and .js extension so when the
 browser tries to load this file the same Page object then renders (by
 using behaviors) the javascript content. (by saying 'object renders' I
 mean the normal wicket style rendering of delegating to the contained
 component hierarchies).

 Any pointers would be appreciated.

 Ittay




 --
 View this message in context: 
 http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: generate javascript file together with html page

2008-10-27 Thread Ittay Dror



Martijn Dashorst wrote:
 
 I'm sure I don't understand your question, but in a futile attempt to
 answer it anyway:
 
thanks for the effort ;)

my point is that the javascript file is also generated. e.g., the code in it
creates javascript objects that are attached to the html elements in the
containing page. of course, i can attach behaviors to those components that
will render the javascript inline the page, but it seems to me this will be
harder to read  (if the javascript objects interact with each other) and so
maintain.


 
 html
 head
 wicket:link
 script src=FooPage.js/script
 /wicket:link
 /head
 body
 /body
 /html
 
 Martijn
 
 On Mon, Oct 27, 2008 at 4:03 PM, Ittay Dror [EMAIL PROTECTED] wrote:



 Michael Sparer wrote:

 take a look at headercontributors e.g.
 http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/


 This will only generate the reference to the javascript in the html page.
 However, now when the browser tries to request this javascript file, I
 want
 the request to go to the same Page object that created the html, so that
 it
 renders the javascript file.

 Assume FooPage.java. A request FooPage.html creates a call to FooPage. It
 then contributes FooPage.js to the header and then I want a request to
 FooPage.js to go back to FooPage so it creates the javascript file by
 using
 the same hierarchy of components.

 Ittay





 regards,
 Michael


 Ittay Dror wrote:

 Hi,

 I'd like to create a page with lots of javascript code. For reasons of
 maintenance, I'd like the Page object to generate the html with
 reference
 to a javascript file with the same name and .js extension so when the
 browser tries to load this file the same Page object then renders (by
 using behaviors) the javascript content. (by saying 'object renders' I
 mean the normal wicket style rendering of delegating to the contained
 component hierarchies).

 Any pointers would be appreciated.

 Ittay




 --
 View this message in context:
 http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 
 
 -- 
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20192198.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: generate javascript file together with html page

2008-10-27 Thread Nino Saturnino Martinez Vazquez Wael

What about a texttemplate? For the js?

I wrote something about it here:

http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/

But it might be overkill.

Ittay Dror wrote:


Martijn Dashorst wrote:
  

I'm sure I don't understand your question, but in a futile attempt to
answer it anyway:



thanks for the effort ;)

my point is that the javascript file is also generated. e.g., the code in it
creates javascript objects that are attached to the html elements in the
containing page. of course, i can attach behaviors to those components that
will render the javascript inline the page, but it seems to me this will be
harder to read  (if the javascript objects interact with each other) and so
maintain.


  

html
head
wicket:link
script src=FooPage.js/script
/wicket:link
/head
body
/body
/html

Martijn

On Mon, Oct 27, 2008 at 4:03 PM, Ittay Dror [EMAIL PROTECTED] wrote:



Michael Sparer wrote:
  

take a look at headercontributors e.g.
http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/



This will only generate the reference to the javascript in the html page.
However, now when the browser tries to request this javascript file, I
want
the request to go to the same Page object that created the html, so that
it
renders the javascript file.

Assume FooPage.java. A request FooPage.html creates a call to FooPage. It
then contributes FooPage.js to the header and then I want a request to
FooPage.js to go back to FooPage so it creates the javascript file by
using
the same hierarchy of components.

Ittay





  

regards,
Michael


Ittay Dror wrote:


Hi,

I'd like to create a page with lots of javascript code. For reasons of
maintenance, I'd like the Page object to generate the html with
reference
to a javascript file with the same name and .js extension so when the
browser tries to load this file the same Page object then renders (by
using behaviors) the javascript content. (by saying 'object renders' I
mean the normal wicket style rendering of delegating to the contained
component hierarchies).

Any pointers would be appreciated.

Ittay

  


--
View this message in context:
http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


  


--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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