[Wicket-user] Re: Remove a Behavior?

2006-01-27 Thread Jim McLaughlin
That would work except that I still have the problem of removing the 
behavior from the list while the list is being iterated. Also, this uses 
the api in a way that doesn't match up with the wicket documentation, 
and I know that will cause some grief down the road.


thx,
jim

Eelco Hillenius wrote:

On second thought... can't you use the detach method of behaviours?
This has the same effect as onEndRequest.

Eelco

On 1/26/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


That would be great. I would prefer my custom components know as little
as possible about what the behavior needs to do.

thx,
jim

Eelco Hillenius wrote:


If you work with custom components, you could override onEndRequest
and do the work there. I thought that this issue might come up some
time, and kind of expected we might want to implement life cycle call
backs (onBeginRequest, onEndRequest) on behaviours some day. I didn't
implement it right away, as I first wanted us to get across a use case
where this would actually be wanted. This might be such a use case.

Eelco


On 1/26/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:



May be we could implement a class Behaviors which provdes an interface
similar to List which provides "secure" implementations of e.g.
remove().

Juergen

On 1/26/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:



What I would like to do have the behavior remove itself by calling
component.getBehaviors ().remove (this); in its rendered() method (this
is the last method called on the Behavior during the request cycle,
right?). I don't believe this is safe since the behavior list is being
iterated at that point. Any ideas how and where this can be done?

thx,
jim

Juergen Donnerstag wrote:



It should be possible. Component.getBehaviors().remove(myBehavior)

Juergen

On 1/26/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:




I ran into the same question yesterday.

Usecase:

singleton attributemodifier.

in css:
.hidden {
 display : none;
}

in html:









in Java:
class MyModifiers {
 private static AttributeModifier hider = new ClassAttributeModifier();
 public static void hide(Component comp) {
 comp.add(hider);
 }
 public static void show(Component comp) {
 comp.remove(hider);
 }
}

class MyPage {
 MyPage() {
 MarkupContainer foo = new MarkupContainer("foo");
 MarkupContainer bar = new MarkupContainer("bar");
 if(somecondition) {
 MyModifiers.hide(foo);
 MyModifiers.show(bar);
 } else {
 MyModifiers.show(foo);
 MyModifiers.hide(bar);
 }
 }
}

On 1/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:




I don't really understand how/ where/ when you would do the add/
remove operation. However, I can't think of anything against the
option of removing behaviors either.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:




Yes my behavior is smart enough not to do its transform if the
RequestTarget isn't of the right type, but what I really want to do is
add the behavior only if the RequestTarget is a ComponentRequestTarget,
and then remove it once that request cycle is done. That way it is only
there if it is needed, and not by default, and not when the user does a
full page refresh for the next request.  Like you said, it can be coded
around. But there is a use for removing behaviors, and it would be
pleasant to have it supported :). Should I open an rfe?

thx,
jim

Eelco Hillenius wrote:




I think the best you can do is make your behavior smart enough so that
it doesn't do anything after it did it's transform.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:





Is it possible to remove a behavior from a component? I have created a
MarkupEscapeTransformer and would like to remove it after the transform
has occurred. If it is possible, where in the request cycle should it
happen?

thanks,

jim



---
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=lnk&kid=103432&bid=230486&dat=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=k&kid3432&bid#0486&dat1642




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

[Wicket-user] Re: Remove a Behavior?

2006-01-26 Thread Jim McLaughlin
That would be great. I would prefer my custom components know as little 
as possible about what the behavior needs to do.


thx,
jim

Eelco Hillenius wrote:

If you work with custom components, you could override onEndRequest
and do the work there. I thought that this issue might come up some
time, and kind of expected we might want to implement life cycle call
backs (onBeginRequest, onEndRequest) on behaviours some day. I didn't
implement it right away, as I first wanted us to get across a use case
where this would actually be wanted. This might be such a use case.

Eelco


On 1/26/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:


May be we could implement a class Behaviors which provdes an interface
similar to List which provides "secure" implementations of e.g.
remove().

Juergen

On 1/26/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


What I would like to do have the behavior remove itself by calling
component.getBehaviors ().remove (this); in its rendered() method (this
is the last method called on the Behavior during the request cycle,
right?). I don't believe this is safe since the behavior list is being
iterated at that point. Any ideas how and where this can be done?

thx,
jim

Juergen Donnerstag wrote:


It should be possible. Component.getBehaviors().remove(myBehavior)

Juergen

On 1/26/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:



I ran into the same question yesterday.

Usecase:

singleton attributemodifier.

in css:
.hidden {
  display : none;
}

in html:









in Java:
class MyModifiers {
  private static AttributeModifier hider = new ClassAttributeModifier();
  public static void hide(Component comp) {
  comp.add(hider);
  }
  public static void show(Component comp) {
  comp.remove(hider);
  }
}

class MyPage {
  MyPage() {
  MarkupContainer foo = new MarkupContainer("foo");
  MarkupContainer bar = new MarkupContainer("bar");
  if(somecondition) {
  MyModifiers.hide(foo);
  MyModifiers.show(bar);
  } else {
  MyModifiers.show(foo);
  MyModifiers.hide(bar);
  }
  }
}

On 1/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:



I don't really understand how/ where/ when you would do the add/
remove operation. However, I can't think of anything against the
option of removing behaviors either.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:



Yes my behavior is smart enough not to do its transform if the
RequestTarget isn't of the right type, but what I really want to do is
add the behavior only if the RequestTarget is a ComponentRequestTarget,
and then remove it once that request cycle is done. That way it is only
there if it is needed, and not by default, and not when the user does a
full page refresh for the next request.  Like you said, it can be coded
around. But there is a use for removing behaviors, and it would be
pleasant to have it supported :). Should I open an rfe?

thx,
jim

Eelco Hillenius wrote:



I think the best you can do is make your behavior smart enough so that
it doesn't do anything after it did it's transform.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:




Is it possible to remove a behavior from a component? I have created a
MarkupEscapeTransformer and would like to remove it after the transform
has occurred. If it is possible, where in the request cycle should it
happen?

thanks,

jim



---
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=lnk&kid=103432&bid=230486&dat=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=k&kid3432&bid#0486&dat1642




---
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=lnk&kid=103432&bid=230486&dat=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

[Wicket-user] Re: Remove a Behavior?

2006-01-26 Thread Jim McLaughlin
What I would like to do have the behavior remove itself by calling 
component.getBehaviors ().remove (this); in its rendered() method (this 
is the last method called on the Behavior during the request cycle, 
right?). I don't believe this is safe since the behavior list is being 
iterated at that point. Any ideas how and where this can be done?


thx,
jim

Juergen Donnerstag wrote:

It should be possible. Component.getBehaviors().remove(myBehavior)

Juergen

On 1/26/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


I ran into the same question yesterday.

Usecase:

singleton attributemodifier.

in css:
.hidden {
   display : none;
}

in html:









in Java:
class MyModifiers {
   private static AttributeModifier hider = new ClassAttributeModifier();
   public static void hide(Component comp) {
   comp.add(hider);
   }
   public static void show(Component comp) {
   comp.remove(hider);
   }
}

class MyPage {
   MyPage() {
   MarkupContainer foo = new MarkupContainer("foo");
   MarkupContainer bar = new MarkupContainer("bar");
   if(somecondition) {
   MyModifiers.hide(foo);
   MyModifiers.show(bar);
   } else {
   MyModifiers.show(foo);
   MyModifiers.hide(bar);
   }
   }
}

On 1/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


I don't really understand how/ where/ when you would do the add/
remove operation. However, I can't think of anything against the
option of removing behaviors either.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Yes my behavior is smart enough not to do its transform if the
RequestTarget isn't of the right type, but what I really want to do is
add the behavior only if the RequestTarget is a ComponentRequestTarget,
and then remove it once that request cycle is done. That way it is only
there if it is needed, and not by default, and not when the user does a
full page refresh for the next request.  Like you said, it can be coded
around. But there is a use for removing behaviors, and it would be
pleasant to have it supported :). Should I open an rfe?

thx,
jim

Eelco Hillenius wrote:


I think the best you can do is make your behavior smart enough so that
it doesn't do anything after it did it's transform.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:



Is it possible to remove a behavior from a component? I have created a
MarkupEscapeTransformer and would like to remove it after the transform
has occurred. If it is possible, where in the request cycle should it
happen?

thanks,

jim



---
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=lnk&kid=103432&bid=230486&dat=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=k&kid3432&bid#0486&dat1642




---
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=lnk&kid=103432&bid=230486&dat=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?cmdlnk&kid3432&bid#0486&dat1642
___
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 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

[Wicket-user] Re: Remove a Behavior?

2006-01-25 Thread Jim McLaughlin
Yes my behavior is smart enough not to do its transform if the 
RequestTarget isn't of the right type, but what I really want to do is 
add the behavior only if the RequestTarget is a ComponentRequestTarget, 
and then remove it once that request cycle is done. That way it is only 
there if it is needed, and not by default, and not when the user does a 
full page refresh for the next request.  Like you said, it can be coded 
around. But there is a use for removing behaviors, and it would be 
pleasant to have it supported :). Should I open an rfe?


thx,
jim

Eelco Hillenius wrote:

I think the best you can do is make your behavior smart enough so that
it doesn't do anything after it did it's transform.

Eelco


On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Is it possible to remove a behavior from a component? I have created a
MarkupEscapeTransformer and would like to remove it after the transform
has occurred. If it is possible, where in the request cycle should it
happen?

thanks,

jim



---
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=lnk&kid=103432&bid=230486&dat=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=k&kid3432&bid#0486&dat1642




---
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=lnk&kid=103432&bid=230486&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Remove a Behavior?

2006-01-25 Thread Jim McLaughlin
Is it possible to remove a behavior from a component? I have created a 
MarkupEscapeTransformer and would like to remove it after the transform 
has occurred. If it is possible, where in the request cycle should it 
happen?


thanks,

jim



---
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=lnk&kid=103432&bid=230486&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: custom ComponentRequestTarget: where to escape markup

2006-01-25 Thread Jim McLaughlin
It seems you need to set that for the whole application and I would like 
it only for one request using a ComponentRequestTarget. I guess I could 
just create a transformer behavior and attach it to the component. I was 
just looking for an easy way to intercept the response and escape the 
&'s in the wicket Link hrefs.


thx,
jim

Eelco Hillenius wrote:

wicket.IResponseFilter ?

Eelco


On 1/25/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


Isn't that postprocessor thing Johan coded not something that can be
used? I forgot what it is called...

Eelco


On 1/25/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:


the requestcycleprocessor has a requestcodingstrategy. But be aware it
will cover on wicket generated hrefs and src.

Juergen

On 1/26/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Unfortunately no. Rico's xml envelop wraps the html returned by wicket
and then looks up the appropriate dom element and does a replace with
innerHTML. If I could just call Strings.escapeMarkup on the rendered
response, that would be sufficient. Where would be the best place to do
that?

thx,

jim



Juergen Donnerstag wrote:


CDATA is no option?

Juergen

On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:



Hi,
I have a custom ComponentRequestTarget for wrapping response in the
envelope rico expects. I need to escape the markup generated by wicket,
especially the hrefs, or the browser's (ff 1.5) xml parser barfs. Where
would I do this?

thx,
jim



---
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=lnk&kid=103432&bid=230486&dat=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=k&kid3432&bid#0486&dat1642




---
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=lnk&kid=103432&bid=230486&dat=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?cmdlnk&kid3432&bid#0486&dat1642
___
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=k&kid3432&bid#0486&dat1642




---
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=lnk&kid=103432&bid=230486&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: custom ComponentRequestTarget: where to escape markup

2006-01-25 Thread Jim McLaughlin
Unfortunately no. Rico's xml envelop wraps the html returned by wicket 
and then looks up the appropriate dom element and does a replace with 
innerHTML. If I could just call Strings.escapeMarkup on the rendered 
response, that would be sufficient. Where would be the best place to do 
that?


thx,

jim



Juergen Donnerstag wrote:

 CDATA is no option?

Juergen

On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Hi,
I have a custom ComponentRequestTarget for wrapping response in the
envelope rico expects. I need to escape the markup generated by wicket,
especially the hrefs, or the browser's (ff 1.5) xml parser barfs. Where
would I do this?

thx,
jim



---
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=lnk&kid=103432&bid=230486&dat=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=k&kid3432&bid#0486&dat1642




---
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=lnk&kid=103432&bid=230486&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] custom ComponentRequestTarget: where to escape markup

2006-01-25 Thread Jim McLaughlin

Hi,
I have a custom ComponentRequestTarget for wrapping response in the 
envelope rico expects. I need to escape the markup generated by wicket, 
especially the hrefs, or the browser's (ff 1.5) xml parser barfs. Where 
would I do this?


thx,
jim



---
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=lnk&kid=103432&bid=230486&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Problem with panel in of another panel

2006-01-25 Thread Jim McLaughlin

Hi Juergen,
I meant adding a panel to itself, which i now see is prevented as a 
degenerate case in MarkupContainer. I can see a couple of use cases for 
doing this, though. Obviously, building views that are by their nature 
recursive, such as trees, or views that are repeating. In my case, I 
would like to pick  href and event attributes out of a Panel's body and 
use them to initialize script objects in that panel's head, and replace 
the attribute values in the body with method calls on those script 
objects. One way to do this would be to add that panel to its own 
, transform the markup from the panel's first rendering 
into javascript, then transform attribute values in the body to call the 
script objects. This actually simplifies my current setup where I need a 
separate xml MarkupContainer which wicket renders and then transforms 
into script.


Does  get rendered after the  part and before 
the behavior gets to do its work? If so, I could probably just do this 
all in one pass of the transformer.


thx,
jim


Juergen Donnerstag wrote:

I've implemented on my latop a version which applies the "scope"
approach. I called it "skipDuplicates" though which is a boolean. It
gets evaluated before the headers body gets rendered. The advantage is
that we save some performance compared to an approach which first
renders the header part and only than evaluates it if the output
should be contributed or not. The latter approach I think is the more
flexible one though. The tags attribute could pre-set the components
variable. And the performance penalty isn't probably that bad, if we
can do "if no scope attribute present, than skip duplicates".

Jim: what exactly do you mean by "it would be good if we could add a
panel to a panel"? You can add any component to a
MarkupContainer/Panel which of course includes panels as well. Am I
missing something?

Juergen

On 1/25/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


That might be better -- keep it in the same namespace.

Igor Vaynberg wrote:


or support multipe .

originally i was thinking of setting this key in java somewhere which
would make it much more flexible. but if only class/instance is required
then ading an attr to wicket:head is probably easier.

-Igor


On 1/24/06, *Jim McLaughlin* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:

   Maybe the components inside wicket:head can have a wicket:scope
   attribute which can be assigned either class or instance, with the
   default being class.

   Igor Vaynberg wrote:
> can we make it so there is some sort of a string key we provide
   for each
> contribution. it can default to the component.class.getName()
   which is
> the default currently right?
>
> -Igor
>
>
> On 1/24/06, *Jim McLaughlin* < [EMAIL PROTECTED]
   <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
   <mailto:[EMAIL PROTECTED]>>> wrote:
>
> Juergen Donnerstag wrote:
>  > Are you saying your Panel inside  is the same
   but the
>  > XSLT produces different output?
>
> It is a different panel. I am adding a panel that gets XSLT
   transformed
> to the NodePanel of the Tree. I hadn't thought about adding a
   Panel to
> itself. Is this possible? I can see some interesting uses for
   that.
>
> Right now my needs are simpler. I just need the wicket:head
   for every
> /instance/ of a Panel to be contributed, instead of once per
   class. I
> will open an RFE.
>
> Thanks,
>
> jim
>
>
>
>
>
>
> If that is the case than I don't have
>  > an immediate answer. We are using the Component (Panel)
   class to
    > make
>  > sure that the panels head is contributed only once. Could
   you please
>  > open an RFE for it. Thanks
>  >
>  > Juergen
>  >
>  > On 1/24/06, Jim McLaughlin < [EMAIL PROTECTED]
   <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
   <mailto:[EMAIL PROTECTED]>>> wrote:
>  >
>  >>Hi,
>  >>I am building a Tree derived from
   wicket.markup.html.tree.Tree. I
> have
>  >>my own custom NodePanel. Each NodePanel in the Tree needs to
> contribute
>  >>some unique 

[Wicket-user] Re: Problem with panel in of another panel

2006-01-24 Thread Jim McLaughlin

That might be better -- keep it in the same namespace.

Igor Vaynberg wrote:

or support multipe .

originally i was thinking of setting this key in java somewhere which 
would make it much more flexible. but if only class/instance is required 
then ading an attr to wicket:head is probably easier.


-Igor


On 1/24/06, *Jim McLaughlin* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


Maybe the components inside wicket:head can have a wicket:scope
attribute which can be assigned either class or instance, with the
default being class.

Igor Vaynberg wrote:
 > can we make it so there is some sort of a string key we provide
for each
 > contribution. it can default to the component.class.getName()
which is
 > the default currently right?
 >
 > -Igor
 >
 >
 > On 1/24/06, *Jim McLaughlin* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 > <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>> wrote:
 >
 > Juergen Donnerstag wrote:
 >  > Are you saying your Panel inside  is the same
but the
 >  > XSLT produces different output?
 >
 > It is a different panel. I am adding a panel that gets XSLT
transformed
 > to the NodePanel of the Tree. I hadn't thought about adding a
Panel to
 > itself. Is this possible? I can see some interesting uses for
that.
 >
 > Right now my needs are simpler. I just need the wicket:head
for every
 > /instance/ of a Panel to be contributed, instead of once per
class. I
 > will open an RFE.
 >
 > Thanks,
 >
 > jim
 >
 >
 >
 >
 >
 >
 > If that is the case than I don't have
 >  > an immediate answer. We are using the Component (Panel)
class to
 > make
 >  > sure that the panels head is contributed only once. Could
you please
 >  > open an RFE for it. Thanks
 >  >
 >  > Juergen
 >  >
 >  > On 1/24/06, Jim McLaughlin < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 > <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>> wrote:
 >  >
 >  >>Hi,
 >  >>I am building a Tree derived from
wicket.markup.html.tree.Tree. I
 > have
 >  >>my own custom NodePanel. Each NodePanel in the Tree needs to
 > contribute
 >  >>some unique 

[Wicket-user] Re: Problem with panel in of another panel

2006-01-24 Thread Jim McLaughlin
Maybe the components inside wicket:head can have a wicket:scope 
attribute which can be assigned either class or instance, with the 
default being class.


Igor Vaynberg wrote:
can we make it so there is some sort of a string key we provide for each 
contribution. it can default to the component.class.getName() which is 
the default currently right?


-Igor


On 1/24/06, *Jim McLaughlin* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


Juergen Donnerstag wrote:
 > Are you saying your Panel inside  is the same but the
 > XSLT produces different output?

It is a different panel. I am adding a panel that gets XSLT transformed
to the NodePanel of the Tree. I hadn't thought about adding a Panel to
itself. Is this possible? I can see some interesting uses for that.

Right now my needs are simpler. I just need the wicket:head for every
/instance/ of a Panel to be contributed, instead of once per class. I
will open an RFE.

Thanks,

jim






If that is the case than I don't have
 > an immediate answer. We are using the Component (Panel) class to
make
 > sure that the panels head is contributed only once. Could you please
 > open an RFE for it. Thanks
 >
     > Juergen
 >
 > On 1/24/06, Jim McLaughlin < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
 >
 >>Hi,
 >>I am building a Tree derived from wicket.markup.html.tree.Tree. I
have
 >>my own custom NodePanel. Each NodePanel in the Tree needs to
contribute
 >>some unique 

[Wicket-user] Re: Problem with panel in of another panel

2006-01-24 Thread Jim McLaughlin

Juergen Donnerstag wrote:

Are you saying your Panel inside  is the same but the
XSLT produces different output? 


It is a different panel. I am adding a panel that gets XSLT transformed 
to the NodePanel of the Tree. I hadn't thought about adding a Panel to 
itself. Is this possible? I can see some interesting uses for that.


Right now my needs are simpler. I just need the wicket:head for every 
/instance/ of a Panel to be contributed, instead of once per class. I 
will open an RFE.


Thanks,

jim






If that is the case than I don't have

an immediate answer. We are using the Component (Panel) class to make
sure that the panels head is contributed only once. Could you please
open an RFE for it. Thanks

Juergen

On 1/24/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Hi,
I am building a Tree derived from wicket.markup.html.tree.Tree. I have
my own custom NodePanel. Each NodePanel in the Tree needs to contribute
some unique 

[Wicket-user] Problem with panel in of another panel

2006-01-24 Thread Jim McLaughlin

Hi,
I am building a Tree derived from wicket.markup.html.tree.Tree. I have 
my own custom NodePanel. Each NodePanel in the Tree needs to contribute 
some unique 

[Wicket-user] Re: rico xml response envelope

2006-01-21 Thread Jim McLaughlin
I am using the ComponentRequestTarget to render my component, using the 
ajax prototype example as a guide. Implementing an IRequestTarget just 
to set the content type seems like too much work. On the other hand, 
having the RequestTarget create the xml envelope rico expects would get 
rid of my ugly hack of detecting what kind of target is performing the 
rendering inside the RicoEnvelopeBehavior. (as a side question, how 
would I have a behavior remove itself from a component after rendering?) 
 Maybe this could also permit multiple, non-nested components to be 
rendered in the same request.


Would the implementation of respond look something like this:

/**
 * @see wicket.IRequestTarget#respond(wicket.RequestCycle)
 */
public void respond(final RequestCycle requestCycle)
{

// set content-type
final Response res = requestCycle.getResponse ();
res.setContentType ("text/xml");

// Initialize temporary variables
Page page = component.getPage();
if (page != null)
{
page.startComponentRender(component);
}

// Let component render itself
if (component instanceof Page)
{
// Use the default Page request target, if component is 
a Page
new 
PageRequestTarget((Page)component).respond(requestCycle);
}
else
{
// Start outer Rico Envelope
res.write ("");

// start component rico envelope
// Assumes wicket:id and dom id are the same
res.write (""

// Render the component
component.doRender();

// close component rico env
res.write ("");

//close outer rico env
res.write ("");
}

if (page != null)
{
page.endComponentRender(component);
}
}

thx,
jim

Juergen Donnerstag wrote:

I'm currently trying to (performance) improve the header
implementation and AjaxHandler and IBehaviourListener are getting into
my way all the time. The more I think about them the less I like them.
I like the ajax prototype implemention in the examples much better.
And I agree with you (Johan) that a RicoComponentRequestTarget would
be my choice as well.

Juergen

On 1/21/06, Johan Compagner <[EMAIL PROTECTED]> wrote:


What call are you using to render that component?
because now the ComponentRequestTarget doesn't set any headers i think .
You could implement youre own request target that does this.
and in the response method:

public void respond(final RequestCycle requestCycle)
   {
<<<<<<<<<<<<<< set the headers here.. should work.

   // Initialize temporary variables
   Page page = component.getPage();
   if (page != null)
   {
   page.startComponentRender(component);
   }

   // Let component render itself
   if (component instanceof Page)
   {
   // Use the default Page request target, if component is a Page
   new
PageRequestTarget((Page)component).respond(requestCycle);
   }
   else
   {
   // Render the component
   component.doRender();
   }

   if (page != null)
   {
   page.endComponentRender(component);
   }
   }

We have to see if we must have build in support for this. Or that it has to
be done by something else like the AjaxHandler or something?

johan



On 1/21/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Hi,
I'm experimenting with Ajax component rendering using the openrico
library. rico expects the response to be wrapped in xml, ie
 


I created a transformer  to do this, which works fine, but I also need
to set the mime type to "text/xml". I saw this discussed on the list a
few months back and the consensus was to override the getMarkupType
method, but the object I am ajax rendering is a Panel, and that method
is final. Also, I only want the mime type to be text/xml when ajax
rendering is being performed, and text/html otherwise.

I tried setting it with RequestCycle.get ().getResponse
().setContentType ("text/xml"); but this didn't work. Viewing the
response with LiveHTTPHeaders didn't even show a Content-Type in the
header. I set the content type in the transform method of my
transformer, so maybe this is the problem. Where is the right place to
set the content type?

thx,
jim



---
This SF.net email is sponsor

[Wicket-user] rico xml response envelope

2006-01-20 Thread Jim McLaughlin

Hi,
I'm experimenting with Ajax component rendering using the openrico 
library. rico expects the response to be wrapped in xml, ie 
  



I created a transformer  to do this, which works fine, but I also need 
to set the mime type to "text/xml". I saw this discussed on the list a 
few months back and the consensus was to override the getMarkupType 
method, but the object I am ajax rendering is a Panel, and that method 
is final. Also, I only want the mime type to be text/xml when ajax 
rendering is being performed, and text/html otherwise.


I tried setting it with RequestCycle.get ().getResponse 
().setContentType ("text/xml"); but this didn't work. Viewing the 
response with LiveHTTPHeaders didn't even show a Content-Type in the 
header. I set the content type in the transform method of my 
transformer, so maybe this is the problem. Where is the right place to 
set the content type?


thx,
jim



---
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=lnk&kid=103432&bid=230486&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: need advice extending wicket-contrib-gmap

2006-01-15 Thread Jim McLaughlin
This looks great -- very well thought out! unfortunately I'm pretty far 
into my xslt version and I have a tight end of the month deadline for my 
current demo project. The xslt is nice in that you get all the js out of 
your java code, enabling more flexible generation and independent 
testing of rendering. But xslt is pretty unkind on the eyes. I will be 
stealing some of your ideas though :)


jim

Iulian-Corneliu Costan wrote:

I did it finally, it was my issue, thanks and sorry for troubling you.

Jim, let me know if it is good enough for you.

iulian

On 1/15/06, *Eelco Hillenius * <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


I haven't seen any commits comming by. We have a special mailing list
for that, that should trigger any commits.

Eelco


On 1/15/06, Iulian-Corneliu Costan <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
 > Hi again,
 >
 > I've finished gmap component refactoring and basically now you
can add any
 > wicket component (even panel and border, but not a wicket page)
to a gmarker
 > with one condition: the name of your component has to be
"gmarkerInfo".
 > When user clicks on gmarker icon a new ajax request is sent in
order to
 > render and display the content of info window.  I updated the
examples and
 > everything works pretty nice in Firefox, i have to test it in IE
as well.
 >
 > But I have some issues committing the code, sometimes I cannot
update from
 > cvs, now it keeps telling me that i dont have write permission.
Eelco or
 > someone else, would you like to double check what happened.
 >
 >  iulian
 >
 >
 > On 1/4/06, Jim McLaughlin <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
 > > Hi Iulian,
 > > Do you have some ideas for making the component aware of the
wicket
 > > lifecycle? I want map events such as clicking on a marker to
call events
 > > on other wicket components, such as Links, Forms, or Behaviors.
Right
 > > now I am working on creating an xml container for gmap, which
thanks to
 > > Juergen we can transform into javascript using xslt. I would be
happy to
 > > hear what your thoughts are.
 > >
 > > jim
 > >
 > > Iulian-Corneliu COSTAN wrote:
 > > > GMap component is not aware of any wicket lifecycle, it uses
only plain
 > > > JavaScript. I needed only this basic functionality long time
ago, but
 > > > now if people are interested in this component I can make it
better.
 > > >
 > > > keep in touch ...
 > > >
 > > > iulian
 > > >
 > > > On 12/29/05, *Jim McLaughlin* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 > > > mailto:[EMAIL PROTECTED]>>> wrote:
 > > >
 > > > We want to include a google map in our webapp and use it as a
 > navigation
 > > > tool. Can someone advise us how to add a Link or
AjaxHandler to a
 > > > GMarker? The problem is that the gmap components are
rendered as a
 > > > javascript blob outside of the wicket rendering process.
I guess the
 > > > bigger question is howto make wicket render components as
 > javascript.
 > > > I've been puzzling over how to have a ListView of
GMarkers render to
 > the
 > > > proper javascript, with Links or AjaxHandlers passed to
 > > > GEvent.addListener (...).
 > > >
 > > > thanks,
 > > > jim
 > > >
 > > >
 > > >
 > > >
 > ---
 > > > 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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
<http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>
 > > > <
 > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
<http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>>
 > > > ___
 > > > Wicket-user mailing list
 > > > Wicket-user@lists.sourceforge.net
<mailto:Wicket-user@list

[Wicket-user] Re: Add panel in wicket:head of another panel fails

2006-01-10 Thread Jim McLaughlin
I have created issue  1401812 "Add nested components to wicket:head 
fails" for this. The exception occurs without the transformer. The 
transformer is working great, btw.


thx,
jim

Juergen Donnerstag wrote:

On 1/10/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Hi,
I'm using the XsltTransformerBehavior created by Juergen last week to
transform xml to javascript in  panelA.



The excepton occurs without the transformer?



If I add panelA to panelB in
panelB's wicket:head, I get an exception

"The markup stream of the component should be known by now, but isn't:"

for the first component nested inside panelA.

This does not happen if I add panelA inside the wicket:panel tags of
panelB (I am not adding panelA inside of 

[Wicket-user] Add panel in wicket:head of another panel fails

2006-01-09 Thread Jim McLaughlin

Hi,
I'm using the XsltTransformerBehavior created by Juergen last week to 
transform xml to javascript in  panelA. If I add panelA to panelB in 
panelB's wicket:head, I get an exception


"The markup stream of the component should be known by now, but isn't:"

for the first component nested inside panelA.

This does not happen if I add panelA inside the wicket:panel tags of 
panelB (I am not adding panelA inside of 

[Wicket-user] Re: need advice extending wicket-contrib-gmap

2006-01-04 Thread Jim McLaughlin

Hi Iulian,
Do you have some ideas for making the component aware of the wicket 
lifecycle? I want map events such as clicking on a marker to call events 
on other wicket components, such as Links, Forms, or Behaviors. Right 
now I am working on creating an xml container for gmap, which thanks to 
Juergen we can transform into javascript using xslt. I would be happy to 
hear what your thoughts are.


jim

Iulian-Corneliu COSTAN wrote:
GMap component is not aware of any wicket lifecycle, it uses only plain 
JavaScript. I needed only this basic functionality long time ago, but 
now if people are interested in this component I can make it better.


keep in touch ...

iulian

On 12/29/05, *Jim McLaughlin* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


We want to include a google map in our webapp and use it as a navigation
tool. Can someone advise us how to add a Link or AjaxHandler to a
GMarker? The problem is that the gmap components are rendered as a
javascript blob outside of the wicket rendering process. I guess the
bigger question is howto make wicket render components as javascript.
I've been puzzling over how to have a ListView of GMarkers render to the
proper javascript, with Links or AjaxHandlers passed to
GEvent.addListener (...).

thanks,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
<http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
<mailto: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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: XsltPanel?

2006-01-03 Thread Jim McLaughlin
This is great Juergen, thanks. I am going to start working with this 
today, sourceforge willing :)


Juergen Donnerstag wrote:

Good idea. The xsl transformer no longer adds http://...";> ..  to the input of the xsl
processor (and removes it later on). Instead it adds the attr
xmlns:wicket to the tag associated with the XsltTransformerContainer
resp XslTransformerBehaviour. This allow to develop and test the xsl
and apply it to wicket without modifications and the input to the xsl
processor is still well-formed xml.

Thanks Jim

Juergen


On 1/3/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


I see what you mean. If panels and borders don't have their own markup
file, then you would have to put the namespace declaration in each one
of their wicket markup tags. Not so nice.

in bind(), is it possible to have the XslBehavior add an
AttributeModifier to the Component for xmlns:wicket?

If not, maybe we can use a regex to check the stream for the
declaration, add it if it is not there, and then check if it is still
there on return? This will add a bit too much overhead, probably.

Restrict the attaching of XsltBehaviors to Components that implement an
interface that guarantees the namespace declaration. But I don't think
you guys want this to have such a visible impact on the framework.

jim

Juergen Donnerstag wrote:


I tried to change it but actually it does not work for Behaviours at
all except if attached to WebMarkupContainer. Where to put the   for a Panel or a Border and remember it
must be the first and the last tag of the generated output.
Would you accept this limitation to the XslBehaviour? Actually the
XslContainer would even than be the more convinient choice. Any idea
how to solve the problem?

Juergen


On 1/2/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:



The problem why I added 
xmlns:wicket=\"http://wicket.sourceforge.net\";>  is


a) xsl requires a single root element
b) xsl requires the namespace definition otherwise it will fail to
"compile" the xsl file
c) no wicket component will generate them. They are not needed for
Label, Panel or whatever. We only need them for xsl. Hence, we can not
leave it to the user. Hmm, but because the user knows it will be xsl
transformed ... May be you are right.

Juergen

On 1/2/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:



Excellent. This fits into the framework beautifully.

I am also not an xsl expert. The only problem I see is enclosing the
markup stream in the http://wicket.sourceforge.net\";>  tags and then
popping them off after transforming the stream. There is no guarantee
those tags will be there after xsl returns the new stream. My suggestion
is leave it to the user to make sure there is a wicket namespace
declaration in the document. It is likely that they will want to unit
test the xsl outside of wicket, and will need to put the declaration in
their document anyway. And if they don't, whatever tranformer they
decide to use should deliver a nice stack trace informing them of the
omission. It would be kind to note in the javadoc that documents
including wicket markup must declare the wicket namespace in the tag
incorporating the markup or one of its ancestors.

jim


Juergen Donnerstag wrote:



I've added a XsltTransfomerBehaviour which similar to
XsltOutputTransformerContainer allows to post-process a components
output. The Behaviour however does not require an additional
container.

It is a first draft (and I'm not a xsl expert). Please don't hesitate
in case something should be improved.

Juergen

On 1/1/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:




? Not sure I understand your question. I didn't intend to re-implement
the Border component. I choose the MarkupContainer because I wasn't
quite sure how to make it with Border or Panel. Which part of the
Border/Panel markup should be the external xsl file? The
MarkupContainer seemed to me the easiest approach. The disadvantage of
the current approach of course is, you need an additional  tag
and an additional container.

Juergen


On 12/31/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:




so when this is completed border will extend from the abstract output
transformer container and perform an empty transform as opposed to extending
the markup container?


-Igor



On 12/31/05, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:




I committed a first attempt. I called them OutputTransformer. They are
extended from WebMarkupContainer and override onComponentTagBody. The
method transformer() must replaced to implement the transformation.

Juergen


On 12/31/05, Eelco Hillenius < [EMAIL PROTECTED]> wrote:




Wouldn't this make for a nice component? Something that works like a
border in that you can wrap any component in a transform component,
and that the xsl is attached as markup to that transform component?

public class MyTransform extends XslTransformBor

[Wicket-user] Re: XsltPanel?

2006-01-02 Thread Jim McLaughlin
I see what you mean. If panels and borders don't have their own markup 
file, then you would have to put the namespace declaration in each one 
of their wicket markup tags. Not so nice.


in bind(), is it possible to have the XslBehavior add an 
AttributeModifier to the Component for xmlns:wicket?


If not, maybe we can use a regex to check the stream for the 
declaration, add it if it is not there, and then check if it is still 
there on return? This will add a bit too much overhead, probably.


Restrict the attaching of XsltBehaviors to Components that implement an 
interface that guarantees the namespace declaration. But I don't think 
you guys want this to have such a visible impact on the framework.


jim

Juergen Donnerstag wrote:

I tried to change it but actually it does not work for Behaviours at
all except if attached to WebMarkupContainer. Where to put the   for a Panel or a Border and remember it
must be the first and the last tag of the generated output.
Would you accept this limitation to the XslBehaviour? Actually the
XslContainer would even than be the more convinient choice. Any idea
how to solve the problem?

Juergen


On 1/2/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:


The problem why I added 
xmlns:wicket=\"http://wicket.sourceforge.net\";>  is


a) xsl requires a single root element
b) xsl requires the namespace definition otherwise it will fail to
"compile" the xsl file
c) no wicket component will generate them. They are not needed for
Label, Panel or whatever. We only need them for xsl. Hence, we can not
leave it to the user. Hmm, but because the user knows it will be xsl
transformed ... May be you are right.

Juergen

On 1/2/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Excellent. This fits into the framework beautifully.

I am also not an xsl expert. The only problem I see is enclosing the
markup stream in the http://wicket.sourceforge.net\";>  tags and then
popping them off after transforming the stream. There is no guarantee
those tags will be there after xsl returns the new stream. My suggestion
is leave it to the user to make sure there is a wicket namespace
declaration in the document. It is likely that they will want to unit
test the xsl outside of wicket, and will need to put the declaration in
their document anyway. And if they don't, whatever tranformer they
decide to use should deliver a nice stack trace informing them of the
omission. It would be kind to note in the javadoc that documents
including wicket markup must declare the wicket namespace in the tag
incorporating the markup or one of its ancestors.

jim


Juergen Donnerstag wrote:


I've added a XsltTransfomerBehaviour which similar to
XsltOutputTransformerContainer allows to post-process a components
output. The Behaviour however does not require an additional
container.

It is a first draft (and I'm not a xsl expert). Please don't hesitate
in case something should be improved.

Juergen

On 1/1/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:



? Not sure I understand your question. I didn't intend to re-implement
the Border component. I choose the MarkupContainer because I wasn't
quite sure how to make it with Border or Panel. Which part of the
Border/Panel markup should be the external xsl file? The
MarkupContainer seemed to me the easiest approach. The disadvantage of
the current approach of course is, you need an additional  tag
and an additional container.

Juergen


On 12/31/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:



so when this is completed border will extend from the abstract output
transformer container and perform an empty transform as opposed to extending
the markup container?


-Igor



On 12/31/05, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:



I committed a first attempt. I called them OutputTransformer. They are
extended from WebMarkupContainer and override onComponentTagBody. The
method transformer() must replaced to implement the transformation.

Juergen


On 12/31/05, Eelco Hillenius < [EMAIL PROTECTED]> wrote:



Wouldn't this make for a nice component? Something that works like a
border in that you can wrap any component in a transform component,
and that the xsl is attached as markup to that transform component?

public class MyTransform extends XslTransformBorder {
...
}

MyTransform.xsl
 wrote:



s/Ivan/Igor/g
So many apologies...

Jim McLaughlin wrote:



Thanks Ivan and Juergen! I will implement this and let you know my


results.



jim

Juergen Donnerstag wrote:




On 12/30/05, Jim McLaughlin < [EMAIL PROTECTED] > wrote:




Yes, I was not being clear with my question (my grasp of wicket is


very



weak). I want to transform the markup being loaded from the markup


file,



but *after* wicket has run it through the rendering process. What


I want



to do is have wicket take the xml markup associated with the panel


and



run it through its r

[Wicket-user] Re: XsltPanel?

2006-01-02 Thread Jim McLaughlin

Excellent. This fits into the framework beautifully.

I am also not an xsl expert. The only problem I see is enclosing the 
markup stream in the xmlns:wicket=\"http://wicket.sourceforge.net\";>  tags and then 
popping them off after transforming the stream. There is no guarantee 
those tags will be there after xsl returns the new stream. My suggestion 
is leave it to the user to make sure there is a wicket namespace 
declaration in the document. It is likely that they will want to unit 
test the xsl outside of wicket, and will need to put the declaration in 
their document anyway. And if they don't, whatever tranformer they 
decide to use should deliver a nice stack trace informing them of the 
omission. It would be kind to note in the javadoc that documents 
including wicket markup must declare the wicket namespace in the tag 
incorporating the markup or one of its ancestors.


jim


Juergen Donnerstag wrote:

I've added a XsltTransfomerBehaviour which similar to
XsltOutputTransformerContainer allows to post-process a components
output. The Behaviour however does not require an additional
container.

It is a first draft (and I'm not a xsl expert). Please don't hesitate
in case something should be improved.

Juergen

On 1/1/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:


? Not sure I understand your question. I didn't intend to re-implement
the Border component. I choose the MarkupContainer because I wasn't
quite sure how to make it with Border or Panel. Which part of the
Border/Panel markup should be the external xsl file? The
MarkupContainer seemed to me the easiest approach. The disadvantage of
the current approach of course is, you need an additional  tag
and an additional container.

Juergen


On 12/31/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


so when this is completed border will extend from the abstract output
transformer container and perform an empty transform as opposed to extending
the markup container?


-Igor



On 12/31/05, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:


I committed a first attempt. I called them OutputTransformer. They are
extended from WebMarkupContainer and override onComponentTagBody. The
method transformer() must replaced to implement the transformation.

Juergen


On 12/31/05, Eelco Hillenius < [EMAIL PROTECTED]> wrote:


Wouldn't this make for a nice component? Something that works like a
border in that you can wrap any component in a transform component,
and that the xsl is attached as markup to that transform component?

public class MyTransform extends XslTransformBorder {
 ...
}

MyTransform.xsl
 wrote:


s/Ivan/Igor/g
So many apologies...

Jim McLaughlin wrote:


Thanks Ivan and Juergen! I will implement this and let you know my


results.


jim

Juergen Donnerstag wrote:



On 12/30/05, Jim McLaughlin < [EMAIL PROTECTED] > wrote:



Yes, I was not being clear with my question (my grasp of wicket is


very


weak). I want to transform the markup being loaded from the markup


file,


but *after* wicket has run it through the rendering process. What


I want


to do is have wicket take the xml markup associated with the panel


and


run it through its rendering process, and then capture that output
before it gets merged with the panel's parent, transform it with


xslt


(into javascript -- see my post from yesterday on


wicket-contrib-gmap),


and then merge it with the panel's parent.





   protected final void onComponentTagBody(MarkupStream


markupStream,


ComponentTag openTag)
   {
   // Temporarily replace the web response with a String


response


   final Response webResponse = this.getResponse();

   try
   {
   final StringResponse response = new StringResponse();
   this.getRequestCycle().setResponse(response);

   super.onComponentTagBody(markupStream, openTag);

   .

   if ( output.length() > 0)
   {
   webResponse.write(output);
   }
   }
   finally
   {
   // Restore the original response
   this.getRequestCycle().setResponse(webResponse);
   }
   }






This way I am hoping to have javascript rendered into the page


that will


know about urls for wicket components. To me, it seems like a


natural


way to have javascript objects call wicket Link objects and
AjaxHandlers.

Apologies if this sounds like babbling -- I'm still trying to find


my


wicket legs.




That's ok.

Juergen




thx,
jim



Juergen Donnerstag wrote:



On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:




How to create a component that will transform its xml markup


with


xslt?
Looking at wicket-contrib-velocity, the VelocityPanel calls
replaceComponentTagBody inside of onComponentTagBody. It looks


like


replaceComponentTagBody will skip all the RawMarkup. How can I


get


it to
be replaced by the xs

[Wicket-user] Re: XsltPanel?

2005-12-30 Thread Jim McLaughlin

s/Ivan/Igor/g
So many apologies...

Jim McLaughlin wrote:

Thanks Ivan and Juergen! I will implement this and let you know my results.

jim

Juergen Donnerstag wrote:


On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Yes, I was not being clear with my question (my grasp of wicket is very
weak). I want to transform the markup being loaded from the markup file,
but *after* wicket has run it through the rendering process. What I want
to do is have wicket take the xml markup associated with the panel and
run it through its rendering process, and then capture that output
before it gets merged with the panel's parent, transform it with xslt
(into javascript -- see my post from yesterday on wicket-contrib-gmap),
and then merge it with the panel's parent.





protected final void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
{
// Temporarily replace the web response with a String response
final Response webResponse = this.getResponse();

try
{
final StringResponse response = new StringResponse();
this.getRequestCycle().setResponse(response);

super.onComponentTagBody(markupStream, openTag);

.

if (output.length() > 0)
{
webResponse.write(output);
}
}
finally
{
// Restore the original response
this.getRequestCycle().setResponse(webResponse);
}
}





This way I am hoping to have javascript rendered into the page that will
 know about urls for wicket components. To me, it seems like a natural
way to have javascript objects call wicket Link objects and 
AjaxHandlers.


Apologies if this sounds like babbling -- I'm still trying to find my
wicket legs.




That's ok.

Juergen



thx,
jim



Juergen Donnerstag wrote:


On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


How to create a component that will transform its xml markup with 
xslt?

Looking at wicket-contrib-velocity, the VelocityPanel calls
replaceComponentTagBody inside of onComponentTagBody. It looks like
replaceComponentTagBody will skip all the RawMarkup. How can I get 
it to

be replaced by the xslt transformation?




The same way FreeMarkerPanel.onComponentTagBody works except that you
don't call FreeMarker but you xslt processor.
replaceComponentTagBody(markupStream, openTag, newBody) removes the
body (as you already discovered) and gets replaced by "newBody" (third
parameter).

Could it be this is not your question? Are you asking to xslt
transform the markup being loaded from the markup file. That would be
similar to loading the markup from a database (or any other source you
can think of). Add a IResourceStreamLocator to the
DefaultResourceStreamLocator which is default an accessible through
Application.getResourceStreamLocator(). Or replace
Application.newMarkupResourceStream but than you loose all the default
functionality.

Juergen






thx,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click





---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click





---
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 fi

[Wicket-user] Re: XsltPanel?

2005-12-30 Thread Jim McLaughlin

Thanks Ivan and Juergen! I will implement this and let you know my results.

jim

Juergen Donnerstag wrote:

On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Yes, I was not being clear with my question (my grasp of wicket is very
weak). I want to transform the markup being loaded from the markup file,
but *after* wicket has run it through the rendering process. What I want
to do is have wicket take the xml markup associated with the panel and
run it through its rendering process, and then capture that output
before it gets merged with the panel's parent, transform it with xslt
(into javascript -- see my post from yesterday on wicket-contrib-gmap),
and then merge it with the panel's parent.





protected final void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
{
// Temporarily replace the web response with a String response
final Response webResponse = this.getResponse();

try
{
final StringResponse response = new StringResponse();
this.getRequestCycle().setResponse(response);

super.onComponentTagBody(markupStream, openTag);

.

if (output.length() > 0)
{
webResponse.write(output);
}
}
finally
{
// Restore the original response
this.getRequestCycle().setResponse(webResponse);
}
}





This way I am hoping to have javascript rendered into the page that will
 know about urls for wicket components. To me, it seems like a natural
way to have javascript objects call wicket Link objects and AjaxHandlers.

Apologies if this sounds like babbling -- I'm still trying to find my
wicket legs.




That's ok.

Juergen



thx,
jim



Juergen Donnerstag wrote:


On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:



How to create a component that will transform its xml markup with xslt?
Looking at wicket-contrib-velocity, the VelocityPanel calls
replaceComponentTagBody inside of onComponentTagBody. It looks like
replaceComponentTagBody will skip all the RawMarkup. How can I get it to
be replaced by the xslt transformation?




The same way FreeMarkerPanel.onComponentTagBody works except that you
don't call FreeMarker but you xslt processor.
replaceComponentTagBody(markupStream, openTag, newBody) removes the
body (as you already discovered) and gets replaced by "newBody" (third
parameter).

Could it be this is not your question? Are you asking to xslt
transform the markup being loaded from the markup file. That would be
similar to loading the markup from a database (or any other source you
can think of). Add a IResourceStreamLocator to the
DefaultResourceStreamLocator which is default an accessible through
Application.getResourceStreamLocator(). Or replace
Application.newMarkupResourceStream but than you loose all the default
functionality.

Juergen






thx,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click




---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click




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

[Wicket-user] Re: XsltPanel?

2005-12-30 Thread Jim McLaughlin
Yes, I was not being clear with my question (my grasp of wicket is very 
weak). I want to transform the markup being loaded from the markup file, 
but *after* wicket has run it through the rendering process. What I want 
to do is have wicket take the xml markup associated with the panel and 
run it through its rendering process, and then capture that output 
before it gets merged with the panel's parent, transform it with xslt 
(into javascript -- see my post from yesterday on wicket-contrib-gmap), 
and then merge it with the panel's parent.


This way I am hoping to have javascript rendered into the page that will 
 know about urls for wicket components. To me, it seems like a natural 
way to have javascript objects call wicket Link objects and AjaxHandlers.


Apologies if this sounds like babbling -- I'm still trying to find my 
wicket legs.


thx,
jim



Juergen Donnerstag wrote:

On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


How to create a component that will transform its xml markup with xslt?
Looking at wicket-contrib-velocity, the VelocityPanel calls
replaceComponentTagBody inside of onComponentTagBody. It looks like
replaceComponentTagBody will skip all the RawMarkup. How can I get it to
be replaced by the xslt transformation?




The same way FreeMarkerPanel.onComponentTagBody works except that you
don't call FreeMarker but you xslt processor.
replaceComponentTagBody(markupStream, openTag, newBody) removes the
body (as you already discovered) and gets replaced by "newBody" (third
parameter).

Could it be this is not your question? Are you asking to xslt
transform the markup being loaded from the markup file. That would be
similar to loading the markup from a database (or any other source you
can think of). Add a IResourceStreamLocator to the
DefaultResourceStreamLocator which is default an accessible through
Application.getResourceStreamLocator(). Or replace
Application.newMarkupResourceStream but than you loose all the default
functionality.

Juergen





thx,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click




---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] XsltPanel?

2005-12-30 Thread Jim McLaughlin
How to create a component that will transform its xml markup with xslt? 
Looking at wicket-contrib-velocity, the VelocityPanel calls 
replaceComponentTagBody inside of onComponentTagBody. It looks like 
replaceComponentTagBody will skip all the RawMarkup. How can I get it to 
be replaced by the xslt transformation?


thx,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: need advice extending wicket-contrib-gmap

2005-12-29 Thread Jim McLaughlin

I chatted with Igor on ##wicket, and he suggested the following solutions:
* use freemarker or velocity to render the parts of the javascript that 
need to know urls of wicket components

* create a custom panel that can perform substitutions at render time

I will post my results when I get it working.

thanks,
jim


Jim McLaughlin wrote:
Yes. The problem with wicket-contrib-gmap is that all the gmap 
components are not wicket components. They get injected into the page as 
 pure javascript. I want to get them rendered by wicket so I can attach 
Links and hopefully AjaxHandlers to them.


thanks,
jim

Juergen Donnerstag wrote:


Did you check project wicket-stuff module wicket-contrib-gmap and
wicket-contrib-gmap-examples already.

Juergen

On 12/29/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


We want to include a google map in our webapp and use it as a navigation
tool. Can someone advise us how to add a Link or AjaxHandler to a
GMarker? The problem is that the gmap components are rendered as a
javascript blob outside of the wicket rendering process. I guess the
bigger question is howto make wicket render components as javascript.
I've been puzzling over how to have a ListView of GMarkers render to the
proper javascript, with Links or AjaxHandlers passed to
GEvent.addListener(...).

thanks,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click





---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click




---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: need advice extending wicket-contrib-gmap

2005-12-29 Thread Jim McLaughlin
Yes. The problem with wicket-contrib-gmap is that all the gmap 
components are not wicket components. They get injected into the page as 
 pure javascript. I want to get them rendered by wicket so I can attach 
Links and hopefully AjaxHandlers to them.


thanks,
jim

Juergen Donnerstag wrote:

Did you check project wicket-stuff module wicket-contrib-gmap and
wicket-contrib-gmap-examples already.

Juergen

On 12/29/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


We want to include a google map in our webapp and use it as a navigation
tool. Can someone advise us how to add a Link or AjaxHandler to a
GMarker? The problem is that the gmap components are rendered as a
javascript blob outside of the wicket rendering process. I guess the
bigger question is howto make wicket render components as javascript.
I've been puzzling over how to have a ListView of GMarkers render to the
proper javascript, with Links or AjaxHandlers passed to
GEvent.addListener(...).

thanks,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click




---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] need advice extending wicket-contrib-gmap

2005-12-29 Thread Jim McLaughlin
We want to include a google map in our webapp and use it as a navigation 
tool. Can someone advise us how to add a Link or AjaxHandler to a 
GMarker? The problem is that the gmap components are rendered as a 
javascript blob outside of the wicket rendering process. I guess the 
bigger question is howto make wicket render components as javascript. 
I've been puzzling over how to have a ListView of GMarkers render to the 
proper javascript, with Links or AjaxHandlers passed to 
GEvent.addListener(...).


thanks,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: i10n and branding questions

2005-12-20 Thread Jim McLaughlin

Please edit and correct:
http://wicket-wiki.org.uk/wiki/index.php/Newuserguide#Locale_and_Style

thx,
jim


Juergen Donnerstag wrote:

On 12/19/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:


Since I am a new user, I will add the answers to these questions to the
new user guide wiki.

When to use StringResourceModel and when to call getLocalizer() directly?



StringResourceModel is an IModel and thus the right choice whereever
an IModel parameter is requested (usually container.add(id, model)).
StringResourceModel uses the Localizer internally. Localizer provides
a general purpose interface to access properties files.



What is the difference between setVariant and setStyle?




A style applies to the application, a variation to a component only.



How do you set the application up to use the WicketMessageTagHandler?



override Application.getAdditionalMarkupHandler()



Also, it  looks like it traverses the stack upward from the component to
look for properties. Is this true?



Please see AbstractStringResouceLoader for details.



Is this traversal opposite of Localizer?



No, it is using the Localizer

Juergen


---
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://ads.osdn.com/?ad_idv37&alloc_id865&op=click




---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] i10n and branding questions

2005-12-18 Thread Jim McLaughlin
Since I am a new user, I will add the answers to these questions to the 
new user guide wiki.


When to use StringResourceModel and when to call getLocalizer() directly?

What is the difference between setVariant and setStyle?

How do you set the application up to use the WicketMessageTagHandler? 
Also, it  looks like it traverses the stack upward from the component to 
look for properties. Is this true? Is this traversal opposite of Localizer?


thanks in advance,
jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Wicket and Maven 2

2005-12-17 Thread Jim McLaughlin

Nick Heudecker wrote:
I'm getting the following error when trying to compile the Wicket 
sources with Maven 2:


[INFO] Cannot execute mojo: resources. It requires a project with an 
existing pom.xml, but the build is not using one.


Copying the existing project.xml to pom.xml doesn't help either.  Any 
advice?


You can convert maven1 projects to maven2 with the following command:

mvn maven1:convert

We are managing all our wicket dependencies this way, and have had no 
major issues. The only problem was with the manifest in the generated 
jar for wicket-contrib-spring-jdk5 (one of the header fields spanned 
more than 1 line).


jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Wicket, Spring and Hibernate

2005-12-08 Thread Jim McLaughlin

Igor Vaynberg wrote:
i was just falling asleep and thought of something (still sleepy so dont 
know if this will make sense in the morning). with all this talk of 
testing why not borrow a page from spring's book. have a 
IInitializingPage { void afterPropertiesSet(); } and have the injector 
check for this and call it after its done populating the page. I know 
this isnt as clean as spring because the order is a bit out of wack - 
afterPropertiesSet is called before the constructor of the page is 
finished but if you leave your constructor blank and move everything 
into that method i think it should work. and you can have total control 
over dependencies in unit tests w/out anything special just set the 
injector to a noop injector and call afterPropertiesSet() yourself.


how does that sound? will this make things easier or dirtier?

-Igor



I've thought about it and it doesn't provide us any real advantage over 
your InjectorLocator pattern right now. Using composition keeps 
everything loosely coupled and pretty much transparent to the developer. 
But we are just starting out on this project and haven't hit any 
complications yet.


jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Wicket, Spring and Hibernate

2005-12-07 Thread Jim McLaughlin

John Moore wrote:

Jim McLaughlin wrote:

I just started up a project using wicket, spring, and hibernate 
following the instructions in 
http://www.wicket-wiki.org.uk/wiki/index.php/Spring. While it is not 
full step-by-step boiler plate, a half hour to an hour of noodling 
around this page and the wicket-phonebook example should have you up 
and running.




Which approach did you go with? Application Object or Proxy Based? I'm 
all for an easy life and thus the Application Object approach is rather 
more appealing. I'd like to know a bit more about the downsides, though. 
The wiki says:


"Application class might get cluttered if the application has a lot of 
dependencies"


I can't see that being a particular problem for this project unless I've 
misunderstood something, so I'm interested in anyone else's thoughts on 
this.


John


We are using the proxy based approach. This is what is given to you if 
you use the SpringInjector provided by wicket.contrib.spring. Just set 
this in your InjectorLocator when your webapp starts up. I think the 
point of both appraches is to let you operate in a clustered 
environment, but the proxy approach is way more elegant. If you use the 
Application Object approach, you need to manually fetch your 
dependencies from it, which diminishes some of the advantages of spring d-i.


The only disadvantage to the proxy approach is the way it interferes 
with unit testing, but there are a bunch of clever ways around that as 
shown in the previous thread.


hth,
Jim



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Wicket, Spring and Hibernate

2005-12-07 Thread Jim McLaughlin

John Moore wrote:

 

Hmm, now I'm really confused! Perhaps I'm asking the wrong question. Is 
there an example which shows Wicket working with database access, 
handling all the stuff like automatic (declarative) transactions which 
Spring does with Hibernate? I like Spring but I'm not sold on it but for 
features like that.


John


Hi John,
I just started up a project using wicket, spring, and hibernate 
following the instructions in 
http://www.wicket-wiki.org.uk/wiki/index.php/Spring. While it is not 
full step-by-step boiler plate, a half hour to an hour of noodling 
around this page and the wicket-phonebook example should have you up and 
running.


Essentially, any page or panel you want to have spring manage the 
dependencies for you should have inherit from SpringWebPage or 
SpringPanel from wicket-contrib-spring. (hmm, I don't think there is a 
SpringPanel but you can simply adapt SpringWebPage).


There was some discussion a week or two ago about how to manage unit 
testing with this set up, and a couple of excellent solutions were 
offered. Read this thread -- 
http://sourceforge.net/mailarchive/forum.php?thread_id=9098321&forum_id=42411
We chose the InjectorLocator route suggested by Igor. Just change 
SpringWebPage to use InjectorLocator.getInjector ().inject(this) in the 
constructor and you should be good to go.


Hope this helps,
Jim

BTW we love wicket! Thanks to everyone who built this project



---
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user