Re: Bypass CDATA contribution on script tags

2011-12-10 Thread Serban Balamaci
Hi Martin,
Problem was, the JS dev was specific about not wanting to contribute to the
head portion the JS template.
What I've done for a quick solution is that we moved the js templates in a
separate .tmpl files which sit next to the .html
Then I use a PackageTextTemplate to provide the template string to
replaceComponentTagBody of a WebMarkupContainer.

The template file contains all the embeded in script id=template1 tags.
This way he can keep editing the tmpl file and have it cleanly separated.

Thanks.

-
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bypass-CDATA-contribution-on-script-tags-tp4176752p4180698.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Bypass CDATA contribution on script tags

2011-12-09 Thread Serban Balamaci
Hi all,
Our javascript developer complains that Wicket automatically adds the CDATA
part whenever it encounters the *script* tag.
He's trying to embed a template in the html file(not in the head section)


and he gets a bunch of CDATA along with the html which will get
multiplied(we're creating a breadcrumb component)


we're using underscore.js and the idea it's based on
http://ejohn.org/blog/javascript-micro-templating/


I've said that the CDATA is there to pass the validation of the html, but he
says html5 is not xhtml and is much looser with validations.

-
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bypass-CDATA-contribution-on-script-tags-tp4176752p4176752.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Bypass CDATA contribution on script tags

2011-12-09 Thread Martin Grigorov
Hi,

Yes, this CDATA is there to be able to use  and  with XHTML.
You can construct the templates directly with renderString() method to
avoid the CDATA.

On Fri, Dec 9, 2011 at 3:17 PM, Serban Balamaci serban.balam...@asf.ro wrote:
 Hi all,
 Our javascript developer complains that Wicket automatically adds the CDATA
 part whenever it encounters the *script* tag.
 He's trying to embed a template in the html file(not in the head section)


 and he gets a bunch of CDATA along with the html which will get
 multiplied(we're creating a breadcrumb component)


 we're using underscore.js and the idea it's based on
 http://ejohn.org/blog/javascript-micro-templating/


 I've said that the CDATA is there to pass the validation of the html, but he
 says html5 is not xhtml and is much looser with validations.

 -
 http://balamaci.wordpress.com
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Bypass-CDATA-contribution-on-script-tags-tp4176752p4176752.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org