AjaxFormComponentUpdatingBehavior( "change" ) on a DropDownChoice

2013-07-04 Thread lucast
Dear Forum, 

I have a drop down choice for populating form fields with default values. 

To achieve this, I have added an AjaxFormComponentUpdatingBehavior( "change"
) to the drop down choice. Inside the
AjaxFormComponentUpdatingBehavior.onUpdate() I populate all fields of the
form and call target.add() for refreshing the form fields.

Also, inside the form, I have an ajax button (not the main form submit
button), which I have set to ajaxbutton.setDefaultFormProcessing( false ); 

The ajaxbutton.onSubmit(AjaxRequestTarget target, Form form) is empty.
Just a simple println() statement for testing purposes.

The problem I have now is that if I click the ajaxbutton, the drop down
choice ajax no longer updates the form fields. 

However, if I set ajaxbutton.setDefaultFormProcessing( true ); then the drop
down choice ajax works as expected.

Has anyone encountered a similar problem? I'm clueless and It's doing my
head in. 
The problem is that I tried to reproduce it on a stand-alone page and I
cannot even reproduce the bug.

Thanks in advance,
Lucas



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-change-on-a-DropDownChoice-tp4660065.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



[ANNOUNCE] WicketStuff 6.8.0 is released

2013-07-04 Thread Martin Grigorov
Hi,

WicketStuff core 6.9.0 based on Apache Wicket 6.9.0 is released and shortly
will be available in Maven Central.

The changelog for this release is:

svenmeier (8):
  new method #path() to get method invocation path without binding to a
target
  getObjectClass() can optionally return null; use result object's type
as fallback
  test binding to different targets
  prevent exceptions thrown for control flow
  fallback using getObject().getClass() for type erasure; testing
FormComponent lifecycle
  testing form submit too
  fixed test; simplified getObjectClass()
  correction of exceptions: getObjectType and getObjectClass return
null if type cannot be determined

Martin Tzvetanov Grigorov (7):
  [gmap3] Change the scope of jetty to 'provided' to be able to build it
  Build against Wicket 6.9.0-SNAPSHOT
  [stateless] Fixes #223 - Merge indexed parameters too
  [annotation-event] Add IInitializer that configures the application
automatically
  [annotation-event] Introduce an additional package 'annotation' one
lever deeper than 'event'
  [annotation-event] Introduce an additional package 'annotation' one
lever deeper than 'event'
  Remove a repository used to test Wicket 6.7.0 release
  Release 6.9.0

Horsed (6):
  [jWicket] added an integration of the jQuery UI tooltip widget
  [jWicket UI tooltip] tooltip content can now be obtained from the
data-tooltip attribute; added examples
  [jwicket-ui-tooltip] tooltip can now be used without css resource
  fixed comments
  [jWicket ui tooltip] items option now defaults to component's markup
id or document when added to a page
  Merge branch 'master' of https://github.com/wicketstuff/core

Michael Mosmann (6):
  kryo2 serializer report output
  kryo2 report refactor
  kryo2-viz d3js works
  Merge remote-tracking branch 'origin/master' into kryo2-viz
  kryo2 lic header fixed
  layout change for kryo2 reports

Martin Grigorov (5):
  Merge pull request #224 from tremel/master
  Merge pull request #229 from bumbumer/master
  Merge pull request #230 from jsarman/master
  Merge pull request #231 from jsarman/master
  Merge pull request #232 from jsarman/master

John Sarman (3):
  Add Glassfish4 Integration package
  Removed unneeded groupid
  Refactored to proper package.

bitstorm (3):
  Fix for InPlaceEditBehavior (#120) and for double encoding (#220)
  Merge branch 'master' of https://github.com/wicketstuff/core
  Workaround for issue https://issues.apache.org/jira/browse/WICKET-5248

tremel (2):
  Change jasperreport dependency to groupId net.sf.jasperreports to
have actual version of jasperreports lib. Make object tag work in
SimplePdfPage.
  Merge remote-tracking branch 'upstream/master'

Bartosz Jakubowski (1):
  [stateless] Merge indexed parameters before jsessionid

Edvard Fonsell (1):
  Annotation based event dispatcher

martin.knopf (1):
  [urlfragment] added super class constructors


The WicketStuff team


Re: Updating forms model causes panel to lose model

2013-07-04 Thread Paul Bors
Well if its a CPM and you error is:

Caused by: java.lang.RuntimeException: An error occurred while getting the
model object for Component: [AccountInfoPanel [Component id =
accountInfoPanel, page =
com.trifork.pengeplan.web.app.secure.transactions.AddTransactionPage, path
= 2:entityEdit:accountInfoPanel.AccountInfoPanel, isVisible = true,
isVersioned = true], children = [Component id = ownedAccountType]

Your path seems to be:
entityEdit:accountInfoPanel.AccountInfoPanel

I take it entityEdit is your form, then your CPM should have an object with a 
getAccountInfoPanel.AccountInfoPabel()

In other words if you're using CPM then make sure the POJO that backs it up has 
fields matching your wicket IDs nested through getters and setters.

However, Wicket's idiom is to nest models. On your panel inside the form for 
each form field use new PropertyModel("myClassFieldName", getModel())

This should have the PropertyModel use the parent's CPM and look up for the 
property you really need.

~ Thank you,
   Paul C Bors

On Jul 4, 2013, at 10:03, Tommy Sadiq Hinrichsen  wrote:

> Caused by: java.lang.RuntimeException: An error occurred while getting the
> model object for Component: [AccountInfoPanel [Component id =
> accountInfoPanel, page =
> com.trifork.pengeplan.web.app.secure.transactions.AddTransactionPage, path
> = 2:entityEdit:accountInfoPanel.AccountInfoPanel, isVisible = true,
> isVersioned = true], children = [Component id = ownedAccountType]

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



Re: fault in tree view

2013-07-04 Thread Sven Meier

That's really strange, the tree looks fine here.

Can you retry with a vanilla Firefox? Please clear the browser cache too.
Which Wicket version?

Sven

On 07/04/2013 04:16 PM, Piratenvisier wrote:

Ok I try it again


Am 04.07.2013 15:14, schrieb Sven Meier:

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) 
to decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTree tree, IModel model)

{
return new Folder(id, tree, model)
{
private static final long serialVersionUID = 1L;

@Override
protected MarkupContainer newLinkComponent(String id, 
IModel model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new 
PageParameters();

parameters.add("foo", foo.getId());

return new BookmarkablePageLink(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links 
to wicket pages

or where you can open a nodes panel in accordion style

- 


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




-
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: using jquery dialog instead of alert

2013-07-04 Thread Enoch James

If it works for you, then it's right.

On 7/4/2013 10:03 AM, fachhoch wrote:

I am trying to use jquery dialog instead of   javascript alert, I  am using
the jquery dialog   script and inserting wicket onclick script in the OK
:function.

In java  I am replacing the string myscript  with wicket ajax script.


  I tested, it works ,please advice  if this is right way to do?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-jquery-dialog-instead-of-alert-tp4660057.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



using jquery dialog instead of alert

2013-07-04 Thread fachhoch
I am trying to use jquery dialog instead of   javascript alert, I  am using
the jquery dialog   script and inserting wicket onclick script in the OK
:function.

In java  I am replacing the string myscript  with wicket ajax script.


 I tested, it works ,please advice  if this is right way to do?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-jquery-dialog-instead-of-alert-tp4660057.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



Updating forms model causes panel to lose model

2013-07-04 Thread Tommy Sadiq Hinrichsen
Hey

I have a form on a page.

In that form a have a panel.

When i change the forms model with setModel( A Compound PropertyModel)

The panel loose the model due to MarkupContainer line 780.

This is a problem because i want to get the model some time later in the
panel, but because its a compoundpropertymodel in the form, i get the
following error.

Caused by: java.lang.RuntimeException: An error occurred while getting the
model object for Component: [AccountInfoPanel [Component id =
accountInfoPanel, page =
com.trifork.pengeplan.web.app.secure.transactions.AddTransactionPage, path
= 2:entityEdit:accountInfoPanel.AccountInfoPanel, isVisible = true,
isVersioned = true], children = [Component id = ownedAccountType]
[Component id = depositoryType] [RepeatingView [Component id =
accountInfoView]]]
 at org.apache.wicket.Component.getDefaultModelObject(Component.java:1673)
~[wicket-core-1.5.6.jar:1.5.6]
at
org.apache.wicket.markup.html.panel.GenericPanel.getModelObject(GenericPanel.java:59)
~[wicket-core-1.5.6.jar:1.5.6]
 at
com.trifork.pengeplan.web.app.secure.transactions.AddTransactionsPageComponents.panel.AccountInfoPanel.onConfigure(AccountInfoPanel.java:151)
~[classes/:na]
 at org.apache.wicket.Component.configure(Component.java:1093)
~[wicket-core-1.5.6.jar:1.5.6]
at org.apache.wicket.Component.internalBeforeRender(Component.java:984)
~[wicket-core-1.5.6.jar:1.5.6]
 at org.apache.wicket.Component.beforeRender(Component.java:1027)
~[wicket-core-1.5.6.jar:1.5.6]
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1743)
~[wicket-core-1.5.6.jar:1.5.6]
 ... 49 common frames omitted
Caused by: org.apache.wicket.WicketRuntimeException: No get method defined
for class: class com.trifork.pengeplan.domain.CompleteAccountTransaction
expression: accountInfoPanel
 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:499)
~[wicket-core-1.5.6.jar:1.5.6]
at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:341)
~[wicket-core-1.5.6.jar:1.5.6]
 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:244)
~[wicket-core-1.5.6.jar:1.5.6]
at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:97)
~[wicket-core-1.5.6.jar:1.5.6]
 at
org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:134)
~[wicket-core-1.5.6.jar:1.5.6]
at org.apache.wicket.Component.getDefaultModelObject(Component.java:1668)
~[wicket-core-1.5.6.jar:1.5.6]
 ... 55 common frames omitted

Could someone please help me?


Med venlig hilsen / Best regards

Tommy Sadiq Hinrichsen


Re: fault in tree view

2013-07-04 Thread Sven Meier

ascii art?

;)

On 07/04/2013 03:05 PM, Piratenvisier wrote:

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other 
sequence of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTree tree, IModel model)

{
return new Folder(id, tree, model)
{
private static final long serialVersionUID = 1L;

@Override
protected MarkupContainer newLinkComponent(String id, 
IModel model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add("foo", foo.getId());

return new BookmarkablePageLink(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




-
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: fault in tree view

2013-07-04 Thread Piratenvisier

Hello Sven,

here are the screenshots.

Am 04.07.2013 09:10, schrieb Sven Meier:

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other sequence 
of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced 
nested view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTree tree, IModel model)

{
return new Folder(id, tree, model)
{
private static final long serialVersionUID = 1L;

@Override
protected MarkupContainer newLinkComponent(String id, 
IModel model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add("foo", foo.getId());

return new BookmarkablePageLink(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




-
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: markup not found exception for fragment which is part of wicket:extend

2013-07-04 Thread Rakesh A
Hi,

Thanks for the information , the 'markup provider' info - gave me some
insights and after debugging with this info, I was able to solve my issue by
adding a wrapper [WebMarkupContainer] in one of the classes in my class
hierarchy.

Thanks,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660052.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: markup not found exception for fragment which is part of wicket:extend

2013-07-04 Thread Sven Meier

Should be.

Sven

On 07/04/2013 12:10 PM, Rakesh A wrote:

Hi,

Will it be the same [dialog instance as markup provider instead of page
instance] if the fragment is part of wicket modal dialog?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660049.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: markup not found exception for fragment which is part of wicket:extend

2013-07-04 Thread Rakesh A
Hi,

Will it be the same [dialog instance as markup provider instead of page
instance] if the fragment is part of wicket modal dialog?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037p4660049.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Scheduled IRequestHandler never executed ?

2013-07-04 Thread Tobias Gierke

Hi Sven,

Hi,

when your behavior is triggered, an AjaxRequestHandler is already 
scheduled to generate the Ajax response for Wicket's JavaScript.
It doesn't make sense to replace scheduled handler with a fileDownload 
then. Whatever you'll send back to the browser, Wicket's JavaScript 
won't understand it.


You misunderstood me, closing the modal window is ofc an AJAX request 
and the response to this request contains



ajaxTarget.appendJavaScript("setTimeout(\"window.location.href='" + url 
+ "'\", 100);");


where URL is the actual 'download' behaviour's callback URL.  After 100 
ms the browser initiates a regular HTTP GET request and this is where I 
schedule my file download request handler (just like described in the 
link I posted).


Cheers,
Tobias



Sven

On 07/04/2013 11:04 AM, Tobias Gierke wrote:

Hi,

I have a modal dialog window that - after closing - should start a 
file download.


Basically I'm doing everything like in 
http://mail-archives.apache.org/mod_mbox/wicket-users/201304.mbox/%3c1364779681800-4657667.p...@n4.nabble.com%3E 
(AJAX response with setTimeout() call that redirects the browser to 
an AJAX behaviour which in turn invokes 
IRequestCycle#scheduleRequestHandlerAfterCurrent() to send the actual 
file data).


---
@Override
protected void respond(AjaxRequestTarget target)
{
getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( 
fileDownloadRequestHandler );

}
---

I've set a debugger breakpoint inside my respond() method and it's 
being correctly called after the modal dialog is closed - but for 
some reason the scheduled request handler never gets invoked by Wicket.


Cheers,
Tobias

-
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



[SOLVED] Re: Scheduled IRequestHandler never executed ?

2013-07-04 Thread Tobias Gierke
Sorry for the noise, I just found out that 
scheduleRequestHandlerAfterCurrent() silently accepts NULL handlers and 
I was passing a NULL value...



Sorry, forgot to mention that I'm using Wicket 1.5.8


Hi,

I have a modal dialog window that - after closing - should start a 
file download.


Basically I'm doing everything like in 
http://mail-archives.apache.org/mod_mbox/wicket-users/201304.mbox/%3c1364779681800-4657667.p...@n4.nabble.com%3E 
(AJAX response with setTimeout() call that redirects the browser to 
an AJAX behaviour which in turn invokes 
IRequestCycle#scheduleRequestHandlerAfterCurrent() to send the actual 
file data).


---
@Override
protected void respond(AjaxRequestTarget target)
{

getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( 
fileDownloadRequestHandler );

}
---

I've set a debugger breakpoint inside my respond() method and it's 
being correctly called after the modal dialog is closed - but for 
some reason the scheduled request handler never gets invoked by Wicket.


Cheers,
Tobias

-
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: Scheduled IRequestHandler never executed ?

2013-07-04 Thread Sven Meier

Hi,

when your behavior is triggered, an AjaxRequestHandler is already 
scheduled to generate the Ajax response for Wicket's JavaScript.
It doesn't make sense to replace scheduled handler with a fileDownload 
then. Whatever you'll send back to the browser, Wicket's JavaScript 
won't understand it.


Sven

On 07/04/2013 11:04 AM, Tobias Gierke wrote:

Hi,

I have a modal dialog window that - after closing - should start a 
file download.


Basically I'm doing everything like in 
http://mail-archives.apache.org/mod_mbox/wicket-users/201304.mbox/%3c1364779681800-4657667.p...@n4.nabble.com%3E 
(AJAX response with setTimeout() call that redirects the browser to an 
AJAX behaviour which in turn invokes 
IRequestCycle#scheduleRequestHandlerAfterCurrent() to send the actual 
file data).


---
@Override
protected void respond(AjaxRequestTarget target)
{
getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( 
fileDownloadRequestHandler );

}
---

I've set a debugger breakpoint inside my respond() method and it's 
being correctly called after the modal dialog is closed - but for some 
reason the scheduled request handler never gets invoked by Wicket.


Cheers,
Tobias

-
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: Scheduled IRequestHandler never executed ?

2013-07-04 Thread Tobias Gierke

Sorry, forgot to mention that I'm using Wicket 1.5.8


Hi,

I have a modal dialog window that - after closing - should start a 
file download.


Basically I'm doing everything like in 
http://mail-archives.apache.org/mod_mbox/wicket-users/201304.mbox/%3c1364779681800-4657667.p...@n4.nabble.com%3E 
(AJAX response with setTimeout() call that redirects the browser to an 
AJAX behaviour which in turn invokes 
IRequestCycle#scheduleRequestHandlerAfterCurrent() to send the actual 
file data).


---
@Override
protected void respond(AjaxRequestTarget target)
{

getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( 
fileDownloadRequestHandler );

}
---

I've set a debugger breakpoint inside my respond() method and it's 
being correctly called after the modal dialog is closed - but for some 
reason the scheduled request handler never gets invoked by Wicket.


Cheers,
Tobias

-
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



Scheduled IRequestHandler never executed ?

2013-07-04 Thread Tobias Gierke

Hi,

I have a modal dialog window that - after closing - should start a file 
download.


Basically I'm doing everything like in 
http://mail-archives.apache.org/mod_mbox/wicket-users/201304.mbox/%3c1364779681800-4657667.p...@n4.nabble.com%3E 
(AJAX response with setTimeout() call that redirects the browser to an 
AJAX behaviour which in turn invokes 
IRequestCycle#scheduleRequestHandlerAfterCurrent() to send the actual 
file data).


---
@Override
protected void respond(AjaxRequestTarget target)
{

getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent( 
fileDownloadRequestHandler );

}
---

I've set a debugger breakpoint inside my respond() method and it's being 
correctly called after the modal dialog is closed - but for some reason 
the scheduled request handler never gets invoked by Wicket.


Cheers,
Tobias

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



Re: Feedback message is not available for behaviors added to nested form components

2013-07-04 Thread James Selvakumar
Thanks Jesse & Sven for your explanations.
It worked like a charm after I set ListView#setReuseItems(true)
Thank you very much.


On Wed, Jul 3, 2013 at 3:12 PM, Jesse Long  wrote:

> Hi James,
>
> This is a shortened list of events happening, including only the ones
> affecting you. They are in the order in which they occur.
>
>  * IFormSubmitListener#**onFormSubmitted()
>  * ListView#onBeforeRender()
>  * Page#onRender()
>
> ListView#onBeforeRender() calls ListView#onPopulate(). If you are not
> using ListView#setReuseItems(true), then ListView#onPopulate() removes all
> children of ListView and re-creates them.
>
> So, the children of ListView that are present during Page#onRender() are
> not the same children that were present during 
> IFormSubmitListener#**onFormSubmitted(),
> and hence not the same children that had the feedback messages.
>
> Cheers,
> Jesse
>
>
> On 03/07/2013 02:35, James Selvakumar wrote:
>
>> No.
>>
>>
>> On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier  wrote:
>>
>>  Are you using listView.setReuseItems(true) ?
>>>
>>> Sven
>>>
>>>
>>> On 07/02/2013 11:13 AM, James Selvakumar wrote:
>>>
>>>  Hi all,

 I've the following component heirarchy:

 form:textField
 form:listView:panel-1:panel1DropDownChoice

 form:submitButton

 I've marked the all the form components as required.

 I also have a behavior that is added to all the form components (via
 IVisitor) which will make the respective feedback messages appear under
 the
 form components.

 It works perfectly for the form component "texField" which is directly
 attached to the form.

 However it doesn't work for for "panel1DropDownChoice".

 I've added some debug messages in the "validate()" method of
 "panel1DropDownChoice" and found that feedback messages are indeed
 generated.

 However from the debug messages in my behavior, I found that feedback
 messages were some how lost.

 This is the behavior I'm using. (Thanks London Wicket users)

 *public class ValidationMsgBehavior extends Behavior

 {
   private static Logger logger =
 LoggerFactory.getLogger(ValidationMsgBehavior.class);


   @Override
   public void afterRender(Component c)
   {
   logger.debug("Preparing to add validation msg for the
 component
 {}", c);
   FormComponent fc = (FormComponent) c;
   if (!fc.isValid()) {
   String error;
   if (fc.hasFeedbackMessage()) {
   logger.debug("Form component {} has feedback
 messages",
 fc);
   error =
 fc.getFeedbackMessages().first(FeedbackMessage.ERROR).

 getMessage().toString();
   } else {
   error = "Your input is invalid.";
   }
   fc.getResponse().write(
   "" + error + "");
   }else{
   logger.debug("Form component {} is valid", fc);
   }
   }
 }*

 Any clues? I've been trying to crack this for a whole day.


  --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org
>>> 
>>> >
>>>
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>


-- 
Thanks & regards
James Selvakumar
mCruncher


Re: Feedback message is not available for behaviors added to nested form components

2013-07-04 Thread James Selvakumar
Hi Sven,

I'm sorry I'm not adding components but I update the model so that the
ListView generates the components dynamically.


On Thu, Jul 4, 2013 at 3:16 PM, Sven Meier  wrote:

> Hi,
>
> ListView will create components for you based on the contents of the
> model. Why are you adding components?
>
> Sven
>
>
> On 07/04/2013 02:41 AM, James Selvakumar wrote:
>
>> Hi Jesse,
>>
>> I was not aware of this before. Thanks for the insight
>> But I do add/remove components to the ListView dynamically.
>> Will ListView#setReuseItems(true) affect that?
>>
>>
>> On Wed, Jul 3, 2013 at 3:12 PM, Jesse Long  wrote:
>>
>>  Hi James,
>>>
>>> This is a shortened list of events happening, including only the ones
>>> affecting you. They are in the order in which they occur.
>>>
>>>   * IFormSubmitListener#onFormSubmitted()
>>>
>>>   * ListView#onBeforeRender()
>>>   * Page#onRender()
>>>
>>> ListView#onBeforeRender() calls ListView#onPopulate(). If you are not
>>> using ListView#setReuseItems(true), then ListView#onPopulate() removes
>>> all
>>> children of ListView and re-creates them.
>>>
>>> So, the children of ListView that are present during Page#onRender() are
>>> not the same children that were present during IFormSubmitListener#
>>> onFormSubmitted(),
>>>
>>> and hence not the same children that had the feedback messages.
>>>
>>> Cheers,
>>> Jesse
>>>
>>>
>>> On 03/07/2013 02:35, James Selvakumar wrote:
>>>
>>>  No.


 On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier  wrote:

   Are you using listView.setReuseItems(true) ?

> Sven
>
>
> On 07/02/2013 11:13 AM, James Selvakumar wrote:
>
>   Hi all,
>
>> I've the following component heirarchy:
>>
>> form:textField
>> form:listView:panel-1:**panel1DropDownChoice
>>
>>
>> form:submitButton
>>
>> I've marked the all the form components as required.
>>
>> I also have a behavior that is added to all the form components (via
>> IVisitor) which will make the respective feedback messages appear
>> under
>> the
>> form components.
>>
>> It works perfectly for the form component "texField" which is directly
>> attached to the form.
>>
>> However it doesn't work for for "panel1DropDownChoice".
>>
>> I've added some debug messages in the "validate()" method of
>> "panel1DropDownChoice" and found that feedback messages are indeed
>> generated.
>>
>> However from the debug messages in my behavior, I found that feedback
>> messages were some how lost.
>>
>> This is the behavior I'm using. (Thanks London Wicket users)
>>
>> *public class ValidationMsgBehavior extends Behavior
>>
>> {
>>private static Logger logger =
>> LoggerFactory.getLogger(**ValidationMsgBehavior.class);
>>
>>
>>
>>@Override
>>public void afterRender(Component c)
>>{
>>logger.debug("Preparing to add validation msg for the
>> component
>> {}", c);
>>FormComponent fc = (FormComponent) c;
>>if (!fc.isValid()) {
>>String error;
>>if (fc.hasFeedbackMessage()) {
>>logger.debug("Form component {} has feedback
>> messages",
>> fc);
>>error =
>> fc.getFeedbackMessages().**first(FeedbackMessage.ERROR).**
>>
>>
>> getMessage().toString();
>>} else {
>>error = "Your input is invalid.";
>>}
>>fc.getResponse().write(
>>"" + error +
>> "");
>>}else{
>>logger.debug("Form component {} is valid", fc);
>>}
>>}
>> }*
>>
>> Any clues? I've been trying to crack this for a whole day.
>>
>>
>>   --**--**
>> --**
>>
> --**-
> To unsubscribe, e-mail: users-unsubscribe@wicket.apa**che.org<
> http://apache.org**>
> http://wicket.apache.org><
> users-unsubscribe@**wicket.apache.org
> >
>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James Selvakumar
mCruncher


Re: markup not found exception for fragment which is part of wicket:extend

2013-07-04 Thread Sven Meier

Hi,

I don't know why it did work in 1.4.x, but the following doesn't make sense:

final Fragment fragmentTwo = new Fragment(myList.newChildId(), 
"fragmentTwo", myList);


"myList" is not the provider of the fragment's markup, the ListView 
doesn't contain it.

It's the page which contains it:

final Fragment fragmentTwo = new Fragment(myList.newChildId(), 
"fragmentTwo", this);


This does work in 6.x

Sven

On 07/04/2013 07:50 AM, Rakesh A wrote:

Hi,

I am using Wicket v6.5.0, I've code where wicket fragments are part of
'' tag and I get exception that Markup is not found for the
fragment, same piece of code works in Wicket v1.4.21.

I created & attached a quick start with code similar to my case.

fragmentTest.zip


Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/markup-not-found-exception-for-fragment-which-is-part-of-wicket-extend-tp4660037.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: ConfirmAjaxFallbackLink with LoadableDetachableModel

2013-07-04 Thread Sven Meier

Looks fine to me. Can you create a quickstart?

Sven

On 07/04/2013 03:30 AM, Vignesh Palanisamy wrote:

Hi all,

I have  a ConfirmAjaxFallbackLink which is use to display confirmation
dialog, when a user attempts to delete an item in a datatable.

public abstract class ConfirmAjaxFallbackLink extends AjaxFallbackLink
{
 private String confirmMessage;
 private IModel confirmMessageModel;


 public ConfirmAjaxFallbackLink(String id, String confirmMessage)
 {
 super(id);
 this.confirmMessage = confirmMessage;
 }

 public ConfirmAjaxFallbackLink(String id, IModel messageModel)
 {
 super(id, messageModel);
 this.confirmMessageModel = messageModel;
 }

 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
 {
 super.updateAjaxAttributes(attributes);
 AjaxCallListener ajaxCallListener = new AjaxCallListener();
 if (confirmMessage != null) {
 ajaxCallListener.onPrecondition(new
JavaScriptEventConfirmation(confirmMessage).getBeforeHandler(this));
 } else {
 ajaxCallListener.onPrecondition(new
JavaScriptEventConfirmation(confirmMessageModel.getObject()).getBeforeHandler(this));
 }
 attributes.getAjaxCallListeners().add(ajaxCallListener);
 }

 @Override
 public abstract void onClick(AjaxRequestTarget target);
}



it works fine with static message and static model


but i want to load the message dynamically. so i use LoadableDetachableModel

like this

new ConfirmAjaxFallbackLink("deleteItemLink", new
LoadableDetachableModel()
 {
 @Override
 protected String load()
 {
 List activeUsages =
findActiveUsages();
 if (activeUsages.size() > 0) {
 return "This item is actively used in "
+activeUsages +", Do you still want to delete it?";
 }
 return "Do you want delete?"
 }
 })
 {
 @Override
 public void onClick(AjaxRequestTarget target)
 {
 onDelete(target);
 }
 };


But it doesn't load dynamically. while we refresh the page only it loading.


can you have any idea about it.



Thanks,
Vignesh





Re: Feedback message is not available for behaviors added to nested form components

2013-07-04 Thread Sven Meier

Hi,

ListView will create components for you based on the contents of the 
model. Why are you adding components?


Sven

On 07/04/2013 02:41 AM, James Selvakumar wrote:

Hi Jesse,

I was not aware of this before. Thanks for the insight
But I do add/remove components to the ListView dynamically.
Will ListView#setReuseItems(true) affect that?


On Wed, Jul 3, 2013 at 3:12 PM, Jesse Long  wrote:


Hi James,

This is a shortened list of events happening, including only the ones
affecting you. They are in the order in which they occur.

  * IFormSubmitListener#**onFormSubmitted()
  * ListView#onBeforeRender()
  * Page#onRender()

ListView#onBeforeRender() calls ListView#onPopulate(). If you are not
using ListView#setReuseItems(true), then ListView#onPopulate() removes all
children of ListView and re-creates them.

So, the children of ListView that are present during Page#onRender() are
not the same children that were present during 
IFormSubmitListener#**onFormSubmitted(),
and hence not the same children that had the feedback messages.

Cheers,
Jesse


On 03/07/2013 02:35, James Selvakumar wrote:


No.


On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier  wrote:

  Are you using listView.setReuseItems(true) ?

Sven


On 07/02/2013 11:13 AM, James Selvakumar wrote:

  Hi all,

I've the following component heirarchy:

form:textField
form:listView:panel-1:panel1DropDownChoice

form:submitButton

I've marked the all the form components as required.

I also have a behavior that is added to all the form components (via
IVisitor) which will make the respective feedback messages appear under
the
form components.

It works perfectly for the form component "texField" which is directly
attached to the form.

However it doesn't work for for "panel1DropDownChoice".

I've added some debug messages in the "validate()" method of
"panel1DropDownChoice" and found that feedback messages are indeed
generated.

However from the debug messages in my behavior, I found that feedback
messages were some how lost.

This is the behavior I'm using. (Thanks London Wicket users)

*public class ValidationMsgBehavior extends Behavior

{
   private static Logger logger =
LoggerFactory.getLogger(ValidationMsgBehavior.class);


   @Override
   public void afterRender(Component c)
   {
   logger.debug("Preparing to add validation msg for the
component
{}", c);
   FormComponent fc = (FormComponent) c;
   if (!fc.isValid()) {
   String error;
   if (fc.hasFeedbackMessage()) {
   logger.debug("Form component {} has feedback
messages",
fc);
   error =
fc.getFeedbackMessages().first(FeedbackMessage.ERROR).

getMessage().toString();
   } else {
   error = "Your input is invalid.";
   }
   fc.getResponse().write(
   "" + error + "");
   }else{
   logger.debug("Form component {} is valid", fc);
   }
   }
}*

Any clues? I've been trying to crack this for a whole day.


  --**

--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.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: fault in tree view

2013-07-04 Thread Sven Meier

Hi,

I don't see a difference here. Can you post screenshots somewhere?

Sven

On 07/03/2013 11:02 PM, Piratenvisier wrote:
If you open the stucture in beginners view you have an other sequence 
of nodes than in advanced nested view
Follow the path A AB ABB ABBA ABBB ABBBA ABC ABD AC in advanced nested 
view and try to follow it in beginners view.


Am 03.07.2013 22:53, schrieb Sven Meier:

Hi,

can you please explain how the branch is faulty or 'wrong'?

You can override NestedTree#newContentComponent(String, IModel) to 
decide the representation of a node's content:


  MyNestedTree extends NestedTree {
@Override
public Component newContentComponent(String id, final 
AbstractTree tree, IModel model)

{
return new Folder(id, tree, model)
{
private static final long serialVersionUID = 1L;

@Override
protected MarkupContainer newLinkComponent(String id, 
IModel model)

{
Foo foo = model.getObject();

if (tree.getProvider().hasChildren(foo))
{
return super.newLinkComponent(id, model);
}
else
{
PageParameters parameters = new PageParameters();
parameters.add("foo", foo.getId());

return new BookmarkablePageLink(id, 
tree.getPage().getClass(), parameters);

}
}
};
}
  }

Hope this helps
Sven


On 07/03/2013 10:24 PM, Piratenvisier wrote:

When you look at the tree structure in advanced nested view
there is a wrong branch A AB ABB ABBA ABBB ABBBA ABC ABD AC
I would like to use a tree structure where the nodes are links to 
wicket pages

or where you can open a nodes panel in accordion style

-
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




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