[Wicket-user] Re: Hooks again

2005-11-16 Thread sven
see

protected Page onRuntimeException(final Page page, final RuntimeException e)

in the Application class

I've seen this method, but regretfully it doesn't fit. It is called by 
RequestCycle.internalOnRuntimeException() which:

- doesn't get hands on the current page

Line 415:
catch (RuntimeException e)
{
// Handle any runtime exception
internalOnRuntimeException(null, e);
}

- always logs an error, although in my case the exception is *not* unexpected:

Line 785:
log.error(Unexpected runtime exception [page =  + page + ], e);

- it schedules a redirect while I just need the current page to be redisplayed:

Line 804:
redirectTo(redirectTo);

We could introduce new callbacks on the page (e.g. an corresponding 
onRuntimeException() for internalOnRuntimeException()) but the simplest would 
be to make invokeInterface(Component,Method,Page page) protected.

Perhaps you see another solution?

Sven


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] If/Else component display

2005-11-16 Thread Johan Compagner
personally for a listview is empty i would do it in one markup
and set the visibility on the label or the listview.
In preview you will see both then but else you won't see none.
On 11/16/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
Sounds to me you are looking for something more special purpose :)Why don't you create a panel factory or something similar? You couldmake container components that would allow you to do a if/else likeconstruction in your markup, but I wouldn't be a big fan of that. I
think working with panels for conditional/ flexible markup is a greatway to go. And as Wicket lets you manage your own components, you canimplement any strategy you want to this.EelcoOn 11/15/05, Nick Heudecker 
[EMAIL PROTECTED] wrote: Those are the two approaches I've used.I'm looking for a way to either abstract one or both of those approaches to make them more general purpose.
 On 11/15/05, Igor Vaynberg [EMAIL PROTECTED] wrote:  there are two basic approaches:  1) add the component anyways and set its visibility tag accordingly
  2) create panels that either contain or do not contain the component and add the appropriate panel   If either is unclear let me know and i can go further into detail. 
  -Igor  On 11/15/05, Nick Heudecker [EMAIL PROTECTED]  wrote:   Hi,  
   My app has multiple instances where, if a ListView is empty, I want to display some message to the user, like You haven't defined any widgets yet.The problem is this requires what I feel to be a lot of code in the
 Page implementation.Is there a pattern or component that I'm missing that would make this easier? Thanks.
---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Laurent PETIT
Hello,

I had some same interrogations as Matej has ...

I'm currently trying to fully reimplement a complex form made in
struts in wicket, and some buttons of the form are there only to
dynamically add elements to a list (doing a roundtrip with the
server), but don't have to trigger the validation stuff.
But that's what's done, and it's a bit annoying.

 Why can't use just use a model for this?

I agree with you, model should be updated, I think at Wicket models as
View models. But the idea of Matej of not immediately storing in the
real model could be a good idea (but not done in the invalid data
field).


What could be great is to register / inform the Form which buttons may
trigger the validators/model updating of the components, and which
buttons may not.

Regards,

--
Laurent


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Servlet forward to a JSP

2005-11-16 Thread Alexandru Popescu
I think a very nice addition to this would be to allow the included JSP to have access to the 
current component model.


./alex
--
.w( the_mindstorm )p.

#: Robert McClay changed the world a bit at a time by saying on  11/14/2005 
9:27 AM :#
Here's a starting point if anyone wants to include a servlet / jsp in 
their page via RequestDispatcher.


public class IncludeServlet extends WebComponent {
  private static final long serialVersionUID = 1L;

  public IncludeServlet(String id) {
super(id);
  }

  public IncludeServlet(String id, IModel model) {
super(id, model);
  }

  protected void onComponentTagBody(MarkupStream markupStream, 
ComponentTag openTag) {
ServletWebRequest   servletWebRequest = 
(ServletWebRequest) getRequest();
HttpServletRequest  request = 
servletWebRequest.getHttpServletRequest();
WebResponse webResponse = (WebResponse) 
getRequestCycle().getOriginalResponse();
HttpServletResponse response = 
webResponse.getHttpServletResponse();
RequestDispatcher   dispatcher = ((ServletWebRequest) 
getRequest()).getHttpServletRequest().getRequestDispatcher(getModelObjectAsString());
 

   GenericServletResponseWrapper   wrappedResponse = new 
GenericServletResponseWrapper(response);


try {
  dispatcher.include(request, wrappedResponse);
} catch (ServletException e) {
  throw new RuntimeException(e);
} catch (IOException e) {
  throw new RuntimeException(e);
}
replaceComponentTagBody(markupStream, openTag, new 
String(wrappedResponse.getData()));

  }
}

class GenericServletOutputStream extends ServletOutputStream {
  private OutputStream out;

  public GenericServletOutputStream(OutputStream out) {
this.out = out;
  }

  public void write(int b) throws IOException {
out.write(b);
  }

  public void write(byte[] b) throws IOException {
out.write(b);
  }

  public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
  }
}

class GenericServletResponseWrapper extends HttpServletResponseWrapper {
  private ByteArrayOutputStream output;

  public GenericServletResponseWrapper(HttpServletResponse response) {
super(response);
output = new ByteArrayOutputStream();
  }

  public byte[] getData() {
return output.toByteArray();
  }

  public ServletOutputStream getOutputStream() {
return new GenericServletOutputStream(output);
  }

  public PrintWriter getWriter() {
return new PrintWriter(getOutputStream(), true);
  }
}

On 2005-11-06 16:27:44 -0700, Eelco Hillenius [EMAIL PROTECTED] said:


Ah, yes. True. It used to resolve local includes using
javax.servlet.RequestDispatcher, i which case including request
attributes would work. However, that proved to be quite problametic
and we changed it to always use the absolute requests.

What you need shouldn't be too hard however. But it is not something
Wicket supports out-of-the-box (and I'm not sure whether that would be
in Wicket's scope either).

You don't need Wicket to tell stopping any processing, as that is
already part of the idea of component orientation. What you need (to
build) is a component that gets the content you want to include during
it's rendering process. E.g. by letting your component extend from
WebComponent and overriding method onComponentTagBody to do the work.
In this method, you'll probably want to use the request processor:

		RequestDispatcher dispatcher  
((ServletWebRequest)getRequest()).getHttpServletRequest()

.getRequestDispatcher(*path-to-jsp*);

For the including.

Eelco





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Johan Compagner
i agree
For a roundtrip so page to the same page with do something i will build that.
For example a onSelectionChangeListener on a DropDown works now through a normal link (a get request)
And that has to work through the form itself. So it has to submit the form, but don't do anything with it
then call the listener for the selection (so the dropdown) then redisplay the form with the values that where submitted.

That is what i want to support/build. I hope to start with it early next week.

But what matej wants is having a form on one page. Then you go to another to get some other data. Then go back
and then still has the right form data in it. But that shouldn't be submitted to any model or validated.
I personally say. Do that with an in between model. And don't do
youre validation in form-model but in inbetween model-real
model

I even think that such a in between model where you can add validators
to for specific properties and have a special submit method on
would be even very nice for the core of wicket.

johan
On 11/16/05, Laurent PETIT [EMAIL PROTECTED] wrote:
Hello,I had some same interrogations as Matej has ...I'm currently trying to fully reimplement a complex form made instruts in wicket, and some buttons of the form are there only todynamically add elements to a list (doing a roundtrip with the
server), but don't have to trigger the validation stuff.But that's what's done, and it's a bit annoying. Why can't use just use a model for this?I agree with you, model should be updated, I think at Wicket models as
View models. But the idea of Matej of not immediately storing in thereal model could be a good idea (but not done in the invalid datafield).What could be great is to register / inform the Form which buttons may
trigger the validators/model updating of the components, and whichbuttons may not.Regards,--Laurent---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today
Register for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_idv28alloc_id845opclick
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Laurent PETIT
Hello,

 I personally say. Do that with an in between model. And don't do youre
 validation in form-model but in inbetween model-real model

I may be wrong, but this really makes me think we are reinventing
Struts Forms-like beans with this in between model.

Indeed, all input type=text fields should in the in between model
be strings because the model will be updated without any check, ,
not sure this is the right pattern to implement ...


Difficult area ...

--
Laurent


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Johan Compagner
this also can be completely build into form itself.
But then i think a separation looks/smells better.. 
But i am open to any idea's !

johan
On 11/16/05, Laurent PETIT [EMAIL PROTECTED] wrote:
Hello, I personally say. Do that with an in between model. And don't do youre validation in form-model but in inbetween model-real modelI may be wrong, but this really makes me think we are reinventing
Struts Forms-like beans with this in between model.Indeed, all input type=text fields should in the in between modelbe strings because the model will be updated without any check, ,
not sure this is the right pattern to implement ...Difficult area ...--Laurent---This SF.Net email is sponsored by the JBoss Inc.Get Certified Today
Register for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_idv28alloc_id845opclick
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Christian Essl
Sorry for my late replay and thanks for fixing all you did. Unfortunately 
I can still not find the code which does not forward finalize and has the 
IFieldValueFactory. Is it still in wicket-contrib-spring - is it tagged?



Do you mind if i put your stuff into the main project? Not sure how to
manage this stuff best...plugins will require different dependencies so 
that

will pollute the main projects, but the plugins are too small to warrant
their own projects...


Of course you can use my stuff. Currently I'm not sure wheter we need 
commons attributes. For pre JDK1.5 I'd say a field naming convention would 
do it as well (ie _springBean_productDAO)? That's also much easier to use 
than commons-attributes.


BTW: Maybe the SpringInjector could itself be setup in a spring-context so 
you can plugin different IFieldValueFactories and set them up.


Christian

On Fri, 11 Nov 2005 14:56:45 -0800, Igor Vaynberg 
[EMAIL PROTECTED] wrote:





decisions decisions

-Igor


On 11/11/05, Christian Essl [EMAIL PROTECTED] wrote:


Igor made it quite easy to add your own way to inject things (not just
SpringBeans). You just implement your own IObjectLocatorFactory and 
extend

the SpringInjector to use this one.

Enclosed is some code which uses jakarta commons-attributes to do the 
same
thing as JDK1.5 annotations does with javadoc (the code is not tested 
but

it is fairly simple so it should work).

BTW: Maybe the ProxyInjector could take an array of 
IObjectLocatorFactory

and takes the first one which does not return null. This way you could
combine different IObjectLocatorFatories in one place?

Christian



On Fri, 11 Nov 2005 14:34:28 -0600, Ryan Sonnek [EMAIL PROTECTED]
wrote:

 I would be very interested in a 1.4 port of this. Do you think it
 could use the same annotation based approach, but using Qdox to
 process instead of the built in 1.5 annotation functionality?

 On 11/11/05, Christian Essl [EMAIL PROTECTED] wrote:
 The code realy looks good.

 Concerning the Proxy. For the cglib proxy you should definately not
 forward the call to finalize(), because when the proxy gets GC it 
will

 call finalize() on the target and that is not what you want. I think
 same
 reasons apply for the other Object methods except equals, hasCode and
 toStrign. JDK proxies do not forward them as well.

 Serializing: CGLIB proxies. I think the problem if you just plainly
 serialize them withotu writeReplace/readResolve is that if the proxy
 gets
 desiarialized in another VM than the dynamically create class of 
CGLIB

 could not be yet there. So this could make problems in clusters etc.

 Christian

 On Fri, 11 Nov 2005 00:50:13 -0800, Igor Vaynberg
 [EMAIL PROTECTED] wrote:

  more refactoring/tests and some new things:
 
  SpringWebApplicationFactory - which will pull the webapplication
 subclass
  out of spring application context
 
  SpringInjector/SpringWebApplica tion - make it very simple to 
inject

  objects
  using @SpringBean annotation with lazy-init proxies
 
  SpringWebPage - autoinitailizes its subclasses using the
 SpringInjector
 
  I also deprecated all the old stuff and moved it into
  wicket.contrib.spring.old package. The new stuff is the
  official/supported/standard/whateveryouwanttocallit way to do
spring
  integration.
 
  currently we only provide an easy way to inject objects using jdk5
  annotations. it is possible to create a jdk1.4 object locator
 factories,
  but
  there are many options as to how to store metadata/do the lookup. 
if

  someone
  is interested in this please let me know and we can discuss some 
ways

 of
  doing this.
 
  As always, any feedback is greatly appreciated.
 
  -Igor
 
 
 
  On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  heh, looks like we pretty much did the same thing. my proxies 
arent

 as
  advanced as yours, dont know if that a plus or a minus at this
 point. I
  liked the lazyinitproxy interface so i just added that to my code.
 
  im attaching the code to make it easier to find.
 
  -Igor
 
  On 11/9/05, Christian Essl [EMAIL PROTECTED] wrote:
  
   Unfortunately the public cvs is late so I can't see your changes
 yet.
   Anyway before I've read this mail I started on reworking the
 proxing
   code
   (attached). SerializableLazyProxyCreator is the only thing with
  content
   the others are interfaces and one (basic) test.
  
   There are quite some changes:
   - uses as now as said yesterday an ObjectResolver (I've to check
 with
   your
   refactoring)
   - fixed differend bugs in my original writeReplace/resolve code 
of

 the
   CGLIB proxy
   - JDK and CGLIB proxies implement LazyInitProxy. This can be
 useful to
   see
   if an object is already a lazy init proxy and to get the
  ObjectResolver
   from it (the cglib intercepors don't have to be serialziable
 anymore).
   - JDK and CLGIB: added handling of equals/hashCode methods
 (compares
  the
   proxy for identity - instead of forwarind to the target)
   - CGLIB: truned of the forward 

Re: [Wicket-user] Preserve form state

2005-11-16 Thread Alexandru Popescu

Matej's scenario looks to me very much like a 'wizard' or even more generalized 
as a flow.

Most probably the generic scenario sounds like:
1/ on each page do validate the page input and persist the state
2/ on the end page validate the whole input

WebWork has added support for something similar by incorporating rife-continuations. Unfortunately 
my knowledge about continuations and rife is reduced, so I cannot further comment.


hth,

./alex
--
.w( the_mindstorm )p.


#: Matej Knopp changed the world a bit at a time by saying on  11/13/2005 3:04 
AM :#

Hi.

I know this has been discussed already, but still I'm opening it once 
more. I think there should be a way to preserve form state without 
validation and model updating.


The use case is following.
I have a (complex) form with some fields, that can not be entered 
directly, i.e. they have to be selected on other page. So I need to move 
between pages, but I don't want to lose any information entered on the 
previous page. If I use Button, the form gets processed, validated, etc 
and the action won't execute unless all entered data is valid. If I turn 
defaultProcessing off, the action executes, but the data (not written to 
model yet) is lost.


What I'm using now is little hacky, but it works. I have my own class 
derived from Form, my own SubmitButton, ImmediateButton and 
FeedbackPanel. ImmediateButton acts like classic Button with 
defaultFormProcessing turned off, but unlike it, ImmediateButton stores 
the state in each component (in the string reserved for invalid data). 
So there's my own Feedback panel (Although filter would be probably 
enough) that detects that ImmediateButton was clicked and hides 
validation messages (there's a lot of them, because ImmediateButton 
marks every component as invalid).


This approach works pretty well, but doesn't feel quite right. I think 
there definitely should be a way to preserve form state (without 
validation and updating model) directly supported by wicket.
Not to mention that (if I recall correctly) the string field in 
FormComponent used for storing invalid data is transient.


Btw. I've managed to persuade people from my company to use wicket for 
one of our projects. Since I do most of the current development, it's 
not a big deal, because I've personally been using wicket for some time 
now. But I can say they are really impressed with the productivity and 
simplicity of certain actions (like moving between complex pages forth 
and back ;) - that are sometimes quite difficult and cumbersome in struts.
Not to mention excellent DataView and DatePicker components, markup 
inheritance and compoents in general.


Kudos wicket team, you're doing excelent work!

Sorry for really long mail,

-Matej


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Laurent PETIT
On 11/16/05, Johan Compagner [EMAIL PROTECTED] wrote:
 this also can be completely build into form itself.
 But then i think a separation looks/smells better..
 But i am open to any idea's !

For me, the problem arises when you have a hierarchical model, and
when you can edit in the same time values at multi-levels.

For example (keeping it simple) :
a Monkey holds bananas.
The page displays the list of Monkeys, with editable field for the age
(numeric), and a label for the name (non editable) of the Monkey.
And for each Monkey, its bananas are displayed, with a description
and weight field for each banana.

The page also displays a New Monkey button that creates a new
Monkey, grabs its name from a textfield (must not be null) and adds
the new monkey (with default age and no bananas) at the end of the
monkey list.

The page also displays a New banana per monkey, and a Delete
banana for each banana of each monkey.

And finally, the page has a global submit button.

Use cases :
uc1 :I want the user to be able to create a new monkey without
triggering the validation and model update of the other monkeys and
bananas fields.
uc2 : When the user creates a monkey, the monkey name textfield is
used to create some identifier for the monkey. This field is only
needed for the creation of a new monkey : it is Required when
clicking the New Monkey button. The name textfield is only
concerned by the New banana button, and does not have to validate
itself and block the process if empty, when the user presses the
global submit button.

What is really needed here is many multiple unit of work forms in the
same page, but contrary to the behaviour of the HTML form element, I
don't want to loose the user input on the other forms.

Not sure if it is clear, if not, I can maybe write a template html
page to show the page I'm talking about.

Please note that here I don't address the whole problem as suggested
by Matej, since my scenario didn't describe a form that may span
many Wicket pages ...

--
laurent


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Johan Compagner
I think youre usecases can be build now with the current code base.

uc1: that new button should be an immediant button (this is a property) then the model values are not processed.
uc2: you just have to validate this in the button i talked above (if text field is filled in yes or no)

johan
On 11/16/05, Laurent PETIT [EMAIL PROTECTED] wrote:
On 11/16/05, Johan Compagner [EMAIL PROTECTED] wrote: this also can be completely build into form itself. But then i think a separation looks/smells better..
 But i am open to any idea's !For me, the problem arises when you have a hierarchical model, andwhen you can edit in the same time values at multi-levels.For example (keeping it simple) :
a Monkey holds bananas.The page displays the list of Monkeys, with editable field for the age(numeric), and a label for the name (non editable) of the Monkey.And for each Monkey, its bananas are displayed, with a description
and weight field for each banana.The page also displays a New Monkey button that creates a newMonkey, grabs its name from a textfield (must not be null) and addsthe new monkey (with default age and no bananas) at the end of the
monkey list.The page also displays a New banana per monkey, and a Deletebanana for each banana of each monkey.And finally, the page has a global submit button.Use cases :
uc1 :I want the user to be able to create a new monkey withouttriggering the validation and model update of the other monkeys andbananas fields.uc2 : When the user creates a monkey, the monkey name textfield is
used to create some identifier for the monkey. This field is onlyneeded for the creation of a new monkey : it is Required whenclicking the New Monkey button. The name textfield is only
concerned by the New banana button, and does not have to validateitself and block the process if empty, when the user presses theglobal submit button.What is really needed here is many multiple unit of work forms in the
same page, but contrary to the behaviour of the HTML form element, Idon't want to loose the user input on the other forms.Not sure if it is clear, if not, I can maybe write a template html
page to show the page I'm talking about.Please note that here I don't address the whole problem as suggestedby Matej, since my scenario didn't describe a form that may spanmany Wicket pages ...
--laurent---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_idv28alloc_id845opclick___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Preserve form state

2005-11-16 Thread Laurent PETIT
Hello,

 I think youre usecases can be build now with the current code base.
 uc1: that new button should be an immediant button (this is a property) then
 the model values are not processed.

By the time, I don't really understand the immediant term, doesn't
seem to be an english term at all (trusting my dictionary).

 uc2: you just have to validate this in the button i talked above (if text
 field is filled in yes or no)

What I don't like in this solution is that it is not general enough :
I can not benefit from the out of the box first level Validators for
validating the monkey name : what if I need some pattern matching, or
if it must be an Integer, ...

What I would prefer, and that could be more general, would be a mean
to associate the validation (and model updating !) of some parts of
the form to the general form submitting buttons, ... and associating
other parts of the form to other actions. Thus being able to group
area of concerns ...


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Matej Knopp

Hi.

The problem is, that I don't want to validate the form, unless user 
clicks 'OK'. The model is updated after validation only. But the 
'choose' button should NOT validate the form.


I don't think it's a good thing storing the temporary values in model 
(at least in my case), because model is typed. The temporary values 
should only be strings (get from Http request).


-Matej

Johan Compagner wrote:

Just one extra remark.
Why can't use just use a model for this?
And that model is an in between model for you real model object?

Ok you have to do youre validation a bit different  (it can't be between 
Form-Model

but it has to be between TmpModel-RealModel

This looks to me like a much better way to have multiply page forms...

johan


On 11/13/05, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Hi.

I know this has been discussed already, but still I'm opening it once
more. I think there should be a way to preserve form state without
validation and model updating.

The use case is following.
I have a (complex) form with some fields, that can not be entered
directly, i.e. they have to be selected on other page. So I need to move
between pages, but I don't want to lose any information entered on the
previous page. If I use Button, the form gets processed, validated, etc
and the action won't execute unless all entered data is valid. If I turn
defaultProcessing off, the action executes, but the data (not written to
model yet) is lost.

What I'm using now is little hacky, but it works. I have my own class
derived from Form, my own SubmitButton, ImmediateButton and
FeedbackPanel. ImmediateButton acts like classic Button with
defaultFormProcessing turned off, but unlike it, ImmediateButton stores
the state in each component (in the string reserved for invalid data).
So there's my own Feedback panel (Although filter would be probably
enough) that detects that ImmediateButton was clicked and hides
validation messages (there's a lot of them, because ImmediateButton
marks every component as invalid).

This approach works pretty well, but doesn't feel quite right. I think
there definitely should be a way to preserve form state (without
validation and updating model) directly supported by wicket.
Not to mention that (if I recall correctly) the string field in
FormComponent used for storing invalid data is transient.

Btw. I've managed to persuade people from my company to use wicket for
one of our projects. Since I do most of the current development, it's
not a big deal, because I've personally been using wicket for some time
now. But I can say they are really impressed with the productivity and
simplicity of certain actions (like moving between complex pages forth
and back ;) - that are sometimes quite difficult and cumbersome in
struts.
Not to mention excellent DataView and DatePicker components, markup
inheritance and compoents in general.

Kudos wicket team, you're doing excelent work!

Sorry for really long mail,

-Matej


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
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 the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Laurent PETIT
On 11/16/05, Matej Knopp [EMAIL PROTECTED] wrote:
 Hi.

 The problem is, that I don't want to validate the form, unless user
 clicks 'OK'. The model is updated after validation only. But the
 'choose' button should NOT validate the form.

 I don't think it's a good thing storing the temporary values in model
 (at least in my case), because model is typed. The temporary values
 should only be strings (get from Http request).

Correct. If we have to deal with strings in temporary models in order
to have such functionalities, it looks like a step back to old struts
formbeans to me.

We should be able to decide which automatic validations (and model
updates) are triggered by which actions (buttons, forms validated by
javascript, general form validation, ...)


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Sam Gendler
OK, so I've been all over the wicket sourceforge site, and I must be
missing something.  Where is the documentation?  There are some fairly
basic examples that don't go into much detail, the new user guide in
the wiki which is incomplete whenever it gets interesting.  The wicket
stuff section lists a hibernate tool, but doesn't provide a link to
anything. I see many references to how great wicket is with hibernate,
but I've never seen a doc that describes how someone would actually
use wicket with hibernate.  Perhaps most importantly, I've never found
a simple description of the components that are available (or how to
implement new ones), let alone how to use them.  Do I really have to
extract all of this from the javadocs and source code?

I'm trying to evaluate frameworks for a large development project, and
from all the hype, wicket seems to be a nice solution, but it is
basically not evaluatable, since, apparently, the only way to learn
anything about it is to get deep enough into a development project to
overcome the learning curve and total lack of documentation.

Am I missing something here?


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Keeping images outside of WEB-INF

2005-11-16 Thread James Yong
Johan Compagner jcompagner at gmail.com writes:

 
 
 jip that is what i meant
 But ofcourse eelco's method is also fine to use.
 
 On 11/15/05, Scott Sauyet lists at sauyet.com wrote:
   = James Yong i_yongbl at yahoo.com.sg
   = Johan Compagner jcompagner at gmail.com  If you can do that then 
i would just have the img tag directly in  the html with a wicket id and 
then you use a label componet which
   only has a attribute modifier to set the src attribute.  That looks to 
me as the cleanest method.  [ ... ]  In the end, I used the label component 
to generate the whole img tag.I don't mean to speak for Johan, but I think the 
suggestion wassomething like this: listItem.add(new Label(file_img).add
(new AttributeModifier(src, + childfolder + / + 
 file.getName())); along with img wicket:id=file_img 
src=placeholder.png alt=/That sounds to me the most Wicketish way of doing 
this.   -- Scott


Hi Johan and Scott,

Sorry for my misinterpretion. Thanks for clearing things up. I didn't expect 
there are so many approaches. keke.

Regards,
james



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Igor Vaynberg
yes it should all still be in the cvs in the same project. there are a
few more packages in that project, wicket.contrib.proxy and
wicket.contrib.injection. Johan said he was having weird issues with
cvs also, not sure what i can do about that.

Im not sure about the injector being created as a spring bean, because
then its hard to get to. With the springwebpage and
springwebapplication injection from spring is trivial and completely
transparent.

-Igor
On 11/16/05, Christian Essl [EMAIL PROTECTED] wrote:
Sorry for my late replay and thanks for fixing all you did. UnfortunatelyI can still not find the code which does not forward finalize and has theIFieldValueFactory. Is it still in wicket-contrib-spring - is it tagged?
 Do you mind if i put your stuff into the main project? Not sure how to manage this stuff best...plugins will require different dependencies so that will pollute the main projects, but the plugins are too small to warrant
 their own projects...Of course you can use my stuff. Currently I'm not sure wheter we needcommons attributes. For pre JDK1.5 I'd say a field naming convention woulddo it as well (ie _springBean_productDAO)? That's also much easier to use
than commons-attributes.BTW: Maybe the SpringInjector could itself be setup in a spring-context soyou can plugin different IFieldValueFactories and set them up.ChristianOn Fri, 11 Nov 2005 14:56:45 -0800, Igor Vaynberg
[EMAIL PROTECTED] wrote: decisions decisions -Igor On 11/11/05, Christian Essl 
[EMAIL PROTECTED] wrote: Igor made it quite easy to add your own way to inject things (not just SpringBeans). You just implement your own IObjectLocatorFactory and extend
 the SpringInjector to use this one. Enclosed is some code which uses jakarta commons-attributes to do the same thing as JDK1.5 annotations does with javadoc (the code is not tested
 but it is fairly simple so it should work). BTW: Maybe the ProxyInjector could take an array of IObjectLocatorFactory and takes the first one which does not return null. This way you could
 combine different IObjectLocatorFatories in one place? Christian On Fri, 11 Nov 2005 14:34:28 -0600, Ryan Sonnek 
[EMAIL PROTECTED] wrote:  I would be very interested in a 1.4 port of this. Do you think it  could use the same annotation based approach, but using Qdox to
  process instead of the built in 1.5 annotation functionality?   On 11/11/05, Christian Essl [EMAIL PROTECTED] wrote:
  The code realy looks good.   Concerning the Proxy. For the cglib proxy you should definately not  forward the call to finalize(), because when the proxy gets GC it
 will  call finalize() on the target and that is not what you want. I think  same  reasons apply for the other Object methods except equals, hasCode and
  toStrign. JDK proxies do not forward them as well.   Serializing: CGLIB proxies. I think the problem if you just plainly  serialize them withotu writeReplace/readResolve is that if the proxy
  gets  desiarialized in another VM than the dynamically create class of CGLIB  could not be yet there. So this could make problems in clusters etc.
   Christian   On Fri, 11 Nov 2005 00:50:13 -0800, Igor Vaynberg  [EMAIL PROTECTED]
 wrote:more refactoring/tests and some new things: SpringWebApplicationFactory - which will pull the webapplication
  subclass   out of spring application context SpringInjector/SpringWebApplica tion - make it very simple to inject
   objects   using @SpringBean annotation with lazy-init proxies SpringWebPage - autoinitailizes its subclasses using the
  SpringInjector I also deprecated all the old stuff and moved it into   wicket.contrib.spring.old package. The new stuff is the
   official/supported/standard/whateveryouwanttocallit way to do spring   integration. currently we only provide an easy way to inject objects using jdk5
   annotations. it is possible to create a jdk1.4 object locator  factories,   but   there are many options as to how to store metadata/do the lookup.
 if   someone   is interested in this please let me know and we can discuss some ways  of   doing this.
 As always, any feedback is greatly appreciated. -Igor  
   On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote: heh, looks like we pretty much did the same thing. my proxies
 arent  as   advanced as yours, dont know if that a plus or a minus at this  point. I   liked the lazyinitproxy interface so i just added that to my code.
 im attaching the code to make it easier to find. -Igor On 11/9/05, Christian Essl 
[EMAIL PROTECTED] wrote:   Unfortunately the public cvs is late so I can't see your changes  yet.
Anyway before I've read this mail I started on reworking the  proxingcode(attached). SerializableLazyProxyCreator is the only thing with
   contentthe others are interfaces and one (basic) test.   There are quite some changes:
- uses as now as said yesterday an ObjectResolver (I've to check  withyourrefactoring)- fixed differend bugs 

Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Alexandru Popescu

#: Sam Gendler changed the world a bit at a time by saying on  11/16/2005 5:31 
PM :#

OK, so I've been all over the wicket sourceforge site, and I must be
missing something.  Where is the documentation?  There are some fairly
basic examples that don't go into much detail, the new user guide in
the wiki which is incomplete whenever it gets interesting.  The wicket
stuff section lists a hibernate tool, but doesn't provide a link to
anything. I see many references to how great wicket is with hibernate,
but I've never seen a doc that describes how someone would actually
use wicket with hibernate.  Perhaps most importantly, I've never found
a simple description of the components that are available (or how to
implement new ones), let alone how to use them.  Do I really have to
extract all of this from the javadocs and source code?

I'm trying to evaluate frameworks for a large development project, and
from all the hype, wicket seems to be a nice solution, but it is
basically not evaluatable, since, apparently, the only way to learn
anything about it is to get deep enough into a development project to
overcome the learning curve and total lack of documentation.

Am I missing something here?



With a few corrections (you can see the components at work in wicket-examples, there are a few 
interesting entries on the wiki and also on the mailing list), I am facing exactly the same problem. 
And even worse, I don't think I have the time to start a prototype to see how the things are coming 
along.


./alex
--
.w( the_mindstorm )p.



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Igor Vaynberg
hi Sam,

Re components:
check out the component reference in the wicket-examples project. it is
farily complete and shows components in isolation so you can play
around with them.

Re hibernate integration:
check out the wicket-phonebook project from wicket-stuff cvs. it is a
simple example of a wicket/spring/hibernate project. wicket-phonebook
has great javadoc that will explain what everything is.

Re creating components:
this is the strength of wicket. you just extend one of the base classes
such as Component or WebMarkupContainer or extend any other component
and away you go. checkout the code that drives components in the
component reference its so simple it speaks for itself.

Re documentation:
yes this is something we do not have a lot of, we are working on it.
what we do have right now is great javadoc. i got started just by
looking at the examples and the code that drives them. wicket felt so
natural i just picked it up ( but i did come from a strong tapestry
background ). imho the best way to evaluate a framwork is to try and
build a small project with it so you get the feel for it.

this list is a great place to get support.
if you have any questions feel free to email them to the list.
btw, wicket-examples and wicket-phonebook both have jetty-launcher in a
class called Start, so if you use eclise just right click and do debug
as java app, that will start up jetty and you are ready to go as
opposed to package/redeploy cycle.

-Igor

On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:
OK, so I've been all over the wicket sourceforge site, and I must bemissing something.Where is the documentation?There are some fairlybasic examples that don't go into much detail, the new user guide inthe wiki which is incomplete whenever it gets interesting.The wicket
stuff section lists a hibernate tool, but doesn't provide a link toanything. I see many references to how great wicket is with hibernate,but I've never seen a doc that describes how someone would actuallyuse wicket with hibernate.Perhaps most importantly, I've never found
a simple description of the components that are available (or how toimplement new ones), let alone how to use them.Do I really have toextract all of this from the javadocs and source code?I'm trying to evaluate frameworks for a large development project, and
from all the hype, wicket seems to be a nice solution, but it isbasically not evaluatable, since, apparently, the only way to learnanything about it is to get deep enough into a development project toovercome the learning curve and total lack of documentation.
Am I missing something here?---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_idv28alloc_id845opclick___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



[Wicket-user] Re: Preserve form state

2005-11-16 Thread Nathan Hamblen
One option is to override Form.process() and compare 
findSubmittingButton() against your various buttons, then bypass the 
super method if you don't want it to update your model (just return 
true). Until wicket has some better way to bypass the model update, this 
works just fine.


Nathan

Matej Knopp wrote:

Hi.

I know this has been discussed already, but still I'm opening it once 
more. I think there should be a way to preserve form state without 
validation and model updating.


The use case is following.
I have a (complex) form with some fields, that can not be entered 
directly, i.e. they have to be selected on other page. So I need to move 
between pages, but I don't want to lose any information entered on the 
previous page. If I use Button, the form gets processed, validated, etc 
and the action won't execute unless all entered data is valid. If I turn 
defaultProcessing off, the action executes, but the data (not written to 
model yet) is lost.


What I'm using now is little hacky, but it works. I have my own class 
derived from Form, my own SubmitButton, ImmediateButton and 
FeedbackPanel. ImmediateButton acts like classic Button with 
defaultFormProcessing turned off, but unlike it, ImmediateButton stores 
the state in each component (in the string reserved for invalid data). 
So there's my own Feedback panel (Although filter would be probably 
enough) that detects that ImmediateButton was clicked and hides 
validation messages (there's a lot of them, because ImmediateButton 
marks every component as invalid).


This approach works pretty well, but doesn't feel quite right. I think 
there definitely should be a way to preserve form state (without 
validation and updating model) directly supported by wicket.
Not to mention that (if I recall correctly) the string field in 
FormComponent used for storing invalid data is transient.


Btw. I've managed to persuade people from my company to use wicket for 
one of our projects. Since I do most of the current development, it's 
not a big deal, because I've personally been using wicket for some time 
now. But I can say they are really impressed with the productivity and 
simplicity of certain actions (like moving between complex pages forth 
and back ;) - that are sometimes quite difficult and cumbersome in struts.
Not to mention excellent DataView and DatePicker components, markup 
inheritance and compoents in general.


Kudos wicket team, you're doing excelent work!

Sorry for really long mail,

-Matej


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download

it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php




---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Preserve form state

2005-11-16 Thread Laurent PETIT
Hello,

 One option is to override Form.process() and compare
 findSubmittingButton() against your various buttons, then bypass the
 super method if you don't want it to update your model (just return
 true). Until wicket has some better way to bypass the model update, this
 works just fine.

I can't check it from work today, but I think this solution doesn't
work : won't the components not updated be lost when the screen is
rendered ?


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Laurent PETIT
Hello Eelco,

 First of all, let's agree that your use case is not a typical one. We
 shouldn't make core adjustements that would make things easier for 5%
 but harder for 95% of the cases.

Not sure if you're talking about Matej's or mines (a drawback of the
GMail's view ...) ;-)

I still do think that the use case I exposed (with monkeys) is great
to show what could be the limits of the frameworks I test. Wicket is
great at Component composition ? Great ! I have a good old Form
composition problem for it ;-)
And it's actually a problem I had with an old project (but of course
not talking about monkeys and bananas, not that fun ;-), and it was a
pain in the ass to do it cleanly with struts.

I don't understand why you would make things harder for 95% of the
other cases ? I think that simplicity can be combined with proper
default behaviour ?

 Anyway, I think what you want can be done rather elegant now. Like you
 outlined, you should use Button.defaultFormProcessing = false to begin
 with. In your onSubmit methods of these buttons, you can manually
 trigger validation and/ or model updates (e.g. call
 Form.updateFormComponentModels).

Except if I didn't well understand the behaviour of the
defaultFormProcessing flag, I think this would not help in my use case
(if I add a New Banana, I definitely don't want to update the other
models at the same time, while still re-rendering the page with the
current user inputs).

By the time, I'll checkout the HEAD version, since Johan told about an
immediant button. I want to check what this is.


 The next trick is to use models specifically for your view layer, and
 once you're done with your wizard style functionality, combine these
 models into something you really need. You won't loose any input this
 way.

Yes, but you will still lack the automatic field type validation and
conversion, won't you ? Because if I use models, and if I allow users
to temporarily enter bad inputs (such as foo in a numeric
textfield), my (intermediate) model will have to handle only strings.
For all form components then ... (except maybe those from combobox,
radio buttons  checkboxes).
And so, when my complete form is finally submitted, I will have to do
all the validations manually (required, type conversions, ranges,
...). Not so good, is it ?


 Finally, regarding complex validations... As soon as you need to do
 validations that are dependent on other model properties etc, it is
 probably wise to leave the default validation path in Wicket.
 IValidators are very useful for simple validations that are 1-1
 related to components,

Sure, a solution that would imply to abandon even the power of the
wicket-provided IValidators implementations for the (intermediate
model) should be avoided.

 but if you need to do more complex things, they
 are probably more in your way than any help. If you want to do complex
 validations easy, you can do them in onSubmit handler code.

I guess the IValidator should mainly be used for 1-1 validations,
superficial validations such as required, ranges, types, 

 Anyway, I think that when looking whether we can make things easier
 for more complex use cases, we shouldn't be thinking too much about
 how we can ease things automagically, but instead focus on flexibility

i agree, things should remain straightforward for common use cases.
Flexibility should allow to handle more complex use cases by replacing
default behaviour with some other one.

 and - maybe more important as not everyone seems to understand to
 current form processing - clarity of form processing and it's possible
 interception points.

Yes, I'll dive into the code ASAP, so that (I hope so) my next posts
will be more constructive, and not only feature requests ;-)

cu,

--
laurent


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] CompoundPropertyModel without OGNL in 1.1

2005-11-16 Thread Matej Knopp

Hi.

My current benchmark shows that CompoundPropertyModel is a serious 
performance issue when having big dataview. Is there any chance that the 
new CompoundPropertyModel from 1.2 will be backported to 1.1?


-Matej


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Matej Knopp
I think this is not about updating model nor validating. It's about 
preserving http parameters, that are already sent.


What I want to achieve is that you have kind of immediate button, that 
preserves the form attributes (exactly as they were filled by the user), 
but doesn't update model, nor validates components.


I think it should be handled on component level. Right now, every 
FormComponent has an invalidInput string. I think of something similiar, 
but more general.


If an immediate button (with some attribute like preserveFormState set 
to true) was clicked (or drop down combo changed, etc...), these fields 
well be updated from request attributes. If another request came, 
without attributes, values from these fields would be displayed.

On regular form submit, model would be updated and these fields cleaned.

Right now, it's not quite possible to do it this way, because 
FormComponent.getValue() is final (Is this necessary?).


-Matej



Eelco Hillenius wrote:

On 11/16/05, Laurent PETIT [EMAIL PROTECTED] wrote:


Hello Eelco,



First of all, let's agree that your use case is not a typical one. We
shouldn't make core adjustements that would make things easier for 5%
but harder for 95% of the cases.


Not sure if you're talking about Matej's or mines (a drawback of the
GMail's view ...) ;-)



Matje's.



I don't understand why you would make things harder for 95% of the
other cases ? I think that simplicity can be combined with proper
default behaviour ?



It wouldn't nescesarily be the case. I just wanted to issue a warning
that we shouldn't make things more complex in order to make that 5% a
little bit easier.




Anyway, I think what you want can be done rather elegant now. Like you
outlined, you should use Button.defaultFormProcessing = false to begin
with. In your onSubmit methods of these buttons, you can manually
trigger validation and/ or model updates (e.g. call
Form.updateFormComponentModels).


Except if I didn't well understand the behaviour of the
defaultFormProcessing flag, I think this would not help in my use case
(if I add a New Banana, I definitely don't want to update the other
models at the same time, while still re-rendering the page with the
current user inputs).

By the time, I'll checkout the HEAD version, since Johan told about an
immediant button. I want to check what this is.




Johan referred to 'immediate' which was the name that I gave to the
property that is now defaultFormProcessing. I used immediate because
JSF (and Tapestry?) use that name. But other devs felt
defaultFormProcessing was a better name.

The point of that property is that once you set it off, you can do
form processing in any way you want - or at least that is the idea. So
you can do an update of all models, but you can also do a partial
update if you want. Same goes for validation.




The next trick is to use models specifically for your view layer, and
once you're done with your wizard style functionality, combine these
models into something you really need. You won't loose any input this
way.


Yes, but you will still lack the automatic field type validation and
conversion, won't you ? Because if I use models, and if I allow users
to temporarily enter bad inputs (such as foo in a numeric
textfield), my (intermediate) model will have to handle only strings.
For all form components then ... (except maybe those from combobox,
radio buttons  checkboxes).
And so, when my complete form is finally submitted, I will have to do
all the validations manually (required, type conversions, ranges,
...). Not so good, is it ?



If you are ready for validation, you can call Form.validate manually
or even for each form component you want to validate
FormComponent.validate. You can use FormComponent.isValid and/ or
Form.hasError to see whether that validation got you any errors.



I guess the IValidator should mainly be used for 1-1 validations,
superficial validations such as required, ranges, types, 



Months ago, I worked on a form level validation interface for a couple
of days. But I abandonned it as it made things more complex than it
would actually helped people, and I focussed on openening up form
processing instead.



Yes, I'll dive into the code ASAP, so that (I hope so) my next posts
will be more constructive, and not only feature requests ;-)




That would be good. Patches or concrete improvement suggestions are
always welcome, at least for discussion :)

Eelco


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---

[Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Dzenan Ridjanovic

Hi all,

I have been teaching a course on the subject of web applications 
development using Wicket and dmLite frameworks


http://drdb.fsa.ulaval.ca/urls/

The course is pretty practical. I have developed 10 spirals (actually 9; 
I will finish the last spiral the next week) that cover the basics of 
Wicket from some trivial pages to relatively more complex pages composed 
of reusable panel components. The focus is on reusability even within 
the same application. For each spiral there is a short PDF explanation 
document and a source code zip file. You can also see the spiral 
application in action at my server.


I used to teach the same course using Struts. With Wicket it is much 
easier for me, as a professor, to explain essential concepts, and it is 
much easier for students to pickup those concepts. The pedagogical 
beauty of Wicket is that it is all Java, all POJOs, and a professor can 
easily use the most important OO concepts such as inheritance and 
decomposition.


For a professor, it is a pain to work with databases in a non-database 
course (installation, schema generation, test data loading, before it is 
even possible to look at a student web application). That is the reason 
that I have developed a small pedagogical framework for both domain 
model and model persistence.


Home:
http://drdb.fsa.ulaval.ca/dmLite/
Javadoc:
http://drdb.fsa.ulaval.ca/dmLite/doc/javadoc/index.html
Users Guide:
http://drdb.fsa.ulaval.ca/dmLite/doc/usersGuide.pdf

In this way I can focus on Wicket essentials and students can download a 
spiral, unzip it, import into Eclipse and execute it within Eclipse 
using the Start class (Jetty). No installation, no database schema 
creation, no test data loading. In the same way I can easily see and 
grade a student web application. Perhaps, at least some Wicket examples 
may be redeveloped using dmLite.


I hope that the course material on my web site may help other people 
start using Wicket faster. I do not pretend that Wicket is completely 
covered in my course material. I strongly believe in the spiral approach 
to learning, teaching, developing and managing software and software 
development process. If people think that this is helpful, I may decide 
to continue developing more advanced spirals. The important point for me 
and my students is to become comfortable with Wicket before dealing with 
important issues of professional web applications such as the use of 
real databases and the use of other professional frameworks such as 
Spring and Hibernate.


Cheers,

Dzenan Ridjanovic


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] CompoundPropertyModel without OGNL in 1.1

2005-11-16 Thread Johan Compagner
are you really seeing big performance improvements when comparing the same app with 1.1 and 1.2?
Thats nice to hear :)

Backporting to 1.1.1 ... we could do it but it is a big change.. that
could affect running installs (you can't just swap 1.1 to 1.1.1 then if
you depend a bit more on ognl)

This should be an issue where we should count votes!

johan
On 11/16/05, Matej Knopp [EMAIL PROTECTED] wrote:
Hi.My current benchmark shows that CompoundPropertyModel is a seriousperformance issue when having big dataview. Is there any chance that thenew CompoundPropertyModel from 1.2 will be backported to 
1.1?-Matej---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Johan Compagner
i still think in youre case you have to use a inbetween model
There is no other way. Even if we stored it inside the form itself then that is the inbetween model
And i don't know if i want to support that.

On 11/16/05, Matej Knopp [EMAIL PROTECTED] wrote:
Hi.The problem is, that I don't want to validate the form, unless userclicks 'OK'. The model is updated after validation only. But the'choose' button should NOT validate the form.I don't think it's a good thing storing the temporary values in model
(at least in my case), because model is typed. The temporary valuesshould only be strings (get from Http request).-MatejJohan Compagner wrote: Just one extra remark. Why can't use just use a model for this?
 And that model is an in between model for you real model object? Ok you have to do youre validation a bit different(it can't be between Form-Model but it has to be between TmpModel-RealModel
 This looks to me like a much better way to have multiply page forms... johan On 11/13/05, *Matej Knopp* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote: Hi. I know this has been discussed already, but still I'm opening it once more. I think there should be a way to preserve form state without
 validation and model updating. The use case is following. I have a (complex) form with some fields, that can not be entered directly, i.e. they have to be selected on other page. So I need to move
 between pages, but I don't want to lose any information entered on the previous page. If I use Button, the form gets processed, validated, etc and the action won't execute unless all entered data is valid. If I turn
 defaultProcessing off, the action executes, but the data (not written to model yet) is lost. What I'm using now is little hacky, but it works. I have my own class derived from Form, my own SubmitButton, ImmediateButton and
 FeedbackPanel. ImmediateButton acts like classic Button with defaultFormProcessing turned off, but unlike it, ImmediateButton stores the state in each component (in the string reserved for invalid data).
 So there's my own Feedback panel (Although filter would be probably enough) that detects that ImmediateButton was clicked and hides validation messages (there's a lot of them, because ImmediateButton
 marks every component as invalid). This approach works pretty well, but doesn't feel quite right. I think there definitely should be a way to preserve form state (without validation and updating model) directly supported by wicket.
 Not to mention that (if I recall correctly) the string field in FormComponent used for storing invalid data is transient. Btw. I've managed to persuade people from my company to use wicket for
 one of our projects. Since I do most of the current development, it's not a big deal, because I've personally been using wicket for some time now. But I can say they are really impressed with the productivity and
 simplicity of certain actions (like moving between complex pages forth and back ;) - that are sometimes quite difficult and cumbersome in struts. Not to mention excellent DataView and DatePicker components, markup
 inheritance and compoents in general. Kudos wicket team, you're doing excelent work! Sorry for really long mail, -Matej ---
 SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ 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 the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Preserve form state

2005-11-16 Thread Johan Compagner
first of all we are talking about 2 problems here!

Matej's and Laurent problems are completely different.

I still believe that Matej should use a temp model (in between model)
And the validations shouldn't be on the component level but between the between model and the real (strong typed) model.
I really believe this is the best way. Any thing i can currently think
of will result in something like that anyway.. The values Need to be
stored somewhere!!
So having something like a model:

Model(Model realModel)
{
 Hashmap values;

 getObject(Component comp) return values.get(comp);
 setObject(Component comp, Object value) values.put(comp, value);

 public void saveToReal()
 {

 Object realObject = realModel.getObject(null);

 while( Iterate over the values maps keys)
 Component key;
 String stringValue;

Object value = converter.convertToType(stringValue);
 validator.validate(key,value)

String id = key.getId() // or get some kind of binding see
BoundedCompoundPropertyModel

Objects.setValue(id,realObject,value,null);
 }
}

this is just a rought idea how a in between model should or could work.


Laurents problem is completely different, He doesn't want to hold the data (and do nothing with it) over multiply pages.
He just wants portions to be validated and portions to be kept for one request only but not validated.
I think this is now already possible with the Button.defaultFormProcessing boolean
Then the buttons must have a list of components which he must be validated before he does process everything.
then he can call FormComponent.validate() and if that goes ok FormComponent.updateModel() (and so on on the complete List)

I think we are then where we are. You just need a special button that has a list of FormComponents to be validated...

On 11/16/05, Johan Compagner [EMAIL PROTECTED] wrote:
i still think in youre case you have to use a inbetween model
There is no other way. Even if we stored it inside the form itself then that is the inbetween model
And i don't know if i want to support that.

On 11/16/05, Matej Knopp [EMAIL PROTECTED]
 wrote:
Hi.The problem is, that I don't want to validate the form, unless userclicks 'OK'. The model is updated after validation only. But the'choose' button should NOT validate the form.I don't think it's a good thing storing the temporary values in model
(at least in my case), because model is typed. The temporary valuesshould only be strings (get from Http request).-MatejJohan Compagner wrote: Just one extra remark. Why can't use just use a model for this?
 And that model is an in between model for you real model object? Ok you have to do youre validation a bit different(it can't be between Form-Model but it has to be between TmpModel-RealModel
 This looks to me like a much better way to have multiply page forms... johan On 11/13/05, *Matej Knopp* 
[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote: Hi. I know this has been discussed already, but still I'm opening it once
 more. I think there should be a way to preserve form state without
 validation and model updating. The use case is following. I have a (complex) form with some fields, that can not be entered directly, i.e. they have to be selected on other page. So I need to move
 between pages, but I don't want to lose any information entered on the previous page. If I use Button, the form gets processed, validated, etc and the action won't execute unless all entered data is valid. If I turn
 defaultProcessing off, the action executes, but the data (not written to model yet) is lost. What I'm using now is little hacky, but it works. I have my own class derived from Form, my own SubmitButton, ImmediateButton and
 FeedbackPanel. ImmediateButton acts like classic Button with defaultFormProcessing turned off, but unlike it, ImmediateButton stores the state in each component (in the string reserved for invalid data).
 So there's my own Feedback panel (Although filter would be probably enough) that detects that ImmediateButton was clicked and hides validation messages (there's a lot of them, because ImmediateButton
 marks every component as invalid). This approach works pretty well, but doesn't feel quite right. I think there definitely should be a way to preserve form state (without validation and updating model) directly supported by wicket.
 Not to mention that (if I recall correctly) the string field in FormComponent used for storing invalid data is transient. Btw. I've managed to persuade people from my company to use wicket for
 one of our projects. Since I do most of the current development, it's not a big deal, because I've personally been using wicket for some time now. But I can say they are really impressed with the productivity and
 simplicity of certain actions (like moving between complex pages forth and back ;) - that are sometimes quite difficult and cumbersome in struts. Not to mention excellent DataView and DatePicker components, markup
 inheritance and compoents in general. Kudos wicket team, you're 

Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Johan Compagner
Thx!
i have looked that some pdf's and they look really nice!
Good to know that wicket is used for teaching stuff! 

johan
On 11/16/05, Dzenan Ridjanovic [EMAIL PROTECTED] wrote:
Hi all,I have been teaching a course on the subject of web applicationsdevelopment using Wicket and dmLite frameworkshttp://drdb.fsa.ulaval.ca/urls/
The course is pretty practical. I have developed 10 spirals (actually 9;I will finish the last spiral the next week) that cover the basics ofWicket from some trivial pages to relatively more complex pages composed
of reusable panel components. The focus is on reusability even withinthe same application. For each spiral there is a short PDF explanationdocument and a source code zip file. You can also see the spiralapplication in action at my server.
I used to teach the same course using Struts. With Wicket it is mucheasier for me, as a professor, to explain essential concepts, and it ismuch easier for students to pickup those concepts. The pedagogical
beauty of Wicket is that it is all Java, all POJOs, and a professor caneasily use the most important OO concepts such as inheritance anddecomposition.For a professor, it is a pain to work with databases in a non-database
course (installation, schema generation, test data loading, before it iseven possible to look at a student web application). That is the reasonthat I have developed a small pedagogical framework for both domain
model and model persistence.Home:http://drdb.fsa.ulaval.ca/dmLite/Javadoc:http://drdb.fsa.ulaval.ca/dmLite/doc/javadoc/index.html
Users Guide:http://drdb.fsa.ulaval.ca/dmLite/doc/usersGuide.pdfIn this way I can focus on Wicket essentials and students can download a
spiral, unzip it, import into Eclipse and execute it within Eclipseusing the Start class (Jetty). No installation, no database schemacreation, no test data loading. In the same way I can easily see andgrade a student web application. Perhaps, at least some Wicket examples
may be redeveloped using dmLite.I hope that the course material on my web site may help other peoplestart using Wicket faster. I do not pretend that Wicket is completelycovered in my course material. I strongly believe in the spiral approach
to learning, teaching, developing and managing software and softwaredevelopment process. If people think that this is helpful, I may decideto continue developing more advanced spirals. The important point for me
and my students is to become comfortable with Wicket before dealing withimportant issues of professional web applications such as the use ofreal databases and the use of other professional frameworks such as
Spring and Hibernate.Cheers,Dzenan Ridjanovic---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] CompoundPropertyModel without OGNL in 1.1

2005-11-16 Thread Martijn Dashorst
I'd rather finalize 1.2 sooner, cutting off new features, than
backport the OGNL replacement into 1.1. It is a breaking change, and
by its nature, a 1.1.x release should not break stuff.

Martijn


On 11/16/05, Johan Compagner [EMAIL PROTECTED] wrote:
 are you really seeing big performance improvements when comparing the same
 app with 1.1 and 1.2?
  Thats nice to hear :)

  Backporting to 1.1.1 ... we could do it but it is a big change.. that could
 affect running installs (you can't just swap 1.1 to 1.1.1 then if you depend
 a bit more on ognl)

  This should be an issue where we should count votes!

  johan



 On 11/16/05, Matej Knopp [EMAIL PROTECTED] wrote:
  Hi.
 
  My current benchmark shows that CompoundPropertyModel is a serious
  performance issue when having big dataview. Is there any chance that the
  new CompoundPropertyModel from 1.2 will be backported to 1.1?
 
  -Matej
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
  ___
  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 the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Christian Essl
On Wed, 16 Nov 2005 08:32:06 -0800, Igor Vaynberg 
[EMAIL PROTECTED] wrote:


yes it should all still be in the cvs in the same project. there are a 
few

more packages in that project, wicket.contrib.proxy and
wicket.contrib.injection. Johan said he was having weird issues with cvs
also, not sure what i can do about that.
I think the web-access is also not uptodate 
http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-spring/




Im not sure about the injector being created as a spring bean, because 
then

its hard to get to. With the springwebpage and springwebapplication
injection from spring is trivial and completely transparent.

I was just thinking of an easy way to configure the static instance gotten 
from SpringInjector.getInstance(). So I thought that 
SpringInjector.getInstance() would call 
ApplicationContext.getBean(SpringInjector,SpringInjector.class) and if 
there is none return the singelton instance.


An alternative could be that there is a generic injector which loads a 
list of IFieldValueFactories from the WebApplication.


Christian


-Igor


On 11/16/05, Christian Essl [EMAIL PROTECTED] wrote:


Sorry for my late replay and thanks for fixing all you did. 
Unfortunately
I can still not find the code which does not forward finalize and has 
the

IFieldValueFactory. Is it still in wicket-contrib-spring - is it tagged?

 Do you mind if i put your stuff into the main project? Not sure how to
 manage this stuff best...plugins will require different dependencies 
so

 that
 will pollute the main projects, but the plugins are too small to 
warrant

 their own projects...

Of course you can use my stuff. Currently I'm not sure wheter we need
commons attributes. For pre JDK1.5 I'd say a field naming convention 
would
do it as well (ie _springBean_productDAO)? That's also much easier to 
use

than commons-attributes.

BTW: Maybe the SpringInjector could itself be setup in a spring-context 
so

you can plugin different IFieldValueFactories and set them up.

Christian

On Fri, 11 Nov 2005 14:56:45 -0800, Igor Vaynberg
[EMAIL PROTECTED] wrote:



 decisions decisions

 -Igor


 On 11/11/05, Christian Essl [EMAIL PROTECTED] wrote:

 Igor made it quite easy to add your own way to inject things (not 
just

 SpringBeans). You just implement your own IObjectLocatorFactory and
 extend
 the SpringInjector to use this one.

 Enclosed is some code which uses jakarta commons-attributes to do the
 same
 thing as JDK1.5 annotations does with javadoc (the code is not tested
 but
 it is fairly simple so it should work).

 BTW: Maybe the ProxyInjector could take an array of
 IObjectLocatorFactory
 and takes the first one which does not return null. This way you 
could

 combine different IObjectLocatorFatories in one place?

 Christian



 On Fri, 11 Nov 2005 14:34:28 -0600, Ryan Sonnek 
[EMAIL PROTECTED]

 wrote:

  I would be very interested in a 1.4 port of this. Do you think it
  could use the same annotation based approach, but using Qdox to
  process instead of the built in 1.5 annotation functionality?
 
  On 11/11/05, Christian Essl [EMAIL PROTECTED] wrote:
  The code realy looks good.
 
  Concerning the Proxy. For the cglib proxy you should definately 
not

  forward the call to finalize(), because when the proxy gets GC it
 will
  call finalize() on the target and that is not what you want. I 
think

  same
  reasons apply for the other Object methods except equals, hasCode
and
  toStrign. JDK proxies do not forward them as well.
 
  Serializing: CGLIB proxies. I think the problem if you just 
plainly
  serialize them withotu writeReplace/readResolve is that if the 
proxy

  gets
  desiarialized in another VM than the dynamically create class of
 CGLIB
  could not be yet there. So this could make problems in clusters 
etc.

 
  Christian
 
  On Fri, 11 Nov 2005 00:50:13 -0800, Igor Vaynberg
  [EMAIL PROTECTED] wrote:
 
   more refactoring/tests and some new things:
  
   SpringWebApplicationFactory - which will pull the webapplication
  subclass
   out of spring application context
  
   SpringInjector/SpringWebApplica tion - make it very simple to
 inject
   objects
   using @SpringBean annotation with lazy-init proxies
  
   SpringWebPage - autoinitailizes its subclasses using the
  SpringInjector
  
   I also deprecated all the old stuff and moved it into
   wicket.contrib.spring.old package. The new stuff is the
   official/supported/standard/whateveryouwanttocallit way to do
 spring
   integration.
  
   currently we only provide an easy way to inject objects using 
jdk5

   annotations. it is possible to create a jdk1.4 object locator
  factories,
   but
   there are many options as to how to store metadata/do the 
lookup.

 if
   someone
   is interested in this please let me know and we can discuss some
 ways
  of
   doing this.
  
   As always, any feedback is greatly appreciated.
  
   -Igor
  
  
  
   On 11/9/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
   heh, looks like we 

Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Sam Gendler

  Re hibernate integration:
  check out the wicket-phonebook project from wicket-stuff cvs. it is a
 simple example of a wicket/spring/hibernate project. wicket-phonebook has
 great javadoc that will explain what everything is.


So I checked out wicket-stuff, and all it contains are some xdocs
directories.  Not a single line of source code to be seen.  What am I
missing here?

--sam


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Sam Gendler
Wicket-examples, wicket-phonebook don't seem to exist, and
wicket-stuff is apparently nothing but the source code to the
sourceforge web page about wicket-stuff.  What am I missing here?

--sam


On 11/16/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 hi Sam,

  Re components:
  check out the component reference in the wicket-examples project. it is
 farily complete and shows components in isolation so you can play around
 with them.

  Re hibernate integration:
  check out the wicket-phonebook project from wicket-stuff cvs. it is a
 simple example of a wicket/spring/hibernate project. wicket-phonebook has
 great javadoc that will explain what everything is.

  Re creating components:
  this is the strength of wicket. you just extend one of the base classes
 such as Component or WebMarkupContainer or extend any other component and
 away you go. checkout the code that drives components in the component
 reference its so simple it speaks for itself.

  Re documentation:
  yes this is something we do not have a lot of, we are working on it. what
 we do have right now is great javadoc. i got started just by looking at the
 examples and the code that drives them. wicket felt so natural i just picked
 it up ( but i did come from a strong tapestry background ). imho the best
 way to evaluate a framwork is to try and build a small project with it so
 you get the feel for it.

  this list is a great place to get support.
  if you have any questions feel free to email them to the list.

  btw, wicket-examples and wicket-phonebook both have jetty-launcher in a
 class called Start, so if you use eclise just right click and do debug as
 java app, that will start up jetty and you are ready to go as opposed to
 package/redeploy cycle.

  -Igor



 On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:
 
  OK, so I've been all over the wicket sourceforge site, and I must be
  missing something.  Where is the documentation?  There are some fairly
  basic examples that don't go into much detail, the new user guide in
  the wiki which is incomplete whenever it gets interesting.  The wicket
  stuff section lists a hibernate tool, but doesn't provide a link to
  anything. I see many references to how great wicket is with hibernate,
  but I've never seen a doc that describes how someone would actually
  use wicket with hibernate.  Perhaps most importantly, I've never found
  a simple description of the components that are available (or how to
  implement new ones), let alone how to use them.  Do I really have to
  extract all of this from the javadocs and source code?
 
  I'm trying to evaluate frameworks for a large development project, and
  from all the hype, wicket seems to be a nice solution, but it is
  basically not evaluatable, since, apparently, the only way to learn
  anything about it is to get deep enough into a development project to
  overcome the learning curve and total lack of documentation.
 
  Am I missing something here?
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Sam Gendler
Yeah, the answer lies in the fact that the shell-based cvs commands in
the wicket-stuff documentation are utterly broken.  Never mind that
there is no visible line break between the two separate cvs commands,
but it also says to check out the wicket-stuff module, which is merely
the source for the wicket-stuff sourceforge site.  In reality, since
there is no list of available modules provided anywhere, and the link
to the viewcvs displays the same wicket-stuff module that the cvs
command downloads, you have to checkout '.' rather than wicket-stuff,
although this is entirely non-obvious without reading the maven
commands listed on the same page.  Note that the maven commands
appear, from my limited understanding of maven, to be correct.  It
does check out '.', which pulls the entire wicket-stuff project,
including all the modules you listed.

--sam


On 11/16/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Well, there's:

 wicket-contrib-spring-examples
 wicket-contrib-examples
 wicket-contrib-examples-hibernate3
 wicket-contrib-freemarker
 wicket-contrib-fvalidate
 wicket-contrib-gmap
 wicket-contrib-gmap-examples
 wicket-contrib-groovy
 wicket-contrib-jasperreports
 wicket-contrib-navmenu
 wicket-contrib-palette
 wicket-contrib-palette-examples
 wicket-contrib-scriptaculous
 wicket-contrib-scriptaculous-examples
 wicket-contrib-spring
 wicket-contrib-tinymce
 wicket-contrib-tinymce-examples
 wicket-contrib-velocity
 wicketeer
 wicket-examples
 wicket-extensions
 wicket-phonebook

 to name a few.

 Eelco


 On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:
  Wicket-examples, wicket-phonebook don't seem to exist, and
  wicket-stuff is apparently nothing but the source code to the
  sourceforge web page about wicket-stuff.  What am I missing here?
 
  --sam
 
 
  On 11/16/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
   hi Sam,
  
Re components:
check out the component reference in the wicket-examples project. it is
   farily complete and shows components in isolation so you can play around
   with them.
  
Re hibernate integration:
check out the wicket-phonebook project from wicket-stuff cvs. it is a
   simple example of a wicket/spring/hibernate project. wicket-phonebook has
   great javadoc that will explain what everything is.
  
Re creating components:
this is the strength of wicket. you just extend one of the base classes
   such as Component or WebMarkupContainer or extend any other component and
   away you go. checkout the code that drives components in the component
   reference its so simple it speaks for itself.
  
Re documentation:
yes this is something we do not have a lot of, we are working on it. what
   we do have right now is great javadoc. i got started just by looking at 
   the
   examples and the code that drives them. wicket felt so natural i just 
   picked
   it up ( but i did come from a strong tapestry background ). imho the best
   way to evaluate a framwork is to try and build a small project with it so
   you get the feel for it.
  
this list is a great place to get support.
if you have any questions feel free to email them to the list.
  
btw, wicket-examples and wicket-phonebook both have jetty-launcher in a
   class called Start, so if you use eclise just right click and do debug as
   java app, that will start up jetty and you are ready to go as opposed to
   package/redeploy cycle.
  
-Igor
  
  
  
   On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:
   
OK, so I've been all over the wicket sourceforge site, and I must be
missing something.  Where is the documentation?  There are some fairly
basic examples that don't go into much detail, the new user guide in
the wiki which is incomplete whenever it gets interesting.  The wicket
stuff section lists a hibernate tool, but doesn't provide a link to
anything. I see many references to how great wicket is with hibernate,
but I've never seen a doc that describes how someone would actually
use wicket with hibernate.  Perhaps most importantly, I've never found
a simple description of the components that are available (or how to
implement new ones), let alone how to use them.  Do I really have to
extract all of this from the javadocs and source code?
   
I'm trying to evaluate frameworks for a large development project, and
from all the hype, wicket seems to be a nice solution, but it is
basically not evaluatable, since, apparently, the only way to learn
anything about it is to get deep enough into a development project to
overcome the learning curve and total lack of documentation.
   
Am I missing something here?
   
   
---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:

Re: [Wicket-user] There must be some docs somewhere?

2005-11-16 Thread Eelco Hillenius
Yeah, the fact that is tells you to check out the wicket-stuff module
is bad. We should fix that. But for the rest... it pretty basic cvs
stuff to figure out what modules are in the repository. Works the same
for all open source cvs projects out there. Anyway in case you are
still interested in evaluating, you probably would want to check out
the component reference of wicket examples first, as that gives you a
nice overview of the components that Wicket delivers with the core
distro. After that the telephone example is a nice one to look at some
more typical application development features.

Eelco

On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:
 Yeah, the answer lies in the fact that the shell-based cvs commands in
 the wicket-stuff documentation are utterly broken.  Never mind that
 there is no visible line break between the two separate cvs commands,
 but it also says to check out the wicket-stuff module, which is merely
 the source for the wicket-stuff sourceforge site.  In reality, since
 there is no list of available modules provided anywhere, and the link
 to the viewcvs displays the same wicket-stuff module that the cvs
 command downloads, you have to checkout '.' rather than wicket-stuff,
 although this is entirely non-obvious without reading the maven
 commands listed on the same page.  Note that the maven commands
 appear, from my limited understanding of maven, to be correct.  It
 does check out '.', which pulls the entire wicket-stuff project,
 including all the modules you listed.

 --sam


 On 11/16/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Well, there's:
 
  wicket-contrib-spring-examples
  wicket-contrib-examples
  wicket-contrib-examples-hibernate3
  wicket-contrib-freemarker
  wicket-contrib-fvalidate
  wicket-contrib-gmap
  wicket-contrib-gmap-examples
  wicket-contrib-groovy
  wicket-contrib-jasperreports
  wicket-contrib-navmenu
  wicket-contrib-palette
  wicket-contrib-palette-examples
  wicket-contrib-scriptaculous
  wicket-contrib-scriptaculous-examples
  wicket-contrib-spring
  wicket-contrib-tinymce
  wicket-contrib-tinymce-examples
  wicket-contrib-velocity
  wicketeer
  wicket-examples
  wicket-extensions
  wicket-phonebook
 
  to name a few.
 
  Eelco
 
 
  On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:
   Wicket-examples, wicket-phonebook don't seem to exist, and
   wicket-stuff is apparently nothing but the source code to the
   sourceforge web page about wicket-stuff.  What am I missing here?
  
   --sam
  
  
   On 11/16/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
hi Sam,
   
 Re components:
 check out the component reference in the wicket-examples project. it is
farily complete and shows components in isolation so you can play around
with them.
   
 Re hibernate integration:
 check out the wicket-phonebook project from wicket-stuff cvs. it is a
simple example of a wicket/spring/hibernate project. wicket-phonebook 
has
great javadoc that will explain what everything is.
   
 Re creating components:
 this is the strength of wicket. you just extend one of the base classes
such as Component or WebMarkupContainer or extend any other component 
and
away you go. checkout the code that drives components in the component
reference its so simple it speaks for itself.
   
 Re documentation:
 yes this is something we do not have a lot of, we are working on it. 
what
we do have right now is great javadoc. i got started just by looking at 
the
examples and the code that drives them. wicket felt so natural i just 
picked
it up ( but i did come from a strong tapestry background ). imho the 
best
way to evaluate a framwork is to try and build a small project with it 
so
you get the feel for it.
   
 this list is a great place to get support.
 if you have any questions feel free to email them to the list.
   
 btw, wicket-examples and wicket-phonebook both have jetty-launcher in a
class called Start, so if you use eclise just right click and do debug 
as
java app, that will start up jetty and you are ready to go as opposed to
package/redeploy cycle.
   
 -Igor
   
   
   
On 11/16/05, Sam Gendler [EMAIL PROTECTED] wrote:

 OK, so I've been all over the wicket sourceforge site, and I must be
 missing something.  Where is the documentation?  There are some fairly
 basic examples that don't go into much detail, the new user guide in
 the wiki which is incomplete whenever it gets interesting.  The wicket
 stuff section lists a hibernate tool, but doesn't provide a link to
 anything. I see many references to how great wicket is with hibernate,
 but I've never seen a doc that describes how someone would actually
 use wicket with hibernate.  Perhaps most importantly, I've never found
 a simple description of the components that are available (or how to
 implement new ones), let alone how to use 

Re: Re: [Wicket-user] My take on Spring integration

2005-11-16 Thread Igor Vaynberg
I think the web-access is also not uptodate
http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-spring/
http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-spring/src/java/wicket/contrib/

here i can see the proxy/injection/spring packages, so its up to date.

I was just thinking of an easy way to configure the static instance gotten from SpringInjector.getInstance
(). So I thought thatSpringInjector.getInstance() would callApplicationContext.getBean(SpringInjector,SpringInjector.class) and ifthere is none return the singelton instance.
but then you have to make the bean name configurable, what if someone
has two injectors or wants a different name. it will never end.
creating a custom one is trivial because the base class is very simple.
a few lines of code later you can have one that works great for you.

An alternative could be that there is a generic injector which loads alist of IFieldValueFactories from the WebApplication.

once again, i think this is better done in a custom way. its very easy to have something like this:
class InjectorLocator { public static Injector getInjector() { // create and return injector here } }
then instead of using springwebpage create your own that uses the
static lookup from injectorlocator to get the injector as opposed to
using the default springinjector. this can even allow you to do unit
testing on your pages, just have some flag in getInjector() that
returns a noop implementation.

-Igor