Re: [Wicket-user] Re: Wicket Include vs. RequestDispatcher.include

2006-04-01 Thread Nili Adoram
After reconsidering I used Sitemesh which provides a better approach to 
this issue.


However, this is a good opportunity to thank you Wicket team for 
developing the most wonderful framework.

I voted for you!

Nili


Eelco Hillenius wrote:

To my knowledge, none of the core developers of Wicket uses the
Include component for their projects. What about this: if you and
anyone else that uses this functionality agree on what would be the
best implementation, I'd be happy to look at the patch and put it in
Wicket if we agree on it. That would work better than me developing it
and guessing what is right.

Ideally, it should work similar to sitemesh, but simpler, as we don't
need the composition (it would steer people the wrong direction for
how to do things with Wicket) and of course without a line of xml
configuration.

I'd like to keep it one component thought, so I wouldn't be in favor
of the LightInclude as mentioned the post before this. I'd rather have
some property for deciding how the include should work.

Related issues:
http://sourceforge.net/tracker/?group_id=119783&atid=684978&func=detail&aid=1243549
http://sourceforge.net/tracker/?group_id=119783&atid=684978&func=detail&aid=1285909

Eelco


On 3/30/06, Robert McClay <[EMAIL PROTECTED]> wrote:
  

I posted a very similar "component" to the group a while back -- search
for "Servlet forward to a JSP". It could be used as a starting point
for a "nice" component, as it definitely needs polishing.

On 2006-03-29 23:54:57 -0700, Nili Adoram <[EMAIL PROTECTED]> said:



How about extending Include as follows:
public class LightInclude extends Include {

public LightInclude(String id, String model, ServletRequest
request, ServletResponse response) {
   this.request = request;
   this.response = response;
}

protected String importUrl(String url) {
//create a buffer
Writer writer = new BufferedWriter(new CharArratWriter());
//create some mockup response
ServletResponse mockupResponse = new ServletResponse() {
   //implement all interface methods by delegating to the
original response except for this:
   public PrintWriter getWriter(){
  return new PrintWriter(writer);
   }
};
   //call RequestDispatcher with the mockup response
//this will write the response to our buffer
request.getrequestDispatcher(url).include(request, mockupResponse);
   //return the content of the buffer
return writer.toString();
}
}

I guess some additional polish is required..
Nili

Eelco Hillenius wrote:
  

That's what I did in the first version(s) of Include. There were
issues with it, which I unfortunately forgot. I never use this
component myself, but if you have good ideas in the form of patches,
I'd be happy to look at them.

Eelco

On 3/29/06, Nili Adoram <[EMAIL PROTECTED]> wrote:



Hi,
Is there an option to use utilize wicket Include without opening a new
connection?
I would like to include the contents of a URL like
RequestDispatcher.include() does, directly into a wicket component.
10x
Nili


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
  




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing li

Re: [Wicket-user] Form Feedback

2006-04-01 Thread Eelco Hillenius
1.1 worked by setting the appropriate collecting component - which in
the case of forms was done automatically. From 1.2 on we have
IFeedbackMessageFilter for this.

If you want field level feedbakc, you might want to check out
FormComponentFeedbackBorder. From 1.2 on there additionally is
FormComponentFeedbackIndicator, which is a feedback panel but for one
component.

Eelco


On 4/1/06, Alexander Lohse <[EMAIL PROTECTED]> wrote:
> Hi,
>
> can anyone explain how the new (1.1) Form-Feedback-System works?
>
> How does the Form know which Feedback-Panel to use?
>
> What if I have multiple forms and multiple feedbacks on one page?
>
> Is there a way to skip the messaging and give the feedback in
> different ways?
> For example: I used to just mark the erroneous fields with special
> css or place the messages right next to field.
>
> Thank you,
>
> Alex
> –––
> Alexander Lohse
> (Entwicklungsleitung & Projektmanagement)
>
> Human Touch Medienproduktion GmbH
> Am See 1
> 17440 Klein Jasedow
> Deutschland
>
> Tel: +49 38374 752 11
> Fax: +49 38374 752 23
> e-mail: [EMAIL PROTECTED]
> Internet: http://www.webjazz.de
> –––
>
>
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Johan Compagner
I think i have it all in now.There isn't much outside used api touched because if i just look what lines i needed to change over all the contrib libs (didn't check those in yet)it where only a very few and it was just adding toString() or changing String to CharSequence.
And also another project iridium (topicus) just compiles it doesn't complain at allI think this is because i just stopped at one point and that are 2 methods that could be a CharSequence return type but i kept them as strings
(FormComponent.getValue() and Component.getModelObjectAsString())Because that did break to much so i didn't alter themjohanOn 4/1/06, Eelco Hillenius
 <[EMAIL PROTECTED]> wrote:
+1 for now.EelcoOn 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:> Currently almost all our interfaces that makes the output or Response
> writing code are using Strings> as parameters or return types>> I would like to change all those methods to use Charsequence because this> would mean that> we don't have to do toString() every where and just passing directly the
> buffer that was made> This will greatly reduce String char array copies.>> This does mean that for example:>> Response.write(String) -> Response.write(CharSequence)>
> and>> protected final void replaceComponentTagBody(final MarkupStream> markupStream,> final ComponentTag tag, final String body)>> protected final void replaceComponentTagBody(final MarkupStream
> markupStream,> final ComponentTag tag, final CharSequence body)>> for calling methods nothing will really change because the String maps on> its interface.>> Only when users have implemented such a method they should also convert
> so for the above replaceComponentTagBody this is not a problem because it is> final anyway>> But for Response.write() subclasses should also be refactored.>>> Don't know currently yet how many overridable methods really would be
> affected.> But it could enhance performance quite a bit.>> Many of the interfaces that would affected are 1.2 only interfaces so if we> change them now> those interfaces never made it to a final version.
>> So what should we do:>> [ ] do it in 1.2> [ ] do it in 2.0/1.3 with another big refactor? (then interfaces introduced> in 1.2 will change again)> [ ] never do it.>
> johan>>---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RE: New Link component ?

2006-04-01 Thread JasonB

Jonathan Locke wrote:
makes me wonder if Java couldn't use a reflection notation 
  
I have always thought this would be a great feature. (As a side note, 
how hard would it be to write an eclipse plugin that would perform 
compile-time checking, but would pass a string to the compiler? Aka: new 
ReflectionLink("myLink", @myMethod) translates to -> new 
ReflectionLink("myLink", "myMethod")


However, in the mean time since we don't have this feature in the 
language, I would require initialization time checking of the target 
method. This will help you debug problems, and avoid holes in your 
testing where someone forgot to click that link that is broken due to 
some refactoring.


- Jason B.




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] date formats and SimpleConverterAdapter (wicket 1.2 beta 2)

2006-04-01 Thread Eelco Hillenius
Yeah, I know what was going on. I made a stupid mistake! Sorry...

It's fixed in trunk now.

Eelco

On 4/1/06, Simon Edwards <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm trying to get some date formatting on the go for Date.class field. The
> SimpleConverterAdapter example that was posted to the list works fine for
> URLs ( http://sourceforge.net/mailarchive/message.php?msg_id=15132297 ). But
> after rewriting it for doing date formatting I just get an exception when the
> value is being written back to my domain POJO with the help of a
> CompoundPropertyModel.
>
> Anyone know what is going on?
>
> code:
> -
> TextField dob = new TextField("dateOfBirth",Date.class) {
>   private SimpleDateFormat df = new SimpleDateFormat("dd-MM-");
>   public IConverter getConverter() {
> return new SimpleConverterAdapter() {
>
>   public String toString(Object value) {
> System.err.println("SimpleConverterAdapter.toString() "+value);
>   return value != null ? df.format( (Date)value ) : null;
>   }
>
>   public Object toObject(String value) {
> System.err.println("TextField.toObject() "+value);
> if(value==null || "".equals(value)) {
>   throw new ConversionException("'"+value+"' is not a valid date.");
> }
> Date newDate = df.parse(value,new ParsePosition(0));
> System.err.println("TextField.toObject() returning "+newDate);
> return newDate;
>   }
> };
>   }
> };
> -
> exception (slightly formatted, 1-2-2003 was submitted in the HTML text field):
>
> -
> INFO  - MarkupCache- Loading markup from
> file:/home/sbe/devel/apache-tomcat-5.5.16/webapps/wicket-examples/WEB-INF/classes/wicket/examples/tvguide/PersonsTab.html
>
> INFO  - MarkupCache- Loading markup from
> jar:file:/home/sbe/devel/apache-tomcat-5.5.16/webapps/wicket-examples/WEB-INF/lib/wicket-1.2-beta2.jar!/wicket/markup/html/panel/FeedbackPanel.html
>
> SimpleConverterAdapter.toString(): 'Sat Apr 01 10:39:55 CEST 2006'
>
> SimpleConverterAdapter.toObject(): '01-02-2003'
>
> SimpleConverterAdapter.toObject() returning 'Sat Feb 01 00:00:00 CET 2003'
>
> SimpleConverterAdapter.toObject(): 'Sat Feb 01 00:00:00 CET 2003'
>
> SimpleConverterAdapter.toObject() returning 'null'
>
> ERROR - RequestCycle   - Method onFormSubmitted of interface
> wicket.markup.html.form.IFormSubmitListener targeted at component
> [MarkupContainer [Component id = personform, page =
> wicket.examples.tvguide.TvGuidePage, path =
> 1:tabs:panel:personform.PersonsTab$4, isVisible = true, isVersioned = true]]
> threw an exception
>
> wicket.WicketRuntimeException: Method onFormSubmitted of interface
> wicket.markup.html.form.IFormSubmitListener targeted at component
> [MarkupContainer [Component id = personform, page =
> wicket.examples.tvguide.TvGuidePage, path =
> 1:tabs:panel:personform.PersonsTab$4, isVisible = true, isVersioned = true]]
> threw an exception
>   at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:173)
>   at
> wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
>   at
> wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
> ...
>
> Caused by: java.lang.reflect.InvocationTargetException
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   ...
>
> Caused by: wicket.util.convert.ConversionException: Can't convert value: Sat
> Feb 01 00:00:00 CET 2003 to class: class java.util.Date for setting it on
> [EMAIL PROTECTED]
> at
> wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:824)
>   ...
>
> INFO  - MarkupCache- Loading markup from
> jar:file:/home/sbe/devel/apache-tomcat-5.5.16/webapps/wicket-examples/WEB-INF/lib/wicket-1.2-beta2.jar!/wicket/markup/html/pages/ExceptionErrorPage.html
>
> SimpleConverterAdapter.toString(): 'Sat Apr 01 10:39:55 CEST 2006'
>
> -
>
> info:
>
> * wicket 1.2 beta 2
> * tomcat 5.5
> * jdk 1.5.0_06
>
> thank you,
>
> --
> Simon Edwards | KDE-NL, Guidance tools, Guarddog Firewall
> [EMAIL PROTECTED] | http://www.simonzone.com/software/
> Nijmegen, The Netherlands | "ZooTV? You made the right choice."
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


---
Th

Re: [Wicket-user] Re: New Link component ?

2006-04-01 Thread Eelco Hillenius
> We thought about it and as our internal component, we were ready to implement 
> 2)
> et 3). In our case we want provide a uniform style of coding : 90% of use 
> cases,
> the method is called on the page object. 10% left are filled by 3)

Yeah, the disadvantage of calling the page object is that it is not
suited for writing reusable code. For instance, if you write a panel
with a link that makes that call, and you decide to reuse it in
another page, you would have to implement that method in that page too
(or make sure that method is in some base class), but the compiler is
never going to warn you about it.

I would argue to support just method for clarity, and that would be
nbr 3 as it is explicit and reusable in any situation. Also just
passing in MyPage.this in the constructor isn't that much of a code
bloat, right?

> Indeed, thank you all for you answers, i must say we like coding with wicket 
> and
> we hope it will continue to focus on making web developper's life easier !

That's what we are doing it for. We aim for making our developer's
life not only easier, but also more fun in general. We believe a
framework should not only be about how fast/ easy you can do stuff,
but also about the 'art parts' of programming: elegance, expressive
power, etc. It's exiting to see that many people like that and
participate in Wicket by discussing ideas and sending in patches etc.

Eelco


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] NoClassDefFoundError in TreeComponentInitializer#38

2006-04-01 Thread Matthias Albert

Thanks for your response.

The problem does not exist if I don't call 
IResourceSettings.setResourceStreamLocator() with my own 
ResourceStreamLocator. Apparently, my class prevents internal Wicket 
classes from finding some resources.


Btw, I don't use any Tree component at all.


Matthias

Johan Compagner schrieb:
i also have seen this. (also in an intializer i believe and then with 
ajax scripts)

It happens when i restart tomcat and tomcat deserializes sessions.
If it doesn't deserializes sessions it doesn't happen.

Will try if i can really reproduce it and see if i can figure out why ..

The big problem is that noclassdeffound is the most most annoying and don't
tell what really is the problem error. I hate hate hate that error.

johan

On 3/30/06, * Matthias Albert* <[EMAIL PROTECTED] > 
wrote:

Hi,
today I tried to use my own class MyReasourceStreamLocator based on
AbstractResourceStreamLocator and registered it in Application.init()
(the derived method).

Surprisingly, I got a "NoClassDefFoundError". A part of the stack trace
is shown below. I am using Wicket 1.2beta2.


java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
wicket.markup.html.tree.TreeComponentInitializer.class$
(TreeComponentInitializer.java:38)

wicket.markup.html.tree.TreeComponentInitializer.init(TreeComponentInitializer.java:38)
wicket.Initializer.init(Initializer.java:59)
wicket.Application.initialize (Application.java:651)
wicket.Application.initializeComponents(Application.java:716)
wicket.Application.initializeComponents(Application.java:693)
wicket.protocol.http.WicketServlet.init(WicketServlet.java :287)


Line 38 in the source file TreeComponentInitializer.java is the first
line inside this method:

public void init(Application application)
{
  PackageResource.bind(application, Tree.class, " blank.gif");
//line #38
  PackageResource.bind(application, Tree.class, "minus.gif");
  PackageResource.bind(application, Tree.class, "plus.gif");
  PackageResource.bind(application, Tree.class , "tree.css");
}


Could it be a problem that Tree is an abstract class?


Matthias Albert




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PopupSettings Center

2006-04-01 Thread Eelco Hillenius
Didn't think about that yet. A patch would be welcome. If you have
one, please attach it to an RFE
(http://sourceforge.net/tracker/?group_id=119783&atid=684978)

Eelco

On 3/31/06, Alexander Lohse <[EMAIL PROTECTED]> wrote:
> Hi,
>
> are there any efforts yet to add a centering option to the
> PopupSettings?
>
> Something like: script.append("mywindow.moveTo((screen.availWidth-" +
> width +")/2,(screen.availHeight-" + height + ")/5*2);\n");
>
> Regards,
>
> Alex
>
> –––
> Alexander Lohse
> (Entwicklungsleitung & Projektmanagement)
>
> Human Touch Medienproduktion GmbH
> Am See 1
> 17440 Klein Jasedow
> Deutschland
>
> Tel: +49 38374 752 11
> Fax: +49 38374 752 23
> e-mail: [EMAIL PROTECTED]
> Internet: http://www.webjazz.de
> –––
>
>
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&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 xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Martijn Dashorst
+1, not breaking existing 1.1 api's.MartijnOn 4/1/06, Eelco Hillenius <[EMAIL PROTECTED]
> wrote:+1 for now.EelcoOn 4/1/06, Johan Compagner <
[EMAIL PROTECTED]> wrote:> Currently almost all our interfaces that makes the output or Response> writing code are using Strings> as parameters or return types>> I would like to change all those methods to use Charsequence because this
> would mean that> we don't have to do toString() every where and just passing directly the> buffer that was made> This will greatly reduce String char array copies.>> This does mean that for example:
>> Response.write(String) -> Response.write(CharSequence)>> and>> protected final void replaceComponentTagBody(final MarkupStream> markupStream,> final ComponentTag tag, final String body)
>> protected final void replaceComponentTagBody(final MarkupStream> markupStream,> final ComponentTag tag, final CharSequence body)>> for calling methods nothing will really change because the String maps on
> its interface.>> Only when users have implemented such a method they should also convert> so for the above replaceComponentTagBody this is not a problem because it is> final anyway
>> But for Response.write() subclasses should also be refactored.>>> Don't know currently yet how many overridable methods really would be> affected.> But it could enhance performance quite a bit.
>> Many of the interfaces that would affected are 1.2 only interfaces so if we> change them now> those interfaces never made it to a final version.>> So what should we do:>
> [ ] do it in 1.2> [ ] do it in 2.0/1.3 with another big refactor? (then interfaces introduced> in 1.2 will change again)> [ ] never do it.>> johan>>---
This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!-- http://wicketframework.org


Re: [Wicket-user] Wicket in a clustered environment

2006-04-01 Thread Eelco Hillenius
I tested it a couple of times, and the product I'm working on needs to
be deployed in a clustered environment (with Wicket). However, having
an automated cluster test is one of our to-dos. It would be awesome if
someone could set such a thing up, preferably in such a way that it
can just be checked out from SVN an get it working without too much
hassle.

As a side note, if you want to see what round-robin clustering would
mean for you application, turn on the HttpSessionStore logger, e.g. in
log4j:

log4j.logger.wicket.protocol.http.HttpSessionStore=INFO

There are also a couple of options in Wicket which affect the way it
clusters, most notably the render strategy. And there's a whole bunch
of possible optimizations possible too, unfortunately not documented
outside the javadocs ifaik.

Eelco


On 3/31/06, Tom van Zummeren <[EMAIL PROTECTED]> wrote:
>
>
>
> I was wondering…
>
>
>
> Does anyone have any experience with Wicket in a clustered environment?
>
> If yes, please tell me your experience with it.
>
>
>
> Thanks in advance,
>
>
>
>
>
> Tom
>
>
> --
>  No virus found in this outgoing message.
>  Checked by AVG Free Edition.
>  Version: 7.1.385 / Virus Database: 268.3.3/298 - Release Date: 3/30/2006
>


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Eelco Hillenius
+1 for now.

Eelco


On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> Currently almost all our interfaces that makes the output or Response
> writing code are using Strings
> as parameters or return types
>
> I would like to change all those methods to use Charsequence because this
> would mean that
> we don't have to do toString() every where and just passing directly the
> buffer that was made
> This will greatly reduce String char array copies.
>
> This does mean that for example:
>
> Response.write(String) -> Response.write(CharSequence)
>
> and
>
> protected final void replaceComponentTagBody(final MarkupStream
> markupStream,
> final ComponentTag tag, final String body)
>
> protected final void replaceComponentTagBody(final MarkupStream
> markupStream,
> final ComponentTag tag, final CharSequence body)
>
> for calling methods nothing will really change because the String maps on
> its interface.
>
> Only when users have implemented such a method they should also convert
> so for the above replaceComponentTagBody this is not a problem because it is
> final anyway
>
> But for Response.write() subclasses should also be refactored.
>
>
> Don't know currently yet how many overridable methods really would be
> affected.
> But it could enhance performance quite a bit.
>
> Many of the interfaces that would affected are 1.2 only interfaces so if we
> change them now
> those interfaces never made it to a final version.
>
> So what should we do:
>
> [ ] do it in 1.2
> [ ] do it in 2.0/1.3 with another big refactor? (then interfaces introduced
> in 1.2 will change again)
> [ ] never do it.
>
> johan
>
>


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] can't get rid of "Choose One" in DropDownChoice

2006-04-01 Thread Martijn Dashorst
I disagree. In most of our apps the list comes directly from the database. Adding something to that list that isn't actually a choice, adds type unsafety to the mix. The message isn't actually a choice. You can't choose it.
And selecting (arbitrarily) the first element is not something I want either.MartijnOn 4/1/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:Why have the default message at all?  Why provide something for developers that they should be determining themselves?  The default should be the first item in the list...if you need a default, override the method and provide one.
On 4/1/06, Johan Compagner <
[EMAIL PROTECTED]> wrote:
yes moving the method to the renderer and calling that render method in the choice method is fine by me.Except what is then the default "Choose one" ?We can add it ofcourse in our default renderer: ChoiceRenderer
But then you have to specify it or subclass choicerenderer. Else suddenly you don't have that default message anymore.johan
On 3/31/06, Igor Vaynberg
 <[EMAIL PROTECTED]> wrote:


yes its a bit weird. if youd like you are more then welcome to file an rfe and maybe we can clean it up in a future version.-Igor
On 3/31/06, Vincent Jenks
 <[EMAIL PROTECTED]> wrote:



Got it, thanks.  It's confusing that it doesn't work like I described, even though the method can be overridden.  It'd be convenient to be able to do it how I posed verses doing this:



    //create calendar    List days = 
DateTime.getDaysListForward(2, 4);       DropDownChoice arrivalChoices = new DropDownChoice("arrivalDate", days)



    {    protected String getDefaultChoice(final Object selected)
    {    return ""; //get rid of "Choose One" default    }       };       arrivalChoices.setChoiceRenderer



(new IChoiceRenderer()
    {       public String getDisplayValue(Object object)    {    return object.toString();    }   
    public String getIdValue(Object object, int index)
    {    return object.toString();    }       });       form.add(arrivalChoices);



On 3/30/06, 
Igor Vaynberg <
[EMAIL PROTECTED]> wrote:you are putting getDefaultChoice into the renderer, when it actually belongs in the DropDownChoice
-IgorOn 3/30/06, 
Vincent Jenks <
[EMAIL PROTECTED]> wrote:The code...






        //create calendar        List days = DateTime.getDaysListForward(2, 4);                //add quantity select list                                form.add(new DropDownChoice("arrivalDate", days, new IChoiceRenderer()
        {            protected String getDefaultChoice(final Object selected)        {    return ""; //get rid of "Choose One" default        }                        public String getDisplayValue(Object object)
            {                return object.toString();            }                        public String getIdValue(Object object, int index)            {                return object.toString






();
            }                                }));        When rendered...I still get the "Choose One" option first.  Did I lose too much sleep last night...what did I miss?












-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!-- http://wicketframework.org


Re: [Wicket-user] onAttach() with ajax

2006-04-01 Thread Igor Vaynberg
head is for cvs, trunk is for svn :)-IgorOn 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
yeah i am also completely lost at the momentCan somebody start from the beginning again?
johan:)On 3/31/06, Martijn Dashorst <

[EMAIL PROTECTED]> wrote:And now my HEAD hurts, or was it head HURTS? :-)
MartijnOn 3/31/06, Gwyn Evans <

[EMAIL PROTECTED]
> wrote:Yes, that's what I was meaning by the last bit of my previous email -

it just comes down to different shorthand for the main CVS development
branch.My issue was that saying you checked into "head" is reasonablyunambiguious whereas if I said to /get/ something from head, thequestion is did I mean HEAD, as then I could legitimately be talking
about either SVN or CVS and in both cases should really specifywhether on the head/trunk or a branch.So yes, "head" is for cvs, trunk is for svn, but "HEAD" is for both./Gwyn


On 31/03/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> svn dir called trunk is usually where the main branch is. cvs had no dir
> like this because tags/branches were treated differently. in svn tags and
> branches are treated like folders just like the main branch dir.>> so if you say i checked something into head in cvs, svn analogous would be i> checked it into trunk.>>> -Igor
 On 3/31/06, Gwyn Evans <[EMAIL PROTECTED]> wrote:> >

>  Surely SVN's HEAD is exactly the same as CVS's HEAD, in that they both
> refer to the latest revision in the particular branch that you're> working?>> In both cases you need to specify the branch, which might be "trunk"> (svn) or "the main trunk" (cvs)...
>> Or are you just using "head" to refer to for what I've called "the> main trunk", rather than the "HEAD" in "cvs update -r HEAD"?>> /Gwyn>
>> On 31/03/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> > what do you mean?
> >> > we have wicket top level: /svnroot/wicket
>  >> > then under wicket we have> >> > wicket/branches> > wicket/labels> > wicket/trunk> >> > so trunk is analogous to cvs head> >
> > -Igor> >> >> >> >  On 3/29/06, Gwyn Evans < [EMAIL PROTECTED]
> wrote:> > >> >  Except it's more complex than that, in that svn still has HEAD for the
> > revisions, with trunk just being the conceptual root from which> > branches split.> >> > /Gwyn> >> > On 29/03/06, Igor Vaynberg < 


[EMAIL PROTECTED]> wrote:> > > head is for cvs, trunk is for svn :)> > >> > > -Igor>>> --->
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language> that extends applications into web and mobile media. Attend the live webcast> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&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 xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!

http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!
-- 
http://wicketframework.org






Re: [Wicket-user] can't get rid of "Choose One" in DropDownChoice

2006-04-01 Thread Vincent Jenks
Why have the default message at all?  Why provide something for developers that they should be determining themselves?  The default should be the first item in the list...if you need a default, override the method and provide one.
On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
yes moving the method to the renderer and calling that render method in the choice method is fine by me.Except what is then the default "Choose one" ?We can add it ofcourse in our default renderer: ChoiceRenderer
But then you have to specify it or subclass choicerenderer. Else suddenly you don't have that default message anymore.johan
On 3/31/06, Igor Vaynberg
 <[EMAIL PROTECTED]> wrote:

yes its a bit weird. if youd like you are more then welcome to file an rfe and maybe we can clean it up in a future version.-Igor
On 3/31/06, Vincent Jenks
 <[EMAIL PROTECTED]> wrote:


Got it, thanks.  It's confusing that it doesn't work like I described, even though the method can be overridden.  It'd be convenient to be able to do it how I posed verses doing this:


    //create calendar    List days = 
DateTime.getDaysListForward(2, 4);       DropDownChoice arrivalChoices = new DropDownChoice("arrivalDate", days)


    {    protected String getDefaultChoice(final Object selected)
    {    return ""; //get rid of "Choose One" default    }       };       arrivalChoices.setChoiceRenderer


(new IChoiceRenderer()
    {       public String getDisplayValue(Object object)    {    return object.toString();    }   
    public String getIdValue(Object object, int index)
    {    return object.toString();    }       });       form.add(arrivalChoices);


On 3/30/06, 
Igor Vaynberg <
[EMAIL PROTECTED]> wrote:you are putting getDefaultChoice into the renderer, when it actually belongs in the DropDownChoice
-IgorOn 3/30/06, 
Vincent Jenks <
[EMAIL PROTECTED]> wrote:The code...





        //create calendar        List days = DateTime.getDaysListForward(2, 4);                //add quantity select list                                form.add(new DropDownChoice("arrivalDate", days, new IChoiceRenderer()
        {            protected String getDefaultChoice(final Object selected)        {    return ""; //get rid of "Choose One" default        }                        public String getDisplayValue(Object object)
            {                return object.toString();            }                        public String getIdValue(Object object, int index)            {                return object.toString





();
            }                                }));        When rendered...I still get the "Choose One" option first.  Did I lose too much sleep last night...what did I miss?













Re: [Wicket-user] bind Map to DropDownChoice

2006-04-01 Thread Vincent Jenks
I see.  I just went w/ a List and changed the value when I created the list.  The dropdown was a list of dates so I just formatted the date differently for the view portion of the list.Thanks!
On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
there is no map support for this.What you could do is give the map to the ChoiceRenderer impland give the keys of the map as a list to the Choice.
johanOn 3/31/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:

I'm trying to get a Map of data so I can have the key be the value of the dropdown options and the value of the Map item be the value of the option in the dropdown.  Problem is, it doesn't look like DropDownChoice will accept a Map...unless I'm doing it wrong?
Is a Map the best way to go?  I was maybe considering using a single List collection and splitting a single string to get the two valuesbut that's pretty fugly too.






Re: [Wicket-user] RE: New Link component ?

2006-04-01 Thread Johan Compagner
ahh cool!method pointers!but Java choose innerclasses/interfaces approache for that... :(new Link("bla", new ActionHandler());But then the code is jus as big because you need to make that action handler... (which implements an interface)
So in the end result is the same.it would be really cool if you could do in java just his:class X{   X()   {    new Y(callMethod);  // no () !   }   private String callMethod()
}class Y{    Y(ObjectMethod method)    {   String ret = method.call();    }}   On 4/1/06, Jonathan Locke
 <[EMAIL PROTECTED]> wrote:
this suggestion (which is implementable in a user coderegardless of what goes into the core) add(new ReflectionLink("myLink", "myMethod"))
makes me wonder if Java couldn't use a reflection notation 
similar to "object.class" to specify Method objects, like "myMethod.method". then you could do this both conveniently and safely like this: add(new MethodLink("myLink", myMethod.method

))or even just add(new MethodLink(myMethod.method))which would assume the link is named myMethod...too bad "method" isn't a reserved keyword.




[Wicket-user] Re: New Link component ?

2006-04-01 Thread Alex
Eelco Hillenius  gmail.com> writes:

> However, as a nice alternative, I can see such a
> component live in Wicket extensions.
> 
I agree, this responds to our personnal style of coding and we don't to break
the wicket way of doing things :)
I think we would implement that and if successfull give it a life in Wicket
extensions :)

> 
> There are basically three options how this link could work:
> 1) it invokes the method on the parent
> 2) it invokes the method on the page
> 3) you explictly define the object the method is invoked on
>

We thought about it and as our internal component, we were ready to implement 2)
et 3). In our case we want provide a uniform style of coding : 90% of use cases,
the method is called on the page object. 10% left are filled by 3)
 
> I think 3) would be best as it is always clear what happens, can
> immediately be checked on validity (is the method available) and it's
> also the most flexible way then enables you e.g. to pass command
> objects.
> 
> Furthermore, I don't thing the click method suffices: it probably
> needs the invoking component to be passed in as a call argument, so
> that you can e.g. get it's model.
> 
Agree.

Indeed, thank you all for you answers, i must say we like coding with wicket and
we hope it will continue to focus on making web developper's life easier !




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Getting Page After Intercept Page

2006-04-01 Thread Johan Compagner
who is triggering the redirect to intercept page?I guess it is somewhere in youre own code (login needed or something)Maybe you can then set that page somewhere for you to access?the problem in 1.2 is that if that redirect happens in side the constructor of the page.. Then there is no page.. (page class maybe but not a page instance)
johanOn 3/29/06, Andrew Berman <[EMAIL PROTECTED]> wrote:
Is there a way to get the page the intercept page is supposed to go to inside the intercept page?  The PageMap has no method which allows me to get the continuation url, but I need some way of getting the Page after the intercept page because I want something to show up only if the continuation page is a specific page.  Hopefully this email makes sense...
Thanks for any help,--Andrew




Re: [Wicket-user] NoClassDefFoundError in TreeComponentInitializer#38

2006-04-01 Thread Johan Compagner
i also have seen this. (also in an intializer i believe and then with ajax scripts)It happens when i restart tomcat and tomcat deserializes sessions.If it doesn't deserializes sessions it doesn't happen.Will try if i can really reproduce it and see if i can figure out why ..
The big problem is that noclassdeffound is the most most annoying and don't tell what really is the problem error. I hate hate hate that error.johanOn 3/30/06, 
Matthias Albert <[EMAIL PROTECTED]> wrote:Hi,
today I tried to use my own class MyReasourceStreamLocator based onAbstractResourceStreamLocator and registered it in Application.init()(the derived method).Surprisingly, I got a "NoClassDefFoundError". A part of the stack trace
is shown below. I am using Wicket 1.2beta2.java.lang.NoClassDefFoundErrorjava.lang.Class.forName0(Native Method)java.lang.Class.forName(Class.java:164)wicket.markup.html.tree.TreeComponentInitializer.class$
(TreeComponentInitializer.java:38)wicket.markup.html.tree.TreeComponentInitializer.init(TreeComponentInitializer.java:38)wicket.Initializer.init(Initializer.java:59)wicket.Application.initialize
(Application.java:651)wicket.Application.initializeComponents(Application.java:716)wicket.Application.initializeComponents(Application.java:693)wicket.protocol.http.WicketServlet.init(WicketServlet.java
:287)Line 38 in the source file TreeComponentInitializer.java is the firstline inside this method:public void init(Application application){  PackageResource.bind(application, Tree.class, "
blank.gif"); //line #38  PackageResource.bind(application, Tree.class, "minus.gif");  PackageResource.bind(application, Tree.class, "plus.gif");  PackageResource.bind(application, Tree.class
, "tree.css");}Could it be a problem that Tree is an abstract class?Matthias Albert---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: New Link component ?

2006-04-01 Thread Alex
Jonathan Locke  gmail.com> writes: 

> this suggestion (which is implementable in a user coderegardless of what goes
into the core) add(new ReflectionLink("myLink", "myMethod"))makes me wonder if
Java couldn't use a reflection notation 
> similar to "object.class" to specify Method objects, like "myMethod.method".
then you could do this both conveniently and safely like this: add(new
MethodLink("myLink", myMethod.method
> ))or even just add(new MethodLink(myMethod.method))which would assume the link
is named myMethod...too bad "method" isn't a reserved keyword.
> 


That's funny i came to the same conclusions : why java has MyClass.class and not
MyMethod.method... anyway there must be some good reason to this :)

Make me thing of php5 who can do that sort of thing : 
$className = "myClass";
$anInstance = new $className();
$anInstance->doSomething();

Of course you loose all compile time check, IDE completion ... of Java




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] can't get rid of "Choose One" in DropDownChoice

2006-04-01 Thread Johan Compagner
yes moving the method to the renderer and calling that render method in the choice method is fine by me.Except what is then the default "Choose one" ?We can add it ofcourse in our default renderer: ChoiceRenderer
But then you have to specify it or subclass choicerenderer. Else suddenly you don't have that default message anymore.johanOn 3/31/06, Igor Vaynberg
 <[EMAIL PROTECTED]> wrote:
yes its a bit weird. if youd like you are more then welcome to file an rfe and maybe we can clean it up in a future version.-Igor
On 3/31/06, Vincent Jenks
 <[EMAIL PROTECTED]> wrote:

Got it, thanks.  It's confusing that it doesn't work like I described, even though the method can be overridden.  It'd be convenient to be able to do it how I posed verses doing this:

    //create calendar    List days = 
DateTime.getDaysListForward(2, 4);       DropDownChoice arrivalChoices = new DropDownChoice("arrivalDate", days)

    {    protected String getDefaultChoice(final Object selected)
    {    return ""; //get rid of "Choose One" default    }       };       arrivalChoices.setChoiceRenderer

(new IChoiceRenderer()
    {       public String getDisplayValue(Object object)    {    return object.toString();    }   
    public String getIdValue(Object object, int index)
    {    return object.toString();    }       });       form.add(arrivalChoices);

On 3/30/06, 
Igor Vaynberg <
[EMAIL PROTECTED]> wrote:you are putting getDefaultChoice into the renderer, when it actually belongs in the DropDownChoice
-IgorOn 3/30/06, 
Vincent Jenks <
[EMAIL PROTECTED]> wrote:The code...




        //create calendar        List days = DateTime.getDaysListForward(2, 4);                //add quantity select list                                form.add(new DropDownChoice("arrivalDate", days, new IChoiceRenderer()
        {            protected String getDefaultChoice(final Object selected)        {    return ""; //get rid of "Choose One" default        }                        public String getDisplayValue(Object object)
            {                return object.toString();            }                        public String getIdValue(Object object, int index)            {                return object.toString




();
            }                                }));        When rendered...I still get the "Choose One" option first.  Did I lose too much sleep last night...what did I miss?











Re: [Wicket-user] onAttach() with ajax

2006-04-01 Thread Johan Compagner
yeah i am also completely lost at the momentCan somebody start from the beginning again?johan:)On 3/31/06, Martijn Dashorst <
[EMAIL PROTECTED]> wrote:And now my HEAD hurts, or was it head HURTS? :-)
MartijnOn 3/31/06, Gwyn Evans <
[EMAIL PROTECTED]
> wrote:Yes, that's what I was meaning by the last bit of my previous email -
it just comes down to different shorthand for the main CVS development
branch.My issue was that saying you checked into "head" is reasonablyunambiguious whereas if I said to /get/ something from head, thequestion is did I mean HEAD, as then I could legitimately be talking
about either SVN or CVS and in both cases should really specifywhether on the head/trunk or a branch.So yes, "head" is for cvs, trunk is for svn, but "HEAD" is for both./Gwyn

On 31/03/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> svn dir called trunk is usually where the main branch is. cvs had no dir
> like this because tags/branches were treated differently. in svn tags and
> branches are treated like folders just like the main branch dir.>> so if you say i checked something into head in cvs, svn analogous would be i> checked it into trunk.>>> -Igor
 On 3/31/06, Gwyn Evans <[EMAIL PROTECTED]> wrote:> >
>  Surely SVN's HEAD is exactly the same as CVS's HEAD, in that they both
> refer to the latest revision in the particular branch that you're> working?>> In both cases you need to specify the branch, which might be "trunk"> (svn) or "the main trunk" (cvs)...
>> Or are you just using "head" to refer to for what I've called "the> main trunk", rather than the "HEAD" in "cvs update -r HEAD"?>> /Gwyn>
>> On 31/03/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> > what do you mean?
> >> > we have wicket top level: /svnroot/wicket
>  >> > then under wicket we have> >> > wicket/branches> > wicket/labels> > wicket/trunk> >> > so trunk is analogous to cvs head> >
> > -Igor> >> >> >> >  On 3/29/06, Gwyn Evans < [EMAIL PROTECTED]
> wrote:> > >> >  Except it's more complex than that, in that svn still has HEAD for the
> > revisions, with trunk just being the conceptual root from which> > branches split.> >> > /Gwyn> >> > On 29/03/06, Igor Vaynberg < 

[EMAIL PROTECTED]> wrote:> > > head is for cvs, trunk is for svn :)> > >> > > -Igor>>> --->
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language> that extends applications into web and mobile media. Attend the live webcast> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&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 xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!
-- 
http://wicketframework.org




Re: [Wicket-user] bind Map to DropDownChoice

2006-04-01 Thread Johan Compagner
there is no map support for this.What you could do is give the map to the ChoiceRenderer impland give the keys of the map as a list to the Choice.johanOn 3/31/06, 
Vincent Jenks <[EMAIL PROTECTED]> wrote:
I'm trying to get a Map of data so I can have the key be the value of the dropdown options and the value of the Map item be the value of the option in the dropdown.  Problem is, it doesn't look like DropDownChoice will accept a Map...unless I'm doing it wrong?
Is a Map the best way to go?  I was maybe considering using a single List collection and splitting a single string to get the two valuesbut that's pretty fugly too.




Re: [Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Juergen Donnerstag
+1 for now. For all new 1.2 interfaces and methods and for internal
methods (incl. pre 1.2).
Did we add replaceComponentTagBody in 1.2? If not, that should not
(yet) be changed. Especially as I can imagine that this function is
used by some users.

Juergen

On 4/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> +1 to do it now. if this does affect 1.2 only interfaces a lot then we
> should do this before we actually release those interfaces into the wild.
>
>  -Igor
>
>
>
> On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >
> > Currently almost all our interfaces that makes the output or Response
> writing code are using Strings
> > as parameters or return types
> >
> > I would like to change all those methods to use Charsequence because this
> would mean that
> > we don't have to do toString() every where and just passing directly the
> buffer that was made
> > This will greatly reduce String char array copies.
> >
> > This does mean that for example:
> >
> > Response.write(String) -> Response.write(CharSequence)
> >
> > and
> >
> > protected final void replaceComponentTagBody(final MarkupStream
> markupStream,
> > final ComponentTag tag, final String body)
> >
> > protected final void replaceComponentTagBody(final MarkupStream
> markupStream,
> > final ComponentTag tag, final CharSequence body)
> >
> > for calling methods nothing will really change because the String maps on
> its interface.
> >
> > Only when users have implemented such a method they should also convert
> > so for the above replaceComponentTagBody this is not a problem because it
> is final anyway
> >
> > But for Response.write() subclasses should also be refactored.
> >
> >
> > Don't know currently yet how many overridable methods really would be
> affected.
> > But it could enhance performance quite a bit.
> >
> > Many of the interfaces that would affected are 1.2 only interfaces so if
> we change them now
> > those interfaces never made it to a final version.
> >
> > So what should we do:
> >
> > [ ] do it in 1.2
> > [ ] do it in 2.0/1.3 with another big refactor? (then interfaces
> introduced in 1.2 will change again)
> > [ ] never do it.
> >
> >
> > johan
> >
> >
>
>


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Johan Compagner
if it is it is a final methodso it doesn't matter it can only be called onso calling it with the same code that is a string just compiles fineand you can't override it (that would be a problem because then they also need to change the signature)
johanOn 4/1/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
+1 for now. For all new 1.2 interfaces and methods and for internalmethods (incl. pre 1.2).Did we add replaceComponentTagBody in 1.2? If not, that should not(yet) be changed. Especially as I can imagine that this function is
used by some users.JuergenOn 4/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:> +1 to do it now. if this does affect 1.2 only interfaces a lot then we
> should do this before we actually release those interfaces into the wild.>>  -Igor On 4/1/06, Johan Compagner <[EMAIL PROTECTED]
> wrote:> >> > Currently almost all our interfaces that makes the output or Response> writing code are using Strings> > as parameters or return types> >> > I would like to change all those methods to use Charsequence because this
> would mean that> > we don't have to do toString() every where and just passing directly the> buffer that was made> > This will greatly reduce String char array copies.> >> > This does mean that for example:
> >> > Response.write(String) -> Response.write(CharSequence)> >> > and> >> > protected final void replaceComponentTagBody(final MarkupStream> markupStream,
> > final ComponentTag tag, final String body)> >> > protected final void replaceComponentTagBody(final MarkupStream> markupStream,> > final ComponentTag tag, final CharSequence body)
> >> > for calling methods nothing will really change because the String maps on> its interface.> >> > Only when users have implemented such a method they should also convert
> > so for the above replaceComponentTagBody this is not a problem because it> is final anyway> >> > But for Response.write() subclasses should also be refactored.> >> >
> > Don't know currently yet how many overridable methods really would be> affected.> > But it could enhance performance quite a bit.> >> > Many of the interfaces that would affected are 
1.2 only interfaces so if> we change them now> > those interfaces never made it to a final version.> >> > So what should we do:> >> > [ ] do it in 1.2> > [ ] do it in 
2.0/1.3 with another big refactor? (then interfaces> introduced in 1.2 will change again)> > [ ] never do it.> >> >> > johan> >> >>>
---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Form Feedback

2006-04-01 Thread Alexander Lohse

Hi,

can anyone explain how the new (1.1) Form-Feedback-System works?

How does the Form know which Feedback-Panel to use?

What if I have multiple forms and multiple feedbacks on one page?

Is there a way to skip the messaging and give the feedback in  
different ways?
For example: I used to just mark the erroneous fields with special  
css or place the messages right next to field.


Thank you,

Alex
–––
Alexander Lohse
(Entwicklungsleitung & Projektmanagement)

Human Touch Medienproduktion GmbH
Am See 1
17440 Klein Jasedow
Deutschland

Tel: +49 38374 752 11
Fax: +49 38374 752 23
e-mail: [EMAIL PROTECTED]
Internet: http://www.webjazz.de
–––




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket/Tomcat configuration: Where is System.out ???

2006-04-01 Thread Jan Mikkelsen
Hi Frank

I *think* system.out/err goes to catalina.out.

If you are using log4j, but happen to write a few system.outs, you might
want to do something like this in your Application class:

/* redirect stdout/stderr to log4j */
System.setOut(new PrintStream(new 
LoggingOutputStream(Category.getInstance("sysout"), Priority.INFO), true));
System.setErr(new PrintStream(new 
LoggingOutputStream(Category.getInstance("syserr"), Priority.WARN), true));

LoggingOutputStream is attached to this mail.

/jan

 
> To debug an application I've inserted a System.out.println command.
> Where is System.out when I'm running Wicket on Tomcat?  Is it captured
> by some special Wicket logfile (I can't find any)?  It doesn't seem to
> be going to any of the Tomcat logfiles that I can see, nor to the
> console window (unless I'm just missing it).\
>  
> Is this something I have to configure in Tomcat to see the output of
> System.out?



LoggingOutputStream.java 
Description: Binary data


[Wicket-user] ajax update of Image/BufferedDynamicImageResource doesn't work?

2006-04-01 Thread Ray Cromwell


I have a charting application that I tried to convert to Ajax, so that 
as chart options are changed, the image is reloaded via AJAX, but for 
whatever reasons, it is not being reloaded.


I have the following code:

checkBox.add(new AjaxFormComponentUpdatingBehavior("onchange")
{

protected void onUpdate(AjaxRequestTarget 
target)

{
   reRender();
   target.addComponent(imageComp);
   target.addComponent(queryLabel);
}
});


I have the following code which gets called in reRender()

Note: I added the remove/add of the component cause I was trying to see 
if I could make it reload by creating a new image component, and 
potentially changing the ID, but it still didn't work.


JFreeChart chart = PlotUtilities.setupChart(query);
BufferedImage image = chart.createBufferedImage(640, 480, null);

r.invalidate();
remove(imageComp);

r = new BufferedDynamicImageResource();

r.setImage(image);
r.setCacheable(false);

imageComp=new Image("chartimg", r);
imageComp.setVersioned(true);
add(imageComp);
imageComp.modelChanging();
imageComp.modelChanged();

I have a feeling that this is a browser caching issue and that the Image 
 SRC url may need to have a random number added to it or something to 
let the browser know the image has changed, or else, the AJAX code needs 
some kind of special logic to forcefully reload the image.






---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Johan Compagner
Currently almost all our interfaces that makes the output or Response writing code are using Stringsas parameters or return typesI would like to change all those methods to use Charsequence because this would mean that
we don't have to do toString() every where and just passing directly the buffer that was madeThis will greatly reduce String char array copies.This does mean that for example:Response.write(String) -> 
Response.write(CharSequence)andprotected final void replaceComponentTagBody(final MarkupStream markupStream,            final ComponentTag tag, final String body)protected final void replaceComponentTagBody(final MarkupStream markupStream,
            final ComponentTag tag, final CharSequence body)for calling methods nothing will really change because the String maps on its interface.Only when users have implemented such a method they should also convert 
so for the above replaceComponentTagBody this is not a problem because it is final anywayBut for Response.write() subclasses should also be refactored.Don't know currently yet how many overridable methods really would be affected.
But it could enhance performance quite a bit.Many of the interfaces that would affected are 1.2 only interfaces so if we change them nowthose interfaces never made it to a final version.So what should we do:
[ ] do it in 1.2[ ] do it in 2.0/1.3 with another big refactor? (then interfaces introduced in 1.2 will change again)[ ] never do it.johan


[Wicket-user] date formats and SimpleConverterAdapter (wicket 1.2 beta 2)

2006-04-01 Thread Simon Edwards
Hello,

I'm trying to get some date formatting on the go for Date.class field. The 
SimpleConverterAdapter example that was posted to the list works fine for 
URLs ( http://sourceforge.net/mailarchive/message.php?msg_id=15132297 ). But 
after rewriting it for doing date formatting I just get an exception when the 
value is being written back to my domain POJO with the help of a 
CompoundPropertyModel.

Anyone know what is going on?

code:
-
TextField dob = new TextField("dateOfBirth",Date.class) {
  private SimpleDateFormat df = new SimpleDateFormat("dd-MM-");
  public IConverter getConverter() {
return new SimpleConverterAdapter() {

  public String toString(Object value) {
System.err.println("SimpleConverterAdapter.toString() "+value);
  return value != null ? df.format( (Date)value ) : null;
  }

  public Object toObject(String value) {
System.err.println("TextField.toObject() "+value);
if(value==null || "".equals(value)) {
  throw new ConversionException("'"+value+"' is not a valid date.");
}
Date newDate = df.parse(value,new ParsePosition(0));
System.err.println("TextField.toObject() returning "+newDate);
return newDate;
  }
};
  }
};
-
exception (slightly formatted, 1-2-2003 was submitted in the HTML text field):

-
INFO  - MarkupCache- Loading markup from 
file:/home/sbe/devel/apache-tomcat-5.5.16/webapps/wicket-examples/WEB-INF/classes/wicket/examples/tvguide/PersonsTab.html

INFO  - MarkupCache- Loading markup from 
jar:file:/home/sbe/devel/apache-tomcat-5.5.16/webapps/wicket-examples/WEB-INF/lib/wicket-1.2-beta2.jar!/wicket/markup/html/panel/FeedbackPanel.html

SimpleConverterAdapter.toString(): 'Sat Apr 01 10:39:55 CEST 2006'

SimpleConverterAdapter.toObject(): '01-02-2003'

SimpleConverterAdapter.toObject() returning 'Sat Feb 01 00:00:00 CET 2003'

SimpleConverterAdapter.toObject(): 'Sat Feb 01 00:00:00 CET 2003'   
   

SimpleConverterAdapter.toObject() returning 'null'

ERROR - RequestCycle   - Method onFormSubmitted of interface 
wicket.markup.html.form.IFormSubmitListener targeted at component 
[MarkupContainer [Component id = personform, page = 
wicket.examples.tvguide.TvGuidePage, path = 
1:tabs:panel:personform.PersonsTab$4, isVisible = true, isVersioned = true]] 
threw an exception

wicket.WicketRuntimeException: Method onFormSubmitted of interface 
wicket.markup.html.form.IFormSubmitListener targeted at component 
[MarkupContainer [Component id = personform, page = 
wicket.examples.tvguide.TvGuidePage, path = 
1:tabs:panel:personform.PersonsTab$4, isVisible = true, isVersioned = true]] 
threw an exception
  at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:173)
  at 
wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
  at 
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
...

Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  ...

Caused by: wicket.util.convert.ConversionException: Can't convert value: Sat 
Feb 01 00:00:00 CET 2003 to class: class java.util.Date for setting it on 
[EMAIL PROTECTED]
at 
wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:824)
  ...

INFO  - MarkupCache- Loading markup from 
jar:file:/home/sbe/devel/apache-tomcat-5.5.16/webapps/wicket-examples/WEB-INF/lib/wicket-1.2-beta2.jar!/wicket/markup/html/pages/ExceptionErrorPage.html

SimpleConverterAdapter.toString(): 'Sat Apr 01 10:39:55 CEST 2006'

-

info:

* wicket 1.2 beta 2
* tomcat 5.5
* jdk 1.5.0_06

thank you,

-- 
Simon Edwards             | KDE-NL, Guidance tools, Guarddog Firewall
[EMAIL PROTECTED]       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: One refactor to do in 1.2 if possible: String Param or Returntype to its interface CharSequence..

2006-04-01 Thread Igor Vaynberg
+1 to do it now. if this does affect 1.2 only interfaces a lot then we
should do this before we actually release those interfaces into the
wild.

-Igor
On 4/1/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
Currently almost all our interfaces that makes the output or Response writing code are using Stringsas parameters or return typesI would like to change all those methods to use Charsequence because this would mean that
we don't have to do toString() every where and just passing directly the buffer that was madeThis will greatly reduce String char array copies.This does mean that for example:Response.write(String) -> 
Response.write(CharSequence)andprotected final void replaceComponentTagBody(final MarkupStream markupStream,            final ComponentTag tag, final String body)protected final void replaceComponentTagBody(final MarkupStream markupStream,
            final ComponentTag tag, final CharSequence body)for calling methods nothing will really change because the String maps on its interface.Only when users have implemented such a method they should also convert 
so for the above replaceComponentTagBody this is not a problem because it is final anywayBut for Response.write() subclasses should also be refactored.Don't know currently yet how many overridable methods really would be affected.
But it could enhance performance quite a bit.Many of the interfaces that would affected are 1.2 only interfaces so if we change them nowthose interfaces never made it to a final version.So what should we do:
[ ] do it in 1.2[ ] do it in 2.0/1.3 with another big refactor? (then interfaces introduced in 1.2 will change again)[ ] never do it.johan





Re: [Wicket-user] Wicket in a clustered environment

2006-04-01 Thread Johan Compagner
we don't have on hand experiences with a live setup.But we developers try to test it every now and then to see if everything works ok.We do take clustering seriously.johan
On 3/31/06, Tom van Zummeren <[EMAIL PROTECTED]> wrote:















I was wondering…

 

Does anyone have any experience with
Wicket in a clustered environment?

If yes, please tell me your experience
with it.

 

Thanks in advance,

 

 

Tom








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.3/298 - Release Date: 3/30/2006