Re: Is Wicket In Action still relevant?

2023-05-11 Thread James Selvakumar
Hi all,

Thank you very much for all your replies.
Like Stan, I too learned Wicket primarily through Wicket In Action and like
it very much.
Thanks Andrea, for the pointer to Wicket Guide. It's very nice.
I'll use both the book and the guide to train our new resources.


On Thu, May 11, 2023 at 8:43 PM Bergmann Manfred 
wrote:

> Hi.
>
> I think it actually targets Wicket 1.4, without generics.
>
> But yes, the general concepts are still largely intact. Though many
> details have changed.
>
>
>
> Manfred
>
>
> > Am 11.05.2023 um 11:41 schrieb s...@stantastic.nl.invalid
> :
> >
> > Hi,
> >
> > I learned Wicket primarily by using this book. I think it was intended
> to be used with Wicket 6 at the time it was published. But I used it with
> Wicket 8 and it was still a really good resource. I still browse through it
> occasionally.
> >
> > There still are some gotchas when used with Wicket 9, such as CSP and
> the way resources are loaded is slightly different IIRC.
> >
> > But if you want to get someone to grasp the basics of Wicket, it is a
> really good resource. I'm a fan.
> >
> > - Stan
> >
> >
> > James Selvakumar schreef op 2023-05-11 10:29:
> >
> >> Hi all,
> >> Just wondering whether Wicket in Action is still relevant with all the
> >> recent changes to Wicket? Can it be used to help a new developer
> understand
> >> Wicket?
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
Thanks & regards
James


Is Wicket In Action still relevant?

2023-05-11 Thread James Selvakumar
Hi all,

Just wondering whether Wicket in Action is still relevant with all the
recent changes to Wicket? Can it be used to help a new developer understand
Wicket?

-- 
Thanks & regards
James


Re: data persistence using hibernate

2023-01-24 Thread James Pollard

I don't need hibernates added level of abstraction

I was taught in the past to do database connectivity using jdbc 
drivers/connectors, hikaricp just takes this a step further
by providing a pool of connections to use. Basically I've looked at orm 
frameworks in the past and just couldn't get my
head around how to use it, I much prefer spelling out my query exactly 
myself.


Best Regards
James Pollard
james.poll...@iinet.net.au

On 24/1/23 6:49 pm, Martin Grigorov wrote:

On Tue, Jan 24, 2023 at 8:50 AM James Pollard 
wrote:


I've managed to make some progress with database connectivity, ended up
using hikaricp instead


HikariCP is a just a connection pool.
I am not sure what exactly you mean with "instead". A connection pool is
not a replacement of an ORM framework like Hibernate.




However, I can't workout where the most appropriate place to put the
connection pool close call, is there a close or shutdown function
I can override so that the connection pool can be closed cleanly. I
haven't had any luck in my search so far

Additionally, I keep running into the following error:
  java.lang.IllegalStateException: Illegal access: this web
application instance has been stopped already.
 Could not load [META-INF/services/org.mariadb.jdbc.plugin.Codec].
The following stack trace is thrown for debugging purposes as well as to
 attempt to terminate the thread which caused the illegal access.

I'm assuming this is a error more to do hikaricp so I'll enquire among
their community about it, but if someone has encountered this before feel
to volunteer any suggestions or recommended actions. The odd thing is I
still seem to be able to send queries to the database from what I can
tell


MyWicketApplication#onDestroy()
https://github.com/apache/wicket/blob/4affb7b18424e40663239ac9c93d9ec33a432541/wicket-core/src/main/java/org/apache/wicket/Application.java#L569




Best Regards
James Pollard
james.poll...@iinet.net.au

On 27/12/22 8:23 am, Vit Rozkovec wrote:

But I'm not sure where to put the following parts
Session sess = sessionFactory.openSession();
ManagedSessionContext.bind(sess);

This is done in some utility method when you retrieve the session for
the first time in the request.

You should also check if the session is already bound by calling

ManagedSessionContext.hasBind(SessionFactory factory)

and binding it only once per request.



unbindSessionFactory

I have this in my custom implementation of
IRequestCycleListener.onEndRequest(RequestCycle cycle)

that you add in Application.init() method

getRequestCycleListeners().add(new DataRequestCycleListener());

To be honest, I've until now stayed away from Spring as it still seems
to me as a too much of a black box that I didn't find a time to invest
in learning it, so I may not be the right person to give you advice,
because my solution may not be the best one either, although it seems
to be as javadoc of the ManagedSessionContext suggests. The solution I
now use took heavy inspiration in old old, now nonexistent, Databinder
that came around the time Wicket 1.2 or so and when I was tasked to
select new java framework after landing my first job and found Wicket.
Old times :D.

Vit




Thank you for the help so far both of you, I've probably made
mistakes with implement parts
of the previously outlined process.
I've come from experimenting with javafx so wicket has been a radical
change of direction for me
so far. But since there is very little in the way of examples for
database integration I'm struggling
to get my head around how to implement it correctly, as well as
knowing for sure whether I've
done it correctly

Best Regards
James Pollard
james.poll...@iinet.net.au

On 23/12/22 10:16 am, Ernesto Reinaldo Barreiro wrote:

Hi James,

On Thu, Dec 22, 2022 at 2:24 PM James 
wrote:


Thanks for the guidance so far, that pointed me to find additional
resources on JPA
I believe I have this configured correctly, but I'm confused about how
to integrate JPA/Hibernate into a
pure wicket authenticated web application project since the
resource you
directed me to previously
seems to be more heavily on the spring side of things.


This is true. I have used Hibernate/JPA without the SpringBoot
parts... But
those projects are private: some owned by me, others no.



Thank you for accommodating all my questions and misunderstandings so
far, I tend to use a reverse
engineer learning style so it's helped me immensely.

Glad to be of some help. This is why this place is for.
I've included screenshots of the project file list and the application
class in the hopes that it makes


They didn't



understanding what I'm trying to convey easier

Best Regards
James Pollard
james.poll...@iinet.net.au

On 20/12/22 12:58 pm, Ernesto Reinaldo Barreiro wrote:


https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java

This defines a 

Re: data persistence using hibernate

2023-01-23 Thread James Pollard
I've managed to make some progress with database connectivity, ended up 
using hikaricp instead


However, I can't workout where the most appropriate place to put the 
connection pool close call, is there a close or shutdown function
I can override so that the connection pool can be closed cleanly. I 
haven't had any luck in my search so far


Additionally, I keep running into the following error:
    java.lang.IllegalStateException: Illegal access: this web 
application instance has been stopped already.
   Could not load [META-INF/services/org.mariadb.jdbc.plugin.Codec]. 
The following stack trace is thrown for debugging purposes as well as to

   attempt to terminate the thread which caused the illegal access.

I'm assuming this is a error more to do hikaricp so I'll enquire among 
their community about it, but if someone has encountered this before feel
to volunteer any suggestions or recommended actions. The odd thing is I 
still seem to be able to send queries to the database from what I can

tell

Best Regards
James Pollard
james.poll...@iinet.net.au

On 27/12/22 8:23 am, Vit Rozkovec wrote:




But I'm not sure where to put the following parts
Session sess = sessionFactory.openSession();
ManagedSessionContext.bind(sess);


This is done in some utility method when you retrieve the session for 
the first time in the request.


You should also check if the session is already bound by calling

ManagedSessionContext.hasBind(SessionFactory factory)

and binding it only once per request.




unbindSessionFactory


I have this in my custom implementation of 
IRequestCycleListener.onEndRequest(RequestCycle cycle)


that you add in Application.init() method

getRequestCycleListeners().add(new DataRequestCycleListener());

To be honest, I've until now stayed away from Spring as it still seems 
to me as a too much of a black box that I didn't find a time to invest 
in learning it, so I may not be the right person to give you advice, 
because my solution may not be the best one either, although it seems 
to be as javadoc of the ManagedSessionContext suggests. The solution I 
now use took heavy inspiration in old old, now nonexistent, Databinder 
that came around the time Wicket 1.2 or so and when I was tasked to 
select new java framework after landing my first job and found Wicket. 
Old times :D.


Vit





Thank you for the help so far both of you, I've probably made 
mistakes with implement parts

of the previously outlined process.
I've come from experimenting with javafx so wicket has been a radical 
change of direction for me
so far. But since there is very little in the way of examples for 
database integration I'm struggling
to get my head around how to implement it correctly, as well as 
knowing for sure whether I've

done it correctly

Best Regards
James Pollard
james.poll...@iinet.net.au

On 23/12/22 10:16 am, Ernesto Reinaldo Barreiro wrote:

Hi James,

On Thu, Dec 22, 2022 at 2:24 PM James  
wrote:



Thanks for the guidance so far, that pointed me to find additional
resources on JPA
I believe I have this configured correctly, but I'm confused about how
to integrate JPA/Hibernate into a
pure wicket authenticated web application project since the 
resource you

directed me to previously
seems to be more heavily on the spring side of things.

This is true. I have used Hibernate/JPA without the SpringBoot 
parts... But

those projects are private: some owned by me, others no.



Thank you for accommodating all my questions and misunderstandings so
far, I tend to use a reverse
engineer learning style so it's helped me immensely.

Glad to be of some help. This is why this place is for.



I've included screenshots of the project file list and the application
class in the hopes that it makes


They didn't



understanding what I'm trying to convey easier

Best Regards
James Pollard
james.poll...@iinet.net.au

On 20/12/22 12:58 pm, Ernesto Reinaldo Barreiro wrote:
https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java 


This defines a JPA entity and this JPA/Hibernate


https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/resources/application.yml 


Project uses Spring magic I guess and will start a Hibernate with H2.
Wicket is also started via SpringBoot.


On Tue, Dec 20, 2022 at 7:44 AM James 

wrote:
I've had a look through it but couldn't find any reference to 
hibernate

so far, its entirely
possible that I managed to miss it while I was searching though

Best Regards
James Pollard
james.poll...@iinet.net.au

On 19/12/22 5:06 pm, Ernesto Reinaldo Barreiro wrote:

Hi,

This project

https://github.com/MarcGiffing/wicket-spring-boot

contains a sample project that integrates with JPA/hibernate.


On Mon, Dec 19, 2022 at 9:12 AM James 

wrote:

Hi,
can anyone direct me to any resources on how to integrate 
hibernate

for

data

Re: data persistence using hibernate

2022-12-23 Thread James Pollard

Thanks Vit,

I've defined the hibernate.cfg.xml file

I've defined the following globally in the Application class
private Configuration config = new Configuration();
private ServiceRegistry serviceRegistry;
private SessionFactory sessionFactory;

I've placed the following at the end of the init function
config.configure("hibernate.cfg.xml");
config.setProperty("hibernate.current_session_context_class", "managed");
serviceRegistry = new 
StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();

sessionFactory = config.buildSessionFactory(serviceRegistry);

But I'm not sure where to put the following parts
Session sess = sessionFactory.openSession();
ManagedSessionContext.bind(sess);

unbindSessionFactory


Thank you for the help so far both of you, I've probably made mistakes 
with implement parts

of the previously outlined process.
I've come from experimenting with javafx so wicket has been a radical 
change of direction for me
so far. But since there is very little in the way of examples for 
database integration I'm struggling
to get my head around how to implement it correctly, as well as knowing 
for sure whether I've

done it correctly

Best Regards
James Pollard
james.poll...@iinet.net.au

On 23/12/22 10:16 am, Ernesto Reinaldo Barreiro wrote:

Hi James,

On Thu, Dec 22, 2022 at 2:24 PM James  wrote:


Thanks for the guidance so far, that pointed me to find additional
resources on JPA
I believe I have this configured correctly, but I'm confused about how
to integrate JPA/Hibernate into a
pure wicket authenticated web application project since the resource you
directed me to previously
seems to be more heavily on the spring side of things.


This is true. I have used Hibernate/JPA without the SpringBoot parts... But
those projects are private: some owned by me, others no.



Thank you for accommodating all my questions and misunderstandings so
far, I tend to use a reverse
engineer learning style so it's helped me immensely.

Glad to be of some help. This is why this place is for.



I've included screenshots of the project file list and the application
class in the hopes that it makes


They didn't



understanding what I'm trying to convey easier

Best Regards
James Pollard
james.poll...@iinet.net.au

On 20/12/22 12:58 pm, Ernesto Reinaldo Barreiro wrote:
https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java

This defines a JPA entity and this JPA/Hibernate



https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/resources/application.yml

Project uses Spring magic I guess and will start a Hibernate with H2.
Wicket is also started via SpringBoot.


On Tue, Dec 20, 2022 at 7:44 AM James 

wrote:

I've had a look through it but couldn't find any reference to hibernate
so far, its entirely
possible that I managed to miss it while I was searching though

Best Regards
James Pollard
james.poll...@iinet.net.au

On 19/12/22 5:06 pm, Ernesto Reinaldo Barreiro wrote:

Hi,

This project

https://github.com/MarcGiffing/wicket-spring-boot

contains a sample project that integrates with JPA/hibernate.


On Mon, Dec 19, 2022 at 9:12 AM James 

wrote:

Hi,
can anyone direct me to any resources on how to integrate hibernate

for

data persistence?

the closest I've managed to find is



https://www.infoworld.com/article/2077901/web-development-with-wicket--part-3--many-ways-to-persist.html?page=7

but there's still things that are confusing me on how to ingrate an
authenticated application with hibernate

--
Best Regards
James Pollard
james.poll...@iinet.net.au


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



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




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






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



Re: data persistence using hibernate

2022-12-21 Thread James
Thanks for the guidance so far, that pointed me to find additional 
resources on JPA
I believe I have this configured correctly, but I'm confused about how 
to integrate JPA/Hibernate into a
pure wicket authenticated web application project since the resource you 
directed me to previously

seems to be more heavily on the spring side of things.

Thank you for accommodating all my questions and misunderstandings so 
far, I tend to use a reverse

engineer learning style so it's helped me immensely.

I've included screenshots of the project file list and the application 
class in the hopes that it makes

understanding what I'm trying to convey easier

Best Regards
James Pollard
james.poll...@iinet.net.au

On 20/12/22 12:58 pm, Ernesto Reinaldo Barreiro wrote:

https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java

This defines a JPA entity and this JPA/Hibernate

https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/resources/application.yml

Project uses Spring magic I guess and will start a Hibernate with H2.
Wicket is also started via SpringBoot.


On Tue, Dec 20, 2022 at 7:44 AM James  wrote:


I've had a look through it but couldn't find any reference to hibernate
so far, its entirely
possible that I managed to miss it while I was searching though

Best Regards
James Pollard
james.poll...@iinet.net.au

On 19/12/22 5:06 pm, Ernesto Reinaldo Barreiro wrote:

Hi,

This project

https://github.com/MarcGiffing/wicket-spring-boot

contains a sample project that integrates with JPA/hibernate.


On Mon, Dec 19, 2022 at 9:12 AM James 

wrote:

Hi,
can anyone direct me to any resources on how to integrate hibernate for
data persistence?

the closest I've managed to find is



https://www.infoworld.com/article/2077901/web-development-with-wicket--part-3--many-ways-to-persist.html?page=7

but there's still things that are confusing me on how to ingrate an
authenticated application with hibernate

--
Best Regards
James Pollard
james.poll...@iinet.net.au


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




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





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

Re: data persistence using hibernate

2022-12-19 Thread James
I've had a look through it but couldn't find any reference to hibernate 
so far, its entirely

possible that I managed to miss it while I was searching though

Best Regards
James Pollard
james.poll...@iinet.net.au

On 19/12/22 5:06 pm, Ernesto Reinaldo Barreiro wrote:

Hi,

This project

https://github.com/MarcGiffing/wicket-spring-boot

contains a sample project that integrates with JPA/hibernate.


On Mon, Dec 19, 2022 at 9:12 AM James  wrote:


Hi,
can anyone direct me to any resources on how to integrate hibernate for
data persistence?

the closest I've managed to find is

https://www.infoworld.com/article/2077901/web-development-with-wicket--part-3--many-ways-to-persist.html?page=7
but there's still things that are confusing me on how to ingrate an
authenticated application with hibernate

--
Best Regards
James Pollard
james.poll...@iinet.net.au


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





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



data persistence using hibernate

2022-12-18 Thread James

Hi,
can anyone direct me to any resources on how to integrate hibernate for 
data persistence?


the closest I've managed to find is
https://www.infoworld.com/article/2077901/web-development-with-wicket--part-3--many-ways-to-persist.html?page=7
but there's still things that are confusing me on how to ingrate an 
authenticated application with hibernate


--
Best Regards
James Pollard
james.poll...@iinet.net.au


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



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?


Ancestor controller patterns?

2018-04-20 Thread James Carman
I have a scenario where a certain type of component should typically be
invisible, but in certain scenarios, it neeeds to become visible. That
visibility can be changed by anybody in its ancestry and the closest one to
the component should decide.  Anyway, do we have established patterns for
this?  Do I make the guys who want to control this visibility implement
some interface and search for them up the hierarchy?  Is there a different
way?

Thanks,

James


ListView Add/Remove via AJAX...

2018-03-27 Thread James Carman
It has been a while since I've used Wicket and man, I really forgot how
much I love this framework! It may be that I'm rusty, but I've searched
quite a bit and tried all the suggestions I've found, but I can't seem to
make add/remove via AJAX work for a ListView while preserving the input
data. I am using Wicket 8.0.0-M9. Here's what I've done so far:

correctChoiceGroup = new CheckGroup<>("correctChoices",
Model.ofSet(Sets.newHashSet()));
correctChoiceGroup.setRequired(true);
correctChoiceGroup.setOutputMarkupId(true);
correctChoiceGroup.setRenderBodyOnly(false);

final IModel<List> choicesModel = Model.ofList(new LinkedList<>());
choicesView = new ListView("choices", choicesModel) {
@Override
protected void populateItem(ListItem item) {
final int index = item.getIndex();

item.add(new TextField<>("field", item.getModel()));
item.add(new Check<>("check", Model.of(index)));

final AjaxSubmitLink deleteLink = new AjaxSubmitLink("deleteButton") {
@Override
@SuppressWarnings("unchecked")
protected void onSubmit(AjaxRequestTarget target) {
final ListView listView = findParent(ListView.class);
listView.getModelObject().remove(index);
listView.removeAll();
target.add(correctChoiceGroup);
}
};
deleteLink.setDefaultFormProcessing(false);
item.add(deleteLink);
}
}.setReuseItems(true);


correctChoiceGroup.add(choicesView);

add(new AjaxSubmitLink("addButton") {
@Override
protected void onSubmit(AjaxRequestTarget target) {
choicesView.getModelObject().add("");
choicesView.removeAll();
target.add(correctChoiceGroup);
}
}.setDefaultFormProcessing(false));

add(correctChoiceGroup);


When I click on the delete link (I have a similarly-implemented "add" link
outside of the ListView), all of the input data goes away, since I am
losing the original items from the removeAll() call.  Now, I am doing the
removeAll() to force Wicket to realize that I've changed the underlying
list, otherwise, the original items are reused and the it always looks like
the last item is removed.  I'm sure I'm just rusty, but I am banging my
head on this one.

Thanks,

James


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


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
<http://apache-wicket.1842946.n4.nabble.com/Dynamic-DataTable-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?

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


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: Event listeners not working after Javascript actions

2015-11-30 Thread EC James
Thanks for the clone idea, however it seems that AjaxButton cannot be cloned.
I did try a similar idea,
where I define the tab content outside of the tab, and only move it into the
tab using '.replaceWith'
when the page is fully loaded.  This works but makes for some ugly
transitions.

The tabbed interface is a third party plugin, and I don't know why it is
re-rendering the content. I will 
have to look into that.

It would be nice if I could decide when the events are loaded instead of on
'domready', but I don't see 
any easy way to do that.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-listeners-not-working-after-Javascript-actions-tp4672673p4672764.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



Event listeners not working after Javascript actions

2015-11-19 Thread EC James
I have a page with a Tabbed interface(not wicket) that performs actions
before and after the domready signal.

It has it's own signal for when it is complete:
$( document ).on( "wb-ready.wb", function( event ) {
//The page is fully loaded now.
}

The rendering order is like this:
1) Tab 1 rendered
2) Page loaded (domready)
3) Tab 1 rendered
4) Done loading (wb-ready.wb)

I have an AjaxButton in Tab 1 that does not work. It works fine outside the
tab.

I'm guessing that something is happening in the 3rd stage that removes the
event listener.

As a test, if I take the following from the header and put it in the
"wb-ready.wb" all is good. Of course this only
works as a test as I have to manually change the url.
/**/

I have no idea how to fix this. All I can imagine is:
1) Somehow rerunning Wicket.Event.add after "wb-ready.wb", or
2) Moving Wicket.Event.add out of the head and into "wb-ready.wb", which I
don't think is possible.

Any ideas on how to reregister the event listener for the button?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Event-listeners-not-working-after-Javascript-actions-tp4672673.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: 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


Wicket Spring

2014-11-16 Thread Kevin James Baxter

Good day, Everyone!

Is there any documentation on injecting Spring beans into Wicket
components using XML (I want to avoid using annotations). 

All helpful advice will be greatly appreciated.

Thanx

-- 
There are 10 types of people in this world, those who understand binary
and those who don't


Re: Wicket Spring

2014-11-16 Thread Kevin James Baxter

Excellent!

That example worked perfectly.

Thank you, Pierre!  


On Mon, 2014-11-17 at 01:29 +0100, Zala Pierre GOUPIL wrote:

 Good evening,
 
 Have a look here: https://cwiki.apache.org/confluence/display/WICKET/Spring
 
 It's a bit old but still useful.
 
 Plus you can check the wicket-phonebook example application from
 wicketstuff, it gives good code examples.
 
 Regards,
 
 Pierre
 
 
 
 On Mon, Nov 17, 2014 at 1:26 AM, Kevin James Baxter meta.d...@verizon.net
 wrote:
 
 
  Good day, Everyone!
 
  Is there any documentation on injecting Spring beans into Wicket
  components using XML (I want to avoid using annotations).
 
  All helpful advice will be greatly appreciated.
 
  Thanx
 
  --
  There are 10 types of people in this world, those who understand binary
  and those who don't
 
 
 
 


-- 
There are 10 types of people in this world, those who understand binary
and those who don't


custom authentication/authorization without Spring

2013-09-11 Thread Parker, James
I'm looking for a way to create custom authentication and authorization without 
the use of additional libraries such as Spring.  Our current need is to look 
for a portal authentication cookie and validate it, then search a database for 
what the user is authorized to do.  If validation fails, we need to forward the 
user on to our application portal.

Of course as soon as I get this working, there is a high likelihood we will 
change our authentication to a different system, so I need to keep it 
straight-forward and simple.  Nothing here is so important that we need high 
level security and hack prevention with the authentication.

There is no username and password, only a cookie (single sign on from our 
portal), and no login page sense our portal handles it all.  Can someone point 
me in the right direction?  Either point me to a class/interface or to a 
book/website.  Worst case scenario, I create a filter that upon passing 
authentication will pass processing onto Wicket's default filter.  Of course 
kludge something together for authorization.

All assistance is appreciated.

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



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

2013-07-04 Thread Enoch James

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

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

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

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


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





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-jquery-dialog-instead-of-alert-tp4660057.html
Sent from the Users forum mailing list archive at Nabble.com.

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





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



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: Using AutoCompleteBehavior with other behaviors

2013-01-23 Thread james yong
Hi all, 

I have logged the required fixes for WICKET-4990 in jira.

Regards,
James


james yong wrote
 Hi Sven,
 
 WICKET-4990 is for problem 1.
 So I raised a jira issue for problem 2, together with its solution.
 WICKET-4998.
 
 Regards,
 James
 Sven Meier wrote
 Hi James,
 
 please attach that info to WICKET-4990.
 
 Thanks
 Sven
 
 On 01/22/2013 07:07 AM, james yong wrote:
 Hi,

 To rectify problem 2, I changed the following in wicket-autocomplete.js,


 Wicket.Event.add(obj,keypress,function(jqEvent){
 if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
 if(selected-1||hidingAutocomplete===1){
 hidingAutocomplete=0;
 
 jqEvent.stopImmediatePropagation();
 --changed from jqEvent.stopPropagation();
 

 Regards,
 James


 james yong wrote
 Hi,

 Now migrating a working project from wicket version 1.4 to 6.4.
 I have a text field that uses the following behaviors:
 A.  AjaxFormComponentUpdatingBehavior(onchange);
 B.  AutoCompleteBehavior; and
 C.  AjaxFormComponentUpdatingBehavior(onkeypress).

 Say I enter an letter 'U' into the text field, and an auto-suggest list
 pops up.

 There are 2 problems which is not seen in wicket 1.4:
 1) When I select an item (e.g. USD) from the auto-suggest list using a
 mouse, the onchange event from behavior A  is fired twice. The 1st
 onchange event is for 'U' and the 2nd onchange event is for 'USD'.
 Can I prevent the 1st onchange event from happening?

 2) When I select an item (e.g. USD) from the auto-suggest list using
 the
 Enter keypress, an onkeypress event is fired by behavior C. Can I
 prevent
 this onkeypress event from happening?

 Regards,
 James




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache


 
 
 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655719.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: find html tag

2013-01-23 Thread james yong
Hi Michael,

What you need may not be related to wicket directly.
I suggest you can attach a javascript 'click' handler that will get the
parent and modify the attributes.
If you are using jQuery, you can use the parent function i.e. 
http://api.jquery.com/parent/ http://api.jquery.com/parent/  

Regards,
James



Michael Jaruska wrote
 Look at my original post. User clicks on 
 subsubmenu2 ./mypage.html?cid=menu/submenu/subsubmenu2  
 , then
 I have in String category (java code) value menu/submenu/subsubmenu2.
 I need just to make 2 more steps:
 1. in html code find anchor tag with href menu/submenu/subsubmenu2;
 2. find 
 li
  tag which is parent of the anchor from point 1;
 
 When I have point 2 done, then I know how to put somethink into 
 li
  tag...
 
 
 
 On 23.1.2013 21:21, Bas Gooren wrote:
 Ok, so you are indeed looking for a way to change a html attribute ;-)

 Since you wrote (in your folluw-up e-mail) that you cannot generate the
 html, there are some ways, but they mostly work outside of the normal
 wicket way.

 1) In the component which actually renders your static html override
 onComponentTagBody and fiddle with the markup stream (e.g. look at
 replaceComponentTagBody)

 2) store the static html somewhere by itself, and create a custom model.
 The model can then load the html and perform string replacement.
 You can then add a label component which uses the model and has
 setEscapeModelStrings(false) set.

 Met vriendelijke groet,
 Kind regards,

 Bas Gooren

 Op 23-1-2013 21:11, schreef Michael Jaruska:
 I need to find the parent 
 li
  tag of the anchor user clicks - I now from PageParameters which anchor
 has been clicked. Then I will put into this parent 
 li
  specific atribute (id=something). This attribute
 will be then processed by JavaScript on the page.


 On 23.1.2013 21:04, Bas Gooren wrote:
 Sorry, I read too quickly.

 What are you trying to accomplish? Let's say you are able to find the
 appropriate html tag, what do you want to do with it?

 Met vriendelijke groet,
 Kind regards,

 Bas Gooren

 Op 23-1-2013 21:01, schreef Michael Jaruska:
 And question is not how can I change html attribute but how can I
 go through html structure and
 find html tag with specific attribute :-)


 On 23.1.2013 20:50, Bas Gooren wrote:
 Hi!

 What you want to accomplish (e.g. changing some html attributes) can
 be done by adding an attributemodifier to each 
 li
  component.

 In pseudocode:

 RepeatingView uls = ...
 for_every_li:
 WebMarkupContainer li = ...
 uls.add(li);

 now, you can do something like this:
 li.add(new AttributeAppender(...) {
  isEnabled() {
  return true if you want to append a html attribute;
  }
 });

 Or alternatively:

 WebMarkupContainer li = new WMC() {
  onComponentTag(ComponentTag tag) {
  super(tag);

  tag.put(my-html-attribute, value);
  }
 }

 Met vriendelijke groet,
 Kind regards,

 Bas Gooren

 Op 23-1-2013 20:45, schreef Michael Jaruska:
 Hi,

 is there a way I can find specific html tag in markup?

 I have this html structure:
 
 ul class=mymenu
   
 li
 
 menu ./mypage.html?cid=menu  
   
 ul
 
 li
   
 submenu ./mypage.html?cid=menu/submenu  
 
 ul
   
 li
 
 subsubmenu1 ./mypage.html?cid=menu/submenu/subsubmenu1  
   
 /li
   
 li
 
 subsubmenu2 ./mypage.html?cid=menu/submenu/subsubmenu2  
   
 /li
   
 li
 
 subsubmenu3 ./mypage.html?cid=menu/submenu/subsubmenu3  
   
 /li
 
 /ul
   
 /ul
 
 /ul

 I'm processing clicks on anchors with my page:
 public PageTest(PageParameters parameters){
   //cid = category id
   String category = parameters.get(cid).toString();
   ...
 }

 Now I need some way I can add atribute into parent 
 li
  tag of 

  tag on which I do click.
 Somethink like (pseudocode):
 public PageTest(PageParameters parameters){
   //cid = category id
   String category = parameters.get(cid).toString();
   //find corresponding 

  tag
   Tag anchorTag =
 go_from_top_ul_tag_and_find_a_tag_by_category(category)
   //have corresponding anchor tag, get parrent tag of the anchor tag
   Tag anchorParentTag = anchorTag.getParent();
   //and now I can do my mysterious things with menu...
 }

 But I don't know where to start my search and I totaly don't know
 whot to look for in docu.

 Please, help :-)

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache





 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache





 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache

updateAjaxAttributes has no effect on AutoCompleteBehavior

2013-01-21 Thread james yong
Hi all,

Just to confirm if overriding updateAjaxAttributes has any effect on
AutoCompleteBehavior?
I was tryng to do the following but see no popup nor code reflected in the
html source.

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes
attributes) {
super.updateAjaxAttributes(attributes);
AjaxCallListener myAjaxCallListener = new AjaxCallListener() {

@Override 
public CharSequence getBeforeHandler(Component component) { 
return alert('I\'m executed before the firing of the
Ajax call'); 
}
};
ListIAjaxCallListener list =
attributes.getAjaxCallListeners();
list.add(myAjaxCallListener);
}

Regards,
James



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560.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: updateAjaxAttributes has no effect on AutoCompleteBehavior

2013-01-21 Thread james yong
Hi Martin,

I tried again with a simple application and pretty sure updateAjaxAttributes
has no effect on AutoCompleteBehavior. But then, I need to verify with
another party to verify/confirm whether this is a bug or intended feature.
It is working with AjaxFormComponentUpdatingBehavior.

Regards,
James


Martin Grigorov-4 wrote
 Hi,
 
 I don't see why it should not work.
 Actually AutoCompleteBehavior itself wont work without this method. It
 overrides it to do:
 attributes.setWicketAjaxResponse(false);
  attributes.setDataType(html);
 
 
 
 
 On Mon, Jan 21, 2013 at 10:09 AM, james yong lt;

 i_yongbl@.com

 gt; wrote:
 
 Hi all,

 Just to confirm if overriding updateAjaxAttributes has any effect on
 AutoCompleteBehavior?
 I was tryng to do the following but see no popup nor code reflected in
 the
 html source.

 @Override
 protected void updateAjaxAttributes(AjaxRequestAttributes
 attributes) {
 super.updateAjaxAttributes(attributes);
 AjaxCallListener myAjaxCallListener = new AjaxCallListener()
 {

 @Override
 public CharSequence getBeforeHandler(Component component)
 {
 return alert('I\'m executed before the firing of the
 Ajax call');
 }
 };
 List
 IAjaxCallListener
  list =
 attributes.getAjaxCallListeners();
 list.add(myAjaxCallListener);
 }

 Regards,
 James



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache



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





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/updateAjaxAttributes-has-no-effect-on-AutoCompleteBehavior-tp4655560p4655579.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: Using AutoCompleteBehavior with other behaviors

2013-01-21 Thread james yong
Hi,

To rectify problem 2, I changed the following in wicket-autocomplete.js, 


Wicket.Event.add(obj,keypress,function(jqEvent){
if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
if(selected-1||hidingAutocomplete===1){
hidingAutocomplete=0;
jqEvent.stopImmediatePropagation();
--changed from jqEvent.stopPropagation(); 


Regards,
James


james yong wrote
 Hi,
 
 Now migrating a working project from wicket version 1.4 to 6.4.
 I have a text field that uses the following behaviors:
 A.  AjaxFormComponentUpdatingBehavior(onchange);
 B.  AutoCompleteBehavior; and
 C.  AjaxFormComponentUpdatingBehavior(onkeypress).
 
 Say I enter an letter 'U' into the text field, and an auto-suggest list
 pops up.
 
 There are 2 problems which is not seen in wicket 1.4:
 1) When I select an item (e.g. USD) from the auto-suggest list using a
 mouse, the onchange event from behavior A  is fired twice. The 1st
 onchange event is for 'U' and the 2nd onchange event is for 'USD'.
 Can I prevent the 1st onchange event from happening?
 
 2) When I select an item (e.g. USD) from the auto-suggest list using the
 Enter keypress, an onkeypress event is fired by behavior C. Can I prevent
 this onkeypress event from happening?
 
 Regards,
 James





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.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: Using AutoCompleteBehavior with other behaviors

2013-01-21 Thread james yong
Hi Sven,

WICKET-4990 is for problem 1.
So I raised a jira issue for problem 2, together with its solution.
WICKET-4998.

Regards,
James


Sven Meier wrote
 Hi James,
 
 please attach that info to WICKET-4990.
 
 Thanks
 Sven
 
 On 01/22/2013 07:07 AM, james yong wrote:
 Hi,

 To rectify problem 2, I changed the following in wicket-autocomplete.js,


 Wicket.Event.add(obj,keypress,function(jqEvent){
  if(Wicket.Event.keyCode(jqEvent)===KEY_ENTER){
  if(selected-1||hidingAutocomplete===1){
  hidingAutocomplete=0;
 
 jqEvent.stopImmediatePropagation();
 --changed from jqEvent.stopPropagation();
  

 Regards,
 James


 james yong wrote
 Hi,

 Now migrating a working project from wicket version 1.4 to 6.4.
 I have a text field that uses the following behaviors:
 A.  AjaxFormComponentUpdatingBehavior(onchange);
 B.  AutoCompleteBehavior; and
 C.  AjaxFormComponentUpdatingBehavior(onkeypress).

 Say I enter an letter 'U' into the text field, and an auto-suggest list
 pops up.

 There are 2 problems which is not seen in wicket 1.4:
 1) When I select an item (e.g. USD) from the auto-suggest list using a
 mouse, the onchange event from behavior A  is fired twice. The 1st
 onchange event is for 'U' and the 2nd onchange event is for 'USD'.
 Can I prevent the 1st onchange event from happening?

 2) When I select an item (e.g. USD) from the auto-suggest list using the
 Enter keypress, an onkeypress event is fired by behavior C. Can I
 prevent
 this onkeypress event from happening?

 Regards,
 James




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655619.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache


 
 
 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655626.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: Using AutoCompleteBehavior with other behaviors

2013-01-18 Thread james yong
Sven Meier wrote
 Your first problem is a regression, see WICKET-1280.
 
 Please open a jira issue.
 
 Sven
 
 On 01/18/2013 04:45 AM, james yong wrote:
 Hi,

 Now migrating a working project from wicket version 1.4 to 6.4.
 I have a text field that uses the following behaviors:
 A.  AjaxFormComponentUpdatingBehavior(onchange);
 B.  AutoCompleteBehavior; and
 C.  AjaxFormComponentUpdatingBehavior(onkeypress).

 Say I enter an letter 'U' into the text field, and an auto-suggest list
 pops
 up.

 There are 2 problems which is not seen in wicket 1.4:
 1) When I select an item (e.g. USD) from the auto-suggest list using a
 mouse, the onchange event from behavior A  is fired twice. The 1st
 onchange
 event is for 'U' and the 2nd onchange event is for 'USD'.
 Can I prevent the 1st onchange event from happening?

 2) When I select an item (e.g. USD) from the auto-suggest list using the
 Enter keypress, an onkeypress event is fired by behavior C. Can I prevent
 this onkeypress event from happening?

 Regards,
 James

Thanks. For problem 1, I have raised a JIRA issue, WICKET-4990




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495p4655497.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



Wicket 6: Using AutoCompleteBehavior with other behaviors

2013-01-17 Thread james yong
Hi,

Now migrating a working project from wicket version 1.4 to 6.4.
I have a text field that uses the following behaviors:
A.  AjaxFormComponentUpdatingBehavior(onchange);
B.  AutoCompleteBehavior; and
C.  AjaxFormComponentUpdatingBehavior(onkeypress).

Say I enter an letter 'U' into the text field, and an auto-suggest list pops
up.

There are 2 problems which is not seen in wicket 1.4:
1) When I select an item (e.g. USD) from the auto-suggest list using a
mouse, the onchange event from behavior A  is fired twice. The 1st onchange
event is for 'U' and the 2nd onchange event is for 'USD'.
Can I prevent the 1st onchange event from happening?

2) When I select an item (e.g. USD) from the auto-suggest list using the
Enter keypress, an onkeypress event is fired by behavior C. Can I prevent
this onkeypress event from happening?

Regards,
James




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Using-AutoCompleteBehavior-with-other-behaviors-tp4655495.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



Clearing Browser Cookies

2013-01-03 Thread Corbin, James
This is a rehash of a previous discussion on this forum relating to immediate 
removal of a browser cookie.

I have a list view that displays data loaded from 1 or more browser cookies.  
On this panel I also have a clear action (Link) that when clicked deletes the 
cookies.  The underlying list view model is detached which forces (verified) 
the cookies to be re-read.

The problem is that when I re-read them after deleting them from the response, 
they are still present.  If I then execute the clear action again, the list 
view is refreshed again and the cookies are no longer present.

I'm not sure what is going on here.  Are they being cached, is it a timing 
issue?  Why on the second clear action does it finally indicate the cookies 
have been removed.

My immediate need is to be able to delete the cookies, refresh the list view, 
and see that they are no longer present (no data rows in list view).

J.D.


Re: Clearing Browser Cookies

2013-01-03 Thread Corbin, James
Thanks Sven.  I wasn't sure if I could do so without a page reload, but I
think it is okay in this case.

J.D.




On 1/3/13 1:04 PM, Sven Meier s...@meiers.net wrote:

Hi James,

deleting a cookie on the response doesn't change the cookies in the HTTP
request.

A redirect should help to get a fresh cookie list from the browser.

Sven

On 01/03/2013 08:29 PM, Corbin, James wrote:
 This is a rehash of a previous discussion on this forum relating to
immediate removal of a browser cookie.

 I have a list view that displays data loaded from 1 or more browser
cookies.  On this panel I also have a clear action (Link) that when
clicked deletes the cookies.  The underlying list view model is detached
which forces (verified) the cookies to be re-read.

 The problem is that when I re-read them after deleting them from the
response, they are still present.  If I then execute the clear action
again, the list view is refreshed again and the cookies are no longer
present.

 I'm not sure what is going on here.  Are they being cached, is it a
timing issue?  Why on the second clear action does it finally indicate
the cookies have been removed.

 My immediate need is to be able to delete the cookies, refresh the list
view, and see that they are no longer present (no data rows in list
view).

 J.D.



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





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



Re: Clearing Browser Cookies

2013-01-03 Thread Corbin, James
Hi Sven,

I did try redirecting a couple of ways with no success.  I tried throwing
a RestartResponseException which didn't work, then tried
setResponsePage(Š) to the same page and that didn't work either.  I was
still forced to press the Clear action again to see the cookies
disappear.

J.D.







On 1/3/13 1:04 PM, Sven Meier s...@meiers.net wrote:

Hi James,

deleting a cookie on the response doesn't change the cookies in the HTTP
request.

A redirect should help to get a fresh cookie list from the browser.

Sven

On 01/03/2013 08:29 PM, Corbin, James wrote:
 This is a rehash of a previous discussion on this forum relating to
immediate removal of a browser cookie.

 I have a list view that displays data loaded from 1 or more browser
cookies.  On this panel I also have a clear action (Link) that when
clicked deletes the cookies.  The underlying list view model is detached
which forces (verified) the cookies to be re-read.

 The problem is that when I re-read them after deleting them from the
response, they are still present.  If I then execute the clear action
again, the list view is refreshed again and the cookies are no longer
present.

 I'm not sure what is going on here.  Are they being cached, is it a
timing issue?  Why on the second clear action does it finally indicate
the cookies have been removed.

 My immediate need is to be able to delete the cookies, refresh the list
view, and see that they are no longer present (no data rows in list
view).

 J.D.



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





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



Re: Clearing Browser Cookies

2013-01-03 Thread Corbin, James
So, I tried one more thing that worked...

setResponsePage(new RedirectPage(somePage));

The first time I tried it was without using the RedirectPage class.

J.D.







On 1/3/13 4:15 PM, Corbin, James jcor...@iqnavigator.com wrote:

Hi Sven,

I did try redirecting a couple of ways with no success.  I tried throwing
a RestartResponseException which didn't work, then tried
setResponsePage(Š) to the same page and that didn't work either.  I was
still forced to press the Clear action again to see the cookies
disappear.

J.D.







On 1/3/13 1:04 PM, Sven Meier s...@meiers.net wrote:

Hi James,

deleting a cookie on the response doesn't change the cookies in the HTTP
request.

A redirect should help to get a fresh cookie list from the browser.

Sven

On 01/03/2013 08:29 PM, Corbin, James wrote:
 This is a rehash of a previous discussion on this forum relating to
immediate removal of a browser cookie.

 I have a list view that displays data loaded from 1 or more browser
cookies.  On this panel I also have a clear action (Link) that when
clicked deletes the cookies.  The underlying list view model is detached
which forces (verified) the cookies to be re-read.

 The problem is that when I re-read them after deleting them from the
response, they are still present.  If I then execute the clear action
again, the list view is refreshed again and the cookies are no longer
present.

 I'm not sure what is going on here.  Are they being cached, is it a
timing issue?  Why on the second clear action does it finally indicate
the cookies have been removed.

 My immediate need is to be able to delete the cookies, refresh the list
view, and see that they are no longer present (no data rows in list
view).

 J.D.



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





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





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



ClassCastException (WebResponse)

2012-12-10 Thread Corbin, James
I have the following code that is generating a ClassCastException that I do not 
fully understand,


(WebResponse)RequestCycle.get().getResponse();


The actual type of the value returned is 
org.apache.wicket.ajax.AbstractAjaxResponse$AjaxResponse.


I'm trying to understand why this call returns an AjaxResponse instead of a 
WebResponse, in my case.  I don't believe the code where this code get executed 
is in the context of Ajax.


J.D.


Re: ClassCastException (WebResponse)

2012-12-10 Thread Corbin, James
Yeah, it is.  The action was triggered via an AjaxLink which I didn't
realize at the time.  Is there a way to get access to the WebResponse in
this scenario?  I need to delete a cookie, but obviously, you cannot do so
through an AjaxResponse.

J.D.


On 12/10/12 12:56 PM, Paul Bors p...@bors.ws wrote:

Most likely because it is an Ajax response... :)

Do you have the AjaxIndicator somewhere on your page and does it indicate
an
Ajax request cycle happening?
What about while in DEVELOPMENT mode, can you monitor the page activity
using the Wicket Ajax Debug Window?

FYI, while in DEVELOPMENT mode you might want to add the DebugBar to your
page as well.

~ Thank you,
  Paul Bors

-Original Message-
From: Corbin, James [mailto:jcor...@iqnavigator.com]
Sent: Monday, December 10, 2012 2:33 PM
To: users@wicket.apache.org
Subject: ClassCastException (WebResponse)

I have the following code that is generating a ClassCastException that I
do
not fully understand,


(WebResponse)RequestCycle.get().getResponse();


The actual type of the value returned is
org.apache.wicket.ajax.AbstractAjaxResponse$AjaxResponse.


I'm trying to understand why this call returns an AjaxResponse instead of
a
WebResponse, in my case.  I don't believe the code where this code get
executed is in the context of Ajax.


J.D.


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





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



Deleting Cookies

2012-12-06 Thread Corbin, James
I have a ListView that renders items that are populated from user cookie data.  
The ListView contains a clear action that is supposed to delete the cookies 
then refresh the ListView so it reflects that the cookie data was removed.  I 
have code that executes the deletion of the cookies (works), then I turn around 
and detach the ListView's model which triggers a rereading of the cookie data.  
For some reason (probably works as designed), when the model is detach and 
reloads the cookies, they are still present.
If I then force a page refresh, cookie data is in fact removed and the ListView 
is empty.

Is there a way to attain this?  Am I missing something?  I really don't want to 
have to reload the page to see that the cookie data has been removed.

J.D.




Re: Deleting Cookies

2012-12-06 Thread Corbin, James
The ListView is not in a form, which is why I am leaving the default for
setReuseItems to false.
I am using a LoadableDetachableModel and verified the load that rereads
the cookies, does in fact get called after I delete them (reset method
call below).  If I break in the load of the detachable model, it is
reading that there are still values for the cookies I deleted in the
previous step.

Basically, here is the body of my Ajax Link's onClick,

RecentlyViewedItemsCollection c = new
RecentlyViewedItemsCollection(util.getCurrentUser());
c.reset(); // this actually deletes all the 
cookies
getModel().detach(); // this forces the 
detachable model to call its
load, which attempts to re-read specific cookies that should no longer
exist

target.add(RecentlyViewedItemsPanel.this.get(itemContainer)); //
lastly, I refresh the parent (WebMarkupContainer) of the ListView

I would have expected that when the model's load method is called that it
would see that the cookies were removed, but it still finds them.

J.D.








On 12/6/12 3:29 PM, Sebastien seb...@gmail.com wrote:

Hi,

Be sure to use a LoadableDetachableModel
Also, maybe you set ListView#*setReuseItems* to true (because the ListView
is in a form)? You can set it to false if you have no validation and then
you will get fresh data (see ListView javadoc)

Hope this helps,
Sebastien.

On Thu, Dec 6, 2012 at 11:09 PM, Corbin, James
jcor...@iqnavigator.comwrote:

 I have a ListView that renders items that are populated from user cookie
 data.  The ListView contains a clear action that is supposed to delete
 the cookies then refresh the ListView so it reflects that the cookie
data
 was removed.  I have code that executes the deletion of the cookies
 (works), then I turn around and detach the ListView's model which
triggers
 a rereading of the cookie data.  For some reason (probably works as
 designed), when the model is detach and reloads the cookies, they are
still
 present.
 If I then force a page refresh, cookie data is in fact removed and the
 ListView is empty.

 Is there a way to attain this?  Am I missing something?  I really don't
 want to have to reload the page to see that the cookie data has been
 removed.

 J.D.






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



Re: Deleting Cookies

2012-12-06 Thread Corbin, James
Hi Sebastian,

Thanks for your feedback.  I wasn't recreating (semantics?) the Listview,
I was just refreshing it via ajax so it updates with the model changes.
What do you mean by reattach the listview's parent-container?  Do you
mean remove the listview and re-add it in the onbeforerender?

J.D.



On 12/6/12 4:16 PM, Sebastien seb...@gmail.com wrote:

Well, I think it is because this is the same listview that is redisplayed,
not the new one.
The cause is that you did not add the new listview to its parent.

But, I would have done a little bit differently because:
1/ You do not have to recreate the listview in ajaxlink's onclick. just
clear cookies and reattach the listview's parent-container
2/ You do not have - generally speaking - to detach you model yourself
and,
moreover, it is not interesting to do it in the same request cycle. It
should be end at the end of the previous cycle. The use of a LDM does this
for you.

So: just one ListView with a LDM, and it should be good.
If it's still not, maybe the persistence of the cookie update is a little
bit slow and IO-async... But I (means myself) could not help in a such
case.

Best regards,
Sebastien.


On Thu, Dec 6, 2012 at 11:41 PM, Corbin, James
jcor...@iqnavigator.comwrote:

 The ListView is not in a form, which is why I am leaving the default for
 setReuseItems to false.
 I am using a LoadableDetachableModel and verified the load that rereads
 the cookies, does in fact get called after I delete them (reset method
 call below).  If I break in the load of the detachable model, it is
 reading that there are still values for the cookies I deleted in the
 previous step.

 Basically, here is the body of my Ajax Link's onClick,

 RecentlyViewedItemsCollection c = new
 RecentlyViewedItemsCollection(util.getCurrentUser());
 c.reset(); // this actually deletes all
 the cookies
 getModel().detach(); // this forces the
 detachable model to call its
 load, which attempts to re-read specific cookies that should no longer
 exist

 target.add(RecentlyViewedItemsPanel.this.get(itemContainer)); //
 lastly, I refresh the parent (WebMarkupContainer) of the ListView

 I would have expected that when the model's load method is called that
it
 would see that the cookies were removed, but it still finds them.

 J.D.








 On 12/6/12 3:29 PM, Sebastien seb...@gmail.com wrote:

 Hi,
 
 Be sure to use a LoadableDetachableModel
 Also, maybe you set ListView#*setReuseItems* to true (because the
ListView
 is in a form)? You can set it to false if you have no validation and
then
 you will get fresh data (see ListView javadoc)
 
 Hope this helps,
 Sebastien.
 
 On Thu, Dec 6, 2012 at 11:09 PM, Corbin, James
 jcor...@iqnavigator.comwrote:
 
  I have a ListView that renders items that are populated from user
cookie
  data.  The ListView contains a clear action that is supposed to
delete
  the cookies then refresh the ListView so it reflects that the cookie
 data
  was removed.  I have code that executes the deletion of the cookies
  (works), then I turn around and detach the ListView's model which
 triggers
  a rereading of the cookie data.  For some reason (probably works as
  designed), when the model is detach and reloads the cookies, they are
 still
  present.
  If I then force a page refresh, cookie data is in fact removed and
the
  ListView is empty.
 
  Is there a way to attain this?  Am I missing something?  I really
don't
  want to have to reload the page to see that the cookie data has been
  removed.
 
  J.D.
 
 
 



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





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



Wicket 6 Ajax Behaviors

2012-11-30 Thread Corbin, James
I have some older javascript code that I am migrating to work with Wicket 6 and 
not sure how to do so.

I had some javascript that was triggering the onclick of an element in the 
following way,

somedomeelement.click();  // post wicket 1.4 this causes error - TypeError: 
Property 'onclick' of object #HTMLTableRowElement is not a function.

Post wicket 6 (1.5?) this will not work because of how wicket no longer 
produces the onclick attribute and instead uses event registration.

So, my question, how do I need to modify my javascript to be able to trigger 
the click event, because elem.click(); doesn't work.

J.D.




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


Convert bookmarkable url to wicket relative url?

2012-11-13 Thread Corbin, James
I need some help with converting a bookmarkable url into a wicket relative url.

My intent is to persist the url convert it to a wicket relative url and then 
redirect to that relative url.

I am using Component.urlFor(Class, PageParameters) api to generate the 
bookmarkable url.

Some interesting points about this problem is that I am using Wicket 6.0 , and 
Encrypting the URLs (using CryptoMapper).

The url format that comes back from the urlFor API, in my case, is as follows:

generatedUrlString = ./bookmarkable/path to some wicket page?x=FWzgyImodAY

I've tried the following to generate a wicket relative URL,


Url url = Url.parse(generatedUrlString);

String url2 = RequestCycle.get().getUrlRenderer().renderRelativeUrl(url);


This comes close, generating a URI, like,


protocol://host:port/wicket/wicket/bookmarkable/some wicket page?x



Notice that the parameter is chopped off.


Is there way to achieve a wicket relative url from a bookmarkable url with 
encrypted parameters?


Thanks,

J.D.



Detecting HTML 5 Features in Wicket

2012-11-12 Thread Corbin, James
Is there any built in support for detecting HTML 5 browser features like Web 
Storage?

If not, what is  the recommended approach for doing so?

I'm looking for a way to detect support for Web (e.g. Local) Storage, so in 
cases where the browser's do not support it (e.g., IE7), I can use cookies or 
some other mechanism instead.

Thanks,

J.D.


Re: Detecting HTML 5 Features in Wicket

2012-11-12 Thread Corbin, James
Thanks for the suggestions.

J.D.







On 11/12/12 9:05 AM, Phillips, David david.phill...@usaa.com wrote:

'getBatherExtendedBrowserInfo()' really just builds a small page to test
client side settings which posts back the information it's gathered. That
page is provided from 'newBrowserInfoPage()' in WebSession.

Thus, if you want to plug Modernizr into your session before the page
load, you can override this method and provide a custom page which
includes Modernizr. Three things to note about this approach. First, you
should probably start with just extending the 'BrowserInfoPage' class to
get it's built in postback functionality. Second, this callback doesn't
trigger until you call 'WebSession.getClientInfo()' for the first time,
so make sure that's done before any heavy lifting. Finally, I would
suggest embedding Modernizr onto your new page directly instead of
linking a JS file. This is mainly to reduce latency overhead from
multiple requests.

Thanks,
-David Phillips - USAA

-Original Message-
From: Corbin, James [mailto:jcor...@iqnavigator.com]
Sent: Monday, November 12, 2012 9:11 AM
To: users@wicket.apache.org
Subject: EXTERNAL: Re: Detecting HTML 5 Features in Wicket

Thanks, I have already.  I know how to detect HTML5 features using
javascript, just wondered what is the best way to do so from Wicket code.
Given your suggestion, how could I use Modernizr to set browser state
indicating, for example, that HTML 5 local storage is in fact supported.
I'm just not sure how to plug something like this into the initialization
of the web application.  It would be nice if the gather extended browser
info support in Wicket supported these properties.

I'm just curious how others have managed to answer the question, Does my
browser and version support HTML 5 Local Storage?, from Wicket code.

Thanks,
J.D.







On 11/12/12 7:59 AM, Phillips, David david.phill...@usaa.com wrote:

I would suggest taking a look at Modernizr (http://modernizr.com/) for
feature detection.

Thanks,
-David Phillips - USAA

-Original Message-
From: Corbin, James [mailto:jcor...@iqnavigator.com]
Sent: Monday, November 12, 2012 8:40 AM
To: users@wicket.apache.org
Subject: EXTERNAL: Detecting HTML 5 Features in Wicket

Is there any built in support for detecting HTML 5 browser features
like Web Storage?

If not, what is  the recommended approach for doing so?

I'm looking for a way to detect support for Web (e.g. Local) Storage,
so in cases where the browser's do not support it (e.g., IE7), I can
use cookies or some other mechanism instead.

Thanks,

J.D.

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





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


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





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



Session Destroy

2012-11-12 Thread Corbin, James
Is there any way in Wicket 6+ to be notified when the session is ABOUT to be 
destroyed?  The UnboundListener.sessionUnbound(…) API is too late in the cycle 
for me to interact with the session state.

Thanks,
J.D.


Re: Wicket in PHP

2012-10-23 Thread James mCruncher
Love the name picket.
Demo is impressive considering that it's in pre-alpha and in an entirely
new language.

On Tue, Oct 23, 2012 at 3:16 PM, martin.dilger martin.dil...@googlemail.com
 wrote:

 Hi,

 I´m a freelance software developer in germany.
 I recently got a problem, since my webhoster only provides php. I´m used to
 work with wicket, so i didnt want to miss this pleasure for my own website.

 So, the only solution was to implement wicket in php and call it
 (picket):).

 This is just a hobby project in pre-alpha state and far from
 production-ready, but my site
 www.effectivetrainings.de is completely implemented in picket.

 If you are interested, just have a look.

 http://www.effectivetrainings.de/framework/examples/pages/ExamplesPage.php

 Regards

 Martin Dilger



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


Re: Wicket page test

2012-10-23 Thread James mCruncher
Should that call be made on tearDown or tearDownClass?

On Mon, Oct 22, 2012 at 6:01 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 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


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


Re: [Announce] wicket-dashboard

2012-10-02 Thread James Eliyezar
Managed to get the demo working. It's really elegant.
Echoing the same feelings as Paul.
It would be nice to split this up into relevant modules.

While I was playing around with the code, I thought of creating a custom
widget with just a data table.
So I created the following classes:

   - TableWidget
   - TableWidgetView
   - TableWidgetDescriptor

Now what should be in TableWidget and what should be in TableWidgetView?

Should I expose the data provider and columns separately from TableWidget?

On Mon, Oct 1, 2012 at 10:35 PM, Paul Szulc paul.sz...@gmail.com wrote:

 Hi,

 I will be adding your dashboard to one of my projects - this is a matter of
 weeks (customer is really, really excited ;)). I have some suggestions, I
 would divide the project into seperate modules:

 - wicket-dashboard-core: module with dashboard itself, simply juest the
 component and needed interfaces (jar as an output)
 - wicket-dashboard-widgets: module were some standard widgets would be
 implemented (jar as an output)
 - wicket-dashboard-demo: module with demo useage (war as an output)

 This way to use dashboard one must simply add wicket-dashboard-core as
 dependency. He can now develop his own widgets or use standard widgets. To
 use standard widgets, he must also add wicket-dashboard-widgets as
 dependency to his project.

 What do you think about it?

 Paul Szulc


 On Mon, Oct 1, 2012 at 10:29 AM, Decebal Suiu decebal.s...@asf.ro wrote:

  Hi
 
  Thanks Paul for the nice words. wicket-dashboard code is used in
 production
  in NextReports server (see
 
 
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-a-dashboard-with-draggable-widgets-tp4652210p4652218.html
  )
  but with some additional features (multiple dashboards, detached widgets,
  ...).
 
  If you have any questions, ideas or suggestions, please do not hesitate
 to
  contact me.
 
  Best regards,
  Decebal
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308p4652565.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


Re: [Announce] wicket-dashboard

2012-10-01 Thread James Eliyezar
This is a very good news. Will be using this right away!

I have a small problem guys, definitely something is wrong with my setup
(I'm using nexus).
I get this exception when I try to build the project.

No versions available for
 org.codehaus.jackson:jackson-mapper-asl:jar:[1.8,1.8.6],[1.9,1.9.7] within
 specified range


But there indeed is a jackson-mapper-asl jar in my nexus. What's wrong here?

On Sun, Sep 30, 2012 at 2:55 AM, Paul Szulc paul.sz...@gmail.com wrote:

 ok, I was using my own internal repo, that is why it did not work
 now all is fine, dashboard look pretty damn cool, I will love to use it in
 one of my applications.

 did you used it on any production code yet?

 best regards
 pawel szulc

 On Tue, Sep 25, 2012 at 8:35 PM, Gabriel Landon glan...@piti.pf wrote:

  If you look in the pom.xml, you will find the repo :
 
  repository
  idjofc2.maven.repo/id
  nameJOFC2 GoogleCode.com Snapshot Repository/name
  url
 http://jofc2.googlecode.com/svn/repository/snapshots/
  /url
  /repository
 
 
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp4652308p4652343.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


Re: AjaxEditableLabel Issue (Application in Production Mode)

2012-09-26 Thread Corbin, James
Hi Martin,

Thanks for the feedback.  What is a bit confusing to me is how the
behavior changes when running wicket in Production Mode (doesn't work) vs.
Development Mode (works).  I don't see why the wicket application mode
would cause this behavior to change.

In our situation the AjaxEditableLabel component is nested in a table cell
and the table itself is parented by a Form.

I will look for JS errors as you suggest.

Thanks,
J.D.







On 9/26/12 12:59 AM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

It sounds like a JavaScript related problem.
It could be that there is blocked Ajax channel and the click cannot
make it to the server. Or something similar happened once, this leaded
to different state at the server and the client and since then it
cannot re-synchronizes the states.

Reload the page and look for JavaScript errors.
In Firebug do: Wicket.Log.error = function(text) {console.log(text);}

On Tue, Sep 25, 2012 at 9:25 PM, Corbin, James jcor...@iqnavigator.com
wrote:
 I have an interesting issue that crept up in the use of the
AjaxEditableLabel component in Wicket 1.4.13 (I know, ancient).

 The component stopped processing the click event that is supposed to
cause the editor to render.  I was seeing different behavior depending
upon the mode of the Wicket Application and wondered if anyone might
have a  clue as to what was going on.

 With the exact same source code, when the Wicket Application was
configured to run in Production Mode, the AjaxEditableLabel would not,
when clicked, render the editor, but when in Development mode, it worked
as expected.

 In the server log there is a warning that the component is either not
visible or not enabled, which I know isn't true because it works
perfectly fine when the Wicket Application is in Development Mode.

 The only behavior that is being overridden on the AjaxEditableLabel
instance is the onSubmit.

 I searched the forums and google and could not find anything that would
explain the different behavior of this component when the application
mode was changed from development to production.

 Interesting enough, the AjaxEditableLabel does work fine in Production
mode in other areas of the application when no behaviors are overridden.
 Not sure if that has anything whatsoever to do with this issue.

 Ideas?

 J.D.



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

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





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



AjaxEditableLabel Issue (Application in Production Mode)

2012-09-25 Thread Corbin, James
I have an interesting issue that crept up in the use of the AjaxEditableLabel 
component in Wicket 1.4.13 (I know, ancient).

The component stopped processing the click event that is supposed to cause the 
editor to render.  I was seeing different behavior depending upon the mode of 
the Wicket Application and wondered if anyone might have a  clue as to what was 
going on.

With the exact same source code, when the Wicket Application was configured to 
run in Production Mode, the AjaxEditableLabel would not, when clicked, render 
the editor, but when in Development mode, it worked as expected.

In the server log there is a warning that the component is either not visible 
or not enabled, which I know isn't true because it works perfectly fine when 
the Wicket Application is in Development Mode.

The only behavior that is being overridden on the AjaxEditableLabel instance is 
the onSubmit.

I searched the forums and google and could not find anything that would explain 
the different behavior of this component when the application mode was changed 
from development to production.

Interesting enough, the AjaxEditableLabel does work fine in Production mode in 
other areas of the application when no behaviors are overridden.  Not sure if 
that has anything whatsoever to do with this issue.

Ideas?

J.D.


Re: Datepicker with range selection support

2012-09-23 Thread James Eliyezar
This is really amazing Sebastien.
wicket-jquery-ui is really feature rich.

Is the demo site a wicket app?

On Mon, Sep 24, 2012 at 1:38 AM, Sébastien Gautrin 
sebastien.gaut...@gmail.com wrote:

 Wow,

 This is simply terrific. I will sift through all this in the next weeks.

 All I can say is a big thanks for everything!

 Sébastien


 On 22/09/12 19:00, Sebastien wrote:

 Hi Sebastien.

 wicket-jquery-ui has the goal to integrate jQuery UI widgets as Wicket
 components; but it's also designed to integrate (easily, I guess) any
 jQuery plugins (that's what I tend to evince in the tutorial series...).

 So, I played around with the fox-run-software (range-)date-picker... I
 noticed that the (kind-of) drop-down box which displays the date-picker is
 not shipped in the library and should therefore be achieved out of the
 box,
 as stated here:
 http://www.foxrunsoftware.net/**articles/javascript/date-**
 range-picker-similar-to-**google-analytics/http://www.foxrunsoftware.net/articles/javascript/date-range-picker-similar-to-google-analytics/

 Given this, I did integrate two components (for both Wicket 1.5.8  Wicket
 6.0.0):
 The first one is a RangeDatePicker, which is designed - when used alone -
 to be an 'inline' widget, with an ajax behavior triggered on 'change'
 event. This component can serves as base for more complex component, like
 a
 google-analytics-date-picker..**.. (you will notice that the change
 event is
 triggered on every date click... A merge request - that provide an
 'onRangeChanged' event - is in stand-by since a month and has therefore
 not
 been merged yet). The second component relies on this first one and on a
 TextField to make the RangeDatePickerTextField (which indeed is a
 FormComponent). It should be closed to the component you are looking
 for...

 http://www.7thweb.net/wicket-**jquery-ui/plugins/datepicker/**
 RangeDatePickerTextFieldPagehttp://www.7thweb.net/wicket-jquery-ui/plugins/datepicker/RangeDatePickerTextFieldPage

 If it fits your needs, you can either use it (released as
 com.googlecode.wicket-jquery-**ui:jquery-ui-plugin:1.2.3-**SNAPSHOT) or
 have a
 look at github project to see how it works. Sure, do not hesitate to have
 a
 look at the other integrations as well (wicket-select2 is a prime example,
 and the other jQuery integrations too).

 If you have any questions, do not hesitate to use the forum (you may find
 the link on the demo site's homepage)

 Best regards,
 Sebastien.

 On Fri, Sep 21, 2012 at 4:37 PM, Sébastien Gautrin 
 sebastien.gaut...@gmail.com wrote:

  Well,

 If you make a tutorial about creating a plugin using wicket-jquery-ui,
 even though it'll be for wicket 6, it should be relatively simply
 adaptable
 to do the same for wicket 1.5 (unless there's a huge lot of changes
 between
 the two for wicket-jquery-ui which is quite possible considering wicket 6
 comes with jquery support unlike 1.5).

 I'll take a look at your current how tos for wicket-jquery-ui (we don't
 use wicket-jquery-ui for the moment - we have a few components using
 wiquery and a couple very old components using jquery-ui in a crappy
 way),
 but that's always interesting to see what's out there and how it works.

 I'll take a closer look on wicket-select2 as well, as I suppose it could
 be a good inspiration to integrate the fox run software datepicker
 library
 (which is not using jquery-ui).

 Regards,

 Sébastien

 Sebastien wrote:

  Hi again,

 Well... I was looking for a jQuery plugin for the 3rd part of my
 HowTo's,
 about creating a plugin using wicket-jquery-ui.
 Maybe will I play with that one in the coming days... (just note that it
 will be over Wicket 6)

 Regards,
 Sebastien.





 --**--**-
 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: How to create a dashboard with draggable widgets?

2012-09-23 Thread James Eliyezar
It's exciting to be part of wicket community.
Thanks a lot friends for your enthusiastic responses.
I will go through the resources you have shared.

On Fri, Sep 21, 2012 at 6:13 PM, Decebal Suiu decebal.s...@asf.ro wrote:

 Hi

 I will release today or Monday a wicket-dashboard project on github. This
 project it's an open source project (Apache license) based on the dashboard
 implementations from nextserver (for a live demo see
 http://http://demo.next-reports.com/ user:demo, password:demo).
 I used jquery sortable from wiquery (in another project I uesd jqwicket)
 for
 dragdrop. When user stop on dragdrop a widget, a js function calls a
 wicket behavior with a json (as parameter) that contains the position
 (column and row) for each widget.
 I have a implementation for widgets like charts (openflashchart), text,
 pivot (see https://github.com/decebals/wicket-pivot)

 Best regards,
 Decebal



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-create-a-dashboard-with-draggable-widgets-tp4652210p4652218.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


Re: [Announce] wicket-jquery-ui 6.0.0 released

2012-09-21 Thread James Eliyezar
Hi Sebastien,

Checked out the demos and wicket-jquery-ui looks amazing.
The examples are very clear, the code looks much simpler.
Looks I'll be moving over to wicket-jquery-ui soon.
Thank you for all your efforts and hardwork.

On Thu, Sep 13, 2012 at 7:19 AM, Sebastien seb...@gmail.com wrote:

 I am glad to follow, in this announcement period...

 wicket-jquery-ui 6.0.0 is an integration of jQuery UI (widgets,
 interactions  effects) over Wicket 6.0.0.
 Some other extensions are also available (Kendo UI widgets, Calendar).

 Links, infos  demos:
 http://www.7thweb.net/wicket-jquery-ui

 Best regards,
 Sebastien.




-- 
Thanks  regards
James Selvakumar


How to create a dashboard with draggable widgets?

2012-09-21 Thread James Eliyezar
Wicketers,

Wondering how to create a google analytics style dashboard with draggable
widgets that remembers it's position across sessions.
Please share your thoughts.

-- 
Thanks  regards
James Selvakumar


Using a div/span tags for wicket components

2012-09-21 Thread Corbin, James
I'm sure this subject has been discussed before many times, but would like to 
revisit it to get some thoughts from the community.

Consider a Wicket TextField.  The typical markup is something like,

input type=text wicket:id=someId …/

I would like to, instead, specify a span or a div in the markup and bind the 
TextField to that markup instead.

I know I can achieve this by creating a new class that extends Panel (call it 
TextFieldPanel) with markup similar to the following,

…
wicket:panel
input type=text wicket:id=someId/
/wicket:panel

Now I can use a div or span tag as in,

div wicket:id=editor/

The problem with this approach is now if I want to affect some portion of the 
TextField, like adding a behavior to it, I'm almost forced to expose internal 
details about the Panel impl that I shouldn't.

For example, myTextFieldPanel.addBehaviorToChildComponent(IBehavior… behavior) 
which then adds the behavior to the TextField within the derived Panel.

It would be nice to be able to do something like,

public  class MyTextFieldT extends TextFieldT {…}

That allows you to use a span or a div for the markup but generates valid 
HTML.  With this approach you would be less inclined to expose the internals of 
the implementation because you are operating on an actual TextField instance.

I am using a fairly old version of Wicket, 1.4.13 but in the process of 
upgrading to 6.0.  So I would like some thoughts on if this is feasible for 
1.4.x and if its even practical.  I realize I have control over the 
construction of the markup for a component but I'm concerned as well about 
making sure the generated markup is valid HTML.

Thanks,
J.D.


  1   2   3   4   5   6   7   8   9   10   >