Re: Wicket and Vue.js synergy

2020-08-17 Thread Илья Нарыжный
Dear, Wicket Developers,

There is actually one issue in Wicket which will be good to get fixed
before next release:
https://issues.apache.org/jira/projects/WICKET/issues/WICKET-6815
Without it, we have to use a brutal workaround:
https://github.com/OrienteerBAP/vuecket/blob/master/vuecket/src/main/java/org/orienteer/vuecket/util/FixWICKET6815.java

This issue is about the parsing of non-standard HTML attributes which
apparantly used by VueJS: v-bind:attr, @attr, :attr. Hopefully, the
fix of this issue will be helpful for better integration of Wicket
with other JS frameworks as well.

Ilya
-
Orienteer(http://orienteer.org) - open-source Business Application Platform

On Sun, Aug 16, 2020 at 2:55 PM Илья Нарыжный  wrote:
>
> Hello, Wicket Users!
>
> Vuecket went through an important milestone: all required
> functionality is ready to be used.
> Also here is tutorial on how to use Vuecket:
> https://medium.com/orienteer/vuejs-wicket-vuecket-ee7bd5534fee
>
> P.S. Btw, will really appreciate it if the link to Vuecket can be
> added wicket.apache.org.
> P.P.S There is also a curated list of Wicket related projects which
> will be also good to have on the official Wicket site:
> https://github.com/PhantomYdn/awesome-wicket If not all of these
> projects, but at least most of them:)
>
> Thanks,
> Ilya
> -
> Orienteer(http://orienteer.org) - open source Business Application Platform
>
> On Tue, Aug 11, 2020 at 12:44 AM Илья Нарыжный  wrote:
> >
> > Hello,
> >
> > Made big progress on marrying Wicket and Vue.
> > Currently, existing features are listed in README:
> > https://github.com/OrienteerBAP/vuecket/blob/master/README.md
> > Will really appreciate constructive feedback! (Even if it's something
> > like "I didn't understand the README":) )
> >
> > Thanks,
> > Ilya
> > -----
> > Orienteer(http://orienteer.org) - open source Business Application Platform
> >
> >
> > On Tue, Aug 4, 2020 at 12:59 AM Илья Нарыжный  wrote:
> > >
> > > Thank you, Martin!
> > >
> > > If somebody interested, work has begun in the following repository:
> > > https://github.com/OrienteerBAP/vuecket
> > > Features which I plan to add soon:
> > >
> > > 1) Support of Data Channel: channels for synchronization of data on
> > > Vue side and named Models on wicket side. 1 way sync, 2 way sync, one
> > > time, runtime, websocket.
> > > 2) Support of subscriptions to vue events.
> > > 3) Support of storing Vue code as Json (plain String is Java), *.vue
> > > files, reference to NPM package
> > >
> > > Btw, recently we released JNPM (https://github.com/OrienteerBAP/JNPM)
> > > - native java API for work with NPM. Idea is to use JNPM for more
> > > fluent and runtime integration with NPM registry and NPM packages. For
> > > example, to allow quickly link wicket component to the corresponding
> > > implementation in NPM package, add data channels and event listeners.
> > > Ideally with minimal "wrapping" JS code.
> > > Ultimate goal is to make our product (Orienteer) even more rapid for
> > > applications development due to reinforcement of front-end support.
> > >
> > > Thanks,
> > > Ilya
> > > -
> > > Orienteer(http://orienteer.org) - open source Business Application 
> > > Platform
> > >
> > > On Fri, May 8, 2020 at 6:18 AM Martin Grigorov  
> > > wrote:
> > > >
> > > > Hi Илья,
> > > >
> > > > 7 years ago I've made a (small) integration with Ractive.js:
> > > > https://github.com/martin-g/wicket-ractive and blogged about it
> > > > https://wicketinaction.com/2013/08/surgical-ajax-updates-with-ractive-js/
> > > > IMO Vue.js has started as a fork from Ractive.js but Rich Harris says it
> > > > just influenced it: 
> > > > https://twitter.com/mtgrigorov/status/806531052743311360
> > > >  :-)
> > > > I like them both a lot!
> > > > You can use wicket-ractive as an inspiration! It just uses Ractive.js 
> > > > for
> > > > the Ajax updates (instead of Wicket's XML approach). I didn't go any
> > > > deeper, like integrating on component level
> > > >
> > > > Have fun!
> > > >
> > > > On Thu, May 7, 2020 at 6:40 AM Илья Нарыжный  wrote:
> > > >
> > > > > Hello,
> > > > 

Re: Wicket and Vue.js synergy

2020-08-16 Thread Илья Нарыжный
Hello, Wicket Users!

Vuecket went through an important milestone: all required
functionality is ready to be used.
Also here is tutorial on how to use Vuecket:
https://medium.com/orienteer/vuejs-wicket-vuecket-ee7bd5534fee

P.S. Btw, will really appreciate it if the link to Vuecket can be
added wicket.apache.org.
P.P.S There is also a curated list of Wicket related projects which
will be also good to have on the official Wicket site:
https://github.com/PhantomYdn/awesome-wicket If not all of these
projects, but at least most of them:)

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Tue, Aug 11, 2020 at 12:44 AM Илья Нарыжный  wrote:
>
> Hello,
>
> Made big progress on marrying Wicket and Vue.
> Currently, existing features are listed in README:
> https://github.com/OrienteerBAP/vuecket/blob/master/README.md
> Will really appreciate constructive feedback! (Even if it's something
> like "I didn't understand the README":) )
>
> Thanks,
> Ilya
> -
> Orienteer(http://orienteer.org) - open source Business Application Platform
>
>
> On Tue, Aug 4, 2020 at 12:59 AM Илья Нарыжный  wrote:
> >
> > Thank you, Martin!
> >
> > If somebody interested, work has begun in the following repository:
> > https://github.com/OrienteerBAP/vuecket
> > Features which I plan to add soon:
> >
> > 1) Support of Data Channel: channels for synchronization of data on
> > Vue side and named Models on wicket side. 1 way sync, 2 way sync, one
> > time, runtime, websocket.
> > 2) Support of subscriptions to vue events.
> > 3) Support of storing Vue code as Json (plain String is Java), *.vue
> > files, reference to NPM package
> >
> > Btw, recently we released JNPM (https://github.com/OrienteerBAP/JNPM)
> > - native java API for work with NPM. Idea is to use JNPM for more
> > fluent and runtime integration with NPM registry and NPM packages. For
> > example, to allow quickly link wicket component to the corresponding
> > implementation in NPM package, add data channels and event listeners.
> > Ideally with minimal "wrapping" JS code.
> > Ultimate goal is to make our product (Orienteer) even more rapid for
> > applications development due to reinforcement of front-end support.
> >
> > Thanks,
> > Ilya
> > -
> > Orienteer(http://orienteer.org) - open source Business Application Platform
> >
> > On Fri, May 8, 2020 at 6:18 AM Martin Grigorov  wrote:
> > >
> > > Hi Илья,
> > >
> > > 7 years ago I've made a (small) integration with Ractive.js:
> > > https://github.com/martin-g/wicket-ractive and blogged about it
> > > https://wicketinaction.com/2013/08/surgical-ajax-updates-with-ractive-js/
> > > IMO Vue.js has started as a fork from Ractive.js but Rich Harris says it
> > > just influenced it: 
> > > https://twitter.com/mtgrigorov/status/806531052743311360
> > >  :-)
> > > I like them both a lot!
> > > You can use wicket-ractive as an inspiration! It just uses Ractive.js for
> > > the Ajax updates (instead of Wicket's XML approach). I didn't go any
> > > deeper, like integrating on component level
> > >
> > > Have fun!
> > >
> > > On Thu, May 7, 2020 at 6:40 AM Илья Нарыжный  wrote:
> > >
> > > > Hello,
> > > >
> > > > I code on Wicket for around 10 years and on Vue JS for a few months
> > > > and found a lot of in common between these frameworks. There are 100
> > > > and 1 ways in Wicket how to integrate a front-end framework. But with
> > > > pre-created Wicket library - integration might be even deeper and lead
> > > > to a synergy effect.
> > > >
> > > > I've started to collect some ideas and "design notes" about the
> > > > library which allows integrating Wicket and Vue on another level. I
> > > > will really appreciate any feedback and more ideas and comments. Here
> > > > is this document:
> > > >
> > > > https://docs.google.com/document/d/1Lj4LqebeZFkYGsfyC2K7upUl8VpBeAE49Q-BLtvhpFM/edit?usp=sharing
> > > > Feel free to comment, edit or reply to this email.
> > > >
> > > >
> > > > P.S. If you use telegram: lets chat in the group around Wicket -
> > > > https://t.me/apache_wicket
> > > > P.P.S. Reminder: here is a curated list of "awesome things" around
> > > > Wicket: https://github.

Re: Wicket and Vue.js synergy

2020-08-11 Thread Илья Нарыжный
Hello,

Made big progress on marrying Wicket and Vue.
Currently, existing features are listed in README:
https://github.com/OrienteerBAP/vuecket/blob/master/README.md
Will really appreciate constructive feedback! (Even if it's something
like "I didn't understand the README":) )

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform


On Tue, Aug 4, 2020 at 12:59 AM Илья Нарыжный  wrote:
>
> Thank you, Martin!
>
> If somebody interested, work has begun in the following repository:
> https://github.com/OrienteerBAP/vuecket
> Features which I plan to add soon:
>
> 1) Support of Data Channel: channels for synchronization of data on
> Vue side and named Models on wicket side. 1 way sync, 2 way sync, one
> time, runtime, websocket.
> 2) Support of subscriptions to vue events.
> 3) Support of storing Vue code as Json (plain String is Java), *.vue
> files, reference to NPM package
>
> Btw, recently we released JNPM (https://github.com/OrienteerBAP/JNPM)
> - native java API for work with NPM. Idea is to use JNPM for more
> fluent and runtime integration with NPM registry and NPM packages. For
> example, to allow quickly link wicket component to the corresponding
> implementation in NPM package, add data channels and event listeners.
> Ideally with minimal "wrapping" JS code.
> Ultimate goal is to make our product (Orienteer) even more rapid for
> applications development due to reinforcement of front-end support.
>
> Thanks,
> Ilya
> -
> Orienteer(http://orienteer.org) - open source Business Application Platform
>
> On Fri, May 8, 2020 at 6:18 AM Martin Grigorov  wrote:
> >
> > Hi Илья,
> >
> > 7 years ago I've made a (small) integration with Ractive.js:
> > https://github.com/martin-g/wicket-ractive and blogged about it
> > https://wicketinaction.com/2013/08/surgical-ajax-updates-with-ractive-js/
> > IMO Vue.js has started as a fork from Ractive.js but Rich Harris says it
> > just influenced it: https://twitter.com/mtgrigorov/status/806531052743311360
> >  :-)
> > I like them both a lot!
> > You can use wicket-ractive as an inspiration! It just uses Ractive.js for
> > the Ajax updates (instead of Wicket's XML approach). I didn't go any
> > deeper, like integrating on component level
> >
> > Have fun!
> >
> > On Thu, May 7, 2020 at 6:40 AM Илья Нарыжный  wrote:
> >
> > > Hello,
> > >
> > > I code on Wicket for around 10 years and on Vue JS for a few months
> > > and found a lot of in common between these frameworks. There are 100
> > > and 1 ways in Wicket how to integrate a front-end framework. But with
> > > pre-created Wicket library - integration might be even deeper and lead
> > > to a synergy effect.
> > >
> > > I've started to collect some ideas and "design notes" about the
> > > library which allows integrating Wicket and Vue on another level. I
> > > will really appreciate any feedback and more ideas and comments. Here
> > > is this document:
> > >
> > > https://docs.google.com/document/d/1Lj4LqebeZFkYGsfyC2K7upUl8VpBeAE49Q-BLtvhpFM/edit?usp=sharing
> > > Feel free to comment, edit or reply to this email.
> > >
> > >
> > > P.S. If you use telegram: lets chat in the group around Wicket -
> > > https://t.me/apache_wicket
> > > P.P.S. Reminder: here is a curated list of "awesome things" around
> > > Wicket: https://github.com/PhantomYdn/awesome-wicket . If you have
> > > something to propose: please feel free to make a PR or an issue.
> > >
> > > Thanks,
> > > Ilya
> > > -
> > > Orienteer(http://orienteer.org) - open source Business Application
> > > Platform
> > >
> > > -
> > > 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 and Vue.js synergy

2020-08-04 Thread Илья Нарыжный
Thank you, Martin!

If somebody interested, work has begun in the following repository:
https://github.com/OrienteerBAP/vuecket
Features which I plan to add soon:

1) Support of Data Channel: channels for synchronization of data on
Vue side and named Models on wicket side. 1 way sync, 2 way sync, one
time, runtime, websocket.
2) Support of subscriptions to vue events.
3) Support of storing Vue code as Json (plain String is Java), *.vue
files, reference to NPM package

Btw, recently we released JNPM (https://github.com/OrienteerBAP/JNPM)
- native java API for work with NPM. Idea is to use JNPM for more
fluent and runtime integration with NPM registry and NPM packages. For
example, to allow quickly link wicket component to the corresponding
implementation in NPM package, add data channels and event listeners.
Ideally with minimal "wrapping" JS code.
Ultimate goal is to make our product (Orienteer) even more rapid for
applications development due to reinforcement of front-end support.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Fri, May 8, 2020 at 6:18 AM Martin Grigorov  wrote:
>
> Hi Илья,
>
> 7 years ago I've made a (small) integration with Ractive.js:
> https://github.com/martin-g/wicket-ractive and blogged about it
> https://wicketinaction.com/2013/08/surgical-ajax-updates-with-ractive-js/
> IMO Vue.js has started as a fork from Ractive.js but Rich Harris says it
> just influenced it: https://twitter.com/mtgrigorov/status/806531052743311360
>  :-)
> I like them both a lot!
> You can use wicket-ractive as an inspiration! It just uses Ractive.js for
> the Ajax updates (instead of Wicket's XML approach). I didn't go any
> deeper, like integrating on component level
>
> Have fun!
>
> On Thu, May 7, 2020 at 6:40 AM Илья Нарыжный  wrote:
>
> > Hello,
> >
> > I code on Wicket for around 10 years and on Vue JS for a few months
> > and found a lot of in common between these frameworks. There are 100
> > and 1 ways in Wicket how to integrate a front-end framework. But with
> > pre-created Wicket library - integration might be even deeper and lead
> > to a synergy effect.
> >
> > I've started to collect some ideas and "design notes" about the
> > library which allows integrating Wicket and Vue on another level. I
> > will really appreciate any feedback and more ideas and comments. Here
> > is this document:
> >
> > https://docs.google.com/document/d/1Lj4LqebeZFkYGsfyC2K7upUl8VpBeAE49Q-BLtvhpFM/edit?usp=sharing
> > Feel free to comment, edit or reply to this email.
> >
> >
> > P.S. If you use telegram: lets chat in the group around Wicket -
> > https://t.me/apache_wicket
> > P.P.S. Reminder: here is a curated list of "awesome things" around
> > Wicket: https://github.com/PhantomYdn/awesome-wicket . If you have
> > something to propose: please feel free to make a PR or an issue.
> >
> > Thanks,
> > Ilya
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
> > -
> > 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



JavaScript/CSS/etc resources from NPM

2020-07-08 Thread Илья Нарыжный
Hello, Wicket Users,

I will really appreciate your feedback on a new library which is
almost ready and about to be released.
https://github.com/OrienteerBAP/JNPM
It provides java native API to work with Node Package Manager.
Use Cases:
1) Explore NPM registry from Java native application
2) Pack NPM packages inside JAR. Yes - it's alternative for WebJars
and frontend-maven-plugin. Big advantage in respect to WebJars: you
can filter what exact resources you want to pick (for example only
content for dist/ folder from a package) and after packing you can
still use such things like
https://github.com/l0rdn1kk0n/wicket-webjars
3) Implementation of your own embedded CDN which can transparently
download NPM resources per request and serve the required file to a
client. There are 2 implementations: Wicket and Servlet based.

Let me also mention that this library was built keeping performance in
mind. It uses RxJava for packages traversal and retrieval.
If you are interested - please read README.

I will really appreciate for any thought: about functional part or
about library application somewhere or even promotion.

P.S. There are few things to do as technical debt... So code might be
not so nice and clean as it would be for first public version.

Thanks,

Ilia
-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Wicket and Vue.js synergy

2020-05-06 Thread Илья Нарыжный
Hello,

I code on Wicket for around 10 years and on Vue JS for a few months
and found a lot of in common between these frameworks. There are 100
and 1 ways in Wicket how to integrate a front-end framework. But with
pre-created Wicket library - integration might be even deeper and lead
to a synergy effect.

I've started to collect some ideas and "design notes" about the
library which allows integrating Wicket and Vue on another level. I
will really appreciate any feedback and more ideas and comments. Here
is this document:
https://docs.google.com/document/d/1Lj4LqebeZFkYGsfyC2K7upUl8VpBeAE49Q-BLtvhpFM/edit?usp=sharing
Feel free to comment, edit or reply to this email.


P.S. If you use telegram: lets chat in the group around Wicket -
https://t.me/apache_wicket
P.P.S. Reminder: here is a curated list of "awesome things" around
Wicket: https://github.com/PhantomYdn/awesome-wicket . If you have
something to propose: please feel free to make a PR or an issue.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Wicket and Chat Bots

2020-01-20 Thread Илья Нарыжный
Hello,

I'm looking for some feedback from Wicket experienced devs and,
potentially, some team-members who will love the idea I'm going to
describe.

We in Orienteer pretty frequently work with chat-bots for Facebook,
Telegram and etc.
One of our module was open-sourced: https://github.com/OrienteerBAP/OTelegramBot
Another one still closed, but available as an Orienteer module for
free to download: graph-based description of an algorithm for a
Facebook bot. (We are going to open sources soon).

So, even currently, we use Wicket core entities/lifecycles
(RequestCycle, WebSession, Application and etc) during actual bot
interactions with users through Facebook messenger or Telegram. And
now we are thinking about making one more step: use wicket rendering
mechanism for preparing bot's responses. Response is not only text
with markdown - it can include buttons, tables with paging and etc. So
idea is that Wicket will generate a layout of response in XML and the
corresponding adaptor will convert that layout to
Messanger/Telegram/WhatsUp/Viber etc. Using markup variations might
help to take into account specifics of a particular messaging
platform.

Please let me know what do you think about the idea.
If it's good enough and viable - it will be definitely Open Source.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Re: OOM: Direct buffer memory

2020-01-20 Thread Илья Нарыжный
Wicket users,

We are still investigating, but it's seems to be related to using of
docker image with openjdk over alpine.
If you have similar situation: try to repack under different base
docker image with java.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Fri, Jan 17, 2020 at 9:33 AM Илья Нарыжный  wrote:
>
> Yes. Pretty sure.
> But it might be something indirect: for example, during building of our next 
> docker image with the newer wicket, some openjdk/maven/libs newer dependency 
> was picked up as well.
> That's something which we are evaluating.
>
> Thanks,
> Ilya
> -
> Orienteer(http://orienteer.org) - open source Business Application Platform
>
> On Fri, Jan 17, 2020, 12:15 AM Sven Meier  wrote:
>>
>> Hi,
>>
>> I don't see anything related in the changes from 8.5 to 8.6.1
>>
>> https://github.com/apache/wicket/blob/wicket-8.x/CHANGELOG-8.x
>>
>> Are you sure these OOMs didn't happen before?
>>
>> Sven
>>
>>
>> On 16.01.20 22:52, Илья Нарыжный wrote:
>> > Sven,
>> >
>> > It was 8.5 - so not so far away.
>> >
>> > Thanks,
>> > Ilya
>> > -
>> > Orienteer(http://orienteer.org) - open source Business Application Platform
>> >
>> > On Thu, Jan 16, 2020 at 11:41 AM Sven Meier  wrote:
>> >> What was your previous version?
>> >>
>> >> Sven
>> >>
>> >> Am 16. Januar 2020 19:27:19 MEZ schrieb "Илья Нарыжный" :
>> >>> Hello,
>> >>>
>> >>> After upgrading to Wicket 8.6.1 we started seeing periodical OOMs in
>> >>> logs like below.
>> >>> I'm not 100% sure that it's due to Wicket, but we didn't change
>> >>> containers parameters and etc - so at least it's quite suspicious.
>> >>> Our startup flags:
>> >>> -XX:+PerfDisableSharedMem -Xmx4G -Xms4G -XX:MaxDirectMemorySize=4G
>> >>> -XX:+HeapDumpOnOutOfMemoryError
>> >>> -XX:HeapDumpPath=/app/runtime/heapdump.bin
>> >>>
>> >>> Btw, except these exceptions in logs - no other negative effects (at
>> >>> least we didn't reveal so far).
>> >>>
>> >>> If you have ideas - I will really appreciate.
>> >>>
>> >>> java.lang.OutOfMemoryError: Direct buffer memory
>> >>> at java.nio.Bits.reserveMemory(Bits.java:666)
>> >>> at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
>> >>> at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
>> >>> at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:241)
>> >>> at sun.nio.ch.IOUtil.write(IOUtil.java:58)
>> >>> at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:778)
>> >>> at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:764)
>> >>> at
>> >>> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:352)
>> >>> at
>> >>> org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:185)
>> >>> at
>> >>> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:217)
>> >>> at
>> >>> org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
>> >>> at
>> >>> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
>> >>>
>> >>> Thanks,
>> >>> Ilya
>> >>> -
>> >>> Orienteer(http://orienteer.org) - open source Business Application
>> >>> Platform
>> >>>
>> >>> -
>> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >>> For additional commands, e-mail: users-h...@wicket.apache.org
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>

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



Re: OOM: Direct buffer memory

2020-01-17 Thread Илья Нарыжный
Yes. Pretty sure.
But it might be something indirect: for example, during building of our
next docker image with the newer wicket, some openjdk/maven/libs newer
dependency was picked up as well.
That's something which we are evaluating.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application
Platform

On Fri, Jan 17, 2020, 12:15 AM Sven Meier  wrote:

> Hi,
>
> I don't see anything related in the changes from 8.5 to 8.6.1
>
> https://github.com/apache/wicket/blob/wicket-8.x/CHANGELOG-8.x
>
> Are you sure these OOMs didn't happen before?
>
> Sven
>
>
> On 16.01.20 22:52, Илья Нарыжный wrote:
> > Sven,
> >
> > It was 8.5 - so not so far away.
> >
> > Thanks,
> > Ilya
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> Platform
> >
> > On Thu, Jan 16, 2020 at 11:41 AM Sven Meier  wrote:
> >> What was your previous version?
> >>
> >> Sven
> >>
> >> Am 16. Januar 2020 19:27:19 MEZ schrieb "Илья Нарыжный"  >:
> >>> Hello,
> >>>
> >>> After upgrading to Wicket 8.6.1 we started seeing periodical OOMs in
> >>> logs like below.
> >>> I'm not 100% sure that it's due to Wicket, but we didn't change
> >>> containers parameters and etc - so at least it's quite suspicious.
> >>> Our startup flags:
> >>> -XX:+PerfDisableSharedMem -Xmx4G -Xms4G -XX:MaxDirectMemorySize=4G
> >>> -XX:+HeapDumpOnOutOfMemoryError
> >>> -XX:HeapDumpPath=/app/runtime/heapdump.bin
> >>>
> >>> Btw, except these exceptions in logs - no other negative effects (at
> >>> least we didn't reveal so far).
> >>>
> >>> If you have ideas - I will really appreciate.
> >>>
> >>> java.lang.OutOfMemoryError: Direct buffer memory
> >>> at java.nio.Bits.reserveMemory(Bits.java:666)
> >>> at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
> >>> at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
> >>> at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:241)
> >>> at sun.nio.ch.IOUtil.write(IOUtil.java:58)
> >>> at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:778)
> >>> at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:764)
> >>> at
> >>>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:352)
> >>> at
> >>>
> org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:185)
> >>> at
> >>>
> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:217)
> >>> at
> >>>
> org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
> >>> at
> >>>
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
> >>>
> >>> Thanks,
> >>> Ilya
> >>> -
> >>> Orienteer(http://orienteer.org) - open source Business Application
> >>> Platform
> >>>
> >>> -
> >>> 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: An open source devops platform completely created with Wicket

2020-01-16 Thread Илья Нарыжный
Robin,

Thank you for sharing!:)
We also working on a platform completely based on Wicket:
https://github.com/OrienteerBAP/Orienteer
And I can also just join to your words: wicket is an undervalued web
framework. Great work, Wickets-contributors!

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Thu, Jan 16, 2020 at 4:26 PM Robin Shen  wrote:
>
> Dear wicket users,
>
> I'd like to introduce OneDev, an open source all-in-one devops platform:
> https://github.com/theonedev/onedev
>
> It is created completely with Wicket with only one person. I know that there 
> are modern and fashion techniques such as React/Vue, but I still feel that 
> Wicket is the most suitable framework for this product, considering that I 
> can work with the same set of code from front-end to back-end, with Java's 
> mature libraries and toolings. I must say I gain great productivity with 
> Wicket.
>
> Hope this product is useful to someone.
>
> Robin

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



Re: OOM: Direct buffer memory

2020-01-16 Thread Илья Нарыжный
Sven,

It was 8.5 - so not so far away.

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Thu, Jan 16, 2020 at 11:41 AM Sven Meier  wrote:
>
> What was your previous version?
>
> Sven
>
> Am 16. Januar 2020 19:27:19 MEZ schrieb "Илья Нарыжный" :
> >Hello,
> >
> >After upgrading to Wicket 8.6.1 we started seeing periodical OOMs in
> >logs like below.
> >I'm not 100% sure that it's due to Wicket, but we didn't change
> >containers parameters and etc - so at least it's quite suspicious.
> >Our startup flags:
> >-XX:+PerfDisableSharedMem -Xmx4G -Xms4G -XX:MaxDirectMemorySize=4G
> >-XX:+HeapDumpOnOutOfMemoryError
> >-XX:HeapDumpPath=/app/runtime/heapdump.bin
> >
> >Btw, except these exceptions in logs - no other negative effects (at
> >least we didn't reveal so far).
> >
> >If you have ideas - I will really appreciate.
> >
> >java.lang.OutOfMemoryError: Direct buffer memory
> > at java.nio.Bits.reserveMemory(Bits.java:666)
> > at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
> > at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
> > at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:241)
> > at sun.nio.ch.IOUtil.write(IOUtil.java:58)
> > at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:778)
> > at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:764)
> >at
> >org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:352)
> >at
> >org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:185)
> >at
> >org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:217)
> >at
> >org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
> >at
> >org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
> >
> >Thanks,
> >Ilya
> >-
> >Orienteer(http://orienteer.org) - open source Business Application
> >Platform
> >
> >-
> >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



OOM: Direct buffer memory

2020-01-16 Thread Илья Нарыжный
Hello,

After upgrading to Wicket 8.6.1 we started seeing periodical OOMs in
logs like below.
I'm not 100% sure that it's due to Wicket, but we didn't change
containers parameters and etc - so at least it's quite suspicious.
Our startup flags:
-XX:+PerfDisableSharedMem -Xmx4G -Xms4G -XX:MaxDirectMemorySize=4G
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/app/runtime/heapdump.bin

Btw, except these exceptions in logs - no other negative effects (at
least we didn't reveal so far).

If you have ideas - I will really appreciate.

java.lang.OutOfMemoryError: Direct buffer memory
 at java.nio.Bits.reserveMemory(Bits.java:666)
 at java.nio.DirectByteBuffer.(DirectByteBuffer.java:123)
 at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
 at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:241)
 at sun.nio.ch.IOUtil.write(IOUtil.java:58)
 at sun.nio.ch.FileChannelImpl.writeInternal(FileChannelImpl.java:778)
 at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:764)
 at 
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:352)
 at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:185)
 at 
org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:217)
 at 
org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
 at 
org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Converters for Date/Time

2020-01-12 Thread Илья Нарыжный
Hello,

I have some fundamental question about Wicket:)
For users it's convenient when date-time has shown in their timezone.
So most of wicket devs, do that somehow like we did it here:
https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/property/date/ODateLabel.java
But question is: does it make sense to put conversion per time-zone
into DateConverter or that might broke something wicket
best-practices?

Thanks,
Ilya
-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Retrieve user's page on the site

2019-12-29 Thread Илья Нарыжный
Hello,

We have pretty widely used software with thousands of visits per day.
And from time to time we observe pretty weird  Wicket related errors
in logs. Commonly it's something about components structure: no such
child, there is already such element and etc. But the problem is that
commonly we can't reproduce the problem right away: page is working as
expected. So such mysterious problems just lie in logs and not being
fixed.
And here is the question: is there some good way to retrieve and log
previous user actions and etc.? Theoretically everything should be in
PageStore. What can you recommend to handle such problems properly?

P.S. To be able to catch such problems we even build a system for
gathering all logs on a central server and correlate them with each
other according to some correlation logic. But still - no big luck -
so we really believe that problem is in fact that we know only current
user page/location and do not know historical aspect.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Google and DevUtils Inspector Page can kill your WebApp

2019-09-11 Thread Илья Нарыжный
Hello,

This is real-life story. It started a relatively long time ago: our
demo server from time to time had OurOfMemory condition. It was
strange because the solution itself is very well "stress volume
tested". So we were just rebooting demo server after such incidents.
But it started to happen more frequently and we performed an
investigation with interesting results which can be used as Best
Practice and/or one more issue for Wicket.

1) We have found that most memory-consuming objects where java
Threads. Specifically for InspectorPage from Wicket devutils.
2) Our applications pages don't have memory leakage condition. But
there is one trick: some of our pages are built dynamically and
depends on a data model. Sometimes data model might be recurrent, so
without special treatment - Wicket will render that forever. We have
this protection on our pages, but that was a main root-cause
component: InspectorPage during inspecting of our pages for some
reason doesn't see that actually recurrent elements are cut during
rendering.
3) But how someone gets into InspectorPage? Apparently that was Google
- it was trying to index our demo site and there is no protection from
following to InspectorPage in DevUtils panel.

So, some lessons learned items and comments:
1) If it's possible - do not deploy DevUtils - use them during actual
development.
2) It will be good to investigate InspectorPage - why it's trying to
build structure infinitely disregard of the fact that on real page
it's actually cut off.
3) It might make sense to include such utils and etc into /robots.txt
to protect from indexing
4) Also, it might make sense to add "nofollow" to a link in DevUtils
panel which leads to InspectorPage

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

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



Re: DataTable and SelectAll checkbox

2019-07-17 Thread Илья Нарыжный
Hello,

Or you can check implementation of IColumn with "Select All" here:
https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/table/CheckBoxColumn.java#L49-L64

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Wed, Jul 17, 2019 at 11:36 AM Sven Meier  wrote:

> Hi,
>
> have to taken a look at:
>
>
> https://github.com/apache/wicket/blob/wicket-8.x/wicket-examples/src/main/java/org/apache/wicket/examples/compref/CheckGroupPage.java
>
> That's the trick.
>
> Have fun
> Sven
>
>
> On 17.07.19 20:15, Zbynek Vavros wrote:
> > Hi,
> >
> > I know this is quite old but since I do migration to Wicket8 now I think
> if
> > there is any "nice" way to do this.
> >
> > The thing is we have this "mighty" checkbox in the header of a checkbox
> > column.
> > For now we use jQuery but for sure there has to be better way.
> >
> >  From what I have found the best way seems to use HeaderlessColumn and
> put
> > this mighty checkbox into a panel that goes into getHeader(final String
> > componentId).
> > And of course checkbox for each row into  populateItem(Item cellItem,
> > String componentId, IModel rowModel).
> >
> > The thing is, using CheckBoxGroup and CheckBoxGroupSelector these two are
> > quite separated so not even wrapping whole DataTable in CheckBoxGroup
> > doesn't really seem to do the trick.
> >
> > Anyone figured out a better way or is jquery the thing for this?
> >
> > Zbynek
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RequestHandlerExecutor.ReplaceHandlerException and default handling by web container

2018-12-07 Thread Илья Нарыжный
Hello,

According to source code, it seems not possible to replace current handler
by 'null' - assuming that wicket in this case will allow web-server to
handle request further.

That's a code of wicket filter:
if (requestCycle.processRequestAndDetach())
{
webResponse.flush();
}
else
{
...
}

and here no way to fallback to default handling if at least one handler was
initially found:

public boolean processRequest()
{
try
{
set(this);
listeners.onBeginRequest(this);
onBeginRequest();
IRequestHandler handler = resolveRequestHandler();
if (handler == null)
{
// Did not find any suitable handler, thus not executing the request
log.debug(
"No suitable handler found for URL {}, falling back to container to process
this request",
request.getUrl());
}
else
{
execute(handler);
return true;
}
}

Please consider ability to fallback to default web-app handling of after
set of attempts to find proper handler system can't find out proper handler.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: Wicket and Jersey Integration

2018-12-04 Thread Илья Нарыжный
OK. Last my question was solved through
RequestCycle.replaceAllRequestHandlers(handler);

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Mon, Dec 3, 2018 at 11:27 PM Илья Нарыжный  wrote:

> Martin,
>
> Thank you - we were considering this library previously, but it's not
> JAX-RS compatible and don't have cool features for security/marshaling/etc.
> And that's why we used Jersey.
> But this time needed integration is so deep, so we can't keep 2 these
> components separately.
>
> Ernesto,
>
> Yes - I think that mounting and embedding should help here a lot.
>
> Btw, here is first working version:
> https://github.com/OrienteerBAP/wicket-jersey. So it's possible to mount
> JAX-RS applications and use them from Wicket. You can check tests and mock
> jax-rs resources.
>
> Have related question:
> IRequestMapper has getCompatibilityScore() to find proper mapper for a
> request. But is there some good way to go ahead with next IRequestMapper if
> first one after scoring do return 404?
>
> Thanks,
> Ilia
>
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>
> On Sun, Dec 2, 2018 at 11:45 PM Martin Grigorov 
> wrote:
>
>> You can also take a look at
>>
>> https://github.com/wicketstuff/core/tree/master/wicketstuff-restannotations-parent
>> It provides an implementation of JAX-RS based on Wicket IResource
>>
>> On Mon, Dec 3, 2018 at 9:29 AM Ernesto Reinaldo Barreiro <
>> reier...@gmail.com>
>> wrote:
>>
>> > Ilia,
>> >
>> > Ok. Them "mounting" JERSEY as a wicket "resource" might be a solution?
>> >
>> > On Mon, Dec 3, 2018 at 7:22 AM Илья Нарыжный  wrote:
>> >
>> > > Ernesto,
>> > >
>> > > WicketSessionFilter is cool workaround for most of cases, but in our
>> case
>> > > we need deeper integration. For example to have the same security
>> model
>> > for
>> > > wicket pages and rests.
>> > > Apparently, Jersey is not complex to integrate with. I already have
>> more
>> > or
>> > > less working implementation of working Jersey under Wicket.
>> > >
>> > > Thanks,
>> > > Ilia
>> > >
>> > > -
>> > > Orienteer(http://orienteer.org) - open source Business Application
>> > > Platform
>> > >
>> > > On Sun, Dec 2, 2018 at 10:16 PM Ernesto Reinaldo Barreiro <
>> > > reier...@gmail.com> wrote:
>> > >
>> > > > Hi Ilia,
>> > > >
>> > > > If WicketSessionFilter not enough for your needs? It is a filter you
>> > can
>> > > > put in front of JERSEY and you will have some wicket related things.
>> > > >
>> > > > On Sun, Dec 2, 2018 at 6:50 PM Илья Нарыжный 
>> wrote:
>> > > >
>> > > > > Hello,
>> > > > >
>> > > > > I know that story of wicket and different jax-rs containers is
>> pretty
>> > > > long.
>> > > > > Currently we are using Jersey as a servlet under wicket filter,
>> but
>> > we
>> > > > > don't like that in this case REST end-points have nothing about
>> > Wicket:
>> > > > no
>> > > > > wicket session available, no wicket request cycle listeners
>> executed
>> > > and
>> > > > > etc.
>> > > > > There is an idea to implement IRequestHandler which will handle as
>> > > Jersey
>> > > > > Container. So it will be executed under wicket umbrella.
>> > > > >
>> > > > > Questions:
>> > > > > 1) What do you think about this?
>> > > > > 2) Is there some existing implementation of what I'm talking
>> about?
>> > > > >
>> > > > > Please reply also even in a case if you interested in this
>> library.
>> > It
>> > > > will
>> > > > > help me to understand: does it worst to make this integration as a
>> > > > separate
>> > > > > library or we can embed into our code within Orienteer.
>> > > > >
>> > > > > Thanks,
>> > > > > Ilia
>> > > > >
>> > > > > -
>> > > > > Orienteer(http://orienteer.org) - open source Business
>> Application
>> > > > > Platform
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > Regards - Ernesto Reinaldo Barreiro
>> > > >
>> > >
>> >
>> >
>> > --
>> > Regards - Ernesto Reinaldo Barreiro
>> >
>>
>


Re: Wicket and Jersey Integration

2018-12-03 Thread Илья Нарыжный
Martin,

Thank you - we were considering this library previously, but it's not
JAX-RS compatible and don't have cool features for security/marshaling/etc.
And that's why we used Jersey.
But this time needed integration is so deep, so we can't keep 2 these
components separately.

Ernesto,

Yes - I think that mounting and embedding should help here a lot.

Btw, here is first working version:
https://github.com/OrienteerBAP/wicket-jersey. So it's possible to mount
JAX-RS applications and use them from Wicket. You can check tests and mock
jax-rs resources.

Have related question:
IRequestMapper has getCompatibilityScore() to find proper mapper for a
request. But is there some good way to go ahead with next IRequestMapper if
first one after scoring do return 404?

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Sun, Dec 2, 2018 at 11:45 PM Martin Grigorov 
wrote:

> You can also take a look at
>
> https://github.com/wicketstuff/core/tree/master/wicketstuff-restannotations-parent
> It provides an implementation of JAX-RS based on Wicket IResource
>
> On Mon, Dec 3, 2018 at 9:29 AM Ernesto Reinaldo Barreiro <
> reier...@gmail.com>
> wrote:
>
> > Ilia,
> >
> > Ok. Them "mounting" JERSEY as a wicket "resource" might be a solution?
> >
> > On Mon, Dec 3, 2018 at 7:22 AM Илья Нарыжный  wrote:
> >
> > > Ernesto,
> > >
> > > WicketSessionFilter is cool workaround for most of cases, but in our
> case
> > > we need deeper integration. For example to have the same security model
> > for
> > > wicket pages and rests.
> > > Apparently, Jersey is not complex to integrate with. I already have
> more
> > or
> > > less working implementation of working Jersey under Wicket.
> > >
> > > Thanks,
> > > Ilia
> > >
> > > -
> > > Orienteer(http://orienteer.org) - open source Business Application
> > > Platform
> > >
> > > On Sun, Dec 2, 2018 at 10:16 PM Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > > > Hi Ilia,
> > > >
> > > > If WicketSessionFilter not enough for your needs? It is a filter you
> > can
> > > > put in front of JERSEY and you will have some wicket related things.
> > > >
> > > > On Sun, Dec 2, 2018 at 6:50 PM Илья Нарыжный  wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I know that story of wicket and different jax-rs containers is
> pretty
> > > > long.
> > > > > Currently we are using Jersey as a servlet under wicket filter, but
> > we
> > > > > don't like that in this case REST end-points have nothing about
> > Wicket:
> > > > no
> > > > > wicket session available, no wicket request cycle listeners
> executed
> > > and
> > > > > etc.
> > > > > There is an idea to implement IRequestHandler which will handle as
> > > Jersey
> > > > > Container. So it will be executed under wicket umbrella.
> > > > >
> > > > > Questions:
> > > > > 1) What do you think about this?
> > > > > 2) Is there some existing implementation of what I'm talking about?
> > > > >
> > > > > Please reply also even in a case if you interested in this library.
> > It
> > > > will
> > > > > help me to understand: does it worst to make this integration as a
> > > > separate
> > > > > library or we can embed into our code within Orienteer.
> > > > >
> > > > > Thanks,
> > > > > Ilia
> > > > >
> > > > > -
> > > > > Orienteer(http://orienteer.org) - open source Business Application
> > > > > Platform
> > > > >
> > > >
> > > >
> > > > --
> > > > Regards - Ernesto Reinaldo Barreiro
> > > >
> > >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>


Re: Wicket and Jersey Integration

2018-12-02 Thread Илья Нарыжный
Ernesto,

WicketSessionFilter is cool workaround for most of cases, but in our case
we need deeper integration. For example to have the same security model for
wicket pages and rests.
Apparently, Jersey is not complex to integrate with. I already have more or
less working implementation of working Jersey under Wicket.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Sun, Dec 2, 2018 at 10:16 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi Ilia,
>
> If WicketSessionFilter not enough for your needs? It is a filter you can
> put in front of JERSEY and you will have some wicket related things.
>
> On Sun, Dec 2, 2018 at 6:50 PM Илья Нарыжный  wrote:
>
> > Hello,
> >
> > I know that story of wicket and different jax-rs containers is pretty
> long.
> > Currently we are using Jersey as a servlet under wicket filter, but we
> > don't like that in this case REST end-points have nothing about Wicket:
> no
> > wicket session available, no wicket request cycle listeners executed and
> > etc.
> > There is an idea to implement IRequestHandler which will handle as Jersey
> > Container. So it will be executed under wicket umbrella.
> >
> > Questions:
> > 1) What do you think about this?
> > 2) Is there some existing implementation of what I'm talking about?
> >
> > Please reply also even in a case if you interested in this library. It
> will
> > help me to understand: does it worst to make this integration as a
> separate
> > library or we can embed into our code within Orienteer.
> >
> > Thanks,
> > Ilia
> >
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Wicket and Jersey Integration

2018-12-02 Thread Илья Нарыжный
Hello,

I know that story of wicket and different jax-rs containers is pretty long.
Currently we are using Jersey as a servlet under wicket filter, but we
don't like that in this case REST end-points have nothing about Wicket: no
wicket session available, no wicket request cycle listeners executed and
etc.
There is an idea to implement IRequestHandler which will handle as Jersey
Container. So it will be executed under wicket umbrella.

Questions:
1) What do you think about this?
2) Is there some existing implementation of what I'm talking about?

Please reply also even in a case if you interested in this library. It will
help me to understand: does it worst to make this integration as a separate
library or we can embed into our code within Orienteer.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: LambdaModel use

2018-11-10 Thread Илья Нарыжный
Thank you, Bas!
Fully agree with you that if setters is to set something on a main target
object. In my particular case, I tried to use LambdaModel for "conversion"
between one type and another. So targetModel contain original object and
LambdaModel just wrap and convert correspondingly. Also I tried to use
exactly that method, because if targetModel is provided to LambdaModel - it
manages lifecycle and invoke onDetach when it's applicable. Use of `public
static  IModel of(SerializableSupplier getter,
SerializableConsumer setter)` is not so convenient in this case, because
target model is out of required lifecycle.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Thu, Nov 8, 2018 at 11:41 PM Bas Gooren  wrote:

> Hi,
>
> The LambdaModel method you are referring to is dependant on another model:
>
> public static  IModel of(IModel target,
> SerializableFunction getter, SerializableBiConsumer setter)
>
> Since the setter depends on the target model, the target model object
> needs to be non-null for the setter to be able to do anything (you can’t
> set a property on a null object reference).
>
> If I look at the current master branch [1], I see that the functionality
> you probably are looking for is present:
>
> public static  IModel of(SerializableSupplier getter,
> SerializableConsumer setter)
>
> … which is simply a model which delegates getting and setting the value to
> the specified supplier and consumer, without having a target model.
>
> 1)
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/model/LambdaModel.java
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 9 november 2018 bij 08:30:39, Илья Нарыжный (phan...@ydn.ru) schreef:
>
> Hello,
>
> How it was expected to use LambdaModel with setters?
> Right now it seems to be not quite usable, because, of the following code
> inside:
>
> @Override
> public void setObject(R r)
> {
> X x = target.getObject();
> if (x != null)
> {
> setter.accept(x, r);
> }
> }
>
> As you can see, if previous value of target model is null, there is no way
> to change it. Why?
> And also it will be interesting to know why SerializableBiConsumer was
> used
> for a setter?
>
> Thanks,
> Ilia
>
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>
>


LambdaModel use

2018-11-08 Thread Илья Нарыжный
Hello,

How it was expected to use LambdaModel with setters?
Right now it seems to be not quite usable, because, of the following code
inside:

@Override
public void setObject(R r)
{
   X x = target.getObject();
   if (x != null)
   {
  setter.accept(x, r);
   }
}

As you can see, if previous value of target model is null, there is no way
to change it. Why?
And also it will be interesting to know why SerializableBiConsumer was used
for a setter?

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Problems with update of wicket from 8.0.0 to 8.1.0

2018-11-01 Thread Илья Нарыжный
Hello, wicket users,

After updating just of wicket version in our projects from 8.0.0 to 8.1.0
we started to see the following exception during rendering time.
Nothing was changed except wicket version. Do you have any suggestions what
hidden dependencies and etc. might lead to this issue?

java.lang.NoClassDefFoundError: Could not initialize class
net.sf.cglib.proxy.Enhancer
at
org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:183)
at
org.apache.wicket.guice.GuiceFieldValueFactory.getFieldValue(GuiceFieldValueFactory.java:88)
at org.apache.wicket.injection.Injector.inject(Injector.java:111)
at
org.apache.wicket.guice.GuiceComponentInjector.inject(GuiceComponentInjector.java:122)
at
org.apache.wicket.guice.GuiceComponentInjector.onInstantiation(GuiceComponentInjector.java:128)
at
org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38)
at
org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)
at
org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
at
org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33)

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


External HTML and/or export to external page

2018-08-17 Thread Илья Нарыжный
Hello users of great framework Wicket!

Originally HTML files in Wicket were a good way to outsource creation of
design to designers and then use it by devs. So designers can work more or
less in parallel with developers.

But technology is going ahead and now more or less advanced projects in
wicket CANNOT make design work in parallel with development. More over:
content now is not only text - it's images, styling and etc. And business
very often want to have quick and easy access to the content modification.

That's why there is need to have more deeper convergence between wicket and
other systems/framework. I see 2 proposals, but might be community know
more. Please share what do you think and what's your experience.

1) It will be cool to allow use of external sources of HTML. For example:
you have a WordPress in backend, business, designers can do whatever they
want with content. But Wicket transparently takes requested content,
extends it by required components and provides to a users.
2) JS library which allow to embed content generated by wicket to any page.
Yes - it's possible to use IFRAME in same cases, but JS lib will be much
more efficient. Might be something from Wicket AJAX can be reused to allow
update of external pages asynchronously.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Wicket and Rapidoid

2018-07-24 Thread Илья Нарыжный
Hello,

Did you try to mate Wicket and Rapidoid(https://www.rapidoid.org/)?
Do you see any value from performance perspective?

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Curated list of Wicket Libraries and Solutions

2018-07-02 Thread Илья Нарыжный
Dear, Wicket users,

Exactly as you are, I love Wicket! It's great framework and even modern JS
frameworks as AngularJS, React and so on - pretty behind Wicket from
architecture perspective.

Most of us has his/her own set of wicket libs, own wicket-ecosystem.
Lets share our experience, lets share what we are using with each other!

I started this curated list of Wicket Libs 2 years ago: https://github.com/
PhantomYdn/awesome-wicket
Please, if you don't find your beloved library: email me or create a PR.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: Please friends

2018-01-29 Thread Илья Нарыжный
Hi!

If you need CRUD with bootstrap and inventory I recommend you to take a
look to http://orienteer.org.
Some quick presentation about functionality can be found there:
https://gitpitch.com/OrienteerBAP/Orienteer/gitpitch
Orienteer is based on Apache Wicket: if needed you can deploy your own
components/pages, but it also provide backend for data management, BPM,
integrations, tasks and other stuff.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Wed, Jan 17, 2018 at 3:54 PM, acarlos1  wrote:

>
> Please colleagues from the Forum will there be an Apache Wicket online
> course teaching you how to develop a crud with bootstrap and an inventory
> system with Apache Wicket?
>
> --
> 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: Wicket 8 GA for production

2017-10-10 Thread Илья Нарыжный
Andrea,

We would be happy to help with:
1) Translation of any articles/slides to russian and posting that on famous
russian IT resources. If you have any articles even right now which worst
to be translated: please send them to me.
2) A long with articles about Orienteer we can after switch to Wicket 8
write some "lesson learned" about Wicket
3) Performance: OMG, wickets performance is unbelievable. One company tried
to test performance of our application (which powered by Wicket): finally
they encountered into application server connection pool size, but response
time was almost the same (around 15% less). Test was on 350 concurrent
users with requests every second. That was amazing:)  30-70ms per page. So,
I deviated: we have in mind to write article just about wicket performance.

More ideas:
1) T-Shirts. Just make design and allow people to order from printing
company. Key point here: quality of the T-shirt.
2) Hackathons. If it will be nearby: will be happy to participate and help
with sponsors.
3) More "Try-Me" demo sites. In era of Docker you can build even gallery of
different open source apps which use wicket and make it available on-demand.
4) More articles with comparison: Wicket vs Vaadin, Backend or
Frontend/Wicket vs Angular JS, vs JSF, Tapestry, Spring, etc.

Guys, wicket has one extremely cool feature, which nobody else have: for
80% of needed technical features you can use either Wicket OOB or some
library from the ecosystem, but (!!!) if you need something from the
remaining 20% - wicket allow to do that for you! You can go as deep as you
want/need: need to rearrange dynamically HTML elements? - no problem! Need
to replace your textarea by some cool IDE on JavaScript? - easy! Need to
receive client side errors and log them on server side? -  Just a little
bit more of code:)

One more observation: modern front-end libs are repeating some parts of
wicket architecture/concept. You can find it in Angular, Vue, React and
etc. But all frontend libs has big disadvantage which can not be fixed:
security. It's impossible to enforce security just be frontend lib, you
have to go to backend for that.

Thanks,
Ilia

On Tue, Oct 10, 2017 at 2:56 AM, Andrea Del Bene <an.delb...@gmail.com>
wrote:

> > And guys, you are doing incredible web-framework! Thank you for that. I'm
> > quite surprised  that Wicket is not widely used:) Do you have some
> > marketing difficulties?
> > I personally expect that Wicket 8 release will be followed by some
> > marketing events, articles and etc. Will be glad to participate in
> > spreading this web-framework across the World.
>
> Unfortunately we have no marketing department :-). At the moment there's no
> "Wicket company" that can do some kind of advertising. What I will
> certainly do for Wicket 8 is publishing an article at dzone.com. I try to
> write as many Wicket-related articles as possible on this site.
> If you have any suggestion or advice they are warmly welcome!
>
>
> On Tue, Oct 10, 2017 at 11:27 AM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > Hi,
> >
> > On Mon, Oct 9, 2017 at 9:40 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
> >
> > > Martin, Andrea, Maxim,
> > >
> > > Thank you all for your answers!
> > >
> > > GA version will be a gift for us for sure:) Yes - we can use Java 8
> > source
> > > level with Wicket 7, but we have some internal dependency for resolving
> > of
> > > which we need to invest some good amount of time.
> > > Andrea, regarding my second question. It was about compatibility by
> > > features between wicket 7 and wicket 8. Are there something missing in
> > > Wicket  which is present in Wicket 7?
> > > Maxim, you wrote about using of Wicket 8 on production. Is that some
> open
> > > source? Can you send a link? You can make it privately:)
> > >
> > > And guys, you are doing incredible web-framework! Thank you for that.
> I'm
> > > quite surprised  that Wicket is not widely used:) Do you have some
> > > marketing difficulties?
> > >
> >
> > There was more marketing in the early years of Wicket.
> > Lately web developers prefer to use REST server with JS frontend. Some
> devs
> > love Wicket so much so they use WicketStuff-Rest-Annotations project [1]
> > for the backend :-)
> > But actually Wicket is used by many companies! Maybe 80% of the tweets by
> > https://twitter.com/apache_wicket are "Company XYZ use Apache Wicket for
> > ..."
> >
> >
> > > I personally expect that Wicket 8 release will be followed by some
> > > marketing events, articles and etc. Will be glad to participate in
> > > spreading this web-

Re: Code Generator with Wicket...

2017-10-09 Thread Илья Нарыжный
Jack,

We did the following approach: https://github.com/OrienteerBAP/Orienteer
/tree/master/orienteer-core/src/main/java/org/orienteer/core/component/meta
Shortly: there is a metapanel, which can "substitute" corresponding panel
according to display mode (view or edit), property type (boolean, string,
number, etc.) and visualizer (for example for string it might be just a
textarea or code-highlighter or markup and etc.
With wicket it's working extremely fast: around 70ms for average page on
average hardware.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


On Mon, Oct 9, 2017 at 7:43 AM, badgers  wrote:

> Hi Vit,
>
> would be nice and I'm intertested.
>
> Maybe I can participate ;-)
>
> best regards
> badgers
>
>
> --
> 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: Wicket 8 GA for production

2017-10-09 Thread Илья Нарыжный
Martin, Andrea, Maxim,

Thank you all for your answers!

GA version will be a gift for us for sure:) Yes - we can use Java 8 source
level with Wicket 7, but we have some internal dependency for resolving of
which we need to invest some good amount of time.
Andrea, regarding my second question. It was about compatibility by
features between wicket 7 and wicket 8. Are there something missing in
Wicket  which is present in Wicket 7?
Maxim, you wrote about using of Wicket 8 on production. Is that some open
source? Can you send a link? You can make it privately:)

And guys, you are doing incredible web-framework! Thank you for that. I'm
quite surprised  that Wicket is not widely used:) Do you have some
marketing difficulties?
I personally expect that Wicket 8 release will be followed by some
marketing events, articles and etc. Will be glad to participate in
spreading this web-framework across the World.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Mon, Oct 9, 2017 at 4:10 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> On Sun, Oct 8, 2017 at 7:28 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
> > Dear Wicket developers,
> >
> > Could you please help with understanding of Wicket 8 status?
> > 1) When do you expect GA version be released? (I mean first official
> > release which is not a candidate and etc.)
> > 2) How accurately Wicket 8 branch currently mimics features from version
> 7?
> > 3) What the level maturity of wicket 8 M7 to try to use it even on
> > production? Do you recommend? Or it's better to wait?
> >
> > A little bit more context: we are starting to use RxJava 2 in our
> > application platform http://orienteer.org. And it's much more convenient
> > to
> > use it on Java 8, so we are considering to move the whole our platform to
> > Java 8, but the main our dependency is Wicket:)
> >
>
> You can use Wicket 7 with Java 8. I guess you already know this.
>
> I'd be interested to hear how it goes with the asynchronous rendering
> (RxJava2 + Wicket)!
>
>
> >
> > Thanks,
> > Ilia
> >
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
>


Wicket 8 GA for production

2017-10-08 Thread Илья Нарыжный
Dear Wicket developers,

Could you please help with understanding of Wicket 8 status?
1) When do you expect GA version be released? (I mean first official
release which is not a candidate and etc.)
2) How accurately Wicket 8 branch currently mimics features from version 7?
3) What the level maturity of wicket 8 M7 to try to use it even on
production? Do you recommend? Or it's better to wait?

A little bit more context: we are starting to use RxJava 2 in our
application platform http://orienteer.org. And it's much more convenient to
use it on Java 8, so we are considering to move the whole our platform to
Java 8, but the main our dependency is Wicket:)

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: Double slash break everything

2017-09-22 Thread Илья Нарыжный
Hello,

Ticket https://issues.apache.org/jira/browse/WICKET-6473 was created.

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Tue, Sep 19, 2017 at 3:36 PM, Илья Нарыжный <phan...@ydn.ru> wrote:

> Martin,
>
> Yes - that's exactly the case. Should I create JIRA ticket for this?
>
> Thanks,
> Ilia
>
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>
> On Mon, Sep 18, 2017 at 11:37 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
>> I think this is a bug in Wicket.
>> I haven't tried the quickstart app but if the 404 page cannot render its
>> static resources then it smells like a bug,
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Tue, Sep 19, 2017 at 8:24 AM, Maxim Solodovnik <solomax...@gmail.com>
>> wrote:
>>
>> > Here is the example of handling multiple slashes:
>> > https://stackoverflow.com/questions/11214542/is-there-a-
>> > way-to-handle-extra-slashes-at-beginning-of-url-using-jersey-and-guic
>> >
>> > On Tue, Sep 19, 2017 at 11:47 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>> > > Actually, it can be easily reproduced on wicket quick-start.
>> > > Please check this one:
>> > > https://github.com/PhantomYdn/wicket-bugs/tree/master/doubleslash
>> > >
>> > > Thanks,
>> > > Ilia
>> > >
>> > > -
>> > > Orienteer(http://orienteer.org) - open source Business Application
>> > Platform
>> > >
>> > > On Mon, Sep 18, 2017 at 6:04 PM, Maxim Solodovnik <
>> solomax...@gmail.com>
>> > > wrote:
>> > >
>> > >> I would say it is not wicket issue, but the behavior of your
>> application
>> > >> server
>> > >>
>> > >> WBR, Maxim
>> > >> (from mobile, sorry for the typos)
>> > >>
>> > >> On Sep 19, 2017 07:53, "Илья Нарыжный" <phan...@ydn.ru> wrote:
>> > >>
>> > >> > Hello,
>> > >> >
>> > >> > Any ideas? Is this known Wicket bug?
>> > >> >
>> > >> > Thanks,
>> > >> > Ilia
>> > >> >
>> > >> > -
>> > >> > Orienteer(http://orienteer.org) - open source Business Application
>> > >> > Platform
>> > >> >
>> > >> > On Sat, Sep 9, 2017 at 10:37 PM, Илья Нарыжный <phan...@ydn.ru>
>> > wrote:
>> > >> >
>> > >> > > Hello,
>> > >> > >
>> > >> > > We have in Orienteer customized NotFoundPage https://github.
>> > >> > > com/OrienteerBAP/Orienteer/blob/master/orienteer-core/
>> > >> > > src/main/java/org/orienteer/core/web/NotFoundPage.java . And it
>> > works
>> > >> > > perfectly except one case: if somebody by mistake put double
>> slash
>> > in
>> > >> > URL.
>> > >> > > For example https://demo.orienteer.org// Application is trying
>> to
>> > >> render
>> > >> > > 404 page, but all resources are not found and user see just plan
>> > page
>> > >> > > without styles and scripts. Taking into account that resources
>> are
>> > >> > included
>> > >> > > commonly through XXXPackageResource and WebJarsResourc - it looks
>> > like
>> > >> > > Wicket issue.
>> > >> > >
>> > >> > > Is there any quick way to fix it?
>> > >> > >
>> > >> > > Thanks,
>> > >> > > Ilia
>> > >> > >
>> > >> > > -
>> > >> > > Orienteer(http://orienteer.org) - open source Business
>> Application
>> > >> > > Platform
>> > >> > >
>> > >> >
>> > >>
>> >
>> >
>> >
>> > --
>> > WBR
>> > Maxim aka solomax
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>
>


Re: Double slash break everything

2017-09-19 Thread Илья Нарыжный
Martin,

Yes - that's exactly the case. Should I create JIRA ticket for this?

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Mon, Sep 18, 2017 at 11:37 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> I think this is a bug in Wicket.
> I haven't tried the quickstart app but if the 404 page cannot render its
> static resources then it smells like a bug,
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Sep 19, 2017 at 8:24 AM, Maxim Solodovnik <solomax...@gmail.com>
> wrote:
>
> > Here is the example of handling multiple slashes:
> > https://stackoverflow.com/questions/11214542/is-there-a-
> > way-to-handle-extra-slashes-at-beginning-of-url-using-jersey-and-guic
> >
> > On Tue, Sep 19, 2017 at 11:47 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
> > > Actually, it can be easily reproduced on wicket quick-start.
> > > Please check this one:
> > > https://github.com/PhantomYdn/wicket-bugs/tree/master/doubleslash
> > >
> > > Thanks,
> > > Ilia
> > >
> > > -
> > > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> > >
> > > On Mon, Sep 18, 2017 at 6:04 PM, Maxim Solodovnik <
> solomax...@gmail.com>
> > > wrote:
> > >
> > >> I would say it is not wicket issue, but the behavior of your
> application
> > >> server
> > >>
> > >> WBR, Maxim
> > >> (from mobile, sorry for the typos)
> > >>
> > >> On Sep 19, 2017 07:53, "Илья Нарыжный" <phan...@ydn.ru> wrote:
> > >>
> > >> > Hello,
> > >> >
> > >> > Any ideas? Is this known Wicket bug?
> > >> >
> > >> > Thanks,
> > >> > Ilia
> > >> >
> > >> > -
> > >> > Orienteer(http://orienteer.org) - open source Business Application
> > >> > Platform
> > >> >
> > >> > On Sat, Sep 9, 2017 at 10:37 PM, Илья Нарыжный <phan...@ydn.ru>
> > wrote:
> > >> >
> > >> > > Hello,
> > >> > >
> > >> > > We have in Orienteer customized NotFoundPage https://github.
> > >> > > com/OrienteerBAP/Orienteer/blob/master/orienteer-core/
> > >> > > src/main/java/org/orienteer/core/web/NotFoundPage.java . And it
> > works
> > >> > > perfectly except one case: if somebody by mistake put double slash
> > in
> > >> > URL.
> > >> > > For example https://demo.orienteer.org// Application is trying to
> > >> render
> > >> > > 404 page, but all resources are not found and user see just plan
> > page
> > >> > > without styles and scripts. Taking into account that resources are
> > >> > included
> > >> > > commonly through XXXPackageResource and WebJarsResourc - it looks
> > like
> > >> > > Wicket issue.
> > >> > >
> > >> > > Is there any quick way to fix it?
> > >> > >
> > >> > > Thanks,
> > >> > > Ilia
> > >> > >
> > >> > > -
> > >> > > Orienteer(http://orienteer.org) - open source Business
> Application
> > >> > > Platform
> > >> > >
> > >> >
> > >>
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: Double slash break everything

2017-09-18 Thread Илья Нарыжный
Actually, it can be easily reproduced on wicket quick-start.
Please check this one:
https://github.com/PhantomYdn/wicket-bugs/tree/master/doubleslash

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Mon, Sep 18, 2017 at 6:04 PM, Maxim Solodovnik <solomax...@gmail.com>
wrote:

> I would say it is not wicket issue, but the behavior of your application
> server
>
> WBR, Maxim
> (from mobile, sorry for the typos)
>
> On Sep 19, 2017 07:53, "Илья Нарыжный" <phan...@ydn.ru> wrote:
>
> > Hello,
> >
> > Any ideas? Is this known Wicket bug?
> >
> > Thanks,
> > Ilia
> >
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
> > On Sat, Sep 9, 2017 at 10:37 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
> >
> > > Hello,
> > >
> > > We have in Orienteer customized NotFoundPage https://github.
> > > com/OrienteerBAP/Orienteer/blob/master/orienteer-core/
> > > src/main/java/org/orienteer/core/web/NotFoundPage.java . And it works
> > > perfectly except one case: if somebody by mistake put double slash in
> > URL.
> > > For example https://demo.orienteer.org// Application is trying to
> render
> > > 404 page, but all resources are not found and user see just plan page
> > > without styles and scripts. Taking into account that resources are
> > included
> > > commonly through XXXPackageResource and WebJarsResourc - it looks like
> > > Wicket issue.
> > >
> > > Is there any quick way to fix it?
> > >
> > > Thanks,
> > > Ilia
> > >
> > > -
> > > Orienteer(http://orienteer.org) - open source Business Application
> > > Platform
> > >
> >
>


Re: Double slash break everything

2017-09-18 Thread Илья Нарыжный
Hello,

Any ideas? Is this known Wicket bug?

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Sat, Sep 9, 2017 at 10:37 PM, Илья Нарыжный <phan...@ydn.ru> wrote:

> Hello,
>
> We have in Orienteer customized NotFoundPage https://github.
> com/OrienteerBAP/Orienteer/blob/master/orienteer-core/
> src/main/java/org/orienteer/core/web/NotFoundPage.java . And it works
> perfectly except one case: if somebody by mistake put double slash in URL.
> For example https://demo.orienteer.org// Application is trying to render
> 404 page, but all resources are not found and user see just plan page
> without styles and scripts. Taking into account that resources are included
> commonly through XXXPackageResource and WebJarsResourc - it looks like
> Wicket issue.
>
> Is there any quick way to fix it?
>
> Thanks,
> Ilia
>
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>


Double slash break everything

2017-09-09 Thread Илья Нарыжный
Hello,

We have in Orienteer customized NotFoundPage
https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/web/NotFoundPage.java
. And it works perfectly except one case: if somebody by mistake put double
slash in URL. For example https://demo.orienteer.org// Application is
trying to render 404 page, but all resources are not found and user see
just plan page without styles and scripts. Taking into account that
resources are included commonly through XXXPackageResource and
WebJarsResourc - it looks like Wicket issue.

Is there any quick way to fix it?

Thanks,
Ilia

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: Inconsistent functionality for object's properties

2017-07-18 Thread Илья Нарыжный
Martin,

Yes - I understand that. But in any case: is there any plans to make
serialization to JSON be compatible with wicket custom IPropertyLocator
feature?

Ilia
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Tue, Jul 18, 2017 at 2:35 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> Actually the plan is (was) to get rid of Wicket's JSONObject.
> In Wicket 8.x there is no more such class. Now we use external dependency
> to OpenJson for Wicket's internal JSON needs.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Jul 18, 2017 at 1:28 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
> > Hello,
> >
> > Wicket has a great feature: ability to customize getting and setting
> > properties from/to an object. It's done through IPropertyLocator.
> >
> > But at the same time wicket's JSONObject implementation use just common
> > native properties of an object through Introspector. As a result: not all
> > properties of customized object might be reflected in json.
> >
> > And plans to fix this unfair situation?
> >
> > Thanks,
> >
> > Ilia
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
>


Inconsistent functionality for object's properties

2017-07-18 Thread Илья Нарыжный
Hello,

Wicket has a great feature: ability to customize getting and setting
properties from/to an object. It's done through IPropertyLocator.

But at the same time wicket's JSONObject implementation use just common
native properties of an object through Introspector. As a result: not all
properties of customized object might be reflected in json.

And plans to fix this unfair situation?

Thanks,

Ilia
-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: FilterForm and Ajax

2017-04-18 Thread Илья Нарыжный
Ernesto,

We do not use AjaxFallbackDefaultDataTable, but similiar inclusion of
toolbars inside:

AjaxFallbackDefaultDataTable:
https://github.com/apache/wicket/blob/WICKET-5909-7.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/repeater/data/table/AjaxFallbackDefaultDataTable.java#L72-L76


OrienteerDataTable:
https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/table/OrienteerDataTable.java#L77-L84

And even according to Wicket code: I can't find good place where AJAX
submition of fitler's data is implemented.

Thanks,

Ilia
-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Tue, Apr 18, 2017 at 12:24 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi Ilia,
>
> IMHO your question is a bit vague: what components are you using? Do you
> use AjaxFallbackDefaultDataTable?
>
> On Mon, Apr 17, 2017 at 8:04 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
> > Guys,
> >
> > Is there any good way (approved solution from wicket dev team) how to
> make
> > datatable filtering AJAX enabled?
> > Currently, if you enter filter criterias in FilterForm and click Enter -
> it
> > will reload full page instead of refreshing just a table through Ajax.
> >
> > Thanks,
> >
> > Ilia
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


FilterForm and Ajax

2017-04-17 Thread Илья Нарыжный
Guys,

Is there any good way (approved solution from wicket dev team) how to make
datatable filtering AJAX enabled?
Currently, if you enter filter criterias in FilterForm and click Enter - it
will reload full page instead of refreshing just a table through Ajax.

Thanks,

Ilia
-
Orienteer(http://orienteer.org) - open source Business Application Platform


Pluggable architecture for wicket application

2016-11-13 Thread Илья Нарыжный
Hello,

We really need advise from Apache Wicket experts. Please let me know if you
have any ideas how to realize the following:

We are working on Orienteer (http://orienteer.org) - open source Business
Application Platform for rapid development.
Orienteer already has pluggable architecture which allow to
start/stop/restart modules and etc. Every module can bring different
things: new webpages, REST, wicket components and etc. For example:
https://github.com/OrienteerBAP/Orienteer/tree/master/orienteer-pivottable

But there is plans to allow dynamically upload required new module (without
recompiling whole WAR with new module).  To upload person can literally
upload JAR or enter URL with the module or specify Maven's
groupId:artifactId:version.

There is no problem with downloading of module: there is a problem with
runtime running it.  Questions:

1) Is there good way for substitution of your own ClassLoader for more
dynamic management?
2) Is there a way for restarting of wicket app without restarting a
web-container?
3) Related to p.1: any good experience with using this:
https://github.com/kamranzafar/JCL ?
4) Any other suggetions how to make dynamically pluggable modules in wicket?

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: Reload Wicket classes/markup without reloading Servlet Container

2016-09-05 Thread Илья Нарыжный
Hi,

I also recommend this library https://github.com/stagemonitor/stagemonitor
Stagemonitor has nice web page for tracking/monitoring.

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application Platform

On Fri, Sep 2, 2016 at 12:08 AM, Martin Grigorov 
wrote:

> Hi,
>
> I use DCEVM (https://github.com/dcevm/dcevm).
> It doesn't have all the bells and whisles like JRebel but it is FREE and
> does a great job in reloading classes!
> Combined with an embedded web container (as Tobias suggested) is the best!
>
> For reloading markup - Wicket does itself without any extermal help in DEV
> mode.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Sep 2, 2016 at 8:59 AM, Martijn Dashorst <
> martijn.dasho...@gmail.com
> > wrote:
>
> > At € day job we pay a lot to use jrebel. Not perfect but does the job
> > reasonably well. Unfortunately their new licensing model made it about 4
> > times more expensive for us to use it.
> >
> > Martijn
> >
> > On Friday, 2 September 2016, Tobias Soloschenko <
> > tobiassolosche...@googlemail.com> wrote:
> >
> > > Hi,
> > >
> > > you could use Jetty and run it in debug mode within your IDE. See
> > > StartExamples Java-Class
> > >
> > > https://github.com/apache/wicket/blob/master/wicket-
> > > examples/src/test/java/org/apache/wicket/examples/StartExamples.java
> > >
> > > kind regards
> > >
> > > Tobias
> > >
> > > > Am 02.09.2016 um 03:19 schrieb James Selvakumar  > > >:
> > > >
> > > > Dear Wicket community,
> > > >
> > > > May I know what techniques/tools are used by the community to reload
> > > Wicket
> > > > classes and markup without reloading Servlet Container to speed up
> > > > development?
> > > >
> > > > --
> > > > Thanks & regards
> > > > James Selvakumar
> > > > mCruncher
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > 
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > 
> > >
> > >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> >
>


Re: Form from post to multipart

2016-09-05 Thread Илья Нарыжный
Hello!

Issue has been solved by the following code. What do you think about
inclusion of it into official wicket code?

/**
 * Update Form EncType to "multipart/form-data" of there is something which
require multipart is in target ajax response
 */
public class FixFormEncTypeListener extends
AjaxRequestTarget.AbstractListener {

@Override
public void onAfterRespond(Map<String, Component> map, IJavaScriptResponse
response) {
Set<Form> formsToUpdate = new HashSet<>();
for (Map.Entry<String, Component> entry : map.entrySet()) {
Component component = entry.getValue();
Form form = component.findParent(Form.class);
if(form!=null && form.isMultiPart()) formsToUpdate.add(form.getRootForm());
}
for (Form form : formsToUpdate) {
response.addJavaScript("{var e =
document.getElementById('"+form.getMarkupId()+"'); e.encoding=
'multipart/form-data'; e.encType=e.encoding;}");
}
}
}

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application Platform


On Mon, Sep 5, 2016 at 2:32 AM, Илья Нарыжный <phan...@ydn.ru> wrote:

> It will not solve the problem... Component which want to be mutatable
> doesn't want to know about parent forms. So forms in ajax mode should
> somehow adjust encoding automatically, but resending of whole content of a
> form is not good option, imho.
>
> Thanks,
>
> Ilya
>
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>
>
> On Mon, Sep 5, 2016 at 1:29 AM, Maxim Solodovnik <solomax...@gmail.com>
> wrote:
>
>> Maybe you can use nested forms?
>>
>> On Mon, Sep 5, 2016 at 2:51 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>>
>> > Hello!
>> >
>> > Please help to figure out is there some good solution for the following
>> > situation:
>> >
>> > There is a page with Form with in it. Form contains lots of components
>> > underneath. And some components can be changed by AJAX from "view"
>> > representation to "edit". And sometimes "edit" is some file upload
>> > component. And in this case to work proporly: form encoding should be
>> > changed to multipart. But I don't want to make it by sending in ajax
>> > response whole Form, because it's pretty big...  Is there a good way
>> update
>> > just a component and if parent form is not multipart - switch it to
>> > multipart?
>> >
>> > Thanks,
>> >
>> > Ilya
>> >
>> > -
>> > Orienteer(http://orienteer.org) - open source Business Application
>> > Platform
>> >
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>


Re: Form from post to multipart

2016-09-05 Thread Илья Нарыжный
It will not solve the problem... Component which want to be mutatable
doesn't want to know about parent forms. So forms in ajax mode should
somehow adjust encoding automatically, but resending of whole content of a
form is not good option, imho.

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application Platform


On Mon, Sep 5, 2016 at 1:29 AM, Maxim Solodovnik <solomax...@gmail.com>
wrote:

> Maybe you can use nested forms?
>
> On Mon, Sep 5, 2016 at 2:51 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
> > Hello!
> >
> > Please help to figure out is there some good solution for the following
> > situation:
> >
> > There is a page with Form with in it. Form contains lots of components
> > underneath. And some components can be changed by AJAX from "view"
> > representation to "edit". And sometimes "edit" is some file upload
> > component. And in this case to work proporly: form encoding should be
> > changed to multipart. But I don't want to make it by sending in ajax
> > response whole Form, because it's pretty big...  Is there a good way
> update
> > just a component and if parent form is not multipart - switch it to
> > multipart?
> >
> > Thanks,
> >
> > Ilya
> >
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Form from post to multipart

2016-09-05 Thread Илья Нарыжный
Hello!

Please help to figure out is there some good solution for the following
situation:

There is a page with Form with in it. Form contains lots of components
underneath. And some components can be changed by AJAX from "view"
representation to "edit". And sometimes "edit" is some file upload
component. And in this case to work proporly: form encoding should be
changed to multipart. But I don't want to make it by sending in ajax
response whole Form, because it's pretty big...  Is there a good way update
just a component and if parent form is not multipart - switch it to
multipart?

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Feature Request: Please add postConstruct() method

2016-08-19 Thread Илья Нарыжный
Hello,

There is a pain: components sometimes have a bunch of constructors, but
very often it's needed to configure something for that component in common.
And there are 2 ways to do that today:

1) Either explicitly call some single method from every constructor.
2) Or use onInitialize() method.

But both of them have disadvantages:

If first one has been used: it's pretty easy to forgot about necesity to
invoke some other method in some new constructor if you will need to add
that.

And second is not good because it's not possible to use constructions like
that in parent component:

add(new MyChildComponent("id", ).setSomething(XXX));

because if "something" was set in onInitialize() - that will override
setting that param in code above.


Thanks,

Ilya

-
Orienteer(http://orienteer.org) - open source Business Application Platform


Re: Restrict wicket/bookmarkable

2016-05-05 Thread Илья Нарыжный
Martin,

Done: https://issues.apache.org/jira/browse/WICKET-6161

Thank you!

2016-05-04 23:38 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
> Hi Ilia,
>
> Please create a ticket so we don't forget it!
> Thanks!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, May 4, 2016 at 7:32 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
>> For now I just removed BookmarkableMapper. Everything works. But it seems
>> to me that some cases might go wrong... And as side effect: hrefs just
>> empty to pages without mounts. Probably I would expect some other behavior
>> if url can't be resolved for a page.
>>
>> Thanks,
>>
>> Ilia
>> On May 4, 2016 6:54 AM, "Martin Grigorov" <mgrigo...@apache.org> wrote:
>>
>> > On Wed, May 4, 2016 at 3:27 PM, Sven Meier <s...@meiers.net> wrote:
>> >
>> > > Hi,
>> > >
>> > > well, it seems I wasn't completely out of my mind when I pushed for
>> > > WICKET-5094:
>> > > - I've checked 1.4 and the logic of #enforceMounts was exactly like it
>> is
>> > > now
>> > > - the javadoc for #setEnforceMounts() matches the current behavior:
>> > >
>> > > "Sets whether mounts should be enforced. If true, requests for mounted
>> > > targets have to done through the mounted paths. If, for instance, a
>> > > bookmarkable page is mounted to a path, a request to that same page via
>> > the
>> > > bookmarkablePage parameter will be denied."
>> > >
>> > > For those trying to prevent any requests to non-mounted pages: Couldn't
>> > > you just remove the BookmarkableMapper?
>> > >
>> > > ICompoundRequestMapper mappers =
>> > getRootRequestMapperAsCompound();
>> > > mappers.forEach((mapper) -> {if (mapper instanceof
>> > > BookmarkableMapper) mappers.remove(mapper); });
>> > >
>> > > Personally I wouldn't mind to change/remove/rename this setting for
>> > Wicket
>> > > 8.x, so it is more useful.
>> > >
>> >
>> > +1 to change the behavior to what it was after WICKET-3849 and before
>> > WICKET-5094
>> >
>> >
>> > >
>> > > Have fun
>> > > Sven
>> > >
>> > >
>> > >
>> > > On 04.05.2016 08:23, Martin Grigorov wrote:
>> > >
>> > >> Hi,
>> > >>
>> > >> I also think the current behavior is not correct. See my question at
>> > >> http://markmail.org/message/xmo74m3tbc5v4nwp.
>> > >> I read the name of the method "enforceMounts" as "do not allow urls to
>> > >> page
>> > >> which are not explicitly mounted". I believe also this is the reason
>> > this
>> > >> method is in SecuritySettings, and not in PageSettings.
>> > >> And its javadoc also says the same. That's why I've -reintroduced this
>> > >> behavior with https://issues.apache.org/jira/browse/WICKET-3849.
>> > >>
>> > >> According to Sven the behavior in Wicket 1.4.x was different and he
>> > >> changed
>> > >> it with https://issues.apache.org/jira/browse/WICKET-5094.
>> > >> IMO Wicket 1.4.x must had a bug but there is no one to confirm :-/
>> > >>
>> > >> Martin Grigorov
>> > >> Wicket Training and Consulting
>> > >> https://twitter.com/mtgrigorov
>> > >>
>> > >> On Wed, May 4, 2016 at 7:57 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>> > >>
>> > >> Martin,
>> > >>>
>> > >>> Checked this issue:
>> https://issues.apache.org/jira/browse/WICKET-5094
>> > >>> Absolutely disagree with discussed behavior. It's meaningless to
>> > >>> prevent accessing /wicket/bookmarkable/ only if there is mount
>> > >>> point for that page.
>> > >>> Please help to find consensus. In mine case it's real security hole.
>> > >>>
>> > >>> Thanks,
>> > >>>
>> > >>> Ilia
>> > >>>
>> > >>> 2016-05-03 22:50 GMT-07:00 Илья Нарыжный <phan...@ydn.ru>:
>> > >>>
>> > >>>> Martin,
>> > >>>>
>> > >>>> Just checked: it doesn't work as expected. It seems that

Re: Restrict wicket/bookmarkable

2016-05-04 Thread Илья Нарыжный
For now I just removed BookmarkableMapper. Everything works. But it seems
to me that some cases might go wrong... And as side effect: hrefs just
empty to pages without mounts. Probably I would expect some other behavior
if url can't be resolved for a page.

Thanks,

Ilia
On May 4, 2016 6:54 AM, "Martin Grigorov" <mgrigo...@apache.org> wrote:

> On Wed, May 4, 2016 at 3:27 PM, Sven Meier <s...@meiers.net> wrote:
>
> > Hi,
> >
> > well, it seems I wasn't completely out of my mind when I pushed for
> > WICKET-5094:
> > - I've checked 1.4 and the logic of #enforceMounts was exactly like it is
> > now
> > - the javadoc for #setEnforceMounts() matches the current behavior:
> >
> > "Sets whether mounts should be enforced. If true, requests for mounted
> > targets have to done through the mounted paths. If, for instance, a
> > bookmarkable page is mounted to a path, a request to that same page via
> the
> > bookmarkablePage parameter will be denied."
> >
> > For those trying to prevent any requests to non-mounted pages: Couldn't
> > you just remove the BookmarkableMapper?
> >
> > ICompoundRequestMapper mappers =
> getRootRequestMapperAsCompound();
> > mappers.forEach((mapper) -> {if (mapper instanceof
> > BookmarkableMapper) mappers.remove(mapper); });
> >
> > Personally I wouldn't mind to change/remove/rename this setting for
> Wicket
> > 8.x, so it is more useful.
> >
>
> +1 to change the behavior to what it was after WICKET-3849 and before
> WICKET-5094
>
>
> >
> > Have fun
> > Sven
> >
> >
> >
> > On 04.05.2016 08:23, Martin Grigorov wrote:
> >
> >> Hi,
> >>
> >> I also think the current behavior is not correct. See my question at
> >> http://markmail.org/message/xmo74m3tbc5v4nwp.
> >> I read the name of the method "enforceMounts" as "do not allow urls to
> >> page
> >> which are not explicitly mounted". I believe also this is the reason
> this
> >> method is in SecuritySettings, and not in PageSettings.
> >> And its javadoc also says the same. That's why I've -reintroduced this
> >> behavior with https://issues.apache.org/jira/browse/WICKET-3849.
> >>
> >> According to Sven the behavior in Wicket 1.4.x was different and he
> >> changed
> >> it with https://issues.apache.org/jira/browse/WICKET-5094.
> >> IMO Wicket 1.4.x must had a bug but there is no one to confirm :-/
> >>
> >> Martin Grigorov
> >> Wicket Training and Consulting
> >> https://twitter.com/mtgrigorov
> >>
> >> On Wed, May 4, 2016 at 7:57 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
> >>
> >> Martin,
> >>>
> >>> Checked this issue: https://issues.apache.org/jira/browse/WICKET-5094
> >>> Absolutely disagree with discussed behavior. It's meaningless to
> >>> prevent accessing /wicket/bookmarkable/ only if there is mount
> >>> point for that page.
> >>> Please help to find consensus. In mine case it's real security hole.
> >>>
> >>> Thanks,
> >>>
> >>> Ilia
> >>>
> >>> 2016-05-03 22:50 GMT-07:00 Илья Нарыжный <phan...@ydn.ru>:
> >>>
> >>>> Martin,
> >>>>
> >>>> Just checked: it doesn't work as expected. It seems that this code
> >>>> doesn't work as it was assumed:
> >>>>
> >>>> BookmarkableMapper.java
> >>>> if (application.getSecuritySettings().getEnforceMounts())
> >>>> {
> >>>> // we make an exception if the homepage itself was mounted, see
> >>>>
> >>> WICKET-1898
> >>>
> >>>> if (!pageClass.equals(application.getHomePage()))
> >>>> {
> >>>> // WICKET-5094 only enforce mount if page is mounted
> >>>> if (isPageMounted(pageClass,
> >>>> application.getRootRequestMapperAsCompound()))// HERE!!!
> >>>> {
> >>>> return null;
> >>>> }
> >>>> }
> >>>> }
> >>>>
> >>>> Imho condition at line marked by HERE!!! should be opposite.
> >>>> Please check.
> >>>>
> >>>> In my case getSecuritySettings().setEnforceMounts(true); doesn't have
> >>>> any effect.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Ilia
> >>>>
> >>>>

Re: Restrict wicket/bookmarkable

2016-05-03 Thread Илья Нарыжный
Martin,

Checked this issue: https://issues.apache.org/jira/browse/WICKET-5094
Absolutely disagree with discussed behavior. It's meaningless to
prevent accessing /wicket/bookmarkable/ only if there is mount
point for that page.
Please help to find consensus. In mine case it's real security hole.

Thanks,

Ilia

2016-05-03 22:50 GMT-07:00 Илья Нарыжный <phan...@ydn.ru>:
> Martin,
>
> Just checked: it doesn't work as expected. It seems that this code
> doesn't work as it was assumed:
>
> BookmarkableMapper.java
> if (application.getSecuritySettings().getEnforceMounts())
> {
> // we make an exception if the homepage itself was mounted, see WICKET-1898
> if (!pageClass.equals(application.getHomePage()))
> {
> // WICKET-5094 only enforce mount if page is mounted
> if (isPageMounted(pageClass,
> application.getRootRequestMapperAsCompound()))// HERE!!!
> {
> return null;
> }
> }
> }
>
> Imho condition at line marked by HERE!!! should be opposite.
> Please check.
>
> In my case getSecuritySettings().setEnforceMounts(true); doesn't have
> any effect.
>
> Thanks,
>
> Ilia
>
> 2016-05-03 10:59 GMT-07:00 Илья Нарыжный <phan...@ydn.ru>:
>> Thank you Martin! I did know that there should be easier way to do
>> that, but could not be able to find it:)
>>
>> Regards,
>>
>> Ilia
>>
>> 2016-05-03 0:06 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
>>> Hi,
>>>
>>> I always thought
>>> that org.apache.wicket.settings.SecuritySettings#getEnforceMounts() is for
>>> this. Also its javadoc seems to say that.
>>> But there were some changes to its behavior after which I am no more sure
>>> what exactly it does :-/
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>> On Tue, May 3, 2016 at 8:53 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>>>
>>>> Yea - that's possible. Even instrumentation is possible, but probably
>>>> this problem somehow solved already in wicket. I would briefly
>>>> summarize the problem like:
>>>>
>>>> Wicket allow to directly address bookmarkable pages from 3rd party
>>>> libraries without good way to manage accessibility.
>>>> Potentially it means that with having control over some 3rd partly lib
>>>> it's possible to include "backdoor page"
>>>> Thanks,
>>>>
>>>> Ilia
>>>>
>>>> -
>>>> 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: Restrict wicket/bookmarkable

2016-05-03 Thread Илья Нарыжный
Martin,

Just checked: it doesn't work as expected. It seems that this code
doesn't work as it was assumed:

BookmarkableMapper.java
if (application.getSecuritySettings().getEnforceMounts())
{
// we make an exception if the homepage itself was mounted, see WICKET-1898
if (!pageClass.equals(application.getHomePage()))
{
// WICKET-5094 only enforce mount if page is mounted
if (isPageMounted(pageClass,
application.getRootRequestMapperAsCompound()))// HERE!!!
{
return null;
}
}
}

Imho condition at line marked by HERE!!! should be opposite.
Please check.

In my case getSecuritySettings().setEnforceMounts(true); doesn't have
any effect.

Thanks,

Ilia

2016-05-03 10:59 GMT-07:00 Илья Нарыжный <phan...@ydn.ru>:
> Thank you Martin! I did know that there should be easier way to do
> that, but could not be able to find it:)
>
> Regards,
>
> Ilia
>
> 2016-05-03 0:06 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
>> Hi,
>>
>> I always thought
>> that org.apache.wicket.settings.SecuritySettings#getEnforceMounts() is for
>> this. Also its javadoc seems to say that.
>> But there were some changes to its behavior after which I am no more sure
>> what exactly it does :-/
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Tue, May 3, 2016 at 8:53 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>>
>>> Yea - that's possible. Even instrumentation is possible, but probably
>>> this problem somehow solved already in wicket. I would briefly
>>> summarize the problem like:
>>>
>>> Wicket allow to directly address bookmarkable pages from 3rd party
>>> libraries without good way to manage accessibility.
>>> Potentially it means that with having control over some 3rd partly lib
>>> it's possible to include "backdoor page"
>>> Thanks,
>>>
>>> Ilia
>>>
>>> -
>>> 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: Restrict wicket/bookmarkable

2016-05-03 Thread Илья Нарыжный
Thank you Martin! I did know that there should be easier way to do
that, but could not be able to find it:)

Regards,

Ilia

2016-05-03 0:06 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
> Hi,
>
> I always thought
> that org.apache.wicket.settings.SecuritySettings#getEnforceMounts() is for
> this. Also its javadoc seems to say that.
> But there were some changes to its behavior after which I am no more sure
> what exactly it does :-/
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, May 3, 2016 at 8:53 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
>> Yea - that's possible. Even instrumentation is possible, but probably
>> this problem somehow solved already in wicket. I would briefly
>> summarize the problem like:
>>
>> Wicket allow to directly address bookmarkable pages from 3rd party
>> libraries without good way to manage accessibility.
>> Potentially it means that with having control over some 3rd partly lib
>> it's possible to include "backdoor page"
>> Thanks,
>>
>> Ilia
>>
>> -
>> 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: Restrict wicket/bookmarkable

2016-05-03 Thread Илья Нарыжный
Yea - that's possible. Even instrumentation is possible, but probably
this problem somehow solved already in wicket. I would briefly
summarize the problem like:

Wicket allow to directly address bookmarkable pages from 3rd party
libraries without good way to manage accessibility.
Potentially it means that with having control over some 3rd partly lib
it's possible to include "backdoor page"
Thanks,

Ilia

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



Restrict wicket/bookmarkable

2016-05-02 Thread Илья Нарыжный
Hello,

Is there good way to restrict accessing bookmarkable pages through
/wicket/bookmarkable URL?

Use case: there is ability in our software (http://orienteer.org)
dynamically enable or disable module with Development utils. This
module of cource use wicket-devutils, but neverheless fact that module
is disabled just because of presence of corresponding pages in
classpath anyone can access them directly, for example by url:
http://localhost:8080/wicket/bookmarkable/org.apache.wicket.devutils.inspector.LiveSessionsPage

Expected behavior: disallow accessing pages through /wicket/bookmarkable/

Thanks,

Ilia

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



Re: Resources can't object HTTP request body

2016-03-31 Thread Илья Нарыжный
Martin,

Ticket has been created: https://issues.apache.org/jira/browse/WICKET-6135
Will attach quick start today/tomorrow.

Thanks,

Ilia

2016-03-29 6:39 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
> Please create a ticket at JIRA.
> With a quickstart would be nice!
> Thank you!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Mar 29, 2016 at 3:30 PM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
>> Martin,
>>
>> There are 3 problems:
>>
>> 1) Map can not guarantee that order of keys remain the same. In my
>> case Jetty use HashMap as underling storage.
>> 2) Some part of content might be URL encoded. So after collecting all
>> back: it's hard to revert exectly to initial value due to fact that
>> some parts contained URL encoded stuff.
>> 3) POST can contain huge body. So it looks very strange.
>>
>> As a work-around I use Filter configured prior to wicket to intercept
>> body whenever it's needed:
>>
>> https://github.com/OrienteerDW/wicket-orientdb/commit/c9e706d9e84a828901a5ad97ed50aa46521f7bfb
>>
>> Is it really required for isAjax() method check POST parameters as
>> well? I mean, may be flag is in query string and there is even no goal
>> to check POST body.
>>
>> Thanks,
>>
>> Ilia
>>
>> 2016-03-27 4:07 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
>> > Hi,
>> >
>> > I remember dealing with this in the past but I cannot find the mail
>> thread
>> > now.
>> > I think the complete body should be available as a valueless key in the
>> > post parameters:
>> > getRequest().getPostParameters().getParameterNames().iterator().next().
>> > Please confirm whether this works!
>> > If it does then I think it would be good to add a helper method to
>> simplify
>> > this.
>> >
>> > Martin Grigorov
>> > Wicket Training and Consulting
>> > https://twitter.com/mtgrigorov
>> >
>> > On Sat, Mar 26, 2016 at 5:28 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>> >
>> >> It seems that Wicket Resource can't obtain whole HTTP POST body.
>> >> The reason of that is the following:
>> >> Mappers invoke WebRequest.isAjax() and isAjax() is trying to
>> >> getRequestParameters() - so body of POST parsed prior to actual
>> >> getInputStream() in a Resource object.
>> >>
>> >> Is there any chances to allow Resources to get request body?
>> >>
>> >> Thanks,
>> >>
>> >> Ilia
>> >>
>> >> -
>> >> 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: Resources can't object HTTP request body

2016-03-29 Thread Илья Нарыжный
Martin,

There are 3 problems:

1) Map can not guarantee that order of keys remain the same. In my
case Jetty use HashMap as underling storage.
2) Some part of content might be URL encoded. So after collecting all
back: it's hard to revert exectly to initial value due to fact that
some parts contained URL encoded stuff.
3) POST can contain huge body. So it looks very strange.

As a work-around I use Filter configured prior to wicket to intercept
body whenever it's needed:
https://github.com/OrienteerDW/wicket-orientdb/commit/c9e706d9e84a828901a5ad97ed50aa46521f7bfb

Is it really required for isAjax() method check POST parameters as
well? I mean, may be flag is in query string and there is even no goal
to check POST body.

Thanks,

Ilia

2016-03-27 4:07 GMT-07:00 Martin Grigorov <mgrigo...@apache.org>:
> Hi,
>
> I remember dealing with this in the past but I cannot find the mail thread
> now.
> I think the complete body should be available as a valueless key in the
> post parameters:
> getRequest().getPostParameters().getParameterNames().iterator().next().
> Please confirm whether this works!
> If it does then I think it would be good to add a helper method to simplify
> this.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Sat, Mar 26, 2016 at 5:28 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
>> It seems that Wicket Resource can't obtain whole HTTP POST body.
>> The reason of that is the following:
>> Mappers invoke WebRequest.isAjax() and isAjax() is trying to
>> getRequestParameters() - so body of POST parsed prior to actual
>> getInputStream() in a Resource object.
>>
>> Is there any chances to allow Resources to get request body?
>>
>> Thanks,
>>
>> Ilia
>>
>> -
>> 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



Resources can't object HTTP request body

2016-03-25 Thread Илья Нарыжный
It seems that Wicket Resource can't obtain whole HTTP POST body.
The reason of that is the following:
Mappers invoke WebRequest.isAjax() and isAjax() is trying to
getRequestParameters() - so body of POST parsed prior to actual
getInputStream() in a Resource object.

Is there any chances to allow Resources to get request body?

Thanks,

Ilia

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



Re: WicketStuff status and future; awesome-wicket project

2016-02-03 Thread Илья Нарыжный
François,

Thanks for the list! Just few questions/comments:

1) How did you collect that lists? Probably I can dig more by that way.
2) Regarding solutions: I don't want to have in the list sites - under
solutions I assume just software which can be installed standalone.

Regards,
Ilya

-
Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.

2016-02-02 23:43 GMT-08:00 Francois Meillet <francois.meil...@gmail.com>:
> Hi Ilya,
>
>
> You can add theses products :
>
>
> Under Web Frameworks
>
> Apache OODT http://oodt.apache.org
> Data grid framework for transparent search and discovery of disparate science 
> resources
>
> Apache Openmeetings http://openmeetings.apache.org
> Apache Openmeetings provides video conferencing, instant messaging, white 
> board, collaborative document editing and other groupware tools
>
> Apache Nutch https://nutch.apache.org
> Apache Nutch is a highly extensible and scalable open source web crawler 
> software project
>
> Apache Syncope https://syncope.apache.org
> Apache Syncope is an Open Source system for managing digital identities in 
> enterprise environments
>
> Dcm4che http://www.dcm4che.org
> Open Source Clinical Image and Object Management Dcm4che
>
> WebAnno https://webanno.github.io/webanno/
> WebAnno, general purpose web-based annotation tool for a wide range of 
> linguistic annotations
>
>
>
>
> Under Solutions
>
> CA http://www.ca.com
> Identity Governance products
>
> Callfire https://www.callfire.com
> Phone Numbers, Voice Broadcasting & Auto Dialer Software
>
> Cqrollcall http://cqrollcall.com/products-services/cqrc-engage/
> All-in-one tool to execute advocacy campaigns
>
> Flowzone http://www.flowzone.com
> The planet's most adaptable project management
>
> GeoServer http://geoserver.org
> GeoServer is an open source server for sharing geospatial data
>
> Jfrog http://www.jfrog.com
> Managing Binaries for Maven Repository, Docker, .Net, Ruby and More
>
> Jumio https://www.jumio.com
> Scan and Validate Credit Cards and IDs
>
> Multicom http://multicom.co.uk
> Online travel, booking, agent, management software multicom
>
> OpenCRS 
> http://www.openroadsconsulting.com/intelligent-transportation-systems/products/opencrs/
> Data Fusion and Condition Reporting Tool OpenCRS
>
> Servoy https://www.servoy.com
> Business Application Platform for ISVs
>
> Soweroasis http://www.poweroasis.com
> Energy management solutions
>
> Tentelemed http://www.tentelemed.com
> Trusted Information systems for health professionals
>
>
>
> François
>
>
>
>
>
>
>
>
>
>
>
> Le 2 févr. 2016 à 08:26, Tobias Soloschenko 
> <tobiassolosche...@googlemail.com> a écrit :
>
>> Hi Ilya,
>>
>> In your list the nashorn project is missing - it is a way to allow users to 
>> execute javascript on server side. I am going to add it to the list of 
>> submodules, now.
>>
>> Anyway it is up to the community to update the wiki or to bring projects up 
>> to date and this would be a lot harder if it would not be at a central place.
>>
>> kind regards
>>
>> Tobias
>>
>>> Am 31.01.2016 um 23:41 schrieb Илья Нарыжный <phan...@ydn.ru>:
>>>
>>> Thank you, Martin!
>>> After you reply I understand that significant part of my concerns
>>> actually related to moving everything under single repository (Core).
>>> I mean, that migration of a project just to community group will help
>>> pretty much the same benefits: ability to take over some project after
>>> loosing of interest from author.
>>> Btw, I also recommend to establish one more "condition" for moving
>>> project to wicketstuff: delete source repository or mention that
>>> project has been moved. I know a couple of projects for which it's
>>> hard to understand that they were moved and newer version can be found
>>> in wicketstuff.
>>> Also, as I can see, not all good projects have wiki page or README.md
>>> well prepared...
>>>
>>> Regards,
>>>
>>> Ilya
>>> -
>>> Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.
>>>
>>> 2016-01-31 12:45 GMT-08:00 Martin Grigorov <mgrigo...@apache.org>:
>>>> Hi,
>>>>
>>>>
>>>>> On Sun, Jan 31, 2016 at 1:38 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>>>>>
>>>>> Guys,
>>>>>
>>>>> Please he

Re: WicketStuff status and future; awesome-wicket project

2016-01-31 Thread Илья Нарыжный
Thank you, Martin!
After you reply I understand that significant part of my concerns
actually related to moving everything under single repository (Core).
I mean, that migration of a project just to community group will help
pretty much the same benefits: ability to take over some project after
loosing of interest from author.
Btw, I also recommend to establish one more "condition" for moving
project to wicketstuff: delete source repository or mention that
project has been moved. I know a couple of projects for which it's
hard to understand that they were moved and newer version can be found
in wicketstuff.
Also, as I can see, not all good projects have wiki page or README.md
well prepared...

Regards,

Ilya
-
Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.

2016-01-31 12:45 GMT-08:00 Martin Grigorov <mgrigo...@apache.org>:
> Hi,
>
>
> On Sun, Jan 31, 2016 at 1:38 AM, Илья Нарыжный <phan...@ydn.ru> wrote:
>
>> Guys,
>>
>> Please help me understand what's status of wicketstuff project and
>> what's a roadmap for the future?
>>
>> I'm asking, because from community stand point I don't see so much pros.
>>
>> Pros:
>>
>> 1) It's easy to have all wicket related projects in place and observe at
>> once.
>>
>> But this pros can be easily done by creating a library of links to all
>> wicket related project. What else do you have in mind?
>>
>
> The biggest pros is that WicketStuff is already known to the community.
> Whenever someone needs some Wicket integration I guess Google's first
> recommendation would be WicketStuff.
>
>
>>
>> List of cons is longer:
>>
>> 1) It's hard to manage issues baceuse there are multiple projects and
>> multiple authors.
>>
>
> By "donating" a project to WicketStuff authors hope that other people will
> also use it and improve it,
> i.e. implement new features and fix bugs.
> Every author of a WicketStuff module is a member of the Collaborators team
> and thus is notified whenever
> there is a issue report for any project. I personally have fixed several
> issues for projects which I either use or I care about.
> There are other people doing this too.
>
>
>> 2) It's expected that versions of wicketstuff projects are in sync
>> with wicket version. But in reality, as I can see, significant part of
>> projects update just pom.xml to a newer version. So: it brings
>> redundant versions for those projects
>>
>
> Pros:
> 1) the projects are migrated to 6.0.0/7.0.0 by others, not by the original
> authors
> 2) the projects are build with the latest version of Wicket and their tests
> are executed
> 3) I use WicketStuff build to validate Wicket's releases themselves
>
>
>> 3) Hard to search. Yes - google can find everything, but on github
>> it's much more reasonable to have separate repository per project.
>>
>
> I think it is easier to search at one known place than many unknown ones
>
>
>> 4) When project jumps to wicketstuff: all dependencies should be
>> updated. And sometimes it's not easy: for example if you include
>> ProjectA which includes ProjectB and projectB jump to wicketstuff.
>>
>
> In this case you can still use ProjectB versionBeforeWicketStuff
>
>
>> 5) And finally: most of projects are already outdated and not
>> supported by authors
>>
>
> From time to time contributors appear with some fixes/improvements.
> Very recently a user revived Jamon integration from wicket-1.4.x branch!
>
>
>>
>> For my own purposes I started to collect wicket related projects here:
>> https://github.com/PhantomYdn/awesome-wicket
>
>
> This is great initiative! Thank you!
>
> But what you said for WicketStuff I can say for this list too - many of the
> projects are outdated and not supported by their authors.
> Most probably they will never be updated to a newer version.
> Someone may fork them and update, but then it becomes even harder for other
> users to find the best solution for a problem.
>
>
>>
>> Collection of links might be move beneficial for the community rather
>> that moving everything under single project (WicketStuff), I think.
>>
>
> Maybe you are right, maybe not!
>
> My biggest problem with WicketStuff is that it becomes bigger and bigger
> and releasing it takes more and more time.
> It was almost 6 hours at some point. Now we disabled the deployment of
> -examples modules to Maven Central and it is back to ~1h, so please keep
> them coming! :-)
>
>
>>
>> Thanks,
>>
>> Ilya
>>
>> -
>> Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.
>>
>> -
>> 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



WicketStuff status and future; awesome-wicket project

2016-01-30 Thread Илья Нарыжный
Guys,

Please help me understand what's status of wicketstuff project and
what's a roadmap for the future?

I'm asking, because from community stand point I don't see so much pros.

Pros:

1) It's easy to have all wicket related projects in place and observe at once.

But this pros can be easily done by creating a library of links to all
wicket related project. What else do you have in mind?

List of cons is longer:

1) It's hard to manage issues baceuse there are multiple projects and
multiple authors.
2) It's expected that versions of wicketstuff projects are in sync
with wicket version. But in reality, as I can see, significant part of
projects update just pom.xml to a newer version. So: it brings
redundant versions for those projects
3) Hard to search. Yes - google can find everything, but on github
it's much more reasonable to have separate repository per project.
4) When project jumps to wicketstuff: all dependencies should be
updated. And sometimes it's not easy: for example if you include
ProjectA which includes ProjectB and projectB jump to wicketstuff.
5) And finally: most of projects are already outdated and not
supported by authors

For my own purposes I started to collect wicket related projects here:
https://github.com/PhantomYdn/awesome-wicket
Collection of links might be move beneficial for the community rather
that moving everything under single project (WicketStuff), I think.

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.

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



Re: Security Issue or incorrect usage?

2016-01-03 Thread Илья Нарыжный
Sorry, Andrea, I meant "observed" according to my experiments. I have
already redo my implementation, but class and this article are pretty
dangerous: it might be easily understanded in wrong way and even on
dev env it might work "as expected", but "side-effects" might be
catched only on production. I recommend to add more JavaDocs and
comments.

Thanks,

Ilya
-
Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.

2015-12-31 6:12 GMT-08:00 Andrea Del Bene :
> Hi,
>
> the wiki entry you have found is pretty old (StyleSheetReference is no more
> part of the API). Where did you read the note you reported in the mail?
> BTW: I don't think it's a security issue. It just says that variable
> interpolation is done the first time the resource is requested, so you
> should avoid to put sensitive user informations into your dynamic CSS/JS.
>
> Andrea.
>>
>> Guys,
>>
>> Please advise on the following "feature".
>> There is the following cool ability in wicket:
>>
>> https://cwiki.apache.org/confluence/display/WICKET/Dynamically+Generate+a+CSS+Stylesheet
>>
>> Pretty much the same approach can be used for JavaScript.
>>
>> But it's noted: if try to retrieve URL for dynamically generated CSS
>> or JS after initial load of it by "legal" use - you will receive file
>> with substituted parameters for first user.
>>
>> Is it security issue or just incorrect usage of this feature?
>>
>> Thanks,
>>
>> Ilya
>>
>> -
>> Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.
>>
>> -
>> 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



Security Issue or incorrect usage?

2015-12-30 Thread Илья Нарыжный
Guys,

Please advise on the following "feature".
There is the following cool ability in wicket:
https://cwiki.apache.org/confluence/display/WICKET/Dynamically+Generate+a+CSS+Stylesheet

Pretty much the same approach can be used for JavaScript.

But it's noted: if try to retrieve URL for dynamically generated CSS
or JS after initial load of it by "legal" use - you will receive file
with substituted parameters for first user.

Is it security issue or just incorrect usage of this feature?

Thanks,

Ilya

-
Orienteer(http://orienteer.org) - Modern Data Warehouse for your business.

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



Re: Problem with paged datatable and model

2015-08-19 Thread Илья Нарыжный
Sven,

That's actually done:) I know this problem.
The problem for this particular case is in another place: ajax paging
links needs to know size of IDataProvider's data. And actually wicket
AjaxPagingLink invokes prover and corresponding model for that. So, I
mean, all ways to optimize bahaviour leads to wicket code...

Thanks,

Ilia

2015-08-19 7:47 GMT-07:00 Sven Meier s...@meiers.net:
 Hi,

 in complex apps enable and visiblity can be linked with security settings
 and so on

 this is why you should override #onConfigure() and call #setEnabled() and
 #setVisible() from there.

 Have fun
 Sven



 On 19.08.2015 06:19, Илья Нарыжный wrote:

 Sven,

 Thanks! In my case IDataProvider provides data from DB. And these
 options leads to double query to DB... And that's a little bit
 redundant...
 DataProvider:

 https://github.com/OrienteerDW/wicket-orientdb/blob/master/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/OQueryDataProvider.java

 Do Wicket really need check enabling on every component within
 hasError() method? Maybe somehow mark those components which can have
 messages on it? Or as a workaround: check messages first and only
 after that check for enable and visibility? I think, that it will be
 even more time efficient: in complex apps enable and visiblity can be
 linked with security settings and so on - so for first time it might
 be time consuming.

 Thanks,

 Ilia

 2015-08-16 1:41 GMT-07:00 Sven Meier s...@meiers.net:

 Hi,

 actually this is a known case where you have to call #detach() on your
 model
 by yourself:

onClick() {
  service.delete(rowModel.getObject());

  // let model reload the items
  tableModel.detach();
}

 Alternatively you can change IDataProvider#model() to provide a model,
 which
 can load a single item without loading the whole list of items first.

 Have fun
 Sven



 On 15.08.2015 23:36, Илья Нарыжный wrote:

 Guys,

 Please help to resolve the following problem. There is datatable with
 paging. Table propagated from LoadableDetachableModel. Also table is
 under
 form and contain action (AjaxFormSubmitLink) to remove a row within
 table.

 Problem: load() on the model invoked before actual action performed due
 to
 invoking isEnabled on AjaxPagebleLink in method Form.hasError(). So
 model
 loaded before actual changing of underlying layer.

 For me it looks like an issue in wicket.
 There are not so good work arounds: detach model after action or do not
 use
 LoadableDetachableModel.

 What can you suggest?
 
 Thanks,
 Founder of Modern Data Warehouse: Orienteer
 Ilia Naryzhnyy


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

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



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


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



Re: Problem with paged datatable and model

2015-08-18 Thread Илья Нарыжный
Sven,

Thanks! In my case IDataProvider provides data from DB. And these
options leads to double query to DB... And that's a little bit
redundant...
DataProvider:
https://github.com/OrienteerDW/wicket-orientdb/blob/master/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/OQueryDataProvider.java

Do Wicket really need check enabling on every component within
hasError() method? Maybe somehow mark those components which can have
messages on it? Or as a workaround: check messages first and only
after that check for enable and visibility? I think, that it will be
even more time efficient: in complex apps enable and visiblity can be
linked with security settings and so on - so for first time it might
be time consuming.

Thanks,

Ilia

2015-08-16 1:41 GMT-07:00 Sven Meier s...@meiers.net:
 Hi,

 actually this is a known case where you have to call #detach() on your model
 by yourself:

   onClick() {
 service.delete(rowModel.getObject());

 // let model reload the items
 tableModel.detach();
   }

 Alternatively you can change IDataProvider#model() to provide a model, which
 can load a single item without loading the whole list of items first.

 Have fun
 Sven



 On 15.08.2015 23:36, Илья Нарыжный wrote:

 Guys,

 Please help to resolve the following problem. There is datatable with
 paging. Table propagated from LoadableDetachableModel. Also table is under
 form and contain action (AjaxFormSubmitLink) to remove a row within table.

 Problem: load() on the model invoked before actual action performed due to
 invoking isEnabled on AjaxPagebleLink in method Form.hasError(). So model
 loaded before actual changing of underlying layer.

 For me it looks like an issue in wicket.
 There are not so good work arounds: detach model after action or do not
 use
 LoadableDetachableModel.

 What can you suggest?
 
 Thanks,
 Founder of Modern Data Warehouse: Orienteer
 Ilia Naryzhnyy



 -
 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



Problem with paged datatable and model

2015-08-15 Thread Илья Нарыжный
Guys,

Please help to resolve the following problem. There is datatable with
paging. Table propagated from LoadableDetachableModel. Also table is under
form and contain action (AjaxFormSubmitLink) to remove a row within table.

Problem: load() on the model invoked before actual action performed due to
invoking isEnabled on AjaxPagebleLink in method Form.hasError(). So model
loaded before actual changing of underlying layer.

For me it looks like an issue in wicket.
There are not so good work arounds: detach model after action or do not use
LoadableDetachableModel.

What can you suggest?

Thanks,
Founder of Modern Data Warehouse: Orienteer
Ilia Naryzhnyy


Announcement of Wicket Console library

2014-09-02 Thread Илья Нарыжный
Guys,

Everyday, during our programmer's lifes, we encounter with situations when
we definetly need to hack or check or even fix something on server side. In
this case it's nice to have some console which can help you to execute low
level commands.

Let me present project which is making that possible:
https://github.com/PhantomYdn/wicket-console


I do familliar with Console from Wicketstuff:
https://github.com/wicketstuff/core/wiki/Console

But from my perspective, this library has quite significant advantages:

1) It's really small: almost 25 kB
2) No dependencies on huge scripting libraries: just internal JVM
JavaScript Engine
3) Ajax enabled
4) Contextual: if you executed x=10, next time when you will execute x
it will return 10
5) Embedded into Wicket DebugBar: just add library into your project and
enable wicket DebugBar

Will be happy if this lib can save some your time! Appriciate any feedbacks.

Thank you for attention!

Ilia


Wicket related projects news/announcements

2014-08-23 Thread Илья Нарыжный
Guys,

Could you please advise: is there some resource or email group related to
Apache Wicket where announcements about new wicket-related/based projects
can be published?

I have several opensource projects related to Wicket and it will be nice to
have ability to send some news about them to people who is interested in
using of Wicket in their projects.

Thanks,

Ilia


Re: Stateless/Statefull pages - incorrect behaviour

2014-05-05 Thread Илья Нарыжный
Hi, Martin and Wicket users!

Issue has been created and quickstart has been attached.
https://issues.apache.org/jira/browse/WICKET-5578

Thanks!


2014-05-05 0:17 GMT+04:00 Martin Grigorov mgrigo...@apache.org:

 Hi,

 Please create a ticket and attach the quickstart.
 Thanks!

 Martin Grigorov
 Wicket Training and Consulting


 On Sat, Apr 26, 2014 at 5:08 PM, Илья Нарыжный phan...@ydn.ru wrote:

  Guys,
 
  Please advise how to do in following situation or confirm that's a bug
 and
  should be fixed.
 
  There is a page (login page) with stateless form. That page has lots of
  common components (menu and etc.). There are some statefull components in
  the components tree that are visible only for signed in users: but once
  user isn't signed in - that components are hidden. That's why page is
  becoming stateless (no visible components) and form prepared
  correspondingly. But when form data is submitted: during obtaining of
 form
  component to process request - wicket things that page actually is
  statefull. As a result - page've been recreated and fully rendered -
  instead of processing of the form.
 
  There is a workaround: setStatelessHint(false). But imho reason is a
 little
  bit another:
  1) After constuction of page: page is statefull - because of some
 statefull
  components are in the tree.
  2) After initialization of page: page is still statefull - because there
  are that statefull components
  3) After configuratoin of page (method onConfigure) - page is becoming
  stateless - because all statefull components marked as invisible.
  4) Form has been rendered as stateless - with no version number is in the
  URL.
  5) Page can'be reconstructed correctly because of p.1 and p.2
 
  I think that stateless flag should be precalculated right after
  initialization step and should be changed due to some stuff in
  configuration methods.
 
  What do you think?
 
  If you wish I can create issue on jira and attach quick start.
 
  Ilia
 



Stateless/Statefull pages - incorrect behaviour

2014-04-26 Thread Илья Нарыжный
Guys,

Please advise how to do in following situation or confirm that's a bug and
should be fixed.

There is a page (login page) with stateless form. That page has lots of
common components (menu and etc.). There are some statefull components in
the components tree that are visible only for signed in users: but once
user isn't signed in - that components are hidden. That's why page is
becoming stateless (no visible components) and form prepared
correspondingly. But when form data is submitted: during obtaining of form
component to process request - wicket things that page actually is
statefull. As a result - page've been recreated and fully rendered -
instead of processing of the form.

There is a workaround: setStatelessHint(false). But imho reason is a little
bit another:
1) After constuction of page: page is statefull - because of some statefull
components are in the tree.
2) After initialization of page: page is still statefull - because there
are that statefull components
3) After configuratoin of page (method onConfigure) - page is becoming
stateless - because all statefull components marked as invisible.
4) Form has been rendered as stateless - with no version number is in the
URL.
5) Page can'be reconstructed correctly because of p.1 and p.2

I think that stateless flag should be precalculated right after
initialization step and should be changed due to some stuff in
configuration methods.

What do you think?

If you wish I can create issue on jira and attach quick start.

Ilia


Re: OT: good java hosting

2014-01-17 Thread Илья Нарыжный
I also recommend to take a look to this: http://jelastic.com (about
platform: http://docs.jelastic.com)
It's  platform for horizontal and vertical scalling (like apache WS).

Ilia

2014/1/16 Ernesto Reinaldo Barreiro reier...@gmail.com

 Thanks to all for replays!


 On Fri, Jan 17, 2014 at 12:32 AM, Sebastien seb...@gmail.com wrote:

  Hi again Ernesto,
 
  If you are looking for a paying solution, you also have this one with
 your
  own server (hosted by the main internet provider in France)
 
  http://www.online.net/en/dedicated-server/dedibox-scg2
  http://www.online.net/en/dedicated-server/dedibox-classic
 
  It include a 10Go backup storage, availability rate 99,9%, unrestricted
  traffic, 150Mbit/s
  I am customer since several years. Never had any problem...
 
  Best regards,
  Sebastien.
 
 
 
  On Thu, Jan 16, 2014 at 9:50 PM, Josh Kamau joshnet2...@gmail.com
 wrote:
 
   look at this too https://www.*digitalocean*.com/
  
  
   On Thu, Jan 16, 2014 at 11:17 PM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
My current hosting is not very expensive and it was working OK for
  quite
   a
long time. But recently  I have got complaints from users about down
   times.
Right now server has been down for a day and their support team has
   failed
to give me a proper answer/fix. They already claimed everything was
  fixed
and asked me to re-install everything, which was
  annoying/disappointing,
just to discover, a few minutes ago, that old problem still remains.
  I'm
willing to pay a bit more and have satisfied customers.
   
Thanks!
   
On Thu, Jan 16, 2014 at 9:07 PM, Jesus Mireles toxi...@gmail.com
   wrote:
   
 I've been using myhosting.com.  I'm not going to claim they are
 the
 greatest, but I havent had problems with uptime, speed or price.  I
   stick
 to custom VPS.


 On Thu, Jan 16, 2014 at 1:58 PM, Brown, Berlin [PRI-1PP] 
 berlin.br...@primerica.com wrote:

  It is a little pricey.  But I prefer linode for virtual hosting.
   And
 they
  have good docs on tomcat configuration
 
  -Original Message-
  From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Sent: Thursday, January 16, 2014 9:55 AM
  To: users@wicket.apache.org
  Subject: Re: OT: good java hosting
 
  Dank je wel!
 
 
  On Thu, Jan 16, 2014 at 3:52 PM, Thomas Matthijs 
 li...@selckin.be
  
 wrote:
 
   hetzner.de
  
  
   On Thu, Jan 16, 2014 at 3:50 PM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
Danje wel,
   
Bijvoorbeeld?
   
Thanks!
   
   
On Thu, Jan 16, 2014 at 3:43 PM, Thomas Matthijs 
   li...@selckin.be

   wrote:
   
 On Thu, Jan 16, 2014 at 2:54 PM, Ernesto Reinaldo Barreiro
 
 reier...@gmail.com wrote:

  Apologies for the OT message... but I value the opinion
 of
  people in
this
  list.
 
  Can you suggest a good place to host Wicket applications?
  I'm
   hosting a
  couple of them somewhere I'm NOT very satisfied with
  service
   provided.
 
  I started to compare offers myself... but a bit of help
 on
   that
direction
  will be appreciated.
 
  1- Applications are not very resource/traffic intensive.
 
  2- Quality of support/up time should be good.

  3- Just need any relational database.
 

 A cheapish dedicated server might be ideal for this, (and
 way
 cheaper
then
 anything that even hits at cloud)
 For 50eur/month you can have 32gb ram quad core i7s

 mvg,

   
   
   
--
Regards - Ernesto Reinaldo Barreiro
   
  
 
 
 
  --
  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
   
  
 



 --
 Regards - Ernesto Reinaldo Barreiro



Re: Best way to do authentication in external system

2014-01-16 Thread Илья Нарыжный
But there is one big disadvantage of variant 4 (actually variant 1
partially has this one too):
Authentication should performed only when user steps to some secured page.
And it's not a way to separate secured and unsecured pages by url, because
it might be dynamic. Filter can't be aware of what's secured in Wicket and
what is not.

Assuming this: what would be your suggetions?

P.S. I have implemented that with the aid of variant 3. And it works good.

Thanks,

Ilia


2014/1/16 Dmitriy Neretin dmitriy.nere...@googlemail.com

 I think the 4-th option will be the best way to do it. As an external
 solution you can consider Spring Security or Apache Shiro


 2014/1/16 Martin Grigorov mgrigo...@apache.org

  Hi,
 
  4) Add a Servlet Filter *before* WicketFilter in web.xml
  The new filter will check whether there is an authenticated user or not
 and
  do whatever is needed
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Thu, Jan 16, 2014 at 9:29 AM, Илья Нарыжный phan...@ydn.ru wrote:
 
   Guys,
  
   Please advice me. What's the best way to implement authentication in
   external system(support of Single Sign On)? I know 3 variants, but
 all
  of
   them have different pros and cons.
  
   1) Implement your own IRequestCycleListener. You are intercepting all
   requests, finding out those that should be authenticated externally and
   proceeed with proper operations (commonly redirect to external system).
   2) Implement of IREquestMapper. HttpsMapper can be taken as some kind
 of
   example.
   3) Override restartResponseAtSignInPage() and redirect to external
 system
   if required.
  
   So, what is the best one? May be you know more variants?
  
   Thanks,
  
   Ilia
  
 



Best way to do authentication in external system

2014-01-15 Thread Илья Нарыжный
Guys,

Please advice me. What's the best way to implement authentication in
external system(support of Single Sign On)? I know 3 variants, but all of
them have different pros and cons.

1) Implement your own IRequestCycleListener. You are intercepting all
requests, finding out those that should be authenticated externally and
proceeed with proper operations (commonly redirect to external system).
2) Implement of IREquestMapper. HttpsMapper can be taken as some kind of
example.
3) Override restartResponseAtSignInPage() and redirect to external system
if required.

So, what is the best one? May be you know more variants?

Thanks,

Ilia


AbstractAutoCompleteRenderer.getOnSelectJavaScriptExpression problem

2013-08-29 Thread Илья Нарыжный
Guys,

I'm using Wicket 6.7 and I stack with following problem:

I need to send AJAX request back to server once autocomplete variant has
been selected. I thought to use getOnSelectJavaScriptExpression to add
required AJAX call, but it's not possible simply obtain required
callbackUrl from that method of renderer. Please help me implement required
function.

P.S Making AJAX on onUpdate of initial form is sutable for my case.


Recommendation service for form components

2013-07-13 Thread Илья Нарыжный
Hello,

Please advise me how following feature can be implemented in beloved Wicket:

We have a lot of forms and most of form components are used for configuring
of subsequent outputs: graphics, tables, etc. So this forms components are
used for output configuration. And it will be nice if such form components
can remember their last state among different pages and requests.

I have two variants:
1) Bind to every required form component model which related to user
WebSession.
2) Implement behavior which can fix formcomponent model: of there is no
value - behavior should set some default value. And also: after changing of
component value this behavior should store new value as default.

What r your recommendations? Might be there more elegant way...

Thanks,

Ilia


Re: Recommendation service for form components

2013-07-13 Thread Илья Нарыжный
It's not a problem. I can serialize default values to any required place.
But I want to implement that in elegant way. Idea with Behavior seams to me
quite elegant, but I didn't find way to intercept last value of the form
component.


2013/7/14 Paul Bors p...@bors.ws

 Sorry, by slow down I mean it would serialize all those model objects under
 the session for no reason.
 It will eat up a lot of memory unnecessary.

 Try to add the DebugBar to the parent of all your pages so you can track
 the
 session's memory consumption:

 http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/markup/ht
 ml/panel/class-use/Panel.html#org.apache.wicket.devutils.debugbar

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Paul Bors [mailto:p...@bors.ws]
 Sent: Sunday, July 14, 2013 1:11 AM
 To: users@wicket.apache.org
 Subject: RE: Recommendation service for form components

 Why not persist to a db via Hibernate and Spring per say?
 Saving all this to the session would slow down your web server
 considerably.

 You can also use cookies if you'd like, but that's not going to work if the
 user has them turned off.

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Илья Нарыжный [mailto:phan...@ydn.ru]
 Sent: Saturday, July 13, 2013 12:54 PM
 To: users@wicket.apache.org
 Subject: Recommendation service for form components

 Hello,

 Please advise me how following feature can be implemented in beloved
 Wicket:

 We have a lot of forms and most of form components are used for configuring
 of subsequent outputs: graphics, tables, etc. So this forms components are
 used for output configuration. And it will be nice if such form components
 can remember their last state among different pages and requests.

 I have two variants:
 1) Bind to every required form component model which related to user
 WebSession.
 2) Implement behavior which can fix formcomponent model: of there is no
 value - behavior should set some default value. And also: after changing of
 component value this behavior should store new value as default.

 What r your recommendations? Might be there more elegant way...

 Thanks,

 Ilia



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




Is there SmartFormComponent available?

2013-05-20 Thread Илья Нарыжный
Hello,

We have following situation: entity can have value of various type:
boolean, enum, number and etc. And it'll be nice to have some
SmartFormComponent which can show required representation of UI according
to type: radio button, checkbox, etc. Is there something lika that
available?

I understand, that to implement of this component in Wicket is pretty
simple, but don't want reinvent the wheel.:)

Thanks,

Ilia


Re: Dynamic Session.style

2013-05-07 Thread Илья Нарыжный
Hi,

We use different approach than styles and variations.
We have GenericPage with following definition:
public abstract class GenericPageK extends Serializable extends
EntityPageK implements IMarkupResourceStreamProvider,
IMarkupCacheKeyProvider

Then in public IResourceStream getMarkupResourceStream(final
MarkupContainer container, java.lang.Class? containerClass) we can
substite any required design of the page dynamically, for example we
have: XXXWebApplication.get().getDesignSupplier().getDesign()

Also, all our pages are inherited from GenericPage. By the way that's give
us interesting feature: we can have pages for viewing/editing common
entities like User/Page/MenuItem/Category and etc. But later simply
include that pages into design of new site by returning in getDesign()
required design for this particular site. So we have generic JAR with all
core related things: entities/view and edit page and etc: and we don't need
to introduce changes for common pages in any particular project which use
this generic JAR.

Thanks,

Ilia




2013/5/6 Martin Grigorov mgrigo...@apache.org

 Hi,

 You can use variations instead.
 Each special page can override #getVariation().


 On Fri, May 3, 2013 at 7:27 PM, Allen Gilbert allen.gilb...@doane.edu
 wrote:

  If locale and/or style are determined by a user-configurable setting,
  then yes, I agree that all pages should be affected by it. However,
  we're trying to differentiate styles between pages viewed within the
  same session. I'm guessing that Session.style was designed to be set
  once, not dynamically...
 
  On Fri, May 3, 2013 at 11:55 AM, Paul Bors p...@bors.ws wrote:
   But isn't that normal behavior?
  
   Consider localization alone and setting the user's language in a
 session.
   If the user logs in and uses English and then opens a new tab (same
  session)
   and choose Spanish, going back to the first tab and refreshing the page
   should be in Spanish.
  
   Same for you. What you need to do is create a new session for the
 second
  tab
   in order to treat them separate.
  
   ~ Thank you,
 Paul Bors
  
   -Original Message-
   From: Allen Gilbert [mailto:allen.gilb...@doane.edu]
   Sent: Friday, May 03, 2013 12:48 PM
   To: users
   Subject: Dynamic Session.style
  
   We are adding some new pages to our application that we'd like to style
   differently from existing ones. We also want to reuse Panels we've
  built, so
   we're employing the Style mechanism outlined in
  
 
 https://cwiki.apache.org/confluence/display/WICKET/Localization+and+Skinning
   +of+Applications.
  
   We have two different base pages for the separate styles, and in each
  base
   page constructor, we set the proper Session.style. This works fine, but
   doesn't seem like the best approach, and now we've discovered a problem
  with
   it.
  
   Say a user lands on page A with style A (the default style), then opens
  page
   B with style B in a new tab. After looking at page B for a bit, the
 user
   goes back to the tab with page A. The user clicks an AjaxLink that
 should
   display an InfoPanel. InfoPanel can be used with both styles, so it has
  two
   markup files: InfoPanel.html, and InfoPanel_B.html. Unfortunately,
  because
   page B was the last page to set Session.style, InfoPanel_B.html is
  loaded,
   even though the user is on page A.
  
   Any suggestions on how to solve this problem? The first thing that came
  to
   my mind was to create an AbstractRequestCycleListener subclass that
 could
   properly set Session.style for each request, but I'm not sure if
 that's a
   good idea.
  
   Thanks for your help!
  
   -Allen
  
   -
   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
 
 


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



Change signature of AbstractTree or Model.ofSet

2013-05-05 Thread Илья Нарыжный
Hello,

I have following problem in wicket 6 with trees:
Constructor of
class org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree
have following signature:
protected AbstractTree(String id, ITreeProviderT provider, IModelSetT
state)
The problem is in IModelSetT state argument and fact that Model.ofSet
return IModelSet? extends C, so it's not possible directly pass
IModelSet? extends C to constructor. It seems that either Model.ofSet
should be changed or AbstractTree.

What do you think?

Regards,

Ilia


Re: Wicket as Jboss Modules

2012-06-13 Thread Илья Нарыжный
Finally I did it!
As jboss module I created 2 modules: wicket and wicketstuff. Configuration:

?xml version=1.0 encoding=UTF-8?
module xmlns=urn:jboss:module:1.0 name=org.apache.wicket
   resources
   resource-root path=wicket-core-1.5.7.jar/
   resource-root path=wicket-request-1.5.7.jar/
   resource-root path=wicket-auth-roles-1.5.7.jar/
   resource-root path=wicket-extensions-1.5.7.jar/
   resource-root path=wicket-datetime-1.5.7.jar/
   resource-root path=wicket-util-1.5.7.jar/
   /resources
   dependencies
  module name=org.apache.commons.collections/
  module name=javaee.api/
  module name=org.jboss.logging/
  module name=org.jboss.as.web/
  module name=org.slf4j/
   /dependencies
/module

and

?xml version=1.0 encoding=UTF-8?
module xmlns=urn:jboss:module:1.0 name=org.wicketstuff
   resources
   resource-root path=wicketstuff-autocomplete-tagit-1.5.5.jar/
   resource-root path=wicketstuff-tinymce-1.5.5.jar/
   resource-root path=jazzy-0.5.2-rtext-1.4.1.jar/
   /resources
   dependencies
  module name=org.apache.commons.collections/
  module name=org.apache.wicket/
  module name=org.slf4j/
  !--module name=org.springframework export=true/--
   /dependencies
/module

But I found that wicketstuff-anotation can't be organized as a module
because in class org.wicketstuff.config.MatchingResources in method
getClass page class is constructed in current classloader. I would
like to recommend to rewrite this class in a way when classloader for
corresponding initial application is used.

Thanks,

Ilia

2012/6/13 Martin Grigorov mgrigo...@apache.org:
 Good point!
 https://issues.apache.org/jira/browse/WICKET-4604

 On Wed, Jun 13, 2012 at 9:31 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 we have to be sure we do not use any static fields anywhere in the
 code...it's not just the singletons that break this use case. eg we do not
 want caches to be shared across applications because it's not performant
 and can result in cross application object leakage.

 -igor

 On Tuesday, June 12, 2012, Martin Grigorov wrote:

 Hi,

 Wicket uses ThreadLocal for the Application, Session and RequestCycle.
 There are no JVM singletons.

 Some people are against putting jars in the shared lib folder. I
 personally see the benefit and I'd do it if I need to
 If you use shared jars then make sure that none of the applications
 provide these jars or another version of them because in this case you
 will see some ClassLoader related problems, e.g.: ClassCastException:
 o.a.w.Session class is not o.a.w.Session.

 On Tue, Jun 12, 2012 at 11:04 PM, Martin Sachs 
 sachs.mar...@gmail.comjavascript:;
 wrote:
  Hello,
 
  i think that is in general not a good idea. If you deploy the wicket-lib
  outside the war and run multiple Wicket-Applications, then you could not
 use
  all applications, because wicket stores (as far as i know) e.g. the
  application instance in a static field. There is one application per
  WAR-deployment with wicket, but if you use the libs from ear/lib or
 modules
  there will be only one application.
 
  best
  Martin
 
  Илья Нарыжный schrieb:
 
  Hello,
 
  I have several projects which use wicket and various wicket sun-modules.
  Every project (*.ear file) took about 10Mb and about 8Mb is for wicket
  libraries.
  Recently I have move my projects to Jboss AS 7 and now I'm thinking
  about putting all wicket related jars to JBOSS_HOME/modules.
 
  Have anyone tried that? Do you have some suggestions for Jboss module
  structure for this?
  It will be great to have
 
  IMPLICIT(
 https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments
 )
  deploy of wicket related jars to the project.
 
  Thanks,
 
  Ilia
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: 
  users-h...@wicket.apache.orgjavascript:;
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: 
  users-h...@wicket.apache.orgjavascript:;
 



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

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





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

Wicket as Jboss Modules

2012-06-12 Thread Илья Нарыжный
Hello,

I have several projects which use wicket and various wicket sun-modules.
Every project (*.ear file) took about 10Mb and about 8Mb is for wicket
libraries.
Recently I have move my projects to Jboss AS 7 and now I'm thinking
about putting all wicket related jars to JBOSS_HOME/modules.

Have anyone tried that? Do you have some suggestions for Jboss module
structure for this?
It will be great to have
IMPLICIT(https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments)
deploy of wicket related jars to the project.

Thanks,

Ilia

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



setRenderBodyOnly(true) doesn't work for label in title

2012-02-20 Thread Илья Нарыжный
Hello,

I have following code in HTML:

titlespan wicket:id=pagetitle/wicket:message
key=site.title.suffix/wicket:message/title

and in Java:

add(new Label(pagetitle, titleModel).setRenderBodyOnly(true));

But as output on page, I have following title:

 titlespanActual title here/spansite suffix/title

It seems to be a bug... Wicket version is 1.5.4

Is it a bug and Jira ticket should be created?

Thanks,

Ilia

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



Re: StringValue.toOptionalLong incorrect behavior

2011-12-20 Thread Илья Нарыжный
Hello,

Up this topic. Are you planning to fix this functionality with
toOptionalString?

Thanks,

Ilis

2011/11/16 vineet semwal vineetsemwal1...@gmail.com

  yeah not needed for toOptionalString() but why not for
 toOptionalBoolean()?

 On Wed, Nov 16, 2011 at 3:39 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  Hi,
 
  On Wed, Nov 16, 2011 at 11:50 AM, vineet semwal
  vineetsemwal1...@gmail.com wrote:
  martin i too think tooptionalMethods in StringValue should behave the
  way llia is saying ie. they should return null if text is empty or
  null..
 
  Hm. Not quite convinced.
  ?a=bc=e=f is a valid query string and 'c' has value  while 'g' has
 null
 
  maybe just some of toOptionalXyz() methods should use Strings.isEmpty()
  e.g. toOptionalString() and toOptionalBoolean() should not check for 
 
  for eg. currently  public final Long toOptionalLong() throws
  StringValueConversionException
 {
 return (text == null) ? null : toLongObject();
 }
 
  can be changed to
   public final Long toOptionalLong() throws
 StringValueConversionException
 {
 return (Strings.isEmpty(text)) ? null : toLongObject();
 }
 
  On Wed, Nov 16, 2011 at 2:57 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  Hi,
 
  At least this is what the javadoc says:
  Convert to object types, returning null if text is null.
 
  I think the more appropriate method for you is
  org.apache.wicket.util.string.StringValue.toLong(long) but it also
  throws exceptions if the provided value is empty string.
 
  On Wed, Nov 16, 2011 at 11:00 AM, Илья Нарыжный phan...@ydn.ru
 wrote:
  Hello,
 
  I have page mounted as @MountPath(/page/#{pageId})
 
  Also I have following code:
 
  public ViewPagePage(PageParameters params)
 {
 this(getEntityPkFor(params, Page.class, 1)); //1 - is default
 ID if
  PK in url was not found
 }
 
  and:
 
  protected static Long getEntityPkFor(PageParameters params, Class
 clazz,
  Long defaultPk)
 {
 String pkFieldName =
 EntitiesDescriptor.get().getPkFieldName(clazz);
 Long ret=null;
 if(pkFieldName!=null)
 {
 ret = params.get(pkFieldName).toOptionalLong();
 }
 if(ret==null)
 {
 ret = params.get(id).toOptionalLong();
 }
 return ret==null?defaultPk:ret;
 }
 
  But(!!!) if ID was not put to the URL I have following Exception:
 
  Caused by:
 org.apache.wicket.util.string.StringValueConversionException:
  Unable
  to convert '' to a Long value
 at
  org.apache.wicket.util.string.StringValue.toLongObject(StringValue.ja
  va:589)
 at
  org.apache.wicket.util.string.StringValue.toOptionalLong(StringValue.
  java:657)
 at ru.ydn.wicket.EntityPage.getEntityPkFor(EntityPage.java:57)
 at ru.ydn.wicket.web.ViewPagePage.init(ViewPagePage.java:84)
 ... 37 more
  Caused by: java.lang.NumberFormatException: For input string: 
 at
  java.lang.NumberFormatException.forInputString(NumberFormatException.
  java:48)
 at java.lang.Long.parseLong(Long.java:431)
 at java.lang.Long.init(Long.java:678)
 at
  org.apache.wicket.util.string.StringValue.toLongObject(StringValue.ja
  va:585)
 
  The problem in following code:
 
  public final Long toOptionalLong() throws
 StringValueConversionException
 {
 return (text == null) ? null : toLongObject();
 }
 
  text should be checked for emptiness - not only null
 
  What do you think?
 
  Thanks,
 
  Ilia
 
 
 
 
  --
  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
 
 
 
 
 
  --
  thank you,
 
  regards,
  Vineet Semwal
 
  -
  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
 
 



 --
 thank you,

 regards,
 Vineet Semwal

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




Re: StringValue.toOptionalLong incorrect behavior

2011-12-20 Thread Илья Нарыжный
OK:)
Please find it here:
https://issues.apache.org/jira/browse/WICKET-4309

Thank you!
Regards,
Ilia

2011/12/20 Martin Grigorov mgrigo...@apache.org

 Ticket please!

 2011/12/20 Илья Нарыжный phan...@ydn.ru:
  Hello,
 
  Up this topic. Are you planning to fix this functionality with
  toOptionalString?
 
  Thanks,
 
  Ilis
 
  2011/11/16 vineet semwal vineetsemwal1...@gmail.com
 
   yeah not needed for toOptionalString() but why not for
  toOptionalBoolean()?
 
  On Wed, Nov 16, 2011 at 3:39 PM, Martin Grigorov mgrigo...@apache.org
  wrote:
   Hi,
  
   On Wed, Nov 16, 2011 at 11:50 AM, vineet semwal
   vineetsemwal1...@gmail.com wrote:
   martin i too think tooptionalMethods in StringValue should behave the
   way llia is saying ie. they should return null if text is empty or
   null..
  
   Hm. Not quite convinced.
   ?a=bc=e=f is a valid query string and 'c' has value  while 'g' has
  null
  
   maybe just some of toOptionalXyz() methods should use
 Strings.isEmpty()
   e.g. toOptionalString() and toOptionalBoolean() should not check for
 
  
   for eg. currently  public final Long toOptionalLong() throws
   StringValueConversionException
  {
  return (text == null) ? null : toLongObject();
  }
  
   can be changed to
public final Long toOptionalLong() throws
  StringValueConversionException
  {
  return (Strings.isEmpty(text)) ? null :
 toLongObject();
  }
  
   On Wed, Nov 16, 2011 at 2:57 PM, Martin Grigorov 
 mgrigo...@apache.org
  wrote:
   Hi,
  
   At least this is what the javadoc says:
   Convert to object types, returning null if text is null.
  
   I think the more appropriate method for you is
   org.apache.wicket.util.string.StringValue.toLong(long) but it also
   throws exceptions if the provided value is empty string.
  
   On Wed, Nov 16, 2011 at 11:00 AM, Илья Нарыжный phan...@ydn.ru
  wrote:
   Hello,
  
   I have page mounted as @MountPath(/page/#{pageId})
  
   Also I have following code:
  
   public ViewPagePage(PageParameters params)
  {
  this(getEntityPkFor(params, Page.class, 1)); //1 - is
 default
  ID if
   PK in url was not found
  }
  
   and:
  
   protected static Long getEntityPkFor(PageParameters params, Class
  clazz,
   Long defaultPk)
  {
  String pkFieldName =
  EntitiesDescriptor.get().getPkFieldName(clazz);
  Long ret=null;
  if(pkFieldName!=null)
  {
  ret = params.get(pkFieldName).toOptionalLong();
  }
  if(ret==null)
  {
  ret = params.get(id).toOptionalLong();
  }
  return ret==null?defaultPk:ret;
  }
  
   But(!!!) if ID was not put to the URL I have following Exception:
  
   Caused by:
  org.apache.wicket.util.string.StringValueConversionException:
   Unable
   to convert '' to a Long value
  at
  
 org.apache.wicket.util.string.StringValue.toLongObject(StringValue.ja
   va:589)
  at
  
 org.apache.wicket.util.string.StringValue.toOptionalLong(StringValue.
   java:657)
  at
 ru.ydn.wicket.EntityPage.getEntityPkFor(EntityPage.java:57)
  at
 ru.ydn.wicket.web.ViewPagePage.init(ViewPagePage.java:84)
  ... 37 more
   Caused by: java.lang.NumberFormatException: For input string: 
  at
  
 java.lang.NumberFormatException.forInputString(NumberFormatException.
   java:48)
  at java.lang.Long.parseLong(Long.java:431)
  at java.lang.Long.init(Long.java:678)
  at
  
 org.apache.wicket.util.string.StringValue.toLongObject(StringValue.ja
   va:585)
  
   The problem in following code:
  
   public final Long toOptionalLong() throws
  StringValueConversionException
  {
  return (text == null) ? null : toLongObject();
  }
  
   text should be checked for emptiness - not only null
  
   What do you think?
  
   Thanks,
  
   Ilia
  
  
  
  
   --
   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
  
  
  
  
  
   --
   thank you,
  
   regards,
   Vineet Semwal
  
   -
   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
  
  
 
 
 
  --
  thank you,
 
  regards,
  Vineet Semwal
 
  -
  To unsubscribe, e-mail: users-unsubscr

Inclusion of script in wicket:head and AJAX

2011-11-29 Thread Илья Нарыжный
Hello,

I have following code in my wicket component:
wicket:head
script type=text/javascript src=http://www.google.com/jsapi;/script
/wicket:head

Everything is OK if component is visible from the begining. But if
component is enabled by AJAX, I have following in the logs:

*INFO: *
Initiating Ajax POST request on
1?3-1.IBehaviorListener.0-form-mbkViewrandom=0.5660016379886397
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (2739 characters)
*INFO: *
?xml version=1.0
encoding=UTF-8?ajax-responseheader-contribution![CDATA[head
xmlns:wicket=
http://wicket.apache.org;
script type=text/javascript src=http://www.google.com/jsapi;/script
/head]]/header-contributioncomponent id=dataHolder1f
![CDATA[div id=dataHolder1f
div
div id=chart_div/div
/div
/div]]/componentevaluate
encoding=wicket1.../evaluate/ajax-response
*INFO: *Response parsed. Now invoking steps...
*INFO: *
*INFO: *Initiating Ajax GET request on http://www.google.com/jsapi
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (0 characters)
*INFO: *Invoking post-call handler(s)...
*INFO: *returned focused element: [object HTMLSelectElement]
*INFO: *returned focused element: [object HTMLSelectElement]
*ERROR: *
Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
ReferenceError: google is not defined
*INFO: *Response processed successfully.

And in console:

Request:

OPTIONS /jsapi HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0

Response:

HTTP/1.1 405 Method Not Allowed
Content-Length: 0
Content-Type: text/html
Date: Tue, 29 Nov 2011 13:40:26 GMT
Server: GFE/2.0


So, why wicket needs in OPTIONS for script inclusion? Can I somehow
disable that kind of request?

Thanks,

Ilia


Re: Inclusion of script in wicket:head and AJAX

2011-11-29 Thread Илья Нарыжный
Martin,

Thank you, but in Wicket 1.5.3 browser come to some inconsistent state
after that.

1) Browser fully redirected to google js page
2) In logs I have:
Wicket is not defined
Wicket.Log.error(Wicket.FunctionsExecuter.processNext:  + e);

Thanks,

Ilia


2011/11/29 Martin Grigorov mgrigo...@apache.org

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

 On Tue, Nov 29, 2011 at 3:20 PM, Илья Нарыжный phan...@ydn.ru wrote:
  Hello,
 
  I have following code in my wicket component:
  wicket:head
  script type=text/javascript src=http://www.google.com/jsapi
 /script
  /wicket:head
 
  Everything is OK if component is visible from the begining. But if
  component is enabled by AJAX, I have following in the logs:
 
  *INFO: *
  Initiating Ajax POST request on
  1?3-1.IBehaviorListener.0-form-mbkViewrandom=0.5660016379886397
  *INFO: *Invoking pre-call handler(s)...
  *INFO: *Received ajax response (2739 characters)
  *INFO: *
  ?xml version=1.0
  encoding=UTF-8?ajax-responseheader-contribution![CDATA[head
  xmlns:wicket=
  http://wicket.apache.org;
  script type=text/javascript src=http://www.google.com/jsapi
 /script
  /head]]/header-contributioncomponent id=dataHolder1f
 ![CDATA[div id=dataHolder1f
 div
  div id=chart_div/div
  /div
  /div]]/componentevaluate
  encoding=wicket1.../evaluate/ajax-response
  *INFO: *Response parsed. Now invoking steps...
  *INFO: *
  *INFO: *Initiating Ajax GET request on http://www.google.com/jsapi
  *INFO: *Invoking pre-call handler(s)...
  *INFO: *Received ajax response (0 characters)
  *INFO: *Invoking post-call handler(s)...
  *INFO: *returned focused element: [object HTMLSelectElement]
  *INFO: *returned focused element: [object HTMLSelectElement]
  *ERROR: *
  Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
  ReferenceError: google is not defined
  *INFO: *Response processed successfully.
 
  And in console:
 
  Request:
 
  OPTIONS /jsapi HTTP/1.1
  Host: www.google.com
  User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101
 Firefox/8.0
 
  Response:
 
  HTTP/1.1 405 Method Not Allowed
  Content-Length: 0
  Content-Type: text/html
  Date: Tue, 29 Nov 2011 13:40:26 GMT
  Server: GFE/2.0
 
 
  So, why wicket needs in OPTIONS for script inclusion? Can I somehow
  disable that kind of request?
 
  Thanks,
 
  Ilia
 



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




Re: Inclusion of script in wicket:head and AJAX

2011-11-29 Thread Илья Нарыжный
Issue with redirect it seems to be some particular issue with:
http://code.google.com/apis/loader/
Espessialy with google.load function. That seems to be solved by forming
URL in following way:

https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22corechart%22%5D%7D%5D%7D

I mean autoloading feature.
But in case of AJAX there is some more issue:

Script mentioned above was loaded later than script loaded as:

response.renderOnDomReadyJavaScript(script);

And unfortunatly that leads to JavaScript error in last script, because it
depends upon previous (that still haven't been loaded).

P.S. Google API have feature to invoke some function by name after loading.
Now I'm trying to use it as workaround: but there is some problem: if
google jsapi was alredy loaded - my function doesn't invoked...
Thanks,

Ilia

2011/11/29 Martin Grigorov mgrigo...@apache.org

 Ticket + quickstart.

 We load .js resources from CDN in our app and there are no problems.

 2011/11/29 Илья Нарыжный phan...@ydn.ru:
  Martin,
 
  Thank you, but in Wicket 1.5.3 browser come to some inconsistent state
  after that.
 
  1) Browser fully redirected to google js page
  2) In logs I have:
  Wicket is not defined
  Wicket.Log.error(Wicket.FunctionsExecuter.processNext:  + e);
 
  Thanks,
 
  Ilia
 
 
  2011/11/29 Martin Grigorov mgrigo...@apache.org
 
  https://issues.apache.org/jira/browse/WICKET-4092
 
  On Tue, Nov 29, 2011 at 3:20 PM, Илья Нарыжный phan...@ydn.ru wrote:
   Hello,
  
   I have following code in my wicket component:
   wicket:head
   script type=text/javascript src=http://www.google.com/jsapi
  /script
   /wicket:head
  
   Everything is OK if component is visible from the begining. But if
   component is enabled by AJAX, I have following in the logs:
  
   *INFO: *
   Initiating Ajax POST request on
   1?3-1.IBehaviorListener.0-form-mbkViewrandom=0.5660016379886397
   *INFO: *Invoking pre-call handler(s)...
   *INFO: *Received ajax response (2739 characters)
   *INFO: *
   ?xml version=1.0
   encoding=UTF-8?ajax-responseheader-contribution![CDATA[head
   xmlns:wicket=
   http://wicket.apache.org;
   script type=text/javascript src=http://www.google.com/jsapi
  /script
   /head]]/header-contributioncomponent id=dataHolder1f
  ![CDATA[div id=dataHolder1f
  div
   div id=chart_div/div
   /div
   /div]]/componentevaluate
   encoding=wicket1.../evaluate/ajax-response
   *INFO: *Response parsed. Now invoking steps...
   *INFO: *
   *INFO: *Initiating Ajax GET request on http://www.google.com/jsapi
   *INFO: *Invoking pre-call handler(s)...
   *INFO: *Received ajax response (0 characters)
   *INFO: *Invoking post-call handler(s)...
   *INFO: *returned focused element: [object HTMLSelectElement]
   *INFO: *returned focused element: [object HTMLSelectElement]
   *ERROR: *
   Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
   ReferenceError: google is not defined
   *INFO: *Response processed successfully.
  
   And in console:
  
   Request:
  
   OPTIONS /jsapi HTTP/1.1
   Host: www.google.com
   User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101
  Firefox/8.0
  
   Response:
  
   HTTP/1.1 405 Method Not Allowed
   Content-Length: 0
   Content-Type: text/html
   Date: Tue, 29 Nov 2011 13:40:26 GMT
   Server: GFE/2.0
  
  
   So, why wicket needs in OPTIONS for script inclusion? Can I somehow
   disable that kind of request?
  
   Thanks,
  
   Ilia
  
 
 
 
  --
  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
 
 
 



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




StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread Илья Нарыжный
Hello,

I have page mounted as @MountPath(/page/#{pageId})

Also I have following code:

public ViewPagePage(PageParameters params)
{
this(getEntityPkFor(params, Page.class, 1)); //1 - is default ID if
PK in url was not found
}

and:

protected static Long getEntityPkFor(PageParameters params, Class clazz,
Long defaultPk)
{
String pkFieldName = EntitiesDescriptor.get().getPkFieldName(clazz);
Long ret=null;
if(pkFieldName!=null)
{
ret = params.get(pkFieldName).toOptionalLong();
}
if(ret==null)
{
ret = params.get(id).toOptionalLong();
}
return ret==null?defaultPk:ret;
}

But(!!!) if ID was not put to the URL I have following Exception:

Caused by: org.apache.wicket.util.string.StringValueConversionException:
Unable
to convert '' to a Long value
at
org.apache.wicket.util.string.StringValue.toLongObject(StringValue.ja
va:589)
at
org.apache.wicket.util.string.StringValue.toOptionalLong(StringValue.
java:657)
at ru.ydn.wicket.EntityPage.getEntityPkFor(EntityPage.java:57)
at ru.ydn.wicket.web.ViewPagePage.init(ViewPagePage.java:84)
... 37 more
Caused by: java.lang.NumberFormatException: For input string: 
at
java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Long.parseLong(Long.java:431)
at java.lang.Long.init(Long.java:678)
at
org.apache.wicket.util.string.StringValue.toLongObject(StringValue.ja
va:585)

The problem in following code:

public final Long toOptionalLong() throws StringValueConversionException
{
return (text == null) ? null : toLongObject();
}

text should be checked for emptiness - not only null

What do you think?

Thanks,

Ilia


Re: Validate form on page start

2011-11-14 Thread Илья Нарыжный
Hello, Martin,

I tried, as you propose, but that doesn't work: page is not initilized, so
all validators just validate empty fields without propagated values to it.

Maybe I should done that in some onXXX method? (in onBeforeRender and
onComponentTag - it doesn't work)

Thanks,

Ilia


 Hi,

 On Sun, Nov 13, 2011 at 2:20 PM, Илья Нарыжный phan...@ydn.ru wrote:

 Hello,

 I have following case: There is RegistrationPage in the project. This
page fill attributes of new User and persists in the database. But for
registration from social networks we want to implement following: show to
new user the same RegistrationPage with filled fields according to data
recieved from social networks and highlighted errors (for example if EMAIL
was not filled).

 So, is it possible to redirect user to some page with already validated
form?

 Extend org.apache.wicket.markup.html.form.Form and add #myvalidate()
that just calls org.apache.wicket.markup.html.form.Form.validate() (it is
protected final).

 Instantiate that page and populate the form components' models (or
populate page's pageparameters) and at the end call myForm.myvalidate().

  Thanks, Ilia

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


Re: Validate form on page start

2011-11-14 Thread Илья Нарыжный
Hi,

Unfortunatly, it doesn't work too. Process doesn't propogate parameters
from Models to FormComponents, so validation just validate empty fields...

Ilia

2011/11/14 Martin Grigorov mgrigo...@apache.org

 Hi Ilia,

 You are correct.
 May be there is no need of #myvalidate() at all.
 Just call form#process(null);

 2011/11/14 Илья Нарыжный phan...@ydn.ru:
  Hello, Martin,
 
  I tried, as you propose, but that doesn't work: page is not initilized,
 so
  all validators just validate empty fields without propagated values to
 it.
 
  Maybe I should done that in some onXXX method? (in onBeforeRender and
  onComponentTag - it doesn't work)
 
  Thanks,
 
  Ilia
 
 
  Hi,
 
  On Sun, Nov 13, 2011 at 2:20 PM, Илья Нарыжный phan...@ydn.ru wrote:
 
  Hello,
 
  I have following case: There is RegistrationPage in the project. This
  page fill attributes of new User and persists in the database. But for
  registration from social networks we want to implement following: show to
  new user the same RegistrationPage with filled fields according to data
  recieved from social networks and highlighted errors (for example if
 EMAIL
  was not filled).
 
  So, is it possible to redirect user to some page with already validated
  form?
 
  Extend org.apache.wicket.markup.html.form.Form and add #myvalidate()
  that just calls org.apache.wicket.markup.html.form.Form.validate() (it is
  protected final).
 
  Instantiate that page and populate the form components' models (or
  populate page's pageparameters) and at the end call myForm.myvalidate().
 
   Thanks, Ilia
 
  -- Martin Grigorov jWeekend Training, Consulting, Development
  http://jWeekend.com http://jweekend.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




Re: Validate form on page start

2011-11-14 Thread Илья Нарыжный
Martin,

Yes. That seems to work, but for case when parameters for page were
propogated by PageParameters.
But what should I call in case, when value for fields initially should be
populated from CompoundPropertyModel and corresponding backend object?

Thanks,

Ilia

2011/11/14 Martin Grigorov mgrigo...@apache.org

 Hi,

 You need to call
 org.apache.wicket.markup.html.form.FormComponent.inputChanged() before
 that.
 See org.apache.wicket.markup.html.form.FormComponent.inputChanged()



 2011/11/14 Илья Нарыжный phan...@ydn.ru:
  Hi,
 
  Unfortunatly, it doesn't work too. Process doesn't propogate parameters
  from Models to FormComponents, so validation just validate empty
 fields...
 
  Ilia
 
  2011/11/14 Martin Grigorov mgrigo...@apache.org
 
  Hi Ilia,
 
  You are correct.
  May be there is no need of #myvalidate() at all.
  Just call form#process(null);
 
  2011/11/14 Илья Нарыжный phan...@ydn.ru:
   Hello, Martin,
  
   I tried, as you propose, but that doesn't work: page is not
 initilized,
  so
   all validators just validate empty fields without propagated values
 to
  it.
  
   Maybe I should done that in some onXXX method? (in onBeforeRender and
   onComponentTag - it doesn't work)
  
   Thanks,
  
   Ilia
  
  
   Hi,
  
   On Sun, Nov 13, 2011 at 2:20 PM, Илья Нарыжный phan...@ydn.ru
 wrote:
  
   Hello,
  
   I have following case: There is RegistrationPage in the project. This
   page fill attributes of new User and persists in the database. But for
   registration from social networks we want to implement following:
 show to
   new user the same RegistrationPage with filled fields according to
 data
   recieved from social networks and highlighted errors (for example if
  EMAIL
   was not filled).
  
   So, is it possible to redirect user to some page with already
 validated
   form?
  
   Extend org.apache.wicket.markup.html.form.Form and add #myvalidate()
   that just calls org.apache.wicket.markup.html.form.Form.validate()
 (it is
   protected final).
  
   Instantiate that page and populate the form components' models (or
   populate page's pageparameters) and at the end call
 myForm.myvalidate().
  
Thanks, Ilia
  
   -- Martin Grigorov jWeekend Training, Consulting, Development
   http://jWeekend.com http://jweekend.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
 
 
 



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




Re: Validate form on page start

2011-11-14 Thread Илья Нарыжный
Martin,

It doesn't work...
The main reason of that in following:
validation of required field is following:

public boolean checkRequired()
{
if (isRequired())
{
final String input = getInput();


and getInput method operates only with RequestParameters. So, I don't see
eny way to do that in proper way. Some deep changes in Wicket is required
to support that case:(

Ilia

2011/11/14 Martin Grigorov mgrigo...@apache.org

 You just need to pass a populated model to the form (components).
 If FormComponent's input is equal to NO_RAW_INPUT then the model is used.

 2011/11/14 Илья Нарыжный phan...@ydn.ru:
  Martin,
 
  Yes. That seems to work, but for case when parameters for page were
  propogated by PageParameters.
  But what should I call in case, when value for fields initially should be
  populated from CompoundPropertyModel and corresponding backend object?
 
  Thanks,
 
  Ilia
 
  2011/11/14 Martin Grigorov mgrigo...@apache.org
 
  Hi,
 
  You need to call
  org.apache.wicket.markup.html.form.FormComponent.inputChanged() before
  that.
  See org.apache.wicket.markup.html.form.FormComponent.inputChanged()
 
 
 
  2011/11/14 Илья Нарыжный phan...@ydn.ru:
   Hi,
  
   Unfortunatly, it doesn't work too. Process doesn't propogate
 parameters
   from Models to FormComponents, so validation just validate empty
  fields...
  
   Ilia
  
   2011/11/14 Martin Grigorov mgrigo...@apache.org
  
   Hi Ilia,
  
   You are correct.
   May be there is no need of #myvalidate() at all.
   Just call form#process(null);
  
   2011/11/14 Илья Нарыжный phan...@ydn.ru:
Hello, Martin,
   
I tried, as you propose, but that doesn't work: page is not
  initilized,
   so
all validators just validate empty fields without propagated
 values
  to
   it.
   
Maybe I should done that in some onXXX method? (in onBeforeRender
 and
onComponentTag - it doesn't work)
   
Thanks,
   
Ilia
   
   
Hi,
   
On Sun, Nov 13, 2011 at 2:20 PM, Илья Нарыжный phan...@ydn.ru
  wrote:
   
Hello,
   
I have following case: There is RegistrationPage in the project.
 This
page fill attributes of new User and persists in the database. But
 for
registration from social networks we want to implement following:
  show to
new user the same RegistrationPage with filled fields according to
  data
recieved from social networks and highlighted errors (for example
 if
   EMAIL
was not filled).
   
So, is it possible to redirect user to some page with already
  validated
form?
   
Extend org.apache.wicket.markup.html.form.Form and add
 #myvalidate()
that just calls org.apache.wicket.markup.html.form.Form.validate()
  (it is
protected final).
   
Instantiate that page and populate the form components' models (or
populate page's pageparameters) and at the end call
  myForm.myvalidate().
   
 Thanks, Ilia
   
-- Martin Grigorov jWeekend Training, Consulting, Development
http://jWeekend.com http://jweekend.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
  
  
  
 
 
 
  --
  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
 
 
 



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




Validate form on page start

2011-11-13 Thread Илья Нарыжный
Hello,

I have following case:
There is RegistrationPage in the project. This page fill attributes of new
User and persists in the database.
But for registration from social networks we want to implement following:
show to new user the same RegistrationPage with filled fields according to
data recieved from social networks and highlighted errors (for example if
EMAIL was not filled).

So, is it possible to redirect user to some page with already validated
form?

Thanks,
Ilia


Url.toAbsoluteString doesn't work correctly

2011-11-11 Thread Илья Нарыжный
Hello,

I have following code:

String fullPath = url.toAbsoluteString();
String subPath = url.toString();
log.info(FULL: +fullPath+ SUBPATH: +subPath);

And after execution on the page in logs I see following:

13:00:08,751 INFO  [STDOUT] INFO  - TestPanel   - FULL: /login
SUBPATH: login

So, it seems that toAbsoluteString works incorrect, because according to
documentation:

/**
 * render full representation of url (including protocol, host and
port) into string
 * representation
 *
 * @return absolute representation of the url
 */

Thanks,

Ilia


Orders of CSS files

2011-11-03 Thread Илья Нарыжный
Hello,

Is there some way to specify final CSS file which will be used by
browsers at the end - and that's why can rewrite some CSS rules?

We have following case: we use wicketstuff tagit autocomplite component.
This component contribute some CSS to the header. But we need to overwrite
some css rules: the best solution for this to place some overwriting rules
at the end of list of CSS files. But the problem is in that fact, that
Wicket adds all contributed to the header things at the end of the HEAD
file.

Thanks,

Ilia


AbstractAutoCompleteRenderer.getOnSelectJavaScriptExpression doesn't have access for callbackUrl

2011-10-25 Thread Илья Нарыжный
Hello,

Is't possible to obtain callbackUrl in javascript rendered by
AbstractAutoCompleteRenderer.getOnSelectJavaScriptExpression?

We have following case: by autocomplete some of the already existing objects
can be selected, after that INPUT will be disabled (because already
existing object was selected). Bit to implement this after selection of
partical row from the autocomplition list some callback code on the server
side should be invoked by OnSelect. But there is no access to callbackUrl
within  AbstractAutoCompleteRenderer.getOnSelectJavaScriptExpression to be
able to create wicketAjaxGet request.

P.S. As workaround we can store callbackUrl within domready to be able to
evaluate url in onscript.
P.P.S. May be it's much more simple to make field 'renderer' in
AutoCompleteBehavior protected or add getter method? In that case
callbackUrl can be populated to custom renderer?

Ilia


Dynamic BorderBehavior and AjaxFormSubmitBehavior

2011-10-24 Thread Илья Нарыжный
Hello,

Is it possible to use BorderBehavior and AjaxFormSubmitBehavior together on
the same TextField?
BorderBehavior in our case is dynamic: with the aid of isEnabled. But it
seems, that border is not updating be AJAX: only by refresh of the page. Is
it correct behavior?

Thanks,

Ilia


Unnecessary 302 redirects in Wicket 1.5

2011-10-20 Thread Илья Нарыжный
Hello,

Could you please explain for what reason wicket for every page redirects
users to some other page by 302 code?
For example from /home user will be redirected to /home?1 etc.
It seems quite strange and I think, that this is much more strange for
Search Engines.
I found solution how to optimize for SE here:
http://apache-wicket.1842946.n4.nabble.com/Removing-jsessionid-in-wicket-1-5-td3891735.html
But it looks strange even for common users. Can I disable this feature for
common users?

P.S. I found some mentions that this is because page is not stateless. But
it's not so reasonable for me, because:
1) In wicket 1.4 all works great without this feature
2) Other web frameworks, which I know, don't use 302 code and everthing is
working
For me it looks as a bug.

Thanks,

Ilia