Re: New bie question . Custom Form Submit

2012-02-16 Thread Sven Meier
You cannot just invoke process(), the browser has to send the input 
values via form submit. This is what the SubmitLink does for you.


Sven


Am 16.02.2012 08:52, schrieb atomix:

Ahh Thanks again... I didn't khow that the SubmitLink can be outside of a
Form ...
...but IMO , why can't another thing call a Form to be submit ...
like calling process()= what does this method really doing, why don't it
update all the models??

Thank for answer my silly questions. Wish you a good day!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/New-bie-question-Custom-Form-Submit-tp4392995p4393213.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Updating a component from custom thread or why getRequestCycle returns null

2012-02-16 Thread BayPhilip
Hello, everybody. Here is the situation I'm facing last weeks. I have an
Index class which extends WebPage. In this Index class I have added a panel,
called MainPanel. I have also a thead which is run from Index. MainPanel is
not created while initialization of Index. MainPanel is created when I click
on AjaxLink. I add MainPanel to Index and also I'm giving this panel to my
thread via addPanel() method. In this panel I have method called
updateCmp(), which method creates AjaxRequestTarget and updates a component
in MainPanel. When I invoke updateCmp() from Index I have no problems, but
when I invoke it from thread I get NPE, because there is no Request attached
to my thread and getRequestCycle returns null. Now I'm updating component
using timer which repeats every second, but I want to remove the timer so I
what to update a component using my thread. How to do this without getting
NPE?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Updating-a-component-from-custom-thread-or-why-getRequestCycle-returns-null-tp4393783p4393783.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread atomix
Hi all ,

I'm using Cayenne as my database service...

Now in a query return a ListPerson

which I want to wrap a whole List in to ( so call)
LoadableDetachableListModels to provide for a ListView, I'm also know that a
DataProvider could do the same thing but did any one have write something
like LoadableDetachableListModels to wrap a generic List and provide to a
ListView... 

Please help!!

I've read 
http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
.. so one entity is fine but
but didn't know very clear what can be use for a List 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread vineet semwal
see listmodel

btw if you have a big list ,use dataview

On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com wrote:
 Hi all ,

 I'm using Cayenne as my database service...

 Now in a query return a ListPerson

 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...

 Please help!!

 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
thank you,

regards,
Vineet Semwal

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread vineet semwal
sorry when i meant if you are going to retrieve a lot of data use dataview

On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
vineetsemwal1...@gmail.com wrote:
 see listmodel

 btw if you have a big list ,use dataview

 On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com 
 wrote:
 Hi all ,

 I'm using Cayenne as my database service...

 Now in a query return a ListPerson

 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...

 Please help!!

 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 thank you,

 regards,
 Vineet Semwal



-- 
thank you,

regards,
Vineet Semwal

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread François Meillet
Hi Vineet,

   public LoadableDetachableModelYourClass load(final Long xxx) {
   
LoadableDetachableModelListYourClass model = new 
LoadableDetachableModelListYourClass() {

protected YourClass load() {
try {

ListYourClass list = get your liste here( xxx )

return list 

} catch (YourException e) {
   
}
}
};
return model;
}

IModelListYourClass model = load( x );

new ListViewYourClass(id, model) ;



That is ok for a small list.

And if you have to handle large lists, you should use a Dataview with 
DataProvider.

François 





Le 16 févr. 2012 à 15:53, vineet semwal a écrit :

 sorry when i meant if you are going to retrieve a lot of data use dataview
 
 On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 see listmodel
 
 btw if you have a big list ,use dataview
 
 On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com 
 wrote:
 Hi all ,
 
 I'm using Cayenne as my database service...
 
 Now in a query return a ListPerson
 
 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...
 
 Please help!!
 
 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 thank you,
 
 regards,
 Vineet Semwal
 
 
 
 -- 
 thank you,
 
 regards,
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread Francois Meillet
Hi Vineet,

  public LoadableDetachableModelYourClass load(final Long xxx) {

   LoadableDetachableModelListYourClass model = new 
LoadableDetachableModelListYourClass() {

   protected YourClass load() {
   try {

   ListYourClass list = get your liste here( xxx )

   return list 

   } catch (YourException e) {

   }
   }
   };
   return model;
   }

IModelListYourClass model = load( x );

new ListViewYourClass(id, model) ;



That is ok for a small list.

And if you have to handle large lists, you should use a Dataview with 
DataProvider.

François 
Le 16 févr. 2012 à 15:53, vineet semwal a écrit :

 sorry when i meant if you are going to retrieve a lot of data use dataview
 
 On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
 vineetsemwal1...@gmail.com wrote:
 see listmodel
 
 btw if you have a big list ,use dataview
 
 On Thu, Feb 16, 2012 at 8:14 PM, atomix say_i_love_you_4e...@yahoo.com 
 wrote:
 Hi all ,
 
 I'm using Cayenne as my database service...
 
 Now in a query return a ListPerson
 
 which I want to wrap a whole List in to ( so call)
 LoadableDetachableListModels to provide for a ListView, I'm also know that a
 DataProvider could do the same thing but did any one have write something
 like LoadableDetachableListModels to wrap a generic List and provide to a
 ListView...
 
 Please help!!
 
 I've read
 http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
 .. so one entity is fine but
 but didn't know very clear what can be use for a List
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 --
 thank you,
 
 regards,
 Vineet Semwal
 
 
 
 -- 
 thank you,
 
 regards,
 Vineet Semwal
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AbstractPageableView cachedItemCount

2012-02-16 Thread Jonathan Tougas
It should be discarded only before rendering.

I figured out  a way to accomplish this by extending the DataTable class
and creating a wrapper for the data provider with a cache of it's own,
which bypasses the AbstractPageableView's size cache. This one is cleared
by the extension of DataTable before rendering like I'm suggesting:

public class SuperTableT extends DataTableT {

 private SuperDataProviderWrapperT dataProviderWrapper;
 public SuperTable( String id, ListIColumnT columns,
SuperDataProviderWrapperT dataProviderWrapper, int rowsPerPage ) {
super( id, columns, dataProviderWrapper, rowsPerPage );
 this.dataProviderWrapper = dataProviderWrapper;
setOutputMarkupId( true );
 setVersioned( false );
addTopToolbar( new AjaxNavigationToolbar( this ) );
 addTopToolbar( new AjaxFallbackHeadersToolbar( this, dataProviderWrapper )
);
addBottomToolbar( new NoRecordsToolbar( this ) );
 }

@Override
protected ItemT newRowItem( final String id, final int index, final
IModelT model ) {
 return new OddEvenItemT( id, index, model );
}
 @Override
protected void onBeforeRender() {
// reset size before rendering!
 dataProviderWrapper.resetSize();
super.onBeforeRender();
}
}

public class SuperDataProviderWrapperT implements
ISortableDataProviderT {

 private ISortableDataProviderT delegate;
private int size;
 public SuperDataProviderWrapper( ISortableDataProviderT delegate ) {
this.delegate = delegate;
 resetSize();
}

@Override
public int size() {
 if( size == -1 ) {
size = delegate.size();
}
 return size;
}

public void resetSize() {
 size = -1;
}
/*snip delegations...*/
}

End result is one call to count when the ajax links are clicked instead of
two.

On Wed, Feb 15, 2012 at 7:33 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 so when should it be discarded?

 -igor

 On Wed, Feb 15, 2012 at 4:25 PM, Jonathan Tougas jtou...@gmail.com
 wrote:
  The cachedItemCount calculated in onBeforeRender should not be discarded
 at
  the end of a request (so the clear in onDetach and readObject shouldn't
 be
  there). This way it would still be around when a request comes in to
 handle
  a click.
 
  On Wed, Feb 15, 2012 at 5:19 PM, Dan Retzlaff dretzl...@gmail.com
 wrote:
 
  Thanks for the clarification. I see your point now: if records are
 deleted
  from the database, the navigation click is ignored an the page is simply
  re-rendered. But if the data content has changed such that the
 navigation
  no longer makes sense, what behavior would you prefer?
 
  On Wed, Feb 15, 2012 at 1:37 PM, Jonathan Tougas jtou...@gmail.com
  wrote:
 
   The PagingNavigationIncrementLink's linksTo(Page), which calls
 isLast()
   which calls pageable getPageCount() which ends up calling size()
   eventually. This is called during Component.canCallListenerInterface
   (*you're
   right it's not isVisible*) to verify if the link can indeed be
 clicked.
  
   And to be clear I am discussing multiple size() calls in one request.
 It
   happens when clicking on the navigation links: size() is called first
 as
   part of the verifying if the link is enabled (as described above),
 then
  the
   cached value is discarded just before rendering (in onBeforeRender()).
  Then
   size() is called again as part of the rendering, and again cached. The
   cached value is again discarded at the end of the request in
 onDetach().
   What I'm saying is the the first size() shouldn't occur because the
 page
   count should be cached from the previous rendering (it shouldn't be
  cleared
   in onDetach() nor readObject()).
  
   On Wed, Feb 15, 2012 at 1:09 PM, Dan Retzlaff dretzl...@gmail.com
  wrote:
  
Hi, Jonathan. Which component are you referring to? I don't see
   isVisible()
overrides in PagingNavigator or its helpers.
   
   
 It's state and as such should not be discarded when
 the request is finished, it's still needed for things like
 checking
  if
   a
 link was indeed visible when a click comes in for it.
   
   
How can you receive a click event for a link that was not visible?
Invisible components aren't rendered.
   
That JIRA discusses multiple size() calls in a single request.
 You're
discussing multiple size() calls with multiple requests. Right?
   
Dan
   
On Wed, Feb 15, 2012 at 9:31 AM, Jonathan Tougas jtou...@gmail.com
 
wrote:
   
 I noticed two count queries go by when using the DataTable
 component.
   so
I
 searched and dug up this jira issue
 https://issues.apache.org/jira/browse/WICKET-1766 which is a
 won't
fix.

 Igor states that two queries are required each request, but I see
  this
 differently:

 The count is a used as the basis for the paging navigator's
   isVisible(),
so
 far so good. The issue is that the count is discarded in
 onDetach()
  (as
 well as readObject()). It's state and as such should not be
 discarded
when
 the request is finished, it's still needed for things like
 checking
  if
   a
 

Re: AbstractPageableView cachedItemCount

2012-02-16 Thread Igor Vaynberg
suppose you have a label before the data table that shows how many
items are in the table. it uses datatable.getitemcount() to do this.

onbeforerender() will be called on the label before it is on the
datatable so it now uses the stale item count and is out of sync with
the datatable.

-igor

On Thu, Feb 16, 2012 at 9:08 AM, Jonathan Tougas jtou...@gmail.com wrote:
 It should be discarded only before rendering.

 I figured out  a way to accomplish this by extending the DataTable class
 and creating a wrapper for the data provider with a cache of it's own,
 which bypasses the AbstractPageableView's size cache. This one is cleared
 by the extension of DataTable before rendering like I'm suggesting:

 public class SuperTableT extends DataTableT {

  private SuperDataProviderWrapperT dataProviderWrapper;
  public SuperTable( String id, ListIColumnT columns,
 SuperDataProviderWrapperT dataProviderWrapper, int rowsPerPage ) {
 super( id, columns, dataProviderWrapper, rowsPerPage );
  this.dataProviderWrapper = dataProviderWrapper;
 setOutputMarkupId( true );
  setVersioned( false );
 addTopToolbar( new AjaxNavigationToolbar( this ) );
  addTopToolbar( new AjaxFallbackHeadersToolbar( this, dataProviderWrapper )
 );
 addBottomToolbar( new NoRecordsToolbar( this ) );
  }

 @Override
 protected ItemT newRowItem( final String id, final int index, final
 IModelT model ) {
  return new OddEvenItemT( id, index, model );
 }
  @Override
 protected void onBeforeRender() {
 // reset size before rendering!
  dataProviderWrapper.resetSize();
 super.onBeforeRender();
 }
 }

 public class SuperDataProviderWrapperT implements
 ISortableDataProviderT {

  private ISortableDataProviderT delegate;
 private int size;
  public SuperDataProviderWrapper( ISortableDataProviderT delegate ) {
 this.delegate = delegate;
  resetSize();
 }

 @Override
 public int size() {
  if( size == -1 ) {
 size = delegate.size();
 }
  return size;
 }

 public void resetSize() {
  size = -1;
 }
        /*snip delegations...*/
 }

 End result is one call to count when the ajax links are clicked instead of
 two.

 On Wed, Feb 15, 2012 at 7:33 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 so when should it be discarded?

 -igor

 On Wed, Feb 15, 2012 at 4:25 PM, Jonathan Tougas jtou...@gmail.com
 wrote:
  The cachedItemCount calculated in onBeforeRender should not be discarded
 at
  the end of a request (so the clear in onDetach and readObject shouldn't
 be
  there). This way it would still be around when a request comes in to
 handle
  a click.
 
  On Wed, Feb 15, 2012 at 5:19 PM, Dan Retzlaff dretzl...@gmail.com
 wrote:
 
  Thanks for the clarification. I see your point now: if records are
 deleted
  from the database, the navigation click is ignored an the page is simply
  re-rendered. But if the data content has changed such that the
 navigation
  no longer makes sense, what behavior would you prefer?
 
  On Wed, Feb 15, 2012 at 1:37 PM, Jonathan Tougas jtou...@gmail.com
  wrote:
 
   The PagingNavigationIncrementLink's linksTo(Page), which calls
 isLast()
   which calls pageable getPageCount() which ends up calling size()
   eventually. This is called during Component.canCallListenerInterface
   (*you're
   right it's not isVisible*) to verify if the link can indeed be
 clicked.
  
   And to be clear I am discussing multiple size() calls in one request.
 It
   happens when clicking on the navigation links: size() is called first
 as
   part of the verifying if the link is enabled (as described above),
 then
  the
   cached value is discarded just before rendering (in onBeforeRender()).
  Then
   size() is called again as part of the rendering, and again cached. The
   cached value is again discarded at the end of the request in
 onDetach().
   What I'm saying is the the first size() shouldn't occur because the
 page
   count should be cached from the previous rendering (it shouldn't be
  cleared
   in onDetach() nor readObject()).
  
   On Wed, Feb 15, 2012 at 1:09 PM, Dan Retzlaff dretzl...@gmail.com
  wrote:
  
Hi, Jonathan. Which component are you referring to? I don't see
   isVisible()
overrides in PagingNavigator or its helpers.
   
   
 It's state and as such should not be discarded when
 the request is finished, it's still needed for things like
 checking
  if
   a
 link was indeed visible when a click comes in for it.
   
   
How can you receive a click event for a link that was not visible?
Invisible components aren't rendered.
   
That JIRA discusses multiple size() calls in a single request.
 You're
discussing multiple size() calls with multiple requests. Right?
   
Dan
   
On Wed, Feb 15, 2012 at 9:31 AM, Jonathan Tougas jtou...@gmail.com
 
wrote:
   
 I noticed two count queries go by when using the DataTable
 component.
   so
I
 searched and dug up this jira issue
 https://issues.apache.org/jira/browse/WICKET-1766 which is a
 won't
fix.

 Igor states that 

Slow rendering

2012-02-16 Thread Jürgen Lind

Hi there,

I am currently encountering a problem that I don't know how to attack... We have
developed an application that uses the Tree-Component to show hierarchical data
to the user. In some cases, the tree degenerates to a plain list that can be 
quite
large. Now, if the list has around 1000 entries, the rendering phase for the 
tree
takes approx. 1 second, which seems to be ok. For 2500 entries, the rendering 
time
goes up to around 11 seconds and with 5000 entries, we're looking at approx. 30
seconds.

Now, I would like to find out, which part of the component tree causes these 
huge
numbers, but I have run out of ideas on how to track down these numbers. The 
last
point I was able to measure was between onBeforeRender and onAfterRender of my
subclassed LabelTree component.

Any suggestions on how to instrument my application without building a custom 
wicket
package?

Kind Regards,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Slow rendering

2012-02-16 Thread Christian Huber

Hi Jürgen,

I just had a quick glance at the Component and MarkupContainer classes 
and if I am not mistaken you should be able to override onRender() and 
onComponentTag() which would give you a few more measuring points and 
maybe more pointers on where to look further.


HTH, Christian


The Sanity Resort http://sanityresort.blogspot.com/

Am 16.02.2012 19:50, schrieb Jürgen Lind:

Hi there,

I am currently encountering a problem that I don't know how to 
attack... We have
developed an application that uses the Tree-Component to show 
hierarchical data
to the user. In some cases, the tree degenerates to a plain list that 
can be quite
large. Now, if the list has around 1000 entries, the rendering phase 
for the tree
takes approx. 1 second, which seems to be ok. For 2500 entries, the 
rendering time
goes up to around 11 seconds and with 5000 entries, we're looking at 
approx. 30

seconds.

Now, I would like to find out, which part of the component tree causes 
these huge
numbers, but I have run out of ideas on how to track down these 
numbers. The last
point I was able to measure was between onBeforeRender and 
onAfterRender of my

subclassed LabelTree component.

Any suggestions on how to instrument my application without building a 
custom wicket

package?

Kind Regards,

J.



Re: Slow rendering

2012-02-16 Thread Igor Vaynberg
why is your tree rendering all the nodes ahead of time? shouldnt it
render them lazily as they are expanded?

-igor

On Thu, Feb 16, 2012 at 10:50 AM, Jürgen Lind juergen.l...@iteratec.de wrote:
 Hi there,

 I am currently encountering a problem that I don't know how to attack... We
 have
 developed an application that uses the Tree-Component to show hierarchical
 data
 to the user. In some cases, the tree degenerates to a plain list that can be
 quite
 large. Now, if the list has around 1000 entries, the rendering phase for the
 tree
 takes approx. 1 second, which seems to be ok. For 2500 entries, the
 rendering time
 goes up to around 11 seconds and with 5000 entries, we're looking at approx.
 30
 seconds.

 Now, I would like to find out, which part of the component tree causes these
 huge
 numbers, but I have run out of ideas on how to track down these numbers. The
 last
 point I was able to measure was between onBeforeRender and onAfterRender of
 my
 subclassed LabelTree component.

 Any suggestions on how to instrument my application without building a
 custom wicket
 package?

 Kind Regards,

 J.

 --
 Dr. Jürgen Lind
 iteratec GmbH                Fon: +49 (0)89 614551-44
 Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
 82008 Unterhaching           Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Slow rendering

2012-02-16 Thread Jürgen Lind

Hi,

as I was saying in the original post, in rare cases the tree degenerates to a 
plain
list - i.e a tree with one (hidden) root node and up to 5000 children that are 
rendered
at the same time. Please do not ask me, why our customer would want that - it 
is how
it is for the time being ;-)

J.


On 16.02.2012 21:13, Igor Vaynberg wrote:

why is your tree rendering all the nodes ahead of time? shouldnt it
render them lazily as they are expanded?

-igor

On Thu, Feb 16, 2012 at 10:50 AM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi there,

I am currently encountering a problem that I don't know how to attack... We
have
developed an application that uses the Tree-Component to show hierarchical
data
to the user. In some cases, the tree degenerates to a plain list that can be
quite
large. Now, if the list has around 1000 entries, the rendering phase for the
tree
takes approx. 1 second, which seems to be ok. For 2500 entries, the
rendering time
goes up to around 11 seconds and with 5000 entries, we're looking at approx.
30
seconds.

Now, I would like to find out, which part of the component tree causes these
huge
numbers, but I have run out of ideas on how to track down these numbers. The
last
point I was able to measure was between onBeforeRender and onAfterRender of
my
subclassed LabelTree component.

Any suggestions on how to instrument my application without building a
custom wicket
package?

Kind Regards,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Slow rendering

2012-02-16 Thread Pamir Erdem
I'm so sorry but i could not understand the question. If it is in server
side than you can instrument it with JProfiler or JxInsight.
If it is on client side dynaTrace can help you or even google chrome
javascript can help you to detect the problem

On Thu, Feb 16, 2012 at 10:42 PM, Jürgen Lind juergen.l...@iteratec.dewrote:

 Hi,

 as I was saying in the original post, in rare cases the tree degenerates
 to a plain
 list - i.e a tree with one (hidden) root node and up to 5000 children that
 are rendered
 at the same time. Please do not ask me, why our customer would want that -
 it is how
 it is for the time being ;-)

 J.


 On 16.02.2012 21:13, Igor Vaynberg wrote:

 why is your tree rendering all the nodes ahead of time? shouldnt it
 render them lazily as they are expanded?

 -igor

 On Thu, Feb 16, 2012 at 10:50 AM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:

 Hi there,

 I am currently encountering a problem that I don't know how to attack...
 We
 have
 developed an application that uses the Tree-Component to show
 hierarchical
 data
 to the user. In some cases, the tree degenerates to a plain list that
 can be
 quite
 large. Now, if the list has around 1000 entries, the rendering phase for
 the
 tree
 takes approx. 1 second, which seems to be ok. For 2500 entries, the
 rendering time
 goes up to around 11 seconds and with 5000 entries, we're looking at
 approx.
 30
 seconds.

 Now, I would like to find out, which part of the component tree causes
 these
 huge
 numbers, but I have run out of ideas on how to track down these numbers.
 The
 last
 point I was able to measure was between onBeforeRender and onAfterRender
 of
 my
 subclassed LabelTree component.

 Any suggestions on how to instrument my application without building a
 custom wicket
 package?

 Kind Regards,

 J.

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

 --**--**
 -
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 Mit freundlichen Grüßen,

 Jürgen Lind

 --
 Dr. Jürgen Lind
 iteratec GmbHFon: +49 (0)89 614551-44
 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
 82008 Unterhaching   Web: www.iteratec.de

 Sitz und Registergericht der iteratec GmbH: München HRB 113 519
 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Pamir Erdem


1.5.4 error handling with web.xml error-page issue

2012-02-16 Thread pkc
Am I missing something simple?  I tried about 100 misc trial and error things
to get this to use my wicket page to handle 404's (and other errors).

filter-mapping
filter-namewicket/filter-name
url-pattern/*/url-pattern
/filter-mapping
error-page
exception-typeException/exception-type
location/ErrorPage/location
/error-page
error-page
error-code404/error-code
location/ErrorPage/location
/error-page

public class ErrorPage extends WebPage
{
  private static final long serialVersionUID = 1L;

  public ErrorPage(PageParameters parameters)
  {
  } 
  @Override
  public boolean isErrorPage() {
  return true;
  }
}

public class MainApp extends WebApplication {
  
  @Override
  public void init()
  {
super.init();
mountPage(ErrorPage, ErrorPage.class);
...
}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4395935.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Veil behavior of wicketstuff-minis

2012-02-16 Thread matteus
I succeeded to solve my problem. I found the site
https://cwiki.apache.org/WICKET/generic-busy-indicator-for-both-ajax-and-non-ajax-submits.html
 
where shows an example of ajax and non ajax button to put the veil . Then I
created the files. Css and. Js with these samples and placed in the same
directory of my. Java. Then in my java page I added this:

private static final CompressedResourceReference MYPAGE_JS = new
CompressedResourceReference (Index.class, veil.js);

private static final CompressedResourceReference MYPAGE_CSS = new
CompressedResourceReference (Index.class, veil.css);

To reference the css and javascript.

Then just add it to your page

add (JavascriptPackageResource.getHeaderContribution (MYPAGE_JS));

 add (CSSPackageResource.getHeaderContribution (MYPAGE_CSS));

and this html:

div id=bysy_indicator / div

works for ajax and non ajax Button



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Veil-behavior-of-wicketstuff-minis-tp2228127p4395959.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Updating a component from custom thread or why getRequestCycle returns null

2012-02-16 Thread robmcguinness
there are many examples in this forum, but here is something I wrote a while
back that passes thread locals (user info in this example) to the new thread
and when the thread is done doing work, the ui repaints with data from
thread.

https://gist.github.com/706011

use it as a guide and make it your own. good luck.

rob




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Updating-a-component-from-custom-thread-or-why-getRequestCycle-returns-null-tp4393783p4395980.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: 1.5.4 error handling with web.xml error-page issue

2012-02-16 Thread robmcguinness
not sure if the */* matters when you mount the url.


mountPage(/ErrorPage, ErrorPage.class); 


rob

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4395984.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: how to do i18n of javascript file with Wicket?

2012-02-16 Thread infiniter
I have the exact same issue.. What did you decide for your problem?
I'm trying to decide now what the best approach is. Two of my options were
exactly the ones you describe to improve your design, but the one that I
currently have is a template, which looks like this:

var someData= {
   'msg'='${message:hello}';
   'a'='${message:min}';
   'b'='${message:max}';
}

The nasty part is that for each JS template you have to create your
variables model, which is just a hashmap. I have a simple function that
looks like:

addMessageToVariablesMap(variablesMap, min);

I don't like having to provide a variables model to get the messages, but
instead I'd like to make the message-resolving part automatic just like
wicket:message in the markup files. I still haven't done that. 

Ideas are welcome.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-do-i18n-of-javascript-file-with-Wicket-tp1867123p4396038.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: 1.5.4 error handling with web.xml error-page issue

2012-02-16 Thread pkc
I have no idea if this is documented and why it is needed but it works after
changing web.xml to

filter-mapping
  filter-namewicket/filter-name
  url-pattern/*/url-pattern
  dispatcherREQUEST/dispatcher
  dispatcherERROR/dispatcher
/filter-mapping


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-4-error-handling-with-web-xml-error-page-issue-tp4395935p4396055.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org