[Wicket-user] Wicket changes relative urls to static ones - and messes up my deployment.

2006-10-27 Thread Christian Hvid
Hi there.

Thanks for a great framework.

Is it possible to control this behaviour or work around it?

When I have this in my html template:

link href=style.css media=screen rel=Stylesheet type=text/css/

And I deploy it in my servlet container (which is tomcat 5.5) it is changed to:

link href=/my-web-app/style.css media=screen rel=Stylesheet
type=text/css/

That is: Wicket changes my relative URL into an absolute URL based on
the path where the application is mounted.

The same goes for other URLs - ie. inside an img tag.

When I am deploying my web application I have an Apache 2 web server
sitting in front which is doing virtual hosting and proxying. This
requires the URLs to be relative.

-- Christian

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket changes relative urls to static ones - and messes up my deployment

2006-10-27 Thread Christian Hvid
I am resending this one as there seem to be some problems with
sourceforge's mailing lists and gmail:

Hi there.

Thanks for a great framework.

Is it possible to control this behaviour or work around it?

When I have this in my html template:

link href=style.css media=screen rel=Stylesheet type=text/css/

And I deploy it in my servlet container (which is tomcat 5.5) it is
changed to:

link href=/my-web-app/style.css media=screen rel=Stylesheet
type=text/css/

That is: Wicket changes my relative URL into an absolute URL based on
the path where the application is mounted.

The same goes for other URLs - ie. inside an img tag.

When I am deploying my web application I have an Apache 2 web server
sitting in front which is doing virtual hosting and proxying. This
requires the URLs to be relative.

-- Christian

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket changes relative urls to static ones - and messes up my deployment.

2006-10-27 Thread Christian Hvid
Thank you. That did it.

I only noticed the new wiki now; it is beautiful.

On 10/27/06, Frank Bille [EMAIL PROTECTED] wrote:
 Hey

 Take a look at:

 http://cwiki.apache.org/WICKET/wicket-behind-a-front-end-proxy.html#Wicketbehindafront-endproxy-HowtofixWicketgeneratedlinks

 Frank


 On 10/27/06, Christian Hvid [EMAIL PROTECTED] wrote:
 
  Hi there.
 
  Thanks for a great framework.
 
  Is it possible to control this behaviour or work around it?
 
  When I have this in my html template:
 
  link href=style.css media=screen rel=Stylesheet type=text/css/
 
  And I deploy it in my servlet container (which is tomcat 5.5) it is
 changed to:
 
  link href=/my-web-app/style.css media=screen rel=Stylesheet
  type=text/css/
 
  That is: Wicket changes my relative URL into an absolute URL based on
  the path where the application is mounted.
 
  The same goes for other URLs - ie. inside an img tag.
 
  When I am deploying my web application I have an Apache 2 web server
  sitting in front which is doing virtual hosting and proxying. This
  requires the URLs to be relative.
 
  -- Christian
 
 
 -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket requires my model to be serializable???

2006-09-14 Thread Christian Hvid
Hi.

I keep getting:

WicketMessage: Internal error cloning object. Make sure all dependent  
objects implement Serializable. Class: ...
...

I am using wicket 1.2.2 - when I roll back to an earlier version of  
1.2 (checked out from main trunk in february) - the problem is gone  
and everything works fine.

What is going on?

What is the right way to handle this?

-- Chritsian

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket requires my model to be serializable???

2006-09-14 Thread Christian Hvid
It helped.

Thank you.

On 14 Sep 2006, at 15:00, Dirk Markert wrote:

 Maybe this helps:

 http://www.wicket-wiki.org.uk/wiki/index.php/FAQs#I_get_. 
 27Internal_error_cloning_object.27_errors

 2006/9/14, Christian Hvid [EMAIL PROTECTED]: Hi.

 I keep getting:

 WicketMessage: Internal error cloning object. Make sure all dependent
 objects implement Serializable. Class: ...
 ...

 I am using wicket 1.2.2 - when I roll back to an earlier version of
 1.2 (checked out from main trunk in february) - the problem is gone
 and everything works fine.

 What is going on?

 What is the right way to handle this?

 -- Chritsian

 -- 
 ---
 Using Tomcat but need to do more? Need to support web services,  
 security?
 Get stuff done quickly with pre-integrated technology to make your  
 job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache  
 Geronimo
 http://sel.as-us.falkag.net/sel? 
 cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 -- 
 ---
 Using Tomcat but need to do more? Need to support web services,  
 security?
 Get stuff done quickly with pre-integrated technology to make your  
 job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache  
 Geronimo
 http://sel.as-us.falkag.net/sel? 
 cmd=lnkkid=120709bid=263057dat=121642__ 
 _
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: Results so far (was Re: [Wicket-user] VOTE)

2006-02-20 Thread Christian Hvid

I am one for a move to Java 5 as fast as possible.

From my perspective Wicket is a young framework and if we are  
adventurously enough to choose Wicket, we are adventurously enough to  
be on Java 5.


On 21 Feb 2006, at 00:27, Al Maw wrote:


Alexandru Popescu wrote:

I know that this might be early considering the lenght of the thread,
but what is the voting result? :-).


So far I count:
  40 votes for both at once (constructor and JDK5)
  17 votes for split releases (16 plus me, I'm voting now. :-) )

Al


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through  
log files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD  
SPLUNK!
http://sel.as-us.falkag.net/sel? 
cmd=lnkkid=103432bid=230486dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Setting the style class of a component?

2006-02-19 Thread Christian Hvid

Hi wicket list.

I am trying to set the class attribute of a wicket component:

html
body
span wicket:id=label1.../span
/body
/html

public class MyPage extends WebPage {
  private Label label1;
  public MyPage() {
add(label1 = new Label(label1, some text));

// How do I do this v ?

if (Math.random()  0.5) label1.setStyleClass(SomeClass);
else label1.setStyleClass(AnotherClass);

// ???
  }
}

I want it to render as either:

html
body
span class=SomeClasssome text/span
/body
/html

or:

html
body
span class=AnotherClasssome text/span
/body
/html

Can anyone help?

Thanks in advance.

And thanks for a good looking web framework.

-- Christian



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting the style class of a component?

2006-02-19 Thread Christian Hvid

It works. Perfect.

On 19 Feb 2006, at 14:51, Martijn Dashorst wrote:


Use an AttributeModifier for this:

label1.add(new AttributeModifier(class, true, new Model() {
Object getObject(Component comp) {
return Math.random()0.5 ? SomeClass : AnotherClass;
}
});

Martijn

On 2/19/06, Christian Hvid [EMAIL PROTECTED] wrote:

Hi wicket list.

I am trying to set the class attribute of a wicket component:

html
body
span wicket:id=label1.../span
/body
/html

public class MyPage extends WebPage {
   private Label label1;
   public MyPage() {
 add(label1 = new Label(label1, some text));

 // How do I do this v ?

 if (Math.random()  0.5) label1.setStyleClass(SomeClass);
 else label1.setStyleClass(AnotherClass);

 // ???
   }
}

I want it to render as either:

html
body
span class=SomeClasssome text/span
/body
/html

or:

html
body
span class=AnotherClasssome text/span
/body
/html

Can anyone help?

Thanks in advance.

And thanks for a good looking web framework.

-- Christian



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through  
log files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD  
SPLUNK!
http://sel.as-us.falkag.net/sel? 
cmd=lnkkid=103432bid=230486dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through  
log files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD  
SPLUNK!

http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Changing a div tag to a p tag breaks wicket?!

2006-02-19 Thread Christian Hvid

Hi.

Is there any sensible explanation for the following:

I am writing a comments component with the following view / controller:

html
body

wicket:panel

h1Comments/h1

div wicket:id=comments
span wicket:id=text/spanbr/
-- span wicket:id=user/span
/div

div class=Edit
input type=button value=nbsp;nbsp;Add  
Commentnbsp;nbsp;/

/div

/wicket:panel

/body
/html

public class Comments extends Panel {
static class Comment {
String text;
String user;
Date date;
Comment(String text, String user, Date date) {
this.text = text;
this.user = user;
this.date = date;
}
}
private ListComment comments = new ArrayListComment();
public Comments(String id) {
super(id);

comments.add(new Comment(Aloha Hawaii, peter, new Date()));

add(new ListView(comments, comments) {
public void populateItem(ListItem listItem) {
Comment comment = (Comment)listItem.getModelObject();

listItem.add(new Label(text, comment.text));
listItem.add(new Label(user, comment.user));
}
});

}
}

Which works fine.

However if change the div tag to a p tag for the list view:

html
body

wicket:panel

h1Comments/h1

p wicket:id=comments
span wicket:id=text/spanbr/
-- span wicket:id=user/span
/p

div class=Edit
input type=button value=nbsp;nbsp;Add  
Commentnbsp;nbsp;/

/div

/wicket:panel

/body
/html

The code breaks with a wicket.markup.MarkupException saying that it  
cannot find component with id text - eventhough it is quite obviously  
there.


I am using wicket 1.1.1.

-- Christian



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket reload broken?

2006-02-19 Thread Christian Hvid
I have set up my wicket application to reload constantly my templates:
public class MyWebApplication extends WebApplication { public MyWebApplication() { getSettings().setResourcePollFrequency(Duration.ONE_SECOND); getPages().setHomePage(Index.class); }
 protected void init() { getSettings().addResourceFolder(/java/myapp/templates); }}
And this works excerpt for two problems:
1. (After more than one deployment using Tomcat Manager). The log of my Apache Tomcat is filled with this every second:
Feb 19, 2006 5:40:27 PM wicket.util.thread.Task$1 runSEVERE: Unhandled exception thrown by user code in task ModificationWatcherjava.lang.NullPointerException at wicket.util.parse.metapattern.MetaPattern.toString
(MetaPattern.java:323) at wicket.util.parse.metapattern.MetaPattern.compile(MetaPattern.java:343) at wicket.util.parse.metapattern.MetaPattern.matcher(MetaPattern.java:277) at wicket.util.parse.metapattern.MetaPattern.matcher
(MetaPattern.java:259) at wicket.util.parse.metapattern.parsers.MetaPatternParser.init(MetaPatternParser.java:71) at wicket.util.parse.metapattern.parsers.TagNameParser.init(TagNameParser.java
:54) at wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:570) at wicket.markup.parser.XmlPullParser.nextTag(XmlPullParser.java:303) at wicket.markup.parser.XmlPullParser.nextTag
(XmlPullParser.java:282) at wicket.markup.parser.filter.WicketTagIdentifier.nextTag(WicketTagIdentifier.java:98) at wicket.markup.parser.filter.TagTypeHandler.nextTag(TagTypeHandler.java:83) at 
wicket.markup.parser.filter.HtmlHandler.nextTag(HtmlHandler.java:86) at wicket.markup.parser.filter.WicketParamTagHandler.nextTag(WicketParamTagHandler.java:120) at wicket.markup.parser.filter.WicketRemoveTagHandler.nextTag
(WicketRemoveTagHandler.java:64) at wicket.markup.parser.filter.WicketLinkTagHandler.nextTag(WicketLinkTagHandler.java:90) at wicket.markup.parser.filter.BodyOnLoadHandler.nextTag(BodyOnLoadHandler.java
:63) at wicket.markup.parser.filter.HtmlHeaderSectionHandler.nextTag(HtmlHeaderSectionHandler.java:86) at wicket.markup.MarkupParser.parseMarkup(MarkupParser.java:275) at wicket.markup.MarkupParser.readAndParse
(MarkupParser.java:236) at wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:219) at wicket.markup.MarkupCache.access$100(MarkupCache.java:45) at wicket.markup.MarkupCache$1.onChange(MarkupCache.java
:288) at wicket.util.listener.ChangeListenerSet.notifyListener(ChangeListenerSet.java:32) at wicket.util.listener.ListenerSet.notifyListeners(ListenerSet.java:60) at wicket.util.watch.ModificationWatcher$1.run
(ModificationWatcher.java:168) at wicket.util.thread.Task$1.run(Task.java:103) at java.lang.Thread.run(Thread.java:595)
(Apache Tomcat 5.5 / Windows XP)
2. If a make the following spelling mistake:
htmlbodydiv id=Header wicket:id=header/div/body/html
 
htmlbodydiv id=Header wicket:id=header/div/body/html
It will fail with:
wicket.WicketRuntimeException: The component(s) below failed to render ...
However it will not reload if I correct it back again. Correction is only effective if I redeploy.
Any solutions?
I am using wicket 1.1.1 - should I try another version?
-- Christian


Re: [Wicket-user] Wicket reload broken?

2006-02-19 Thread Christian Hvid

Problem #1 is gone.

But problem #2 is still there.

Tested with 1.2-20060216 from sourceforge and head of main trunk CVS.

On 19 Feb 2006, at 21:49, Juergen Donnerstag wrote:


1.2 HEAD. 1.2 just removes the markup from the cache without trying to
reload it. It is reloaded the next time the resource is requested.

Juergen

On 2/19/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

head 1.1 branch?
-Igor



On 2/19/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:


its fixed in HEAD

Juergen

On 2/19/06, Christian Hvid  [EMAIL PROTECTED] wrote:



I have set up my wicket application to reload constantly my  
templates:


public class MyWebApplication extends WebApplication {
public MyWebApplication() {



getSettings().setResourcePollFrequency(Duration.ONE_SECOND);

getPages().setHomePage(Index.class);
}
protected void init() {



getSettings().addResourceFolder(/java/myapp/templates);

}
}

And this works excerpt for two problems:

1. (After more than one deployment using Tomcat Manager). The  
log of my

Apache Tomcat is filled with this every second:

Feb 19, 2006 5:40:27 PM wicket.util.thread.Task$1 run
SEVERE: Unhandled exception thrown by user code in task

ModificationWatcher

java.lang.NullPointerException
at
wicket.util.parse.metapattern.MetaPattern.toString
(MetaPattern.java:323)
at

wicket.util.parse.metapattern.MetaPattern.compile(MetaPattern.java: 
343)

at
wicket.util.parse.metapattern.MetaPattern.matcher

(MetaPattern.java:277)

at
wicket.util.parse.metapattern.MetaPattern.matcher
(MetaPattern.java:259)
at


wicket.util.parse.metapattern.parsers.MetaPatternParser.init(
MetaPatternParser.java:71)

at

wicket.util.parse.metapattern.parsers.TagNameParser.init 
(TagNameParser.java

:54)
at
wicket.markup.parser.XmlPullParser.parseTagText

(XmlPullParser.java:570)

at


wicket.markup.parser.XmlPullParser.nextTag(XmlPullParser.java:303)

at wicket.markup.parser.XmlPullParser.nextTag
(XmlPullParser.java:282)
at

wicket.markup.parser.filter.WicketTagIdentifier.nextTag 
(WicketTagIdentifier.java:98)

at

wicket.markup.parser.filter.TagTypeHandler.nextTag 
(TagTypeHandler.java:83)

at


wicket.markup.parser.filter.HtmlHandler.nextTag(HtmlHandler.java:86)

at

wicket.markup.parser.filter.WicketParamTagHandler.nextTag 
(WicketParamTagHandler.java:120)

at


wicket.markup.parser.filter.WicketRemoveTagHandler.nextTag

(WicketRemoveTagHandler.java:64)
at

wicket.markup.parser.filter.WicketLinkTagHandler.nextTag 
(WicketLinkTagHandler.java:90)

at
wicket.markup.parser.filter.BodyOnLoadHandler.nextTag

(BodyOnLoadHandler.java

:63)
at

wicket.markup.parser.filter.HtmlHeaderSectionHandler.nextTag 
(HtmlHeaderSectionHandler.java:86)

at
wicket.markup.MarkupParser.parseMarkup

(MarkupParser.java:275)

at wicket.markup.MarkupParser.readAndParse
(MarkupParser.java:236)
at


wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:219)

at


wicket.markup.MarkupCache.access$100(MarkupCache.java:45)

at
wicket.markup.MarkupCache$1.onChange(MarkupCache.java

:288)

at
wicket.util.listener.ChangeListenerSet.notifyListener

(ChangeListenerSet.java:32)

at


wicket.util.listener.ListenerSet.notifyListeners(ListenerSet.java:60)

at wicket.util.watch.ModificationWatcher$1.run
(ModificationWatcher.java :168)
at wicket.util.thread.Task$1.run(Task.java:103)
at java.lang.Thread.run(Thread.java:595)

(Apache Tomcat 5.5 / Windows XP)

2. If a make the following spelling mistake:

html
body
div id=Header wicket:id=header
/div
/body
/html

  

html
body
div id=Header wicket:id=header
/div
/body
/html

It will fail with:

wicket.WicketRuntimeException: The component(s) below failed to  
render

...


However it will not reload if I correct it back again.  
Correction is

only

effective if I redeploy.

Any solutions?

I am using wicket 1.1.1 - should I try another version?

-- Christian




---
This SF.net email is sponsored by: Splunk Inc. Do you grep  
through log

files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD  
SPLUNK!



http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







---
This SF.net email is sponsored by: Splunk Inc. Do you grep through  
log files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD  
SPLUNK!

http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user

[Wicket-user] Re: Changing a div tag to a p tag breaks wicket?!

2006-02-19 Thread Christian Hvid

The problem is not present in 1.2 HEAD.

On 19 Feb 2006, at 16:43, Christian Hvid wrote:


Hi.

Is there any sensible explanation for the following:

I am writing a comments component with the following view /  
controller:


html
body

wicket:panel

h1Comments/h1

div wicket:id=comments
span wicket:id=text/spanbr/
-- span wicket:id=user/span
/div

div class=Edit
input type=button value=nbsp;nbsp;Add  
Commentnbsp;nbsp;/

/div

/wicket:panel

/body
/html

public class Comments extends Panel {
static class Comment {
String text;
String user;
Date date;
Comment(String text, String user, Date date) {
this.text = text;
this.user = user;
this.date = date;
}
}
private ListComment comments = new ArrayListComment();
public Comments(String id) {
super(id);

comments.add(new Comment(Aloha Hawaii, peter, new Date 
()));


add(new ListView(comments, comments) {
public void populateItem(ListItem listItem) {
Comment comment = (Comment)listItem.getModelObject();

listItem.add(new Label(text, comment.text));
listItem.add(new Label(user, comment.user));
}
});

}
}

Which works fine.

However if change the div tag to a p tag for the list view:

html
body

wicket:panel

h1Comments/h1

p wicket:id=comments
span wicket:id=text/spanbr/
-- span wicket:id=user/span
/p

div class=Edit
input type=button value=nbsp;nbsp;Add  
Commentnbsp;nbsp;/

/div

/wicket:panel

/body
/html

The code breaks with a wicket.markup.MarkupException saying that it  
cannot find component with id text - eventhough it is quite  
obviously there.


I am using wicket 1.1.1.

-- Christian





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket reload broken?

2006-02-19 Thread Christian Hvid
Just tested again - problem #2 is still there - if the page is broken  
it is not reloaded when edited.


Another thing: I am running Java 1.5 and I had to patch up build.xml  
with source=1.4 at all javac calls. Should be simple to fix.


But other than these couple of small bugs - it is sure a nice  
framework. Congrats :-D


On 19 Feb 2006, at 23:23, Juergen Donnerstag wrote:


well, it works on my side though (as mentioned with 1.2 HEAD). It'll
not work with 1.1.1 and we are (most likely) not going to backport the
reloading strategy to 1.1.1

Juergen

On 2/19/06, Christian Hvid [EMAIL PROTECTED] wrote:

Problem #1 is gone.

But problem #2 is still there.

Tested with 1.2-20060216 from sourceforge and head of main trunk CVS.

On 19 Feb 2006, at 21:49, Juergen Donnerstag wrote:

1.2 HEAD. 1.2 just removes the markup from the cache without  
trying to

reload it. It is reloaded the next time the resource is requested.

Juergen

On 2/19/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

head 1.1 branch?
-Igor



On 2/19/06, Juergen Donnerstag [EMAIL PROTECTED]  
wrote:


its fixed in HEAD

Juergen

On 2/19/06, Christian Hvid  [EMAIL PROTECTED] wrote:



I have set up my wicket application to reload constantly my
templates:

public class MyWebApplication extends WebApplication {
public MyWebApplication() {



getSettings().setResourcePollFrequency(Duration.ONE_SECOND);

getPages().setHomePage(Index.class);
}
protected void init() {



getSettings().addResourceFolder(/java/myapp/templates);

}
}

And this works excerpt for two problems:

1. (After more than one deployment using Tomcat Manager). The
log of my
Apache Tomcat is filled with this every second:

Feb 19, 2006 5:40:27 PM wicket.util.thread.Task$1 run
SEVERE: Unhandled exception thrown by user code in task

ModificationWatcher

java.lang.NullPointerException
at
wicket.util.parse.metapattern.MetaPattern.toString
(MetaPattern.java:323)
at


wicket.util.parse.metapattern.MetaPattern.compile(MetaPattern.java:
343)

at
wicket.util.parse.metapattern.MetaPattern.matcher

(MetaPattern.java:277)

at
wicket.util.parse.metapattern.MetaPattern.matcher
(MetaPattern.java:259)
at


wicket.util.parse.metapattern.parsers.MetaPatternParser.init(
MetaPatternParser.java:71)

at


wicket.util.parse.metapattern.parsers.TagNameParser.init
(TagNameParser.java

:54)
at
wicket.markup.parser.XmlPullParser.parseTagText

(XmlPullParser.java:570)

at


wicket.markup.parser.XmlPullParser.nextTag(XmlPullParser.java:303)

at wicket.markup.parser.XmlPullParser.nextTag
(XmlPullParser.java:282)
at


wicket.markup.parser.filter.WicketTagIdentifier.nextTag
(WicketTagIdentifier.java:98)

at


wicket.markup.parser.filter.TagTypeHandler.nextTag
(TagTypeHandler.java:83)

at

wicket.markup.parser.filter.HtmlHandler.nextTag(HtmlHandler.java: 
86)

at


wicket.markup.parser.filter.WicketParamTagHandler.nextTag
(WicketParamTagHandler.java:120)

at


wicket.markup.parser.filter.WicketRemoveTagHandler.nextTag

(WicketRemoveTagHandler.java:64)
at


wicket.markup.parser.filter.WicketLinkTagHandler.nextTag
(WicketLinkTagHandler.java:90)

at
wicket.markup.parser.filter.BodyOnLoadHandler.nextTag

(BodyOnLoadHandler.java

:63)
at


wicket.markup.parser.filter.HtmlHeaderSectionHandler.nextTag
(HtmlHeaderSectionHandler.java:86)

at
wicket.markup.MarkupParser.parseMarkup

(MarkupParser.java:275)

at wicket.markup.MarkupParser.readAndParse
(MarkupParser.java:236)
at


wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:219)

at


wicket.markup.MarkupCache.access$100(MarkupCache.java:45)

at
wicket.markup.MarkupCache$1.onChange(MarkupCache.java

:288)

at
wicket.util.listener.ChangeListenerSet.notifyListener

(ChangeListenerSet.java:32)

at

wicket.util.listener.ListenerSet.notifyListeners 
(ListenerSet.java:60)

at wicket.util.watch.ModificationWatcher$1.run
(ModificationWatcher.java :168)
at wicket.util.thread.Task$1.run(Task.java:103)
at java.lang.Thread.run(Thread.java:595)

(Apache Tomcat 5.5 / Windows XP)

2. If a make the following spelling mistake:

html
body
div id=Header wicket:id=header
/div
/body
/html

  

html
body
div id=Header wicket:id=header
/div
/body
/html

It will fail with:

wicket.WicketRuntimeException: The component(s) below failed to
render

...


However it will not reload if I correct it back again.
Correction is

only

effective if I redeploy.

Any solutions?

I am using wicket 1.1.1 - should I try another version?

-- Christian




---
This SF.net email is sponsored by: Splunk Inc. Do you grep
through log

files
for problems?  Stop!  Download the new AJAX search engine that  
makes

searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!


http://sel.as-us.falkag.net/sel