CheckGroup question

2012-06-10 Thread Jürgen Lind

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



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



Re: CheckGroup question

2012-06-10 Thread Jürgen Lind

Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



-
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: CheckGroup question

2012-06-10 Thread Jürgen Lind

Thanks for the hint. Unfortunately, I was incorrect in my initial post: it is 
not a
ListView but a DataView I am using within the form. Is there a similar 
mechanism for
this case?

J.

On 10.06.2012 12:40, Sven Meier wrote:

See ListView#setReuseItems()

Jürgen Lindjuergen.l...@iteratec.de  schrieb:


Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



-
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



-
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: CheckGroup question

2012-06-10 Thread Jürgen Lind

Ah, thanks. Simply using ReuseIfModelsEqualStrategy did it...

J.

On 10.06.2012 13:48, Sven Meier wrote:

DataView has an IItemReuseStrategy.

Sven

Jürgen Lindjuergen.l...@iteratec.de  schrieb:


Thanks for the hint. Unfortunately, I was incorrect in my initial post: it is 
not a
ListView but a DataView I am using within the form. Is there a similar 
mechanism for
this case?

J.

On 10.06.2012 12:40, Sven Meier wrote:

See ListView#setReuseItems()

Jürgen Lindjuergen.l...@iteratec.de   schrieb:


Ok, I'm answering myself here... The problem was obviously, that upon each 
render
the Check components had new values and so the state was not cleanly 
maintained. I kind
of solved it by overriding the getValue methode and providing a unique id that 
remains
the same on each page rendering.

However, I still wonder if that is the way to go or just weird hack which 
solves the
problem more or less by coincidence.

Any help would be appreciated.

J.

On 10.06.2012 12:21, Jürgen Lind wrote:

Hi,

I have a little problem in getting a CheckGroup to work... The setup is as 
follows:
the page has a Form with a CheckGroup that contains a ListView where each list 
item
adds a Check component - giving me a bulk select mechanism. Now, everything 
works
great if the form is submitted successfully. However, when a required TextField 
is
omitted, the selected Checks are not maintained (whereas other form fields are
maintained). Am I missing something here?

Cheers,

J.



-
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



-
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


B�CB��[��X��ܚX�KK[XZ[�\�\��][��X��ܚX�P�X��]�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\��Z[�X��]�\X�K�ܙ�B�


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



Re: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Jürgen Lind

Thomas,

thanks for this hint, didn't know about that... So the script is executed every 
time the
component is updated in an ajax call, correct? If so, it would surely solve 
some of my
issues. For longer scripts, I would still prefer to have them in the markup 
file (might be
different if we had multiline strings in Java, btw)

J.

On 04.06.2012 20:32, Thomas Götz wrote:

What about this?


public class MyComponent extends Panel {

 public MyComponent(String id) {
 super(id);
 setOutputMarkupId(true);
 }

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavaScript(
 $('# + getMarkupId() +  .ttr').tipTip({defaultPosition: 
'right'}););
 }

}

-Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:


[…]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
[…]



-
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: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Jürgen Lind

Thanks Martin,

maybe I should have asked before trying to invent my own stuff... Anyway, 
developing
a new wicket tag was some kind of fun as well...

J.

On 04.06.2012 21:10, Martin Grigorov wrote:

On Mon, Jun 4, 2012 at 10:01 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Thomas,

thanks for this hint, didn't know about that... So the script is executed
every time the
component is updated in an ajax call, correct? If so, it would surely solve


For every rerender of the component. That includes non-Ajax (whole
page) requests as well.


some of my
issues. For longer scripts, I would still prefer to have them in the markup
file (might be
different if we had multiline strings in Java, btw)


For longer scripts you can create JS helpers like:

in some.js:
var helper = function(selector) {
   // something longer here
}

is Some.java:

response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););



J.


On 04.06.2012 20:32, Thomas Götz wrote:


What about this?


public class MyComponent extends Panel {

 public MyComponent(String id) {
 super(id);
 setOutputMarkupId(true);
 }

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavaScript(
 $('# + getMarkupId() +  .ttr').tipTip({defaultPosition:
'right'}););
 }

}

-Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:


[…]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
[…]




-
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








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: Component-specific javascript in Ajax-Calls

2012-06-04 Thread Jürgen Lind

Martin,

ok, I will think about going to one of the ideas Thomas suggested. I still like 
the
idea that I have my javascript only in the markup file and nothing in the Java 
class,
though...

Thanks again,

J.


On 04.06.2012 21:25, Martin Grigorov wrote:

On Mon, Jun 4, 2012 at 10:22 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Thanks Martin,

maybe I should have asked before trying to invent my own stuff... Anyway,
developing
a new wicket tag was some kind of fun as well...


I'm glad you have fun but I highly recommend staying away from
IComponentResolver if you can afford that.
Many of the unresolved tickets in Wicket's Jira are related to this.



J.


On 04.06.2012 21:10, Martin Grigorov wrote:


On Mon, Jun 4, 2012 at 10:01 PM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:


Thomas,

thanks for this hint, didn't know about that... So the script is executed
every time the
component is updated in an ajax call, correct? If so, it would surely
solve



For every rerender of the component. That includes non-Ajax (whole
page) requests as well.


some of my
issues. For longer scripts, I would still prefer to have them in the
markup
file (might be
different if we had multiline strings in Java, btw)



For longer scripts you can create JS helpers like:

in some.js:
var helper = function(selector) {
   // something longer here
}

is Some.java:

response.renderOnDomReadyJavaScript(helper($('# + getMarkupId() +'););



J.


On 04.06.2012 20:32, Thomas Götz wrote:



What about this?


public class MyComponent extends Panel {

 public MyComponent(String id) {
 super(id);
 setOutputMarkupId(true);
 }

 @Override
 public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavaScript(
 $('# + getMarkupId() + 
.ttr').tipTip({defaultPosition:
'right'}););
 }

}

-Tom


On 04.06.2012, 19:21 Jürgen Lind wrote:


[…]
  wicket:script
 $(document).ready(function() {
   $(#markupId .ttr).tipTip({defaultPosition: right});
 });
  /wicket:script
[…]





-
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








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







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



Re: Single page wicket app

2012-05-15 Thread Jürgen Lind

What do you mean by large? Many users or many dialogs/components? I have 
developed
three more or less (which means that a new page was only needed when basically 
the entire
structure changed - which occured seldomly) single page apps with wicket and I 
have not
run into real problems. But as Martin mentiones in the next post, the 
Back-Bitton support
is mostly gone...

J.

On 15.05.2012 18:06, bobj wrote:

We are creating a large single page wicket based application using tabs and
ajax to replace portions of the page when needed.

Does anyone know of any large single page wicket apps out there, or any
issues we need to address?

thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-page-wicket-app-tp4634756.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



Re: Force child component enabled

2012-05-10 Thread Jürgen Lind

Since no further replies to this issue came up, the question remains whether this is 
works as
design or a bug. Should I file an issue on this? And could maybe one of the 
developers explain
why the Component#isEnabledInhierarchy is final? After reading some core code, 
I would guess that
maybe overriding that method could achieve the intended behavior...

J.

On 09.05.2012 16:36, Jürgen Lind wrote:

Ok, I stripped down everything to a very basic setup that should work according 
to Martins
suggestions and the wicket documentation. Any ideas why 
canCallListenerInterface is never called
here?

J.

import java.lang.reflect.Method;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;


public class SandboxPage extends WebPage {

public SandboxPage() {
  WebMarkupContainer container = new WebMarkupContainer(container) {
@Override
public boolean isEnabled() {
  return false;
}
  };
  AjaxLinkVoid  link = new AjaxLinkVoid(link) {
@Override
protected boolean isLinkEnabled() {
  System.out.println( le);
  return true;
}

@Override
public boolean canCallListenerInterface(Method method) {
  System.out.println( cc);
  return true;
}

@Override
public boolean isEnabled() {
  System.out.println( ie);
  return true;
}

@Override
public void onClick(AjaxRequestTarget target) {
  System.out.println(clicked...);
}
  };

  container.add(link);
  this.add(container);
}
}

?xml version=1.0 encoding=utf-8?
html
  div wicket:id=container
div wicket:id=linkClick me!/div
  /div
/html


On 09.05.2012 14:29, Jürgen Lind wrote:

Hi Martin,

thanks for the hint, unfortunatly, it does not work :-( I've been looking 
through the relevant
code and the approach seems right, however at some point, the returned values 
seem to be ignored
and the link is still disabled (i.e. the onclick-handler is not rendered)... I 
will have to
investigate further...

J.

On 09.05.2012 13:05, Martin Grigorov wrote:

Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi Martin,

that was my initial approach. However, I would like the collapsible panels
to keep their
state between form submits, therefore I would need some sort of Javascript
state management
or I would simply use ajax links for that purpose. Which is what I would
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have to
go back to JS...

J.


On 09.05.2012 11:16, Martin Grigorov wrote:


Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lindjuergen.l...@iteratec.de
wrote:


Hi,

I have a little problem in my application and maybe someone has an idea
how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write
permission
for the form, the
form is disabled and therefore all input elements as well (which is
good).
However, for
obvious reaons, I would like the collapsible panels to remain enabled.
How
could I achieve
this? I have already tried to have the ajax-link for the panel to always
return true from
isEnabled, but that seems to be overriden by the parent component. Any
ideas
where to look?

Cheers,

Jürgen


-
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










-
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

Re: Force child component enabled

2012-05-10 Thread Jürgen Lind

Hi Martin,

I have created a quickstart and filed an issue (WICKET-4551). Thank you for 
your help.

J.

On 10.05.2012 10:17, Martin Grigorov wrote:

Hi,

I'd say that it is by design.
Component#canCallListenerInterface(Method) has been added recently
because a user wanted its image to be shown in a disabled panel.
File a ticket with a quickstart with the code from your earlier mail
and I'll try to find what is the problem.


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

Since no further replies to this issue came up, the question remains whether
this is works as
design or a bug. Should I file an issue on this? And could maybe one of the
developers explain
why the Component#isEnabledInhierarchy is final? After reading some core
code, I would guess that
maybe overriding that method could achieve the intended behavior...

J.


On 09.05.2012 16:36, Jürgen Lind wrote:


Ok, I stripped down everything to a very basic setup that should work
according to Martins
suggestions and the wicket documentation. Any ideas why
canCallListenerInterface is never called
here?

J.

import java.lang.reflect.Method;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;


public class SandboxPage extends WebPage {

public SandboxPage() {
  WebMarkupContainer container = new WebMarkupContainer(container) {
@Override
public boolean isEnabled() {
  return false;
}
  };
  AjaxLinkVoidlink = new AjaxLinkVoid(link) {
@Override
protected boolean isLinkEnabled() {
  System.out.println( le);
  return true;
}

@Override
public boolean canCallListenerInterface(Method method) {
  System.out.println( cc);
  return true;
}

@Override
public boolean isEnabled() {
  System.out.println( ie);
  return true;
}

@Override
public void onClick(AjaxRequestTarget target) {
  System.out.println(clicked...);
}
  };

  container.add(link);
  this.add(container);
}
}

?xml version=1.0 encoding=utf-8?
html
  div wicket:id=container
div wicket:id=linkClick me!/div
  /div
/html


On 09.05.2012 14:29, Jürgen Lind wrote:


Hi Martin,

thanks for the hint, unfortunatly, it does not work :-( I've been looking
through the relevant
code and the approach seems right, however at some point, the returned
values seem to be ignored
and the link is still disabled (i.e. the onclick-handler is not
rendered)... I will have to
investigate further...

J.

On 09.05.2012 13:05, Martin Grigorov wrote:


Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:


Hi Martin,

that was my initial approach. However, I would like the collapsible
panels
to keep their
state between form submits, therefore I would need some sort of
Javascript
state management
or I would simply use ajax links for that purpose. Which is what I
would
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have
to
go back to JS...

J.


On 09.05.2012 11:16, Martin Grigorov wrote:



Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lindjuergen.l...@iteratec.de
wrote:



Hi,

I have a little problem in my application and maybe someone has an
idea
how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write
permission
for the form, the
form is disabled and therefore all input elements as well (which is
good).
However, for
obvious reaons, I would like the collapsible panels to remain
enabled.
How
could I achieve
this? I have already tried to have the ajax-link for the panel to
always
return true from
isEnabled, but that seems to be overriden by the parent component.
Any
ideas
where to look?

Cheers,

Jürgen


-
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

Force child component enabled

2012-05-09 Thread Jürgen Lind

Hi,

I have a little problem in my application and maybe someone has an idea how to 
solve it:
I have a complex form that is structured using a custom collapsible AJAX-panel 
to show/hide
certain parts of the form. Now, if a user does not have the write permission 
for the form, the
form is disabled and therefore all input elements as well (which is good). 
However, for
obvious reaons, I would like the collapsible panels to remain enabled. How 
could I achieve
this? I have already tried to have the ajax-link for the panel to always return 
true from
isEnabled, but that seems to be overriden by the parent component. Any ideas 
where to look?

Cheers,

Jürgen


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



Re: Force child component enabled

2012-05-09 Thread Jürgen Lind

Hi Martin,

that was my initial approach. However, I would like the collapsible panels to 
keep their
state between form submits, therefore I would need some sort of Javascript 
state management
or I would simply use ajax links for that purpose. Which is what I would 
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have to go 
back to JS...

J.

On 09.05.2012 11:16, Martin Grigorov wrote:

Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

I have a little problem in my application and maybe someone has an idea how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write permission
for the form, the
form is disabled and therefore all input elements as well (which is good).
However, for
obvious reaons, I would like the collapsible panels to remain enabled. How
could I achieve
this? I have already tried to have the ajax-link for the panel to always
return true from
isEnabled, but that seems to be overriden by the parent component. Any ideas
where to look?

Cheers,

Jürgen


-
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: Force child component enabled

2012-05-09 Thread Jürgen Lind

Hi Martin,

thanks for the hint, unfortunatly, it does not work :-( I've been looking 
through the relevant
code and the approach seems right, however at some point, the returned values 
seem to be ignored
and the link is still disabled (i.e. the onclick-handler is not rendered)... I 
will have to
investigate further...

J.

On 09.05.2012 13:05, Martin Grigorov wrote:

Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi Martin,

that was my initial approach. However, I would like the collapsible panels
to keep their
state between form submits, therefore I would need some sort of Javascript
state management
or I would simply use ajax links for that purpose. Which is what I would
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have to
go back to JS...

J.


On 09.05.2012 11:16, Martin Grigorov wrote:


Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:


Hi,

I have a little problem in my application and maybe someone has an idea
how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write
permission
for the form, the
form is disabled and therefore all input elements as well (which is
good).
However, for
obvious reaons, I would like the collapsible panels to remain enabled.
How
could I achieve
this? I have already tried to have the ajax-link for the panel to always
return true from
isEnabled, but that seems to be overriden by the parent component. Any
ideas
where to look?

Cheers,

Jürgen


-
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








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



Re: Force child component enabled

2012-05-09 Thread Jürgen Lind

Ok, I stripped down everything to a very basic setup that should work according 
to Martins
suggestions and the wicket documentation. Any ideas why 
canCallListenerInterface is never called
here?

J.

import java.lang.reflect.Method;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;


public class SandboxPage extends WebPage {

  public SandboxPage() {
WebMarkupContainer container = new WebMarkupContainer(container) {
  @Override
  public boolean isEnabled() {
return false;
  }
};
AjaxLinkVoid link = new AjaxLinkVoid(link) {
  @Override
  protected boolean isLinkEnabled() {
System.out.println( le);
return true;
  }

  @Override
  public boolean canCallListenerInterface(Method method) {
System.out.println( cc);
return true;
  }

  @Override
  public boolean isEnabled() {
System.out.println( ie);
return true;
  }

  @Override
  public void onClick(AjaxRequestTarget target) {
System.out.println(clicked...);
  }
};

container.add(link);
this.add(container);
  }
}

?xml version=1.0 encoding=utf-8?
html
div wicket:id=container
  div wicket:id=linkClick me!/div
/div
/html


On 09.05.2012 14:29, Jürgen Lind wrote:

Hi Martin,

thanks for the hint, unfortunatly, it does not work :-( I've been looking 
through the relevant
code and the approach seems right, however at some point, the returned values 
seem to be ignored
and the link is still disabled (i.e. the onclick-handler is not rendered)... I 
will have to
investigate further...

J.

On 09.05.2012 13:05, Martin Grigorov wrote:

Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lindjuergen.l...@iteratec.de wrote:

Hi Martin,

that was my initial approach. However, I would like the collapsible panels
to keep their
state between form submits, therefore I would need some sort of Javascript
state management
or I would simply use ajax links for that purpose. Which is what I would
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have to
go back to JS...

J.


On 09.05.2012 11:16, Martin Grigorov wrote:


Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lindjuergen.l...@iteratec.de
wrote:


Hi,

I have a little problem in my application and maybe someone has an idea
how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write
permission
for the form, the
form is disabled and therefore all input elements as well (which is
good).
However, for
obvious reaons, I would like the collapsible panels to remain enabled.
How
could I achieve
this? I have already tried to have the ajax-link for the panel to always
return true from
isEnabled, but that seems to be overriden by the parent component. Any
ideas
where to look?

Cheers,

Jürgen


-
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










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



Re: How to override annotation @SpringBean

2012-04-29 Thread Jürgen Lind

Hi,

in case like this where I would like to reuse a custom component in different 
contexts, I
usually make the component abstract and have the using components implement an
abstract method such as getService. This way, I can pass in different beans
as needed...

Maybe that helps,

Jürgen


On 29.04.2012 23:58, myrz wrote:

Hi everybody.

First I would like to thanks you for the help you gave me.

But I've got another question for you.
I would like to know if it's possible to override the annotation @SpringBean
?
Why do I need to do that?

Let try a little simple example:

I want to print this

Hello Internal

and in another page (or ajax panel)

Hello Commercial


But I would like to use the same panel and not have to do a lots of if
else in my code. So here my panel code:

Panel.java

public class MyPanel extends CustomPanel{

   private transient HelloService service;

   public void initService(){
service =
ServiceFactory.get(helloService,getCommercialOrInternalState());
   }

   public MyPanel(String id){
   initService();
   IModel model = new LoadableDetachableModel(){
load(){
   service.sayHello();
}
   };

   add(new Label(label,model));

   }


My services:

public interface HelloService{
 public String sayHello();
}

public HelloServiceInternalImpl implements HelloService{
 public String sayHello(){
 return Hello Internal;
 }
}

public HelloServiceCommercialImpl implements HelloService{
 public String sayHello(){
 return Hello Commercial;
 }
}

In my applicationContext.xml file
bean id=helloServiceInternal class=service.HelloServiceInternalImpl  /
bean id=helloServiceCommercial class=service.HelloServiceCommercialImpl
/


Well, this way to do can work but sometime I don't know why i've some
NullpointerException then I'm asking myself if it's a good practice create
the service in the constructor.
And I think it's would be more elegant to write something like that:

@CustomSpringBean
private HelloService service;

If someone have an idea he would be awesome to share it.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-override-annotation-SpringBean-tp4597030p4597030.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



Stateless Page Question

2012-04-27 Thread Jürgen Lind

Hi,

I'm a bit confused with stateless pages and maybe somebody can shed light on 
this...
I have a (currently) empty mounted WebPage that is later supposed to serve as a
health-check page and will thus be called frequently. Now, if a do a simple wget
with the page URL, my RequestCycleListener tells me, that a new session was 
created.
I use the following code for this check:

if (((ServletWebRequest) 
RequestCycle.get().getRequest()).getContainerRequest().getSession()
.isNew()) {
  logger.info(New session started);
}

Now, since the page should not be bound to a session and will be called very 
often, I would
rather not have the overhead of session creation for each request. Is there 
something I am
missing?

Jürgen

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



Re: Stateless Page Question

2012-04-27 Thread Jürgen Lind


Oh, sorry for the stupid question. Obviously, I haven't done raw servlet
programming for a while...

J.

On 27.04.2012 09:50, Martin Grigorov wrote:

 From HttpServletRequest javadocs:

HttpSession getSession()
Returns the current session associated with this request, or if the
request does not have a session, creates one.

Use getSession(false) instead.

To keep the page stateless you may use wicket-devutils
StatelessChecker in Dev mode.

On Fri, Apr 27, 2012 at 10:41 AM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

I'm a bit confused with stateless pages and maybe somebody can shed light on
this...
I have a (currently) empty mounted WebPage that is later supposed to serve
as a
health-check page and will thus be called frequently. Now, if a do a simple
wget
with the page URL, my RequestCycleListener tells me, that a new session was
created.
I use the following code for this check:

if (((ServletWebRequest)
RequestCycle.get().getRequest()).getContainerRequest().getSession()
.isNew()) {
  logger.info(New session started);
}

Now, since the page should not be bound to a session and will be called very
often, I would
rather not have the overhead of session creation for each request. Is there
something I am
missing?

Jürgen

-
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



setResponsePage in ajax call

2012-04-26 Thread Jürgen Lind

Hi,

I have difficulties in using the setResponsePage in ajax call as Wicket seems 
to direct the
call to a relative URL. As a result, the request is made to the root context an 
that gives me
a 404.

The scenario is as follows: I have a login form and would like to provide user 
feedback on
submission errors as ajax responses. Upon success, the user should be 
redirected to a new
page.

I have already found a thread on a similar issue and there it said, that this 
was fixed in 1.4.7.
As I am using 1.5.3 this should presumably work. Am I doing something wrong 
here?

Cheers,

Jürgen

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



Re: setResponsePage in ajax call

2012-04-26 Thread Jürgen Lind

Thanks for the quick responses... First of all the code sample: in my LoginPanel
I have a method that is invoked if the user authentication succeeds:

  protected void onSuccess(AuthenticatedUser user, AjaxRequestTarget 
target) {
EmobWebSession.get().setAuthenticatedUser(user);

if (!LoginPage.this.continueToOriginalDestination()) {
  PageParameters pp = new PageParameters();
  pp.add(page, fleetlist);
  setResponsePage(new DesktopPage(pp));
}
  }

this code leads me to the root context of the server... Oddly enough, I do not 
see a
redirect reponse neither in firebug nor in TamperData...

If I replace the setResponsePage call with the following code, everything works 
just
fine:
  getRequestCycle().scheduleRequestHandlerAfterCurrent(
  new RedirectRequestHandler(/desktop));

Is that a valid approach to achieving my goal or ist this just voodoo 
programming?

J.


On 26.04.2012 11:28, Martin Grigorov wrote:

Hi Juergen,

This scenario should work just fine.
Wicket returnsredirect./some/relative/url/redirect  in the Ajax
response and uses window.location=url to do the redirect
Please try with 1.5.5 and create a ticket with a quickstart if it
still fails for you.

On Thu, Apr 26, 2012 at 12:05 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

I have difficulties in using the setResponsePage in ajax call as Wicket
seems to direct the
call to a relative URL. As a result, the request is made to the root context
an that gives me
a 404.

The scenario is as follows: I have a login form and would like to provide
user feedback on
submission errors as ajax responses. Upon success, the user should be
redirected to a new
page.

I have already found a thread on a similar issue and there it said, that
this was fixed in 1.4.7.
As I am using 1.5.3 this should presumably work. Am I doing something wrong
here?

Cheers,

Jürgen

-
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: setResponsePage in ajax call

2012-04-26 Thread Jürgen Lind

Hi Martin,

thnaks for your reply and the explanation, I have now switched to the 
class-based
variant and it works like it should.

J.

On 26.04.2012 12:05, Martin Grigorov wrote:

On Thu, Apr 26, 2012 at 12:50 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Thanks for the quick responses... First of all the code sample: in my
LoginPanel
I have a method that is invoked if the user authentication succeeds:

  protected void onSuccess(AuthenticatedUser user, AjaxRequestTarget
target) {
EmobWebSession.get().setAuthenticatedUser(user);

if (!LoginPage.this.continueToOriginalDestination()) {
  PageParameters pp = new PageParameters();
  pp.add(page, fleetlist);
  setResponsePage(new DesktopPage(pp));


There is a small but important difference between
setResponsePage(Page) and setResponsePage(Class).
In most cases I'd recommend to use the Class variant because it
produces nicer urls if the page class is mounted.

What should happen in your case:
by using the Page variant Wicket will render DesktopPage in the Ajax
request, will store a BufferedWebResponse for it in the Application
and will do a redirect to url like ../wicket/page?pageId. The redirect
will be done as I explained in my previous mail - by returning
ajax-responseredirect...//  and reload the page with:
document.location=.../wicket/page?pageId. This request will be handled
by BufferedResponseMapper because it will find stored response for
that url.


}
  }

this code leads me to the root context of the server... Oddly enough, I do
not see a
redirect reponse neither in firebug nor in TamperData...

If I replace the setResponsePage call with the following code, everything
works just
fine:
  getRequestCycle().scheduleRequestHandlerAfterCurrent(
  new RedirectRequestHandler(/desktop));

Is that a valid approach to achieving my goal or ist this just voodoo
programming?

J.



On 26.04.2012 11:28, Martin Grigorov wrote:


Hi Juergen,

This scenario should work just fine.
Wicket returnsredirect./some/relative/url/redirectin the Ajax
response and uses window.location=url to do the redirect
Please try with 1.5.5 and create a ticket with a quickstart if it
still fails for you.

On Thu, Apr 26, 2012 at 12:05 PM, Jürgen Lindjuergen.l...@iteratec.de
  wrote:


Hi,

I have difficulties in using the setResponsePage in ajax call as Wicket
seems to direct the
call to a relative URL. As a result, the request is made to the root
context
an that gives me
a 404.

The scenario is as follows: I have a login form and would like to provide
user feedback on
submission errors as ajax responses. Upon success, the user should be
redirected to a new
page.

I have already found a thread on a similar issue and there it said, that
this was fixed in 1.4.7.
As I am using 1.5.3 this should presumably work. Am I doing something
wrong
here?

Cheers,

Jürgen

-
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








--
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: AuthorizationStrategy design question

2012-04-23 Thread Jürgen Lind

Hi Martin,

actually, I was talking about '#isActionAuthorized' of my 
IAuthorizationStrategy. There,
I have access to the component and the path. However, the problem remains that 
the path
is identical whenever the parent components are replaces by one another. I have 
now taken
the following approach:

* I have an annotation AuthorizationContext that can be attached to any 
component in the
  component hierarchy
* In '#isActionAuthorized' I scan the component hierarchy until an 
AuthorizationContext  is
  found
* If one is found, I have a Datastructure (specified as XML Document) that 
tells me which
  permissions are required for a specifiy component id in the given context.

Seems to work thus far and still nicely separates the authorization stuff from 
the rest on
the application...

Cheers,

J.


On 23.04.2012 09:36, Martin Grigorov wrote:

Hi Juergen,

How do you get the component path ?
I guess you talk about
org.apache.wicket.authorization.IAuthorizationStrategy#isInstantiationAuthorized(Class)
which receives a Class as parameter, not a Component. So I don't see
how you get the component path from that class.
If you are able to get the component path then you should be able to do:

component.findParent(ListPanel1.class) != null.

This is possible for
org.apache.wicket.authorization.IAuthorizationStrategy#isActionAuthorized(Component,
Action)

I'm not sure why IAuthorizationStrategy#isInstantiationAuthorized()
accepts a Class as parameter while even the component is available:
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Application.java#L280

On Sat, Apr 21, 2012 at 10:51 AM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

I am looking for ideas on how to implement a context-aware
AuthorizationStrategy.
This means that I need a way to decided whether a certain self-written
component can
be instantiated in a particular context or not. For example, the filter
component
may be show to a user with a certain permission when looking at ListPanel1,
but not
when looking at ListPanel2.

In previous Wicket applications, a have use my own annotation-based scheme
that worked
very well, but I cannot use it for this application since the permission
granularity is
much more fine-grained and context sensitive.

Is there any good way of doing this? I already tried looking at the
component path, but
that does not give me the information I need since it only covers the ids of
the
components i.e. using the above filter component in a setting where
ListPanel1 and
ListPanel2 are switched via Ajax calls, I get the same component path...

Thanks for any ideas,

J.





-
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



AuthorizationStrategy design question

2012-04-21 Thread Jürgen Lind

Hi,

I am looking for ideas on how to implement a context-aware 
AuthorizationStrategy.
This means that I need a way to decided whether a certain self-written 
component can
be instantiated in a particular context or not. For example, the filter 
component
may be show to a user with a certain permission when looking at ListPanel1, but 
not
when looking at ListPanel2.

In previous Wicket applications, a have use my own annotation-based scheme that 
worked
very well, but I cannot use it for this application since the permission 
granularity is
much more fine-grained and context sensitive.

Is there any good way of doing this? I already tried looking at the component 
path, but
that does not give me the information I need since it only covers the ids of the
components i.e. using the above filter component in a setting where 
ListPanel1 and
ListPanel2 are switched via Ajax calls, I get the same component path...

Thanks for any ideas,

J.





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



Message piggybacking vs polling

2012-04-18 Thread Jürgen Lind

Hi,

I am currently evaluating my options for (semi) pro-active messages to the 
user. The first
idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages for 
the user. Since
this might put quite some unnecessary load on the server, I was thinking about 
using the
current request to piggyback the messages. The idea is quite simple:

1. I have a component in thebase page that shows the messages (if present) to 
the user

2. An update of this component is added to every Ajax-request the user makes.

Now comes the tricky bit: what is the best approach to implementing this? I was 
thinking
about adding the code for updating the component into the RequestCycleListener. 
That leads
to the fist question on how to access the current Ajax request target there. I 
found the API
call to check whether a request is an Ajax request, but no way to get the 
AjaxRequestTarget...

The second question is, how to access the component. I could either place a 
reference to it in
the WebSession (is that a good idea?) or I would need way to access the current 
page to get it
from there. How could I do that within the RequestCycleListener?

The third and final question is, whether all that stuff does make any sense at 
all - perhaps there
are even better ways to do what I want...

Any help would be appreciated...

Cheers,

J.

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



Re: Message piggybacking vs polling

2012-04-18 Thread Jürgen Lind

Hi Martin,

thank you for the quick response. The onEvent Method was the part I was looking 
for... A
quick check showed me that this should work as I would like it to...

BTW: I think Wicket is a real great piece of Software...

Cheers,

J.


On 18.04.2012 09:15, Martijn Dashorst wrote:

Reserve a hidden part of your pages to render the messages, and create
some javascript kung fu to read those messages and display them in
some way. Create an onEvent() handler that adds the messages container
to the ajax request target, and calls your javascript kung fu master.
See the wiki for the event bus mechanism of 1.5 for more information

Martijn

On Wed, Apr 18, 2012 at 9:08 AM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

I am currently evaluating my options for (semi) pro-active messages to the
user. The first
idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages
for the user. Since
this might put quite some unnecessary load on the server, I was thinking
about using the
current request to piggyback the messages. The idea is quite simple:

1. I have a component in thebase page that shows the messages (if present)
to the user

2. An update of this component is added to every Ajax-request the user
makes.

Now comes the tricky bit: what is the best approach to implementing this? I
was thinking
about adding the code for updating the component into the
RequestCycleListener. That leads
to the fist question on how to access the current Ajax request target there.
I found the API
call to check whether a request is an Ajax request, but no way to get the
AjaxRequestTarget...

The second question is, how to access the component. I could either place a
reference to it in
the WebSession (is that a good idea?) or I would need way to access the
current page to get it
from there. How could I do that within the RequestCycleListener?

The third and final question is, whether all that stuff does make any sense
at all - perhaps there
are even better ways to do what I want...

Any help would be appreciated...

Cheers,

J.

-
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: common data picker component

2012-04-05 Thread Jürgen Lind

I would suggest using a jquery dialog to turn an arbitrary screen area
that contains your custom components into a popup.

J.

On 05.04.2012 14:54, brazz wrote:

Hi,

is there a component in wicket which acts like a datepicker but works for
any content? I mean just a box where you can put your custom panels in.

I need an alernative for a DropDown Box because if have about 400 entries.
so i think of a little popup box with paging and filtering elements. In the
popup box i would place my DataView and other components.

Popup

|   Filterbox   |
| |
||
|  row1 |
|  row2 |
|   ..|
||




TextBox with button that opens popup box.

Thanks for your help!


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/common-data-picker-component-tp4534753p4534753.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




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



Access current request in IAuthorizationStrategy

2012-03-26 Thread Jürgen Lind
Hi,

I need a way to decide wether a certain page can be opend based on the URL it 
was called with. Therefore, I need
access to the current request in the 'isInstantiationAuthorized' method of 
IAuthorizationStrategy. Is there a way to 
get access to the current request there?

Thanks,

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



Re: Access current request in IAuthorizationStrategy

2012-03-26 Thread Jürgen Lind

Thanks, I've been looking through some classes to find such a method but I 
missed on that one...

J.


On 26.03.2012 08:33, Igor Vaynberg wrote:

RequestCycle.get()

-igor

On Sun, Mar 25, 2012 at 11:14 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

I need a way to decide wether a certain page can be opend based on the URL it 
was called with. Therefore, I need
access to the current request in the 'isInstantiationAuthorized' method of 
IAuthorizationStrategy. Is there a way to
get access to the current request there?

Thanks,

J.
-
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



Mysterious application crash

2012-03-21 Thread Jürgen Lind

Hi,

I've run into a very odd situation and I have no idea, how to find out what is
going on... The situation is as follows:

1. I have a base page that contains some markup and components.

2. I have a second page, that extends the base page but does not add
   any markup or components, i.e the HTML is empty besides des wicket:extend tag
   and the Java Class is entirely empty

3. The base page is mounted as 'base', the child page is mounted as 'child'

4. I open the child page in the browser, it shows ok (all the contents of the
   base page)

5. I open the base page in the browser and I get an exception:
   Root cause:

org.apache.wicket.markup.MarkupNotFoundException: Markup not found for Component: 
[HtmlHeaderContainer [Component id = _header_0]]

at org.apache.wicket.Component.internalRender(Component.java:2315)
at org.apache.wicket.Component.render(Component.java:2275)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1474)
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1638)

6. I try to open the base page in another browser, I get the same exception!

For me, that indicates that the application was somehow corrupted. Is that 
possible?
Or do I miss something obvious here? I've been trying to track down the error 
for
the last couple of hours, but I have not found anything useful...

J.

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



Re: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Jürgen Lind

Hi Christoph, maybe I was a bit too quick in assuming that Jrebel was the 
culprit...
I went back to 1.5.3 an since then, the problem has disappeared. Let's hope it 
stays
that way... Thank you again for the hint.

J.

On 04.03.2012 11:46, Jürgen Lind wrote:


Thanks for the hint, but I do not think that this is the problem. The
resource (HTML file) is locked in the classes directory that is monitored
by jRebel and not in the directory where the WAR-File is located. Anyway, I
will be looking into that...

J.



On 04.03.2012 11:31, Christoph Leiter wrote:

Hi,

do you use 1.5.4 with package resources? There's a bug that causes
locked resources:
https://issues.apache.org/jira/browse/WICKET-4359

Until 1.5.5 is released you can use 1.5.3, which is not affected by this
bug.


Christoph


On 04.03.2012 10:29, Jürgen Lind wrote:

Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just wanted
to know if somebody else has a similar problem.

J.



-
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




--
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: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Jürgen Lind

That would imply that I use Maven for my build process - which I don't ;-) Is 
there a plcae
where I can download the entire bundle so that I can give it a try? or doe I 
have to download
the jars separately?


J.


On 05.03.2012 13:40, Martin Grigorov wrote:

Hi Juergen,

You may also test with 1.5-SNAPSHOT to verify that 1.5.5 will work.
Just add this repo temporarily to your pom.xml:

repositories
repository
idApache Nexus/id

urlhttps://repository.apache.org/content/repositories/snapshots//url
releases
enabledfalse/enabled
/releases
snapshots
enabledtrue/enabled
/snapshots
/repository
/repositories


On Mon, Mar 5, 2012 at 2:16 PM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi Christoph, maybe I was a bit too quick in assuming that Jrebel was the
culprit...
I went back to 1.5.3 an since then, the problem has disappeared. Let's hope
it stays
that way... Thank you again for the hint.

J.


On 04.03.2012 11:46, Jürgen Lind wrote:



Thanks for the hint, but I do not think that this is the problem. The
resource (HTML file) is locked in the classes directory that is monitored
by jRebel and not in the directory where the WAR-File is located. Anyway,
I
will be looking into that...

J.



On 04.03.2012 11:31, Christoph Leiter wrote:


Hi,

do you use 1.5.4 with package resources? There's a bug that causes
locked resources:
https://issues.apache.org/jira/browse/WICKET-4359

Until 1.5.5 is released you can use 1.5.3, which is not affected by this
bug.


Christoph


On 04.03.2012 10:29, Jürgen Lind wrote:


Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just
wanted
to know if somebody else has a similar problem.

J.



-
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




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








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



Eclipse, Wicket 1.5 and Jrebel

2012-03-04 Thread Jürgen Lind

Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just wanted
to know if somebody else has a similar problem.

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: Eclipse, Wicket 1.5 and Jrebel

2012-03-04 Thread Jürgen Lind


Thanks for the hint, but I do not think that this is the problem. The
resource (HTML file) is locked in the classes directory that is monitored
by jRebel and not in the directory where the WAR-File is located. Anyway, I
will be looking into that...

J.



On 04.03.2012 11:31, Christoph Leiter wrote:

Hi,

do you use 1.5.4 with package resources? There's a bug that causes
locked resources:
https://issues.apache.org/jira/browse/WICKET-4359

Until 1.5.5 is released you can use 1.5.3, which is not affected by this
bug.


Christoph


On 04.03.2012 10:29, Jürgen Lind wrote:

Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just wanted
to know if somebody else has a similar problem.

J.



-
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: Eclipse, Wicket 1.5 and Jrebel

2012-03-04 Thread Jürgen Lind

Hi Dan, thanks for your answer, then the problem might lie within my setup. One 
more thing:
which version of Wicket are you using? Maybe the Packaged Resource Bug that was 
mentioned
earlier is the culprit...

J.

On 05.03.2012 03:55, Dan Retzlaff wrote:

Jürgen, my coworkers and I use that combination successfully. Good luck.

On Sun, Mar 4, 2012 at 1:29 AM, Jürgen Lindjuergen.l...@iteratec.dewrote:


Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just wanted
to know if somebody else has a similar problem.

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





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



Border-Component Problem in Migration to 1.5

2012-02-24 Thread Jürgen Lind

Hi,

I've just begun to move my application up to 1.5. and I now getting an error in 
a place that worked
just fine in 1.4. The problem seems to lie within creating a border component 
as it gives me the
following error message:

org.apache.wicket.WicketRuntimeException: You can not add a component's parent as child to the 
component (loop): Component: [BorderBodyContainer [Component id = filterTreePopup_body]]; parent == 
child: [WebMarkupContainer [Component id = popupHolder]]


This happens in this line:

InlinePopup filterTreePopup = new InlinePopup(filterTreePopup, filterTree_ 
+ this.markupId);


This is the code for the border component:

wicket:border
  div wicket:id=popupHolder
div wicket:id=popup style=display:none
  wicket:body/
/div
  /div
/wicket:border

public InlinePopup(String id, String name) {
  super(id);

  WebMarkupContainer popupHolder = new WebMarkupContainer(popupHolder);
  popupHolder.setOutputMarkupId(true);
  popupHolder.setMarkupId(name + PopupHolder);

  WebMarkupContainer popup = new WebMarkupContainer(popup);
  popup.setOutputMarkupId(true);
  popup.setMarkupId(name + Popup);

  popup.add(getBodyContainer());
  popupHolder.add(popup);
  this.add(popupHolder);
}

I have no idea what could cause the problem, the component ordering seems to be 
ok from
my point of view and, as I said before, the code works just fine in 1.4.12.

Cheers,

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: Border-Component Problem in Migration to 1.5

2012-02-24 Thread Jürgen Lind

Ok, I am going to answer myself on that one: changing

this.add(popupHolder);

to

this.addToBorder(popupHolder);

dis it. I had read the migration guide and the Javadoc several times but just 
did not understand it
(correctly)...

J.

On 24.02.2012 14:00, Jürgen Lind wrote:

Hi,

I've just begun to move my application up to 1.5. and I now getting an error in 
a place that worked
just fine in 1.4. The problem seems to lie within creating a border component 
as it gives me the
following error message:

org.apache.wicket.WicketRuntimeException: You can not add a component's parent 
as child to the
component (loop): Component: [BorderBodyContainer [Component id = 
filterTreePopup_body]]; parent ==
child: [WebMarkupContainer [Component id = popupHolder]]

This happens in this line:

InlinePopup filterTreePopup = new InlinePopup(filterTreePopup, filterTree_ 
+ this.markupId);


This is the code for the border component:

wicket:border
div wicket:id=popupHolder
  div wicket:id=popup style=display:none
wicket:body/
  /div
/div
/wicket:border

public InlinePopup(String id, String name) {
super(id);

WebMarkupContainer popupHolder = new WebMarkupContainer(popupHolder);
popupHolder.setOutputMarkupId(true);
popupHolder.setMarkupId(name + PopupHolder);

WebMarkupContainer popup = new WebMarkupContainer(popup);
popup.setOutputMarkupId(true);
popup.setMarkupId(name + Popup);

popup.add(getBodyContainer());
popupHolder.add(popup);
this.add(popupHolder);
}

I have no idea what could cause the problem, the component ordering seems to be 
ok from
my point of view and, as I said before, the code works just fine in 1.4.12.

Cheers,

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




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



Resource Caching in 1.5.

2012-02-24 Thread Jürgen Lind

Hi,

my migration to Wicket 1.5. is progressing, but there are still some unresolved 
issues. Currently, I
am trying to prevent wicket from adding antiCache-Information to a 
PackageResourceReference. I am
using a subclassed LabelIconPanel to have my own icons in a Tree component. 
However, all icons are
loaded freshly when doing an update due to the antiCache Part that gets added 
to the URL

I have already search the documentation and various forums but I have not been 
able to find a way
to prevent the described behavior. The best think (I thought) was to disable anti-caching 
altogether, so I added


getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE);

to my application's init method. Unfortunately, that did not work either. Any 
suggestions how to
get around this problem?


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: Resource Caching in 1.5.

2012-02-24 Thread Jürgen Lind

Thx Igor, that was indeed the right call... Not it works as expected...

J.


On 24.02.2012 17:03, Igor Vaynberg wrote:

actually, did you override LabelIconPanel#newImageComponent()? in
there i see code to prevent anticache...

return new Image(componentId)
{
@Override
protected boolean shouldAddAntiCacheParameter()
{
return false;
}
};
}

-igor

On Fri, Feb 24, 2012 at 8:02 AM, Igor Vaynbergigor.vaynb...@gmail.com  wrote:

package resource references should not have anticache appended, please
create a quickstart.

-igor

On Fri, Feb 24, 2012 at 6:39 AM, Jürgen Lindjuergen.l...@iteratec.de  wrote:

Hi,

my migration to Wicket 1.5. is progressing, but there are still some
unresolved issues. Currently, I
am trying to prevent wicket from adding antiCache-Information to a
PackageResourceReference. I am
using a subclassed LabelIconPanel to have my own icons in a Tree component.
However, all icons are
loaded freshly when doing an update due to the antiCache Part that gets
added to the URL

I have already search the documentation and various forums but I have not
been able to find a way
to prevent the described behavior. The best think (I thought) was to disable
anti-caching altogether, so I added

getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE);

to my application's init method. Unfortunately, that did not work either.
Any suggestions how to
get around this problem?


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: Component specific JavaScript

2012-02-19 Thread Jürgen Lind

Hi Jorge,

thanks for the hint, unfortunately, this method is only available in Wicket 1.5 
-
in this projekt, I am still using Wicket 1.4. Maybe I should stop looking for
a general solution for this project and in the future use the solution you 
suggested...

J.


On 19.02.2012 10:30, Jorge Rodrigez wrote:

Hi,

I think you just need:

class MyComponent extends SomeWicketComponent {

   @Override public void renderHead(IHeaderResponse response) {
 response.renderOnDomReadyJavascript(someJSToExecute());
   }
}

someJSToExecute() will be executed every time an instance of MyComponent is
rendered. Both Ajax and normal requests.

On Sat, Feb 18, 2012 at 5:46 PM, Jürgen Lindjuergen.l...@iteratec.dewrote:


Hi Christoph,

thank you for your reply, I did not know that such a method exists (does
it for 1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on a
ajax
update of an existing DOM Element or only when it is added?

And where would I put the Javascript that registers the handler? In the
Markup-Page of
the Component? How do I make sure, the handler is added only once?


J.


On 18.02.2012 17:39, Christoph Leiter wrote:


Hello Juergen,

you can register a function that gets called when wicket creates a new
element in the DOM:

Wicket.Event.subscribe('/dom/**node/added', function(element) {
  // do stuff
});

You can also use the '/dom/node/removing' channel.

Hope this helps.


Christoph




Jürgen Lind (2012-02-18 16:55):


Hi,

I was wondering if there is any kind of best practice to add specific
javascript
to a component. I often have the case, where a piece of javascript needs
to run
when the component is rendered as part of full-page request, and then
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request
triggered
by another component.

I would like to have one place where I can put the Javascript and be
shure, it is
run every time...

Cheers,

J.



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





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: Component specific JavaScript

2012-02-19 Thread Jürgen Lind


Strange, I am using 1.4.12 and neither is present there. The javadoc at
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html also does
not show the method with this signature...

J.


On 19.02.2012 12:23, Martin Grigorov wrote:

Hi Juergen,

Both Component#renderHead(IHeaderResponse) 
IHeaderResponse#renderOnDomReadyJavascript() methods are available in 1.4.x.
What exactly you think is not available there ?



  From: Jürgen Lindjuergen.l...@iteratec.de
To: users@wicket.apache.orgusers@wicket.apache.org
Sent: Sunday, 19 February 2012, 12:08
Subject: Re: Component specific JavaScript

Hi Jorge,

thanks for the hint, unfortunately, this method is only available in Wicket 1.5 
-
in this projekt, I am still using Wicket 1.4. Maybe I should stop looking for
a general solution for this project and in the future use the solution you 
suggested...

J.


On 19.02.2012 10:30, Jorge Rodrigez wrote:

Hi,

I think you just need:

class MyComponent extends SomeWicketComponent {

 @Override public void renderHead(IHeaderResponse response) {
   response.renderOnDomReadyJavascript(someJSToExecute());
 }
}

someJSToExecute() will be executed every time an instance of MyComponent is
rendered. Both Ajax and normal requests.

On Sat, Feb 18, 2012 at 5:46 PM, Jürgen Lindjuergen.l...@iteratec.dewrote:


Hi Christoph,

thank you for your reply, I did not know that such a method exists (does
it for 1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on a
ajax
update of an existing DOM Element or only when it is added?

And where would I put the Javascript that registers the handler? In the
Markup-Page of
the Component? How do I make sure, the handler is added only once?


J.


On 18.02.2012 17:39, Christoph Leiter wrote:


Hello Juergen,

you can register a function that gets called when wicket creates a new
element in the DOM:

Wicket.Event.subscribe('/dom/**node/added', function(element) {
// do stuff
});

You can also use the '/dom/node/removing' channel.

Hope this helps.


Christoph




Jürgen Lind (2012-02-18 16:55):


Hi,

I was wondering if there is any kind of best practice to add specific
javascript
to a component. I often have the case, where a piece of javascript needs
to run
when the component is rendered as part of full-page request, and then
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request
triggered
by another component.

I would like to have one place where I can put the Javascript and be
shure, it is
run every time...

Cheers,

J.



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





Mit freundlichen Grüßen,

Jürgen Lind




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: Component specific JavaScript

2012-02-19 Thread Jürgen Lind

Christoph,

I have use yout approach (jQuery + css-class) for some time now as well. 
However, I
have found that if the DOM tree grows rather large, a full scan puts 
significant load
on the browser. That's why I want to be more specific and limit the scanning + 
updating
to the relevant parts of the page.

J.

On 19.02.2012 13:02, Christoph Leiter wrote:

On 18.02.2012 17:46, Jürgen Lind wrote:

thank you for your reply, I did not know that such a method exists (does
it for 1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on
a ajax
update of an existing DOM Element or only when it is added?


This is also available in 1.4. The events are fired when you add
something to the ajax request via target.add(Component)


And where would I put the Javascript that registers the handler? In the
Markup-Page of
the Component? How do I make sure, the handler is added only once?


I use jQuery and register the handler globally in my main.js for every
page within $(document).ready().

This approach works very well if you don't want to create subclasses of
components but rather execute some specific JS if e.g. a css class is
present. I use it to add a hint image to every autocomplete textfield
via jQuery.

If it's more component specific then the renderHead() solution seems better.


Christoph

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




--
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: Component specific JavaScript

2012-02-19 Thread Jürgen Lind

I'm not sure if I get you right on this one: the first argument of which event
handler is the added element? Could you probably add some code to illustrate 
this?

J.

On 19.02.2012 13:28, Christoph Leiter wrote:

Hi Juergen,

there's actually no need to scan the full DOM with this method. :) The
first argument of the event handler is the added element. You can simply
use it as is or pass it to $() to do jQuery magic just for the relevant
part.


Christoph


On 19.02.2012 13:18, Jürgen Lind wrote:

Christoph,

I have use yout approach (jQuery + css-class) for some time now as well.
However, I
have found that if the DOM tree grows rather large, a full scan puts
significant load
on the browser. That's why I want to be more specific and limit the
scanning + updating
to the relevant parts of the page.

J.

On 19.02.2012 13:02, Christoph Leiter wrote:

On 18.02.2012 17:46, Jürgen Lind wrote:

thank you for your reply, I did not know that such a method exists (does
it for 1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on
a ajax
update of an existing DOM Element or only when it is added?


This is also available in 1.4. The events are fired when you add
something to the ajax request via target.add(Component)


And where would I put the Javascript that registers the handler? In the
Markup-Page of
the Component? How do I make sure, the handler is added only once?


I use jQuery and register the handler globally in my main.js for every
page within $(document).ready().

This approach works very well if you don't want to create subclasses of
components but rather execute some specific JS if e.g. a css class is
present. I use it to add a hint image to every autocomplete textfield
via jQuery.

If it's more component specific then the renderHead() solution seems
better.


Christoph

-
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: Component specific JavaScript

2012-02-19 Thread Jürgen Lind

Thanks a lot. One last stupid question: is this supposed to work for Wicket 1.4?

J.

On 19.02.2012 15:28, Christoph Leiter wrote:

$(document).ready(function() {
  Wicket.Event.subscribe('/dom/node/added', function(element) {
  $(element).css('border', '1px solid red');
 });
});



--
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: Component specific JavaScript

2012-02-19 Thread Jürgen Lind

That's right, I just checked the sources... Anyways, although migration the 
project
now does not make sense, it is a good idea for the next project...

Thanks everybody,

J.

On 20.02.2012 08:31, Wilhelmsen Tor Iver wrote:

Thanks a lot. One last stupid question: is this supposed to work for Wicket 1.4?


Doubful, the event system was added in 1.5

- Tor Iver

-
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-18 Thread Jürgen Lind

Hi,

thank you for your input on how to attack my problem... As it turned out,
the simplest way to see where the time is spent, was to override the
render method of various components. I had used onBeginRender and 
onAfterRender
before, but they seem to be called asymetrically so I was not able to to
properly associate the start and stop events for a particular timer.

To use a profiling tool was not an option since I do not have full access to the
integration testing machine and thus I cannot instrument the server. Secondly, I
wanted to measure the data on a per request basis which is - to my knowledge - 
not
possible with this kind of tools.

Long story short: the time is spent in the rendering phase for the component 
that
represents a tree entry. Due to various requirements, this component is fairly 
complex
and I takes approx. 2.5 to render one of them. Multiply by 5000 and that's it...

No comes the tricky bit: to convince our customer, that opening 5000 tree 
entries
simultaneously is not  really a good idea...

J.

On 17.02.2012 00:28, Pamir Erdem wrote:

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 Lindjuergen.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








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



Component specific JavaScript

2012-02-18 Thread Jürgen Lind

Hi,

I was wondering if there is any kind of best practice to add specific javascript
to a component. I often have the case, where a piece of javascript needs to run
when the component is rendered as part of full-page request, and then 
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request triggered
by another component.

I would like to have one place where I can put the Javascript and be shure, it 
is
run every time...

Cheers,

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: Component specific JavaScript

2012-02-18 Thread Jürgen Lind

Hi Christoph,

thank you for your reply, I did not know that such a method exists (does it for 
1.4
or is this already Wicket 1.5). An secondly: are these handlers fired on a ajax
update of an existing DOM Element or only when it is added?

And where would I put the Javascript that registers the handler? In the 
Markup-Page of
the Component? How do I make sure, the handler is added only once?


J.

On 18.02.2012 17:39, Christoph Leiter wrote:

Hello Juergen,

you can register a function that gets called when wicket creates a new
element in the DOM:

Wicket.Event.subscribe('/dom/node/added', function(element) {
  // do stuff
});

You can also use the '/dom/node/removing' channel.

Hope this helps.


Christoph




Jürgen Lind (2012-02-18 16:55):

Hi,

I was wondering if there is any kind of best practice to add specific
javascript
to a component. I often have the case, where a piece of javascript needs
to run
when the component is rendered as part of full-page request, and then
subsequently
as part of a self-triggered Ajax-Request or as part of an Ajax-Request
triggered
by another component.

I would like to have one place where I can put the Javascript and be
shure, it is
run every time...

Cheers,

J.



-
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



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 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: Increasing session size

2009-01-30 Thread Jürgen Lind

Probably I was a bit unclear, I was talking about the serialized session
on disk. Does the should not grow aspect apply there, too?

J.

Igor Vaynberg wrote:

considering wicket only keeps last-accessed page in session your
session shouldnt just keep growing...

-igor

On Thu, Jan 29, 2009 at 11:20 PM, Jürgen Lind juergen.l...@iteratec.de wrote:

One more thing: just as a rule of thumb, what would be a reasonable
amount of data that gets added to the session for a single request?
20k? 100k?

Regards,

J.



Michael Sparer wrote:

I took a cursory glance over your code and saw

 item.add(new Link(update, new Model(auftrag))

this way the auftrag gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
Serializable from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore.
hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael

Jürgen Lind-2 wrote:

After some twiddling I found that the PagingNavigator seems to be the
culprit.
If I leave it out, the session grows only moderately, when I put it in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

  @SpringBean
  private AuftragBA auftragBA;

  public AuftragUebersicht() {
this.initComponents();
  }

  private void initComponents() {

final AuftragDataView auftragDataView = new
AuftragDataView(resultList,
new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

Form form = new Form(searchForm) {

  public Form initComponents() {
final TextField auftragsnummerField = new
TextField(auftragsnummer,
 new
Model());
add(auftragsnummerField);

Button searchButton = new Button(search) {
  public void onSubmit() {
String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

AuftragDataProvider p = (AuftragDataProvider)
 auftragDataView.getDataProvider();
p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

if (auftragDataView.getDataProvider().size() == 0) {
  AuftragUebersicht.this.info(No results found!);
}
  }
};
add(searchButton);

return this;
  }

}.initComponents();

WebMarkupContainer resultListContainer = new
WebMarkupContainer(resultListContainer) {
  public boolean isVisible() {
return auftragDataView.getDataProvider().size()  0;
  }
};

CheckGroup group = new CheckGroup(group, new
ArrayListPartnerAuftrag());

group.add(new CheckGroupSelector(groupselector));

group.add(auftragDataView);

resultListContainer.add(new PagingNavigator(navigator,
auftragDataView));

resultListContainer.add(group);

form.add(resultListContainer);

this.add(form);

  }
}

public class AuftragDataView extends DataView {

  public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
super(id, dataProvider, itemsPerPage);
  }

  @Override
  protected void populateItem(final Item item) {

final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
item.add(new Label(auftragsnummer, auftrag.getAuftragsnummer()));
...

item.add(new Link(update, new Model(auftrag)) {
  public void onClick() {
AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
setResponsePage(page);
  }
});

item.add(new AttributeModifier(class, true, new
AbstractReadOnlyModel() {
  public Object getObject() {
return (item.getIndex() % 2 == 1) ? even : odd;
  }
}));
  }

  @Override
  protected void onDetach() {
super.onDetach();
  }
}

public class AuftragDataProvider implements IDataProvider {

  private AuftragBA  auftragBA;
  private AuftragUebersichtQuery query;

  private CollectionPartnerAuftrag result;

  public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
auftragBA) {
this.query = query;
this.auftragBA = auftragBA;
  }

  public AuftragUebersichtQuery getQuery() {
return this.query;
  }

  public void setQuery(AuftragUebersichtQuery query) {
this.query = query;
this.result = null;
  }

  public IteratorPartnerAuftrag iterator(int first, int count) {
if (this.result == null) {
  this.performQuery();
}
return new ArrayListPartnerAuftrag(this.result).subList(first,
first + count).iterator();
  }

  public IModel model(final Object object) {
return new DetachablePartnerAuftragModel((PartnerAuftrag) object,
this.auftragBA);
  }

  public int size() {
if (this.result == null) {
  this.performQuery();
}
return this.result.size();
  }

  public

Re: Increasing session size

2009-01-30 Thread Jürgen Lind

Thank you for pointing me to the means to tune the DiskPagestore size.
The only question that remains is whether it is normal that it keeps growing
and by what extend.

J.


Johan Compagner wrote:

yes it grows until a max

public DiskPageStore()
{
this((int)Bytes.megabytes(10).bytes(),
(int)Bytes.megabytes(100).bytes(), 50);
}

(10MB for one pagemap and 100MB for a complete session over multiply
pagemaps)

On Fri, Jan 30, 2009 at 09:44, Jürgen Lind juergen.l...@iteratec.de wrote:


Probably I was a bit unclear, I was talking about the serialized session
on disk. Does the should not grow aspect apply there, too?

J.


Igor Vaynberg wrote:


considering wicket only keeps last-accessed page in session your
session shouldnt just keep growing...

-igor

On Thu, Jan 29, 2009 at 11:20 PM, Jürgen Lind juergen.l...@iteratec.de
wrote:


One more thing: just as a rule of thumb, what would be a reasonable
amount of data that gets added to the session for a single request?
20k? 100k?

Regards,

J.



Michael Sparer wrote:


I took a cursory glance over your code and saw

 item.add(new Link(update, new Model(auftrag))

this way the auftrag gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
Serializable from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore.
hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael

Jürgen Lind-2 wrote:


After some twiddling I found that the PagingNavigator seems to be the
culprit.
If I leave it out, the session grows only moderately, when I put it in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

 @SpringBean
 private AuftragBA auftragBA;

 public AuftragUebersicht() {
   this.initComponents();
 }

 private void initComponents() {

   final AuftragDataView auftragDataView = new
AuftragDataView(resultList,
   new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

   Form form = new Form(searchForm) {

 public Form initComponents() {
   final TextField auftragsnummerField = new
TextField(auftragsnummer,
new
Model());
   add(auftragsnummerField);

   Button searchButton = new Button(search) {
 public void onSubmit() {
   String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

   AuftragDataProvider p = (AuftragDataProvider)
auftragDataView.getDataProvider();
   p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

   if (auftragDataView.getDataProvider().size() == 0) {
 AuftragUebersicht.this.info(No results found!);
   }
 }
   };
   add(searchButton);

   return this;
 }

   }.initComponents();

   WebMarkupContainer resultListContainer = new
WebMarkupContainer(resultListContainer) {
 public boolean isVisible() {
   return auftragDataView.getDataProvider().size()  0;
 }
   };

   CheckGroup group = new CheckGroup(group, new
ArrayListPartnerAuftrag());

   group.add(new CheckGroupSelector(groupselector));

   group.add(auftragDataView);

   resultListContainer.add(new PagingNavigator(navigator,
auftragDataView));

   resultListContainer.add(group);

   form.add(resultListContainer);

   this.add(form);

 }
}

public class AuftragDataView extends DataView {

 public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
   super(id, dataProvider, itemsPerPage);
 }

 @Override
 protected void populateItem(final Item item) {

   final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
   item.add(new Label(auftragsnummer, auftrag.getAuftragsnummer()));
   ...

   item.add(new Link(update, new Model(auftrag)) {
 public void onClick() {
   AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
   setResponsePage(page);
 }
   });

   item.add(new AttributeModifier(class, true, new
AbstractReadOnlyModel() {
 public Object getObject() {
   return (item.getIndex() % 2 == 1) ? even : odd;
 }
   }));
 }

 @Override
 protected void onDetach() {
   super.onDetach();
 }
}

public class AuftragDataProvider implements IDataProvider {

 private AuftragBA  auftragBA;
 private AuftragUebersichtQuery query;

 private CollectionPartnerAuftrag result;

 public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
auftragBA) {
   this.query = query;
   this.auftragBA = auftragBA;
 }

 public AuftragUebersichtQuery getQuery() {
   return this.query;
 }

 public void setQuery(AuftragUebersichtQuery query) {
   this.query = query;
   this.result = null;
 }

 public IteratorPartnerAuftrag iterator(int first, int count

Re: Increasing session size

2009-01-30 Thread Jürgen Lind

Thank you for clarifying. The reason for for me asking these questions
is that it will be asked the very same questions once I recommend using
Wicket for the re-implementation of an existing application. I just want
to make sure that I have the correct answers :-)

J.

Johan Compagner wrote:

yes until the default 10MB i already said that.

On Fri, Jan 30, 2009 at 09:58, Jürgen Lind juergen.l...@iteratec.de wrote:


Thank you for pointing me to the means to tune the DiskPagestore size.
The only question that remains is whether it is normal that it keeps
growing
and by what extend.

J.



Johan Compagner wrote:


yes it grows until a max

public DiskPageStore()
   {
   this((int)Bytes.megabytes(10).bytes(),
(int)Bytes.megabytes(100).bytes(), 50);
   }

(10MB for one pagemap and 100MB for a complete session over multiply
pagemaps)

On Fri, Jan 30, 2009 at 09:44, Jürgen Lind juergen.l...@iteratec.de
wrote:

 Probably I was a bit unclear, I was talking about the serialized session

on disk. Does the should not grow aspect apply there, too?

J.


Igor Vaynberg wrote:

 considering wicket only keeps last-accessed page in session your

session shouldnt just keep growing...

-igor

On Thu, Jan 29, 2009 at 11:20 PM, Jürgen Lind juergen.l...@iteratec.de
wrote:

 One more thing: just as a rule of thumb, what would be a reasonable

amount of data that gets added to the session for a single request?
20k? 100k?

Regards,

J.



Michael Sparer wrote:

 I took a cursory glance over your code and saw

 item.add(new Link(update, new Model(auftrag))

this way the auftrag gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those
things
might be quite tedious, but you could e.g. temporarily remove the
Serializable from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore.
hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael

Jürgen Lind-2 wrote:

 After some twiddling I found that the PagingNavigator seems to be the

culprit.
If I leave it out, the session grows only moderately, when I put it
in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

 @SpringBean
 private AuftragBA auftragBA;

 public AuftragUebersicht() {
  this.initComponents();
 }

 private void initComponents() {

  final AuftragDataView auftragDataView = new
AuftragDataView(resultList,
  new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

  Form form = new Form(searchForm) {

public Form initComponents() {
  final TextField auftragsnummerField = new
TextField(auftragsnummer,
   new
Model());
  add(auftragsnummerField);

  Button searchButton = new Button(search) {
public void onSubmit() {
  String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

  AuftragDataProvider p = (AuftragDataProvider)
   auftragDataView.getDataProvider();
  p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

  if (auftragDataView.getDataProvider().size() == 0) {
AuftragUebersicht.this.info(No results found!);
  }
}
  };
  add(searchButton);

  return this;
}

  }.initComponents();

  WebMarkupContainer resultListContainer = new
WebMarkupContainer(resultListContainer) {
public boolean isVisible() {
  return auftragDataView.getDataProvider().size()  0;
}
  };

  CheckGroup group = new CheckGroup(group, new
ArrayListPartnerAuftrag());

  group.add(new CheckGroupSelector(groupselector));

  group.add(auftragDataView);

  resultListContainer.add(new PagingNavigator(navigator,
auftragDataView));

  resultListContainer.add(group);

  form.add(resultListContainer);

  this.add(form);

 }
}

public class AuftragDataView extends DataView {

 public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
  super(id, dataProvider, itemsPerPage);
 }

 @Override
 protected void populateItem(final Item item) {

  final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
  item.add(new Label(auftragsnummer, auftrag.getAuftragsnummer()));
  ...

  item.add(new Link(update, new Model(auftrag)) {
public void onClick() {
  AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
  setResponsePage(page);
}
  });

  item.add(new AttributeModifier(class, true, new
AbstractReadOnlyModel() {
public Object getObject() {
  return (item.getIndex() % 2 == 1) ? even : odd;
}
  }));
 }

 @Override
 protected void onDetach() {
  super.onDetach();
 }
}

public class AuftragDataProvider implements IDataProvider {

 private AuftragBA  auftragBA;
 private AuftragUebersichtQuery query;

 private CollectionPartnerAuftrag result

DataView and increasing session size

2009-01-29 Thread Jürgen Lind

Hi,

I have a question on how the DataView component is supposed to work. In my
application, I have to show quite large list of entities and so I am using
a DataView together with LoadableDetachableModels to read the data on demand.
However, when looking at the serialized sessions, I can observe that the
session size constantly increases by a fairly large amount although I am
just using the navigator to page through the list. Also, when looking into
the serialized session, I can see that the objects that are supposed to
be reloaded on demand are serialized into the session as well.

Is this the behavior that I would expect from the DataView or am I making
some mistake here?

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: DataView and increasing session size

2009-01-29 Thread Jürgen Lind

After some twiddling I found that the PagingNavigator seems to be the culprit.
If I leave it out, the session grows only moderately, when I put it in, the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

  @SpringBean
  private AuftragBA auftragBA;

  public AuftragUebersicht() {
this.initComponents();
  }

  private void initComponents() {

final AuftragDataView auftragDataView = new AuftragDataView(resultList,
new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

Form form = new Form(searchForm) {

  public Form initComponents() {
final TextField auftragsnummerField = new TextField(auftragsnummer,
 new Model());
add(auftragsnummerField);

Button searchButton = new Button(search) {
  public void onSubmit() {
String auftragsnummer = 
auftragsnummerField.getModelObjectAsString();

AuftragDataProvider p = (AuftragDataProvider)
 auftragDataView.getDataProvider();
p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

if (auftragDataView.getDataProvider().size() == 0) {
  AuftragUebersicht.this.info(No results found!);
}
  }
};
add(searchButton);

return this;
  }

}.initComponents();

WebMarkupContainer resultListContainer = new 
WebMarkupContainer(resultListContainer) {
  public boolean isVisible() {
return auftragDataView.getDataProvider().size()  0;
  }
};

CheckGroup group = new CheckGroup(group, new ArrayListPartnerAuftrag());

group.add(new CheckGroupSelector(groupselector));

group.add(auftragDataView);

resultListContainer.add(new PagingNavigator(navigator, auftragDataView));

resultListContainer.add(group);

form.add(resultListContainer);

this.add(form);

  }
}

public class AuftragDataView extends DataView {

  public AuftragDataView(String id, IDataProvider dataProvider, int 
itemsPerPage) {
super(id, dataProvider, itemsPerPage);
  }

  @Override
  protected void populateItem(final Item item) {

final PartnerAuftrag auftrag = (PartnerAuftrag) item.getModelObject();
item.add(new Label(auftragsnummer, auftrag.getAuftragsnummer()));
...

item.add(new Link(update, new Model(auftrag)) {
  public void onClick() {
AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag) 
getModelObject());
setResponsePage(page);
  }
});

item.add(new AttributeModifier(class, true, new AbstractReadOnlyModel() {
  public Object getObject() {
return (item.getIndex() % 2 == 1) ? even : odd;
  }
}));
  }

  @Override
  protected void onDetach() {
super.onDetach();
  }
}

public class AuftragDataProvider implements IDataProvider {

  private AuftragBA  auftragBA;
  private AuftragUebersichtQuery query;

  private CollectionPartnerAuftrag result;

  public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA auftragBA) 
{
this.query = query;
this.auftragBA = auftragBA;
  }

  public AuftragUebersichtQuery getQuery() {
return this.query;
  }

  public void setQuery(AuftragUebersichtQuery query) {
this.query = query;
this.result = null;
  }

  public IteratorPartnerAuftrag iterator(int first, int count) {
if (this.result == null) {
  this.performQuery();
}
return new ArrayListPartnerAuftrag(this.result).subList(first, first + 
count).iterator();
  }

  public IModel model(final Object object) {
return new DetachablePartnerAuftragModel((PartnerAuftrag) object, 
this.auftragBA);
  }

  public int size() {
if (this.result == null) {
  this.performQuery();
}
return this.result.size();
  }

  public void detach() {
this.result = null;
  }

  private void performQuery() {
...
  }
}


public class DetachablePartnerAuftragModel extends LoadableDetachableModel {

  private Long  id;
  private AuftragBA auftragBA;

  public DetachablePartnerAuftragModel(PartnerAuftrag auftrag, AuftragBA 
auftragBA) {
this(auftrag.getAuftragsId(), auftragBA);
  }

  public DetachablePartnerAuftragModel(Long id, AuftragBA auftragBA) {
this.id = id;
this.auftragBA = auftragBA;
  }

  @Override
  protected Object load() {
return this.auftragBA.findAuftragByAuftragsId(this.id);
  }

  @Override
  protected void onDetach() {
super.onDetach();
  }
}

Michael Sparer wrote:
 the objects shouldn't be serialized into the session if you're using
 loadabledetachable models, please show us some code

 regards,
 Michael


 Jürgen Lind-2 wrote:
 Hi,

 I have a question on how the DataView component is supposed to work. In my
 application, I have to show quite large list of entities and so I am using
 a DataView together with LoadableDetachableModels to read the data on
 demand

Re: DataView and increasing session size

2009-01-29 Thread Jürgen Lind

Michael,

thanks for your help, it significantly reduced the amount of session data.
Still, the session keeps growing... Is there any way to determine which
objects get serialized and where they are dangling? Removing the Serializable
interface helps me to spot my own classes but it does not work on classes
not under my control.

Regards,

J.

PS:
 hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

My pleasure, however, I only came to Munich/Unterhaching in 2000 so it is not
really to my credit. Still, as a long time FCK Fan, I love to see Leverkusen
loosing after sending us down a League in 1996...


Michael Sparer wrote:

I took a cursory glance over your code and saw

 item.add(new Link(update, new Model(auftrag))

this way the auftrag gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
Serializable from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore. 


hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael 



Jürgen Lind-2 wrote:

After some twiddling I found that the PagingNavigator seems to be the
culprit.
If I leave it out, the session grows only moderately, when I put it in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

   @SpringBean
   private AuftragBA auftragBA;

   public AuftragUebersicht() {
 this.initComponents();
   }

   private void initComponents() {

 final AuftragDataView auftragDataView = new
AuftragDataView(resultList,
 new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

 Form form = new Form(searchForm) {

   public Form initComponents() {
 final TextField auftragsnummerField = new
TextField(auftragsnummer,
  new
Model());
 add(auftragsnummerField);

 Button searchButton = new Button(search) {
   public void onSubmit() {
 String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

 AuftragDataProvider p = (AuftragDataProvider)
  auftragDataView.getDataProvider();
 p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

 if (auftragDataView.getDataProvider().size() == 0) {
   AuftragUebersicht.this.info(No results found!);
 }
   }
 };
 add(searchButton);

 return this;
   }

 }.initComponents();

 WebMarkupContainer resultListContainer = new
WebMarkupContainer(resultListContainer) {
   public boolean isVisible() {
 return auftragDataView.getDataProvider().size()  0;
   }
 };

 CheckGroup group = new CheckGroup(group, new
ArrayListPartnerAuftrag());

 group.add(new CheckGroupSelector(groupselector));

 group.add(auftragDataView);

 resultListContainer.add(new PagingNavigator(navigator,
auftragDataView));

 resultListContainer.add(group);

 form.add(resultListContainer);

 this.add(form);

   }
}

public class AuftragDataView extends DataView {

   public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
 super(id, dataProvider, itemsPerPage);
   }

   @Override
   protected void populateItem(final Item item) {

 final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
 item.add(new Label(auftragsnummer, auftrag.getAuftragsnummer()));
 ...

 item.add(new Link(update, new Model(auftrag)) {
   public void onClick() {
 AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
 setResponsePage(page);
   }
 });

 item.add(new AttributeModifier(class, true, new
AbstractReadOnlyModel() {
   public Object getObject() {
 return (item.getIndex() % 2 == 1) ? even : odd;
   }
 }));
   }

   @Override
   protected void onDetach() {
 super.onDetach();
   }
}

public class AuftragDataProvider implements IDataProvider {

   private AuftragBA  auftragBA;
   private AuftragUebersichtQuery query;

   private CollectionPartnerAuftrag result;

   public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
auftragBA) {
 this.query = query;
 this.auftragBA = auftragBA;
   }

   public AuftragUebersichtQuery getQuery() {
 return this.query;
   }

   public void setQuery(AuftragUebersichtQuery query) {
 this.query = query;
 this.result = null;
   }

   public IteratorPartnerAuftrag iterator(int first, int count) {
 if (this.result == null) {
   this.performQuery();
 }
 return new ArrayListPartnerAuftrag(this.result).subList(first,
first + count).iterator();
   }

   public IModel model(final Object object) {
 return

Increasing session size

2009-01-29 Thread Jürgen Lind

One more thing: just as a rule of thumb, what would be a reasonable
amount of data that gets added to the session for a single request?
20k? 100k?

Regards,

J.



Michael Sparer wrote:

I took a cursory glance over your code and saw

 item.add(new Link(update, new Model(auftrag))

this way the auftrag gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
Serializable from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore. 


hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael 



Jürgen Lind-2 wrote:

After some twiddling I found that the PagingNavigator seems to be the
culprit.
If I leave it out, the session grows only moderately, when I put it in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

   @SpringBean
   private AuftragBA auftragBA;

   public AuftragUebersicht() {
 this.initComponents();
   }

   private void initComponents() {

 final AuftragDataView auftragDataView = new
AuftragDataView(resultList,
 new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

 Form form = new Form(searchForm) {

   public Form initComponents() {
 final TextField auftragsnummerField = new
TextField(auftragsnummer,
  new
Model());
 add(auftragsnummerField);

 Button searchButton = new Button(search) {
   public void onSubmit() {
 String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

 AuftragDataProvider p = (AuftragDataProvider)
  auftragDataView.getDataProvider();
 p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

 if (auftragDataView.getDataProvider().size() == 0) {
   AuftragUebersicht.this.info(No results found!);
 }
   }
 };
 add(searchButton);

 return this;
   }

 }.initComponents();

 WebMarkupContainer resultListContainer = new
WebMarkupContainer(resultListContainer) {
   public boolean isVisible() {
 return auftragDataView.getDataProvider().size()  0;
   }
 };

 CheckGroup group = new CheckGroup(group, new
ArrayListPartnerAuftrag());

 group.add(new CheckGroupSelector(groupselector));

 group.add(auftragDataView);

 resultListContainer.add(new PagingNavigator(navigator,
auftragDataView));

 resultListContainer.add(group);

 form.add(resultListContainer);

 this.add(form);

   }
}

public class AuftragDataView extends DataView {

   public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
 super(id, dataProvider, itemsPerPage);
   }

   @Override
   protected void populateItem(final Item item) {

 final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
 item.add(new Label(auftragsnummer, auftrag.getAuftragsnummer()));
 ...

 item.add(new Link(update, new Model(auftrag)) {
   public void onClick() {
 AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
 setResponsePage(page);
   }
 });

 item.add(new AttributeModifier(class, true, new
AbstractReadOnlyModel() {
   public Object getObject() {
 return (item.getIndex() % 2 == 1) ? even : odd;
   }
 }));
   }

   @Override
   protected void onDetach() {
 super.onDetach();
   }
}

public class AuftragDataProvider implements IDataProvider {

   private AuftragBA  auftragBA;
   private AuftragUebersichtQuery query;

   private CollectionPartnerAuftrag result;

   public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
auftragBA) {
 this.query = query;
 this.auftragBA = auftragBA;
   }

   public AuftragUebersichtQuery getQuery() {
 return this.query;
   }

   public void setQuery(AuftragUebersichtQuery query) {
 this.query = query;
 this.result = null;
   }

   public IteratorPartnerAuftrag iterator(int first, int count) {
 if (this.result == null) {
   this.performQuery();
 }
 return new ArrayListPartnerAuftrag(this.result).subList(first,
first + count).iterator();
   }

   public IModel model(final Object object) {
 return new DetachablePartnerAuftragModel((PartnerAuftrag) object,
this.auftragBA);
   }

   public int size() {
 if (this.result == null) {
   this.performQuery();
 }
 return this.result.size();
   }

   public void detach() {
 this.result = null;
   }

   private void performQuery() {
 ...
   }
}


public class DetachablePartnerAuftragModel extends LoadableDetachableModel
{

   private Long  id;
   private AuftragBA auftragBA;

   public

Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting point
was Chapter 5.5.2 of Wicket in Action where it is recommended to provide
your own ItemModel if the underlying list changes frequently. To try out
how Wicket behaves without such a custom ItemModel, I wrote the following
Test:

body
  em wicket:id=listview
span wicket:id=label/spana wicket:id=deletedelete/a
  /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

  @Override
  protected Object load() {
System.out.println(load);
return Arrays.asList(new TestItem[] {
new TestItem(a + Math.random()),
new TestItem(b + Math.random()),
new TestItem(c + Math.random()) });
  }

  protected void onDetach() {
System.out.println(detach);
  }

};

ListView listview = new ListView(listview, model) {
  protected void populateItem(ListItem item) {
final TestItem itemModel = (TestItem) item.getModelObject();
item.add(new Label(label, itemModel.toString()));
item.add(new Link(delete) {

  @Override
  public void onClick() {
System.out.println(Delete  + itemModel);
  }
});
  }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would call the
load Method of the LoadableDetachableModel before printing Delete... as the
default implementation will use the index and the list to determine the item to
delete. To my surprise, however, the Delete... message is printed with the
correct item and the load Method is called afterwards. In my understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket seems to
have a copy of the original list somewhere so that it can determine the list
item on which the action was invoked before loading the underlying list.

Can someone spot my mistake?

Thanks,

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind

Igor Vaynberg wrote:

your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});



Thank you for your quick reply.

Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
a custom Model is used to illustrate the solution. However, I thought my
test would show me the problem first... Using your code above, the
effect is as expected, i.e. the wrong (new) item is returned to be
deleted.

Now, the question is, what is wrong with my first implementation?
It would seem that the problem that is solved using a custom ItemModel
does not even occur. Or does that code prevent wicket from effectively
detaching model objects and should thus be avoided? What would be the
best practice here?


J.


-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting point
was Chapter 5.5.2 of Wicket in Action where it is recommended to provide
your own ItemModel if the underlying list changes frequently. To try out
how Wicket behaves without such a custom ItemModel, I wrote the following
Test:

body
 em wicket:id=listview
   span wicket:id=label/spana wicket:id=deletedelete/a
 /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

 @Override
 protected Object load() {
   System.out.println(load);
   return Arrays.asList(new TestItem[] {
   new TestItem(a + Math.random()),
   new TestItem(b + Math.random()),
   new TestItem(c + Math.random()) });
 }

 protected void onDetach() {
   System.out.println(detach);
 }

};

ListView listview = new ListView(listview, model) {
 protected void populateItem(ListItem item) {
   final TestItem itemModel = (TestItem) item.getModelObject();
   item.add(new Label(label, itemModel.toString()));
   item.add(new Link(delete) {

 @Override
 public void onClick() {
   System.out.println(Delete  + itemModel);
 }
   });
 }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would call the
load Method of the LoadableDetachableModel before printing Delete... as
the
default implementation will use the index and the list to determine the item
to
delete. To my surprise, however, the Delete... message is printed with the
correct item and the load Method is called afterwards. In my
understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket seems
to
have a copy of the original list somewhere so that it can determine the list
item on which the action was invoked before loading the underlying list.

Can someone spot my mistake?

Thanks,

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind


Thanks for the explanation. Still, one questions remains: is there
a fundamental problem with the first approach or is it ok to use
the object directly?

J.

Igor Vaynberg wrote:

final TestItem itemModel = (TestItem) item.getModelObject();

^ on this line you retrieve the object from the model, you then use
this reference inside the onclick() which is called during another
request. since you use the model object reference directly it is not
loaded from the model.

my code, on the other hand, never keeps a direct reference to the
model object, instead it retrieves it from the model inside onclick()

-igor

On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Igor Vaynberg wrote:

your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});


Thank you for your quick reply.

Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
a custom Model is used to illustrate the solution. However, I thought my
test would show me the problem first... Using your code above, the
effect is as expected, i.e. the wrong (new) item is returned to be
deleted.

Now, the question is, what is wrong with my first implementation?
It would seem that the problem that is solved using a custom ItemModel
does not even occur. Or does that code prevent wicket from effectively
detaching model objects and should thus be avoided? What would be the
best practice here?


J.


-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting point
was Chapter 5.5.2 of Wicket in Action where it is recommended to
provide
your own ItemModel if the underlying list changes frequently. To try out
how Wicket behaves without such a custom ItemModel, I wrote the following
Test:

body
 em wicket:id=listview
  span wicket:id=label/spana wicket:id=deletedelete/a
 /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

 @Override
 protected Object load() {
  System.out.println(load);
  return Arrays.asList(new TestItem[] {
  new TestItem(a + Math.random()),
  new TestItem(b + Math.random()),
  new TestItem(c + Math.random()) });
 }

 protected void onDetach() {
  System.out.println(detach);
 }

};

ListView listview = new ListView(listview, model) {
 protected void populateItem(ListItem item) {
  final TestItem itemModel = (TestItem) item.getModelObject();
  item.add(new Label(label, itemModel.toString()));
  item.add(new Link(delete) {

@Override
public void onClick() {
  System.out.println(Delete  + itemModel);
}
  });
 }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would call
the
load Method of the LoadableDetachableModel before printing Delete...
as
the
default implementation will use the index and the list to determine the
item
to
delete. To my surprise, however, the Delete... message is printed with
the
correct item and the load Method is called afterwards. In my
understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket
seems
to
have a copy of the original list somewhere so that it can determine the
list
item on which the action was invoked before loading the underlying list.

Can someone spot my mistake?

Thanks,

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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




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

Re: Problem understanding LoadableDetachableModel and ListViews

2008-10-02 Thread Jürgen Lind

I see. So for a small application with few users, the approach might be
ok if I can live with a higher memory consumption. For larger
applications, using a loadable detachable model would be preferable.

Thank you for the clarification.

J.


Igor Vaynberg wrote:

yes, there is a huge fundamental problem with your approach: you keep
the object reference which means the object is serialized instead of
being retrieved through a loadable detachable model.

-igor

On Thu, Oct 2, 2008 at 10:54 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Thanks for the explanation. Still, one questions remains: is there
a fundamental problem with the first approach or is it ok to use
the object directly?

J.

Igor Vaynberg wrote:

final TestItem itemModel = (TestItem) item.getModelObject();

^ on this line you retrieve the object from the model, you then use
this reference inside the onclick() which is called during another
request. since you use the model object reference directly it is not
loaded from the model.

my code, on the other hand, never keeps a direct reference to the
model object, instead it retrieves it from the model inside onclick()

-igor

On Thu, Oct 2, 2008 at 10:10 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Igor Vaynberg wrote:

your link works on the object and not on the model, instead

add(new link(delete, item.getmodel()) { onclick() {
delete(getmodelobject()); }});


Thank you for your quick reply.

Well the code is roughly the same(?) as in Listing 5.12 of WiA and there
a custom Model is used to illustrate the solution. However, I thought my
test would show me the problem first... Using your code above, the
effect is as expected, i.e. the wrong (new) item is returned to be
deleted.

Now, the question is, what is wrong with my first implementation?
It would seem that the problem that is solved using a custom ItemModel
does not even occur. Or does that code prevent wicket from effectively
detaching model objects and should thus be avoided? What would be the
best practice here?


J.


-igor

On Thu, Oct 2, 2008 at 9:04 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi there,

I have been struggling for some time now to understand how
LoadableDetachableModel and a ListView work together. The starting
point
was Chapter 5.5.2 of Wicket in Action where it is recommended to
provide
your own ItemModel if the underlying list changes frequently. To try
out
how Wicket behaves without such a custom ItemModel, I wrote the
following
Test:

body
 em wicket:id=listview
 span wicket:id=label/spana wicket:id=deletedelete/a
 /em
/body


LoadableDetachableModel model = new LoadableDetachableModel() {

 @Override
 protected Object load() {
 System.out.println(load);
 return Arrays.asList(new TestItem[] {
 new TestItem(a + Math.random()),
 new TestItem(b + Math.random()),
 new TestItem(c + Math.random()) });
 }

 protected void onDetach() {
 System.out.println(detach);
 }

};

ListView listview = new ListView(listview, model) {
 protected void populateItem(ListItem item) {
 final TestItem itemModel = (TestItem) item.getModelObject();
 item.add(new Label(label, itemModel.toString()));
 item.add(new Link(delete) {

   @Override
   public void onClick() {
 System.out.println(Delete  + itemModel);
   }
 });
 }
};

add(listview);


Now, I would expect that when I hit the delete link, Wicket would
call
the
load Method of the LoadableDetachableModel before printing
Delete...
as
the
default implementation will use the index and the list to determine the
item
to
delete. To my surprise, however, the Delete... message is printed
with
the
correct item and the load Method is called afterwards. In my
understanding,
this contradicts the idea of the LoadableDetachableModel since Wicket
seems
to
have a copy of the original list somewhere so that it can determine the
list
item on which the action was invoked before loading the underlying
list.

Can someone spot my mistake?

Thanks,

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


--
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: [EMAIL

PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind

Hi,

I a currently a bit stuck in dealing with a PageableListView and a detachable
model. I have build my own model that wraps a list of search results that should
exists as long as the page remains the same, i.e. across all requests that go
to the same page such as for navigation or sort actions. As soon as the page is
left, e.g. when the user navigates to the details page of a certain result,
the search result list is cleared.

However, it appears that the detach method is called immediately after the
PageableListView is rendered, i.e. at the end of each request. Is this
observation correct? And how would I deal with a requirement as described above?

Cheers,

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind

Hi Igor,

thanks for your reply.

Igor Vaynberg wrote:

detach() is indeed called in the end of every request.

what exactly is your requirement? you want to run the query once, upon
page entry, and then always reuse the same resultset without doing
another query? 


This is indeed what I would like to do. However, my current approach is
to keep to  original result list in memory and do the paging on the list without
further database queries. I might try that option later, currently I am
doing some kind of exploration of how to do things in wicket to derive a
more or less generic architecture for our wicket projects.

Cheers,

J.


in that case store the list of ids in your resultset as
a property of the page. the model of the listview can then retrieve
the subset of this list (based on the current page and number of items
needed) and do a select from foo where id in ( subset of id list )
query to retrieve the current window of data.

-igor

On Mon, Jun 23, 2008 at 11:25 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi,

I a currently a bit stuck in dealing with a PageableListView and a
detachable
model. I have build my own model that wraps a list of search results that
should
exists as long as the page remains the same, i.e. across all requests that
go
to the same page such as for navigation or sort actions. As soon as the page
is
left, e.g. when the user navigates to the details page of a certain
result,
the search result list is cleared.

However, it appears that the detach method is called immediately after the
PageableListView is rendered, i.e. at the end of each request. Is this
observation correct? And how would I deal with a requirement as described
above?

Cheers,

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind

Hi,

I am still a bit confused about one thing in the remark below: how can
the model of the list view return the required items? Should not the model
be unaware that it is used by a list view?

J.


in that case store the list of ids in your resultset as
a property of the page. the model of the listview can then retrieve
the subset of this list (based on the current page and number of items
needed) and do a select from foo where id in ( subset of id list )
query to retrieve the current window of data.

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageableListView and Detachable Models

2008-06-23 Thread Jürgen Lind

Ok, but since I pass the model into the constructor of the listview, how
is the model informed which part of the data to load? Is there a method
that I have been missing?

J.

Igor Vaynberg wrote:

the model can be aware that it is used by the listview. the separation
here is that the listview is unaware of where or how its list is
built.

for database stuff i prefer using dataview, it has database semantics
more closely built into it.

-igor

On Mon, Jun 23, 2008 at 1:55 PM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi,

I am still a bit confused about one thing in the remark below: how can
the model of the list view return the required items? Should not the model
be unaware that it is used by a list view?

J.


in that case store the list of ids in your resultset as
a property of the page. the model of the listview can then retrieve
the subset of this list (based on the current page and number of items
needed) and do a select from foo where id in ( subset of id list )
query to retrieve the current window of data.

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket:head and HeaderContributors

2008-06-22 Thread Jürgen Lind

Hi,

as far as I noticed, Wicket first writes the code fragments of wicket:head
into the page and then the parts provided by the HeaderContributors. Is there
a way of changing that ordering? The background is that I want to load a
javascript library with a HeaderContributor and then use that library within
the wicket:head section.

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket:head and HeaderContributors

2008-06-22 Thread Jürgen Lind

Ok,

I understand your point and perhaps my whole setup is wrong. Here is my line
of thinking:

1. I have a component that needs some Javascript.
2. The Javascript relies on an external library.
3. There may be several instances of the component on the page.
4. Other components on the page may have some Javascript as well and
   may also need the same library.
5. I want to make sure that the library is loaded only once (which
   I can achieve nicely with a HeaderContributor)

Is there some other way to handle this situation?

J.

Igor Vaynberg wrote:

if we switch the ordering then someone else will complain :)

maybe they add a javascript library via wickethead and have a
contributor spitting out some dynamic javascript.

point is its a bad idea to depend on the ordering, whichever way it
currently is.

-igor

On Sun, Jun 22, 2008 at 9:52 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi,

as far as I noticed, Wicket first writes the code fragments of wicket:head
into the page and then the parts provided by the HeaderContributors. Is
there
a way of changing that ordering? The background is that I want to load a
javascript library with a HeaderContributor and then use that library within
the wicket:head section.

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Session Creation Problem

2008-06-20 Thread Jürgen Lind

Hi,

I am facing a little annoyance in conjunction with session creation that I have
been unable to fix until now:

1. My pages are guarded using MetaDataRoleAuthorizationStrategy
2. When the homepage is opened, the user is redirected to the Login page
3. Now, if the user does not fill out the form immediately but waits very long,
   a Page Expired error is thrown when the form is submitted

As I said, this is not a big problem but rather an annoyance that I would like
to have fixed. Can anybody tell me what the problem is? I assume that a session
is created immediately when the user opens the home page. How can I avoid this
behavior?

Kind Regards,

Jürgen

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Creation Problem

2008-06-20 Thread Jürgen Lind

Hi,

I tried using a stateless form for the Login page, but it seems that a new
session is created before the page is even called. I inserted a stacktrack
output in the constructor of my Wicket-Session (which happens to be s subclass
of AuthenticatedWebSession)  and that trace shows me that
AuthenticatedWebApplication.newSession is called by wicket somewhere in the
application lifecycle.

I can reproduce the behavior by adding a logout link that invalidates the
current  session and redirects to the Homepage (implying a redirect to the Login
page). Again, a new session is created immediately by wicket. Any clues?

J.

Igor Vaynberg wrote:

use a stateless form

-igor

On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi,

I am facing a little annoyance in conjunction with session creation that I
have
been unable to fix until now:

1. My pages are guarded using MetaDataRoleAuthorizationStrategy
2. When the homepage is opened, the user is redirected to the Login page
3. Now, if the user does not fill out the form immediately but waits very
long,
  a Page Expired error is thrown when the form is submitted

As I said, this is not a big problem but rather an annoyance that I would
like
to have fixed. Can anybody tell me what the problem is? I assume that a
session
is created immediately when the user opens the home page. How can I avoid
this
behavior?

Kind Regards,

Jürgen

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Creation Problem

2008-06-20 Thread Jürgen Lind

Hi Igor,

thanks for your support. Still I am a bit confused about the two types
of sessions we are dealing with: as far as I understood, there is a wicket
session that is stored within the http session of the container. Now, which
session is responsible for the Page Expired situations? The Wicket session
or the http session? If it would be the http session then it should not matter
whether a wicket session is created or not as long as the wicket session is
not bound to a http session, right? BTW: for not wasting your time, any links
to documentation on the matter would be great as well. I looked through the
wicket docs but did not find anything relevant.

Cheers,

J.

Igor Vaynberg wrote:

wicket will create session instances for every request if there is no
session stored in httpsession. the session is stored into httpsession
only when the user encounters a stateful page.

i am guessing that since you changed the form to stateless the page
itself is no longer stateful and so wicket will not save it into
session, thus it creates an interim session for the duration of the
request.

if you want to manually bind the session then call bind() on it.

-igor

On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi,

I tried using a stateless form for the Login page, but it seems that a new
session is created before the page is even called. I inserted a stacktrack
output in the constructor of my Wicket-Session (which happens to be s
subclass
of AuthenticatedWebSession)  and that trace shows me that
AuthenticatedWebApplication.newSession is called by wicket somewhere in the
application lifecycle.

I can reproduce the behavior by adding a logout link that invalidates the
current  session and redirects to the Homepage (implying a redirect to the
Login
page). Again, a new session is created immediately by wicket. Any clues?

J.

Igor Vaynberg wrote:

use a stateless form

-igor

On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi,

I am facing a little annoyance in conjunction with session creation that
I
have
been unable to fix until now:

1. My pages are guarded using MetaDataRoleAuthorizationStrategy
2. When the homepage is opened, the user is redirected to the Login page
3. Now, if the user does not fill out the form immediately but waits very
long,
 a Page Expired error is thrown when the form is submitted

As I said, this is not a big problem but rather an annoyance that I would
like
to have fixed. Can anybody tell me what the problem is? I assume that a
session
is created immediately when the user opens the home page. How can I avoid
this
behavior?

Kind Regards,

Jürgen

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Creation Problem

2008-06-20 Thread Jürgen Lind

Hi,

thanks again for your help, replacing the form by the stateless form has done
the job as I could verify by lowering the http session timeout. What I still do
not fully understand is why the error has now disappeared because still a full
http session is created as I can see from the Tomcat Management Console. Anyway,
perhaps I will take me some time to figure it out by looking into the source...

Thanks,

J.

Igor Vaynberg wrote:

once the wicket sesson object is bound (stored in httpsesson) their
lifecycles are the same. it is httpsession timing out that causes page
expired errors.

-igor

On Fri, Jun 20, 2008 at 9:08 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi Igor,

thanks for your support. Still I am a bit confused about the two types
of sessions we are dealing with: as far as I understood, there is a wicket
session that is stored within the http session of the container. Now, which
session is responsible for the Page Expired situations? The Wicket session
or the http session? If it would be the http session then it should not
matter
whether a wicket session is created or not as long as the wicket session is
not bound to a http session, right? BTW: for not wasting your time, any
links
to documentation on the matter would be great as well. I looked through the
wicket docs but did not find anything relevant.

Cheers,

J.

Igor Vaynberg wrote:

wicket will create session instances for every request if there is no
session stored in httpsession. the session is stored into httpsession
only when the user encounters a stateful page.

i am guessing that since you changed the form to stateless the page
itself is no longer stateful and so wicket will not save it into
session, thus it creates an interim session for the duration of the
request.

if you want to manually bind the session then call bind() on it.

-igor

On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi,

I tried using a stateless form for the Login page, but it seems that a
new
session is created before the page is even called. I inserted a
stacktrack
output in the constructor of my Wicket-Session (which happens to be s
subclass
of AuthenticatedWebSession)  and that trace shows me that
AuthenticatedWebApplication.newSession is called by wicket somewhere in
the
application lifecycle.

I can reproduce the behavior by adding a logout link that invalidates
the
current  session and redirects to the Homepage (implying a redirect to
the
Login
page). Again, a new session is created immediately by wicket. Any clues?

J.

Igor Vaynberg wrote:

use a stateless form

-igor

On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi,

I am facing a little annoyance in conjunction with session creation
that
I
have
been unable to fix until now:

1. My pages are guarded using MetaDataRoleAuthorizationStrategy
2. When the homepage is opened, the user is redirected to the Login
page
3. Now, if the user does not fill out the form immediately but waits
very
long,
 a Page Expired error is thrown when the form is submitted

As I said, this is not a big problem but rather an annoyance that I
would
like
to have fixed. Can anybody tell me what the problem is? I assume that a
session
is created immediately when the user opens the home page. How can I
avoid
this
behavior?

Kind Regards,

Jürgen

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


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

fieldlabel Component

2008-06-01 Thread Jürgen Lind

Hi,

I am looking for the solution for a quite common problem: I want the label
of a form element to change its color if the input is invalid. Searching the
web I found some very old postings of Igor and Jonathan discussing this matter;
however, I have not found any links to the final solution. Can someone help
me and point me to a solution for this problem?

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: fieldlabel Component

2008-06-01 Thread Jürgen Lind

Thx,

J.

Martijn Dashorst wrote:

label.add(new AttributeModifier(class, true, new Model() { public
Object getObject() { return formcomponent.isValid() ?  : error;
}});


On Sun, Jun 1, 2008 at 8:05 PM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi,

I am looking for the solution for a quite common problem: I want the label
of a form element to change its color if the input is invalid. Searching the
web I found some very old postings of Igor and Jonathan discussing this
matter;
however, I have not found any links to the final solution. Can someone help
me and point me to a solution for this problem?

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Manipulate Component Markup before rendering

2008-05-31 Thread Jürgen Lind

Hi Erik,

thank you for the suggestion. I tried that already and it did not work. Any
component defined within the script area seems to be ignored by wicket, i.e.
when I define the label in the Java code, I get an error message stating that
the component was not declared in the markup file... What I am currently using
is the following code:

  protected void onRender(MarkupStream markupStream) {
super.onRender(markupStream);
final MarkupStream associatedMarkupStream = getAssociatedMarkupStream(true);
MarkupElement element = associatedMarkupStream.get(2);
getResponse().write(this.replaceParameters(element.toString()));
  }

The problem here is, that I know that the markup element I want is at the second
position. However, this is not very robust ;-)

Cheers,

J.


Erik van Oosten wrote:

Hello Jürgen,

You coulld put a span in the markup and add a Label to it. Don't 
forget to call setRenderBodyOnly(true) on the label.


Regards,
   Erik.

Jürgen Lind wrote:

Hi,

I was wondering if there is some way to rewrite the component markup 
before

it is rendered. My setting is as follows:

1. I have a component markup file like this

   wicket:panel
 script type=text/javascript
   someFunction( runtime parameter );
 /script
   /wicket:panel

2. The matching component overrides onComponentTagBody and onRender

  protected final void onComponentTagBody(final MarkupStream 
markupStream,

  final ComponentTag openTag) {
checkComponentTag(openTag, textarea);
replaceComponentTagBody(markupStream, openTag, getValue());
  }

  protected void onRender(MarkupStream markupStream) {
super.onRender(markupStream);
super.renderAssociatedMarkup(panel, Some error);
  }

Now, what I would like to do is to change the value for the runtime 
parameter
in the onRender Method and replace it with a value that has been given 
to the

component when the component was constructed.

Is there any way to achieve this?

Regards,

J.




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Manipulate Component Markup before rendering

2008-05-30 Thread Jürgen Lind

Hi,

I was wondering if there is some way to rewrite the component markup before
it is rendered. My setting is as follows:

1. I have a component markup file like this

   wicket:panel
 script type=text/javascript
   someFunction( runtime parameter );
 /script
   /wicket:panel

2. The matching component overrides onComponentTagBody and onRender

  protected final void onComponentTagBody(final MarkupStream markupStream,
  final ComponentTag openTag) {
checkComponentTag(openTag, textarea);
replaceComponentTagBody(markupStream, openTag, getValue());
  }

  protected void onRender(MarkupStream markupStream) {
super.onRender(markupStream);
super.renderAssociatedMarkup(panel, Some error);
  }

Now, what I would like to do is to change the value for the runtime parameter
in the onRender Method and replace it with a value that has been given to the
component when the component was constructed.

Is there any way to achieve this?

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multi-window application problem

2008-05-28 Thread Jürgen Lind

Hi,

the Problem has been solved (the Model Objects were not Serializable). Should
I simply close the issue or will that be done by someone of the development
team.

As a general improvement, I would suggest that the Exceptions that are
caused by non-serializable Objects should be more obvious for the developer.

I'm sorry for any effort that my question might have caused now that the
solution is quite straightforward.

Cheers,

J.


Gwyn Evans wrote:

Enough to demonstrate the problem...

What he's meaning is that you should, using a quickstart app as a
base, try  reproduce the behaviour with the minimum amount of
'surplus' code, so that it can be investigated  debugged by one of
the developers.  Using QS means that it's easier for the devs to build
 debug, rather than having to get to investigate various other build
systems.  It's a basic (and standard) Maven2 build environment.

/Gwyn

On Mon, May 26, 2008 at 8:00 AM, Jürgen Lind [EMAIL PROTECTED] wrote:

Hi Igor,

thanks for the reply. Unfortunately, I am not using quickstart for my
test application. So which part of the application is best to  be included
in the ticket?

J.

Igor Vaynberg wrote:

seems like a bug. please create a jira ticket with the quickstart
attached.

-igor

On Sun, May 25, 2008 at 1:14 PM, Jürgen Lind [EMAIL PROTECTED]
wrote:

Hi,

I am currently evaluating Wicket for our next project and so far, Wicket
has
met or exceeded all my expectations. A very good and intuitive framework!

However, for some time now, I am stuck with getting my test application
to
work
in multi-window mode. The use-case is quite standard: I have a list of
items
and
each item has a link that takes me to the details page for that item. Now
I
want
to be able to have several detail pages open at the same time. The
problem
that
I am facing is, that whenever I open a details link using the browsers
open
in
new window feature for a new window, I get a page expired error in the
list
page whenever I try to open a second window. I have already striped down
the
code to find out that the error occurs whenever the details page has a
form
inside. Without the form, I can open as many windows as I like, if I have
a
form
the application fails.

I have already done some research on Wicket and Multi-window applications
and
while I have found out some aspects (such as setting the
 automaticMultiWindowSupport flag to true) I have not found anything
with
respect to the behavior I am experiencing right now.

Is there anything apparent (or perhaps not so apparent) that I have been
 missing?

Kind regards,

Jürgen

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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



--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multi-window application problem

2008-05-25 Thread Jürgen Lind

Hi,

I am currently evaluating Wicket for our next project and so far, Wicket has
met or exceeded all my expectations. A very good and intuitive framework!

However, for some time now, I am stuck with getting my test application to work
in multi-window mode. The use-case is quite standard: I have a list of items and
each item has a link that takes me to the details page for that item. Now I want
to be able to have several detail pages open at the same time. The problem that
I am facing is, that whenever I open a details link using the browsers open in
new window feature for a new window, I get a page expired error in the list
page whenever I try to open a second window. I have already striped down the
code to find out that the error occurs whenever the details page has a form
inside. Without the form, I can open as many windows as I like, if I have a form
the application fails.

I have already done some research on Wicket and Multi-window applications and
while I have found out some aspects (such as setting the
 automaticMultiWindowSupport flag to true) I have not found anything with
respect to the behavior I am experiencing right now.

Is there anything apparent (or perhaps not so apparent) that I have been
 missing?

Kind regards,

Jürgen

--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]