EditablePropertyColumn and a callback to save

2014-10-23 Thread Steve Swinsburg
I am using the inmethodgrid EditablePropertyColumn to allow inline edits of
a datatable.

What I want to do is have some sort of callback method registered on a cell
so that when a user edits it then tabs or clicks away, the method is fired,
so that I can immediately do something with the contents of the cell.

Is there a way to do this?

Thanks,
Steve


Re: EditablePropertyColumn and a callback to save

2014-10-23 Thread lucast
Hi Steve,
If I understand correctly, you would like to catch an ajax event fired from
the cell when you click away.

There are two ways you can do this, you can add an OnChangeAjaxBehavior()
class to the file:


Alternatively, you can add an AjaxEventBehavior to your object:



I hope that helps,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/EditablePropertyColumn-and-a-callback-to-save-tp4668048p4668049.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: Combine breadcrumb with a dataview

2014-10-23 Thread lucast
Hi Sanders,
I hope you don't mind me asking. Have you tried following the code execution
with a debugger?

I had a similar problem in the past and I realized that the existing
breadcrumb solution did not satisfy my needs so I had to extend the class to
make it fit.

I hope this helps.

Regards,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Combine-breadcrumb-with-a-dataview-tp4668040p4668050.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: EditablePropertyColumn and a callback to save

2014-10-23 Thread Martin Grigorov
Right!

You have to override
https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/editable/EditablePropertyColumn.java#L107
and attach such ajax behavior to the textfield on 'change'

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Oct 23, 2014 at 2:22 PM, lucast lucastol...@hotmail.com wrote:

 Hi Steve,
 If I understand correctly, you would like to catch an ajax event fired from
 the cell when you click away.

 There are two ways you can do this, you can add an OnChangeAjaxBehavior()
 class to the file:


 Alternatively, you can add an AjaxEventBehavior to your object:



 I hope that helps,
 Lucas

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/EditablePropertyColumn-and-a-callback-to-save-tp4668048p4668049.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: Lock timeout per page class

2014-10-23 Thread Guillaume Smet
Hi Martin,

On Wed, Oct 22, 2014 at 9:51 AM, Martin Grigorov mgrigo...@apache.org wrote:
 I'd like to avoid moving the logic that gets the timeout from
 Session.PageAccessSynchronizerProvider to PageAccessSynchronizer because
 this way it will use Application.get() everytime and most apps don't need
 to pay for this.

 A way to make it possible for you is to remove the 'final'
 from org.apache.wicket.Session#getPageManager and introduce overridable
 PageAccessSynchronizer#getTimeout(). This way you can use your own
 PageAccessSynchronizer.
 http://pastie.org/9667070

After a few experiments, here I am!

So, it mostly works: I thought it would be better to add something like:
protected IProviderPageAccessSynchronizer newPageAccessSynchronizerProvider()
{
return new PageAccessSynchronizerProvider();
}
in Session and call it from the constructor instead of removing the
final so I did that in my code.

It works pretty well BUT I haven't found a way to get the page class
in getTimeout without having the risk to trigger a resolvePageInstance
which will try to lock and then call getTimeout leading to a wonderful
stack overflow exception when dealing with
ListenerInterfaceRequestHandler.

Obviously (...) what interests me the most is the getTimeout in
ListenerInterfaceRequestHandler as it's often actions on buttons which
are long to run.

Here is what I have in mind for my Session class:
https://gist.github.com/gsmet/3b9e2775d25fadcef5ef

I must admit that an advice would be welcome as I wouldn't like to
have stack overflow errors popping out in weird edge cases.

Thanks!

-- 
Guillaume

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



Re: [7.0.0-SNAPSHOT] WebSocketResponse#sendError throws UnsupportedOperationException

2014-10-23 Thread Sebastien
Hi Martin,

I finally end up with the underlying issue, I will open a new thread for
that one... (I am not sure you will like it :s)

Regarding this thread, I confirm you that's important to log the error
instead of throwing the UnsupportedOperationException. Actually, the error
message was empty but at least it did not shortcut the other exception. I
made the change locally that's what helps me to understand what was
happening...

Thanks  best regards,
Sebastien.


On Mon, Oct 13, 2014 at 10:37 AM, Sebastien seb...@gmail.com wrote:

 Hi Martin,

 If #sendError() is called on purpose, then you are right it should not be
 ignored
 Sadly, I do not have many time to investigate more on this and try to
 understand the exact behavior and the relationship with the error thrown on
 my side. (It was part of a PoC I'm not supposed to work on for now...)

 I will let you know if I have some news...

 Thanks again  best regards,
 Sebastien.





Page Parameters logging

2014-10-23 Thread shareski
We have a secret parameter that we don't want to be logged in a stack trace
or anything. Right now we're using a custom IRequestHandler to intercept the
exception but I'm wondering if there's a more elegant way to do this.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Page-Parameters-logging-tp4668053.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



IndicatorAware and BookmarkablePageLink

2014-10-23 Thread msalman
Hi,

We use SuckerfishMenuPanel for our menus and in it the links use
BookmarkablePageLinks.  I need to make make some of the links (menu items)
IndicatorAware, i.e., show the whirling wheel, when clicked.

I tried some thing like following:

private class LinkIndicatingAwareBehaviour extends AjaxEventBehavior
implements IAjaxIndicatorAware
{

AjaxIndicatorAppender indicator;

public LinkIndicatingAwareBehaviour(
String event,
Link link) 
{
super(event);
this.indicator = new AjaxIndicatorAppender();
link.add(indicator);
}

@Override
public String getAjaxIndicatorMarkupId() 
{
return indicator.getMarkupId();
}

@Override
protected void onEvent(AjaxRequestTarget target) 
{
// please see BookmarkablePageLink.onClick()
}

}

This shows the busy indicator for a very short while and does not cover the
time when the page is getting ready to be shown.  So basically of no use.

can some one please suggest something?

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IndicatorAware-and-BookmarkablePageLink-tp4668056.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: EditablePropertyColumn and a callback to save

2014-10-23 Thread Steve Swinsburg
Perfect, thanks guys.

cheers,
Steve

On Thu, Oct 23, 2014 at 10:27 PM, Martin Grigorov mgrigo...@apache.org
wrote:

 Right!

 You have to override

 https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/editable/EditablePropertyColumn.java#L107
 and attach such ajax behavior to the textfield on 'change'

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Thu, Oct 23, 2014 at 2:22 PM, lucast lucastol...@hotmail.com wrote:

  Hi Steve,
  If I understand correctly, you would like to catch an ajax event fired
 from
  the cell when you click away.
 
  There are two ways you can do this, you can add an OnChangeAjaxBehavior()
  class to the file:
 
 
  Alternatively, you can add an AjaxEventBehavior to your object:
 
 
 
  I hope that helps,
  Lucas
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/EditablePropertyColumn-and-a-callback-to-save-tp4668048p4668049.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: Page Parameters logging

2014-10-23 Thread Andrea Del Bene

hi,

maybe you can use a custom error page: 
Application.getApplicationSettings().setInternalErrorPage

We have a secret parameter that we don't want to be logged in a stack trace
or anything. Right now we're using a custom IRequestHandler to intercept the
exception but I'm wondering if there's a more elegant way to do this.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Page-Parameters-logging-tp4668053.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: Page Parameters logging

2014-10-23 Thread Andrea Del Bene
Sorry. I've realized that maybe you need a more efficient strategy to 
hide your parameter. I think that using a custom request handler is the 
right way. you can override getExceptionMapperProvider in you 
application to return tour custom handler for exception. You can have a 
look at DefaultExceptionMapper to find some implementation hints.

hi,

maybe you can use a custom error page: 
Application.getApplicationSettings().setInternalErrorPage
We have a secret parameter that we don't want to be logged in a stack 
trace
or anything. Right now we're using a custom IRequestHandler to 
intercept the

exception but I'm wondering if there's a more elegant way to do this.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Page-Parameters-logging-tp4668053.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