Re: How to automatically log access to data objects in wicket gui

2017-12-15 Thread Martin Makundi
> I think you will need custom specialization of those models anyway.
> You will need to decide somehow when to apply your logic and when not.
>

True, but a nice boilerplate template would be nice, we could call it "The
GDPR compliance <https://www.eugdpr.org/> model" ;)

It could have methods like isAuthorized before invoking get or set and log
if not authorized and throw exception.

When model access is authroized, it would have methods like logAccess()
which will log (as necessary) how and what is accessed. Logging
implementation will take care of optimizing frequent logs etc.

Possibly it could be applied to both propertymodel and lamba model as a
"model behavior" or something.

I made a jira proposal and we will submit something soon:
https://issues.apache.org/jira/browse/WICKET-6508

**
Martin


>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Dec 15, 2017 at 2:20 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Thanks
> >
> > We don't want to log ALL invocations, only those in particular wicket
> > imodels. Aspect will give you all like a profiler, that's not what we
> want
> > and it would not have natural visibility to wicket session.
> >
> > Or do you have a specific example in mind?
> >
> > **
> > Martin
> >
> > 2017-12-15 9:54 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:
> >
> > > Hi,
> > >
> > > You can use Aspect Oriented Programming for this too.
> > > See wicket-metrics module for example.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Dec 15, 2017 at 7:57 AM, Martin Makundi <
> > > martin.maku...@koodaripalvelut.com> wrote:
> > >
> > > > Hi!
> > > >
> > > > We are investigating ways to automatically log access to data objects
> > in
> > > > wicket gui.
> > > >
> > > > Oldschool solutions would be, for example to override/customize
> > > > PropertyModel and log target object and method invoked, and possibly
> > > result
> > > > value, together with necessary information from session (timestamp,
> > user
> > > > id, authorization level, etc.).
> > > >
> > > > However, with wicket 8 and java 8 lambda possibilities, I am
> wondering
> > if
> > > > anybody would have some ingenious suggestion how to do this very
> nicely
> > > by
> > > > implementing own AuditTrailSerializableFunction or similar?
> > > >
> > > > Might need to wrap the data objects in some sort of proxy but that
> > would
> > > be
> > > > ok:
> > > >
> > > >- https://gist.github.com/jhorstmann/de367a42a08d8deb8df9
> > > >-
> > > >https://stackoverflow.com/questions/13356326/how-can-i-
> > > > log-every-method-called-in-a-class-automatically-with-log4j
> > > >-
> > > >https://stackoverflow.com/questions/3291637/
> > > alternatives-to-java-lang-
> > > > reflect-proxy-for-creating-proxies-of-abstract-classes
> > > >
> > > >
> > > > Any suggestions?
> > > >
> > > > Would be cool if blueprints for this were built into wicket.
> > > >
> > > > Thanks.
> > > >
> > > > **
> > > > Martin
> > > >
> > >
> >
>


Re: How to automatically log access to data objects in wicket gui

2017-12-15 Thread Martin Makundi
Thanks

We don't want to log ALL invocations, only those in particular wicket
imodels. Aspect will give you all like a profiler, that's not what we want
and it would not have natural visibility to wicket session.

Or do you have a specific example in mind?

**
Martin

2017-12-15 9:54 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:

> Hi,
>
> You can use Aspect Oriented Programming for this too.
> See wicket-metrics module for example.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Dec 15, 2017 at 7:57 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Hi!
> >
> > We are investigating ways to automatically log access to data objects in
> > wicket gui.
> >
> > Oldschool solutions would be, for example to override/customize
> > PropertyModel and log target object and method invoked, and possibly
> result
> > value, together with necessary information from session (timestamp, user
> > id, authorization level, etc.).
> >
> > However, with wicket 8 and java 8 lambda possibilities, I am wondering if
> > anybody would have some ingenious suggestion how to do this very nicely
> by
> > implementing own AuditTrailSerializableFunction or similar?
> >
> > Might need to wrap the data objects in some sort of proxy but that would
> be
> > ok:
> >
> >- https://gist.github.com/jhorstmann/de367a42a08d8deb8df9
> >-
> >https://stackoverflow.com/questions/13356326/how-can-i-
> > log-every-method-called-in-a-class-automatically-with-log4j
> >-
> >https://stackoverflow.com/questions/3291637/
> alternatives-to-java-lang-
> > reflect-proxy-for-creating-proxies-of-abstract-classes
> >
> >
> > Any suggestions?
> >
> > Would be cool if blueprints for this were built into wicket.
> >
> > Thanks.
> >
> > **
> > Martin
> >
>


How to automatically log access to data objects in wicket gui

2017-12-14 Thread Martin Makundi
Hi!

We are investigating ways to automatically log access to data objects in
wicket gui.

Oldschool solutions would be, for example to override/customize
PropertyModel and log target object and method invoked, and possibly result
value, together with necessary information from session (timestamp, user
id, authorization level, etc.).

However, with wicket 8 and java 8 lambda possibilities, I am wondering if
anybody would have some ingenious suggestion how to do this very nicely by
implementing own AuditTrailSerializableFunction or similar?

Might need to wrap the data objects in some sort of proxy but that would be
ok:

   - https://gist.github.com/jhorstmann/de367a42a08d8deb8df9
   -
   
https://stackoverflow.com/questions/13356326/how-can-i-log-every-method-called-in-a-class-automatically-with-log4j
   -
   
https://stackoverflow.com/questions/3291637/alternatives-to-java-lang-reflect-proxy-for-creating-proxies-of-abstract-classes


Any suggestions?

Would be cool if blueprints for this were built into wicket.

Thanks.

**
Martin


Re: Performance issue (possible bug since 7.2.0…up to and including 8.0.0-M8)

2017-12-12 Thread Martin Makundi
Performance is no joking mantter =)

2017-12-13 3:56 GMT+02:00 Lon Varscsak <lon.varsc...@gmail.com>:

> Haha, sure…I was sure someone was going to argue with me. :P
>
> -Lon
>
> On Tue, Dec 12, 2017 at 6:23 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Good find! Sounds like a bug, file to jira?
> >
> > 2017-12-12 23:38 GMT+02:00 Lon Varscsak <lon.varsc...@gmail.com>:
> >
> > > Okay, so here's the situation, I have a component where an Ajax request
> > > displays a large table (1000ish rows).  It display fast, no problem,
> not
> > a
> > > great use of resources (not paginating), but ignore that for now.  I
> then
> > > have another Ajax request where I tell the wicket component to not be
> > > visible and refresh an area.  No problem so far (although slightly
> slow,
> > > since it's not generating much html, should be faster).  Now EVERY Ajax
> > > request that updates the same area (with the component not in the html)
> > > takes a long time to respond (half second), even though it should be
> > > returning in ms, because the html is pretty minimal.
> > >
> > > I hooked it up to a profiler and found that it's spending a large
> amount
> > of
> > > CPU time in
> > > MarkupContainer$MarkupChildIterator.refreshInternalIteratorIfNeeded().
> > I'm
> > > not sure why it would be traversing the component hierarchy of the
> table
> > > that's not even visible…but I don't know enough of the architecture of
> > > wicket to really say…which is why I've come here. :)
> > >
> > > I've gone back to 7.1.0 and can confirm that in that version this
> > "problem"
> > > does not exist.  The Ajax request is as fast as if I've never loaded
> the
> > > large table.
> > >
> > > So I've attached a link to a Quickstart showing the problem (currently
> > > configured for 8.0.0-M8, but can be complied down to 7.0.0).  When
> > loading
> > > the page, first click the refresh link…this will essentially refresh
> all
> > > the contents in an Ajax request and give you a sense of how fast it
> > > _should_ be.  The table has not been visible yet, so there have been no
> > > ListView items created yet.  Then click "show table", this will
> generate
> > 2k
> > > dummy rows and redisplay the area.  It's obviously slower because it's
> > > generating 350k of html (but surprisingly fast :P).  Then click hide
> > > table.  It takes about the same amount of time to hide the table as it
> > does
> > > to show it, which is odd, because the html being regenerated is the
> same
> > as
> > > if there were no table displayed.  Then go ahead and click "refresh"
> and
> > > you'll see that refreshing a basically empty component is slow because
> > it's
> > > referencing all the components in the wicket hierarchy (
> > > MarkupChildIterator.refreshInternalIteratorIfNeeded)even though
> they're
> > > not
> > > visible.
> > >
> > > Thoughts?  I recognize that the first response will be "don't display
> > 1000
> > > rows", but lets ignore that for now.
> > >
> > > Thanks!
> > >
> > > -Lon
> > >
> > > Here's the link to the Quickstart:
> > > https://www.dropbox.com/s/l0uxsibmh24nsoh/slownesstest.tar.gz?dl=0
> > >
> >
>


Re: Performance issue (possible bug since 7.2.0…up to and including 8.0.0-M8)

2017-12-12 Thread Martin Makundi
Good find! Sounds like a bug, file to jira?

2017-12-12 23:38 GMT+02:00 Lon Varscsak :

> Okay, so here's the situation, I have a component where an Ajax request
> displays a large table (1000ish rows).  It display fast, no problem, not a
> great use of resources (not paginating), but ignore that for now.  I then
> have another Ajax request where I tell the wicket component to not be
> visible and refresh an area.  No problem so far (although slightly slow,
> since it's not generating much html, should be faster).  Now EVERY Ajax
> request that updates the same area (with the component not in the html)
> takes a long time to respond (half second), even though it should be
> returning in ms, because the html is pretty minimal.
>
> I hooked it up to a profiler and found that it's spending a large amount of
> CPU time in
> MarkupContainer$MarkupChildIterator.refreshInternalIteratorIfNeeded(). I'm
> not sure why it would be traversing the component hierarchy of the table
> that's not even visible…but I don't know enough of the architecture of
> wicket to really say…which is why I've come here. :)
>
> I've gone back to 7.1.0 and can confirm that in that version this "problem"
> does not exist.  The Ajax request is as fast as if I've never loaded the
> large table.
>
> So I've attached a link to a Quickstart showing the problem (currently
> configured for 8.0.0-M8, but can be complied down to 7.0.0).  When loading
> the page, first click the refresh link…this will essentially refresh all
> the contents in an Ajax request and give you a sense of how fast it
> _should_ be.  The table has not been visible yet, so there have been no
> ListView items created yet.  Then click "show table", this will generate 2k
> dummy rows and redisplay the area.  It's obviously slower because it's
> generating 350k of html (but surprisingly fast :P).  Then click hide
> table.  It takes about the same amount of time to hide the table as it does
> to show it, which is odd, because the html being regenerated is the same as
> if there were no table displayed.  Then go ahead and click "refresh" and
> you'll see that refreshing a basically empty component is slow because it's
> referencing all the components in the wicket hierarchy (
> MarkupChildIterator.refreshInternalIteratorIfNeeded)even though they're
> not
> visible.
>
> Thoughts?  I recognize that the first response will be "don't display 1000
> rows", but lets ignore that for now.
>
> Thanks!
>
> -Lon
>
> Here's the link to the Quickstart:
> https://www.dropbox.com/s/l0uxsibmh24nsoh/slownesstest.tar.gz?dl=0
>


Re: Ajax refresh and feedback panel

2017-12-02 Thread Martin Makundi
>
>
> The question is not very clear (to me).
>
> I've closed your ticket for the same reason.
> Please try to clarify the problem or the feature here (or at dev@) before
> creating tickets!
>

My apologies for a brief ticket. Let's try to elaborate: In Component you
have special processing for IFeedback components using FEEDBACK_LIST
because when other components are rendered, they might throw feedback
messages and make feedback visible.

If feedback is rendered before other components (or in undetermined order),
the feedback might be rendered before another component has thrown a
message.

This is why the IFeedback components are rendered last in normal rendering.

However, in ajax update, such orderinf for IFeedback is not enforced.

I am proposing to add such reordering for ajax update also.

Thanks.

Plese let me know if this requires more clarification. Probably the
existing test case for normal rendering (if such exists) could be modified
for testing the same with ajax update.

**
Martin


> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sat, Dec 2, 2017 at 3:15 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Hi!
> >
> > For normal rendering we have:
> >
> > /**
> > * We need to postpone calling beforeRender() on components that implement
> > {@link IFeedback}, to
> > * be sure that all other component's beforeRender() has been already
> > called, so that IFeedbacks
> > * can collect all feedback messages. This is the key under list of
> > postponed {@link IFeedback}
> > * is stored to request cycle metadata. The List is then iterated over in
> > * {@link #prepareForRender()} after calling {@link #beforeRender()}, to
> > initialize postponed
> > * components.
> > */
> > private static final MetaDataKey<List> FEEDBACK_LIST = new
> > MetaDataKey<List>()
> > {
> > private static final long serialVersionUID = 1L;
> > };
> >
> > Should there be similar functionality built in for Ajax update /
> > PartialPageUpdate? It seems to be a typical problem that the feedback of
> an
> > ajax update occurs too late.
> >
> > https://issues.apache.org/jira/browse/WICKET-6503
> >
> > **
> > Martin
> >
>


Ajax refresh and feedback panel

2017-12-02 Thread Martin Makundi
Hi!

For normal rendering we have:

/**
* We need to postpone calling beforeRender() on components that implement
{@link IFeedback}, to
* be sure that all other component's beforeRender() has been already
called, so that IFeedbacks
* can collect all feedback messages. This is the key under list of
postponed {@link IFeedback}
* is stored to request cycle metadata. The List is then iterated over in
* {@link #prepareForRender()} after calling {@link #beforeRender()}, to
initialize postponed
* components.
*/
private static final MetaDataKey FEEDBACK_LIST = new
MetaDataKey()
{
private static final long serialVersionUID = 1L;
};

Should there be similar functionality built in for Ajax update /
PartialPageUpdate? It seems to be a typical problem that the feedback of an
ajax update occurs too late.

https://issues.apache.org/jira/browse/WICKET-6503

**
Martin


Re: IndicatingAjaxButton locks other buttons

2017-10-26 Thread Martin Makundi
If you dig with firebug, what can you find that causes the buttons to be
non-responsive?

2017-10-26 20:12 GMT+03:00 Entropy :

> We have an IndicatingAjaxButton that launches an AjaxDownload of a PDF that
> we generate on the fly from Crystal Reports.  It's spawns the PDF in a
> separate window.  It does the job, but after, every button on the screen of
> the main form is nonresponsive.  Is there some step I am supposed to take
> to
> unlock them?  The spinner gif went away so it seems like the button knows
> it's done enough to hide the spinner.
>
> As soon as i change the IndicatingAjaxButton to a simple AjaxButton,
> everything works perfectly.
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Joda-time dependency

2017-09-22 Thread Martin Makundi
+1 me too

2017-09-22 15:28 GMT+03:00 Andrea Del Bene <an.delb...@gmail.com>:

> +1 for me. But I doubt there will be something left in wicket-datetime
> when you will remove Joda :-)
>
>
>
> On 22/09/2017 13:49, Maxim Solodovnik wrote:
>
>> OK, I'm ready to start :)
>>
>> As far as I understand here is the plan:
>>
>> 1) move existing unchanged wicket-datetime to wicketstuff (8.0.0 only
>> change package)
>> 2) remove joda-time from wicket-datetime (pom, README.md)
>> 3) use LocalDate/LocalDateTime where appropriate
>>
>> Shall I proceed :))) ?
>>
>> On Wed, Sep 20, 2017 at 7:53 PM, Martin Grigorov <mgrigo...@apache.org>
>> wrote:
>>
>>> https://github.com/menodata/time4j - in case Java 8 Date APIs are not
>>> good
>>> enough
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>> On Tue, Sep 19, 2017 at 10:05 AM, Martin Makundi <
>>> martin.maku...@koodaripalvelut.com> wrote:
>>>
>>> 2017-09-19 9:35 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:
>>>>
>>>> On Tue, Sep 19, 2017 at 8:12 AM, Martin Makundi <
>>>>> martin.maku...@koodaripalvelut.com> wrote:
>>>>>
>>>>> 2017-09-19 7:16 GMT+03:00 Martin Grigorov <martin.grigo...@gmail.com>:
>>>>>>
>>>>>> On Sep 19, 2017 6:22 AM, "Martin Makundi" <
>>>>>>> martin.maku...@koodaripalvelut.com> wrote:
>>>>>>>
>>>>>>> IMO it's better to big mang whole wicket to drop joda date. All
>>>>>>>
>>>>>> wicket
>>>>
>>>>> 8
>>>>>
>>>>>> without joda.
>>>>>>>
>>>>>>>
>>>>>>> Said the person who still uses Wicket 1.4 for his apps...
>>>>>>>
>>>>>>> Yes, incremental change is a pain so we big bang 1.4 ->8.
>>>>>>
>>>>>>
>>>>>> Everyone wants to see the Big Bang and this might be the reason to
>>>>>>>
>>>>>> see
>>>>
>>>>> Wicket 8.0.0 in 2020.
>>>>>>>
>>>>>>
>>>>>> Dropping joda should not significantly slow down development.
>>>>>>
>>>>>> True, if your name is Stephen Colebourne and you know both APIs by
>>>>> heart!
>>>>> I personally had to ask Google and StackOverflow.com several questions
>>>>>
>>>> for
>>>>
>>>>> what I've done so far in the branch mentioned above.
>>>>>
>>>>> My vote on whether to merge this rafectoring to master branch will
>>>>> depend
>>>>> on the diff in wicket-examples.
>>>>>
>>>>> Let's try it first. If it does not pass we can drop joda locally. So
>>>> long
>>>> as it is not a transient dependency it's doable.
>>>>
>>>>
>>>>>
>>>>>> **
>>>>>>> Martin
>>>>>>>
>>>>>>> 2017-09-18 22:43 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:
>>>>>>>
>>>>>>> On Mon, Sep 18, 2017 at 6:50 AM, Martin Makundi <
>>>>>>>> martin.maku...@koodaripalvelut.com> wrote:
>>>>>>>>
>>>>>>>> Is it possible to also drop joda from wicketstuff for
>>>>>>>>>
>>>>>>>> consistency?
>>>>
>>>>> IMO, the WicketStuff module must be exactly the same as the one in
>>>>>>>>
>>>>>>> Wicket
>>>>>>
>>>>>>> 7.x.
>>>>>>>> Any changes in the API should be done in Wicket 8.x.
>>>>>>>> This way when users migrate their apps to 8.x they can decide to
>>>>>>>>
>>>>>>> take
>>>>
>>>>> the
>>>>>>
>>>>>>> short route and use the WicketStuff module.
>>>>>>>> Later they can invest in reworking their code to the new API and
>>>>>>>>
>>>>>>> use
>>>>
>>>>> again
>>>>>>>
>>>>>>>> org.apache.wicket:wicket-datetime
>>>&g

Re: Joda-time dependency

2017-09-19 Thread Martin Makundi
2017-09-19 9:35 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:

> On Tue, Sep 19, 2017 at 8:12 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > 2017-09-19 7:16 GMT+03:00 Martin Grigorov <martin.grigo...@gmail.com>:
> >
> > > On Sep 19, 2017 6:22 AM, "Martin Makundi" <
> > > martin.maku...@koodaripalvelut.com> wrote:
> > >
> > > IMO it's better to big mang whole wicket to drop joda date. All wicket
> 8
> > > without joda.
> > >
> > >
> > > Said the person who still uses Wicket 1.4 for his apps...
> > >
> >
> > Yes, incremental change is a pain so we big bang 1.4 ->8.
> >
> >
> > > Everyone wants to see the Big Bang and this might be the reason to see
> > > Wicket 8.0.0 in 2020.
> >
> >
> > Dropping joda should not significantly slow down development.
> >
>
> True, if your name is Stephen Colebourne and you know both APIs by heart!
> I personally had to ask Google and StackOverflow.com several questions for
> what I've done so far in the branch mentioned above.
>
> My vote on whether to merge this rafectoring to master branch will depend
> on the diff in wicket-examples.
>

Let's try it first. If it does not pass we can drop joda locally. So long
as it is not a transient dependency it's doable.

>
>
> > >
> >
> >
> > >
> > > **
> > > Martin
> > >
> > > 2017-09-18 22:43 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:
> > >
> > > > On Mon, Sep 18, 2017 at 6:50 AM, Martin Makundi <
> > > > martin.maku...@koodaripalvelut.com> wrote:
> > > >
> > > > > Is it possible to also drop joda from wicketstuff for consistency?
> > > > >
> > > >
> > > > IMO, the WicketStuff module must be exactly the same as the one in
> > Wicket
> > > > 7.x.
> > > > Any changes in the API should be done in Wicket 8.x.
> > > > This way when users migrate their apps to 8.x they can decide to take
> > the
> > > > short route and use the WicketStuff module.
> > > > Later they can invest in reworking their code to the new API and use
> > > again
> > > > org.apache.wicket:wicket-datetime
> > > > The WicketStuff module README should say that it will be available
> only
> > > for
> > > > Wicket 8.x lifecycle, to prevent double maintenance.
> > > >
> > > >
> > > > > 2017-09-17 22:09 GMT+03:00 Andrea Del Bene <an.delb...@gmail.com>:
> > > > >
> > > > > > +1 to move legacy code to WicketStuff. For 'legacy code' I mean
> all
> > > the
> > > > > > code based on yui library and class StyleDateConverter which is
> > > > tailored
> > > > > on
> > > > > > Joda time.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 16/09/2017 14:13, Martin Grigorov wrote:
> > > > > >
> > > > > >> Hi Maxim,
> > > > > >>
> > > > > >> Since I do not use wicket-datetime in my apps I also wanted to
> > break
> > > > it
> > > > > >> hard by replacing Joda-Time with Java 8 classes.
> > > > > >> But people who use it expressed concerns that it will be hard to
> > > > migrate
> > > > > >> this way. Everyone will have to do the same for his/her
> > application.
> > > > > >> I remember Igor even suggested to have univeral API that will
> work
> > > > with
> > > > > >> java.util.Date, Joda-Time and Java 8!
> > > > > >>
> > > > > >> IMO the easiest thing that could be done is to copy the current
> > code
> > > > to
> > > > > >> WicketStuff, as https://github.com/wicketstuff/wicket1.5-tree,
> > and
> > > > > rework
> > > > > >> wicket-datetime to use Java 8 APIs.
> > > > > >>
> > > > > >> Martin Grigorov
> > > > > >> Wicket Training and Consulting
> > > > > >> https://twitter.com/mtgrigorov
> > > > > >>
> > > > > >> On Thu, Sep 14, 2017 at 7:11 AM, Maxim Solodovnik <
> > > > solomax...@gmail.com
> > > > > >
> 

Re: Joda-time dependency

2017-09-18 Thread Martin Makundi
2017-09-19 7:16 GMT+03:00 Martin Grigorov <martin.grigo...@gmail.com>:

> On Sep 19, 2017 6:22 AM, "Martin Makundi" <
> martin.maku...@koodaripalvelut.com> wrote:
>
> IMO it's better to big mang whole wicket to drop joda date. All wicket 8
> without joda.
>
>
> Said the person who still uses Wicket 1.4 for his apps...
>

Yes, incremental change is a pain so we big bang 1.4 ->8.


> Everyone wants to see the Big Bang and this might be the reason to see
> Wicket 8.0.0 in 2020.


Dropping joda should not significantly slow down development.

>


>
> **
> Martin
>
> 2017-09-18 22:43 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:
>
> > On Mon, Sep 18, 2017 at 6:50 AM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> > > Is it possible to also drop joda from wicketstuff for consistency?
> > >
> >
> > IMO, the WicketStuff module must be exactly the same as the one in Wicket
> > 7.x.
> > Any changes in the API should be done in Wicket 8.x.
> > This way when users migrate their apps to 8.x they can decide to take the
> > short route and use the WicketStuff module.
> > Later they can invest in reworking their code to the new API and use
> again
> > org.apache.wicket:wicket-datetime
> > The WicketStuff module README should say that it will be available only
> for
> > Wicket 8.x lifecycle, to prevent double maintenance.
> >
> >
> > > 2017-09-17 22:09 GMT+03:00 Andrea Del Bene <an.delb...@gmail.com>:
> > >
> > > > +1 to move legacy code to WicketStuff. For 'legacy code' I mean all
> the
> > > > code based on yui library and class StyleDateConverter which is
> > tailored
> > > on
> > > > Joda time.
> > > >
> > > >
> > > >
> > > > On 16/09/2017 14:13, Martin Grigorov wrote:
> > > >
> > > >> Hi Maxim,
> > > >>
> > > >> Since I do not use wicket-datetime in my apps I also wanted to break
> > it
> > > >> hard by replacing Joda-Time with Java 8 classes.
> > > >> But people who use it expressed concerns that it will be hard to
> > migrate
> > > >> this way. Everyone will have to do the same for his/her application.
> > > >> I remember Igor even suggested to have univeral API that will work
> > with
> > > >> java.util.Date, Joda-Time and Java 8!
> > > >>
> > > >> IMO the easiest thing that could be done is to copy the current code
> > to
> > > >> WicketStuff, as https://github.com/wicketstuff/wicket1.5-tree, and
> > > rework
> > > >> wicket-datetime to use Java 8 APIs.
> > > >>
> > > >> Martin Grigorov
> > > >> Wicket Training and Consulting
> > > >> https://twitter.com/mtgrigorov
> > > >>
> > > >> On Thu, Sep 14, 2017 at 7:11 AM, Maxim Solodovnik <
> > solomax...@gmail.com
> > > >
> > > >> wrote:
> > > >>
> > > >> Hello Martin,
> > > >>>
> > > >>> I tried to continue this work, but it seems I need some information
> > > >>> before I can proceed
> > > >>> Could you please tell me What was the goal of these changes?
> > > >>>
> > > >>> I would remove joda-time, and use LocalDate, LocalTime instead of
> > Date
> > > >>> As I can see you are using ZonedDateTime ...
> > > >>>
> > > >>>
> > > >>> On Mon, Sep 11, 2017 at 9:01 PM, Martin Grigorov <
> > mgrigo...@apache.org
> > > >
> > > >>> wrote:
> > > >>>
> > > >>>> Yes, if finished on time!
> > > >>>> Wicket 7 requires Java 7
> > > >>>>
> > > >>>> Martin Grigorov
> > > >>>> Wicket Training and Consulting
> > > >>>> https://twitter.com/mtgrigorov
> > > >>>>
> > > >>>> On Mon, Sep 11, 2017 at 3:34 PM, Rakesh A <
> > iamrakes...@rediffmail.com
> > > >
> > > >>>> wrote:
> > > >>>>
> > > >>>> Hi,
> > > >>>>>
> > > >>>>> Is it going to be for Wicket 8 only ?
> > > >>>>>
> > > >>>>> Regards,
> > > >>>>> Rakesh.A
> > > >>>>>
> > > >>>>> --
> > > >>>>> Sent from: http://apache-wicket.1842946.n
> 4.nabble.com/Users-forum-
> > > >>>>> f1842947.html
> > > >>>>>
> > > >>>>> 
> > > -
> > > >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > >>>>> For additional commands, e-mail: users-h...@wicket.apache.org
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>
> > > >>> --
> > > >>> WBR
> > > >>> Maxim aka solomax
> > > >>>
> > > >>> 
> > -
> > > >>> 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: Joda-time dependency

2017-09-18 Thread Martin Makundi
IMO it's better to big mang whole wicket to drop joda date. All wicket 8
without joda.

**
Martin

2017-09-18 22:43 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:

> On Mon, Sep 18, 2017 at 6:50 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Is it possible to also drop joda from wicketstuff for consistency?
> >
>
> IMO, the WicketStuff module must be exactly the same as the one in Wicket
> 7.x.
> Any changes in the API should be done in Wicket 8.x.
> This way when users migrate their apps to 8.x they can decide to take the
> short route and use the WicketStuff module.
> Later they can invest in reworking their code to the new API and use again
> org.apache.wicket:wicket-datetime
> The WicketStuff module README should say that it will be available only for
> Wicket 8.x lifecycle, to prevent double maintenance.
>
>
> > 2017-09-17 22:09 GMT+03:00 Andrea Del Bene <an.delb...@gmail.com>:
> >
> > > +1 to move legacy code to WicketStuff. For 'legacy code' I mean all the
> > > code based on yui library and class StyleDateConverter which is
> tailored
> > on
> > > Joda time.
> > >
> > >
> > >
> > > On 16/09/2017 14:13, Martin Grigorov wrote:
> > >
> > >> Hi Maxim,
> > >>
> > >> Since I do not use wicket-datetime in my apps I also wanted to break
> it
> > >> hard by replacing Joda-Time with Java 8 classes.
> > >> But people who use it expressed concerns that it will be hard to
> migrate
> > >> this way. Everyone will have to do the same for his/her application.
> > >> I remember Igor even suggested to have univeral API that will work
> with
> > >> java.util.Date, Joda-Time and Java 8!
> > >>
> > >> IMO the easiest thing that could be done is to copy the current code
> to
> > >> WicketStuff, as https://github.com/wicketstuff/wicket1.5-tree, and
> > rework
> > >> wicket-datetime to use Java 8 APIs.
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >> https://twitter.com/mtgrigorov
> > >>
> > >> On Thu, Sep 14, 2017 at 7:11 AM, Maxim Solodovnik <
> solomax...@gmail.com
> > >
> > >> wrote:
> > >>
> > >> Hello Martin,
> > >>>
> > >>> I tried to continue this work, but it seems I need some information
> > >>> before I can proceed
> > >>> Could you please tell me What was the goal of these changes?
> > >>>
> > >>> I would remove joda-time, and use LocalDate, LocalTime instead of
> Date
> > >>> As I can see you are using ZonedDateTime ...
> > >>>
> > >>>
> > >>> On Mon, Sep 11, 2017 at 9:01 PM, Martin Grigorov <
> mgrigo...@apache.org
> > >
> > >>> wrote:
> > >>>
> > >>>> Yes, if finished on time!
> > >>>> Wicket 7 requires Java 7
> > >>>>
> > >>>> Martin Grigorov
> > >>>> Wicket Training and Consulting
> > >>>> https://twitter.com/mtgrigorov
> > >>>>
> > >>>> On Mon, Sep 11, 2017 at 3:34 PM, Rakesh A <
> iamrakes...@rediffmail.com
> > >
> > >>>> wrote:
> > >>>>
> > >>>> Hi,
> > >>>>>
> > >>>>> Is it going to be for Wicket 8 only ?
> > >>>>>
> > >>>>> Regards,
> > >>>>> Rakesh.A
> > >>>>>
> > >>>>> --
> > >>>>> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> > >>>>> f1842947.html
> > >>>>>
> > >>>>> 
> > -
> > >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >>>>> For additional commands, e-mail: users-h...@wicket.apache.org
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>
> > >>> --
> > >>> WBR
> > >>> Maxim aka solomax
> > >>>
> > >>> 
> -
> > >>> 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: Joda-time dependency

2017-09-17 Thread Martin Makundi
Did you drop it from the pom already so that joda is not visible in the
scope?

2017-09-18 6:57 GMT+03:00 Maxim Solodovnik <solomax...@gmail.com>:

> date-time module will not have joda-time dependency after moving
> Other modules might have this dependency ...
>
> On Mon, Sep 18, 2017 at 10:50 AM, Martin Makundi
> <martin.maku...@koodaripalvelut.com> wrote:
> > Is it possible to also drop joda from wicketstuff for consistency?
> >
> > 2017-09-17 22:09 GMT+03:00 Andrea Del Bene <an.delb...@gmail.com>:
> >
> >> +1 to move legacy code to WicketStuff. For 'legacy code' I mean all the
> >> code based on yui library and class StyleDateConverter which is
> tailored on
> >> Joda time.
> >>
> >>
> >>
> >> On 16/09/2017 14:13, Martin Grigorov wrote:
> >>
> >>> Hi Maxim,
> >>>
> >>> Since I do not use wicket-datetime in my apps I also wanted to break it
> >>> hard by replacing Joda-Time with Java 8 classes.
> >>> But people who use it expressed concerns that it will be hard to
> migrate
> >>> this way. Everyone will have to do the same for his/her application.
> >>> I remember Igor even suggested to have univeral API that will work with
> >>> java.util.Date, Joda-Time and Java 8!
> >>>
> >>> IMO the easiest thing that could be done is to copy the current code to
> >>> WicketStuff, as https://github.com/wicketstuff/wicket1.5-tree, and
> rework
> >>> wicket-datetime to use Java 8 APIs.
> >>>
> >>> Martin Grigorov
> >>> Wicket Training and Consulting
> >>> https://twitter.com/mtgrigorov
> >>>
> >>> On Thu, Sep 14, 2017 at 7:11 AM, Maxim Solodovnik <
> solomax...@gmail.com>
> >>> wrote:
> >>>
> >>> Hello Martin,
> >>>>
> >>>> I tried to continue this work, but it seems I need some information
> >>>> before I can proceed
> >>>> Could you please tell me What was the goal of these changes?
> >>>>
> >>>> I would remove joda-time, and use LocalDate, LocalTime instead of Date
> >>>> As I can see you are using ZonedDateTime ...
> >>>>
> >>>>
> >>>> On Mon, Sep 11, 2017 at 9:01 PM, Martin Grigorov <
> mgrigo...@apache.org>
> >>>> wrote:
> >>>>
> >>>>> Yes, if finished on time!
> >>>>> Wicket 7 requires Java 7
> >>>>>
> >>>>> Martin Grigorov
> >>>>> Wicket Training and Consulting
> >>>>> https://twitter.com/mtgrigorov
> >>>>>
> >>>>> On Mon, Sep 11, 2017 at 3:34 PM, Rakesh A <
> iamrakes...@rediffmail.com>
> >>>>> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>>
> >>>>>> Is it going to be for Wicket 8 only ?
> >>>>>>
> >>>>>> Regards,
> >>>>>> Rakesh.A
> >>>>>>
> >>>>>> --
> >>>>>> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> >>>>>> f1842947.html
> >>>>>>
> >>>>>> 
> -
> >>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>> --
> >>>> WBR
> >>>> Maxim aka solomax
> >>>>
> >>>> -
> >>>> 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
> >>
> >>
>
>
>
> --
> WBR
> Maxim aka solomax
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Joda-time dependency

2017-09-17 Thread Martin Makundi
Is it possible to also drop joda from wicketstuff for consistency?

2017-09-17 22:09 GMT+03:00 Andrea Del Bene :

> +1 to move legacy code to WicketStuff. For 'legacy code' I mean all the
> code based on yui library and class StyleDateConverter which is tailored on
> Joda time.
>
>
>
> On 16/09/2017 14:13, Martin Grigorov wrote:
>
>> Hi Maxim,
>>
>> Since I do not use wicket-datetime in my apps I also wanted to break it
>> hard by replacing Joda-Time with Java 8 classes.
>> But people who use it expressed concerns that it will be hard to migrate
>> this way. Everyone will have to do the same for his/her application.
>> I remember Igor even suggested to have univeral API that will work with
>> java.util.Date, Joda-Time and Java 8!
>>
>> IMO the easiest thing that could be done is to copy the current code to
>> WicketStuff, as https://github.com/wicketstuff/wicket1.5-tree, and rework
>> wicket-datetime to use Java 8 APIs.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, Sep 14, 2017 at 7:11 AM, Maxim Solodovnik 
>> wrote:
>>
>> Hello Martin,
>>>
>>> I tried to continue this work, but it seems I need some information
>>> before I can proceed
>>> Could you please tell me What was the goal of these changes?
>>>
>>> I would remove joda-time, and use LocalDate, LocalTime instead of Date
>>> As I can see you are using ZonedDateTime ...
>>>
>>>
>>> On Mon, Sep 11, 2017 at 9:01 PM, Martin Grigorov 
>>> wrote:
>>>
 Yes, if finished on time!
 Wicket 7 requires Java 7

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

 On Mon, Sep 11, 2017 at 3:34 PM, Rakesh A 
 wrote:

 Hi,
>
> Is it going to be for Wicket 8 only ?
>
> Regards,
> Rakesh.A
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>>>
>>> --
>>> WBR
>>> Maxim aka solomax
>>>
>>> -
>>> 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: Joda-time dependency

2017-09-15 Thread Martin Makundi
Just brute force it and we can fine-tune later.

2017-09-14 7:11 GMT+03:00 Maxim Solodovnik :

> Hello Martin,
>
> I tried to continue this work, but it seems I need some information
> before I can proceed
> Could you please tell me What was the goal of these changes?
>
> I would remove joda-time, and use LocalDate, LocalTime instead of Date
> As I can see you are using ZonedDateTime ...
>
>
> On Mon, Sep 11, 2017 at 9:01 PM, Martin Grigorov 
> wrote:
> > Yes, if finished on time!
> > Wicket 7 requires Java 7
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Sep 11, 2017 at 3:34 PM, Rakesh A 
> > wrote:
> >
> >> Hi,
> >>
> >> Is it going to be for Wicket 8 only ?
> >>
> >> Regards,
> >> Rakesh.A
> >>
> >> --
> >> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> >> f1842947.html
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
>
>
>
> --
> WBR
> Maxim aka solomax
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Joda-time dependency

2017-09-11 Thread Martin Makundi
+1 dropping joda time.

2017-09-11 14:02 GMT+03:00 Rakesh A :

> Hi,
>
> Joda-time library dependency in Wicket was added long back for valid
> reasons
> then. With improvements to Date time API in JDK, do we still need this
> dependency ?
> Can we replace its usage in Wicket with JDK classes ?
>
> Reason for this is recently we'd issues with date time conversions when
> three letter time zones are used.
> Eg: When date entered is "04/08/2017 13:00" got converted to "04/08/2017
> 12:00" when EST (which currently observing EDT -
> https://www.timeanddate.com/time/zones/est) time zone used.
>
> Basically conversion result -1hr always.
>
> Regards,
> Rakesh.A
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How do you handle rolling upgrades?

2017-07-26 Thread Martin Makundi
Also if you shut down sessions, you need a grace period which lengthens the
update time.

2017-07-26 16:05 GMT+03:00 Bas Gooren :

> Hi All,
>
> TL;DR: How/where do you host your wicket apps so you can deploy a new
> version while users are actively using the old/current version? In
> particular: when the new version cannot read the sessions of the old
> version due to page changes.
>
> We’re investigating how we can eliminate downtime in some of our apps while
> we deploy a new version.
>
> Most of the stuff we’ve built in the past could handle 30 sec downtime
> without much issue (e.g. outside office hours).
>
> However, we would like to be able to deploy more often; Perhaps even move
> towards continuous deployment.
>
> Currently, using wicket, this seems problematic due to two reasons:
>
>- Wicket’s sessions (http session and in particular wicket’s filestore)
>require affinity
>- Session incompatibility: new version of app usually cannot deserialize
>old sessions; If we simply take the old version offline, users will
> need to
>start with a fresh session
>
> Since we would like to do deploys without service interruption for active
> users, I imagine something like session draining on the “old” version after
> the “new” version goes online.
> Haproxy has support for this: launch new version and route new users to it,
> put old one in maintenance mode and take it offline when all sessions for
> it have expired (or after predetermined timeout, e.g. 30 minutes).
>
> Most cloud providers (e.g. heroku, jelastic) don’t handle this gracefully
> for as far as I can tell. While they do handle rolling upgrades, they
> assume statelessness or otherwise transferable statefulness (new version
> can read state of old version).
>
> Tomcat has support for parallel deployments ([1]), but I’m not a big fan of
> running multiple apps in a single JVM.
>
> Since we don’t build things that will require massive horizontal
> scalability, powerful virtual servers have always worked great for us.
>
> That means we’ll probably need to put a reverse proxy in between our
> frontend (apache for SSL termination) and app server (tomcat) to handle
> routing.
> But of course, before we build something like that on top of haproxy (or
> other…) I’d like to make sure we’re not reinventing the wheel.
>
> I’m curious how other users of wicket handle this: how do you handle active
> user sessions (with state) when rolling out a new version of your app?
>
> I’d be grateful for any insights and experiences from other wicketeers!
>
> http://tomcat.apache.org/tomcat-8.5-doc/config/context.
> html#Parallel_deployment
>
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>


Re: Question about ajax encoding/decoding, problem with image data url

2017-05-03 Thread Martin Makundi
My bad. Problem solved, accidentally this part of  code was within a
block of markup text where all whitespace was replaced with non breaking
space.

Nbsp looks the same for naked eye but a diff tool shows the difference, and
obviously browser will render differently <imgsrc="...> compared to
https://twitter.com/mtgrigorov
>>>
>>> On Wed, May 3, 2017 at 4:11 PM, Martin Makundi <
>>> martin.maku...@koodaripalvelut.com> wrote:
>>>
>>> > Here is a sample how it works in jsfiddle without problems:
>>> > https://jsfiddle.net/#=0SQvHmm6Nj
>>> >
>>> > But when same content is in ajax update it breaks. Wonder what happens
>>> to
>>> > it before render?
>>> >
>>> > 2017-05-03 16:06 GMT+03:00 Martin Makundi <
>>> > martin.maku...@koodaripalvelut.com>:
>>> >
>>> > > Hi!
>>> > >
>>> > > I am trying to display (wicket 1.4) an image using base64 image data
>>> > > representation.
>>> > >
>>> > > For some reason the base64 gets garbled every time with ajax.
>>> > >
>>> > > For example:
>>> > >
>>> > > src="data:image/png;base64,iVBORw0KGgoNSUhEUgAAAcIAAA
>>> > > CWCAYAAABNcIgQAAAKUklEQVR4nO3dzYoc1xkG4PcS+g5cVxDmAmzoC/
>>> > > BCm5BANrMIWXilCwgIvIl3hhC8CUYbe+WFcAgJWdgT8MI2xjEYjA0KGYSjmESY
>>> > > kSxLsmXHk0V1R6dPVff09H/JzwMHaTTVVae7xfnqfOen
>>> > >
>>> > > becomes (as viewed from firefox developer tools)
>>> > > >> > > bcm5banrmiwxilcwgivil3hhc8cuybe+wfcagjwdgt8mi2xjeyja0kgysjmesy
>>> > ksxlsmxhk0v1r6dpvff09h=""
>>> > > jzwmhattvvae7xfnqfoen...
>>> > >
>>> > > You can notice lots of ="" marks ="" splitting the string.
>>> > >
>>> > >
>>> > > Is this a wicket encoding issue or a javascript quirk?
>>> > >
>>> > > Thanks.
>>> > >
>>> > > **
>>> > > Martin
>>> > >
>>> > >
>>> >
>>>
>>
>>
>


Re: Question about ajax encoding/decoding, problem with image data url

2017-05-03 Thread Martin Makundi
Really strange, works on same installation in simpler installation. No
difference in http traffic...

2017-05-03 18:07 GMT+03:00 Martin Makundi <
martin.maku...@koodaripalvelut.com>:

> Interesting, it works in a quickstart also on v1.4.
>
> Need to investigate more.
>
> 2017-05-03 17:20 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:
>
>> I don't see any reason why this could break.
>> If you are able to reproduce it in a quickstart with 6.26/7.6 then please
>> create a ticket in JIRA.
>>
>> Check what is in the Ajax response, not what is in the DOM.
>> Also you can check with Google Chrome. Maybe Firefox does something funky.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, May 3, 2017 at 4:11 PM, Martin Makundi <
>> martin.maku...@koodaripalvelut.com> wrote:
>>
>> > Here is a sample how it works in jsfiddle without problems:
>> > https://jsfiddle.net/#=0SQvHmm6Nj
>> >
>> > But when same content is in ajax update it breaks. Wonder what happens
>> to
>> > it before render?
>> >
>> > 2017-05-03 16:06 GMT+03:00 Martin Makundi <
>> > martin.maku...@koodaripalvelut.com>:
>> >
>> > > Hi!
>> > >
>> > > I am trying to display (wicket 1.4) an image using base64 image data
>> > > representation.
>> > >
>> > > For some reason the base64 gets garbled every time with ajax.
>> > >
>> > > For example:
>> > >
>> > > src="data:image/png;base64,iVBORw0KGgoNSUhEUgAAAcIAAA
>> > > CWCAYAAABNcIgQAAAKUklEQVR4nO3dzYoc1xkG4PcS+g5cVxDmAmzoC/
>> > > BCm5BANrMIWXilCwgIvIl3hhC8CUYbe+WFcAgJWdgT8MI2xjEYjA0KGYSjmESY
>> > > kSxLsmXHk0V1R6dPVff09H/JzwMHaTTVVae7xfnqfOen
>> > >
>> > > becomes (as viewed from firefox developer tools)
>> > > > > > bcm5banrmiwxilcwgivil3hhc8cuybe+wfcagjwdgt8mi2xjeyja0kgysjmesy
>> > ksxlsmxhk0v1r6dpvff09h=""
>> > > jzwmhattvvae7xfnqfoen...
>> > >
>> > > You can notice lots of ="" marks ="" splitting the string.
>> > >
>> > >
>> > > Is this a wicket encoding issue or a javascript quirk?
>> > >
>> > > Thanks.
>> > >
>> > > **
>> > > Martin
>> > >
>> > >
>> >
>>
>
>


Re: Question about ajax encoding/decoding, problem with image data url

2017-05-03 Thread Martin Makundi
Interesting, it works in a quickstart also on v1.4.

Need to investigate more.

2017-05-03 17:20 GMT+03:00 Martin Grigorov <mgrigo...@apache.org>:

> I don't see any reason why this could break.
> If you are able to reproduce it in a quickstart with 6.26/7.6 then please
> create a ticket in JIRA.
>
> Check what is in the Ajax response, not what is in the DOM.
> Also you can check with Google Chrome. Maybe Firefox does something funky.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, May 3, 2017 at 4:11 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Here is a sample how it works in jsfiddle without problems:
> > https://jsfiddle.net/#=0SQvHmm6Nj
> >
> > But when same content is in ajax update it breaks. Wonder what happens to
> > it before render?
> >
> > 2017-05-03 16:06 GMT+03:00 Martin Makundi <
> > martin.maku...@koodaripalvelut.com>:
> >
> > > Hi!
> > >
> > > I am trying to display (wicket 1.4) an image using base64 image data
> > > representation.
> > >
> > > For some reason the base64 gets garbled every time with ajax.
> > >
> > > For example:
> > >
> > > src="data:image/png;base64,iVBORw0KGgoNSUhEUgAAAcIAAA
> > > CWCAYAAABNcIgQAAAKUklEQVR4nO3dzYoc1xkG4PcS+g5cVxDmAmzoC/
> > > BCm5BANrMIWXilCwgIvIl3hhC8CUYbe+WFcAgJWdgT8MI2xjEYjA0KGYSjmESY
> > > kSxLsmXHk0V1R6dPVff09H/JzwMHaTTVVae7xfnqfOen
> > >
> > > becomes (as viewed from firefox developer tools)
> > >  > > bcm5banrmiwxilcwgivil3hhc8cuybe+wfcagjwdgt8mi2xjeyja0kgysjmesy
> > ksxlsmxhk0v1r6dpvff09h=""
> > > jzwmhattvvae7xfnqfoen...
> > >
> > > You can notice lots of ="" marks ="" splitting the string.
> > >
> > >
> > > Is this a wicket encoding issue or a javascript quirk?
> > >
> > > Thanks.
> > >
> > > **
> > > Martin
> > >
> > >
> >
>


Re: Question about ajax encoding/decoding, problem with image data url

2017-05-03 Thread Martin Makundi
Here is a sample how it works in jsfiddle without problems:
https://jsfiddle.net/#=0SQvHmm6Nj

But when same content is in ajax update it breaks. Wonder what happens to
it before render?

2017-05-03 16:06 GMT+03:00 Martin Makundi <
martin.maku...@koodaripalvelut.com>:

> Hi!
>
> I am trying to display (wicket 1.4) an image using base64 image data
> representation.
>
> For some reason the base64 gets garbled every time with ajax.
>
> For example:
>
> src="data:image/png;base64,iVBORw0KGgoNSUhEUgAAAcIAAA
> CWCAYAAABNcIgQAAAKUklEQVR4nO3dzYoc1xkG4PcS+g5cVxDmAmzoC/
> BCm5BANrMIWXilCwgIvIl3hhC8CUYbe+WFcAgJWdgT8MI2xjEYjA0KGYSjmESY
> kSxLsmXHk0V1R6dPVff09H/JzwMHaTTVVae7xfnqfOen
>
> becomes (as viewed from firefox developer tools)
>  bcm5banrmiwxilcwgivil3hhc8cuybe+wfcagjwdgt8mi2xjeyja0kgysjmesyksxlsmxhk0v1r6dpvff09h=""
> jzwmhattvvae7xfnqfoen...
>
> You can notice lots of ="" marks ="" splitting the string.
>
>
> Is this a wicket encoding issue or a javascript quirk?
>
> Thanks.
>
> **
> Martin
>
>


Question about ajax encoding/decoding, problem with image data url

2017-05-03 Thread Martin Makundi
Hi!

I am trying to display (wicket 1.4) an image using base64 image data
representation.

For some reason the base64 gets garbled every time with ajax.

For example:

src="data:image/png;base64,iVBORw0KGgoNSUhEUgAAAcIAAACWCAYAAABNcIgQAAAKUklEQVR4nO3dzYoc1xkG4PcS+g5cVxDmAmzoC/BCm5BANrMIWXilCwgIvIl3hhC8CUYbe+WFcAgJWdgT8MI2xjEYjA0KGYSjmESYkSxLsmXHk0V1R6dPVff09H/JzwMHaTTVVae7xfnqfOen

becomes (as viewed from firefox developer tools)


Re: Wicket is #3 in the JSON perf test by TechEmpower

2017-03-23 Thread Martin Makundi
Would be interesting to run this performance test Wicket with speed patch
#6177

https://issues.apache.org/jira/browse/WICKET-6177

2017-03-23 15:58 GMT+02:00 Marcel Barbosa Pinto :

> That is really good!
>
> On Thu, Mar 23, 2017 at 5:47 AM, Andrea Del Bene 
> wrote:
>
> > Great!
> >
> > On Wed, Mar 22, 2017 at 11:28 PM, Tobias Soloschenko <
> > tobiassolosche...@googlemail.com> wrote:
> >
> > > "New" does not mean better. :-)
> > >
> > > kind regards
> > >
> > > Tobias
> > >
> > > > Am 22.03.2017 um 23:09 schrieb Martijn Dashorst <
> > > martijn.dasho...@gmail.com>:
> > > >
> > > > WOW
> > > >
> > > >> On Wed, Mar 22, 2017 at 10:12 PM, Martin Grigorov <
> > mgrigo...@apache.org>
> > > wrote:
> > > >> Hi,
> > > >>
> > > >> Somehow Wicket finished at 3rd position at the last preview run of
> > > >> TechEmpower framework tests :-)
> > > >> https://www.techempower.com/benchmarks/previews/round14/#
> > > section=data-r14=ph=json
> > > >>
> > > >> At plaintext test we are at #18:
> > > >> https://www.techempower.com/benchmarks/previews/round14/#
> > > section=data-r14=ph=plaintext
> > > >>
> > > >> Too bad that the new MySQL JDBC driver v.6 failed at their servers,
> > > >> otherwise I'd expect good results there too.
> > > >> https://github.com/TechEmpower/FrameworkBenchmarks/pull/2603
> > > >>
> > > >> Wicket 7.6.0 performs ~300% better than Round 13!
> > > >> https://www.techempower.com/benchmarks/previews/round14/
> > > r13-vs-r14p1.html
> > > >>
> > > >> The improvements come from
> > > >> https://github.com/TechEmpower/FrameworkBenchmarks/commit/
> > > 54152ceb735cf63351537556aa316dfd29202af4
> > > >> - custom root request mapper
> > > >> - reduced the response size to the minimum
> > > >>
> > > >>
> > > >> Once again the reactive frameworks are slower than the good old
> > Wicket!
> > > :-)
> > > >>
> > > >> Martin Grigorov
> > > >> Wicket Training and Consulting
> > > >> https://twitter.com/mtgrigorov
> > > >
> > > >
> > > >
> > > > --
> > > > Become a Wicket expert, learn from the best:
> http://wicketinaction.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
> > >
> > >
> >
>
>
>
> --
>
> Marcel Barbosa Pinto
> 55 11 98255 8288
>


Re: Drag/drop multiple items

2017-01-18 Thread Martin Makundi
Can you group them in javascript and detect group in wicket side, for
example as list of ids?

2017-01-19 8:29 GMT+02:00 Maxim Solodovnik :

> Hello Sebastien,
>
> I'm trying to implement subj.
> JS example I'm using as POC is here [1]
> Everything works, except for one thing: no matter how many objects I'm
> dropping I only have 1 onDrop() event inside wicket 
>
> can you help me to fix/workaround this?
> Thanks in advance!
>
> [1]
> http://stackoverflow.com/questions/793559/grouping-
> draggable-objects-with-jquery-ui-draggable
>
> --
> WBR
> Maxim aka solomax
>


Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
> TabbedPanel? I was talking purely about browser tabs, so let's avoid
> confusion and keep TabbedPanel out of this thread. ;)
>

Sorry, that's our own use case we are having trouble with =)


> What you are suggesting with AjaxNewWindowModifyingBehavior is more or
> less what I had in mind for a single-page application. However in a
> multi-page multi-tab scenario keeping the per-tab state in the page
> instance is not enough. I'd still have to pass the state between pages
> instances.
>
> Or rather I could pass some identifier by eg. modifying my custom link
> class to automatically rewrite a page parameter like (/tab/). Then
> I'd store a Map<TabId, TabState> in my session to access the per-tab state
> as needed.
>
> Kind regards,
>  Edmund
>
>
> On 12/07/2016 02:27 PM, Martin Grigorov wrote:
>
>> Both your problems are easily solveable by using the page instance as
>> "context".
>> The TabbedPanel is an instance of a Java object that is somewhere inside
>> of
>> an instance of a Page.
>>
>> Wicket provides org.apache.wicket.ajax.AjaxNewWindowNotifyingBehavior
>> that
>> can be used to notify the page that it is opened in a second browser
>> tab/window.
>> In its #onNewWindow() you can do something like:
>> setResponsePage(getPage().getPageClass(), getPage().getPageParameters()).
>> This will render a *new* instance of this page with its own TabbedPanel
>> where you will have different state.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Dec 7, 2016 at 2:13 PM, Urbani, Edmund <
>> edmund.urb...@lilandit.com>
>> wrote:
>>
>> What I am missing (and what my original question was referring to) is a
>>> per-tab context to put things. Think eg. of a page with a data table and
>>> some filters. The user applies filters, clicks on one of the found items
>>> (navigating to a different page), edits, saves (sends the user back to
>>> the
>>> page with the table) and expects the filter criteria to still be intact.
>>> In
>>> a single-tab scenario the filter criteria can be stored in the session -
>>> no
>>> problem.
>>>
>>> Now think of a user who uses multiple tabs with different filter criteria
>>> in each. This is where some sort of per-tab context/store would come in
>>> handy.
>>>
>>> Kind regards,
>>>   Edmund
>>>
>>> PS: I don't see this problem in single-page application though. The page
>>> state itself can represent the state of the tab.
>>>
>>>
>>> On 12/07/2016 01:45 PM, Martin Grigorov wrote:
>>>
>>> Could you please expand on
>>>> "and you do not want to make custom logic to allow multi
>>>> window/tab (in browser)" ?
>>>>
>>>> How exactly Wicket prevents the "multi browser tabs/windows" ?
>>>>
>>>> Martin Grigorov
>>>> Wicket Training and Consulting
>>>> https://twitter.com/mtgrigorov
>>>>
>>>> On Wed, Dec 7, 2016 at 1:37 PM, Martin Makundi <
>>>> martin.maku...@koodaripalvelut.com> wrote:
>>>>
>>>> If one makes a single-page application that has multiple tabs (within
>>>> one
>>>>
>>>>> browser window), and you do not want to make custom logic to allow
>>>>> multi
>>>>> window/tab (in browser) management into session, it would work best if
>>>>> there was separate "session" for each browser tab/window inside wicket.
>>>>>
>>>>> Simplest example is that session has variable "currentlySelectedTab" if
>>>>> you
>>>>> have two browser windows open both will be racing for this same
>>>>> variable
>>>>> unless sessions are separated.
>>>>>
>>>>> So from developer's perspective, would be simplest if wicket
>>>>> transparently
>>>>> separates sessions for each browser window/tab.
>>>>>
>>>>> **
>>>>> Martin
>>>>>
>>>>>
>>>>>
>>>>> 2016-12-07 14:19 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:
>>>>>
>>>>> Hi,
>>>>>
>>>>>> What kind of problem exactly you try to solve there ?
>>>>>> What kind of issues do you face ?
>>>>>>
>>>>>> Martin Grigorov
>>>

Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
>
>
> >
> > Both your problems are easily solveable by using the page instance as
> > > "context".
> > > The TabbedPanel is an instance of a Java object that is somewhere
> inside
> > of
> > > an instance of a Page.
> > > Wicket provides org.apache.wicket.ajax.AjaxNewWindowNotifyingBehavior
> > that
> > > can be used to notify the page that it is opened in a second browser
> > > tab/window.
> > > In its #onNewWindow() you can do something like:
> > > setResponsePage(getPage().getPageClass(),
> getPage().getPageParameters())
> > .
> > > This will render a *new* instance of this page with its own TabbedPanel
> > > where you will have different state.
> >
> >
> > This does not (transparently) solve the issue with normal session
> > variables, such as filter etc. models in session. They are still saved if
> > session is the same.
> >
>
> It is not supposed to "solve" it.
> A HTTP session is something different.
> The HTTP session is per browser when you use cookie (JSESSIONID).
> If you use url-encoded jsessionid then you can have a http session per
> request if you want (not very useful though).
> I think you should ask in Sevlet container forums for this feature. It is
> one level before Wicket layer.
>

I believe this could be handled eleganlty inside wicket when request gets
session it could check for special wicket url parameter or http request
attribute and determine which "wicketsession" the request belongs to and
users's all wicketsessions would be stored in same http session but in a
way that wicket can keep separate wicketsession variables.

**
Martin


>
>
> >
> > **
> > Martin
> >
> >
> > >
> > > On 12/07/2016 01:45 PM, Martin Grigorov wrote:
> > >
> > >> Could you please expand on
> > >> "and you do not want to make custom logic to allow multi
> > >> window/tab (in browser)" ?
> > >>
> > >> How exactly Wicket prevents the "multi browser tabs/windows" ?
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >> https://twitter.com/mtgrigorov
> > >>
> > >> On Wed, Dec 7, 2016 at 1:37 PM, Martin Makundi <
> > >> martin.maku...@koodaripalvelut.com> wrote:
> > >>
> > >> If one makes a single-page application that has multiple tabs (within
> > one
> > >>> browser window), and you do not want to make custom logic to allow
> > multi
> > >>> window/tab (in browser) management into session, it would work best
> if
> > >>> there was separate "session" for each browser tab/window inside
> wicket.
> > >>>
> > >>> Simplest example is that session has variable "currentlySelectedTab"
> if
> > >>> you
> > >>> have two browser windows open both will be racing for this same
> > variable
> > >>> unless sessions are separated.
> > >>>
> > >>> So from developer's perspective, would be simplest if wicket
> > >>> transparently
> > >>> separates sessions for each browser window/tab.
> > >>>
> > >>> **
> > >>> Martin
> > >>>
> > >>>
> > >>>
> > >>> 2016-12-07 14:19 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:
> > >>>
> > >>> Hi,
> > >>>>
> > >>>> What kind of problem exactly you try to solve there ?
> > >>>> What kind of issues do you face ?
> > >>>>
> > >>>> Martin Grigorov
> > >>>> Wicket Training and Consulting
> > >>>> https://twitter.com/mtgrigorov
> > >>>>
> > >>>> On Wed, Dec 7, 2016 at 12:07 PM, Martin Makundi <
> > >>>> martin.maku...@koodaripalvelut.com> wrote:
> > >>>>
> > >>>> This should be built into wicket core, automatic session management.
> > >>>>>
> > >>>> Login
> > >>>>
> > >>>>> once and enable multiple tabs and a new sub-session for each tab.
> > >>>>>
> > >>>>> If user logs out from any of the sessions, all would be
> invalidated.
> > >>>>>
> > >>>>> Not sure if this exists yet, but would be needed.
> > >>>>>
> > >>

Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
> What I am missing (and what my original question was referring to) is a
> per-tab context to put things. Think eg. of a page with a data table and
> some filters. The user applies filters, clicks on one of the found items
> (navigating to a different page), edits, saves (sends the user back to the
> page with the table) and expects the filter criteria to still be intact. In
> a single-tab scenario the filter criteria can be stored in the session - no
> problem.
>
> Now think of a user who uses multiple tabs with different filter criteria
> in each. This is where some sort of per-tab context/store would come in
> handy.
>
> Kind regards,
>  Edmund
>
> PS: I don't see this problem in single-page application though. The page
> state itself can represent the state of the tab.


Only if user designs it stateless. Otherwise all state is in session by
default. To make it transparent for coder, wicket should handle it.


Both your problems are easily solveable by using the page instance as
> "context".
> The TabbedPanel is an instance of a Java object that is somewhere inside of
> an instance of a Page.
> Wicket provides org.apache.wicket.ajax.AjaxNewWindowNotifyingBehavior that
> can be used to notify the page that it is opened in a second browser
> tab/window.
> In its #onNewWindow() you can do something like:
> setResponsePage(getPage().getPageClass(), getPage().getPageParameters()).
> This will render a *new* instance of this page with its own TabbedPanel
> where you will have different state.


This does not (transparently) solve the issue with normal session
variables, such as filter etc. models in session. They are still saved if
session is the same.

**
Martin


>
> On 12/07/2016 01:45 PM, Martin Grigorov wrote:
>
>> Could you please expand on
>> "and you do not want to make custom logic to allow multi
>> window/tab (in browser)" ?
>>
>> How exactly Wicket prevents the "multi browser tabs/windows" ?
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Dec 7, 2016 at 1:37 PM, Martin Makundi <
>> martin.maku...@koodaripalvelut.com> wrote:
>>
>> If one makes a single-page application that has multiple tabs (within one
>>> browser window), and you do not want to make custom logic to allow multi
>>> window/tab (in browser) management into session, it would work best if
>>> there was separate "session" for each browser tab/window inside wicket.
>>>
>>> Simplest example is that session has variable "currentlySelectedTab" if
>>> you
>>> have two browser windows open both will be racing for this same variable
>>> unless sessions are separated.
>>>
>>> So from developer's perspective, would be simplest if wicket
>>> transparently
>>> separates sessions for each browser window/tab.
>>>
>>> **
>>> Martin
>>>
>>>
>>>
>>> 2016-12-07 14:19 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:
>>>
>>> Hi,
>>>>
>>>> What kind of problem exactly you try to solve there ?
>>>> What kind of issues do you face ?
>>>>
>>>> Martin Grigorov
>>>> Wicket Training and Consulting
>>>> https://twitter.com/mtgrigorov
>>>>
>>>> On Wed, Dec 7, 2016 at 12:07 PM, Martin Makundi <
>>>> martin.maku...@koodaripalvelut.com> wrote:
>>>>
>>>> This should be built into wicket core, automatic session management.
>>>>>
>>>> Login
>>>>
>>>>> once and enable multiple tabs and a new sub-session for each tab.
>>>>>
>>>>> If user logs out from any of the sessions, all would be invalidated.
>>>>>
>>>>> Not sure if this exists yet, but would be needed.
>>>>>
>>>>> **
>>>>> Martin
>>>>>
>>>>> 2016-12-07 12:59 GMT+02:00 Urbani, Edmund <edmund.urb...@lilandit.com
>>>>>
>>>> :
>>>>
>>>>> Ok, but how do you create a session per tab? Also, I would at least
>>>>>>
>>>>> need
>>>>
>>>>> to login the authenticated user in the new session.
>>>>>>
>>>>>>
>>>>>> On 12/07/2016 11:43 AM, Martin Makundi wrote:
>>>>>>
>>>>>> We have noticed that most robust if you can get different session for
>>>>>>
>>>>> each
>>>>>
&g

Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
> Could you please expand on
> "and you do not want to make custom logic to allow multi
> window/tab (in browser)" ?
>
> How exactly Wicket prevents the "multi browser tabs/windows" ?
>

If all browser windows have same session then a single page application
will always show same wicket TabbedPanel tab for all browser windows
because they share session and they share information about which tab is
active.

**
Martin


>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 7, 2016 at 1:37 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > If one makes a single-page application that has multiple tabs (within one
> > browser window), and you do not want to make custom logic to allow multi
> > window/tab (in browser) management into session, it would work best if
> > there was separate "session" for each browser tab/window inside wicket.
> >
> > Simplest example is that session has variable "currentlySelectedTab" if
> you
> > have two browser windows open both will be racing for this same variable
> > unless sessions are separated.
> >
> > So from developer's perspective, would be simplest if wicket
> transparently
> > separates sessions for each browser window/tab.
> >
> > **
> > Martin
> >
> >
> >
> > 2016-12-07 14:19 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:
> >
> > > Hi,
> > >
> > > What kind of problem exactly you try to solve there ?
> > > What kind of issues do you face ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Dec 7, 2016 at 12:07 PM, Martin Makundi <
> > > martin.maku...@koodaripalvelut.com> wrote:
> > >
> > > > This should be built into wicket core, automatic session management.
> > > Login
> > > > once and enable multiple tabs and a new sub-session for each tab.
> > > >
> > > > If user logs out from any of the sessions, all would be invalidated.
> > > >
> > > > Not sure if this exists yet, but would be needed.
> > > >
> > > > **
> > > > Martin
> > > >
> > > > 2016-12-07 12:59 GMT+02:00 Urbani, Edmund <
> edmund.urb...@lilandit.com
> > >:
> > > >
> > > > > Ok, but how do you create a session per tab? Also, I would at least
> > > need
> > > > > to login the authenticated user in the new session.
> > > > >
> > > > >
> > > > > On 12/07/2016 11:43 AM, Martin Makundi wrote:
> > > > >
> > > > > We have noticed that most robust if you can get different session
> for
> > > > each
> > > > > tab because the session shares models and will easily conflict if
> > > session
> > > > > is not distinct for each tab.
> > > > >
> > > > >
> > > > >
> > > > > 2016-12-07 12:42 GMT+02:00 Urbani, Edmund <
> > edmund.urb...@lilandit.com>
> > > <
> > > > edmund.urb...@lilandit.com>:
> > > > >
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I have a some questions about the current state of this feature.
> > > > >
> > > > > Firstly, how reliable is it? (Works on all/current browsers? Can
> > still
> > > > > break under certain circumstances?)
> > > > >
> > > > > And secondly, how would I store my own state information per
> > > tab/window?
> > > > > The session context seems too broad because it is shared by all
> tabs
> > > and
> > > > > the page context is too limited.
> > > > >
> > > > > I could make it work with the session anyway, if I can somehow
> > identify
> > > > > the current browser tab and put things into a map accordingly. Or I
> > > could
> > > > > pass on all required info from page to page which would be quite
> > > > cumbersome
> > > > > and conflict with my approach to use bookmarkable URLs wherever
> > > possible.
> > > > >
> > > > > Kind regards,
> > > > >  Edmund
> > > > >
> > > > >
> > > > > 
> > -
> > > > > 

Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
If one makes a single-page application that has multiple tabs (within one
browser window), and you do not want to make custom logic to allow multi
window/tab (in browser) management into session, it would work best if
there was separate "session" for each browser tab/window inside wicket.

Simplest example is that session has variable "currentlySelectedTab" if you
have two browser windows open both will be racing for this same variable
unless sessions are separated.

So from developer's perspective, would be simplest if wicket transparently
separates sessions for each browser window/tab.

**
Martin



2016-12-07 14:19 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:

> Hi,
>
> What kind of problem exactly you try to solve there ?
> What kind of issues do you face ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Dec 7, 2016 at 12:07 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > This should be built into wicket core, automatic session management.
> Login
> > once and enable multiple tabs and a new sub-session for each tab.
> >
> > If user logs out from any of the sessions, all would be invalidated.
> >
> > Not sure if this exists yet, but would be needed.
> >
> > **
> > Martin
> >
> > 2016-12-07 12:59 GMT+02:00 Urbani, Edmund <edmund.urb...@lilandit.com>:
> >
> > > Ok, but how do you create a session per tab? Also, I would at least
> need
> > > to login the authenticated user in the new session.
> > >
> > >
> > > On 12/07/2016 11:43 AM, Martin Makundi wrote:
> > >
> > > We have noticed that most robust if you can get different session for
> > each
> > > tab because the session shares models and will easily conflict if
> session
> > > is not distinct for each tab.
> > >
> > >
> > >
> > > 2016-12-07 12:42 GMT+02:00 Urbani, Edmund <edmund.urb...@lilandit.com>
> <
> > edmund.urb...@lilandit.com>:
> > >
> > >
> > > Hi all,
> > >
> > > I have a some questions about the current state of this feature.
> > >
> > > Firstly, how reliable is it? (Works on all/current browsers? Can still
> > > break under certain circumstances?)
> > >
> > > And secondly, how would I store my own state information per
> tab/window?
> > > The session context seems too broad because it is shared by all tabs
> and
> > > the page context is too limited.
> > >
> > > I could make it work with the session anyway, if I can somehow identify
> > > the current browser tab and put things into a map accordingly. Or I
> could
> > > pass on all required info from page to page which would be quite
> > cumbersome
> > > and conflict with my approach to use bookmarkable URLs wherever
> possible.
> > >
> > > Kind regards,
> > >  Edmund
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> > >
> > > --
> > >
> > > Edmund Urbani
> > > Liland IT Team
> > >
> > > Email: edmund.urb...@lilandit.com <edmund.urb...@lilandit.com>
> > >
> > > Liland IT GmbH ...does IT better
> > > Tel: +43 463 220111
> > > Fax: +43 463 220111-33
> > > Tel(GER): +49 221 65028588
> > >
> > > Find us at Facebook http://facebook.com/Lilandit
> > > http://iventcloud.com
> > > http://Lilandit.com
> > >
> > > <http://www.LilandIT.com> <http://www.LilandIT.com>
> > >
> > > Copyright © 2016, Liland IT GmbH
> > >
> > > Diese Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
> > > Informationen.
> > > Wenn Sie nicht der richtige Adressat sind oder diese Email irrtuemlich
> > > erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten
> > > Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe
> > > dieser Mail ist nicht gestattet.
> > >
> > > This email may contain confidential and/or privileged information.
> > > If you are not the intended recipient (or have received this email in
> > > error) please notify the sender immediately and destroy this email. Any
> > > unauthorised copying, disclosure or distribution of the material in
> this
> > > email is strictly forbidden.
> > >
> >
>


Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
This should be built into wicket core, automatic session management. Login
once and enable multiple tabs and a new sub-session for each tab.

If user logs out from any of the sessions, all would be invalidated.

Not sure if this exists yet, but would be needed.

**
Martin

2016-12-07 12:59 GMT+02:00 Urbani, Edmund <edmund.urb...@lilandit.com>:

> Ok, but how do you create a session per tab? Also, I would at least need
> to login the authenticated user in the new session.
>
>
> On 12/07/2016 11:43 AM, Martin Makundi wrote:
>
> We have noticed that most robust if you can get different session for each
> tab because the session shares models and will easily conflict if session
> is not distinct for each tab.
>
>
>
> 2016-12-07 12:42 GMT+02:00 Urbani, Edmund <edmund.urb...@lilandit.com> 
> <edmund.urb...@lilandit.com>:
>
>
> Hi all,
>
> I have a some questions about the current state of this feature.
>
> Firstly, how reliable is it? (Works on all/current browsers? Can still
> break under certain circumstances?)
>
> And secondly, how would I store my own state information per tab/window?
> The session context seems too broad because it is shared by all tabs and
> the page context is too limited.
>
> I could make it work with the session anyway, if I can somehow identify
> the current browser tab and put things into a map accordingly. Or I could
> pass on all required info from page to page which would be quite cumbersome
> and conflict with my approach to use bookmarkable URLs wherever possible.
>
> Kind regards,
>  Edmund
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
> --
>
> Edmund Urbani
> Liland IT Team
>
> Email: edmund.urb...@lilandit.com <edmund.urb...@lilandit.com>
>
> Liland IT GmbH ...does IT better
> Tel: +43 463 220111
> Fax: +43 463 220111-33
> Tel(GER): +49 221 65028588
>
> Find us at Facebook http://facebook.com/Lilandit
> http://iventcloud.com
> http://Lilandit.com
>
> <http://www.LilandIT.com> <http://www.LilandIT.com>
>
> Copyright © 2016, Liland IT GmbH
>
> Diese Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
> Informationen.
> Wenn Sie nicht der richtige Adressat sind oder diese Email irrtuemlich
> erhalten haben, informieren Sie bitte sofort den Absender und vernichten
> Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe
> dieser Mail ist nicht gestattet.
>
> This email may contain confidential and/or privileged information.
> If you are not the intended recipient (or have received this email in
> error) please notify the sender immediately and destroy this email. Any
> unauthorised copying, disclosure or distribution of the material in this
> email is strictly forbidden.
>


Re: Multi-tab / window support in Wicket 7.5

2016-12-07 Thread Martin Makundi
We have noticed that most robust if you can get different session for each
tab because the session shares models and will easily conflict if session
is not distinct for each tab.



2016-12-07 12:42 GMT+02:00 Urbani, Edmund :

> Hi all,
>
> I have a some questions about the current state of this feature.
>
> Firstly, how reliable is it? (Works on all/current browsers? Can still
> break under certain circumstances?)
>
> And secondly, how would I store my own state information per tab/window?
> The session context seems too broad because it is shared by all tabs and
> the page context is too limited.
>
> I could make it work with the session anyway, if I can somehow identify
> the current browser tab and put things into a map accordingly. Or I could
> pass on all required info from page to page which would be quite cumbersome
> and conflict with my approach to use bookmarkable URLs wherever possible.
>
> Kind regards,
>  Edmund
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Approach to changing value in input field before validation

2016-07-25 Thread Martin Makundi
We have made an utility method that uses reflection to set rawinput, and
have found this very useful.

You set both rawInput and rawInputArray

**
Martin

2016-07-26 1:18 GMT+03:00 Lon Varscsak :

> Okay, so I have a need…I’m sure I’m going to get “why are you doing that?”,
> but I have this need regardless and here’s what it is… :D
>
> User inputs “VALUEA”, I want to look up something in the database for
> “VALUEA”, and if conditions are met, replace that with “VALUEB” and
> continue with validation for the new value.  However, the only way I can
> see to do this would be to update the *rawInput* value, which I do not have
> access to as a subclass (it’s private).
>
> So instead, I tried writing a converter, and it generally behaves as I want
> (it validates “VALUEB”), however if there’s a validation error on “VALUEB”
> the rawInput is still “VALUEA”…so it’s a little confusing to the user.
>
> I’m not sure that using a converter is the “right” approach, but it’s the
> closest I’ve come to a solution.
>
> Thoughts?
>
> Thanks,
>
> Lon
>


Re: Blocking page serialization

2016-06-05 Thread Martin Makundi
>
>
> Every part of the page storing related classes is easily replaceable!
> There is a chapter about it in the user guide.
>

The prolbem is that if we do it brute force in different thread, no
threadlocal requests will work during persistence and it will throw
exceptions.

How many components do you have?
> I have seen some pretty big pages with tables with many rows but this has
> not been a problem.
>

We have tables with 200x400 cells and each cell has nested structures which
brings to millions of components.

**
Martin



> On Jun 5, 2016 10:48 AM, "Martin Makundi" <
> martin.maku...@koodaripalvelut.com> wrote:
>
> > Hi!
> >
> > https://issues.apache.org/jira/browse/WICKET-6177
> >
> > We have a performance issue with our Wicket app, page serialization
> causes
> > inconvenience to user because PageStoreManager.storeTouchedPages() blocks
> > the request until pageSerializer.serialize(page) has been handled.
> >
> > Could this be solved by serializing the page in a separate thread and let
> > the request complete?
> >
> > We have attempted to solve this before for 1.4x but it failed due to
> > thread-dependenciecs:  https://issues.apache.org/jira/browse/WICKET-5805
> >
> > Any ideas how this could be solved with 7.x? This would bring a
> significant
> > performance boost on component-intensive pages. Simply using detachable
> > models does not solve the issue when the serialization of the component
> > hierarchy itself is slow.
> >
> > Thanks.
> >
> > **
> > Martin
> >
>


Blocking page serialization

2016-06-05 Thread Martin Makundi
Hi!

https://issues.apache.org/jira/browse/WICKET-6177

We have a performance issue with our Wicket app, page serialization causes
inconvenience to user because PageStoreManager.storeTouchedPages() blocks
the request until pageSerializer.serialize(page) has been handled.

Could this be solved by serializing the page in a separate thread and let
the request complete?

We have attempted to solve this before for 1.4x but it failed due to
thread-dependenciecs:  https://issues.apache.org/jira/browse/WICKET-5805

Any ideas how this could be solved with 7.x? This would bring a significant
performance boost on component-intensive pages. Simply using detachable
models does not solve the issue when the serialization of the component
hierarchy itself is slow.

Thanks.

**
Martin


Re: Getting the model

2016-03-31 Thread Martin Makundi
2016-03-31 17:06 GMT+03:00 Ron Smits :

> I have searched but I dont find a clear way of getting the model when one
> is creating a custom component:
>
>
> public MoneyLabel(String id) {
> super(id);
> add(new AttributeAppender("class", " number"));
> }
>
> public MoneyLabel(String id, Model bigDecimalModel) {
> super(id, bigDecimalModel);
> add(new AttributeAppender("class", " number"));
> if (bigDecimalModel.getObject().doubleValue() < 0.0) {
> add(new AttributeAppender("class", " negative"));
> }
> }
>
> In the second constructor I can use the supplied model to determine to add
> the negative class. However in the first constructor I cannot find a way to
> access the model.
>
> What am I missing?
>

1. To answer your question: Is this MoneyLabel your own design? If it is
you are free to implement as you whish, or even drop the first constructor.

2. To give a recommendation on your design, I would attach the
AttributeAppender in any case and only check if the model is negative at
runtime (hollywood principle) like this:

add(new AttributeAppender("class", " negative") {

 @Override
  isEnabled(..) {
 bigDecimalModel.getObject().doubleValue() < 0.0
  }
});


**
Martin

>
> Ron
> ​
>


Re: How to set the page title?

2015-12-09 Thread Martin Makundi
Another way in overriding class:

/**
   * @see
org.apache.wicket.Component#renderHead(org.apache.wicket.markup.html.internal.HtmlHeaderContainer)
   */
  @Override
  public void renderHead(HtmlHeaderContainer container) {
super.renderHead(container);
getResponse().write("" +
application.getEmployee().getPerson().displayName() + "");
  }

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-set-the-page-title-tp4662372p4672919.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: Session leak issue, trying to optimize 1.4x

2015-01-13 Thread Martin Makundi
Bounty:
https://www.elance.com/j/java-wicket-core-jetty-internals-expert-fix-session-leak-issue/67287632/

2015-01-09 16:16 GMT+02:00 Martin Makundi 
martin.maku...@koodaripalvelut.com:

 Hi!

 Can anybody help with this?
 https://issues.apache.org/jira/browse/WICKET-5805

 **
 Martin

 2015-01-08 9:24 GMT+02:00 Martin Makundi 
 martin.maku...@koodaripalvelut.com:

 Hi!

 We have a performance issue with our Wicket 1.4 app, page serialization
 causes inconvenience to user because RequestCycle.detach() blocks the
 request until session.requestDetached() has been handled.

 We attempted to solve this issue by invoking session.requestDetached in a
 separate thread and thus allowing user to receive their request without
 waiting for page serialization in SecondLevelCachePageMap. The disk writing
 is already parallel, but serialization is blocking.

 What would be the best (and safest) way to implement this? I have
 attached our (proposed) patches to jira issue:
 https://issues.apache.org/jira/browse/WICKET-5805


 **
 Martin





Re: Wicket request processing

2015-01-11 Thread Martin Makundi
It's easiest if you use maven, simply check box [x] download sources.

Also you can use mvn commandline mvn eclipse:eclipse -Dsources

2015-01-11 12:04 GMT+02:00 kumar ramanathan kumarramana...@gmail.com:

 Hi Martin,
 Am not using maven.But using eclipse,placed necessary jar files and run it
 via tomcat. Kindly tell what needs to do for this.

 Thanks,
 Kumar


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-request-processing-tp4668967p4668969.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: Wicket request processing

2015-01-10 Thread Martin Makundi
Do you have wicket sources available in your dev environment (e.g., via
maven)?

Put breakpoint inside model.setObject() and start debugging and you will
see everything happen real-time in debugger.

**
Martin

2015-01-10 16:24 GMT+02:00 kumar ramanathan kumarramana...@gmail.com:

 Hi friends ,Am trying to learn how a request is getting processed in
 wicket .
 gone through cwiki and apache wicket guide . got some idea , still exactly
 am not able to get the concepts like A. How our inputs are passed to server
 ... Like server where we have req.get parameters workingB. Where are our do
 get and so post method getting the inputs C. Where our servlet request
 generated D. Basic idea with simple hello world example like thatI need
 your
 help  Please help me on this.ThanksKumar

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-request-processing-tp4668967.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: Session leak issue, trying to optimize 1.4x

2015-01-09 Thread Martin Makundi
Hi!

Can anybody help with this?
https://issues.apache.org/jira/browse/WICKET-5805

**
Martin

2015-01-08 9:24 GMT+02:00 Martin Makundi martin.maku...@koodaripalvelut.com
:

 Hi!

 We have a performance issue with our Wicket 1.4 app, page serialization
 causes inconvenience to user because RequestCycle.detach() blocks the
 request until session.requestDetached() has been handled.

 We attempted to solve this issue by invoking session.requestDetached in a
 separate thread and thus allowing user to receive their request without
 waiting for page serialization in SecondLevelCachePageMap. The disk writing
 is already parallel, but serialization is blocking.

 What would be the best (and safest) way to implement this? I have attached
 our (proposed) patches to jira issue:
 https://issues.apache.org/jira/browse/WICKET-5805


 **
 Martin



Wicket job opening in Estonia

2014-11-21 Thread Martin Makundi
Hi!

We have a wicket job opening in Estonia, required fluency in Estonian and
Finnish.

Feel free to email me or apply via
http://www.youritprofile.com/job_ad/id/701


**
Martin


Transpose html table

2014-10-03 Thread Martin Makundi
Hi!

We have a html table in wicket implemented as:

foreach :: listview of table rows {
  ..
  foreach :: list view of table cells {
 ..
  }
}

(note: that was pseudocode)


What we would like to do, is offer users possibility to transpose the
table, however, with minimum changes to the code.

Anybody done this? Any insights?

We acknowledge that there are some inherent differences in the transposed
versions of a html table. For example table rows can be ajax updated but
table columns cannot. This might suggest that a div suitable layout should
be used? Or should we simply
ajaxRequestTarget.addComponent(xx::foreach::firstChildOfRow)  visit each
first child of '*row*' when transposed?

Maybe the transpose could be done using a simple onrender string replace
operation (think along the lines of a *complex regexp operation*).

Any ideas, comments?

Would be nice to accomplish this with a neat trick... NOT looking for a js
gimmick because that will be slow with our heavy duty tables.

Some references:

   -
   
http://assaneonline.blogspot.fi/2011/02/looking-for-simpler-way-to-transpose.html
   -
   
http://adomas.eu/transposing-html-table-even-with-colspan-and-rowspan-used-with-jquery-javascript-code/


**
Martin


Re: Transpose html table

2014-10-03 Thread Martin Makundi
I'd prefer to do it transparently without changing models and minimal
(hardcoded) change to components.

**
Martin

2014-10-03 23:50 GMT+03:00 Paul Bors p...@bors.ws:

 If you want to transpose your table (ie: change the rows and columns)
 then it turn this implies that you want to change the structure of the
 table both the format and the model.
 ie: You need to provide new columns and new data model.

 You would do so in 2 steps:
 1) Create the new table with the new columns
 2) Provide it the new data model

 Then use the addOrReplace(tableId, transposedTableRef) and you're done.

 Otherwise... look at transposing your table in jQuery alone on the client
 side and not on the server side.

 On Fri, Oct 3, 2014 at 11:53 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  Hi!
 
  We have a html table in wicket implemented as:
 
  foreach :: listview of table rows {
..
foreach :: list view of table cells {
   ..
}
  }
 
  (note: that was pseudocode)
 
 
  What we would like to do, is offer users possibility to transpose the
  table, however, with minimum changes to the code.
 
  Anybody done this? Any insights?
 
  We acknowledge that there are some inherent differences in the transposed
  versions of a html table. For example table rows can be ajax updated but
  table columns cannot. This might suggest that a div suitable layout
 should
  be used? Or should we simply
  ajaxRequestTarget.addComponent(xx::foreach::firstChildOfRow)  visit each
  first child of '*row*' when transposed?
 
  Maybe the transpose could be done using a simple onrender string replace
  operation (think along the lines of a *complex regexp operation*).
 
  Any ideas, comments?
 
  Would be nice to accomplish this with a neat trick... NOT looking for a
 js
  gimmick because that will be slow with our heavy duty tables.
 
  Some references:
 
 -
 
 
 http://assaneonline.blogspot.fi/2011/02/looking-for-simpler-way-to-transpose.html
 -
 
 
 http://adomas.eu/transposing-html-table-even-with-colspan-and-rowspan-used-with-jquery-javascript-code/
 
 
  **
  Martin
 



Re: Support for optgroup ?

2014-06-05 Thread Martin Makundi
The optgroup code might be buggy, here is a fresh one:

  private String previouslyAppendedOptGroupLabel;
  private int choices;

  /**
   * @see
org.apache.wicket.markup.html.form.AbstractChoice#onComponentTagBody(org.apache.wicket.markup.MarkupStream,
org.apache.wicket.markup.ComponentTag)
   */
  @Override
  protected void onComponentTagBody(MarkupStream markupStream,
  ComponentTag openTag) {
previouslyAppendedOptGroupLabel = null;
choices = getChoices().size();
super.onComponentTagBody(markupStream, openTag);
  }


/**
   * @see
org.apache.wicket.markup.html.form.AbstractChoice#appendOptionHtml(org.apache.wicket.util.string.AppendingStringBuffer,
java.lang.Object, int, java.lang.String)
   */
  @Override
  protected void appendOptionHtml(AppendingStringBuffer buffer, T choice,
  int index, String selected) {
AppendingStringBuffer tmp = new AppendingStringBuffer(50);
super.appendOptionHtml(tmp, choice, index, selected);

if (getChoiceRenderer() instanceof IStyledChoiceRenderer) {
  IStyledChoiceRendererT styledChoiceRenderer =
(IStyledChoiceRendererT) getChoiceRenderer();

  String currentOptGroupLabel =
styledChoiceRenderer.getOptGroupLabel(choice);

  if (!Utils.equalsOrNull(currentOptGroupLabel,
previouslyAppendedOptGroupLabel)) {
// OptGroup changed
if (previouslyAppendedOptGroupLabel != null) {
  endOptGroup(buffer);
}

if (currentOptGroupLabel != null) {
  // OptGroup started
  int start = tmp.indexOf(option);
  StringBuilder label = new
StringBuilder(currentOptGroupLabel.length() + 19);
  label.append(optgroup
label=\).append(currentOptGroupLabel).append(\);
  tmp.insert(start, label);
}
  }

  if ((currentOptGroupLabel != null)  (index == (choices-1))) {
// Last option group must end too
endOptGroup(tmp);
  }

  {
String cssClass =
styledChoiceRenderer.getOptionCssClassName(choice);
if (cssClass != null) {
  int start = tmp.indexOf(option);
  tmp.insert(start + 7, getClass(cssClass));
}
  }

  previouslyAppendedOptGroupLabel = currentOptGroupLabel;
}

buffer.append(tmp);
  }

  /**
   * @param cssClass
   * @return StringBuilder
   */
  private StringBuilder getClass(String cssClass) {
return new StringBuilder( class=\).append(cssClass).append(\);
  }

  /**
   * @see
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice#getDefaultChoice(java.lang.Object)
   */
  @Override
  protected CharSequence getDefaultChoice(Object selected) {
CharSequence charSequence = super.getDefaultChoice(selected);

if (charSequence.toString().contains(TOKEN)  (getChoiceRenderer()
instanceof IStyledChoiceRenderer)) {
  AppendingStringBuffer buffer = new
AppendingStringBuffer(charSequence);
  IStyledChoiceRendererT styledChoiceRenderer =
(IStyledChoiceRendererT) getChoiceRenderer();
  String cssClass = styledChoiceRenderer.getOptionCssClassName(null);
  if (!Utils.isEmpty(cssClass)) {
buffer.insert(buffer.indexOf(TOKEN), getClass(cssClass));
return buffer;
  }
}

return charSequence;
  }

  /**
   * @param tmp
   */
  private void endOptGroup(AppendingStringBuffer tmp) {
// OptGroup ended
int start = tmp.lastIndexOf(/option);
tmp.insert(start + 9, /optgroup);
  }


2014-06-05 9:37 GMT+03:00 Thies Edeling tedel...@gmail.com:

 thanks!


 On Thu, Jun 5, 2014 at 1:48 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  Look at:
 
 
 
 http://mail-archives.apache.org/mod_mbox/wicket-users/200912.mbox/%3c303141550912040641r1e00841dudaacfefda9497...@mail.gmail.com%3E
 
 
  2014-06-05 1:41 GMT+03:00 Thies Edeling tedel...@gmail.com:
 
   Is there any support for optgroup's in Wicket? I can only find some
   examples using ListView's and other hacky solutions so I'm guessing
 there
   isn't :) Thanks !
  
   gr
   Thies
  
 



Re: Support for optgroup ?

2014-06-05 Thread Martin Makundi
Ah.. and token was:
  private static final String TOKEN =  value=\\;



2014-06-05 9:42 GMT+03:00 Martin Makundi martin.maku...@koodaripalvelut.com
:

 The optgroup code might be buggy, here is a fresh one:

   private String previouslyAppendedOptGroupLabel;
   private int choices;

   /**
* @see
 org.apache.wicket.markup.html.form.AbstractChoice#onComponentTagBody(org.apache.wicket.markup.MarkupStream,
 org.apache.wicket.markup.ComponentTag)
*/
   @Override
   protected void onComponentTagBody(MarkupStream markupStream,
   ComponentTag openTag) {
 previouslyAppendedOptGroupLabel = null;
 choices = getChoices().size();
 super.onComponentTagBody(markupStream, openTag);
   }


 /**
* @see
 org.apache.wicket.markup.html.form.AbstractChoice#appendOptionHtml(org.apache.wicket.util.string.AppendingStringBuffer,
 java.lang.Object, int, java.lang.String)
*/
   @Override
   protected void appendOptionHtml(AppendingStringBuffer buffer, T choice,
   int index, String selected) {
 AppendingStringBuffer tmp = new AppendingStringBuffer(50);
 super.appendOptionHtml(tmp, choice, index, selected);

 if (getChoiceRenderer() instanceof IStyledChoiceRenderer) {
   IStyledChoiceRendererT styledChoiceRenderer =
 (IStyledChoiceRendererT) getChoiceRenderer();

   String currentOptGroupLabel =
 styledChoiceRenderer.getOptGroupLabel(choice);

   if (!Utils.equalsOrNull(currentOptGroupLabel,
 previouslyAppendedOptGroupLabel)) {
 // OptGroup changed
 if (previouslyAppendedOptGroupLabel != null) {
   endOptGroup(buffer);
 }

 if (currentOptGroupLabel != null) {
   // OptGroup started
   int start = tmp.indexOf(option);
   StringBuilder label = new
 StringBuilder(currentOptGroupLabel.length() + 19);
   label.append(optgroup
 label=\).append(currentOptGroupLabel).append(\);
   tmp.insert(start, label);
 }
   }

   if ((currentOptGroupLabel != null)  (index == (choices-1))) {
 // Last option group must end too
 endOptGroup(tmp);
   }

   {
 String cssClass =
 styledChoiceRenderer.getOptionCssClassName(choice);
 if (cssClass != null) {
   int start = tmp.indexOf(option);
   tmp.insert(start + 7, getClass(cssClass));
 }
   }

   previouslyAppendedOptGroupLabel = currentOptGroupLabel;
 }

 buffer.append(tmp);
   }

   /**
* @param cssClass
* @return StringBuilder
*/
   private StringBuilder getClass(String cssClass) {
 return new StringBuilder( class=\).append(cssClass).append(\);
   }

   /**
* @see
 org.apache.wicket.markup.html.form.AbstractSingleSelectChoice#getDefaultChoice(java.lang.Object)
*/
   @Override
   protected CharSequence getDefaultChoice(Object selected) {
 CharSequence charSequence = super.getDefaultChoice(selected);

 if (charSequence.toString().contains(TOKEN)  (getChoiceRenderer()
 instanceof IStyledChoiceRenderer)) {
   AppendingStringBuffer buffer = new
 AppendingStringBuffer(charSequence);
   IStyledChoiceRendererT styledChoiceRenderer =
 (IStyledChoiceRendererT) getChoiceRenderer();
   String cssClass = styledChoiceRenderer.getOptionCssClassName(null);
   if (!Utils.isEmpty(cssClass)) {
 buffer.insert(buffer.indexOf(TOKEN), getClass(cssClass));
 return buffer;
   }
 }

 return charSequence;
   }

   /**
* @param tmp
*/
   private void endOptGroup(AppendingStringBuffer tmp) {
 // OptGroup ended
 int start = tmp.lastIndexOf(/option);
 tmp.insert(start + 9, /optgroup);
   }


 2014-06-05 9:37 GMT+03:00 Thies Edeling tedel...@gmail.com:

 thanks!


 On Thu, Jun 5, 2014 at 1:48 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  Look at:
 
 
 
 http://mail-archives.apache.org/mod_mbox/wicket-users/200912.mbox/%3c303141550912040641r1e00841dudaacfefda9497...@mail.gmail.com%3E
 
 
  2014-06-05 1:41 GMT+03:00 Thies Edeling tedel...@gmail.com:
 
   Is there any support for optgroup's in Wicket? I can only find some
   examples using ListView's and other hacky solutions so I'm guessing
 there
   isn't :) Thanks !
  
   gr
   Thies
  
 





Re: Support for optgroup ?

2014-06-04 Thread Martin Makundi
Look at:

http://mail-archives.apache.org/mod_mbox/wicket-users/200912.mbox/%3c303141550912040641r1e00841dudaacfefda9497...@mail.gmail.com%3E


2014-06-05 1:41 GMT+03:00 Thies Edeling tedel...@gmail.com:

 Is there any support for optgroup's in Wicket? I can only find some
 examples using ListView's and other hacky solutions so I'm guessing there
 isn't :) Thanks !

 gr
 Thies



Re: Link in Feedback Message

2014-05-02 Thread Martin Makundi
You can look at how a link/button renders its url and render that to the
message.

**
Martin


2014-05-02 22:01 GMT+03:00 Entropy blmulholl...@gmail.com:

 I am currently putting a link into one of our feedback messages so give the
 user a quick way to navigate in response to a particular condition.  I am
 doing it by just writing the tags into the message like so:String url =
 this.urlFor(SearchResultPage.class, new PageParameters().set(newSearch,
 True)).toString();error(The selected records have been successfully
 updated.   Search case for updated records  + url +   .);this
 works...about 90% of the way.  But I recently discovered that I need to do
 a
 little work before that link navigates away.  I need to get the onclick
 event.  How can I get an event on the server that the link has been clicked
 and react to it?I am considering a workaround wherein I could provide an
 extra parameter that the target page detects, and causes it to run my code
 there.  But that's not ideal.  I'd rather keep this page's code in this
 page.  Is there a way to do this?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Link-in-Feedback-Message-tp4665648.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: WicketTester - asserting on HTML

2013-11-21 Thread Martin Makundi
assertContains


2013/11/21 Nick Pratt nbpr...@gmail.com

 Is it possible to to make assertions on the rendered HTML of a Wicket page?

 Im trying to make assertions on element attributes (class contents
 specifically).  Is this possible with WicketTester?

 N



Re: OutOfMemoryError: Java heap space when i try to upload and show a hundred 100kb pics

2013-09-01 Thread Martin Makundi
Try memory profiler to see what is at matter.

**
Martin


2013/9/1 Giovanni van334...@gmail.com

 Martin Grigorov-4 wrote
  Hi,
  Read about Java memory settings (-Xms, -Xmx)

 Yes, I can increase heap space by settings, but is this a good approach? If
 displaying one 10Mb pic consumes 1.5Gb heap space - is this normal? Maybe
 there are other ways to solve this problem without increasing heap space by
 settings?



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/OutOfMemoryError-Java-heap-space-when-i-try-to-upload-and-show-a-hundred-100kb-pics-tp4661159p4661161.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: Wicket Charts

2013-08-05 Thread Martin Makundi
Plug and play: https://developers.google.com/chart/

Use that with remoteimage ;)

2013/8/5 Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net:
 Hi all,

 In your opinion, what is the best library (open source licensed) for creating 
 charts with wicket?

 Regards
 M
 --
 Dott. Marco Di Sabatino Di Diodoro
 Tel. +39 3939065570

 Tirasa S.r.l.
 Viale D'Annunzio 267 - 65127 Pescara
 Tel +39 0859116307 / FAX +39 085973
 http://www.tirasa.net

 Apache Syncope PMC Member
 http://people.apache.org/~mdisabatino/


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



Re: Multiple F5 refreshes create multiple threads

2013-07-19 Thread Martin Makundi
Hi!

Not knowing what 1.3 does, but 1.4 locks pagemap in org.apache.wicket.Session.

**
Martin

2013/7/18 Mateusz Mieszkowski mmieszkow...@objectivity.co.uk:
 Hi,

 I'm having a problem with quite old version of Wicket (1.3.6) and I'm 
 wondering if this still exists in the latest version as we're getting ready 
 for upgrading.
 The thing is that if the page opened in browser uses SortableDataProvider, 
 iterator method is executed. So far so good...
 But each time user do F5, page refresh creates new http thread and every one 
 of them is trying to process iterator method.
 Since this is the same user/session, I think it is safe to say that only one 
 thread(that is doing the refresh) is necessary and more refreshes should kill 
 http threads that are working to get the same info.

 The problem in my system was, that one user's F5 blocked and it caused 
 hundreds of refresh and started hundreds of http thread. I imagine that in 
 worse case scenario it could use up whole thread pool and system would be 
 useless for some time.

 I've checked changelogs and jira issues but haven't found anything similar. 
 Could you please let me know if there is a way to avoid such situation?

 Kind regards,
 Mateusz Mieszkowski

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



Re: Need to know which button is pressed in Modalwindow

2013-07-10 Thread Martin Makundi
Look at xxButtonCallback


2013/7/10 Tommy Sadiq Hinrichsen tommy.ly...@gmail.com:
 Hej

 I have a modalwindow where in there is a save button and a cancel button.

 When i pres the cancel button i somehow need to know that this button has
 been pressed.

 I tried creating the modalpage as an inner class of the modal class, and in
 that class editing a variable in the modal class. But when i return to the
 modal class, all variables are unchanged.

 Got any ideas?

 package com.trifork.pengeplan.web.components.modal;

 import com.trifork.pengeplan.domain.MoneyCurrency;
 import com.trifork.pengeplan.web.components.CancelButton;
 import
 com.trifork.pengeplan.web.components.models.temporary.BankAccountModalObject;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.EnumChoiceRenderer;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.IModel;

 import java.beans.PropertyChangeSupport;
 import java.util.Arrays;

 /**
  * @author
  */
 public class AddBankAccountModal extends ModalWindow {

 AddBankAccountModal self;
 AddBankAccountModalPage modalPage;
 DropDownChoiceLong accountForCash;

 protected PropertyChangeSupport propertyChangeSupport;
 protected boolean saveButtonPressed;

 public AddBankAccountModal(String id, final
 IModelBankAccountModalObject model, final WebMarkupContainer
 updateOnWindowsClosed) {
 super(id);

 self = this;
 setPageCreator(new PageCreator() {
 @Override
 public Page createPage() {
 return modalPage = new AddBankAccountModalPage(self, model);
 }
 });

 setWindowClosedCallback(new WindowClosedCallback() {
 public void onClose(AjaxRequestTarget target) {
 if (saveButtonPressed) {
 target.add(updateOnWindowsClosed);
 }
 saveButtonPressed = false;
 }
 });

 setCloseButtonCallback(new CloseButtonCallback() {
 public boolean onCloseButtonClicked(AjaxRequestTarget target) {
 return true;
 }
 });
 }

 public void setAccountForCash(DropDownChoiceLong accountForCash) {
 this.accountForCash = accountForCash;
 }

 class AddBankAccountModalPage extends BaseModalPage {

 public AddBankAccountModalPage(final AddBankAccountModal
 modalWindow, IModelBankAccountModalObject model) {
 super();
 Form form = new Form(bankAccountForm, new
 CompoundPropertyModel(model));

 form.add(new TextFieldString(name).setRequired(true));
 form.add(new
 TextFieldString(financeAccount).setRequired(true));
 form.add(new DropDownChoiceMoneyCurrency(moneyCurrency,
 Arrays.asList(MoneyCurrency.values()), new
 EnumChoiceRendererMoneyCurrency()).setRequired(true));

 form.add(new AjaxButton(save, form) {
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form?
 form) {
 saveButtonPressed = true;
 //TODO save new bank account with sub entities
 modalWindow.close(target);
 }

 @Override
 protected void onError(AjaxRequestTarget target, Form?
 form) {
 target.add(form.get(modalFeedback));
 }
 });
 CancelButton cancel = new CancelButton(cancel) {
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form?
 form) {
 modalWindow.close(target);
 }
 };
 form.add(cancel);
 form.add(new
 FeedbackPanel(modalFeedback).setOutputMarkupPlaceholderTag(true));
 add(form);
 }
 }
 }


 Best regards

 Tommy Sadiq Hinrichsen

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



Re: Looking to pair

2013-07-07 Thread Martin Makundi
Hands-on head-first head-banging is the way to go. Watching aside won't
take you fare and won't float long. Unless you just want to manage ;)

**
Martin

2013/7/7 Mike Pence mike.pe...@gmail.com

 Remote pairing works, too, with some effort.

 I am working my way through Wicket in Action, and I am definitely very
 excited, at this point. But I know that watching a real Wicket expert in
 action would be extremely informative.


 On Sun, Jul 7, 2013 at 2:27 PM, Paul Borș p...@bors.ws wrote:

  Have you glimpsed over the few books offered under the Books section on
  Wicket's home page?
 
  In my experience pair programming works for two developers within the
 same
  physical location when one can explain the other quickly why it's best to
  archive something one way rather than the other.
 
  Have a great day,
  Paul Bors
 
  On Jul 7, 2013, at 1:16 PM, Mike Pence mike.pe...@gmail.com wrote:
 
   Hi guys. Hope that this is appropriate for this list: I am looking for
   someone who is willing to pair program with me (although it would
  probably
   be mostly me on the watching side). I need to get strong with Wicket,
   Spring, and maybe even Neo4J as quickly as possible, as I have
 committed
  to
   using these technologies on a big new project. And I know from
 experience
   that pair programming with someone who is very proficient in those
   technologies is the quickest way to get there.
  
   I posted a job listing on Elance for a similar arrangement, but if any
 of
   you Wicket masters would let me look over your virtual shoulder for a
 few
   hours sometime, it would be much appreciated.
  
   FYI, I have been programming for 20+ years (VB, Delphi, Java, Ruby,
 etc.)
   so it is not like I am a total newbie.
  
   Thanks in advance.
  
   Mike Pence
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Dynamic listview

2013-05-28 Thread Martin Makundi
Hi!

Is it possible to implement a listview that evaporates on detach and
builds itself again whenever one iterates over its items?

We have a huge page with thuge listview and the
serialization/deserialization of the structure slows down the page.

The models are detachable and maybe the components could be too..?

**
Martin

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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
Is it possible to have the listview rebuild itself upon form
processing to allow formcomponents?

**
Martin

2013/5/28 Martin Grigorov mgrigo...@apache.org:
 Hi,

 You can use ListView#removeAll() in #detach() but then this ListView should
 not have any action components
 like Link/Button and any FormComponents in its items, because they won't be
 reachable.
 It can have pretty much only Labels inside.


 On Tue, May 28, 2013 at 10:01 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Is it possible to implement a listview that evaporates on detach and
 builds itself again whenever one iterates over its items?

 We have a huge page with thuge listview and the
 serialization/deserialization of the structure slows down the page.

 The models are detachable and maybe the components could be too..?

 **
 Martin

 -
 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: Dynamic listview

2013-05-28 Thread Martin Makundi
 You could use something that builds itself at client side... while at
 server side is still very lightweight.
 Something like

 http://www.antiliasoft.com/wicket-angular-demo/filtering

 See for explanation.

 http://www.antiliasoft.com/wicket-angular-demo/

This is mainly read-only? We would like to allow in general all wicket
actions...ofcourse we will go brute force if necessary, but we would
like to try first a wicket 'inline' component that rebuilds itself for
form processing and rendering but evaporates its body on detach.

**
Martin


 On Tue, May 28, 2013 at 11:01 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Is it possible to implement a listview that evaporates on detach and
 builds itself again whenever one iterates over its items?

 We have a huge page with thuge listview and the
 serialization/deserialization of the structure slows down the page.

 The models are detachable and maybe the components could be too..?

 **
 Martin

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




 --
 Regards - Ernesto Reinaldo Barreiro

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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
 You could not use normal form processing, I guess, as there will not be any
 form components at server side... (they will be removed after list is
 displayed). So, you will have to do some ticks to map cliente state with
 server state.

 The examples above could be make to work for non read-only situations...
 but maybe not using wicket default form processing machinery...

Feels like reinventing the wheel at both serverside and html ;)

 You can try to do this in
 org.apache.wicket.markup.html.form.Form#process(IFormSubmitter) {
  rebuild();
  super.process(formSubmitter);
}

Ok. Will try something along these lines.

**
Martin


 On Tue, May 28, 2013 at 11:32 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  You could use something that builds itself at client side... while at
  server side is still very lightweight.
  Something like
 
  http://www.antiliasoft.com/wicket-angular-demo/filtering
 
  See for explanation.
 
  http://www.antiliasoft.com/wicket-angular-demo/

 This is mainly read-only? We would like to allow in general all wicket
 actions...ofcourse we will go brute force if necessary, but we would
 like to try first a wicket 'inline' component that rebuilds itself for
 form processing and rendering but evaporates its body on detach.

 **
 Martin
 
 
  On Tue, May 28, 2013 at 11:01 AM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  Is it possible to implement a listview that evaporates on detach and
  builds itself again whenever one iterates over its items?
 
  We have a huge page with thuge listview and the
  serialization/deserialization of the structure slows down the page.
 
  The models are detachable and maybe the components could be too..?
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro

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




 --
 Regards - Ernesto Reinaldo Barreiro

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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
2013/5/28 Martin Grigorov mgrigo...@apache.org:
 On Tue, May 28, 2013 at 10:41 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  You could not use normal form processing, I guess, as there will not be
 any
  form components at server side... (they will be removed after list is
  displayed). So, you will have to do some ticks to map cliente state with
  server state.
 
  The examples above could be make to work for non read-only situations...
  but maybe not using wicket default form processing machinery...

 Feels like reinventing the wheel at both serverside and html ;)

  You can try to do this in
  org.apache.wicket.markup.html.form.Form#process(IFormSubmitter) {
   rebuild();
   super.process(formSubmitter);
 }

 Ok. Will try something along these lines.


 You will need to call #inputChanged() to all FormComponents in your
 ListView, because this method is called earlier than
 Form#process(IFormSubmitter).

Could it be possible to hook onto an earlier event before/during
process to allow form to perform that natively?

**
Martin



 **
 Martin
 
 
  On Tue, May 28, 2013 at 11:32 AM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
   You could use something that builds itself at client side... while at
   server side is still very lightweight.
   Something like
  
   http://www.antiliasoft.com/wicket-angular-demo/filtering
  
   See for explanation.
  
   http://www.antiliasoft.com/wicket-angular-demo/
 
  This is mainly read-only? We would like to allow in general all wicket
  actions...ofcourse we will go brute force if necessary, but we would
  like to try first a wicket 'inline' component that rebuilds itself for
  form processing and rendering but evaporates its body on detach.
 
  **
  Martin
  
  
   On Tue, May 28, 2013 at 11:01 AM, Martin Makundi 
   martin.maku...@koodaripalvelut.com wrote:
  
   Hi!
  
   Is it possible to implement a listview that evaporates on detach and
   builds itself again whenever one iterates over its items?
  
   We have a huge page with thuge listview and the
   serialization/deserialization of the structure slows down the page.
  
   The models are detachable and maybe the components could be too..?
  
   **
   Martin
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
   --
   Regards - Ernesto Reinaldo Barreiro
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro

 -
 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: Dynamic listview

2013-05-28 Thread Martin Makundi
Hi!

 @Martin,

 Sometimes when wheels at hand are not good enough for a certain terrain you
 should ask yourself if it it not easier to invent a new one.

Only shortsightedness might get one convinced that writing new code is
easier than levaraging legacy..eventually ;) [1]


[1] 
http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672

**
Martin

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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
 I look at the code in master branch (7.x) and I guess you still use 1.4.x.
 In 7.x Form#process() is the first non-final method where you can plug your
 code.
 I doubt that 1.4 is different in this area but you can check yourself.
 Start from Form#onFormSubmitted() and follow the flow.

Thanks, and you are right about 1.4.x, don't fix it until it's broken ;)

**
Martin

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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
 Martin Makundi wants to rebuild the ListView items when the form is
 submitted.
 I.e. the form components will be created and then the form processing will
 proceed.

 Yes, I understand that. But my point would match the info coming from
 client with new component tree being created?  i.e. will listview recreate
 everything in a way making request post data consistent with new created
 components?

This might be a problem, really, the markup ids have random suffix

**
Martin


 Cheers,

  Ernesto Reinaldo Barreiro

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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
Ajax update might be tricky, it uses component ids.

2013/5/28 Martin Grigorov mgrigo...@apache.org:
 On Tue, May 28, 2013 at 11:00 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Hi Martin,

 Martin Makundi wants to rebuild the ListView items when the form is
  submitted.
  I.e. the form components will be created and then the form processing
 will
  proceed.
 
  Yes, I understand that. But my point would match the info coming from
 client with new component tree being created?  i.e. will listview recreate
 everything in a way making request post data consistent with new created
 components?


 The new component sub-tree that will be created will be the same as the one
 that has been removed in the previous request #detach().
 I think it should work.



 Cheers,

  Ernesto Reinaldo Barreiro


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



Re: Dynamic listview

2013-05-28 Thread Martin Makundi
That's quite critical for form component input processing too..

2013/5/28 Martin Grigorov mgrigo...@apache.org:
 On Tue, May 28, 2013 at 11:22 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Ajax update might be tricky, it uses component ids.


 True.
 You can override FormComponent#getInputName() to make them stable...



 2013/5/28 Martin Grigorov mgrigo...@apache.org:
  On Tue, May 28, 2013 at 11:00 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  Hi Martin,
 
  Martin Makundi wants to rebuild the ListView items when the form is
   submitted.
   I.e. the form components will be created and then the form processing
  will
   proceed.
  
   Yes, I understand that. But my point would match the info coming from
  client with new component tree being created?  i.e. will listview
 recreate
  everything in a way making request post data consistent with new created
  components?
 
 
  The new component sub-tree that will be created will be the same as the
 one
  that has been removed in the previous request #detach().
  I think it should work.
 
 
 
  Cheers,
 
   Ernesto Reinaldo Barreiro
 

 -
 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: Feedback panel and form buttons in Wicket 6

2013-05-15 Thread Martin Makundi
It is possible to add feedback panel automatically by implementing
org.apache.wicket.ajax.IListener

Here are are some examples:


/**
   * TODO Suggest for jira addition, see
   *
   * 
http://apache-wicket.1842946.n4.nabble.com/HowTo-inject-FeedbackPanel-td2295430.html
   *
   * @author Martin
   *
   * Copyright (c) Koodaripalvelut.com Finland 2008
   */
  public static class TopMostVisibleFeedbackPanelAjaxAutoAdderListener
implements IListener {
private IFeedbackMessageFilter feedbackMessageFilter;

/**
 * @see 
org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond(java.util.Map,
org.apache.wicket.ajax.AjaxRequestTarget)
 */
@Override
public void onBeforeRespond(MapString, Component map,
AjaxRequestTarget target) {
  FeedbackMessages feedbackMessages = Session.get().getFeedbackMessages();

  ListFeedbackMessage messages =
feedbackMessages.messages(feedbackMessageFilter);

  if (!messages.isEmpty()) {
Object feedbackPanel = null;

for (FeedbackMessage feedbackMessage : messages) {
  Component component = feedbackMessage.getReporter();
  if (component != null) {
feedbackPanel = addFeedbackPanel(target, component);
  }
}

if (feedbackPanel == null) {
  // Some messages still want to become visible, try finding
feedbackpanel from page
  addFeedbackPanel(target, target.getPage());
}
  }
}

/**
 * @param target
 * @param component
 * @return Object
 */
private Object addFeedbackPanel(AjaxRequestTarget target,
Component component) {
  Object feedbackPanel = new
VisitTopMostMarkupContainerPageOrModalWindowHavingVisibleChild(component,
IFeedback.class).getFoundChild();

  if (feedbackPanel instanceof Component) {
if (!((Component) feedbackPanel).getOutputMarkupId()) {
  Utils.errorLog(TakpApplication.class, Cannot update
feedbackComponent that does not have setOutputMarkupId( +
component.getMarkupId() + ) property set to true. Component:  +
component.getPageRelativePath() + :  + component);
} else {
  target.addComponent((Component) feedbackPanel); // Add
feedbackPanel to the ajax request target
  return feedbackPanel;
}
  }

  return null;
}

/**
 * @param feedbackMessageFilter the feedbackMessageFilter to set
 * @return NearestFeedbackPanelAjaxAutoAdderListener
 */
public TopMostVisibleFeedbackPanelAjaxAutoAdderListener
setFeedbackMessageFilter(IFeedbackMessageFilter feedbackMessageFilter)
{
  this.feedbackMessageFilter = feedbackMessageFilter;
  return this;
}

/**
 * @return the feedbackMessageFilter
 */
public IFeedbackMessageFilter getFeedbackMessageFilter() {
  return feedbackMessageFilter;
}

/**
 * @see 
org.apache.wicket.ajax.AjaxRequestTarget.IListener#onAfterRespond(java.util.Map,
org.apache.wicket.ajax.AjaxRequestTarget.IJavascriptResponse)
 */
@Override
public void onAfterRespond(MapString, Component map,
org.apache.wicket.ajax.AjaxRequestTarget.IJavascriptResponse response)
{
  // Override if necessary
}
  }


/**
   * @author Martin
   *
   * Copyright (c) Koodaripalvelut.com Finland 2008
   */
  public static class
ErrorComponentAndNearestFeedbackPanelAjaxAutoAdderListener extends
TopMostVisibleFeedbackPanelAjaxAutoAdderListener {
/**
 * @see 
com.tustor.tuntinetti.view.TakpApplication.TopMostVisibleFeedbackPanelAjaxAutoAdderListener#onBeforeRespond(java.util.Map,
org.apache.wicket.ajax.AjaxRequestTarget)
 */
@Override
public void onBeforeRespond(MapString, Component map,
AjaxRequestTarget target) {
  super.onBeforeRespond(map, target);
  WicketUtils.ajaxRefreshErrorComponents(target);
}
  }

/**
   * @param target
   */
  public static void ajaxRefreshErrorComponents(AjaxRequestTarget target) {
ListFeedbackMessage feedbackMessages =
Session.get().getFeedbackMessages().messages(new
ErrorLevelFeedbackMessageFilter(FeedbackMessage.ERROR));

for (FeedbackMessage feedbackMessage : feedbackMessages) {
  if (feedbackMessage.getReporter() instanceof FormComponent) {
if (feedbackMessage.getReporter().getOutputMarkupId()) {
  target.addComponent(feedbackMessage.getReporter());
} else {
  Utils.errorLog(WicketUtils.class, Cannot update component
that does not have setOutputMarkupId property set to true. Component:

  + feedbackMessage.getReporter().getPageRelativePath());
}
  }
}
  }

2013/5/16 Ernesto Reinaldo Barreiro reier...@gmail.com:
 Paul,

 Maybe you might want use AJAX event to automatically  add feedback to
 target So, that you can safely forget;-)

 Cheers,

 Ernesto

 On Thu, May 16, 2013 at 12:30 AM, Paul Bors p...@bors.ws wrote:

 Nevermind that... I forogt to add the feedback panel to the target :)

 ~ Thank you,
Paul Bors


 On Wed, May 15, 2013 at 4:26 PM, 

Re: Update Model on DropDown Item Selection

2013-04-08 Thread Martin Makundi
Use ajax behavior, e.g., OnChangeAjaxBehavior


**
Martin

2013/4/9 Bruno Moura brunormo...@gmail.com:
 I need to update a model or object immediately after select
 a DropDownChoice item.


 Bellow is the code that I'm working:

 //
 -

  add(new ListView[Company](listCompanies, listData) {

 override protected def onBeforeRender() {
   //
   // ...
   super.onBeforeRender()
 }

 def populateItem(item: ListItem[Company]) = {
   var company = item.getModelObject()

   //...

   val listClients: java.util.List[Client] = clientControler.listClients


   item.add(new DropDownChoice(clientSelection, listClients,new
 ChoiceRenderer[Client](name)))

 //
 -

 In the Listview with properties of Company Object,
 after choose a name property of the DropDownChoice, the model
 Company would be updated with the Client Name selected.

 How can I achieve this?

 Thanks

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



Re: Illegal utf characters in ajax xml response

2012-12-19 Thread Martin Makundi
I wonder if it is performance-wise best place to have it as a wrap-it-all?

2012/12/19 Martin Grigorov mgrigo...@apache.org:
 I think it is a good idea to have this filter in Wicket.
 Each application will decide whether to use it or not.


 On Wed, Dec 19, 2012 at 10:31 AM, Martin Grigorov mgrigo...@apache.orgwrote:


 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html


 On Wed, Dec 19, 2012 at 4:34 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 xb also

 2012/12/19 Michael Mosmann mich...@mosmann.de:
  Am 15.12.2012 06:22, schrieb Martin Makundi:
 
  We could use AjaxSelfUpdatingTimerBehavior to iterate over most
 characters
  and see where it fails (which could be easily detected)..
 
  As today i only know of 0x1a as a bad one.
 
  Michael Mosmann
 
 
  OK, is possibly trivial:
 
 getRequestCycleSettings().addResponseFilter(new
 IResponseFilter() {
   @Override
   public AppendingStringBuffer filter(AppendingStringBuffer
  responseBuffer) {
 return responseBuffer; TODO if starts with xml strip illegal
  xml
  characters?
   }
 });
 
 
  ?
 
  2012/12/15 Martin Makundi martin.maku...@koodaripalvelut.com
 
  Can you point me to an example for this?
 
 
  2012/12/15 Martin Grigorov mgrigo...@apache.org
 
  org.apache.wicket.response.filter.IResponseFilter is applied to both
  Ajax
  and normal responses.
 
 
  On Sat, Dec 15, 2012 at 7:02 AM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  Hi!
 
  Is there a setting/interceptor/filter that can be applied to filter
 out
  illegal utf characters from AjaxRequestTarget response?
 
 
 
 
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
 
  Specifically wicket 1.4.x
 
  **
  Martin
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/

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



Re: Illegal utf characters in ajax xml response

2012-12-19 Thread Martin Makundi
Is there a way to plug it only for particular ajaxes in current 1.4.x stack?

2012/12/19 Martin Grigorov mgrigo...@apache.org:
 Yes, the performance is what stops me to apply it by default for the Ajax
 responses.
 The application developer needs to decide whether their app can include
 such invalid XML characters in the Ajax responses.


 On Wed, Dec 19, 2012 at 12:34 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 I wonder if it is performance-wise best place to have it as a wrap-it-all?

 2012/12/19 Martin Grigorov mgrigo...@apache.org:
  I think it is a good idea to have this filter in Wicket.
  Each application will decide whether to use it or not.
 
 
  On Wed, Dec 19, 2012 at 10:31 AM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
 
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
 
 
  On Wed, Dec 19, 2012 at 4:34 AM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  xb also
 
  2012/12/19 Michael Mosmann mich...@mosmann.de:
   Am 15.12.2012 06:22, schrieb Martin Makundi:
  
   We could use AjaxSelfUpdatingTimerBehavior to iterate over most
  characters
   and see where it fails (which could be easily detected)..
  
   As today i only know of 0x1a as a bad one.
  
   Michael Mosmann
  
  
   OK, is possibly trivial:
  
  getRequestCycleSettings().addResponseFilter(new
  IResponseFilter() {
@Override
public AppendingStringBuffer filter(AppendingStringBuffer
   responseBuffer) {
  return responseBuffer; TODO if starts with xml strip
 illegal
   xml
   characters?
}
  });
  
  
   ?
  
   2012/12/15 Martin Makundi martin.maku...@koodaripalvelut.com
  
   Can you point me to an example for this?
  
  
   2012/12/15 Martin Grigorov mgrigo...@apache.org
  
   org.apache.wicket.response.filter.IResponseFilter is applied to
 both
   Ajax
   and normal responses.
  
  
   On Sat, Dec 15, 2012 at 7:02 AM, Martin Makundi 
   martin.maku...@koodaripalvelut.com wrote:
  
   Hi!
  
   Is there a setting/interceptor/filter that can be applied to
 filter
  out
   illegal utf characters from AjaxRequestTarget response?
  
  
  
  
  
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
  
   Specifically wicket 1.4.x
  
   **
   Martin
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.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
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/

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



Re: Illegal utf characters in ajax xml response

2012-12-19 Thread Martin Makundi
 What are conditions when you want to plug it ?

I know a certain ajax response might contain illegal characters?
Though it might be easier just to filter the known contents.

**
Martin


 On Wed, Dec 19, 2012 at 12:47 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Is there a way to plug it only for particular ajaxes in current 1.4.x
 stack?

 2012/12/19 Martin Grigorov mgrigo...@apache.org:
  Yes, the performance is what stops me to apply it by default for the Ajax
  responses.
  The application developer needs to decide whether their app can include
  such invalid XML characters in the Ajax responses.
 
 
  On Wed, Dec 19, 2012 at 12:34 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  I wonder if it is performance-wise best place to have it as a
 wrap-it-all?
 
  2012/12/19 Martin Grigorov mgrigo...@apache.org:
   I think it is a good idea to have this filter in Wicket.
   Each application will decide whether to use it or not.
  
  
   On Wed, Dec 19, 2012 at 10:31 AM, Martin Grigorov 
 mgrigo...@apache.org
  wrote:
  
  
  
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
  
  
   On Wed, Dec 19, 2012 at 4:34 AM, Martin Makundi 
   martin.maku...@koodaripalvelut.com wrote:
  
   xb also
  
   2012/12/19 Michael Mosmann mich...@mosmann.de:
Am 15.12.2012 06:22, schrieb Martin Makundi:
   
We could use AjaxSelfUpdatingTimerBehavior to iterate over most
   characters
and see where it fails (which could be easily detected)..
   
As today i only know of 0x1a as a bad one.
   
Michael Mosmann
   
   
OK, is possibly trivial:
   
   getRequestCycleSettings().addResponseFilter(new
   IResponseFilter() {
 @Override
 public AppendingStringBuffer
 filter(AppendingStringBuffer
responseBuffer) {
   return responseBuffer; TODO if starts with xml strip
  illegal
xml
characters?
 }
   });
   
   
?
   
2012/12/15 Martin Makundi martin.maku...@koodaripalvelut.com
   
Can you point me to an example for this?
   
   
2012/12/15 Martin Grigorov mgrigo...@apache.org
   
org.apache.wicket.response.filter.IResponseFilter is applied to
  both
Ajax
and normal responses.
   
   
On Sat, Dec 15, 2012 at 7:02 AM, Martin Makundi 
martin.maku...@koodaripalvelut.com wrote:
   
Hi!
   
Is there a setting/interceptor/filter that can be applied to
  filter
   out
illegal utf characters from AjaxRequestTarget response?
   
   
   
   
   
  
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
   
Specifically wicket 1.4.x
   
**
Martin
   
   
   
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.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
  
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
  
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com http://jweekend.com/

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/

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



Re: Illegal utf characters in ajax xml response

2012-12-18 Thread Martin Makundi
xb also

2012/12/19 Michael Mosmann mich...@mosmann.de:
 Am 15.12.2012 06:22, schrieb Martin Makundi:

 We could use AjaxSelfUpdatingTimerBehavior to iterate over most characters
 and see where it fails (which could be easily detected)..

 As today i only know of 0x1a as a bad one.

 Michael Mosmann


 OK, is possibly trivial:

getRequestCycleSettings().addResponseFilter(new IResponseFilter() {
  @Override
  public AppendingStringBuffer filter(AppendingStringBuffer
 responseBuffer) {
return responseBuffer; TODO if starts with xml strip illegal
 xml
 characters?
  }
});


 ?

 2012/12/15 Martin Makundi martin.maku...@koodaripalvelut.com

 Can you point me to an example for this?


 2012/12/15 Martin Grigorov mgrigo...@apache.org

 org.apache.wicket.response.filter.IResponseFilter is applied to both
 Ajax
 and normal responses.


 On Sat, Dec 15, 2012 at 7:02 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 Is there a setting/interceptor/filter that can be applied to filter out
 illegal utf characters from AjaxRequestTarget response?




 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html

 Specifically wicket 1.4.x

 **
 Martin



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.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: Illegal utf characters in ajax xml response

2012-12-14 Thread Martin Makundi
Can you point me to an example for this?

2012/12/15 Martin Grigorov mgrigo...@apache.org

 org.apache.wicket.response.filter.IResponseFilter is applied to both Ajax
 and normal responses.


 On Sat, Dec 15, 2012 at 7:02 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  Hi!
 
  Is there a setting/interceptor/filter that can be applied to filter out
  illegal utf characters from AjaxRequestTarget response?
 
 
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
 
  Specifically wicket 1.4.x
 
  **
  Martin
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/



Re: Illegal utf characters in ajax xml response

2012-12-14 Thread Martin Makundi
OK, is possibly trivial:

  getRequestCycleSettings().addResponseFilter(new IResponseFilter() {
@Override
public AppendingStringBuffer filter(AppendingStringBuffer
responseBuffer) {
  return responseBuffer; TODO if starts with xml strip illegal xml
characters?
}
  });


?

2012/12/15 Martin Makundi martin.maku...@koodaripalvelut.com

 Can you point me to an example for this?


 2012/12/15 Martin Grigorov mgrigo...@apache.org

 org.apache.wicket.response.filter.IResponseFilter is applied to both Ajax
 and normal responses.


 On Sat, Dec 15, 2012 at 7:02 AM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

  Hi!
 
  Is there a setting/interceptor/filter that can be applied to filter out
  illegal utf characters from AjaxRequestTarget response?
 
 
 
 http://blog.mark-mclaren.info/2007/02/invalid-xml-characters-when-valid-utf8_5873.html
 
  Specifically wicket 1.4.x
 
  **
  Martin
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/





Re: AJAX updating of non typical components

2012-12-13 Thread Martin Makundi
Maybe add a dummy component inside the panel that is refreshed instead
and piggybacks your js or smth.

2012/12/13 Ernesto Reinaldo Barreiro reier...@gmail.com:
 Hi,

 On Wed, Dec 12, 2012 at 8:29 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Why not have outputmarkupid=true?


 In this particular use case doing that would mean that a IFeedback panel,
 based on (
 http://www.erichynds.com/jquery/a-jquery-ui-growl-ubuntu-notification-widget/),
 will be reconstructed any time there are errors on page (all JS, and
 dependencies will be streamed back to the server as PART of ART) while the
 only thing that is need is pass back some JavaScript (e.g. appended to ART)
 that adds some notifications at client side widget.



 2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
  IHeaderContibutor won't work if component does not has
  setOutputMarkupId(true) AjaxRequestHandler#add()
 
  public void add(Component... components)
  {
  for (final Component component : components)
  {
  Args.notNull(component, component);
 
  if (component.getOutputMarkupId() == false  !(component instanceof
 Page))
  {
  throw new IllegalArgumentException(
  cannot update component that does not have setOutputMarkupId property
 set
  to true. Component:  +
  component.toString());
  }
  add(component, component.getMarkupId());
  }
  }
 
  On Wed, Dec 12, 2012 at 4:59 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  IHeaderContributor?
 
  2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
   Hi,
  
   Several times I have encountered the situation where I want to
 update a
   component via AJAX and this component does not have
  setOutputMarkupId(true)
   or even the component generates no  visible markup.  All this
 component
   needs is a way to repaint itself (either by adding some sub-components
  that
   are re-paintable via AJAX or by generating some JavaScript that will
  update
   component state at client side). So, what I want is being to do
   target.add(myNotStandardComponent) and wicket to take care of its
  update...
   Maybe by providing and  interface like
  
   IAjaxUpdatable {
  
   void update(AjaxRequestTarget target);
  
   }
  
   that marks the  component as being re-renderable via AJAX ... and
 modify
   AjaxRequestTarget logic to take this into account.
  
   I gave a look into the sources and the closest thing I have found is
  
   interface ITargetRespondListener
   {
   /**
* Invoked when AjaxRequestTarget is about the respond.
*
* @param target
*/
   void onTargetRespond(AjaxRequestTarget target);
   }
  
   but these are added via target.registerRespondListener do not seem to
 be
   the same.
  
   Is the above a good idea? Or shall I simply use
  ITargetRespondListener?
  
   --
   Regards - Ernesto Reinaldo Barreiro
   Antilia Soft
   http://antiliasoft.com/ http://antiliasoft.com/antilia
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro
  Antilia Soft
  http://antiliasoft.com/ http://antiliasoft.com/antilia

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




 --
 Regards - Ernesto Reinaldo Barreiro
 Antilia Soft
 http://antiliasoft.com/ http://antiliasoft.com/antilia

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



Re: AJAX updating of non typical components

2012-12-12 Thread Martin Makundi
IHeaderContributor?

2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
 Hi,

 Several times I have encountered the situation where I want to update a
 component via AJAX and this component does not have setOutputMarkupId(true)
 or even the component generates no  visible markup.  All this component
 needs is a way to repaint itself (either by adding some sub-components that
 are re-paintable via AJAX or by generating some JavaScript that will update
 component state at client side). So, what I want is being to do
 target.add(myNotStandardComponent) and wicket to take care of its update...
 Maybe by providing and  interface like

 IAjaxUpdatable {

 void update(AjaxRequestTarget target);

 }

 that marks the  component as being re-renderable via AJAX ... and modify
 AjaxRequestTarget logic to take this into account.

 I gave a look into the sources and the closest thing I have found is

 interface ITargetRespondListener
 {
 /**
  * Invoked when AjaxRequestTarget is about the respond.
  *
  * @param target
  */
 void onTargetRespond(AjaxRequestTarget target);
 }

 but these are added via target.registerRespondListener do not seem to be
 the same.

 Is the above a good idea? Or shall I simply use  ITargetRespondListener?

 --
 Regards - Ernesto Reinaldo Barreiro
 Antilia Soft
 http://antiliasoft.com/ http://antiliasoft.com/antilia

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



Re: AJAX updating of non typical components

2012-12-12 Thread Martin Makundi
Why not have outputmarkupid=true?

2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
 IHeaderContibutor won't work if component does not has
 setOutputMarkupId(true) AjaxRequestHandler#add()

 public void add(Component... components)
 {
 for (final Component component : components)
 {
 Args.notNull(component, component);

 if (component.getOutputMarkupId() == false  !(component instanceof Page))
 {
 throw new IllegalArgumentException(
 cannot update component that does not have setOutputMarkupId property set
 to true. Component:  +
 component.toString());
 }
 add(component, component.getMarkupId());
 }
 }

 On Wed, Dec 12, 2012 at 4:59 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 IHeaderContributor?

 2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
  Hi,
 
  Several times I have encountered the situation where I want to update a
  component via AJAX and this component does not have
 setOutputMarkupId(true)
  or even the component generates no  visible markup.  All this component
  needs is a way to repaint itself (either by adding some sub-components
 that
  are re-paintable via AJAX or by generating some JavaScript that will
 update
  component state at client side). So, what I want is being to do
  target.add(myNotStandardComponent) and wicket to take care of its
 update...
  Maybe by providing and  interface like
 
  IAjaxUpdatable {
 
  void update(AjaxRequestTarget target);
 
  }
 
  that marks the  component as being re-renderable via AJAX ... and modify
  AjaxRequestTarget logic to take this into account.
 
  I gave a look into the sources and the closest thing I have found is
 
  interface ITargetRespondListener
  {
  /**
   * Invoked when AjaxRequestTarget is about the respond.
   *
   * @param target
   */
  void onTargetRespond(AjaxRequestTarget target);
  }
 
  but these are added via target.registerRespondListener do not seem to be
  the same.
 
  Is the above a good idea? Or shall I simply use  ITargetRespondListener?
 
  --
  Regards - Ernesto Reinaldo Barreiro
  Antilia Soft
  http://antiliasoft.com/ http://antiliasoft.com/antilia

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




 --
 Regards - Ernesto Reinaldo Barreiro
 Antilia Soft
 http://antiliasoft.com/ http://antiliasoft.com/antilia

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



Re: AJAX updating of non typical components

2012-12-12 Thread Martin Makundi
1. Please also implement this expert/newuser mode as boolean closeonhover
setting inside notificationspanel:

public void onTargetRespond(AjaxRequestTarget target) {
  if(isExpertMode()) {
renderErrorNotifications(target, getString(timeManagement.error),
new NotificationSettings()
.setExpires(false).setUseHoverIntent(false),
NotificationsPanel.CloseOnHoverFunction.instance,
NotificationsPanel.CloseAllBeforeOpenFunction.instance);
  } else {
renderErrorNotifications(target, getString(timeManagement.error),
new NotificationSettings()
.setExpires(false).setUseHoverIntent(false),
NotificationsPanel.CloseAllBeforeOpenFunction.instance);
  }
}

2. Looking at timeManagement.error, does it work with different level
errors/warnings/info?

2012/12/12 Martin Makundi martin.maku...@koodaripalvelut.com

 Why not have outputmarkupid=true?

 2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
  IHeaderContibutor won't work if component does not has
  setOutputMarkupId(true) AjaxRequestHandler#add()
 
  public void add(Component... components)
  {
  for (final Component component : components)
  {
  Args.notNull(component, component);
 
  if (component.getOutputMarkupId() == false  !(component instanceof
 Page))
  {
  throw new IllegalArgumentException(
  cannot update component that does not have setOutputMarkupId property
 set
  to true. Component:  +
  component.toString());
  }
  add(component, component.getMarkupId());
  }
  }
 
  On Wed, Dec 12, 2012 at 4:59 PM, Martin Makundi 
  martin.maku...@koodaripalvelut.com wrote:
 
  IHeaderContributor?
 
  2012/12/12 Ernesto Reinaldo Barreiro reier...@gmail.com:
   Hi,
  
   Several times I have encountered the situation where I want to
 update a
   component via AJAX and this component does not have
  setOutputMarkupId(true)
   or even the component generates no  visible markup.  All this
 component
   needs is a way to repaint itself (either by adding some sub-components
  that
   are re-paintable via AJAX or by generating some JavaScript that will
  update
   component state at client side). So, what I want is being to do
   target.add(myNotStandardComponent) and wicket to take care of its
  update...
   Maybe by providing and  interface like
  
   IAjaxUpdatable {
  
   void update(AjaxRequestTarget target);
  
   }
  
   that marks the  component as being re-renderable via AJAX ... and
 modify
   AjaxRequestTarget logic to take this into account.
  
   I gave a look into the sources and the closest thing I have found is
  
   interface ITargetRespondListener
   {
   /**
* Invoked when AjaxRequestTarget is about the respond.
*
* @param target
*/
   void onTargetRespond(AjaxRequestTarget target);
   }
  
   but these are added via target.registerRespondListener do not seem to
 be
   the same.
  
   Is the above a good idea? Or shall I simply use
  ITargetRespondListener?
  
   --
   Regards - Ernesto Reinaldo Barreiro
   Antilia Soft
   http://antiliasoft.com/ http://antiliasoft.com/antilia
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Regards - Ernesto Reinaldo Barreiro
  Antilia Soft
  http://antiliasoft.com/ http://antiliasoft.com/antilia



Re: Wicket Application instance from outside Wicket Application

2012-11-08 Thread Martin Makundi
BTW: Is useful to pass the context path... ;)

2012/11/7 Martin Makundi martin.maku...@koodaripalvelut.com:
 Solved, extend this class from your webservice or other:

 public abstract class AbstractWicketCompatibleWebService {
   private static Application application; // Set in Application()
 constructor for example
   private final MockWebApplication mockWebApplication;

   /**
*
*/
   public AbstractWicketCompatibleWebService() {
 Application.set(getApplication());
 mockWebApplication = new MockWebApplication(getApplication(), null);
 mockWebApplication.createRequestCycle();
   }

   /**
* @return the application
*/
   public static Application getApplication() {
 return application;
   }

   /** Call from Application() constructor for example
* @param application
*/
   public static void setApplication(Application application) {
 AbstractWicketCompatibleWebService.application = application;
   }
 }



 **
 Martin

 2012/9/19 Oscar Besga Arcauz obe...@isdefe.es:
 Maybe if you do a foward from webservice to wicket page...

 From other side, you can see Wicket Session classes and data into the normal 
 HttpSession (thougth it needs a little navigation)
 or you can hook data in normal HttpSession into wicket  classes.

 My2cents: I would refactor helpers outside wicket



Oscar Besga Arcauz

 -Martin Grigorov mgrigo...@apache.org escribió: -
 Para: users@wicket.apache.org
 De: Martin Grigorov mgrigo...@apache.org
 Fecha: 18/09/2012  21:42
 Asunto: Re: Wicket Application instance from outside Wicket Application

 See org.apache.wicket.protocol.http.servlet.WicketSessionFilter

 On Tue, Sep 18, 2012 at 9:31 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 Can't the wicket filter be put in from of axis (servlet/filter) so that you
 have a session and application attached to the thread?

 On Tue, Sep 18, 2012 at 6:05 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 We have Axis web services running in the same Jetty as Wicket.

 Our Axis web services happen to call some wicket helper methods, which
 assume there is a session and application on thread. For localization,
 etc.

 How can our Wreb Service best get hold of the wicket application at
 runtime?


 **
 Martin

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




 --
 Regards - Ernesto Reinaldo Barreiro
 Antilia Soft
 http://antiliasoft.com



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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


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



Re: Wicket Application instance from outside Wicket Application

2012-11-08 Thread Martin Makundi
It appears the mock app does quite some nasty things... this works:

  /**
   *
   */
  public AbstractWebService() {
Application.set(getApplication());

final ServletContext servletContext = getApplication().getServletContext();
final MockHttpSession mockHttpSession = new MockHttpSession(servletContext);
final MockHttpServletRequest mockHttpServletRequest = new
MockHttpServletRequest(Application.get(), mockHttpSession,
servletContext);
final MockHttpServletResponse servletResponse = new
MockHttpServletResponse(mockHttpServletRequest);

final WebRequest wicketRequest =
getApplication().newWebRequest(mockHttpServletRequest);
final WebResponse wicketResponse =
getApplication().newWebResponse(servletResponse);

getApplication().newRequestCycle(wicketRequest, wicketResponse);
  }

2012/11/8 Martin Makundi martin.maku...@koodaripalvelut.com:
 BTW: Is useful to pass the context path... ;)

 2012/11/7 Martin Makundi martin.maku...@koodaripalvelut.com:
 Solved, extend this class from your webservice or other:

 public abstract class AbstractWicketCompatibleWebService {
   private static Application application; // Set in Application()
 constructor for example
   private final MockWebApplication mockWebApplication;

   /**
*
*/
   public AbstractWicketCompatibleWebService() {
 Application.set(getApplication());
 mockWebApplication = new MockWebApplication(getApplication(), null);
 mockWebApplication.createRequestCycle();
   }

   /**
* @return the application
*/
   public static Application getApplication() {
 return application;
   }

   /** Call from Application() constructor for example
* @param application
*/
   public static void setApplication(Application application) {
 AbstractWicketCompatibleWebService.application = application;
   }
 }



 **
 Martin

 2012/9/19 Oscar Besga Arcauz obe...@isdefe.es:
 Maybe if you do a foward from webservice to wicket page...

 From other side, you can see Wicket Session classes and data into the 
 normal HttpSession (thougth it needs a little navigation)
 or you can hook data in normal HttpSession into wicket  classes.

 My2cents: I would refactor helpers outside wicket



Oscar Besga Arcauz

 -Martin Grigorov mgrigo...@apache.org escribió: -
 Para: users@wicket.apache.org
 De: Martin Grigorov mgrigo...@apache.org
 Fecha: 18/09/2012  21:42
 Asunto: Re: Wicket Application instance from outside Wicket Application

 See org.apache.wicket.protocol.http.servlet.WicketSessionFilter

 On Tue, Sep 18, 2012 at 9:31 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 Can't the wicket filter be put in from of axis (servlet/filter) so that you
 have a session and application attached to the thread?

 On Tue, Sep 18, 2012 at 6:05 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 We have Axis web services running in the same Jetty as Wicket.

 Our Axis web services happen to call some wicket helper methods, which
 assume there is a session and application on thread. For localization,
 etc.

 How can our Wreb Service best get hold of the wicket application at
 runtime?


 **
 Martin

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




 --
 Regards - Ernesto Reinaldo Barreiro
 Antilia Soft
 http://antiliasoft.com



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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


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



Re: Wicket Application instance from outside Wicket Application

2012-11-07 Thread Martin Makundi
Solved, extend this class from your webservice or other:

public abstract class AbstractWicketCompatibleWebService {
  private static Application application; // Set in Application()
constructor for example
  private final MockWebApplication mockWebApplication;

  /**
   *
   */
  public AbstractWicketCompatibleWebService() {
Application.set(getApplication());
mockWebApplication = new MockWebApplication(getApplication(), null);
mockWebApplication.createRequestCycle();
  }

  /**
   * @return the application
   */
  public static Application getApplication() {
return application;
  }

  /** Call from Application() constructor for example
   * @param application
   */
  public static void setApplication(Application application) {
AbstractWicketCompatibleWebService.application = application;
  }
}



**
Martin

2012/9/19 Oscar Besga Arcauz obe...@isdefe.es:
 Maybe if you do a foward from webservice to wicket page...

 From other side, you can see Wicket Session classes and data into the normal 
 HttpSession (thougth it needs a little navigation)
 or you can hook data in normal HttpSession into wicket  classes.

 My2cents: I would refactor helpers outside wicket



Oscar Besga Arcauz

 -Martin Grigorov mgrigo...@apache.org escribió: -
 Para: users@wicket.apache.org
 De: Martin Grigorov mgrigo...@apache.org
 Fecha: 18/09/2012  21:42
 Asunto: Re: Wicket Application instance from outside Wicket Application

 See org.apache.wicket.protocol.http.servlet.WicketSessionFilter

 On Tue, Sep 18, 2012 at 9:31 PM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
 Can't the wicket filter be put in from of axis (servlet/filter) so that you
 have a session and application attached to the thread?

 On Tue, Sep 18, 2012 at 6:05 PM, Martin Makundi 
 martin.maku...@koodaripalvelut.com wrote:

 Hi!

 We have Axis web services running in the same Jetty as Wicket.

 Our Axis web services happen to call some wicket helper methods, which
 assume there is a session and application on thread. For localization,
 etc.

 How can our Wreb Service best get hold of the wicket application at
 runtime?


 **
 Martin

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




 --
 Regards - Ernesto Reinaldo Barreiro
 Antilia Soft
 http://antiliasoft.com



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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


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



Wicket Application instance from outside Wicket Application

2012-09-18 Thread Martin Makundi
Hi!

We have Axis web services running in the same Jetty as Wicket.

Our Axis web services happen to call some wicket helper methods, which
assume there is a session and application on thread. For localization,
etc.

How can our Wreb Service best get hold of the wicket application at runtime?


**
Martin

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



Re: Question about unit testing

2012-09-05 Thread Martin Makundi
https://cwiki.apache.org/WICKET/type-safe-testing-in-wicket.html

=)

2012/9/5 Markward Schubert markward.schub...@gmail.com:
 Hi folks!

 I am sure this is a trivial question, but i am simply too dumb to figure
 this out.
 We have a DopDownChoice, which is prefilled by some modelvalue, given to
 the page.
 Until now i was doing some testing about the model-state before and after
 submitting, which then was correct.
 The problem in the browser was, that the rendered DropDownChoice did  not
 show the preselected value correctly. It could not recognize the equality
 between some member of the available choices and the model's choice.

 Actually it turned out that it was a problem with the model object's
 equals.

 Now my question is:

 What is the most elegant way to unit test the correct rendering of the
 preselection of the DropDownChoice or similar components?
 As said, simply dealing with sumbmit and stuff worked correctly.


 Regards,

 Markward

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



Re: Fix for WICKET-3947 and WICKET-4700

2012-09-02 Thread Martin Makundi
I propose that because this is a bugfix
(https://issues.apache.org/jira/browse/WICKET-3947) with thorough
junit tests, it should be added to 1.4.x

**
Martin

2012/8/21 Veikko Törmänen veikko.torma...@hotmail.com:
 Thank you for the information.

 I had missed the correct patch protocol and wasn't aware that the 1.4.x was
 frozen.

 Apologies.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Fix-for-WICKET-3947-and-WICKET-4700-tp4651386p4651395.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: Fix for WICKET-3947 and WICKET-4700

2012-09-02 Thread Martin Makundi
Hi!

 Wicket 1.4.x is frozen. Only security bug fixes can be committed.
 1.4.21 is being voted and the vote ends tomorrow.

This would be a good opportunity to get widespread experience of this
bugfix, it will benefit also later versions.

 About the patch - I still don't like the leak that it adds -
 o.a.w.Component will know about InlineEnclosure (a specialization of
 Component).

We didn't find a way to do this in the current wicket architecture,
it's simply does not support autocomponents well enough.

 Why you don't like the workaround with the simple WebMarkupContainer
 as a parent of InlineEnclosure ?

Well that was the original boilerplate code we wanted to get rid of in
first place. Ofcourse everything can be done the hard way but built in
support for such basic functionality is beneficial.

**
Martin



 On Sun, Sep 2, 2012 at 12:53 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 I propose that because this is a bugfix
 (https://issues.apache.org/jira/browse/WICKET-3947) with thorough
 junit tests, it should be added to 1.4.x

 **
 Martin

 2012/8/21 Veikko Törmänen veikko.torma...@hotmail.com:
 Thank you for the information.

 I had missed the correct patch protocol and wasn't aware that the 1.4.x was
 frozen.

 Apologies.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Fix-for-WICKET-3947-and-WICKET-4700-tp4651386p4651395.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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: Fix for WICKET-3947 and WICKET-4700

2012-09-02 Thread Martin Makundi
Hi!

 Wicket 1.4.x is frozen. Only security bug fixes can be committed.
 1.4.21 is being voted and the vote ends tomorrow.

 This would be a good opportunity to get widespread experience of this
 bugfix, it will benefit also later versions.

 There is a chance to break something else ... The risk is big.

Well.. just run all the tests ;)

 We didn't find a way to do this in the current wicket architecture,
 it's simply does not support autocomponents well enough.

 We know that. We will think how this can be improved for Wicket 7.
 In Wicket 1.5 there is EnclosureContainer which can be used as a
 replacement of (Inline)Enclosure. The difference is that it is not an
 auto component.

 I suggest you to spend some time to upgrade to 1.5.8 or 6.0.0.
 These are the versions we also use in production and it will be easy
 to catch any problems when applying patches by users.

The pace of upgrading from one incompatible wicket to another seem so
fast that we will wait for 7 or 8 or 9 =) We are currently in pretty
far a sweetspot in wicket development, it has almost all the features
we need and we have hacked into it everything it does not have yet
that we need, so upgrading would make no sense, upgrading would take
us way backwards.

**
Martin



 On Sun, Sep 2, 2012 at 12:53 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 I propose that because this is a bugfix
 (https://issues.apache.org/jira/browse/WICKET-3947) with thorough
 junit tests, it should be added to 1.4.x

 **
 Martin

 2012/8/21 Veikko Törmänen veikko.torma...@hotmail.com:
 Thank you for the information.

 I had missed the correct patch protocol and wasn't aware that the 1.4.x 
 was
 frozen.

 Apologies.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Fix-for-WICKET-3947-and-WICKET-4700-tp4651386p4651395.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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: Fix for WICKET-3947 and WICKET-4700

2012-09-02 Thread Martin Makundi
 I'm looking at the tests in the patch and I see things like:

 +
 +   //assertEquals(InlineEnclosure has traversed page x times , 
 new
 Integer(1), new
 Integer(InlineEnclosure.inlineEnclosureTraversalCounter));
 +   //  
 InlineEnclosure.CALCULATE_INLINE_ENCLOSURE_PERFORMANCE = false;
 +

 Not happy!

Ok, we'll fix that.

 Right. Sometimes it doesn't worth it.
 Then use Wicket 6+ in your next project (if you still like it ;-) ).

Heh, we try to have a platform for rapidly extending our app so a
completely new project from scratch is something I can't immagine yet.
Maybe it will be wicket 60.0 ;)

**
Martin



 On Sun, Sep 2, 2012 at 12:53 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 I propose that because this is a bugfix
 (https://issues.apache.org/jira/browse/WICKET-3947) with thorough
 junit tests, it should be added to 1.4.x

 **
 Martin

 2012/8/21 Veikko Törmänen veikko.torma...@hotmail.com:
 Thank you for the information.

 I had missed the correct patch protocol and wasn't aware that the 1.4.x 
 was
 frozen.

 Apologies.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Fix-for-WICKET-3947-and-WICKET-4700-tp4651386p4651395.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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: Session Serialization optimization

2012-08-26 Thread Martin Makundi
Thanks, implemented it with wicket 1.4.x also, anybody interested in
the code let me know ;)

**
Martin

On Fri, Jul 6, 2012 at 5:17 PM, Martin Grigorov mgrigo...@apache.org wrote:
 I have tried with
 https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/serializer-kryo

 On Fri, Jul 6, 2012 at 4:13 PM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 Hi!

 Has anyone tried some serialization booster (e.g.,
 http://static.netty.io/3.5/api/org/jboss/netty/buffer/ChannelBuffer.html)
 with wicket session page serializer? Successfully?

 **
 Martin

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.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: Wicket Render speed

2012-08-25 Thread Martin Makundi
Are you using loadabledetachable models everywhere possible?

**
Martin

2012/8/25 steven.li steven...@skyworthglobal.com:
 Hi All

  I have a dataview table, for 50 rows, it takes around 10 seconds to show
 the page, and the render part take around 8-9 seconds from debug log,  Any
 way to improve this ?

 Each row, there are 2 input DateText filed, three labels, 4 checkbox, 2
 icons and 2-3 placehoder TD. around 100 characters each row.  Is this a two
 heavy row for wicket ?



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Render-speed-tp4651489.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: Wicket Render speed

2012-08-25 Thread Martin Makundi
Use a real profiler to see.. also running application in deployment
mode will give you more appropriate results.

**
Martin

2012/8/26 steven.li steven...@skyworthglobal.com:
 yes. I use loadabledetachable model.  it's the initial time loading takes too
 long time. and from the debug log, it shows most of time are spend on
 Beging Render--Rendered---End Render



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Render-speed-tp4651489p4651502.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: Wicket Render speed

2012-08-25 Thread Martin Makundi
http://wicket.apache.org/help/  JProfiler or YourKit  for example.

2012/8/26 steven.li steven...@skyworthglobal.com:
 what profiler can we use ? I changed to deploy mode, the result is the same .
 If I remove the 4 combo checkbox, it will be much faster.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-Render-speed-tp4651489p4651505.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



Looking for A Telecommuting Wicket Specialist

2012-08-14 Thread Martin Makundi
Hi!

We are looking for a telecommuting wicket private contractor to do
some application development using Wicket (1.4.x).

We prefer a direct contract with the developer-contractor instead of
software companies.


**
Martin
http://code.google.com/p/koodaripalvelut-wicket/

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



Session Serialization optimization

2012-07-06 Thread Martin Makundi
Hi!

Has anyone tried some serialization booster (e.g.,
http://static.netty.io/3.5/api/org/jboss/netty/buffer/ChannelBuffer.html)
with wicket session page serializer? Successfully?

**
Martin

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



Re: setOutputMarkupPlaceholderTag not working to render panel with setvisible false...

2012-07-01 Thread Martin Makundi
Try setOutputMarkupPlaceholderTag(true)

2012/7/1 kshitiz k.agarw...@gmail.com:
 Hi,

 I am using a panel with setVisible false on a condition. But it is not
 getting rendered when its visibility becomes true. Here is  the code :

 *final ShowCommentPanel showCommentPanel = new ShowCommentPanel(
                                 showCommentPanel, postDomain, userDomain, 
 3);
                 showCommentPanel.setOutputMarkupPlaceholderTag(true);
                 showCommentPanel.setVisible(!commentDomainList().isEmpty());
         *

 AjaxFallbackButton ajaxCommentSubmitButton = new AjaxFallbackButton(
                                 commentSubmitButton, commentForm) {

         @Override
                         public void onSubmit(AjaxRequestTarget target, final 
 Form? form) {


                                 if (target != null) {

                                         try {
                                 // some processing
                                         } catch (Exception exception) {
                                                 error(exception.getMessage());
                                         }
                                         *target.add(showCommentPanel);*
                                 }
                         }



                 };

 what can be the problem?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-not-working-to-render-panel-with-setvisible-false-tp4650313.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: Ajax refresh not working in a case .... while working in similar other cases!!!

2012-06-09 Thread Martin Makundi
Did you look at wicket ajax debugin browser? It usually gives quite
good clues about what's missing ...

2012/6/9 kshitiz k.agarw...@gmail.com:
 Hi,

 I am trying to refresh ajax container after firing an event. The code is:

 *final WebMarkupContainer searchContainer = new WebMarkupContainer(
                                searchContainer);
                searchContainer.setOutputMarkupId(true);*


 AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton(
                                searchButton, searchForm) {

                        @Override
                        public void onSubmit(AjaxRequestTarget target, final 
 Form? form) {
                                if (target != null) {

                                        try {
                                                 // some actions...
                                        } catch (Exception exception) {
                                        }
                                        *target.add(searchContainer);*
                                }
                        }
 }


 Label userLabel = new Label(userLabel, List of Users);
                Label numberOfUserLabel = new Label(numberOfUserLabel, new 
 Integer(
                                numberOfUsers).toString());

                final PageableListViewUserDomain userDomainListView = new
 PageableListViewUserDomain(
                                user, userDomainList, resultsPerPage) {
                        private static final long serialVersionUID = 1L;

                        @Override
                        protected void populateItem(final ListItemUserDomain 
 listItem) {
                        // populating list
                        }

                };

 *               userDomainListView.setVisible(!userDomainList.isEmpty());
                userLabel.setVisible(!userDomainList.isEmpty());
                numberOfUserLabel.setVisible(!userDomainList.isEmpty());

                searchContainer.add(userLabel);
                searchContainer.add(userDomainListView);
                searchContainer.add(numberOfUserLabel);
 *

 But the list view is not getting refreshed? I am using the same technique in
 other pages and it is working.. what be the reason..?? Any suggestion can
 work for me...

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794.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: Ajax refresh not working in a case .... while working in similar other cases!!!

2012-06-09 Thread Martin Makundi
Ajax debug is a small hover window visible in browser when you have
application configuration in development mode.

**
Martin


2012/6/9 kshitiz k.agarw...@gmail.com:
 I have never tried out that beforeI have enabled debug mode but I to
 debug the ajax part? Can you please tell me ??

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649797.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: Ajax refresh not working in a case .... while working in similar other cases!!!

2012-06-09 Thread Martin Makundi
Listview has this parameter reuseitems, if you set it to false it will
rebuild when its container is refreshed.

2012/6/9 kshitiz k.agarw...@gmail.com:
 I got the problem atleast...what is happening that it is using the same
 search object (where results are being stored and then displayed in
 container) and not creating the new one for new searches. Actually what I
 want is when user searches anything, the results are refreshed only. I am
 storing the results in an object and displaying them using listview which is
 again a part of container. Can you suggest me anything out here?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649799.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: Ajax refresh not working in a case .... while working in similar other cases!!!

2012-06-09 Thread Martin Makundi
clearinput can be used with forms when submit is not done but model is changed

**
Martin

2012/6/9 kshitiz k.agarw...@gmail.com:
 Okk...actually when I analysed more, what  I found is that when I enter new
 value in text field, the event takes the old value only. Even I am now
 refreshing the form too. Then I found that the field sets its value to old
 one after getting refreshed. My field is of final  type. But that should not
 be the problem as I am using the same technique in other pages too...

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649802.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: Redirect to Wicket page with 301 Moved Permanently

2012-05-14 Thread Martin Makundi
Also you can hack jetty or similar...

// Force 302 redirect status code into 301 'permanent redirect'
Field statusField = HttpGenerator.class.getDeclaredField(__status);
statusField.setAccessible(true);
Object[] statusMap = (Object[]) statusField.get(HttpStatus.class);
statusMap[HttpStatus.MOVED_TEMPORARILY_302] =
statusMap[HttpStatus.MOVED_PERMANENTLY_301];


2012/5/14 Jeffrey Schneller jeffrey.schnel...@envisa.com:
 Are you using Apache HTTPD in front of your app server?  If so, you can just 
 use a Rewrite Rule to send the 301 redirect with the new URL.  You may want 
 to look into your app server to see if url rewriting is an option.



 -Original Message-
 From: jarnis [mailto:jarnis.bertel...@exedio.com]
 Sent: Monday, May 14, 2012 5:56 AM
 To: users@wicket.apache.org
 Subject: Redirect to Wicket page with 301 Moved Permanently

 Hey guys

 I'm trying to make a redirect form an old url to a new one. The browser url 
 should be changed to the new one and the response code for the original 
 request to the old url should be 301 Moved permanently so search engines will 
 forget the old url.

 Making the redirect by throwing a RestartResponseException works fine, except 
 I can't change the response code from 302 Moved Temporarily to 301 Moved 
 Permanetly

 I've also tried using the RedirectToUrlException, where setting the response 
 code is easy, but I have problems getting it to construct a correct relative 
 url so I don't have to hard code it to a specific host name.

 What is the best way to solve this?

 Thanks in advance

 Jarnis

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888.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


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



Re: How do I keep component paths constant across unit tests when using Wicket Tester

2012-04-21 Thread Martin Makundi
Test safely:

https://cwiki.apache.org/WICKET/type-safe-testing-in-wicket.html

2012/4/21 mmuk...@gmail.com mmuk...@gmail.com:
 I have several wicket tests that target a sortable DataTable, specifically
 ajax-clicking the sortable column headers and asserting the contents of the
 rendered body rows. Now the component hierarchy of the table component's
 descendants is auto generated by the wicket framework, and results in paths
 to the sorting links (ajax) similar to:

    table:topToolbars:toolbars:0:headers:1:header:orderByLink

 However, when the DataTable gets re-rendered across tests, the index of the
 toolbars component is incremented each time i.e similar to:

    table:topToolbars:toolbars:1:headers:1:header:orderByLink

 which then breaks the hard-coded paths of the succeeding tests as they will
 no longer match.

 The code fragment for the datatable construction is as follows:

                final PayeesProvider dataProvider = new PayeesProvider();
                table = new DataTableResponsePayeeDetails(payees, columns,
 dataProvider, rowsPerPage);
                table.setOutputMarkupId(true);
                table.addTopToolbar(new AjaxFallbackHeadersToolbar(table, 
 dataProvider) {

                        private static final long serialVersionUID = 
 -3509487788284410429L;

                        @Override
                        protected WebMarkupContainer newSortableHeader(final 
 String borderId,
 final String property, final ISortStateLocator locator) {
                                return new AjaxFallbackOrderByBorder(borderId, 
 property, locator,
 getAjaxCallDecorator()) {

                                        @Override
                                        protected void onRender() {
                                                System.out.printf(Path: 
 %s\n, this.getPageRelativePath());
                                                super.onRender();
                                        }

                                        private static final long 
 serialVersionUID = -6399737639959498915L;

                                        @Override
                                        protected void onAjaxClick(final 
 AjaxRequestTarget target) {
                                                target.add(getTable(), 
 navigator, navigatorInfoContainer);
                                        }

                                        @Override
                                        protected void onSortChanged() {
                                                super.onSortChanged();
                                                getTable().setCurrentPage(0);
                                        }
                                };
                        }
                });
                table.addBottomToolbar(new NoRecordsToolbar(table));
                add(table);

 To be precise, when I run my tests, the above System.out.printf statement
 prints:

 (1st test)

    Path: payees:topToolbars:toolbars:0:headers:1:header
    Path: payees:topToolbars:toolbars:0:headers:2:header

 (2nd test)

    Path: payees:topToolbars:toolbars:2:headers:1:header
    Path: payees:topToolbars:toolbars:2:headers:2:header

 (3rd test)

    Path: payees:topToolbars:toolbars:4:headers:1:header
    Path: payees:topToolbars:toolbars:4:headers:2:header

 (4th test)

    Path: payees:topToolbars:toolbars:6:headers:1:header
    Path: payees:topToolbars:toolbars:6:headers:2:header
    Path: payees:topToolbars:toolbars:6:headers:1:header
    Path: payees:topToolbars:toolbars:6:headers:2:header
    Path: payees:topToolbars:toolbars:6:headers:1:header
    Path: payees:topToolbars:toolbars:6:headers:2:header

 (5th test)

    Path: payees:topToolbars:toolbars:8:headers:1:header
    Path: payees:topToolbars:toolbars:8:headers:2:header

 Does anyone know how I can force the index generation to be more
 deterministic / repeatable. Alternatively, is there a way of wild-carding or
 otherwise generalising the path, so as to make them immune to these
 increments?

 Any help will be greatly appreciated chaps!


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-do-I-keep-component-paths-constant-across-unit-tests-when-using-Wicket-Tester-tp4577030p4577030.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: A/B testing with wicket

2012-04-19 Thread Martin Makundi
You can use Google adwords to implement A/B testing.

**
Martin

2012/4/19 Decebal Suiu decebal.s...@asf.ro:
 Hello

 Any advice how can I implement the A/B testing
 (http://en.wikipedia.org/wiki/A/B_testing) in wicket. Anybody already
 implemented this concept in an ecommerce or page landing site?

 Thanks,
 Decebal

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/A-B-testing-with-wicket-tp4571946p4571946.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: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?

2012-04-18 Thread Martin Makundi
You can kill it in Session but killing a thread will leave it in unknown state.

**
Martin

2012/4/18 fachhoch fachh...@gmail.com:
 If a page is stuck with this error , is there any way I can identify this and
 throw  a RestartResponseAtInterceptPageException exception to error page ?

 I am using wicket 1.4.12


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568619.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: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?

2012-04-18 Thread Martin Makundi
We got some of these because of:

- database deadlocks (unsorted race situation)
- non-threadsafe access to hashmaps (hashmap/treemap has cool
possibility to hang when used from multiple threads without
synchronization)
- excplicit lock bugs (reentrantlocks)


I recommend to debug by displaying the stacktrace of the hanged
thread. This can be achieved manually or via kill -3.

**
Martin

2012/4/18 Igor Vaynberg igor.vaynb...@gmail.com:
 its a servlet container thread, probably not safe to kill...

 maybe we can have implement a hard-evict from the store, and some
 strategy to handle these cases.

 -igor

 On Wed, Apr 18, 2012 at 11:42 AM, Martin Makundi
 martin.maku...@koodaripalvelut.com wrote:
 You can kill it in Session but killing a thread will leave it in unknown 
 state.

 **
 Martin

 2012/4/18 fachhoch fachh...@gmail.com:
 If a page is stuck with this error , is there any way I can identify this 
 and
 throw  a RestartResponseAtInterceptPageException exception to error page ?

 I am using wicket 1.4.12


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568619.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


 -
 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



  1   2   3   4   5   6   7   8   9   10   >