Re: Can I place my html (template) files in src/main/webapp

2008-03-03 Thread nicolas de loof
Found myself a partial response at

http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3

But this only work on my deve environment. When packaged as a war, I'd like
the ResourceStreamLocator to lookup the HTML templates in web application
context root.

Nico.

2008/3/3, nicolas de loof [EMAIL PROTECTED]:

 Hello,

 I'm just evaluating wicket and am very impressed by clean design.

 One killer benefict of separation of concerns is the pure HTML files that
 designer can edit without any knowledge of the underlying java code.
 I only have an issue as my static content (css, images) is in
 src/main/webapp and html templates in src/main/java. When launching a
 browser to look at the template, I get no css/imgage decorations.

 How can I setup wicket to get html templates from servlet context root and
 not from classpath ?

 or

 What are the best-practices to allow HTML display / design without any
 server running ?

 Nico.



[solved] : Can I place my html (template) files in src/main/webapp

2008-03-03 Thread nicolas de loof
I found a solution to set  :

resourceSettings.addResourceFolder(  ); // Web Application context
root

Nico.

2008/3/3, nicolas de loof [EMAIL PROTECTED]:

 Found myself a partial response at


 http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3

 But this only work on my deve environment. When packaged as a war, I'd
 like the ResourceStreamLocator to lookup the HTML templates in web
 application context root.

 Nico.

 2008/3/3, nicolas de loof [EMAIL PROTECTED]:
 
  Hello,
 
  I'm just evaluating wicket and am very impressed by clean design.
 
  One killer benefict of separation of concerns is the pure HTML files
  that designer can edit without any knowledge of the underlying java code.
  I only have an issue as my static content (css, images) is in
  src/main/webapp and html templates in src/main/java. When launching a
  browser to look at the template, I get no css/imgage decorations.
 
  How can I setup wicket to get html templates from servlet context root
  and not from classpath ?
 
  or
 
  What are the best-practices to allow HTML display / design without any
  server running ?
 
  Nico.
 




Re: Can I place my html (template) files in src/main/webapp

2008-03-03 Thread nicolas de loof
With this configuration, this seems to work as I expected :

resourceSettings.addResourceFolder( src/main/webapp );
resourceSettings.addResourceFolder(  ); // Web Application context
root

src/main/webapp is used during devs to get page refresh wen HTML template is
edited,  is used to point to webapp context root.

Nico.


2008/3/3, Igor Vaynberg [EMAIL PROTECTED]:

 so write a locator that does that?

 -igor



 On Mon, Mar 3, 2008 at 3:41 AM, nicolas de loof [EMAIL PROTECTED]
 wrote:
  Found myself a partial response at
 
 
 http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3
 
   But this only work on my deve environment. When packaged as a war, I'd
 like
   the ResourceStreamLocator to lookup the HTML templates in web
 application
   context root.
 
   Nico.
 
   2008/3/3, nicolas de loof [EMAIL PROTECTED]:
 
 
  
Hello,
   
I'm just evaluating wicket and am very impressed by clean design.
   
One killer benefict of separation of concerns is the pure HTML files
 that
designer can edit without any knowledge of the underlying java code.
I only have an issue as my static content (css, images) is in
src/main/webapp and html templates in src/main/java. When launching a
browser to look at the template, I get no css/imgage decorations.
   
How can I setup wicket to get html templates from servlet context
 root and
not from classpath ?
   
or
   
What are the best-practices to allow HTML display / design without
 any
server running ?
   
Nico.
   
 


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




Changing html-template programmatically?

2007-09-27 Thread wfaler

Hi,
Is it possible to change the default html-template file loaded for a class
programmatically (for instance, changing from a classpath file, to a file in
another file-directory)?
For instance, if I want to change the underlying html-template on the fly,
but keeping the same component hierarchy?

Regards
Wille
-- 
View this message in context: 
http://www.nabble.com/Changing-html-template-programmatically--tf4529206.html#a12923955
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: Changing html-template programmatically?

2007-09-27 Thread Matthijs Wensveen

wfaler wrote:

Hi,
Is it possible to change the default html-template file loaded for a class
programmatically (for instance, changing from a classpath file, to a file in
another file-directory)?
For instance, if I want to change the underlying html-template on the fly,
but keeping the same component hierarchy?

Regards
Wille
  

Hi Wille,

You can implement IResourceStreamLocator and set an instance of that on 
your application: 
myApplication.getResouceSettings().setResourceStreamLocator(myResourceStreamLocator);


You can then return an IResourceStream from any source you might have 
(another directory, a database, anything)
A nifty trick (I think) is to use the locator that is already set on the 
application to fall back to when your locator can't find the requested 
resource, but that is up to you and your requirements.


When you don't want to set a IResourceStreamLocator globally, but just 
for a component, you can have that component implement 
IMarkupResourceStreamProvider (and preferably also 
IMarkupCacheKeyProvider). This way you can return a desired 
IResourceStream based on some model property if you like.


Be careful that you do add the required components to your hierarchy. 
This is especially true when you generate markup dynamically.
Also, take a look at the custom template / resource loading examples at: 
http://wicketstuff.org/wicket13/customresourceloading/


BTW, does anyone know what the purpose of 
application.getResourceSettings().getResourceFinder() is?


Regards,
Matthijs

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



Why TD can't include background attribute in html template?

2007-08-22 Thread smithfox

I'm a wicket beginner,
Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2 bug

If you write a td with a background attribute, all wicket:id after the td
will can't be recognized.

My html template is a simple form. 
UTF-8
-- 
View this message in context: 
http://www.nabble.com/Why-TD-can%27t-include-background-attribute-in-html-template--tf4309559.html#a12268532
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: Why TD can't include background attribute in html template?

2007-08-22 Thread smithfox

The zip file is my project zip ball

http://www.nabble.com/file/p12271290/wicket_test.zip wicket_test.zip 



Martin Funk-3 wrote:
 
 smithfox schrieb:
 I'm a wicket beginner,
 Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2 bug

 If you write a td with a background attribute, all wicket:id after the td
 will can't be recognized.

 My html template is a simple form. 
 UTF-8
   
 Could you post the the template code of the form and maybe the generated 
 html of that form?
 
 Martin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Why-TD-can%27t-include-background-attribute-in-html-template--tf4309559.html#a12271290
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: Why TD can't include background attribute in html template?

2007-08-22 Thread smithfox

Thank you for reporting the bug.

But I test following code is OK, Anbody can do more test under my project
codes.

form
table
trtd background=images/abc.png/td/tr
/table
/form

For duplicating the bug:
I think the form should have tow layer nested tables and the better add some
Chinese text :)
Beacuse I don't know the really cause.


Martin Funk-3 wrote:
 
 smithfox schrieb:
 The zip file is my project zip ball

 http://www.nabble.com/file/p12271290/wicket_test.zip wicket_test.zip 



 Martin Funk-3 wrote:
   
 smithfox schrieb:
 
 I'm a wicket beginner,
 Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2
 bug

 If you write a td with a background attribute, all wicket:id after the
 td
 will can't be recognized.

 My html template is a simple form. 
 UTF-8
   
   
 Could you post the the template code of the form and maybe the generated 
 html of that form?

 Martin

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



 

   
 I'd say it is a bug.
 
 Could you please verify if the bug i filed describes you problem poperly?
 https://issues.apache.org/jira/browse/WICKET-871
 
 mf
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Why-TD-can%27t-include-background-attribute-in-html-template--tf4309559.html#a12274236
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: Why TD can't include background attribute in html template?

2007-08-22 Thread Martin Funk

smithfox schrieb:

Thank you for reporting the bug.

But I test following code is OK, Anbody can do more test under my project
codes.

form
table
trtd background=images/abc.png/td/tr
/table
/form
  
I think the problem comes up when a wicket markup element is surounded 
by an markup element with an attribute refering to some resource using a 
relative path.

Some thing like

td background=images/abc.png
p wicket:id=foobar/p
/td

mf

For duplicating the bug:
I think the form should have tow layer nested tables and the better add some
Chinese text :)
Beacuse I don't know the really cause.


Martin Funk-3 wrote:
  

smithfox schrieb:


The zip file is my project zip ball

http://www.nabble.com/file/p12271290/wicket_test.zip wicket_test.zip 




Martin Funk-3 wrote:
  
  

smithfox schrieb:



I'm a wicket beginner,
Yesterday, I find a problem, but I can't sure it is a wicket1.3beta2
bug

If you write a td with a background attribute, all wicket:id after the
td
will can't be recognized.

My html template is a simple form. 
UTF-8
  
  
  
Could you post the the template code of the form and maybe the generated 
html of that form?


Martin

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





  
  

I'd say it is a bug.

Could you please verify if the bug i filed describes you problem poperly?
https://issues.apache.org/jira/browse/WICKET-871

mf

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






  



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



HTML template

2007-08-12 Thread Mathias P.W Nilsson

Is there any way of changing the HTML template without extending the class?
-- 
View this message in context: 
http://www.nabble.com/HTML-template-tf4257008.html#a12114907
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: HTML template

2007-08-12 Thread Igor Vaynberg
seeing as that is the entire point of wicket - pragmatic markup manipulation
- the answer is no, not with wicket. you can however use text manipulation
libs like velocity, etc.

-igor


On 8/12/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:


 Is there any way of changing the HTML template without extending the
 class?
 --
 View this message in context:
 http://www.nabble.com/HTML-template-tf4257008.html#a12114907
 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: HTML template

2007-08-12 Thread Mathias P.W Nilsson

Ok thanks!

Havn't read much of freemarkers and velocity. What do you think is the most
common use. Plain html seems as a good idé.
-- 
View this message in context: 
http://www.nabble.com/HTML-template-tf4257008.html#a12115137
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: HTML template

2007-08-12 Thread Igor Vaynberg
not sure what you mean

-igor


On 8/12/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:


 Ok thanks!

 Havn't read much of freemarkers and velocity. What do you think is the
 most
 common use. Plain html seems as a good idé.
 --
 View this message in context:
 http://www.nabble.com/HTML-template-tf4257008.html#a12115137
 Sent from the Wicket - User mailing list archive at Nabble.com.


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