Re: Displaying a Jenkins like "Getting ready to work" message in a web page when application is starting up

2018-10-05 Thread James Selvakumar
Hi Martin,

Thank you very much for the response.
I'll check that out.

On Fri, Oct 5, 2018 at 3:02 PM Martin Grigorov  wrote:

> Hi,
>
> You are very welcome!
>
> Since you use Spring I'd recommend you to check this article+demo app:
> https://github.com/nurkiewicz/spring-startup-progress
> It should give you an idea how to do it.
>
> On Fri, Oct 5, 2018 at 5:09 AM James Selvakumar 
> wrote:
>
> > Hi all,
> >
> > First of all I would like to thank the community for all the help offered
> > in the past. Thank you very much.
> >
> > My application (Wicket + Spring + Hibernate) takes around 60 to 90
> seconds
> > to startup and all the user has to see is an empty browser tab when the
> > application is starting up.
> > I've observed Jenkins displaying a familiar "Getting ready to work"
> message
> > when it starts up.
> > I've seen some Atlassian products even displaying what's happening behind
> > the hood during startup.
> > Can someone explain how to do something similar with Wicket?
> >
>


Displaying a Jenkins like "Getting ready to work" message in a web page when application is starting up

2018-10-04 Thread James Selvakumar
Hi all,

First of all I would like to thank the community for all the help offered
in the past. Thank you very much.

My application (Wicket + Spring + Hibernate) takes around 60 to 90 seconds
to startup and all the user has to see is an empty browser tab when the
application is starting up.
I've observed Jenkins displaying a familiar "Getting ready to work" message
when it starts up.
I've seen some Atlassian products even displaying what's happening behind
the hood during startup.
Can someone explain how to do something similar with Wicket?


Re: Wicket tests are extremely slow

2018-02-12 Thread James Selvakumar
Hi all,

Thank you very much for all the suggestions.
I agree that the slowness is because of Spring context initialized multiple
times.
Ours is a multi module maven application and what I have seen is the
context being initialized at least once per module because of new beans in
every module.
The ApplicationContextMock concept looks interesting and I shall try that
out.
Thanks again for taking your time to help me. Wicket rocks!

On Mon, Feb 12, 2018 at 6:17 PM Martijn Dashorst <martijn.dasho...@gmail.com>
wrote:

> Probably you're initializing your application for each test, so you
> should look into speeding that up or eliminating it all together (just
> once for the whole suite)
>
> Martijn
>
>
> On Mon, Feb 12, 2018 at 5:05 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
> > Hi,
> >
> > We have a Wicket 7.x application which uses a Spring/Hibernate backend.
> We
> > have few hundred simple Wicket tests that basically tests whether the
> page
> > has been loaded properly. Since almost all our Wicket pages use Spring
> > beans, we have to initialize the Spring application context for our
> Wicket
> > tests to run. And as a result our tests are extremely slow that we have
> > stopped running them in our main pipeline.
> >
> > What strategy do you all follow to run Wicket tests that can run fast?
> >
> > Thanks in advance,
> > James
> > mCruncher
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket tests are extremely slow

2018-02-11 Thread James Selvakumar
Hi,

We have a Wicket 7.x application which uses a Spring/Hibernate backend. We
have few hundred simple Wicket tests that basically tests whether the page
has been loaded properly. Since almost all our Wicket pages use Spring
beans, we have to initialize the Spring application context for our Wicket
tests to run. And as a result our tests are extremely slow that we have
stopped running them in our main pipeline.

What strategy do you all follow to run Wicket tests that can run fast?

Thanks in advance,
James
mCruncher


Re: DCEVM and Hotswap agent support

2017-08-15 Thread James Selvakumar
Dear all,

Just to complete this loop, I've managed to configure my multi module
Wicket application to reload classes and resources (e.g html, property
files) without restarting the whole application using DCEVM + HotSwapAgent.
After following the standard procedures in configuring these two tools, all
you need to do is to have a property file named "hotswap-agent.properties"
in your web application's classpath and configure the "extraClasspath"
property in it.
If anyone is interested, please take a look at this gist
 for a
sample configuration.

On Thu, Jun 22, 2017 at 9:43 PM mashleyttu  wrote:

> I'm evaluating HotSwapAgent as a replacement to JRebel which I've been
> using.
> I'm definitely not asking anyone to troubleshoot a DCEVM/HotSwapAgent
> exception, but I am curious if you have run into this exception. The hot
> swap code changes seem to work, but every time I save a change this occurs.
>
>
> HOTSWAP AGENT: 08:21:29.353 RELOAD
> (org.hotswap.agent.plugin.jvm.AnonymousClassPatchPlugin) - Class
> 'com/foo/bar/formpanels/DashboardPanel' has been enhanced with anonymous
> classes for hotswap.
> HOTSWAP AGENT: 08:21:29.397 ERROR
> (org.hotswap.agent.util.signature.ClassSignatureComparerHelper) - Error
> reading siganture
> org.hotswap.agent.javassist.NotFoundException:
> com.foo.bar.components.listview.Abstract806ListView
> at org.hotswap.agent.javassist.ClassPool.get(ClassPool.java:445)
> at
>
> org.hotswap.agent.javassist.bytecode.Descriptor.toCtClass(Descriptor.java:577)
> at
>
> org.hotswap.agent.javassist.bytecode.Descriptor.getReturnType(Descriptor.java:479)
> at
> org.hotswap.agent.javassist.CtBehavior.getReturnType0(CtBehavior.java:294)
> at
> org.hotswap.agent.javassist.CtMethod.getReturnType(CtMethod.java:210)
> at
>
> org.hotswap.agent.util.signature.CtClassSignature.getMethodString(CtClassSignature.java:117)
> at
>
> org.hotswap.agent.util.signature.CtClassSignature.getValue(CtClassSignature.java:45)
> at
>
> org.hotswap.agent.util.signature.ClassSignatureComparerHelper.getCtClassSignature(ClassSignatureComparerHelper.java:21)
> at
>
> org.hotswap.agent.util.signature.ClassSignatureComparerHelper.isDifferent(ClassSignatureComparerHelper.java:37)
> at
>
> org.hotswap.agent.util.signature.ClassSignatureComparerHelper.isPoolClassDifferent(ClassSignatureComparerHelper.java:64)
> at
>
> org.hotswap.agent.plugin.spring.signature.ClassSignatureComparer.isPoolClassDifferent(ClassSignatureComparer.java:31)
> at
>
> org.hotswap.agent.plugin.spring.SpringChangesAnalyzer.classChangeNeedsReload(SpringChangesAnalyzer.java:43)
> at
>
> org.hotswap.agent.plugin.spring.SpringChangesAnalyzer.isReloadNeeded(SpringChangesAnalyzer.java:36)
> at
>
> org.hotswap.agent.plugin.spring.SpringPlugin$1.transform(SpringPlugin.java:80)
> at
>
> org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:177)
> at
> sun.instrument.TransformerManager.transform(TransformerManager.java:188)
> at
> sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
>
> Thanks,
> Matt
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/DCEVM-and-Hotswap-agent-support-tp4668576p4678128.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-21 Thread James Selvakumar
Hi Ernesto,

I'm not sure about that but they do support SVG images which really have
simplified things.
Since there is just a single html file now, I'm just embedding it inside a
Panel.
But anyhow, this exercise helped me to learn about mounting a folder with
the file name as a param and how to use an iframe within Wicket. I had no
idea about these things before.
I'm really excited by the support offered by the community.
Thank you once again guys.

On Wed, Jun 21, 2017 at 4:45 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> I'm sure Jasper would support storing images and so on in a database...
> IMHO that would be a more robust approach. But you know better your use
> case.
>
> On Wed, Jun 21, 2017 at 3:34 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Hi Martin/Ernesto,
> >
> > Thanks for all the help. I'll try them out.
> >
> > On Tue, Jun 20, 2017 at 5:44 PM Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > This might also help
> > >
> > >
> > > https://cwiki.apache.org/confluence/display/WICKET/
> > Displaying+content++%28e.g.+PDF%2C+Excel%2C+Word%29+in+an+IFRAME
> > >
> > > On Tue, Jun 20, 2017 at 11:32 AM, Martin Grigorov <
> mgrigo...@apache.org>
> > > wrote:
> > >
> > > > On Tue, Jun 20, 2017 at 11:31 AM, James Selvakumar <
> > ja...@mcruncher.com>
> > > > wrote:
> > > >
> > > > > Hi Martin,
> > > > >
> > > > > Should I mount just the base dir where all my reports shall be
> > > generated
> > > > > and refer it elsewhere?
> > > > >
> > > >
> > > > Yes, this should work!
> > > >
> > > >
> > > > >
> > > > > On Tue, Jun 20, 2017 at 5:28 PM James Selvakumar <
> > ja...@mcruncher.com>
> > > > > wrote:
> > > > >
> > > > > > Hi Martin,
> > > > > >
> > > > > > But the reports are generated dynamically. Is it possible to
> mount
> > a
> > > > > > resource from within a panel?
> > > > > >
> > > > > > On Tue, Jun 20, 2017 at 5:24 PM James Selvakumar <
> > > ja...@mcruncher.com>
> > > > > > wrote:
> > > > > >
> > > > > >> Hi Martin,
> > > > > >>
> > > > > >> Thanks. I'll give that a try.
> > > > > >>
> > > > > >> On Tue, Jun 20, 2017 at 5:23 PM Martin Grigorov <
> > > mgrigo...@apache.org
> > > > >
> > > > > >> wrote:
> > > > > >>
> > > > > >>> On Tue, Jun 20, 2017 at 11:18 AM, James Selvakumar <
> > > > > ja...@mcruncher.com>
> > > > > >>> wrote:
> > > > > >>>
> > > > > >>> > Hi,
> > > > > >>> >
> > > > > >>> > I'm trying something weird like this and it's not working.
> > > > > >>> >
> > > > > >>> > HTML:
> > > > > >>> > 
> > > > > >>> >
> > > > > >>> > Java:
> > > > > >>> > WebMarkupContainer container = new
> > WebMarkupContainer("myFrame");
> > > > > >>> > container.add(new AttributeAppender("src",
> > > > > >>> > Model.of(reportFile.getPath(;
> > > > > >>> >
> > > > > >>>
> > > > > >>> getPath() returns file system url.
> > > > > >>> You need to mount a IResource that serves files from this file
> > > system
> > > > > >>> path,
> > > > > >>> e.g. http://localhost:8080/jasper/report/aaa.ext will try to
> > load
> > > > > >>> file:///some/path/aaa.ext.
> > > > > >>>
> > > > > >>>
> > > > > >>> >
> > > > > >>> > What's the correct way to do this?
> > > > > >>> >
> > > > > >>> > On Tue, Jun 20, 2017 at 4:40 PM James Selvakumar <
> > > > > ja...@mcruncher.com>
> > > > > >>> > wrote:
> > > > > >>> >
> > > > > >>> > > Hi Ernesto,
> > > > &g

Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi Martin/Ernesto,

Thanks for all the help. I'll try them out.

On Tue, Jun 20, 2017 at 5:44 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> This might also help
>
>
> https://cwiki.apache.org/confluence/display/WICKET/Displaying+content++%28e.g.+PDF%2C+Excel%2C+Word%29+in+an+IFRAME
>
> On Tue, Jun 20, 2017 at 11:32 AM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > On Tue, Jun 20, 2017 at 11:31 AM, James Selvakumar <ja...@mcruncher.com>
> > wrote:
> >
> > > Hi Martin,
> > >
> > > Should I mount just the base dir where all my reports shall be
> generated
> > > and refer it elsewhere?
> > >
> >
> > Yes, this should work!
> >
> >
> > >
> > > On Tue, Jun 20, 2017 at 5:28 PM James Selvakumar <ja...@mcruncher.com>
> > > wrote:
> > >
> > > > Hi Martin,
> > > >
> > > > But the reports are generated dynamically. Is it possible to mount a
> > > > resource from within a panel?
> > > >
> > > > On Tue, Jun 20, 2017 at 5:24 PM James Selvakumar <
> ja...@mcruncher.com>
> > > > wrote:
> > > >
> > > >> Hi Martin,
> > > >>
> > > >> Thanks. I'll give that a try.
> > > >>
> > > >> On Tue, Jun 20, 2017 at 5:23 PM Martin Grigorov <
> mgrigo...@apache.org
> > >
> > > >> wrote:
> > > >>
> > > >>> On Tue, Jun 20, 2017 at 11:18 AM, James Selvakumar <
> > > ja...@mcruncher.com>
> > > >>> wrote:
> > > >>>
> > > >>> > Hi,
> > > >>> >
> > > >>> > I'm trying something weird like this and it's not working.
> > > >>> >
> > > >>> > HTML:
> > > >>> > 
> > > >>> >
> > > >>> > Java:
> > > >>> > WebMarkupContainer container = new WebMarkupContainer("myFrame");
> > > >>> > container.add(new AttributeAppender("src",
> > > >>> > Model.of(reportFile.getPath(;
> > > >>> >
> > > >>>
> > > >>> getPath() returns file system url.
> > > >>> You need to mount a IResource that serves files from this file
> system
> > > >>> path,
> > > >>> e.g. http://localhost:8080/jasper/report/aaa.ext will try to load
> > > >>> file:///some/path/aaa.ext.
> > > >>>
> > > >>>
> > > >>> >
> > > >>> > What's the correct way to do this?
> > > >>> >
> > > >>> > On Tue, Jun 20, 2017 at 4:40 PM James Selvakumar <
> > > ja...@mcruncher.com>
> > > >>> > wrote:
> > > >>> >
> > > >>> > > Hi Ernesto,
> > > >>> > >
> > > >>> > > Thanks. I'll give the iframe option a try.
> > > >>> > >
> > > >>> > > On Tue, Jun 20, 2017 at 4:22 PM Ernesto Reinaldo Barreiro <
> > > >>> > > reier...@gmail.com> wrote:
> > > >>> > >
> > > >>> > >> Then I would
> > > >>> > >>
> > > >>> > >> 1- mount a resource pointing the folder and serving all files
> on
> > > >>> that
> > > >>> > >> folder. E.g mounted on "/reports"
> > > >>> > >> 2- Use an iframe to display "/reports/foo.html".
> > > >>> > >>
> > > >>> > >> On Tue, Jun 20, 2017 at 10:15 AM, James Selvakumar <
> > > >>> ja...@mcruncher.com
> > > >>> > >
> > > >>> > >> wrote:
> > > >>> > >>
> > > >>> > >> > Thanks Martin and Ernesto for taking look at this.
> > > >>> > >> > I'm using JasperReports library to generate HTML reports
> > > >>> dynamically
> > > >>> > and
> > > >>> > >> > store them in the filesystem.
> > > >>> > >> > Please take a look at the sample report attached here.
> > > >>> > >> >
> > > >>> > >> > On Tue, Jun 20, 2017 at 4

Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi Martin,

Should I mount just the base dir where all my reports shall be generated
and refer it elsewhere?

On Tue, Jun 20, 2017 at 5:28 PM James Selvakumar <ja...@mcruncher.com>
wrote:

> Hi Martin,
>
> But the reports are generated dynamically. Is it possible to mount a
> resource from within a panel?
>
> On Tue, Jun 20, 2017 at 5:24 PM James Selvakumar <ja...@mcruncher.com>
> wrote:
>
>> Hi Martin,
>>
>> Thanks. I'll give that a try.
>>
>> On Tue, Jun 20, 2017 at 5:23 PM Martin Grigorov <mgrigo...@apache.org>
>> wrote:
>>
>>> On Tue, Jun 20, 2017 at 11:18 AM, James Selvakumar <ja...@mcruncher.com>
>>> wrote:
>>>
>>> > Hi,
>>> >
>>> > I'm trying something weird like this and it's not working.
>>> >
>>> > HTML:
>>> > 
>>> >
>>> > Java:
>>> > WebMarkupContainer container = new WebMarkupContainer("myFrame");
>>> > container.add(new AttributeAppender("src",
>>> > Model.of(reportFile.getPath(;
>>> >
>>>
>>> getPath() returns file system url.
>>> You need to mount a IResource that serves files from this file system
>>> path,
>>> e.g. http://localhost:8080/jasper/report/aaa.ext will try to load
>>> file:///some/path/aaa.ext.
>>>
>>>
>>> >
>>> > What's the correct way to do this?
>>> >
>>> > On Tue, Jun 20, 2017 at 4:40 PM James Selvakumar <ja...@mcruncher.com>
>>> > wrote:
>>> >
>>> > > Hi Ernesto,
>>> > >
>>> > > Thanks. I'll give the iframe option a try.
>>> > >
>>> > > On Tue, Jun 20, 2017 at 4:22 PM Ernesto Reinaldo Barreiro <
>>> > > reier...@gmail.com> wrote:
>>> > >
>>> > >> Then I would
>>> > >>
>>> > >> 1- mount a resource pointing the folder and serving all files on
>>> that
>>> > >> folder. E.g mounted on "/reports"
>>> > >> 2- Use an iframe to display "/reports/foo.html".
>>> > >>
>>> > >> On Tue, Jun 20, 2017 at 10:15 AM, James Selvakumar <
>>> ja...@mcruncher.com
>>> > >
>>> > >> wrote:
>>> > >>
>>> > >> > Thanks Martin and Ernesto for taking look at this.
>>> > >> > I'm using JasperReports library to generate HTML reports
>>> dynamically
>>> > and
>>> > >> > store them in the filesystem.
>>> > >> > Please take a look at the sample report attached here.
>>> > >> >
>>> > >> > On Tue, Jun 20, 2017 at 4:09 PM Ernesto Reinaldo Barreiro <
>>> > >> > reier...@gmail.com> wrote:
>>> > >> >
>>> > >> >> Hi,
>>> > >> >>
>>> > >> >> At least BIRT allowed to pass some factory interface for images
>>> so
>>> > that
>>> > >> >> you
>>> > >> >> could store generated images "somewhere" and TUNE the URL
>>> generated
>>> > for
>>> > >> >> images. So, you could e.g.
>>> > >> >>
>>> > >> >> 1- Store images on a table (datbase)
>>> > >> >> 2- Mount a resource pointing to those images.
>>> > >> >> 3- Produce URLs inside the report pointing to mounted resource.
>>> > >> >>
>>> > >> >> I do no think Jasper should be that different...
>>> > >> >>
>>> > >> >>
>>> > >> >> On Tue, Jun 20, 2017 at 8:32 AM, James Selvakumar <
>>> > ja...@mcruncher.com
>>> > >> >
>>> > >> >> wrote:
>>> > >> >>
>>> > >> >> > Hi all,
>>> > >> >> >
>>> > >> >> > I'm trying to embed the HTML report from the filesystem
>>> generated
>>> > by
>>> > >> >> > JasperReports in a Panel.
>>> > >> >> >
>>> > >> >> > I tried using a WebComponent and write the content of the HTML
>>> file
>>> > >> to
>>> > >> >> the
>>> > >> >> > Response. The markup gets added as expected but unfortunately
>>> > >> >> JasperReports
>>> > >> >> > produces separate image files and I'm not sure how to display
>>> them.
>>> > >> >> >
>>> > >> >> > Is it possible to display HTML from filesystem along with it's
>>> > >> dependant
>>> > >> >> > resources inside a Wicket component?  Or is there a better way?
>>> > >> >> >
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >> --
>>> > >> >> 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
>>> > >>
>>> > >
>>> >
>>>
>>


Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi Martin,

But the reports are generated dynamically. Is it possible to mount a
resource from within a panel?

On Tue, Jun 20, 2017 at 5:24 PM James Selvakumar <ja...@mcruncher.com>
wrote:

> Hi Martin,
>
> Thanks. I'll give that a try.
>
> On Tue, Jun 20, 2017 at 5:23 PM Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> On Tue, Jun 20, 2017 at 11:18 AM, James Selvakumar <ja...@mcruncher.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I'm trying something weird like this and it's not working.
>> >
>> > HTML:
>> > 
>> >
>> > Java:
>> > WebMarkupContainer container = new WebMarkupContainer("myFrame");
>> > container.add(new AttributeAppender("src",
>> > Model.of(reportFile.getPath(;
>> >
>>
>> getPath() returns file system url.
>> You need to mount a IResource that serves files from this file system
>> path,
>> e.g. http://localhost:8080/jasper/report/aaa.ext will try to load
>> file:///some/path/aaa.ext.
>>
>>
>> >
>> > What's the correct way to do this?
>> >
>> > On Tue, Jun 20, 2017 at 4:40 PM James Selvakumar <ja...@mcruncher.com>
>> > wrote:
>> >
>> > > Hi Ernesto,
>> > >
>> > > Thanks. I'll give the iframe option a try.
>> > >
>> > > On Tue, Jun 20, 2017 at 4:22 PM Ernesto Reinaldo Barreiro <
>> > > reier...@gmail.com> wrote:
>> > >
>> > >> Then I would
>> > >>
>> > >> 1- mount a resource pointing the folder and serving all files on that
>> > >> folder. E.g mounted on "/reports"
>> > >> 2- Use an iframe to display "/reports/foo.html".
>> > >>
>> > >> On Tue, Jun 20, 2017 at 10:15 AM, James Selvakumar <
>> ja...@mcruncher.com
>> > >
>> > >> wrote:
>> > >>
>> > >> > Thanks Martin and Ernesto for taking look at this.
>> > >> > I'm using JasperReports library to generate HTML reports
>> dynamically
>> > and
>> > >> > store them in the filesystem.
>> > >> > Please take a look at the sample report attached here.
>> > >> >
>> > >> > On Tue, Jun 20, 2017 at 4:09 PM Ernesto Reinaldo Barreiro <
>> > >> > reier...@gmail.com> wrote:
>> > >> >
>> > >> >> Hi,
>> > >> >>
>> > >> >> At least BIRT allowed to pass some factory interface for images so
>> > that
>> > >> >> you
>> > >> >> could store generated images "somewhere" and TUNE the URL
>> generated
>> > for
>> > >> >> images. So, you could e.g.
>> > >> >>
>> > >> >> 1- Store images on a table (datbase)
>> > >> >> 2- Mount a resource pointing to those images.
>> > >> >> 3- Produce URLs inside the report pointing to mounted resource.
>> > >> >>
>> > >> >> I do no think Jasper should be that different...
>> > >> >>
>> > >> >>
>> > >> >> On Tue, Jun 20, 2017 at 8:32 AM, James Selvakumar <
>> > ja...@mcruncher.com
>> > >> >
>> > >> >> wrote:
>> > >> >>
>> > >> >> > Hi all,
>> > >> >> >
>> > >> >> > I'm trying to embed the HTML report from the filesystem
>> generated
>> > by
>> > >> >> > JasperReports in a Panel.
>> > >> >> >
>> > >> >> > I tried using a WebComponent and write the content of the HTML
>> file
>> > >> to
>> > >> >> the
>> > >> >> > Response. The markup gets added as expected but unfortunately
>> > >> >> JasperReports
>> > >> >> > produces separate image files and I'm not sure how to display
>> them.
>> > >> >> >
>> > >> >> > Is it possible to display HTML from filesystem along with it's
>> > >> dependant
>> > >> >> > resources inside a Wicket component?  Or is there a better way?
>> > >> >> >
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> 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
>> > >>
>> > >
>> >
>>
>


Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi Martin,

Thanks. I'll give that a try.

On Tue, Jun 20, 2017 at 5:23 PM Martin Grigorov <mgrigo...@apache.org>
wrote:

> On Tue, Jun 20, 2017 at 11:18 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Hi,
> >
> > I'm trying something weird like this and it's not working.
> >
> > HTML:
> > 
> >
> > Java:
> > WebMarkupContainer container = new WebMarkupContainer("myFrame");
> > container.add(new AttributeAppender("src",
> > Model.of(reportFile.getPath(;
> >
>
> getPath() returns file system url.
> You need to mount a IResource that serves files from this file system path,
> e.g. http://localhost:8080/jasper/report/aaa.ext will try to load
> file:///some/path/aaa.ext.
>
>
> >
> > What's the correct way to do this?
> >
> > On Tue, Jun 20, 2017 at 4:40 PM James Selvakumar <ja...@mcruncher.com>
> > wrote:
> >
> > > Hi Ernesto,
> > >
> > > Thanks. I'll give the iframe option a try.
> > >
> > > On Tue, Jun 20, 2017 at 4:22 PM Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > >> Then I would
> > >>
> > >> 1- mount a resource pointing the folder and serving all files on that
> > >> folder. E.g mounted on "/reports"
> > >> 2- Use an iframe to display "/reports/foo.html".
> > >>
> > >> On Tue, Jun 20, 2017 at 10:15 AM, James Selvakumar <
> ja...@mcruncher.com
> > >
> > >> wrote:
> > >>
> > >> > Thanks Martin and Ernesto for taking look at this.
> > >> > I'm using JasperReports library to generate HTML reports dynamically
> > and
> > >> > store them in the filesystem.
> > >> > Please take a look at the sample report attached here.
> > >> >
> > >> > On Tue, Jun 20, 2017 at 4:09 PM Ernesto Reinaldo Barreiro <
> > >> > reier...@gmail.com> wrote:
> > >> >
> > >> >> Hi,
> > >> >>
> > >> >> At least BIRT allowed to pass some factory interface for images so
> > that
> > >> >> you
> > >> >> could store generated images "somewhere" and TUNE the URL generated
> > for
> > >> >> images. So, you could e.g.
> > >> >>
> > >> >> 1- Store images on a table (datbase)
> > >> >> 2- Mount a resource pointing to those images.
> > >> >> 3- Produce URLs inside the report pointing to mounted resource.
> > >> >>
> > >> >> I do no think Jasper should be that different...
> > >> >>
> > >> >>
> > >> >> On Tue, Jun 20, 2017 at 8:32 AM, James Selvakumar <
> > ja...@mcruncher.com
> > >> >
> > >> >> wrote:
> > >> >>
> > >> >> > Hi all,
> > >> >> >
> > >> >> > I'm trying to embed the HTML report from the filesystem generated
> > by
> > >> >> > JasperReports in a Panel.
> > >> >> >
> > >> >> > I tried using a WebComponent and write the content of the HTML
> file
> > >> to
> > >> >> the
> > >> >> > Response. The markup gets added as expected but unfortunately
> > >> >> JasperReports
> > >> >> > produces separate image files and I'm not sure how to display
> them.
> > >> >> >
> > >> >> > Is it possible to display HTML from filesystem along with it's
> > >> dependant
> > >> >> > resources inside a Wicket component?  Or is there a better way?
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> 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
> > >>
> > >
> >
>


Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi,

I'm trying something weird like this and it's not working.

HTML:


Java:
WebMarkupContainer container = new WebMarkupContainer("myFrame");
container.add(new AttributeAppender("src",
Model.of(reportFile.getPath(;

What's the correct way to do this?

On Tue, Jun 20, 2017 at 4:40 PM James Selvakumar <ja...@mcruncher.com>
wrote:

> Hi Ernesto,
>
> Thanks. I'll give the iframe option a try.
>
> On Tue, Jun 20, 2017 at 4:22 PM Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Then I would
>>
>> 1- mount a resource pointing the folder and serving all files on that
>> folder. E.g mounted on "/reports"
>> 2- Use an iframe to display "/reports/foo.html".
>>
>> On Tue, Jun 20, 2017 at 10:15 AM, James Selvakumar <ja...@mcruncher.com>
>> wrote:
>>
>> > Thanks Martin and Ernesto for taking look at this.
>> > I'm using JasperReports library to generate HTML reports dynamically and
>> > store them in the filesystem.
>> > Please take a look at the sample report attached here.
>> >
>> > On Tue, Jun 20, 2017 at 4:09 PM Ernesto Reinaldo Barreiro <
>> > reier...@gmail.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> At least BIRT allowed to pass some factory interface for images so that
>> >> you
>> >> could store generated images "somewhere" and TUNE the URL generated for
>> >> images. So, you could e.g.
>> >>
>> >> 1- Store images on a table (datbase)
>> >> 2- Mount a resource pointing to those images.
>> >> 3- Produce URLs inside the report pointing to mounted resource.
>> >>
>> >> I do no think Jasper should be that different...
>> >>
>> >>
>> >> On Tue, Jun 20, 2017 at 8:32 AM, James Selvakumar <ja...@mcruncher.com
>> >
>> >> wrote:
>> >>
>> >> > Hi all,
>> >> >
>> >> > I'm trying to embed the HTML report from the filesystem generated by
>> >> > JasperReports in a Panel.
>> >> >
>> >> > I tried using a WebComponent and write the content of the HTML file
>> to
>> >> the
>> >> > Response. The markup gets added as expected but unfortunately
>> >> JasperReports
>> >> > produces separate image files and I'm not sure how to display them.
>> >> >
>> >> > Is it possible to display HTML from filesystem along with it's
>> dependant
>> >> > resources inside a Wicket component?  Or is there a better way?
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> 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
>>
>


Re: Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi Ernesto,

Thanks. I'll give the iframe option a try.

On Tue, Jun 20, 2017 at 4:22 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Then I would
>
> 1- mount a resource pointing the folder and serving all files on that
> folder. E.g mounted on "/reports"
> 2- Use an iframe to display "/reports/foo.html".
>
> On Tue, Jun 20, 2017 at 10:15 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Thanks Martin and Ernesto for taking look at this.
> > I'm using JasperReports library to generate HTML reports dynamically and
> > store them in the filesystem.
> > Please take a look at the sample report attached here.
> >
> > On Tue, Jun 20, 2017 at 4:09 PM Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> At least BIRT allowed to pass some factory interface for images so that
> >> you
> >> could store generated images "somewhere" and TUNE the URL generated for
> >> images. So, you could e.g.
> >>
> >> 1- Store images on a table (datbase)
> >> 2- Mount a resource pointing to those images.
> >> 3- Produce URLs inside the report pointing to mounted resource.
> >>
> >> I do no think Jasper should be that different...
> >>
> >>
> >> On Tue, Jun 20, 2017 at 8:32 AM, James Selvakumar <ja...@mcruncher.com>
> >> wrote:
> >>
> >> > Hi all,
> >> >
> >> > I'm trying to embed the HTML report from the filesystem generated by
> >> > JasperReports in a Panel.
> >> >
> >> > I tried using a WebComponent and write the content of the HTML file to
> >> the
> >> > Response. The markup gets added as expected but unfortunately
> >> JasperReports
> >> > produces separate image files and I'm not sure how to display them.
> >> >
> >> > Is it possible to display HTML from filesystem along with it's
> dependant
> >> > resources inside a Wicket component?  Or is there a better way?
> >> >
> >>
> >>
> >>
> >> --
> >> 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
>


Embedding HTML report generated by JasperReports in a Panel

2017-06-20 Thread James Selvakumar
Hi all,

I'm trying to embed the HTML report from the filesystem generated by
JasperReports in a Panel.

I tried using a WebComponent and write the content of the HTML file to the
Response. The markup gets added as expected but unfortunately JasperReports
produces separate image files and I'm not sure how to display them.

Is it possible to display HTML from filesystem along with it's dependant
resources inside a Wicket component?  Or is there a better way?


Re: The day Wicket became Apache Wicket 10 years ago!

2017-06-20 Thread James Selvakumar
It's heartening to see Wicket still going strong.
And I take this opportunity to thank all of you for this amazing framework
and many thanks for the support offered.
The support offered by the Wicket community is superior compared to even
commercial products.
Keep going!

On Tue, Jun 20, 2017 at 1:58 PM Zala Pierre GOUPIL 
wrote:

> Congratulations! Keep up the good work!
>
> On Tue, Jun 20, 2017 at 7:44 AM, Tobias Soloschenko <
> tobiassolosche...@googlemail.com> wrote:
>
> > Hope that many years are going to be added. :-)
> >
> > kind regards
> >
> > Tobias
> >
> > > Am 19.06.2017 um 21:18 schrieb Martijn Dashorst <
> > martijn.dasho...@gmail.com>:
> > >
> > > Today marks the date 10 years ago that the Wicket project graduated
> from
> > > the Incubator to a fully fledged Apache project.
> > >
> > > The time flies when you're having fun!
> > >
> > > I would like to thank all our community members for their continued
> > support
> > > and usage of Apache Wicket and pour one out for you!
> > >
> > > Here's a big Thank You for everyone reading this message, asking and
> > > answering questions, using Wicket in their projects and a special
> :beer:
> > > for all contributors to Wicket, past and present! Here's to another 10
> > > years!
> > >
> > > Martijn Dashorst
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Je n'aime pas seulement ma vie, mais aussi celle des autres.
>
> (Blade Runner)
>


Analytics for Wicket applications

2017-06-15 Thread James Selvakumar
Dear community,

Though this is not a question related to the Wicket framework which we have
been using happily for nearly 6 years, I hope the community would help me
with it's insights regarding providing analytics in Wicket applications.

We are using the excellent wicked-charts library (HighCharts) to provide
home grown analytics in our application. I've been wondering recently
whether we are going in the right direction.

How do you all provide analytics in your applications? Are you integrating
some third party BI tools like JasperSoft or Pentaho? Or are you building
it on your own?

Thank you very much in advance.


Re: Unable to retrieve row model in DataTable while running the application in Jetty

2017-04-25 Thread James Selvakumar
Hi Francois,

Thanks again. I'll try to recreate this problem in a quickstart and will
update here.

On Tue, Apr 25, 2017 at 3:12 PM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Hi James,
>
> Please make a quickstart so I can have a better overview.
>
> François
>
>
>
> > Le 25 avr. 2017 à 03:35, James Selvakumar <ja...@mcruncher.com> a écrit
> :
> >
> > Hi Francois,
> >
> > Thank you very much for your reply.
> > I define my datatable like this:
> >
> > StandardDataTable dataTable = new StandardDataTable("dataTable",
> > columns, this.getDataProvider());
> >
> > And that's the only place I use a data provider.
> >
> > I don't override it's model.
> >
> > In my data provider I don't call detach.
> >
> >
> > On Fri, Apr 21, 2017 at 4:27 PM, Francois Meillet <
> > francois.meil...@gmail.com> wrote:
> >
> >> Hi James,
> >>
> >> Do you use the same DataProvider for your DataTable ?
> >> Do you use the same model when you override DataTable # IModel
> model(T
> >> object);
> >> Do you call detach ?
> >>
> >> François
> >>
> >>
> >>
> >>> Le 21 avr. 2017 à 09:38, James Selvakumar <ja...@mcruncher.com> a
> écrit
> >> :
> >>>
> >>> Hi all,
> >>>
> >>> I have a DataTable with some ajax links in the first column. Other
> >> columns
> >>> are simple property columns. The ajax links are used to edit/delete
> >>> associated entities. The ajax links are encapsulated inside a panel.
> >>>
> >>> The DataTable itself is rendered fine.
> >>>
> >>> The problem I face is that the rowModel.getObject() is null when any of
> >> the
> >>> ajax link is clicked when running the application in Jetty (Maven jetty
> >>> plugin).  However, if the application is deployed on Tomcat, everything
> >>> works as expected.
> >>>
> >>> Can anyone highlight my mistake, if any here?
> >>>
> >>> Here's how my code looks like:
> >>>
> >>> List columns = new ArrayList();
> >>> columns.add(new AbstractColumn<FooEntity,
> >>> String>(Model.of(getString("name")), "name")
> >>> {
> >>> @Override
> >>> public void populateItem(Item<ICellPopulator> cellItem,
> >>> String componentId, final IModel rowModel)
> >>> {
> >>> cellItem.add(new DataTableActionPanel(componentId,
> >>> rowModel.getObject().getName())
> >>> {
> >>> @Override
> >>> protected void onEdit(AjaxRequestTarget target)
> >>> {
> >>> LOGGER.debug("Editing {}", rowModel.getObject());
> >>>
> >>> //proceed to display another panel to edit the entity
> >>>
> >>> }
> >>>
> >>> @Override
> >>> protected void onDelete(AjaxRequestTarget target)
> >>> {
> >>> LOGGER.debug("Deleting {}", rowModel.getObject());
> >>>
> >>> //proceed to delete the entity
> >>>
> >>> }
> >>>
> >>> });
> >>> }
> >>> });
> >>>
> >>> //add other columns
> >>> 
> >>>
> >>> //add the columns to a data table
> >>> 
> >>>
> >>>
> >>>
> >>> --
> >>> Thanks & regards
> >>> James
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Thanks & regards
> > James
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James


Re: Unable to retrieve row model in DataTable while running the application in Jetty

2017-04-24 Thread James Selvakumar
Hi Francois,

Thank you very much for your reply.
I define my datatable like this:

StandardDataTable dataTable = new StandardDataTable("dataTable",
columns, this.getDataProvider());

And that's the only place I use a data provider.

I don't override it's model.

In my data provider I don't call detach.


On Fri, Apr 21, 2017 at 4:27 PM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Hi James,
>
> Do you use the same DataProvider for your DataTable ?
> Do you use the same model when you override DataTable # IModel model(T
> object);
> Do you call detach ?
>
> François
>
>
>
> > Le 21 avr. 2017 à 09:38, James Selvakumar <ja...@mcruncher.com> a écrit
> :
> >
> > Hi all,
> >
> > I have a DataTable with some ajax links in the first column. Other
> columns
> > are simple property columns. The ajax links are used to edit/delete
> > associated entities. The ajax links are encapsulated inside a panel.
> >
> > The DataTable itself is rendered fine.
> >
> > The problem I face is that the rowModel.getObject() is null when any of
> the
> > ajax link is clicked when running the application in Jetty (Maven jetty
> > plugin).  However, if the application is deployed on Tomcat, everything
> > works as expected.
> >
> > Can anyone highlight my mistake, if any here?
> >
> > Here's how my code looks like:
> >
> > List columns = new ArrayList();
> > columns.add(new AbstractColumn<FooEntity,
> > String>(Model.of(getString("name")), "name")
> > {
> >   @Override
> >   public void populateItem(Item<ICellPopulator> cellItem,
> > String componentId, final IModel rowModel)
> >   {
> >   cellItem.add(new DataTableActionPanel(componentId,
> > rowModel.getObject().getName())
> >   {
> >   @Override
> >   protected void onEdit(AjaxRequestTarget target)
> >   {
> >   LOGGER.debug("Editing {}", rowModel.getObject());
> >
> >   //proceed to display another panel to edit the entity
> >
> >   }
> >
> >   @Override
> >   protected void onDelete(AjaxRequestTarget target)
> >   {
> >   LOGGER.debug("Deleting {}", rowModel.getObject());
> >
> >   //proceed to delete the entity
> >
> >   }
> >
> >   });
> >   }
> > });
> >
> > //add other columns
> > 
> >
> > //add the columns to a data table
> > 
> >
> >
> >
> > --
> > Thanks & regards
> > James
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James


Unable to retrieve row model in DataTable while running the application in Jetty

2017-04-21 Thread James Selvakumar
Hi all,

I have a DataTable with some ajax links in the first column. Other columns
are simple property columns. The ajax links are used to edit/delete
associated entities. The ajax links are encapsulated inside a panel.

The DataTable itself is rendered fine.

The problem I face is that the rowModel.getObject() is null when any of the
ajax link is clicked when running the application in Jetty (Maven jetty
plugin).  However, if the application is deployed on Tomcat, everything
works as expected.

Can anyone highlight my mistake, if any here?

Here's how my code looks like:

List columns = new ArrayList();
columns.add(new AbstractColumn(Model.of(getString("name")), "name")
{
@Override
public void populateItem(Item cellItem,
String componentId, final IModel rowModel)
{
cellItem.add(new DataTableActionPanel(componentId,
rowModel.getObject().getName())
{
@Override
protected void onEdit(AjaxRequestTarget target)
{
LOGGER.debug("Editing {}", rowModel.getObject());

//proceed to display another panel to edit the entity

}

@Override
protected void onDelete(AjaxRequestTarget target)
{
LOGGER.debug("Deleting {}", rowModel.getObject());

//proceed to delete the entity

}

});
}
});

//add other columns


//add the columns to a data table




-- 
Thanks & regards
James


Re: Dynamic datatable columns (sequel)

2017-03-20 Thread James Selvakumar
Thanks Sven. That was very clear.

On Fri, Mar 17, 2017 at 3:34 PM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> you can just pass an empty collection of columns to dataTable:
>
> private List<IColumn<Contact, String>> columns = new ArrayList<>();
>
> public DataTablePage() {
> DataTable<Contact, String> dataTable = new
> DefaultDataTable<>("table", columns, dataProvider, 8);
> add();
> }
>
> protected void onConfigure()
> {
> // modify columns as needed
> columns.clear();
> if (...) {
> columns.add(...);
> }
> }
>
> In #onConfigure() you adjust the columns as needed for each rendering -
> that's all.
>
> Sven
>
>
>
> On 17.03.2017 08:20, James Selvakumar wrote:
>
>> Hi Sven,
>>
>> I'm a bit clueless about this.
>> Could you share a little code example to help me? Thanks.
>>
>>
>> On Thu, Mar 16, 2017 at 5:03 PM, James Selvakumar <ja...@mcruncher.com>
>> wrote:
>>
>> Hi Sven,
>>>
>>> Thanks for the info. Will try that out.
>>>
>>> On Thu, Mar 16, 2017 at 4:20 PM, Sven Meier <s...@meiers.net> wrote:
>>>
>>> Hi,
>>>>
>>>> you can just change the columns list (e.g. in #onConfigure) and
>>>> everything will work fine:
>>>>
>>>>https://issues.apache.org/jira/browse/WICKET-4596
>>>>
>>>> Have fun
>>>> Sven
>>>>
>>>>
>>>> On 16.03.2017 04:34, James Selvakumar wrote:
>>>>
>>>> Hi all,
>>>>>
>>>>> I want to render a datatable with dynamically different columns based
>>>>> on
>>>>> user input (via a DropDownChoice) over ajax.
>>>>> I came across this old post
>>>>> <http://apache-wicket.1842946.n4.nabble.com/Dynamic-DataTabl
>>>>> e-columns-td1856733.html>
>>>>> which mentions that this feature might be available in Wicket 1.4.
>>>>> Is this feature available in Wicket now?
>>>>> Can someone explain me how to achieve this?
>>>>>
>>>>>
>>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>>
>>> --
>>> Thanks & regards
>>> James
>>>
>>>
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James


Re: Dynamic datatable columns (sequel)

2017-03-17 Thread James Selvakumar
Hi Sven,

I'm a bit clueless about this.
Could you share a little code example to help me? Thanks.


On Thu, Mar 16, 2017 at 5:03 PM, James Selvakumar <ja...@mcruncher.com>
wrote:

> Hi Sven,
>
> Thanks for the info. Will try that out.
>
> On Thu, Mar 16, 2017 at 4:20 PM, Sven Meier <s...@meiers.net> wrote:
>
>> Hi,
>>
>> you can just change the columns list (e.g. in #onConfigure) and
>> everything will work fine:
>>
>>   https://issues.apache.org/jira/browse/WICKET-4596
>>
>> Have fun
>> Sven
>>
>>
>> On 16.03.2017 04:34, James Selvakumar wrote:
>>
>>> Hi all,
>>>
>>> I want to render a datatable with dynamically different columns based on
>>> user input (via a DropDownChoice) over ajax.
>>> I came across this old post
>>> <http://apache-wicket.1842946.n4.nabble.com/Dynamic-DataTabl
>>> e-columns-td1856733.html>
>>> which mentions that this feature might be available in Wicket 1.4.
>>> Is this feature available in Wicket now?
>>> Can someone explain me how to achieve this?
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Thanks & regards
> James
>



-- 
Thanks & regards
James


Re: Dynamic datatable columns (sequel)

2017-03-16 Thread James Selvakumar
Hi Sven,

Thanks for the info. Will try that out.

On Thu, Mar 16, 2017 at 4:20 PM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> you can just change the columns list (e.g. in #onConfigure) and everything
> will work fine:
>
>   https://issues.apache.org/jira/browse/WICKET-4596
>
> Have fun
> Sven
>
>
> On 16.03.2017 04:34, James Selvakumar wrote:
>
>> Hi all,
>>
>> I want to render a datatable with dynamically different columns based on
>> user input (via a DropDownChoice) over ajax.
>> I came across this old post
>> <http://apache-wicket.1842946.n4.nabble.com/Dynamic-DataTabl
>> e-columns-td1856733.html>
>> which mentions that this feature might be available in Wicket 1.4.
>> Is this feature available in Wicket now?
>> Can someone explain me how to achieve this?
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James


Dynamic datatable columns (sequel)

2017-03-15 Thread James Selvakumar
Hi all,

I want to render a datatable with dynamically different columns based on
user input (via a DropDownChoice) over ajax.
I came across this old post

which mentions that this feature might be available in Wicket 1.4.
Is this feature available in Wicket now?
Can someone explain me how to achieve this?

-- 
Thanks & regards
James


Can @Inject annotation be used instead of @SpringBean to inject Spring beans?

2017-01-30 Thread James Selvakumar
Hi all,

I've always used @SpringBean annotation to inject Spring beans in my Wicket
components.
We found that we could also use the standard @Inject annotation in Wicket
components.
Is it advisable to use @Inject instead of @SpringBean?
Or should we continue to use @SpringBean?

-- 
Thanks & regards
James


Re: Error while calling Wicket from a JavaScript function

2017-01-18 Thread James Selvakumar
Thanks for the clear explanation Martin.

On Wed, Jan 18, 2017, 8:30 PM Martin Grigorov <mgrigo...@apache.org> wrote:

> On Wed, Jan 18, 2017 at 10:35 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Hi Martin,
> >
> > Is it possible to return a value from the ajax behavior while responding
> to
> > the ajax call?
> > I'm trying to do something like this in the server side:
> >
> > target.appendJavaScript("foo");
> > >
> >
> > And then try to use it in my JavaScript:
> >
> > var foo = Wicket.Ajax.get({ u: window.callbackUrl });
> >
>
> .get() makes an Ajax call, so it doesn't return a value
> You can use the callback methods (complete, success, failure) to get the
> returned response from the server
>
> But I think you don't need to use 'foo' from the server as a variable.
> You really need: target.appendJavaScript("doNextStep(foo)")
> I.e. execute something else once the Ajax call returns
>
>
>
> > > //do some processing with foo
> > >
> >
> > Is this valid? Or is there a better way?
> >
> >
> >
> > On Wed, Jan 18, 2017 at 5:26 PM, James Selvakumar <ja...@mcruncher.com>
> > wrote:
> >
> > > Thanks a lot Martin. You're right. I had something else in my code and
> > > after I fixed it, I managed to make a ajax call from JavaScript.
> > >
> > > On Wed, Jan 18, 2017 at 5:07 PM, Martin Grigorov <mgrigo...@apache.org
> >
> > > wrote:
> > >
> > >> There is no variable named 'a' in your code snippet.
> > >> It might be another problem.
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >> https://twitter.com/mtgrigorov
> > >>
> > >> On Wed, Jan 18, 2017 at 10:04 AM, James Selvakumar <
> ja...@mcruncher.com
> > >
> > >> wrote:
> > >>
> > >> > Hi Martin,
> > >> >
> > >> > I tried your suggestion but I'm still getting the same TypeError.
> > >> >
> > >> > On Wed, Jan 18, 2017 at 4:55 PM, James Selvakumar <
> > ja...@mcruncher.com>
> > >> > wrote:
> > >> >
> > >> > > Thanks Martin for the super fast reply. I'll try that out.
> > >> > >
> > >> > > On Wed, Jan 18, 2017 at 4:54 PM, Martin Grigorov <
> > >> mgrigo...@apache.org>
> > >> > > wrote:
> > >> > >
> > >> > >> var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
> > >> > >> should be
> > >> > >> var wcall = Wicket.Ajax.get({ u: window.callbackUrl });
> > >> > >>
> > >> > >> Martin Grigorov
> > >> > >> Wicket Training and Consulting
> > >> > >> https://twitter.com/mtgrigorov
> > >> > >>
> > >> > >> On Wed, Jan 18, 2017 at 9:51 AM, James Selvakumar <
> > >> ja...@mcruncher.com>
> > >> > >> wrote:
> > >> > >>
> > >> > >> > Dear Wicket team,
> > >> > >> >
> > >> > >> > I need to make a call to a Wicket page from my JavaScript
> > function.
> > >> > >> > I followed the guide Calling Wicket from Javascript
> > >> > >> > <https://cwiki.apache.org/confluence/display/WICKET/
> > >> > >> > Calling+Wicket+from+Javascript>
> > >> > >> > and managed to define an ajax behavior to respond to the
> > JavaScript
> > >> > >> call.
> > >> > >> >
> > >> > >> > My ajax behavior looks like this:
> > >> > >> >
> > >> > >> > > private final AbstractDefaultAjaxBehavior behave = new
> > >> > >> > AbstractDefaultAjaxBehavior()
> > >> > >> > > {
> > >> > >> > > protected void respond(final AjaxRequestTarget target)
> > >> > >> > > {
> > >> > >> > > LOGGER.debug("Received a request from client to get
> the
> > >> > >> > encryption key");
> > >> > >> > > target.add(new Label("foo", "Yeah I was just called
> > from
> > >> > >> > Javascript!"));
> > >

Re: Error while calling Wicket from a JavaScript function

2017-01-18 Thread James Selvakumar
Hi Martin,

Is it possible to return a value from the ajax behavior while responding to
the ajax call?
I'm trying to do something like this in the server side:

target.appendJavaScript("foo");
>

And then try to use it in my JavaScript:

var foo = Wicket.Ajax.get({ u: window.callbackUrl });
> //do some processing with foo
>

Is this valid? Or is there a better way?



On Wed, Jan 18, 2017 at 5:26 PM, James Selvakumar <ja...@mcruncher.com>
wrote:

> Thanks a lot Martin. You're right. I had something else in my code and
> after I fixed it, I managed to make a ajax call from JavaScript.
>
> On Wed, Jan 18, 2017 at 5:07 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> There is no variable named 'a' in your code snippet.
>> It might be another problem.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Jan 18, 2017 at 10:04 AM, James Selvakumar <ja...@mcruncher.com>
>> wrote:
>>
>> > Hi Martin,
>> >
>> > I tried your suggestion but I'm still getting the same TypeError.
>> >
>> > On Wed, Jan 18, 2017 at 4:55 PM, James Selvakumar <ja...@mcruncher.com>
>> > wrote:
>> >
>> > > Thanks Martin for the super fast reply. I'll try that out.
>> > >
>> > > On Wed, Jan 18, 2017 at 4:54 PM, Martin Grigorov <
>> mgrigo...@apache.org>
>> > > wrote:
>> > >
>> > >> var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
>> > >> should be
>> > >> var wcall = Wicket.Ajax.get({ u: window.callbackUrl });
>> > >>
>> > >> Martin Grigorov
>> > >> Wicket Training and Consulting
>> > >> https://twitter.com/mtgrigorov
>> > >>
>> > >> On Wed, Jan 18, 2017 at 9:51 AM, James Selvakumar <
>> ja...@mcruncher.com>
>> > >> wrote:
>> > >>
>> > >> > Dear Wicket team,
>> > >> >
>> > >> > I need to make a call to a Wicket page from my JavaScript function.
>> > >> > I followed the guide Calling Wicket from Javascript
>> > >> > <https://cwiki.apache.org/confluence/display/WICKET/
>> > >> > Calling+Wicket+from+Javascript>
>> > >> > and managed to define an ajax behavior to respond to the JavaScript
>> > >> call.
>> > >> >
>> > >> > My ajax behavior looks like this:
>> > >> >
>> > >> > > private final AbstractDefaultAjaxBehavior behave = new
>> > >> > AbstractDefaultAjaxBehavior()
>> > >> > > {
>> > >> > > protected void respond(final AjaxRequestTarget target)
>> > >> > > {
>> > >> > > LOGGER.debug("Received a request from client to get the
>> > >> > encryption key");
>> > >> > > target.add(new Label("foo", "Yeah I was just called from
>> > >> > Javascript!"));
>> > >> > > }
>> > >> > >
>> > >> > > public void renderHead(Component component, IHeaderResponse
>> > >> response)
>> > >> > > {
>> > >> > > super.renderHead(component, response);
>> > >> > > String callbackUrl = getCallbackUrl().toString();
>> > >> > > response.render(JavaScriptHeaderItem.forScript("var
>> > >> > callbackUrl='" + callbackUrl + "';", "values"));
>> > >> > > }
>> > >> > > };
>> > >> > >
>> > >> > > This callback url got rendered in the page like this:
>> > >> >
>> > >> > 
>> > >> > > /*<![CDATA[*/
>> > >> > > var callbackUrl='./wicket/page?0-1.IBehaviorListener.0-';
>> > >> > > /*]]>*/
>> > >> > > 
>> > >> > >
>> > >> >
>> > >> >
>> > >> > And here is my JavaScript code:
>> > >> >
>> > >> > > var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
>> > >> > > alert(wcall);
>> > >> > >
>> > >> > > But I'm getting the following error in the Wicket Ajax Debug
>> Window:
>> > >> >
>> > >> > *An error occurred while executing Ajax request:TypeError: a is
>> > >> undefined*
>> > >> > >
>> > >> >
>> > >> > Can someone point out what's the mistake here?
>> > >> >
>> > >> > --
>> > >> > Thanks & regards
>> > >> > James
>> > >> >
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Thanks & regards
>> > > James Selvakumar
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & regards
>> > James
>> >
>>
>
>
>
> --
> Thanks & regards
> James
>



-- 
Thanks & regards
James


Re: Error while calling Wicket from a JavaScript function

2017-01-18 Thread James Selvakumar
Thanks a lot Martin. You're right. I had something else in my code and
after I fixed it, I managed to make a ajax call from JavaScript.

On Wed, Jan 18, 2017 at 5:07 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> There is no variable named 'a' in your code snippet.
> It might be another problem.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Jan 18, 2017 at 10:04 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Hi Martin,
> >
> > I tried your suggestion but I'm still getting the same TypeError.
> >
> > On Wed, Jan 18, 2017 at 4:55 PM, James Selvakumar <ja...@mcruncher.com>
> > wrote:
> >
> > > Thanks Martin for the super fast reply. I'll try that out.
> > >
> > > On Wed, Jan 18, 2017 at 4:54 PM, Martin Grigorov <mgrigo...@apache.org
> >
> > > wrote:
> > >
> > >> var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
> > >> should be
> > >> var wcall = Wicket.Ajax.get({ u: window.callbackUrl });
> > >>
> > >> Martin Grigorov
> > >> Wicket Training and Consulting
> > >> https://twitter.com/mtgrigorov
> > >>
> > >> On Wed, Jan 18, 2017 at 9:51 AM, James Selvakumar <
> ja...@mcruncher.com>
> > >> wrote:
> > >>
> > >> > Dear Wicket team,
> > >> >
> > >> > I need to make a call to a Wicket page from my JavaScript function.
> > >> > I followed the guide Calling Wicket from Javascript
> > >> > <https://cwiki.apache.org/confluence/display/WICKET/
> > >> > Calling+Wicket+from+Javascript>
> > >> > and managed to define an ajax behavior to respond to the JavaScript
> > >> call.
> > >> >
> > >> > My ajax behavior looks like this:
> > >> >
> > >> > > private final AbstractDefaultAjaxBehavior behave = new
> > >> > AbstractDefaultAjaxBehavior()
> > >> > > {
> > >> > > protected void respond(final AjaxRequestTarget target)
> > >> > > {
> > >> > > LOGGER.debug("Received a request from client to get the
> > >> > encryption key");
> > >> > > target.add(new Label("foo", "Yeah I was just called from
> > >> > Javascript!"));
> > >> > > }
> > >> > >
> > >> > > public void renderHead(Component component, IHeaderResponse
> > >> response)
> > >> > > {
> > >> > > super.renderHead(component, response);
> > >> > > String callbackUrl = getCallbackUrl().toString();
> > >> > > response.render(JavaScriptHeaderItem.forScript("var
> > >> > callbackUrl='" + callbackUrl + "';", "values"));
> > >> > > }
> > >> > > };
> > >> > >
> > >> > > This callback url got rendered in the page like this:
> > >> >
> > >> > 
> > >> > > /*<![CDATA[*/
> > >> > > var callbackUrl='./wicket/page?0-1.IBehaviorListener.0-';
> > >> > > /*]]>*/
> > >> > > 
> > >> > >
> > >> >
> > >> >
> > >> > And here is my JavaScript code:
> > >> >
> > >> > > var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
> > >> > > alert(wcall);
> > >> > >
> > >> > > But I'm getting the following error in the Wicket Ajax Debug
> Window:
> > >> >
> > >> > *An error occurred while executing Ajax request:TypeError: a is
> > >> undefined*
> > >> > >
> > >> >
> > >> > Can someone point out what's the mistake here?
> > >> >
> > >> > --
> > >> > Thanks & regards
> > >> > James
> > >> >
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & regards
> > > James Selvakumar
> > >
> >
> >
> >
> > --
> > Thanks & regards
> > James
> >
>



-- 
Thanks & regards
James


Re: Error while calling Wicket from a JavaScript function

2017-01-18 Thread James Selvakumar
Hi Martin,

I tried your suggestion but I'm still getting the same TypeError.

On Wed, Jan 18, 2017 at 4:55 PM, James Selvakumar <ja...@mcruncher.com>
wrote:

> Thanks Martin for the super fast reply. I'll try that out.
>
> On Wed, Jan 18, 2017 at 4:54 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
>> should be
>> var wcall = Wicket.Ajax.get({ u: window.callbackUrl });
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Wed, Jan 18, 2017 at 9:51 AM, James Selvakumar <ja...@mcruncher.com>
>> wrote:
>>
>> > Dear Wicket team,
>> >
>> > I need to make a call to a Wicket page from my JavaScript function.
>> > I followed the guide Calling Wicket from Javascript
>> > <https://cwiki.apache.org/confluence/display/WICKET/
>> > Calling+Wicket+from+Javascript>
>> > and managed to define an ajax behavior to respond to the JavaScript
>> call.
>> >
>> > My ajax behavior looks like this:
>> >
>> > > private final AbstractDefaultAjaxBehavior behave = new
>> > AbstractDefaultAjaxBehavior()
>> > > {
>> > > protected void respond(final AjaxRequestTarget target)
>> > > {
>> > > LOGGER.debug("Received a request from client to get the
>> > encryption key");
>> > > target.add(new Label("foo", "Yeah I was just called from
>> > Javascript!"));
>> > > }
>> > >
>> > > public void renderHead(Component component, IHeaderResponse
>> response)
>> > > {
>> > > super.renderHead(component, response);
>> > > String callbackUrl = getCallbackUrl().toString();
>> > > response.render(JavaScriptHeaderItem.forScript("var
>> > callbackUrl='" + callbackUrl + "';", "values"));
>> > > }
>> > > };
>> > >
>> > > This callback url got rendered in the page like this:
>> >
>> > 
>> > > /*<![CDATA[*/
>> > > var callbackUrl='./wicket/page?0-1.IBehaviorListener.0-';
>> > > /*]]>*/
>> > > 
>> > >
>> >
>> >
>> > And here is my JavaScript code:
>> >
>> > > var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
>> > > alert(wcall);
>> > >
>> > > But I'm getting the following error in the Wicket Ajax Debug Window:
>> >
>> > *An error occurred while executing Ajax request:TypeError: a is
>> undefined*
>> > >
>> >
>> > Can someone point out what's the mistake here?
>> >
>> > --
>> > Thanks & regards
>> > James
>> >
>>
>
>
>
> --
> Thanks & regards
> James Selvakumar
>



-- 
Thanks & regards
James


Re: Error while calling Wicket from a JavaScript function

2017-01-18 Thread James Selvakumar
Thanks Martin for the super fast reply. I'll try that out.

On Wed, Jan 18, 2017 at 4:54 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
> should be
> var wcall = Wicket.Ajax.get({ u: window.callbackUrl });
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Jan 18, 2017 at 9:51 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Dear Wicket team,
> >
> > I need to make a call to a Wicket page from my JavaScript function.
> > I followed the guide Calling Wicket from Javascript
> > <https://cwiki.apache.org/confluence/display/WICKET/
> > Calling+Wicket+from+Javascript>
> > and managed to define an ajax behavior to respond to the JavaScript call.
> >
> > My ajax behavior looks like this:
> >
> > > private final AbstractDefaultAjaxBehavior behave = new
> > AbstractDefaultAjaxBehavior()
> > > {
> > > protected void respond(final AjaxRequestTarget target)
> > > {
> > > LOGGER.debug("Received a request from client to get the
> > encryption key");
> > > target.add(new Label("foo", "Yeah I was just called from
> > Javascript!"));
> > > }
> > >
> > > public void renderHead(Component component, IHeaderResponse
> response)
> > > {
> > > super.renderHead(component, response);
> > > String callbackUrl = getCallbackUrl().toString();
> > > response.render(JavaScriptHeaderItem.forScript("var
> > callbackUrl='" + callbackUrl + "';", "values"));
> > > }
> > > };
> > >
> > > This callback url got rendered in the page like this:
> >
> > 
> > > /*<![CDATA[*/
> > > var callbackUrl='./wicket/page?0-1.IBehaviorListener.0-';
> > > /*]]>*/
> > > 
> > >
> >
> >
> > And here is my JavaScript code:
> >
> > > var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
> > > alert(wcall);
> > >
> > > But I'm getting the following error in the Wicket Ajax Debug Window:
> >
> > *An error occurred while executing Ajax request:TypeError: a is
> undefined*
> > >
> >
> > Can someone point out what's the mistake here?
> >
> > --
> > Thanks & regards
> > James
> >
>



-- 
Thanks & regards
James Selvakumar


Error while calling Wicket from a JavaScript function

2017-01-18 Thread James Selvakumar
Dear Wicket team,

I need to make a call to a Wicket page from my JavaScript function.
I followed the guide Calling Wicket from Javascript

and managed to define an ajax behavior to respond to the JavaScript call.

My ajax behavior looks like this:

> private final AbstractDefaultAjaxBehavior behave = new 
> AbstractDefaultAjaxBehavior()
> {
> protected void respond(final AjaxRequestTarget target)
> {
> LOGGER.debug("Received a request from client to get the encryption 
> key");
> target.add(new Label("foo", "Yeah I was just called from 
> Javascript!"));
> }
>
> public void renderHead(Component component, IHeaderResponse response)
> {
> super.renderHead(component, response);
> String callbackUrl = getCallbackUrl().toString();
> response.render(JavaScriptHeaderItem.forScript("var callbackUrl='" + 
> callbackUrl + "';", "values"));
> }
> };
>
> This callback url got rendered in the page like this:


> /* var callbackUrl='./wicket/page?0-1.IBehaviorListener.0-';
> /*]]>*/
> 
>


And here is my JavaScript code:

> var wcall = Wicket.Ajax.get({ u: '${callbackUrl}'});
> alert(wcall);
>
> But I'm getting the following error in the Wicket Ajax Debug Window:

*An error occurred while executing Ajax request:TypeError: a is undefined*
>

Can someone point out what's the mistake here?

-- 
Thanks & regards
James


Re: Encrypt selected form data before submitting the request to Server

2017-01-16 Thread James Selvakumar
Hi Rob,

Thanks for taking time to reply. And many thanks for the detailed example.
Yes, having the secret rendered makes this approach questionable while
using encryption.
But what you've shared will be sufficient if one were to use other
techniques like hashing etc.

On Mon, Jan 16, 2017 at 4:18 PM, Rob Audenaerde <rob.audenae...@gmail.com>
wrote:

> >
> > Thanks Martin.
> > Hi Rob, your approach looks interesting.
> > Can you please elaborate on that?
> >
>
> Yes. Although I don't really see the point. The secret that is passed on
> will be readable by an attacker if the attacker could otherwise access the
> fields in the form, effectively rendering this 'security by obscuriry'. The
> only way around this is to pass the secret by other means to the client and
> have them provide it in the form, or use some other type of PKI (which is
> what HTTPS is supposed to do).
>
> -
>
> I would create a Form with a hidden field and an extra attrribute, the
> secret:
>
> Form secretForm = new Form ( ) {  ... };
>
> secretForm.setOutputMarkupId(true);
> IModel encodedResult = new Model<>();
> secretForm.add(AttributeModifier.append("secret",
> Model.of("SuperDuperSecret"));
> secretForm.add(new HiddenField("secret", encodedResult));
> secretForm.add(AjaxButton asb= new AjaxButton("submit")
> {
> @Override
> protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
> {
> super.updateAjaxAttributes( attributes );
> attributes.getAjaxCallListeners().add( new AjaxCallListener()
> {
> @Override
> public CharSequence getBeforeHandler( Component component )
> {
> //I think you should do the encoding here, something with JSON, JQuery,
> return "encryptFormToHiddenField( " + secretForm.getMarkupId() + " ) " ;
> }
> } );
> }
> }; );
>
>
> In the onSubmit() of the form you can access the contents of the
> encodedResult, use the ''SuperDuperSecret" to decode it.
>
> Now that I'm writing it, I think you also want to prevent the other values
> from being sent.. Maybe you could empy the values using JavaScript?
>
>
>
> -Rob
>



-- 
Thanks & regards
James Selvakumar


Re: Encrypt selected form data before submitting the request to Server

2017-01-15 Thread James Selvakumar
Thanks Martin.
Hi Rob, your approach looks interesting.
Can you please elaborate on that?

On Mon, Jan 16, 2017 at 3:46 PM, Rob Audenaerde <rob.audenae...@gmail.com>
wrote:

> Ah you wrote about the synchronous ajax at the same time as my message :)
>
> (and sorry for the typo in your name, Martin!)
>
>
> On Mon, Jan 16, 2017 at 8:45 AM, Rob Audenaerde <rob.audenae...@gmail.com>
> wrote:
>
> > @Marin I thought synchronous Ajax is actively discouraged now? Or is it
> > supported through webworkers now? (see: https://xhr.spec.whatwg.org/#
> > the-open()-method )
> >
> > I would just generate a random secret the moment the form is rendered.
> > Then, in javascript, you can use your favorite symmetric block cipher to
> > replace the values/encode them in json (for example in a hidden field.
> > Server side you do the reverse
> >
> > -Rob
> >
> > On Mon, Jan 16, 2017 at 8:36 AM, James Selvakumar <ja...@mcruncher.com>
> > wrote:
> >
> >> Hi Martin,
> >>
> >> Thanks a lot for your response.
> >> Can I add this behavior directly to the form or should this be added to
> a
> >> form component?
> >> Will this work on Wicket 6.x?
> >>
> >> On Mon, Jan 16, 2017 at 3:29 PM, Martin Grigorov <mgrigo...@apache.org>
> >> wrote:
> >>
> >> > Hi,
> >> >
> >> > The easiest way I see is to use onBeforeSend() callback listener on
> the
> >> > Ajax submit behavior of the form.
> >> > There you can do a **synchronous** Ajax call to get your key and then
> >> > modify (i.e. encrypt) the data to be sent.
> >> >
> >> > Martin Grigorov
> >> > Wicket Training and Consulting
> >> > https://twitter.com/mtgrigorov
> >> >
> >> > On Mon, Jan 16, 2017 at 8:08 AM, James Selvakumar <
> ja...@mcruncher.com>
> >> > wrote:
> >> >
> >> > > Hi all,
> >> > >
> >> > > I have this requirement where some of the data entered by the user
> >> are to
> >> > > be encrypted in the client side before the request is submitted to
> the
> >> > > Wicket server even though the communication is over HTTPS.
> >> > >
> >> > > I am thinking of having some JavaScript code in the client which
> shall
> >> > > intercept the form submission, request the Server for a randomly
> >> > generated
> >> > > key and encrypt the form data using the key received and then submit
> >> the
> >> > > form again.
> >> > >
> >> > > Any idea how to achieve this in Wicket?
> >> > >
> >> > > --
> >> > > Thanks & regards
> >> > > James
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Thanks & regards
> >> James Selvakumar
> >>
> >
> >
>



-- 
Thanks & regards
James Selvakumar


Encrypt selected form data before submitting the request to Server

2017-01-15 Thread James Selvakumar
Hi all,

I have this requirement where some of the data entered by the user are to
be encrypted in the client side before the request is submitted to the
Wicket server even though the communication is over HTTPS.

I am thinking of having some JavaScript code in the client which shall
intercept the form submission, request the Server for a randomly generated
key and encrypt the form data using the key received and then submit the
form again.

Any idea how to achieve this in Wicket?

-- 
Thanks & regards
James


Re: File upload using REST API

2016-10-30 Thread James Selvakumar
Hi Andrea,

Thanks for your reply.
Maybe I'll look into it. But it'll be great if there is standard support
for this.


On Mon, Oct 24, 2016 at 11:10 PM, Andrea Del Bene <an.delb...@gmail.com>
wrote:

> Hi,
>
> I haven't any code that does file upload, but I think you need to
> implement a custom IWebSerialDeserial that extracts file (or a list of
> them) from request an then you can pass this value to your REST resource
> with annotation @RequestBody. Files can be extracted from request in the
> usual way:
>
> http://stackoverflow.com/questions/2422468/how-to-upload-
> files-to-server-using-jsp-servlet
>
> On 24/10/2016 08:13, James Selvakumar wrote:
>
>> Dear friends,
>>
>> I want to upload a file using REST API.
>> I'm already using WicketStuff REST library.
>> I searched and couldn't see any example based on Wicket.
>> Can anyone guide me to understand how to do this in Wicket?
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James Selvakumar


File upload using REST API

2016-10-24 Thread James Selvakumar
Dear friends,

I want to upload a file using REST API.
I'm already using WicketStuff REST library.
I searched and couldn't see any example based on Wicket.
Can anyone guide me to understand how to do this in Wicket?

-- 
Thanks in advance,
James Selvakumar


Re: Reload Wicket classes/markup without reloading Servlet Container

2016-09-07 Thread James Selvakumar
Thanks for the correction.
I'm sorry I am not familiar with DCEVM.
Anyhow, thank you very much for all your input.

On Wed, Sep 7, 2016 at 5:29 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> On Wed, Sep 7, 2016 at 11:24 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Thanks Martin. Will try that out.
> > I assume Jetty + DCEVM can reload Spring beans as well.
> >
>
> Wrong assumption!
> JRebel can do that.
> Spring Boot devutils can do it too.
>
> DCEVM is just an enhanced JRE that knows how to reload classes without
> restart. It doesn't know anything about frameworks.
>
>
> >
> > On Wed, Sep 7, 2016 at 5:19 PM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > I use embedded Jetty + DCEVM for all my Wicket projects.
> > > I haven't had any problems with multi module projects.
> > > DCEVM is an entension to the JRE so it doesn't care how exactly the
> > runtime
> > > classpath is constructed.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Sep 7, 2016 at 11:13 AM, James Selvakumar <ja...@mcruncher.com
> >
> > > wrote:
> > >
> > > > Dear friends,
> > > >
> > > > Thank you very much for your suggestions.
> > > > I was using JRebel before but was fed up with the frequent change in
> > > their
> > > > licensing module.
> > > > I don't think Jetty can reload classes in a multi module Maven
> project?
> > > Can
> > > > it?
> > > > Has anyone used DCEVM successfully in a multi module Maven project?
> > > > Thanks for mentioning about Stage Monitor, but is it related to what
> we
> > > are
> > > > discussing? Looks more like a performance monitoring app to me.
> Please
> > > > correct me if my understanding is wrong.
> > > >
> > > > On Tue, Sep 6, 2016 at 4:21 PM, Marc <marcgiff...@web.de> wrote:
> > > >
> > > > > Spring Boot users can use Spring Boot developer tools:
> > > > > http://docs.spring.io/spring-boot/docs/current/reference/
> > > > > html/using-boot-devtools.html
> > > > >
> > > > > Not comparable to JRebel but does the job quite well.
> > > > >
> > > > > --
> > > > > View this message in context: http://apache-wicket.1842946.
> > > > > n4.nabble.com/Reload-Wicket-classes-markup-without-
> > > > > reloading-Servlet-Container-tp4675422p4675449.html
> > > > > Sent from the Users forum mailing list archive at Nabble.com.
> > > > >
> > > > > 
> > -
> > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Thanks & regards
> > > > James Selvakumar
> > > > mCruncher
> > > >
> > >
> >
> >
> >
> > --
> > Thanks & regards
> > James Selvakumar
> > mCruncher
> >
>



-- 
Thanks & regards
James Selvakumar
mCruncher


Re: Reload Wicket classes/markup without reloading Servlet Container

2016-09-07 Thread James Selvakumar
Thanks Martin. Will try that out.
I assume Jetty + DCEVM can reload Spring beans as well.

On Wed, Sep 7, 2016 at 5:19 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> I use embedded Jetty + DCEVM for all my Wicket projects.
> I haven't had any problems with multi module projects.
> DCEVM is an entension to the JRE so it doesn't care how exactly the runtime
> classpath is constructed.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Sep 7, 2016 at 11:13 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
> > Dear friends,
> >
> > Thank you very much for your suggestions.
> > I was using JRebel before but was fed up with the frequent change in
> their
> > licensing module.
> > I don't think Jetty can reload classes in a multi module Maven project?
> Can
> > it?
> > Has anyone used DCEVM successfully in a multi module Maven project?
> > Thanks for mentioning about Stage Monitor, but is it related to what we
> are
> > discussing? Looks more like a performance monitoring app to me. Please
> > correct me if my understanding is wrong.
> >
> > On Tue, Sep 6, 2016 at 4:21 PM, Marc <marcgiff...@web.de> wrote:
> >
> > > Spring Boot users can use Spring Boot developer tools:
> > > http://docs.spring.io/spring-boot/docs/current/reference/
> > > html/using-boot-devtools.html
> > >
> > > Not comparable to JRebel but does the job quite well.
> > >
> > > --
> > > View this message in context: http://apache-wicket.1842946.
> > > n4.nabble.com/Reload-Wicket-classes-markup-without-
> > > reloading-Servlet-Container-tp4675422p4675449.html
> > > Sent from the Users forum mailing list archive at Nabble.com.
> > >
> > > ---------
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Thanks & regards
> > James Selvakumar
> > mCruncher
> >
>



-- 
Thanks & regards
James Selvakumar
mCruncher


Re: Reload Wicket classes/markup without reloading Servlet Container

2016-09-07 Thread James Selvakumar
Dear friends,

Thank you very much for your suggestions.
I was using JRebel before but was fed up with the frequent change in their
licensing module.
I don't think Jetty can reload classes in a multi module Maven project? Can
it?
Has anyone used DCEVM successfully in a multi module Maven project?
Thanks for mentioning about Stage Monitor, but is it related to what we are
discussing? Looks more like a performance monitoring app to me. Please
correct me if my understanding is wrong.

On Tue, Sep 6, 2016 at 4:21 PM, Marc <marcgiff...@web.de> wrote:

> Spring Boot users can use Spring Boot developer tools:
> http://docs.spring.io/spring-boot/docs/current/reference/
> html/using-boot-devtools.html
>
> Not comparable to JRebel but does the job quite well.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Reload-Wicket-classes-markup-without-
> reloading-Servlet-Container-tp4675422p4675449.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Thanks & regards
James Selvakumar
mCruncher


Reload Wicket classes/markup without reloading Servlet Container

2016-09-01 Thread 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


Re: DCEVM and Hotswap agent support

2014-11-28 Thread James Selvakumar
Hi Martin,

Thanks for sharing your experience.
How about changes to HTML, CSS or property files?
Does it load those changes too?


On Fri, Nov 28, 2014 at 4:08 PM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 I use DCEVM (via its Intellij IDEA plugin) every day and I'm very happy
 with it. Very rarely I need to restart after making changes to classes.
 I have no experience with HotswapAgent.

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

 On Fri, Nov 28, 2014 at 3:04 AM, James Selvakumar ja...@mcruncher.com
 wrote:

  Dear Wicket Community,
 
  Just curious if any of you had a look at DCEVM and
  https://github.com/HotswapProjects/HotswapAgent.
  HotSwapAgent is basically a byte code converter (similar to JRebel) and
  already has plugins to support Spring, Hibernate, JSF.
  Would like to hear your experience in using this with Wicket.
 
  --
  Thanks  regards
  James Selvakumar
  mCruncher
 




-- 
Thanks  regards
James Selvakumar
mCruncher


DCEVM and Hotswap agent support

2014-11-27 Thread James Selvakumar
Dear Wicket Community,

Just curious if any of you had a look at DCEVM and
https://github.com/HotswapProjects/HotswapAgent.
HotSwapAgent is basically a byte code converter (similar to JRebel) and
already has plugins to support Spring, Hibernate, JSF.
Would like to hear your experience in using this with Wicket.

-- 
Thanks  regards
James Selvakumar
mCruncher


Re: DropDownChoice with RequiredTextField

2013-08-27 Thread James Selvakumar
Try calling form.modelChanged() before you add the component to the ajax
target.


On Mon, Aug 12, 2013 at 9:37 AM, Vignesh Palanisamy
vign...@mcruncher.comwrote:

 Hi,

 i had a CompoundPropertyModel form.
 In that form i had added RequiredTextField and a DropDownChoice.
 While changing the dropdownchoice, RequiredtestField have to change.

 for that, I had mark SetOutputMarkUpId true to the RequiredTestField and
 add ajaxFormUpdatingBehaviour to the dropdownchoice add the dropdownchoice
 to the target. it works fine

 But my problem is after changing the Dropdownchoice i had clear the
 RequiredTextField and click save the is required error message arise for
 the RequiredTextField. Then once again i had change the dropdownchoice now
 the RequiredField is not updating.



 Thanks

  Vignesh Palanisamy




-- 
Thanks  regards
James Selvakumar
mCruncher


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

2013-07-04 Thread James Selvakumar
Hi Sven,

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


On Thu, Jul 4, 2013 at 3:16 PM, Sven Meier s...@meiers.net wrote:

 Hi,

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

 Sven


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

 Hi Jesse,

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


 On Wed, Jul 3, 2013 at 3:12 PM, Jesse Long j...@unknown.za.net wrote:

  Hi James,

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

   * IFormSubmitListener#onFormSubmitted()

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

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

 So, the children of ListView that are present during Page#onRender() are
 not the same children that were present during IFormSubmitListener#
 onFormSubmitted(),

 and hence not the same children that had the feedback messages.

 Cheers,
 Jesse


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

  No.


 On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier s...@meiers.net wrote:

   Are you using listView.setReuseItems(true) ?

 Sven


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

   Hi all,

 I've the following component heirarchy:

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


 form:submitButton

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

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

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

 However it doesn't work for for panel1DropDownChoice.

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

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

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

 *public class ValidationMsgBehavior extends Behavior

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



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


 getMessage().toString();
} else {
error = Your input is invalid.;
}
fc.getResponse().write(
div class=\text-error\ + error +
 /div);
}else{
logger.debug(Form component {} is valid, fc);
}
}
 }*

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


   --**--**
 --**

 --**-
 To unsubscribe, e-mail: users-unsubscribe@wicket.apa**che.org
 http://apache.org**
 users-unsubscribe@**wicket.**apache.org http://wicket.apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 

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






 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org

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




-- 
Thanks  regards
James Selvakumar
mCruncher


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

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


On Wed, Jul 3, 2013 at 3:12 PM, Jesse Long j...@unknown.za.net wrote:

 Hi James,

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

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

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

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

 Cheers,
 Jesse


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

 No.


 On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier s...@meiers.net wrote:

  Are you using listView.setReuseItems(true) ?

 Sven


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

  Hi all,

 I've the following component heirarchy:

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

 form:submitButton

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

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

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

 However it doesn't work for for panel1DropDownChoice.

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

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

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

 *public class ValidationMsgBehavior extends Behavior

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


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

 getMessage().toString();
   } else {
   error = Your input is invalid.;
   }
   fc.getResponse().write(
   div class=\text-error\ + error + /div);
   }else{
   logger.debug(Form component {} is valid, fc);
   }
   }
 }*

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


  --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 

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







-- 
Thanks  regards
James Selvakumar
mCruncher


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

2013-07-03 Thread James Selvakumar
Hi Jesse,

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


On Wed, Jul 3, 2013 at 3:12 PM, Jesse Long j...@unknown.za.net wrote:

 Hi James,

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

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

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

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

 Cheers,
 Jesse


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

 No.


 On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier s...@meiers.net wrote:

  Are you using listView.setReuseItems(true) ?

 Sven


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

  Hi all,

 I've the following component heirarchy:

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

 form:submitButton

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

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

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

 However it doesn't work for for panel1DropDownChoice.

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

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

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

 *public class ValidationMsgBehavior extends Behavior

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


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

 getMessage().toString();
   } else {
   error = Your input is invalid.;
   }
   fc.getResponse().write(
   div class=\text-error\ + error + /div);
   }else{
   logger.debug(Form component {} is valid, fc);
   }
   }
 }*

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


  --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 

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







-- 
Thanks  regards
James Selvakumar
mCruncher


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

2013-07-02 Thread James Selvakumar
Hi all,

I've the following component heirarchy:

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

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

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

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

However it doesn't work for for panel1DropDownChoice.

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

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

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

*public class ValidationMsgBehavior extends Behavior
{
private static Logger logger =
LoggerFactory.getLogger(ValidationMsgBehavior.class);

@Override
public void afterRender(Component c)
{
logger.debug(Preparing to add validation msg for the component
{}, c);
FormComponent fc = (FormComponent) c;
if (!fc.isValid()) {
String error;
if (fc.hasFeedbackMessage()) {
logger.debug(Form component {} has feedback messages, fc);
error =
fc.getFeedbackMessages().first(FeedbackMessage.ERROR).getMessage().toString();
} else {
error = Your input is invalid.;
}
fc.getResponse().write(
div class=\text-error\ + error + /div);
}else{
logger.debug(Form component {} is valid, fc);
}
}
}*

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

-- 
Thanks  regards
James Selvakumar


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

2013-07-02 Thread James Selvakumar
No.


On Tue, Jul 2, 2013 at 7:04 PM, Sven Meier s...@meiers.net wrote:

 Are you using listView.setReuseItems(true) ?

 Sven


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

 Hi all,

 I've the following component heirarchy:

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

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

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

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

 However it doesn't work for for panel1DropDownChoice.

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

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

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

 *public class ValidationMsgBehavior extends Behavior

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

  @Override
  public void afterRender(Component c)
  {
  logger.debug(Preparing to add validation msg for the component
 {}, c);
  FormComponent fc = (FormComponent) c;
  if (!fc.isValid()) {
  String error;
  if (fc.hasFeedbackMessage()) {
  logger.debug(Form component {} has feedback messages,
 fc);
  error =
 fc.getFeedbackMessages().**first(FeedbackMessage.ERROR).**
 getMessage().toString();
  } else {
  error = Your input is invalid.;
  }
  fc.getResponse().write(
  div class=\text-error\ + error + /div);
  }else{
  logger.debug(Form component {} is valid, fc);
  }
  }
 }*

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



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




-- 
Thanks  regards
James Selvakumar
mCruncher


Re: How to build a hudson/jenkins like live log viewer?

2013-06-20 Thread James Selvakumar
Guys,

This works like a charm. I'm using it in in our project. Thanks once again
for all your suggestions.
Just a minor correction in case you are using a MultiLineLabel for
nextLog. 
While appending Javascript in the onPostProcessTarget method, instead of:



use:



This is needed because .text() method removes the html formatting (i.e the
br tags) added by MultiLineLabel.
Cheers.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-build-a-hudson-jenkins-like-live-log-viewer-tp4090224p4659629.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: wicket-6 User friendly form validation with Wicket (stuq)

2012-11-25 Thread James Selvakumar
Hi all,

We have been using the examples given in the FormsWithFlair for a while
and it has been working very well.
However, we recently migrated from wicket 1.5.x to 6.3.0 and the code
didn't compile because of some api changes.

Here's the code that worked in 1.5.x
pre
public class ValidationMsgBehavior extends AbstractBehavior
{
@Override
public void onRendered(Component c)
{
FormComponent fc = (FormComponent) c;
if (!fc.isValid()) {
String error;
if (fc.hasFeedbackMessage()) {
error = fc.getFeedbackMessage().getMessage().toString();
} else {
error = Your input is invalid.;
}
fc.getResponse().write(
div class=\validationErrorMessage\ + error +
/div);
}
}
}
/pre

Am I right to say that I can replace AbstractBehavior with Behavior?
But I'm not sure what will be the best way to handle the feedback messages
related code.
Is a call to hasFeedbackMessage() correct now or should we use a feedback
collector here?
getFeedbackMessage() has been removed so I have no choice but to use
feedback collector to get it.


On Tue, Nov 6, 2012 at 3:09 AM, Rafał Krupiński r.krupin...@gmail.comwrote:

 On 05.11.2012 17:01, Martin Grigorov wrote:

 See FormsWithFlair application and PDF at
 http://code.google.com/p/**londonwicket/downloads/listhttp://code.google.com/p/londonwicket/downloads/list
 It also shows how a behavior can be used for this.


 Thanks for the link, looks very promising.


 Best Regards
 Rafał Krupiński


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




-- 
Thanks  regards
James Selvakumar


Re: wicket-6 User friendly form validation with Wicket (stuq)

2012-11-25 Thread James Selvakumar
Sorry,

Got most of the answers from the mailing list discussion here:
http://apache-wicket.1842946.n4.nabble.com/highlight-invalid-fields-with-custom-Validation-Framework-tp4652949p4652978.html


On Mon, Nov 26, 2012 at 11:31 AM, James Selvakumar ja...@mcruncher.comwrote:

 Hi all,

 We have been using the examples given in the FormsWithFlair for a while
 and it has been working very well.
 However, we recently migrated from wicket 1.5.x to 6.3.0 and the code
 didn't compile because of some api changes.

 Here's the code that worked in 1.5.x
 pre
 public class ValidationMsgBehavior extends AbstractBehavior
 {
 @Override
 public void onRendered(Component c)
 {
 FormComponent fc = (FormComponent) c;
 if (!fc.isValid()) {
 String error;
 if (fc.hasFeedbackMessage()) {
 error = fc.getFeedbackMessage().getMessage().toString();
 } else {
 error = Your input is invalid.;
 }
 fc.getResponse().write(
 div class=\validationErrorMessage\ + error +
 /div);
 }
 }
 }
 /pre

 Am I right to say that I can replace AbstractBehavior with Behavior?
 But I'm not sure what will be the best way to handle the feedback messages
 related code.
 Is a call to hasFeedbackMessage() correct now or should we use a
 feedback collector here?
 getFeedbackMessage() has been removed so I have no choice but to use
 feedback collector to get it.


 On Tue, Nov 6, 2012 at 3:09 AM, Rafał Krupiński r.krupin...@gmail.comwrote:

 On 05.11.2012 17:01, Martin Grigorov wrote:

 See FormsWithFlair application and PDF at
 http://code.google.com/p/**londonwicket/downloads/listhttp://code.google.com/p/londonwicket/downloads/list
 It also shows how a behavior can be used for this.


 Thanks for the link, looks very promising.


 Best Regards
 Rafał Krupiński


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




 --
 Thanks  regards
 James Selvakumar




-- 
Thanks  regards
James Selvakumar


Re: highlight invalid fields with custom Validation Framework?

2012-11-25 Thread James Selvakumar
Martin,

Thank you so much. I was exactly in the position where delta458 was and
almost got through with it.
After following your suggestions, the ValidationMsgBehavior looks like this:

pre
public class ValidationMsgBehavior extends Behavior
{
@Override
public void onRendered(Component c)
{
FormComponent fc = (FormComponent) c;
if (!fc.isValid()) {
String error;
if (fc.hasFeedbackMessage()) {
error =
fc.getFeedbackMessages().first(FeedbackMessage.ERROR).toString();
} else {
error = Your input is invalid.;
}
fc.getResponse().write(
div class=\validationErrorMessage\ + error +
/div);
}
}
}
/pre

I'm using Wicket 6.3.0 and there is no onRendered method in Behavior.
I should be using afterRender(Component component) now, right?
That will make this code compatible with the latest wicket version.


On Wed, Oct 17, 2012 at 3:07 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Wed, Oct 17, 2012 at 8:22 AM, delta458 delta...@hotmail.com wrote:
  Hi Martin,
  thanks so much for the replies... almost done, some little questions
 still
  there.. I got it working, could you verify that its right what I made? :)
 
  1)
  *//Had Error: Wrong number of type arguments, required 2 - It works when
 I
  do  IVisitorComponent,Void ;-)

 Trust the compiler and follow his recommendations ;-)

  public class ShinyFormVisitor implements
 IVisitorComponent,Serializable {*
 
  Set visited = new HashSet();
 
  public void component(final Component c, final IVisitVoid visit
  /*[2]*/) {
  if (!visited.contains(c)) {
  visited.add(c);
  c.add(new RequiredBorder());
  c.add(new ValidationMsgBehavior());
  c.add(new ErrorHighlightBehavior());
  }
  }
 
  ...
 
  private class ValidationMsgBehavior extends Behavior {
 
  public void onRendered(Component c) {
  FormComponent fc = (FormComponent) c;
  if (!fc.isValid()) {
  String error;
  if (fc.hasFeedbackMessage()) {
* //Had error, now working with this.. thats right?
  error =
  fc.getFeedbackMessages().first().getLevelAsString();*

 fc.getFeedbackMessages().first(FeedbackMessage.LEVEL_ERROR).toString();

 Or you may use the default registered converter to transform it to
 String. But this is more advanced and most probably you don't need it.

 
  } else {
  error = Your input is invalid.;
  }
  fc.getResponse().write(
  div class=\validationMsg\ + error +
 /div);
  }
  }
  }
  }
 
 
  2) Do you know any good wicket tutorials/example where I can learn how to
  work with customized FeedbackMessages?

 The source code is the best. It is really simple.
 Check
 https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java

 
  thanks..
 
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/highlight-invalid-fields-with-custom-Validation-Framework-tp4652949p4653024.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 



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




-- 
Thanks  regards
James Selvakumar


Re: highlight invalid fields with custom Validation Framework?

2012-11-25 Thread James Selvakumar
Thanks.


On Mon, Nov 26, 2012 at 2:11 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Mon, Nov 26, 2012 at 4:50 AM, James Selvakumar ja...@mcruncher.com
 wrote:

  Martin,
 
  Thank you so much. I was exactly in the position where delta458 was and
  almost got through with it.
  After following your suggestions, the ValidationMsgBehavior looks like
  this:
 
  pre
  public class ValidationMsgBehavior extends Behavior
  {
  @Override
  public void onRendered(Component c)
  {
  FormComponent fc = (FormComponent) c;
  if (!fc.isValid()) {
  String error;
  if (fc.hasFeedbackMessage()) {
  error =
  fc.getFeedbackMessages().first(FeedbackMessage.ERROR).toString();
  } else {
  error = Your input is invalid.;
  }
  fc.getResponse().write(
  div class=\validationErrorMessage\ + error +
  /div);
  }
  }
  }
  /pre
 
 

  I'm using Wicket 6.3.0 and there is no onRendered method in Behavior.
  I should be using afterRender(Component component) now, right?
 

 Right.


  That will make this code compatible with the latest wicket version.
 
 
  On Wed, Oct 17, 2012 at 3:07 PM, Martin Grigorov mgrigo...@apache.org
  wrote:
 
   On Wed, Oct 17, 2012 at 8:22 AM, delta458 delta...@hotmail.com
 wrote:
Hi Martin,
thanks so much for the replies... almost done, some little questions
   still
there.. I got it working, could you verify that its right what I
 made?
  :)
   
1)
*//Had Error: Wrong number of type arguments, required 2 - It works
  when
   I
do  IVisitorComponent,Void ;-)
  
   Trust the compiler and follow his recommendations ;-)
  
public class ShinyFormVisitor implements
   IVisitorComponent,Serializable {*
   
Set visited = new HashSet();
   
public void component(final Component c, final IVisitVoid visit
/*[2]*/) {
if (!visited.contains(c)) {
visited.add(c);
c.add(new RequiredBorder());
c.add(new ValidationMsgBehavior());
c.add(new ErrorHighlightBehavior());
}
}
   
...
   
private class ValidationMsgBehavior extends Behavior {
   
public void onRendered(Component c) {
FormComponent fc = (FormComponent) c;
if (!fc.isValid()) {
String error;
if (fc.hasFeedbackMessage()) {
  * //Had error, now working with this.. thats right?
error =
fc.getFeedbackMessages().first().getLevelAsString();*
  
   fc.getFeedbackMessages().first(FeedbackMessage.LEVEL_ERROR).toString();
  
   Or you may use the default registered converter to transform it to
   String. But this is more advanced and most probably you don't need it.
  
   
} else {
error = Your input is invalid.;
}
fc.getResponse().write(
div class=\validationMsg\ + error +
   /div);
}
}
}
}
   
   
2) Do you know any good wicket tutorials/example where I can learn
 how
  to
work with customized FeedbackMessages?
  
   The source code is the best. It is really simple.
   Check
  
 
 https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
  
   
thanks..
   
   
   
   
--
View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/highlight-invalid-fields-with-custom-Validation-Framework-tp4652949p4653024.html
Sent from the Users forum mailing list archive at Nabble.com.
   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
  
  
  
   --
   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
  
  
 
 
  --
  Thanks  regards
  James Selvakumar
 



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




-- 
Thanks  regards
James Selvakumar


Re: Wicket page test

2012-10-23 Thread James Selvakumar
Sorry if this is asked previously. Is it advisable to use a shared wicket
tester across multiple unit tests?

On Tue, Oct 23, 2012 at 3:39 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Tue, Oct 23, 2012 at 10:38 AM, James mCruncher ja...@mcruncher.com
 wrote:
  Should that call be made on tearDown or tearDownClass?

 It depends where WicketTester is initialized.

 
  On Mon, Oct 22, 2012 at 6:01 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
  Call it and try again.
 
  On Mon, Oct 22, 2012 at 11:45 AM, Arunachalam Sibisakkaravarthi
  arunacha...@mcruncher.com wrote:
   No, We don't call wicketTester.destroy() at the end of tests.
  
   On Mon, Oct 22, 2012 at 5:01 PM, Martin Grigorov 
 mgrigo...@apache.org
  wrote:
  
   Hi,
  
   Do you call wicketTester.destroy() at the end of your tests ?
  
   On Mon, Oct 22, 2012 at 9:10 AM, Arunachalam Sibisakkaravarthi
   arunacha...@mcruncher.com wrote:
Hai,
   
Here we are using wicket 1.5.7.
   
We have a simple test for each wicket page to assert rendering like
  this:
   
WicketTester.assertRenderedPage(Page.class);
   
In our module we have 52 tests w.r.t wicket pages.
   
It takes so long to run these tests.
   
Please give suggestion to improve test cases that how to reduce the
  time
taken by this module.
   
--
*Thanks And Regards
Sibi.Arunachalam
mCruncher*
  
  
  
   --
   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
  
  
  
  
   --
   *Thanks And Regards
   Sibi.Arunachalam
   mCruncher*
 
 
 
  --
  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
 
 
 
 
  --
  Thanks  regards
  James Selvakumar



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




-- 
Thanks  regards
James Selvakumar