Re: conditional markup change

2007-08-24 Thread Igor Vaynberg
there are a few ways to do this

one is to add both and override isvisible() on them to conditionally hide
one or the other

another way would be for that link to replace one with the other


-igor


On 8/23/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote:

 I need to change presentation dynamically depending on
 object status and I can do it with conditionally using
 different panels like this:
 if( getWSSession().getVisit().isSaved( v.getId() ) ){
 add( new VehicleUncompareControl(
 compareControl, new Model( v ), new Component[]{
 ajaxTarget, VehicleItem.this}));
 } else{
 add( new VehicleCompareControl(
 compareControl, new Model( v ), new Component[]{
 ajaxTarget, VehicleItem.this}));
 }

 so far so good, BUT, when I click on the AjaxLink
 inside of those panels they change status of the
 component (vehicle), so I would like the item to
 reflect the change - and THAT does not happens. It is
 sort of understandable because component already has
 been created...

 But the question is: How can I do that in Wicket:
 conditionally change markup and see effect of those
 changes for Ajax updates too?

 Konstantin Ignatyev




 PS: If this is a typical day on planet earth, humans will add fifteen
 million tons of carbon to the atmosphere, destroy 115 square miles of
 tropical rainforest, create seventy-two miles of desert, eliminate between
 forty to one hundred species, erode seventy-one million tons of topsoil, add
 2,700 tons of CFCs to the stratosphere, and increase their population by
 263,000

 Bowers, C.A.  The Culture of Denial:  Why the Environmental Movement Needs
 a Strategy for Reforming Universities and Public Schools.  New York:  State
 University of New York Press, 1997: (4) (5) (p.206)

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




Re: Can Panel replace itself ?

2007-08-24 Thread Artur W.


igor.vaynberg wrote:
 
 does it do that in all browsers?
 
 also call view.setreuseitems(true);
 

I've checked it with ff2 and ie7. Also with Wicket1.3beta2 and beta3. I've
set view.setreuseitems(true);

The problem is that the wicket generate span tags for panels after body tag
and before the table tag.
So replacing is proper, but the tags location is incorrect:

lt;bodygt;

lt;span id=panel5gt;
lt;/spangt;lt;span id=panel7gt;
lt;/spangt;lt;span id=panel9gt;
lt;/spangt;lt;span id=panel11gt;
lt;/spangt;lt;tablegt;
lt;tbodygt;lt;trgt;
lt;tdgt;lt;a id=link6 onclick=var
wcall=wicketAjaxGet('?wicket:interface=:4:list:0:panel:link::IBehaviorListener:0:',
function() { }.bind(this), function() { }.bind(this));return !wcall;
href=#gt;lt;spangt;clicklt;/spangt;lt;/agt;lt;/tdgt;

lt;tdgt;lt;spangt;ONElt;/spangt;lt;/tdgt;
lt;tdgt;lt;spangt;onelt;/spangt;lt;/tdgt;

lt;/trgt;...



Full generated html file:
http://sunet.pl/testpage.html

Full generated html file after one click:
http://sunet.pl/testpage-after-one-click.html

Is it a but or am I doing something wrong?

Artur

-- 
View this message in context: 
http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12307236
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DownloadLink hanging

2007-08-24 Thread Thomas Singer

Done: https://issues.apache.org/jira/browse/WICKET-878

Tom


Igor Vaynberg wrote:

yep

-igor


On 8/23/07, Thomas Singer [EMAIL PROTECTED] wrote:

Should I report a bug in JIRA?

--
Best regards,
Thomas Singer
_
SyntEvo GmbH
Brunnfeld 11
83404 Ainring
Germany
www.syntevo.com


Igor Vaynberg wrote:

hm, this looks like an old bug. johan didnt we fix this a while ago?

-igor


On 8/23/07, Thomas Singer [EMAIL PROTECTED] wrote:

inside shared
resource you can simply call Session.get() to get to wicket session.

Unfortunately, it looks like this is not possible, because I'm getting
following exception:


java.lang.IllegalStateException: you can only locate or create

sessions

in the context of a request cycle

  org.apache.wicket.Session.findOrCreate(Session.java:250)
  org.apache.wicket.Session.get(Session.java:279)
  com.syntevo.hpsmart.DownloadResource.getResourceStream(

DownloadResource.java:18)

  org.apache.wicket.protocol.http.WicketFilter.getLastModified(

WicketFilter.java:708)

  org.apache.wicket.protocol.http.WicketFilter.doFilter(

WicketFilter.java:122)

Our resource code looks like this:


final class DownloadResource extends Resource {

  public IResourceStream getResourceStream() {
final OurSession session = (OurSession)Session.get();
if (session == null) {
  return null;
}

final File file = session.getFileToDownload();
if (file == null) {
  return null;
}

return new MyFileResourceStream(file);
  }

--
Best regards,
Thomas Singer
_
SyntEvo GmbH
Brunnfeld 11
83404 Ainring
Germany
www.syntevo.com



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



conditional markup change

2007-08-24 Thread Konstantin Ignatyev
I need to change presentation dynamically depending on
object status and I can do it with conditionally using
different panels like this:
if( getWSSession().getVisit().isSaved( v.getId() ) ){
add( new VehicleUncompareControl(
compareControl, new Model( v ), new Component[]{
ajaxTarget, VehicleItem.this}));
} else{
add( new VehicleCompareControl(
compareControl, new Model( v ), new Component[]{
ajaxTarget, VehicleItem.this}));
}

so far so good, BUT, when I click on the AjaxLink
inside of those panels they change status of the
component (vehicle), so I would like the item to
reflect the change - and THAT does not happens. It is
sort of understandable because component already has
been created...

But the question is: How can I do that in Wicket:
conditionally change markup and see effect of those 
changes for Ajax updates too?

Konstantin Ignatyev




PS: If this is a typical day on planet earth, humans will add fifteen million 
tons of carbon to the atmosphere, destroy 115 square miles of tropical 
rainforest, create seventy-two miles of desert, eliminate between forty to one 
hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of 
CFCs to the stratosphere, and increase their population by 263,000

Bowers, C.A.  The Culture of Denial:  Why the Environmental Movement Needs a 
Strategy for Reforming Universities and Public Schools.  New York:  State 
University of New York Press, 1997: (4) (5) (p.206)

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



Re: Add a choice to a DropDownChoice

2007-08-24 Thread Nino Saturnino Martinez Vazquez Wael
Argh sorry for the quick answer.. Instead of using a list to supply 
options for the dropdown you'll need to use a model, and then add the 
option by adding it to the modelobject.. This is how I've done it. 
Afterwards you can either poke model.changed or model.setobject with the 
list.


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:

Sure just add it to the model/bean:)

andrea pantaleoni wrote:

Hi,
I'm creating a DropDownChoice in this way: DropDownChoice 
dropDownChoice = new

DropDownChoice(id,PropertyModel(beanName,propertyName),List,renderer)

Now I want to add a choice with key 0 and Value  (empty string)
I was looking for the API and I expected to find something like
dropDownChoice.addChoice(choice) but there is not.

Is there a way to add a extra choice after the dropdown component is 
built?


Many thanks Andrea   


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




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



Re: Add a choice to a DropDownChoice

2007-08-24 Thread Nino Saturnino Martinez Vazquez Wael

Sure just add it to the model/bean:)

andrea pantaleoni wrote:

Hi,
I'm creating a DropDownChoice in this way: 
DropDownChoice dropDownChoice = new

DropDownChoice(id,PropertyModel(beanName,propertyName),List,renderer)

Now I want to add a choice with key 0 and Value  (empty string)
I was looking for the API and I expected to find something like
dropDownChoice.addChoice(choice) but there is not.

Is there a way to add a extra choice after the dropdown component is built?

Many thanks 
Andrea 
  


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



Add a choice to a DropDownChoice

2007-08-24 Thread andrea pantaleoni

Hi,
I'm creating a DropDownChoice in this way: 
DropDownChoice dropDownChoice = new
DropDownChoice(id,PropertyModel(beanName,propertyName),List,renderer)

Now I want to add a choice with key 0 and Value  (empty string)
I was looking for the API and I expected to find something like
dropDownChoice.addChoice(choice) but there is not.

Is there a way to add a extra choice after the dropdown component is built?

Many thanks 
Andrea 
-- 
View this message in context: 
http://www.nabble.com/Add-a-choice-to-a-DropDownChoice-tf4322067.html#a12307733
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DownloadLink hanging

2007-08-24 Thread Jean-Baptiste Quenot
* Igor Vaynberg:

 yep, DownloadLinks will block because  requests to the same page
 are serialized.

Igor, that's a good point.

Thomas, did  you try to  follow the  approach shown in  the static
pages examples?

See http://wicketstuff.org/wicket13/staticpages/
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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



Re: keyboard shortcuts in wicket ?

2007-08-24 Thread Nino Saturnino Martinez Vazquez Wael
Sorry for the readme i've fixed it. I used the gmap2 project as 
template, as I remember it.


I belive that the test failing are because some of the stuff are not 
done yet, so it should continue to do so until its working.


regards Nino

Jean-Baptiste Quenot wrote:

* Nino Saturnino Martinez Vazquez Wael:

  

I  once started  a  wicket stuff  contrib,  called wicket  input
events. Which were  gonna be all  about input events  like mouse
events and  key events. It  never got that  far because  I didnt
really  needed it. Some  of  the basic  infra  structure in  the
project should be ready I think  but its not in any usable state
right now.

Feel free  to contine the  work, as  I currently only  will have
time to do it when I need it, although I'll be happy to assist.



Dear Nino,

I  believe that  you may  be out  of time  to finish  the work  on
wicket-contrib-input-events/,  but at  least could  you provide  a
decent README?  Currently the README is a copy of the gmap2 one...

This kind  of rudimentary polishing  would help to jump  in maybe.
We  probably don't  want to  end-up with  too many  unfinished and
undocumented projects, otherwise the users will be disappointed.

Also it would be a plus if the tests were successful.

Thanks,
  


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



Re: creating RSS feeds with Wicket

2007-08-24 Thread Jean-Baptiste Quenot
* Ryan Sonnek:
 http://www.jroller.com/wireframe/entry/wicket_and_rss_feeds
 
 Just wanted to post an announcement that there's a new wicket stuff project
 (wicketstuff-rome) to allow for creation of RSS (or Atom) feeds from within
 Wicket.  I've been using it for the past several weeks and it's allowed me
 to integrate RSS feeds into my Wicket app *very* quickly.
 
 This new project is a definite step up from the existing wicket wiki article
 for Rss pages, but I'm not sure what to do about that info.  Please let me
 know if anyone has suggestions or issues with the project.  Now that it's on
 wicketstuff, feel free to tweak or add features!

Actually to make it really reusable I would have put protected
abstract SyndFeed getFeed(); in FeedOutputComponent.  So that we
can have the feed output in a component of a page instead of a
full page.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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



Re: Component Factory and code against interface

2007-08-24 Thread Johan Compagner
We can do that because all our components implement specific interfaces
which changes
the state of the component.  For example

interface ILabelMethods
{
   setBackground(Color color)
   setForeground(Color color)
   // and so on
}

and all those implementations do record the change

johan


On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:


 Thanks Johan,

 Glad it wasn't a totally silly idea. Any top tips or problems you can
 share?
 Nice that Igor's approach by its very nature avoids sending the same
 component more than once. Trees are great ;)


 Johan Compagner wrote:
 
  this is how we also do it. Have a changes recorder per component, that
  records changes and when the component renders it sets the dirty flag
  to false
 
  On 8/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote:
  
  
   Two motivations for dirty components being sent automatically are:
   1) What gets updated may be through quite convoluted logic. e.g. user
   changes ownership of a record so delete button gets disabled. I don't
   really
   want to code that the delete button needs resending...
 
 
  how is any UI framework supposed to know that this happened? the
  component
  knows how to render itself based on this record you provide via a
 model,
  but
  it cannot tell it changed. this seems like such a corner case.
 
  here is what i would suggest
 
  interface IDirtyStateAware { boolean isDirty(); } let your components
  that
  know how to check if they are dirty or not implement this. i dont think
  these should be as granular as a button, but probably bigger components
 -
  like a panel that contains the button.
 
  then:
 
  AjaxFallbackLink link=new AjaxFallbackLink(link) {
abstract onClick(); // this is where processing happens
 
onClick(AjaxRequestTarget target) {
   onClick();
   getPage().visit(new component.visitor() {
 visitcomponent(component c) {
   if (c instanceof idirtystateaware) {
 if (((idirtystateaware)c).isDirty()) {
 target.addcomponent(c);
 }
 return CONTINUE_BUT_DONOT_GO_DEEPER;
  }
  return CONTINUE;
   }
 }
  }
 
  -igor
 
 
 
  2) I'm probably missing some Wicket magic but as we have the HTML
 edition
   and Ajax edition Id like the onsubmit etc handlers not to see any
 Ajax
   stuff.
  
   At the moment I'm pondering having something like:
   AppSpecificPanel extends OurPanelBase. We then have the normal Wicket
   implementation with an adapter that does the work for OurPanelBase.
 The
   idea
   being that:
   * New developers are given a simple set of Components approved by our
  tech
   lead and tested.
   * New developers can't fiddle with full power of Wicket.
   * Bulk of application code is not tied to Wicket.
   * At runtime can have different implementations of a particular
  component
   based on the client.
  
   Obviously the huge downside is added complexity and trying to avoid
   inventing our own API. I intend to have our own base class for Panel,
   Button... etc so that we can be consistent about a variety of things.
  
   Sorry I've rambled a bit.
  
  
   igor.vaynberg wrote:
   
On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote:
   
   
Say my onSubmit handler changes three components, as I understand
  it, I
have
to hand code feeding those three components to the
  AjaxRequestTarget.
This
seems cumbersome and slightly error prone. I think for our
  application,
if
the components kept track of changes, I could automate which
  components
are
sent back. Guess what I'm asking is if anything that already
 exists
  in
Wicket keeps track of component changes? Can't imagine it would be
  easy
otherwise without really heavy duty AOP etc...
   
   
heh, there is nothing that automatically marks components as
 dirty()
because
wicket doesnt know what you do inside your components. wicket is
unmanaged.
   
but i dont really understand the issue. you have
   onclick(ajaxrequesttarget
t) { dosomething(); t.addcomponent() }
   
so in your case you mean inside dosomething() you do something to x
components, but you dont know which x components they are?
   
-igor
   
   
Thanks again Igor.
   
   
igor.vaynberg wrote:

 not really sure what you mean when you say marking components as
dirty...

 have you seen ajaxfallback* components? those will use ajax when
  its
 there,
 and fallback on regular requests when its not. so you dont even
  need
   a
 factory necessarily.

 -igor


 On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote:


 Thanks Igor,

 Because we have to support Ajax and non-Ajax version I was
  wondering
 about
 hiding details of making components Ajax friendly in the
 factory.
  so
 setOutputMarkupId(true) etc and hiding Ajax 

Re: Wicket and Spring MVC compared.

2007-08-24 Thread Nino Saturnino Martinez Vazquez Wael

I think it's looking okay, did you pick up the thing mentioned on the wiki?

You are not using ajax in Spring MVC? It would be wrong to just plain 
compare non ajax to ajax..


Also you could write to the Jmeter list, to get a broader view of your 
test plan.


Also you'll post results here ?

regards Nino

Vincenzo Vitale wrote:

Hi all,

any performance comparison out there between Spring MVC and Wicket?


I do want to convince people I'm working with to use Wicket for the
next presentation projects but someone has concerns about the session
usage and performances with Ajax.

There are a lot of post in which is explained this is not a problem
and for example I know using Detachable models is the first best
practice for the first problem but I want to show numbers to my
colleagues... :-)

To compare the memory usage performance I wrote the same simple
application in Wicket (Detachable Models used) and Spring MVC. Both
are using the same service layer (Spring + Hibernate) to retrieve
objects from the db; in the applications there are two stateless
pages: the first one is just a list page without pagination and the
second one is a detail page.

In the database there are 50 elements and I wrote a JMeter script in
which a request for each page is done (a CookieManager is used to
create always a new session) , 10 threads are used with 1 sec of ramp
up and 20 loops per threads. Each application is deployed alone in a
JBoss instance.
Then I launch the Jmeter script and use JConsole for the memory analysis.

Something wrong with this? Any Suggestions (more elements in the db,
more threads, more something...)?



Thanks a lot,
Vicio.

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


  


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



Re: Component Factory and code against interface

2007-08-24 Thread Sam Hough

Thanks Johan,

Glad it wasn't a totally silly idea. Any top tips or problems you can share?
Nice that Igor's approach by its very nature avoids sending the same
component more than once. Trees are great ;)


Johan Compagner wrote:
 
 this is how we also do it. Have a changes recorder per component, that
 records changes and when the component renders it sets the dirty flag
 to false
 
 On 8/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote:
 
 
  Two motivations for dirty components being sent automatically are:
  1) What gets updated may be through quite convoluted logic. e.g. user
  changes ownership of a record so delete button gets disabled. I don't
  really
  want to code that the delete button needs resending...


 how is any UI framework supposed to know that this happened? the
 component
 knows how to render itself based on this record you provide via a model,
 but
 it cannot tell it changed. this seems like such a corner case.

 here is what i would suggest

 interface IDirtyStateAware { boolean isDirty(); } let your components
 that
 know how to check if they are dirty or not implement this. i dont think
 these should be as granular as a button, but probably bigger components -
 like a panel that contains the button.

 then:

 AjaxFallbackLink link=new AjaxFallbackLink(link) {
   abstract onClick(); // this is where processing happens

   onClick(AjaxRequestTarget target) {
  onClick();
  getPage().visit(new component.visitor() {
visitcomponent(component c) {
  if (c instanceof idirtystateaware) {
if (((idirtystateaware)c).isDirty()) {
target.addcomponent(c);
}
return CONTINUE_BUT_DONOT_GO_DEEPER;
 }
 return CONTINUE;
  }
}
 }

 -igor



 2) I'm probably missing some Wicket magic but as we have the HTML edition
  and Ajax edition Id like the onsubmit etc handlers not to see any Ajax
  stuff.
 
  At the moment I'm pondering having something like:
  AppSpecificPanel extends OurPanelBase. We then have the normal Wicket
  implementation with an adapter that does the work for OurPanelBase. The
  idea
  being that:
  * New developers are given a simple set of Components approved by our
 tech
  lead and tested.
  * New developers can't fiddle with full power of Wicket.
  * Bulk of application code is not tied to Wicket.
  * At runtime can have different implementations of a particular
 component
  based on the client.
 
  Obviously the huge downside is added complexity and trying to avoid
  inventing our own API. I intend to have our own base class for Panel,
  Button... etc so that we can be consistent about a variety of things.
 
  Sorry I've rambled a bit.
 
 
  igor.vaynberg wrote:
  
   On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote:
  
  
   Say my onSubmit handler changes three components, as I understand
 it, I
   have
   to hand code feeding those three components to the
 AjaxRequestTarget.
   This
   seems cumbersome and slightly error prone. I think for our
 application,
   if
   the components kept track of changes, I could automate which
 components
   are
   sent back. Guess what I'm asking is if anything that already exists
 in
   Wicket keeps track of component changes? Can't imagine it would be
 easy
   otherwise without really heavy duty AOP etc...
  
  
   heh, there is nothing that automatically marks components as dirty()
   because
   wicket doesnt know what you do inside your components. wicket is
   unmanaged.
  
   but i dont really understand the issue. you have
  onclick(ajaxrequesttarget
   t) { dosomething(); t.addcomponent() }
  
   so in your case you mean inside dosomething() you do something to x
   components, but you dont know which x components they are?
  
   -igor
  
  
   Thanks again Igor.
  
  
   igor.vaynberg wrote:
   
not really sure what you mean when you say marking components as
   dirty...
   
have you seen ajaxfallback* components? those will use ajax when
 its
there,
and fallback on regular requests when its not. so you dont even
 need
  a
factory necessarily.
   
-igor
   
   
On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote:
   
   
Thanks Igor,
   
Because we have to support Ajax and non-Ajax version I was
 wondering
about
hiding details of making components Ajax friendly in the factory.
 so
setOutputMarkupId(true) etc and hiding Ajax specific handlers
 where
possible. Have you seen anybody automatically marking components
 as
   dirty
so
they can be sent back via Ajax (Echo like)? I think that would
  handle
   90%
of
our Ajax like stuff.
   
Cheers
   
Sam
--
View this message in context:
   
  
 
 http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12290179
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  

Re: Wicket and Spring MVC compared.

2007-08-24 Thread Vincenzo Vitale
Hi Nino,

at the moment I don't want to compare Ajax so in the applications I
wrote for testing it's not used.

Sure, I will post the results here... probably the next week...

Attached the JMeter scripts I wrote (it would be better only one
script but at the moment the urls used are different). I will post
them also in the JMeter user list.


Thanks,
V.

On 8/24/07, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
 I think it's looking okay, did you pick up the thing mentioned on the wiki?

 You are not using ajax in Spring MVC? It would be wrong to just plain
 compare non ajax to ajax..

 Also you could write to the Jmeter list, to get a broader view of your
 test plan.

 Also you'll post results here ?

 regards Nino

 Vincenzo Vitale wrote:
  Hi all,
 
  any performance comparison out there between Spring MVC and Wicket?
 
 
  I do want to convince people I'm working with to use Wicket for the
  next presentation projects but someone has concerns about the session
  usage and performances with Ajax.
 
  There are a lot of post in which is explained this is not a problem
  and for example I know using Detachable models is the first best
  practice for the first problem but I want to show numbers to my
  colleagues... :-)
 
  To compare the memory usage performance I wrote the same simple
  application in Wicket (Detachable Models used) and Spring MVC. Both
  are using the same service layer (Spring + Hibernate) to retrieve
  objects from the db; in the applications there are two stateless
  pages: the first one is just a list page without pagination and the
  second one is a detail page.
 
  In the database there are 50 elements and I wrote a JMeter script in
  which a request for each page is done (a CookieManager is used to
  create always a new session) , 10 threads are used with 1 sec of ramp
  up and 20 loops per threads. Each application is deployed alone in a
  JBoss instance.
  Then I launch the Jmeter script and use JConsole for the memory analysis.
 
  Something wrong with this? Any Suggestions (more elements in the db,
  more threads, more something...)?
 
 
 
  Thanks a lot,
  Vicio.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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



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

Re: Wicket and Spring MVC compared.

2007-08-24 Thread Matej Knopp
There is not much point in comparing Wicket to Spring MVC. Spring MVC
is a very simple action based framework with very little functionality
(and probably minimal overhead). So what you would really be comparing
is Wicket to JSP (assuming you use JSP as your view layer). Now again,
Wicket is a full blown component based framework with advanced state
management, while JSP is a simple templating engine. You're trying to
compare apples with  cars :)

-Matej

On 8/24/07, Vincenzo Vitale [EMAIL PROTECTED] wrote:
 Hi all,

 any performance comparison out there between Spring MVC and Wicket?


 I do want to convince people I'm working with to use Wicket for the
 next presentation projects but someone has concerns about the session
 usage and performances with Ajax.

 There are a lot of post in which is explained this is not a problem
 and for example I know using Detachable models is the first best
 practice for the first problem but I want to show numbers to my
 colleagues... :-)

 To compare the memory usage performance I wrote the same simple
 application in Wicket (Detachable Models used) and Spring MVC. Both
 are using the same service layer (Spring + Hibernate) to retrieve
 objects from the db; in the applications there are two stateless
 pages: the first one is just a list page without pagination and the
 second one is a detail page.

 In the database there are 50 elements and I wrote a JMeter script in
 which a request for each page is done (a CookieManager is used to
 create always a new session) , 10 threads are used with 1 sec of ramp
 up and 20 loops per threads. Each application is deployed alone in a
 JBoss instance.
 Then I launch the Jmeter script and use JConsole for the memory analysis.

 Something wrong with this? Any Suggestions (more elements in the db,
 more threads, more something...)?



 Thanks a lot,
 Vicio.

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



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



AjaxEditableLabel onEdit

2007-08-24 Thread fhagen
Hi, 

in my testapp i'm trying to use an AjaxEditableLabel. When I put some data 
in, it works fine but now comes my Problem.

My label is as Subclass of AjaxEditableLabel and so I tried to implement 
the onEdit() function.
The thing is, that the displayed values might calculated by a formula in 
the back.
If the user clicks on an editable Label the formula should appear instead 
of the calculated value. How do i do this?

My first attemp looks like this:

protected void onEdit(AjaxRequestTarget target)
{
Position2 position = (Position2)pm.getTarget();
 
if(position.hasFormulas())
{
if(position.getFormula()[index] != null)
{
String output[] = position.getOutput();
output[index] = position.getFormula()[index];
}
}
 
target.addComponent(this);
}

The label is bound to an output property from the Position2 class.
This works fine so far. The deposited formula is displayed but not 
editable any more.

What do I have to do to display the formula (if there is one) and keep it 
editable?

Fabian

Re: Wicket and Spring MVC compared.

2007-08-24 Thread Vincenzo Vitale
Yes I see your point and you are absolutely right but please consider
that a lot of companies (included mine) have been using Spring MVC for
a long time and there are a lot of projects already in production
using that technology and working fine with the IT infrastructure now
available.

Of course IT architects and managers want to know which impact a
change can cause also to be able to perform the correct actions during
the migration (more ram, improving the clusters, firing developers
because with Wicket things are simple... :-) ).


Ciao,
V.

On 8/24/07, Matej Knopp [EMAIL PROTECTED] wrote:
 There is not much point in comparing Wicket to Spring MVC. Spring MVC
 is a very simple action based framework with very little functionality
 (and probably minimal overhead). So what you would really be comparing
 is Wicket to JSP (assuming you use JSP as your view layer). Now again,
 Wicket is a full blown component based framework with advanced state
 management, while JSP is a simple templating engine. You're trying to
 compare apples with  cars :)

 -Matej

 On 8/24/07, Vincenzo Vitale [EMAIL PROTECTED] wrote:
  Hi all,
 
  any performance comparison out there between Spring MVC and Wicket?
 
 
  I do want to convince people I'm working with to use Wicket for the
  next presentation projects but someone has concerns about the session
  usage and performances with Ajax.
 
  There are a lot of post in which is explained this is not a problem
  and for example I know using Detachable models is the first best
  practice for the first problem but I want to show numbers to my
  colleagues... :-)
 
  To compare the memory usage performance I wrote the same simple
  application in Wicket (Detachable Models used) and Spring MVC. Both
  are using the same service layer (Spring + Hibernate) to retrieve
  objects from the db; in the applications there are two stateless
  pages: the first one is just a list page without pagination and the
  second one is a detail page.
 
  In the database there are 50 elements and I wrote a JMeter script in
  which a request for each page is done (a CookieManager is used to
  create always a new session) , 10 threads are used with 1 sec of ramp
  up and 20 loops per threads. Each application is deployed alone in a
  JBoss instance.
  Then I launch the Jmeter script and use JConsole for the memory analysis.
 
  Something wrong with this? Any Suggestions (more elements in the db,
  more threads, more something...)?
 
 
 
  Thanks a lot,
  Vicio.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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



Re: conditional markup change

2007-08-24 Thread Oleg Taranenko
Hello Konstantin,

Your code snippet is from panel constructor, is not it? So far it
executed only first time, by creating page!

Your need explicitly use in the link handler replaceWith() method. See
Component's javadoc.

Cheers,

Oleg.

Friday, August 24, 2007, 8:46:01 AM, you wrote:

 I need to change presentation dynamically depending on
 object status and I can do it with conditionally using
 different panels like this:
 if( getWSSession().getVisit().isSaved( v.getId() ) ){
 add( new VehicleUncompareControl(
 compareControl, new Model( v ), new Component[]{
 ajaxTarget, VehicleItem.this}));
 } else{
 add( new VehicleCompareControl(
 compareControl, new Model( v ), new Component[]{
 ajaxTarget, VehicleItem.this}));
 }

 so far so good, BUT, when I click on the AjaxLink
 inside of those panels they change status of the
 component (vehicle), so I would like the item to
 reflect the change - and THAT does not happens. It is
 sort of understandable because component already has
 been created...

 But the question is: How can I do that in Wicket:
 conditionally change markup and see effect of those 
 changes for Ajax updates too?

 Konstantin Ignatyev




 PS: If this is a typical day on planet earth, humans will add
 fifteen million tons of carbon to the atmosphere, destroy 115 square miles of
 tropical rainforest, create seventy-two miles of desert, eliminate
 between forty to one hundred species, erode seventy-one million tons of
 topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their 
 population by 263,000

 Bowers, C.A.  The Culture of Denial:  Why the Environmental
 Movement Needs a Strategy for Reforming Universities and Public Schools.  New
 York:  State University of New York Press, 1997: (4) (5) (p.206)

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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]


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



Re[2]: [Wicket-user] Wicket in Action now available through Manning Early Access Program

2007-08-24 Thread Oleg Taranenko

moreover the payment through a paypal account, that withdraws money from card 
emitted by a
russian bank, failed too! :|


Friday, August 24, 2007, 1:36:25 PM, you wrote:

 Well, i had the same bad luck as  India is not in the choice.
 They asked me to get a paypal account

 -swaroop


 On 8/24/07, Gabor Szokoli  [EMAIL PROTECTED] wrote:

 On 7/26/07, Martijn Dashorst  [EMAIL PROTECTED] wrote:
  Eelco and I are really happy to announce the availability of our first
  two chapters of our forthcoming book Wicket in Action.

 Manning does not accept orders from Hungary, where I happen to live and
 work.
 Normally we don't bother with such businesses and buy from amazon.com
 instead, but the online preview of the Wicket book is worth making an
 exception.
 Any suggestions?


 Gabor Szokol

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





-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



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



Re: Alternative to Wicket data binding

2007-08-24 Thread Matej Knopp
Hi,

there's nothing wrong with yor approach, actually, it's more solid
than using (Compound)PropertyModel because you get full refactoring
support. The downside is of course code verbosity. Unless java get
property expression there's not much we can do about it though :-/

-Matej

On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:

 Does anybody use any other data binding than the built in Wicket classes?

 We have few complex objects rather than lots of objects with lots of fields
 so having the binding more explicit e.g.:
 add(new TextField(value, new ModelString() {
 public void setString(String p) {
 model.setValue(p);
 }
 public String getString() {
 return model.getValue();
 }
 }));
 Is tempting as we would get more tool support in eclipse etc and it is more
 obvious what is going on. Obviously the huge downside is that it is much
 more verbose than:
 add(new TextField(value));

 Sorry I'm being so greedy on this forum. Still not switched my thinking from
 the two extremes of struts and GWT.


 --
 View this message in context: 
 http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12310156
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Constructor of Component not DRY?

2007-08-24 Thread Johan Maasing
I't really does not matter much but I'm with Eelco and Johan on this.
I prefer not to allow null values in the constructor. At least not if
there is a constructor with fewer parameters that can be used instead.
So I prefer to chain towards the simpler constructor if possible.

On 8/24/07, Martin Funk [EMAIL PROTECTED] wrote:
 Eelco Hillenius schrieb:
  private component init(String, IModel) which can assume null arguments
 
  do the null checks in the constructor and forward to that method
 
 
  That's an option in general, though the disadvantage of that is that
  you can't use final fields.
 
  Anyway, for this case, if anyone cares, we can fix it in either way.
 
 I care.
 Is that enough anyones?

 mf

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



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



Re: creating RSS feeds with Wicket

2007-08-24 Thread Ryan Sonnek
That's a really good question.  If you look at the source for my solution,
it's a very lightweight wrapper around the ROME RSS library.  I don't have
any code that's setting response headers.  If you have a solution, I'd be
happy to incorporate it into the FeedPage.

On 8/24/07, thijs [EMAIL PROTECTED] wrote:

 Hi Ryan,

 I've added this as a comment to your blog entry as wel, but is was
 marked as spam...

 Wow, cool is the right word for this.
 Does it also incorporate responses to http headers?
 For example: I had to modify the RssPage example to work with
 If-Modified-Since headers because some feed readers just keep updating
 their information (adding the same articles over and over).
 Also it helps keep  traffic to the site low

 Thijs

 Ryan Sonnek wrote:
  http://www.jroller.com/wireframe/entry/wicket_and_rss_feeds
 
  Just wanted to post an announcement that there's a new wicket stuff
 project
  (wicketstuff-rome) to allow for creation of RSS (or Atom) feeds from
 within
  Wicket.  I've been using it for the past several weeks and it's allowed
 me
  to integrate RSS feeds into my Wicket app *very* quickly.
 
  This new project is a definite step up from the existing wicket wiki
 article
  for Rss pages, but I'm not sure what to do about that info.  Please let
 me
  know if anyone has suggestions or issues with the project.  Now that
 it's on
  wicketstuff, feel free to tweak or add features!
 
  Ryan
 
 




Re: replace Panel inside a Form

2007-08-24 Thread Florian Sperber

Hi Benjamin,

where is the Panel einsatzPanel defined?

Maybe it helps defining it as a Class property?


Kind regards
Florian Sperber

Benjamin Ernst wrote:

Hi,
I am trying to replace a Panel, which is inside a Form, which is inside a
Page, which is inside a ModalWindow.
The first time it works fine, but when I want to replace it a second time,
the Panel has no parent.

Here is the code:

listItem.add(new AjaxButton(pflege, MitarbeiterForm.this) {

@Override
protected void onSubmit(AjaxRequestTarget target,
Form form) {
EinsatzPanel newPanel = new
EinsatzPanel(einsatzPanel, ein);
newPanel.setOutputMarkupId(true);
einsatzPanel.replaceWith(newPanel);
target.addComponent(newPanel);
}
   });

An here is the Error:

2007-08-24 14:53:18,681 ERROR [http-8080-Processor24]
org.apache.wicket.RequestCycle: This method can only be called on a
component that has already been added to its parent.
java.lang.IllegalStateException: This method can only be called on a
component that has already been added to its parent.
at org.apache.wicket.Component.replaceWith(Component.java:2224)
at
de.csg.fips.fe.anzeige.mitarbeiter.pflege.MA_PflegePage$MitarbeiterForm$1$1.onSubmit
(MA_PflegePage.java:251)
at org.apache.wicket.ajax.markup.html.form.AjaxButton$1.onSubmit(
AjaxButton.java:82)

I don´t know why it only works one time.

Thanks for any help in advance,

Benjamin



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



Re: setEnabled() and complex components

2007-08-24 Thread Federico Fanton
On Fri, 24 Aug 2007 12:24:46 +0200
Federico Fanton [EMAIL PROTECTED] wrote:

  I was wondering, is there a way to cleanly enable/disable complex 
  components such as DateFields and Palettes? I see that 
  Component.setEnabled() is final so it cannot be overridden to handle 
  special cases.. Should I always call visitChildren() on the component and 
  setEnabled() on every subcomponent?
 
 Just noticed that isEnabled isn't final.. Should I ovveride it and call 
 setEnabled on the subcomponents there?

Did that with DateFields and it works, while Palettes subcomponents handle 
getPalette().isEnabled() on their own.. Problem solved X-) Thanks for the 
attention all the same!


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



Re: Alternative to Wicket data binding

2007-08-24 Thread Sam Hough

Thanks Matej,

Is this 
http://wicketstuff.org/wicket13doc/org/apache/wicket/model/PropertyModel.html
PropertyModel  javadoc out of date where it says that Note that the
property resolver by default provides access to private members and methods.
If guaranteeing encapsulation of the target objects is a big concern, you
should consider using an alternative implementation. out of date? I'm glad
to say it doesn't seem to be true in 1.3.0-beta2



Matej Knopp-2 wrote:
 
 Hi,
 
 there's nothing wrong with yor approach, actually, it's more solid
 than using (Compound)PropertyModel because you get full refactoring
 support. The downside is of course code verbosity. Unless java get
 property expression there's not much we can do about it though :-/
 
 -Matej
 
 On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:

 Does anybody use any other data binding than the built in Wicket classes?

 We have few complex objects rather than lots of objects with lots of
 fields
 so having the binding more explicit e.g.:
 add(new TextField(value, new ModelString() {
 public void setString(String p) {
 model.setValue(p);
 }
 public String getString() {
 return model.getValue();
 }
 }));
 Is tempting as we would get more tool support in eclipse etc and it is
 more
 obvious what is going on. Obviously the huge downside is that it is much
 more verbose than:
 add(new TextField(value));

 Sorry I'm being so greedy on this forum. Still not switched my thinking
 from
 the two extremes of struts and GWT.


 --
 View this message in context:
 http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12310156
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12312105
Sent from the Wicket - User mailing list archive at Nabble.com.


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



replace Panel inside a Form

2007-08-24 Thread Benjamin Ernst
Hi,
I am trying to replace a Panel, which is inside a Form, which is inside a
Page, which is inside a ModalWindow.
The first time it works fine, but when I want to replace it a second time,
the Panel has no parent.

Here is the code:

listItem.add(new AjaxButton(pflege, MitarbeiterForm.this) {

@Override
protected void onSubmit(AjaxRequestTarget target,
Form form) {
EinsatzPanel newPanel = new
EinsatzPanel(einsatzPanel, ein);
newPanel.setOutputMarkupId(true);
einsatzPanel.replaceWith(newPanel);
target.addComponent(newPanel);
}
   });

An here is the Error:

2007-08-24 14:53:18,681 ERROR [http-8080-Processor24]
org.apache.wicket.RequestCycle: This method can only be called on a
component that has already been added to its parent.
java.lang.IllegalStateException: This method can only be called on a
component that has already been added to its parent.
at org.apache.wicket.Component.replaceWith(Component.java:2224)
at
de.csg.fips.fe.anzeige.mitarbeiter.pflege.MA_PflegePage$MitarbeiterForm$1$1.onSubmit
(MA_PflegePage.java:251)
at org.apache.wicket.ajax.markup.html.form.AjaxButton$1.onSubmit(
AjaxButton.java:82)

I don´t know why it only works one time.

Thanks for any help in advance,

Benjamin


Re: Re[2]: [Wicket-user] Wicket in Action now available through Manning Early Access Program

2007-08-24 Thread Gabor Szokoli
On 8/24/07, Oleg Taranenko [EMAIL PROTECTED] wrote:

 moreover the payment through a paypal account, that withdraws money from card 
 emitted by a
 russian bank, failed too! :|

They seem to accept visa, mastercard and AMEX, you don't have to use paypal.

Gabor Szokoli

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



Re: Alternative to Wicket data binding

2007-08-24 Thread Matej Knopp
It's not out of date. PropertyModel provides access to privdate
properties and it is completely intetional. The reason is actually to
provide better encapsulation, because if you e.g. bind your component
to a property of that component, you don't have to provide public
setters and getters for that property (thus it can't be changed
outside the component).

-Matej

On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:

 Thanks Matej,

 Is this
 http://wicketstuff.org/wicket13doc/org/apache/wicket/model/PropertyModel.html
 PropertyModel  javadoc out of date where it says that Note that the
 property resolver by default provides access to private members and methods.
 If guaranteeing encapsulation of the target objects is a big concern, you
 should consider using an alternative implementation. out of date? I'm glad
 to say it doesn't seem to be true in 1.3.0-beta2



 Matej Knopp-2 wrote:
 
  Hi,
 
  there's nothing wrong with yor approach, actually, it's more solid
  than using (Compound)PropertyModel because you get full refactoring
  support. The downside is of course code verbosity. Unless java get
  property expression there's not much we can do about it though :-/
 
  -Matej
 
  On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:
 
  Does anybody use any other data binding than the built in Wicket classes?
 
  We have few complex objects rather than lots of objects with lots of
  fields
  so having the binding more explicit e.g.:
  add(new TextField(value, new ModelString() {
  public void setString(String p) {
  model.setValue(p);
  }
  public String getString() {
  return model.getValue();
  }
  }));
  Is tempting as we would get more tool support in eclipse etc and it is
  more
  obvious what is going on. Obviously the huge downside is that it is much
  more verbose than:
  add(new TextField(value));
 
  Sorry I'm being so greedy on this forum. Still not switched my thinking
  from
  the two extremes of struts and GWT.
 
 
  --
  View this message in context:
  http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12310156
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12312105
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Alternative to Wicket data binding

2007-08-24 Thread Matej Knopp
Well, the private acessing functionality was mostly build with situation like

private String myField;

new PropertyModel(this, myField);

i.e. without the setters and getters functionality. But I don't see
reason why should getters and setters be ignored, even if they are
private. Johan?

-Matej

On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:

 Thanks again Matej,

 At first I just made my setValue method private. I had to remove getValue to
 make PropertyModel access the private member. Not sure I'm keen on this
 behaviour. We have a long weekend here in the UK so I can ponder it slowly.
 Realised I've been avoiding implementing something because I can't think of
 a good property name and I don't want to have to fix it in my bean,
 component java and component html... Maybe I will go with the verbose
 solution. May also stop me pushing lots of rubbish into the model.


 Matej Knopp-2 wrote:
 
  It's not out of date. PropertyModel provides access to privdate
  properties and it is completely intetional. The reason is actually to
  provide better encapsulation, because if you e.g. bind your component
  to a property of that component, you don't have to provide public
  setters and getters for that property (thus it can't be changed
  outside the component).
 
  -Matej
 
  On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:
 
  Thanks Matej,
 
  Is this
  http://wicketstuff.org/wicket13doc/org/apache/wicket/model/PropertyModel.html
  PropertyModel  javadoc out of date where it says that Note that the
  property resolver by default provides access to private members and
  methods.
  If guaranteeing encapsulation of the target objects is a big concern, you
  should consider using an alternative implementation. out of date? I'm
  glad
  to say it doesn't seem to be true in 1.3.0-beta2
 
 
 
  Matej Knopp-2 wrote:
  
   Hi,
  
   there's nothing wrong with yor approach, actually, it's more solid
   than using (Compound)PropertyModel because you get full refactoring
   support. The downside is of course code verbosity. Unless java get
   property expression there's not much we can do about it though :-/
  
   -Matej
  
   On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:
  
   Does anybody use any other data binding than the built in Wicket
  classes?
  
   We have few complex objects rather than lots of objects with lots of
   fields
   so having the binding more explicit e.g.:
   add(new TextField(value, new ModelString() {
   public void setString(String p) {
   model.setValue(p);
   }
   public String getString() {
   return model.getValue();
   }
   }));
   Is tempting as we would get more tool support in eclipse etc and it is
   more
   obvious what is going on. Obviously the huge downside is that it is
  much
   more verbose than:
   add(new TextField(value));
  
   Sorry I'm being so greedy on this forum. Still not switched my
  thinking
   from
   the two extremes of struts and GWT.
  
  
   --
   View this message in context:
  
  http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12310156
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12312105
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Alternative-to-Wicket-data-binding-tf4322899.html#a12312628
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: creating RSS feeds with Wicket

2007-08-24 Thread Jean-Baptiste Quenot
* Ryan Sonnek:
 I'm not familiar with IResourceStream and using a WebPage approach has
 allowed for me to have great control over several aspects including:
 * url mount points
 * url parameter strategies
 * possibly configuring the response Expires/Cache headers?
 
 Do you have any examples of how this would work as a resource stream?

Igor will hate me, but here it is:

http://wicketstuff.org/wicket13/staticpages/
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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



Re: Add a choice to a DropDownChoice

2007-08-24 Thread Igor Vaynberg
class mypanel extends panel {
private List options;

mypanel () { add(new dropdownchoice(id,model, new PropertyModel(this,
options),...);}

now that it is using a property model to retrieve its choices just
add/remove items from the options list

-igor



On 8/24/07, andrea pantaleoni [EMAIL PROTECTED] wrote:


 Hi,
 I'm creating a DropDownChoice in this way:
 DropDownChoice dropDownChoice = new
 DropDownChoice(id,PropertyModel(beanName,propertyName),List,renderer)

 Now I want to add a choice with key 0 and Value  (empty string)
 I was looking for the API and I expected to find something like
 dropDownChoice.addChoice(choice) but there is not.

 Is there a way to add a extra choice after the dropdown component is
 built?

 Many thanks
 Andrea
 --
 View this message in context:
 http://www.nabble.com/Add-a-choice-to-a-DropDownChoice-tf4322067.html#a12307733
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Can Panel replace itself ?

2007-08-24 Thread Igor Vaynberg
its happening because you are creating invalid html

you cannot have a span between a tr and td, so you just need to adjust how
you are outputting the markup. change testpage.html to use the following and
it will work:

body
table style=border-collapse: collapse; empty-cells: show;
wicket:container wicket:id=list
tr style=border: 1px solid #000; wicket:id=panel
/tr
/wicket:container
/table
/body

-igor


On 8/24/07, Artur W. [EMAIL PROTECTED] wrote:



 igor.vaynberg wrote:
 
  i dont get it, where do you expect it to go? it looks like you are
  replacing
  an item inside panel7, not inside the panel that is inside the table?
 
  maybe you should build a quickstart so we have something to play with.
 
 

 Thanks for you replay Igor.

 The panel is put inside the table. But when I replace it with ajax it
 appear
 outside the table.
 Here is the working example with full source code:
 http://sunet.pl/files/test.war

 Artur


 --
 View this message in context:
 http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12307905
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Wicket and Spring MVC compared.

2007-08-24 Thread Igor Vaynberg
who cares, he says he has a database in there so the tests should be pretty
even.

for all we know wicket might be five times slower then spring mvc! and it
may very well be because spring mvc is so simple in comparison. but who
cares? a five fold improvement of something that is only five percent of the
request time to start with is insignificant.

anyway, the only thing to really look for is to make sure the wicket app is
running in deployment mode when you run the tests. there is also a jmeter
page on wiki somewhere if you want more clues.

-igor


On 8/24/07, Matej Knopp [EMAIL PROTECTED] wrote:

 There is not much point in comparing Wicket to Spring MVC. Spring MVC
 is a very simple action based framework with very little functionality
 (and probably minimal overhead). So what you would really be comparing
 is Wicket to JSP (assuming you use JSP as your view layer). Now again,
 Wicket is a full blown component based framework with advanced state
 management, while JSP is a simple templating engine. You're trying to
 compare apples with  cars :)

 -Matej

 On 8/24/07, Vincenzo Vitale [EMAIL PROTECTED] wrote:
  Hi all,
 
  any performance comparison out there between Spring MVC and Wicket?
 
 
  I do want to convince people I'm working with to use Wicket for the
  next presentation projects but someone has concerns about the session
  usage and performances with Ajax.
 
  There are a lot of post in which is explained this is not a problem
  and for example I know using Detachable models is the first best
  practice for the first problem but I want to show numbers to my
  colleagues... :-)
 
  To compare the memory usage performance I wrote the same simple
  application in Wicket (Detachable Models used) and Spring MVC. Both
  are using the same service layer (Spring + Hibernate) to retrieve
  objects from the db; in the applications there are two stateless
  pages: the first one is just a list page without pagination and the
  second one is a detail page.
 
  In the database there are 50 elements and I wrote a JMeter script in
  which a request for each page is done (a CookieManager is used to
  create always a new session) , 10 threads are used with 1 sec of ramp
  up and 20 loops per threads. Each application is deployed alone in a
  JBoss instance.
  Then I launch the Jmeter script and use JConsole for the memory
 analysis.
 
  Something wrong with this? Any Suggestions (more elements in the db,
  more threads, more something...)?
 
 
 
  Thanks a lot,
  Vicio.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: Wicket and Spring MVC compared.

2007-08-24 Thread Matej Knopp
You should also make sure that you are using DiskPageStore as pagestore.

-Matej

On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 who cares, he says he has a database in there so the tests should be pretty
 even.

 for all we know wicket might be five times slower then spring mvc! and it
 may very well be because spring mvc is so simple in comparison. but who
 cares? a five fold improvement of something that is only five percent of the
 request time to start with is insignificant.

 anyway, the only thing to really look for is to make sure the wicket app is
 running in deployment mode when you run the tests. there is also a jmeter
 page on wiki somewhere if you want more clues.

 -igor


 On 8/24/07, Matej Knopp [EMAIL PROTECTED] wrote:
 
  There is not much point in comparing Wicket to Spring MVC. Spring MVC
  is a very simple action based framework with very little functionality
  (and probably minimal overhead). So what you would really be comparing
  is Wicket to JSP (assuming you use JSP as your view layer). Now again,
  Wicket is a full blown component based framework with advanced state
  management, while JSP is a simple templating engine. You're trying to
  compare apples with  cars :)
 
  -Matej
 
  On 8/24/07, Vincenzo Vitale [EMAIL PROTECTED] wrote:
   Hi all,
  
   any performance comparison out there between Spring MVC and Wicket?
  
  
   I do want to convince people I'm working with to use Wicket for the
   next presentation projects but someone has concerns about the session
   usage and performances with Ajax.
  
   There are a lot of post in which is explained this is not a problem
   and for example I know using Detachable models is the first best
   practice for the first problem but I want to show numbers to my
   colleagues... :-)
  
   To compare the memory usage performance I wrote the same simple
   application in Wicket (Detachable Models used) and Spring MVC. Both
   are using the same service layer (Spring + Hibernate) to retrieve
   objects from the db; in the applications there are two stateless
   pages: the first one is just a list page without pagination and the
   second one is a detail page.
  
   In the database there are 50 elements and I wrote a JMeter script in
   which a request for each page is done (a CookieManager is used to
   create always a new session) , 10 threads are used with 1 sec of ramp
   up and 20 loops per threads. Each application is deployed alone in a
   JBoss instance.
   Then I launch the Jmeter script and use JConsole for the memory
  analysis.
  
   Something wrong with this? Any Suggestions (more elements in the db,
   more threads, more something...)?
  
  
  
   Thanks a lot,
   Vicio.
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Newbie questions

2007-08-24 Thread Alex Shneyderman
I wonder if there is any documentation as to how the rendering process works

How do I go from Component graph - html associated with the page? And
what is the model's role there. I have been reading and re-reading the
getting started manual, unfortunately it is an extremely incomplete
document, so it is of a very limited use, although I appreciate the
intention.

Thanks in advance for any pointers and explanations.

-- 
Thanks,
Alex.

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



Re: Component Factory and code against interface

2007-08-24 Thread Igor Vaynberg
the ui layer is generally not portable. if you start building your own
abstraction to make it portable you will end up with a pretty big mess
because you will be working against whatever framework you are using and
eventually that abstraction will turn into a framework itself.

-igor


On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:


 Many thanks Igor, that sounds like a very pragmatic approach. I was
 thinking
 about all sorts of horrible kludges like re-rendering the whole page and
 seeing how elements changed or hooking into the serialisation.

 Taken away another reason to do my over complicated solution ;) Am I
 worrying over nothing that developers might get carried away using vast
 number of components and fiddling with attributes that will make the
 application difficult to test and maybe one day port? Restricting the set
 of
 components can presumably end up with a more consistent UI...

 Anyway, thanks for all your time and sage advice.

 --
 View this message in context:
 http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12308606
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: {wicket 1.3 beta 2} AjaxFormComponentUpdatingBehavior broken?

2007-08-24 Thread Nino Saturnino Martinez Vazquez Wael

Now available from badongo to avoid cheesy IE problems

http://www.badongo.com/file/4142529

Nino Saturnino Martinez Vazquez Wael wrote:
Argh had made an error in the previous quickstart that made the 
dropdown to be broken..


This version however displays the problem as it are.
http://fileho.com/download/ff12cb141317/wicket-quickstart.zip.html

Small guide on howto see the problem:
First select an option from the dropdown, after it have been selected 
you cannot change it again. Very strange...


PS I am aware that using hashcode from a string is not a proper or 
safe way to generate and id, we will change it later.



Regards Nino


Nino Saturnino Martinez Vazquez Wael wrote:

Hmm, I've now managed to reproduce the problem in a wicket quickstart.

It's great news on one side, this means that it has nothing todo with 
wicket-spring thing or hibernate. On the other side im a bit puzzled 
by what could be causing the problem.



If someone would take a look, I've uploaded the source to here:

http://fileho.com/download/ff12cb886730/wicket-quickstart.zip.html


I think it may be an odd combination of things, that however does not 
bring me closer to a solution:(



regards Nino



Nino Saturnino Martinez Vazquez Wael wrote:
I've now created a quickstart project. This does however not show 
this behavior. Im also using spring injection, not doing so in the 
quickstart. I'll dig deeper into this.


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
Ok, i've removed all other stuff from the page, error are still 
there, wierd thing is that the dropdowns are working on the other 
pages.


I guess next step are to create a quickstart and see if it works 
there..


Should I try with beta 3 or?

regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:

Thats wierd.

I've now changed it to not use ajax and are using 
wantonselectionchangednotifications..


This yields the same result, not working. This is really wierd 
cant belive that it should not work, some of the processing must 
be broken by some of the other components I add, are there any way 
to get some more describtive informations from wicket?



http://papernapkin.org/pastebin/view/1389


Nino Saturnino Martinez Vazquez Wael wrote:
Hmm, im not using the dataview or iDataprovider, although I have 
a listview in one of the singlephonecomparepanels. However it 
seems as theres something about these two issues that match.


But the wierd thing are that it never ever picks up the change in 
the dropdownchoice. I'll try going back and doing this without 
ajax and see if that works any better.


I've tried your suggestion about declaring phone as a private on 
the page it did not fix the problem..


Wierd stuff are that I used the same approach in wicket 1.2.6 and 
it was working there(although not with the same combination of 
models)..


regards Nino

Oleg Taranenko wrote:

Hello Nino,

It seems to be the same issue as i've encountered a week ago.

see thread Order-Items master detail page started at 16 august


Possible Solution in you case:

declare anywhere posible in page
private Phone selectedItem;

in function
protected void onUpdate(AjaxRequestTarget target) {
...
   selectedItem = (Phone) phoneA.getObject();
...
}

And than everythingService.findAllStandardFeatures() (or other 
function) shoud get access to the

 field selectedItem.
Possible you need to create your own new IDataProvider.


Cheers,

Oleg.


am 23 August 2007 um 09:08 schrieben Sie:

 

Hi



 
I have a page where theres two dropdownchoices and two panels 
acordingly. when you click dropdown a and select a new item 
panel a should be updated to the new item, I've used 
ajaxformComponentupdatingbehavior( have also tried 
ajaxformsubmittingbehavior).



 
However it seems as the model of the dropdown are never 
updated, im using compoundpropertymodel (have also tried 
reverting and just using a

simple model).



 
I just cant figure out whats wrong. Please take a look any 
hints will be

appreciated



 

http://papernapkin.org/pastebin/view/1386





 
Havent had the chance yet to tryout beta 3, not sure if its 
gone there.



 

regards Nino



 
- 


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





  


- 


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




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




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




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

Re: Newbie questions

2007-08-24 Thread Igor Vaynberg
On 8/24/07, Alex Shneyderman [EMAIL PROTECTED] wrote:

 I wonder if there is any documentation as to how the rendering process
 works

 How do I go from Component graph - html associated with the page?


the basic answer is that wicket traverses the component graph and calls
various render methods on the components, which then output the markup.


 And
 what is the model's role there.


i assume you are referring to component.get/setmodel(). this is a default
model slot that all components have. its use varies per component. for
example label uses the default model slot to get the string it will replace
its body with. listview uses it to retrieve a list of items it will use to
populate itself. link doesnt use it at all - allowing the user to put their
own model into it which is then easy to retrieve inside the onclick event.

as your questions get more specific so will the answers :)

I have been reading and re-reading the
 getting started manual, unfortunately it is an extremely incomplete
 document, so it is of a very limited use, although I appreciate the
 intention.


we depend on our users to make it better.

Thanks in advance for any pointers and explanations.


-igor


--
 Thanks,
 Alex.

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




Re: [Wicket-user] Wicket in Action now available through Manning Early Access Program

2007-08-24 Thread Eelco Hillenius
On 8/24/07, Swaroop Belur [EMAIL PROTECTED] wrote:
 Well, i had the same bad luck as  India is not in the choice.
 They asked me to get a paypal account

Great. Largest software country in the world by now? So does it work
with paypal then? For all countries?

Eelco

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



Re: Component Factory and code against interface

2007-08-24 Thread Eelco Hillenius
On 8/24/07, Johan Compagner [EMAIL PROTECTED] wrote:
 We can do that because all our components implement specific interfaces
 which changes
 the state of the component.  For example

 interface ILabelMethods
 {
setBackground(Color color)
setForeground(Color color)
// and so on
 }

 and all those implementations do record the change

On top of that, it might help to override the updateModel
implementations of form components to determine whether you have
changes?

Eelco

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



Re: Component Factory and code against interface

2007-08-24 Thread Sam Hough

Igor,

We are not really trying to make it portable or our own abstraction. The aim
would be a subset of the non-ajax Wicket API. In my comfortable ignorance it
is a nice way to keep track of dirty components, hide details of
ajax/non-ajax and let our tech lead keep firm control over which bits of
wicket we use.

I'm totally with you that this could turn into a real pain. Container
systems like EJB2, Swing etc suggest it can go horribly wrong.


igor.vaynberg wrote:
 
 the ui layer is generally not portable. if you start building your own
 abstraction to make it portable you will end up with a pretty big mess
 because you will be working against whatever framework you are using and
 eventually that abstraction will turn into a framework itself.
 
 -igor
 
 
 On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote:


 Many thanks Igor, that sounds like a very pragmatic approach. I was
 thinking
 about all sorts of horrible kludges like re-rendering the whole page and
 seeing how elements changed or hooking into the serialisation.

 Taken away another reason to do my over complicated solution ;) Am I
 worrying over nothing that developers might get carried away using vast
 number of components and fiddling with attributes that will make the
 application difficult to test and maybe one day port? Restricting the set
 of
 components can presumably end up with a more consistent UI...

 Anyway, thanks for all your time and sage advice.

 --
 View this message in context:
 http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12308606
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12317759
Sent from the Wicket - User mailing list archive at Nabble.com.


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



AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Patrick Angeles

I noticed this in the examples:

http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.AjaxDataTablePage

Changing the sort order does not seem to take you to the first page... I
stepped through the code, and it looks like it should work. Any ideas on how
to get this to work? Here's the relevant snippet from HeadersToolbar:

protected WebMarkupContainer newSortableHeader(String headerId, String
property,
ISortStateLocator locator)
{
return new OrderByBorder(headerId, property, locator)
{

private static final long serialVersionUID = 1L;

protected void onSortChanged()
{
getTable().setCurrentPage(0);
}
};

}

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12318280
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DataView and onComponentTag

2007-08-24 Thread Eelco Hillenius
On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 dataview doesnt have its own markup, it delegates it to its direct children.
 so you want to put that oncomponenttag into the item the dataview creates.
 override dataview.newitem() and override oncomponenttag on the returned
 item.

It would probably be a good idea to make that method final in repeaters, right?

Eelco

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



Re: DataView and onComponentTag

2007-08-24 Thread Igor Vaynberg
or we can forward the call to the repeatermore intuitive for newbies
less intuitive for the rest :)

-igor


On 8/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  dataview doesnt have its own markup, it delegates it to its direct
 children.
  so you want to put that oncomponenttag into the item the dataview
 creates.
  override dataview.newitem() and override oncomponenttag on the returned
  item.

 It would probably be a good idea to make that method final in repeaters,
 right?

 Eelco

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




Re: DataView and onComponentTag

2007-08-24 Thread Eelco Hillenius
On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 or we can forward the call to the repeatermore intuitive for newbies
 less intuitive for the rest :)

The items would forward the calls? Hmmm. Sounds a bit dangerous/ confusing.

Eelco

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



DataView and onComponentTag

2007-08-24 Thread Johannes Schneider

Hi,


I use a DataView to create a list (ulli). The DataView is used to 
render the li-tags. Now I try to add a custom id value to the li tag 
if some circumstances are fulfilled:


  @Override
  protected void onComponentTag( @NotNull ComponentTag tag ) {
super.onComponentTag( tag );
IteratorItem items = getItems();
while ( items.hasNext() ) {
  Item item = items.next();
  if ( //some magic here with item.getModelObject() ) {
tag.put( id, theIdValue );
  }
}
  }


But the method onComponentTag in DataView is never called... Any 
suggestions?



Thanks,

Johannes Schneider
--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info


smime.p7s
Description: S/MIME Cryptographic Signature


Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Igor Vaynberg
oh, and btw

http://wicketstuff.org/wicket13 is where the live examples are.
wicket-library isnt maintained and hasnt been for a while, not sure why its
still up and running.

-igor


On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 thanks, fixed in trunk

 -igor


 On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 
 
  I noticed this in the examples:
 
 
  http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.AjaxDataTablePage
 
  Changing the sort order does not seem to take you to the first page... I
  stepped through the code, and it looks like it should work. Any ideas on
  how
  to get this to work? Here's the relevant snippet from HeadersToolbar:
 
  protected WebMarkupContainer newSortableHeader(String headerId,
  String
  property,
  ISortStateLocator locator)
  {
  return new OrderByBorder(headerId, property, locator)
  {
 
  private static final long serialVersionUID = 1L;
 
 
  protected void onSortChanged()
  {
  getTable().setCurrentPage(0);
  }
  };
 
  }
 
  --
  View this message in context: 
  http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12318280
 
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: DataView and onComponentTag

2007-08-24 Thread Johannes Schneider

Thanks,

I will try that. And please make those methods final...


Regardy,

Johannes Schneider

Igor Vaynberg wrote:

dataview doesnt have its own markup, it delegates it to its direct children.
so you want to put that oncomponenttag into the item the dataview creates.
override dataview.newitem() and override oncomponenttag on the returned
item.

-igor


On 8/24/07, Johannes Schneider [EMAIL PROTECTED] wrote:

Hi,


I use a DataView to create a list (ulli). The DataView is used to
render the li-tags. Now I try to add a custom id value to the li tag
if some circumstances are fulfilled:

   @Override
   protected void onComponentTag( @NotNull ComponentTag tag ) {
 super.onComponentTag( tag );
 IteratorItem items = getItems();
 while ( items.hasNext() ) {
   Item item = items.next();
   if ( //some magic here with item.getModelObject() ) {
 tag.put( id, theIdValue );
   }
 }
   }


But the method onComponentTag in DataView is never called... Any
suggestions?


Thanks,

Johannes Schneider
--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info






--
Johannes Schneider
Im Lindenwasen 15
72810 Gomaringen

Fon +49 7072 9229972
Fax +49 7072 50
Mobil +49 178 1364488

[EMAIL PROTECTED]
http://www.johannes-schneider.info


smime.p7s
Description: S/MIME Cryptographic Signature


Ajax version of DropDownChice/Select

2007-08-24 Thread Oleg Taranenko




Hi * *,

I can not find subj neither in wicket nor in extensions codabases.
Must I write it or there is a workaround (AjaxLink?)

Cheers,

Oleg






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



Re: Ajax version of DropDownChice/Select

2007-08-24 Thread Igor Vaynberg
you didnt look very hard than

http://wicketstuff.org/wicket13/ajax/choice.1

-igor


On 8/24/07, Oleg Taranenko [EMAIL PROTECTED] wrote:

  Hi * *,


 I can not find subj neither in wicket nor in extensions codabases.

 Must I write it or there is a workaround (AjaxLink?)


 Cheers,


 Oleg



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


Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Igor Vaynberg
i think it has been fixed since then. at least snapshots at
wicketstuff.org/wicket13 appear to be working fine.

-igor

On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:


 1.3-beta2


 igor.vaynberg wrote:
 
  i believe this was fixed a long time ago, what version are you seeing
 this
  with?
 
  -igor
 
 
  On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 
 
  That was fast :)
 
  Also, while we're on it, I just noticed that the NavigationToolbar text
  is
  off. For a list of 50 items with a pagesize of 5, it says: Showing 1
 to
  6
  of 50 (should say Showing 1 to 5 of 50).
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320251
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320800
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Patrick Angeles

I'm not that intrepid so I think I'll just wait until beta3 to get those
fixes.

The extensions AjaxFallbackDefaultDataTable and related classes are
extremely nice, btw. It's allowed me to quickly set up list paging and
sorting in a way that would have taken me days using any other web
framework.

I do have some requests for refinement:

1. It'd be nice to have hard (not runtime generated) CSS classes or ids on
HTML elements for components like the NavigatorToolbar, etc. to allow for
easy styling via CSS. Something similar to the OddEvenItem concept applied
to the page links in the toolbar. I've found a way to style those links, but
it could be made easier.

2. Some way to hard-set the width for each column. It's visually distracting
to have the column widths change as you page through. This might be done via
CSS (maybe give each column a class or id) but this could also be done in
Java, for example:

ListIColumn columns = new ArrayListIColumn ();
columns.add (new SizedPropertyColumn (new Model (ID), id, id,
20%)) ;
columns.add (new SizedPropertyColumn (new Model (First Name),
firstName, firstName, 40%)) ;
columns.add (new SizedPropertyColumn (new Model (Last Name),
lastName, lastName, 40%)) ;

I'm still a newb, so I'm not sure which way is the wicket way...

Thanks,
- P


igor.vaynberg wrote:
 
 i think it has been fixed since then. at least snapshots at
 wicketstuff.org/wicket13 appear to be working fine.
 
 -igor
 
 On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:


 1.3-beta2


 igor.vaynberg wrote:
 
  i believe this was fixed a long time ago, what version are you seeing
 this
  with?
 
  -igor
 
 
  On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 
 
  That was fast :)
 
  Also, while we're on it, I just noticed that the NavigationToolbar
 text
  is
  off. For a list of 50 items with a pagesize of 5, it says: Showing 1
 to
  6
  of 50 (should say Showing 1 to 5 of 50).
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320251
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320800
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12321602
Sent from the Wicket - User mailing list archive at Nabble.com.


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