Re: Form submit - button click

2015-09-04 Thread Bernard
Your feedback component is not contained in any AJAX target. You add the
feedback component to the page which does not get refreshed after the form
submit.

AJAX is preferably used to avoid what you are expecting (page refresh).


On Fri, Sep 4, 2015 at 5:45 PM, Mihir Chhaya  wrote:

> Hello,
>
> I am finding problem while submitting form on button click.
>
> I have simple login form with login button. User name and password fields
> are required. The button type is submit in html. But when I click the
> button the page does not show feedback messages. On clicking browser page
> refresh/reload (F5) only I see the feedback message. Could anybody suggest
> me what I am missing?
>
> Here is the page:
>
> public class Login extends WebPage {
>
> NotificationPanel feedbackPanel;
>
> public Login() {
>
> feedbackPanel = new NotificationPanel("statusbar");
> feedbackPanel.setOutputMarkupId(true);
> feedbackPanel.setMarkupId("statusbarId");
> add(feedbackPanel);
>
> Form form = new Form("login-form"){
> @Override
> protected void onSubmit() {
> super.onSubmit();
> System.out.println("Form onSubmit called...");
> }
> };
> form.setOutputMarkupId(true);
> add(form);
> form.add(userNameField("username", form));
> form.add(passwordField("password", form));
> AjaxFallbackButton submitButton = addLoginButton("login-button",
> form);
> form.add(submitButton);
> form.setDefaultButton(submitButton);
> form.setOutputMarkupId(true);
> }
>
> private PasswordTextField passwordField(String property, Form
> form) {
> PasswordTextField passwordTextField = new
> PasswordTextField(property);
> passwordTextField.setOutputMarkupId(true);
> passwordTextField.setRequired(true);
> passwordTextField.setMarkupId(property.concat("Id"));
>
> return passwordTextField;
> }
>
> private RequiredTextField userNameField(String property,
> Form form) {
> RequiredTextField userNameFld = new
> RequiredTextField(property) {
> @Override
> protected void onComponentTag(ComponentTag tag) {
> super.onComponentTag(tag);
> if (!isValid()) {
> tag.put("style", "background-color:red");
> }
> }
> };
> userNameFld.setOutputMarkupId(true);
> userNameFld.setMarkupId(property.concat("Id"));
>
> return userNameFld;
> }
>
> private AjaxFallbackButton addLoginButton(String property, Form
> form) {
> AjaxFallbackButton submitBtn = new AjaxFallbackButton(property,
> form) {
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form form)
> {
> super.onSubmit(target, form);
> target.add(form);
> }
> };
>
> submitBtn.setDefaultFormProcessing(true);
>
> return submitBtn;
> }
> }
>
>
> Here is Mark up:
>
> 
> 
> 
> 
> 
> User Name:
> 
> 
>  placeholder="User Name" style="width:250px; text-align:left;">
> 
> 
> 
> 
> Password:
> 
> 
>  placeholder="Password" style="width:250px; text-align:left;">
> 
> 
> 
> 
>  wicket:id="login-button"/>
> 
> 
> 
> 
>
> Thanks,
> -Mihir.
>


How to get FormComponent value outside Model

2015-06-08 Thread Bernard
Hi,

I hope someone can help me learn and understand this.

After Form#onSubmit(), without any error on the Wicket side, the service
tier has a validation error that belongs to a known FormComponent. With a
class extending  AbstractFormValidator, the known FormComponent gets the
error which is shown in context correctly. Great.

However, after re-display of the page with the error, the original input is
lost from the field because the service method does not return it and it is
not in the model. I guess this is by design and it makes sense to me. So in
order to fix this, the service would need to return the erroneous value in
the erroneous field.

My question is what the correct Wicket pattern would be for this type of
use case. Can I get the erroneous user input back from Wicket at this stage
(after onSubmit() ) and push it back into the FormComponent?

The use case by the way is a model object that has two ID fields one
transient and one persisted while there is only one FormComponent for it
that has a custom IModel with getters and setters that are connected to the
two ID fields alternatively. This solves the problem where an ID is either
user generated or system generated depending on some entity type. BTW I
feel that Wicket lets me handle this very well.

Many thanks.

Bernard


Re: How to get FormComponent value outside Model

2015-06-08 Thread Bernard
Hi Sven,

 and the user input is cleared.

Thank you. The user input is cleared, and this is definite and there is no
way to get it from Wicket at this stage (after onSubmit()). I take this as
your definite answer.

Re your question. The domain model does not strictly follow the beans
standard. It has two ID fields one persistent (the final, definite ID field
that may be service tier generated) and one transient that the user can
enter values into. It has an asymetric custom Wicket IModel. It solves a
mildly tricky problem that I described in my 1st post. The consequence is
that the erroneous value is lost because it does not get transferred into
the persistent id field where only valid values can exist. I can solve the
problem on the Wicket side by checking for the error and only then fetching
the value from the transient erroneous field in the model.

You see I have some messy logic here which might be ok, or there might be a
better Wicket way. Therefore I wanted to ask in the user group whether I am
missing something. Again thanks very much. In any case, Wicket is a very
elegant framework that lets one do almost everything with great confidence,
last not least because of your great support. Wicket 7 is the best release
I have ever seen. I am impressed by the improved session expiry behavior,
the best kept secret of this release.

Regards,

Bernard

On Mon, Jun 8, 2015 at 9:22 PM, Sven Meier s...@meiers.net wrote:

 Hi Bernard,

  applicable Wicket pattern which is different from validation before
 #onSubmit()

 for Wicket validation happens before submit: the values are set into the
 models and the user input is cleared.

 There's something I don't understand - you've written:

  However, after re-display of the page with the error, the original input
 is lost from the field because the service
  method does not return it and it is not in the model.

 The entered value should already be in your domain object, before
 #onSubmit() is called.
 Or are you replacing the whole model object with the return value of the
 service method? In that case you should transfer the values between these
 two objects by yourself.

 Regards
 Sven



 On 08.06.2015 10:53, Bernard wrote:

 Hi Sven,
 The form validator is not added to the form. It just helps to display the
 error after #onSubmit() which I am sure is called otherwise the service
 method would not get called. It is the return of the service method that
 creates the error response. That is why I am keen on learning about an
 applicable Wicket pattern which is different from validation before
 #onSubmit().

 Regards,

 Bernard

 On Mon, Jun 8, 2015 at 8:02 PM, Sven Meier s...@meiers.net wrote:

  Hi,

   After Form#onSubmit(), without any error on the Wicket side, the
 service

 tier has a validation error that belongs to a known FormComponent. With
 a
 class extending  AbstractFormValidator, the known FormComponent gets the
 error which is shown in context correctly

  if a FormValidator reports an error during validation, #onSubmit() will
 not be called and the input will stay in the field.

 Are you adding the FormValidator to the form, or are you triggering its
 validation by yourself?

 Regards
 Sven



 On 08.06.2015 09:12, Bernard wrote:

  Hi,

 I hope someone can help me learn and understand this.

 After Form#onSubmit(), without any error on the Wicket side, the service
 tier has a validation error that belongs to a known FormComponent. With
 a
 class extending  AbstractFormValidator, the known FormComponent gets the
 error which is shown in context correctly. Great.

 However, after re-display of the page with the error, the original input
 is
 lost from the field because the service method does not return it and it
 is
 not in the model. I guess this is by design and it makes sense to me. So
 in
 order to fix this, the service would need to return the erroneous value
 in
 the erroneous field.

 My question is what the correct Wicket pattern would be for this type of
 use case. Can I get the erroneous user input back from Wicket at this
 stage
 (after onSubmit() ) and push it back into the FormComponent?

 The use case by the way is a model object that has two ID fields one
 transient and one persisted while there is only one FormComponent for it
 that has a custom IModel with getters and setters that are connected to
 the
 two ID fields alternatively. This solves the problem where an ID is
 either
 user generated or system generated depending on some entity type. BTW I
 feel that Wicket lets me handle this very well.

 Many thanks.

 Bernard


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




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




Re: How to get FormComponent value outside Model

2015-06-08 Thread Bernard
Hi Sven,
The form validator is not added to the form. It just helps to display the
error after #onSubmit() which I am sure is called otherwise the service
method would not get called. It is the return of the service method that
creates the error response. That is why I am keen on learning about an
applicable Wicket pattern which is different from validation before
#onSubmit().

Regards,

Bernard

On Mon, Jun 8, 2015 at 8:02 PM, Sven Meier s...@meiers.net wrote:

 Hi,

  After Form#onSubmit(), without any error on the Wicket side, the service
 tier has a validation error that belongs to a known FormComponent. With a
 class extending  AbstractFormValidator, the known FormComponent gets the
 error which is shown in context correctly


 if a FormValidator reports an error during validation, #onSubmit() will
 not be called and the input will stay in the field.

 Are you adding the FormValidator to the form, or are you triggering its
 validation by yourself?

 Regards
 Sven



 On 08.06.2015 09:12, Bernard wrote:

 Hi,

 I hope someone can help me learn and understand this.

 After Form#onSubmit(), without any error on the Wicket side, the service
 tier has a validation error that belongs to a known FormComponent. With a
 class extending  AbstractFormValidator, the known FormComponent gets the
 error which is shown in context correctly. Great.

 However, after re-display of the page with the error, the original input
 is
 lost from the field because the service method does not return it and it
 is
 not in the model. I guess this is by design and it makes sense to me. So
 in
 order to fix this, the service would need to return the erroneous value in
 the erroneous field.

 My question is what the correct Wicket pattern would be for this type of
 use case. Can I get the erroneous user input back from Wicket at this
 stage
 (after onSubmit() ) and push it back into the FormComponent?

 The use case by the way is a model object that has two ID fields one
 transient and one persisted while there is only one FormComponent for it
 that has a custom IModel with getters and setters that are connected to
 the
 two ID fields alternatively. This solves the problem where an ID is either
 user generated or system generated depending on some entity type. BTW I
 feel that Wicket lets me handle this very well.

 Many thanks.

 Bernard



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




RE: Question on Double Submit and rendering strategy

2015-01-14 Thread Bernard Bernard
Hi Mark,

I read your post on the Wicket users list.

Prevention of double submits can safely be achieved with an old J2EE design
pattern, a server token.

So the server generates a token for the form and expects it on submission.
After the first submission it is invalidated and subsequent submissions
will get a different response.

In Wicket, this is very easy to solve 1) if one includes the server token
in a form field (interestingly, the page already has a token to prevent
CSRF attacks), and 2) if one ensures that there is only a single instance
of the page for an existing session.

This is a stateful solution obviously but here, server state really pays
dividends.

There might be issues with forcing a single page instance per session, but
it is possible that any other mechanism implementing the server side token
pattern suffer from similar issues.

Please see https://issues.apache.org/jira/browse/WICKET-5810 for the
experimental concept of a singleton page which you could use to implement
your server token solution. The singleton concept would even cover the case
where the user has the same form open in two windows and does the bad
thing. I would not want to depend on JavaScript for double submit
prevention. I have seen in production duplicate orders with JavaScript
prevention.

Regards,

Bernard


Re: Request for re-opening a Jira issue

2014-09-16 Thread Bernard
Martin,

First I appreciate very much your hard work in the mailing list and
Jira space.

Re 1. I accept this, but before developing ideas, I would want to
reach some consensus that there is a chance of having some change
implemented in wicket core.

Re 2. The use case needs page state because it uses panel replacement
where the last state must be the only available state. The previous
state must be destroyed and not be available to the user even after
reload. That is the whole point, the solution that solves the back
button problem in this use case. I see from your comment that I did
perhaps not explain the use case. But my dilemma is when I write too
much about the use case, then I would lose the compactness and clarity
of the issue. Of course there are potentially other solutions not
involving page state but alternatively session state but these would
depart from wicket patterns. I would feel more like programming Spring
MVC or similar technologies lacking the power of Wicket.

More below inline ...

On Mon, 15 Sep 2014 10:24:41 +0300, you wrote:

Hi,

I think it should not be re-opened!

1. JIRA is not support forum!
If you have questions then you should ask here (at users@ mailing list).
If you have ideas then you should discuss them at dev@ mailing list.

2. If you want to not have the ?pageId in the url then you should stick to
stateless components and behaviors.
This is by design!
Stateful pages cannot work without the pageId parameter!

What if Wicket switches processing in case of setVersion(false)? What
would stop us from letting Wicket use a singleton page version if
setVersion(false), making the version parameter entirely obsolete?
This appears to be very logical to me. As I wrote in the Jira ticket,
setVersioned(false) should just do what the word means. Currently that
is not the case because we are saying Wicket needs the version number.

Solutions like NoVersionRequestMapper are pure hacks. Use them at your own
responsibility! Wicket developers are not responsible for them!


We want to change that. Honestly, this is the whole point. I am sick
of these hacks that get broken because of what they are!


3. Wicket provides some default implementations for IRequestMapper
interface.
But it also allows you to provide your own when you believe the default
ones are not optimal for you.
Same as above if I understand this right. I really don't feel strong
enough about changing low level internals too much - risk of getting
broken.

3.1. Wicket does its best to be backward compatible with previous versions.
Before every release we test the suggested new release with as much
applications as we have. If we find a regression we cancel the release and
cut a new one. You are very welcome to join us with testing your
application, with your custom implementations of Wicket interfaces, and
report regressions !

Thanks for that. I am afraid of getting into some hacking mode where
my custom implementation gets broken and I would just waste your time.



I'll copy my response to the ticket for cross reference.

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

On Sun, Sep 14, 2014 at 10:55 AM, Bernard bht...@gmail.com wrote:

 Hi,

 I created a Jira issue

 https://issues.apache.org/jira/browse/WICKET-5693
 setVersioned(false) should force single Page Version

 Initially information was not sufficient or clear enough so the issue
 was closed.

 Meanwhile I have added the requested information.

 Could this issue please be re-opened.

 Many thanks.

 Bernard

 ---
 This email is free from viruses and malware because avast! Antivirus
 protection is active.
 http://www.avast.com


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




---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


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



Request for re-opening a Jira issue

2014-09-14 Thread Bernard
Hi,

I created a Jira issue

https://issues.apache.org/jira/browse/WICKET-5693
setVersioned(false) should force single Page Version

Initially information was not sufficient or clear enough so the issue
was closed.

Meanwhile I have added the requested information.

Could this issue please be re-opened.

Many thanks.

Bernard

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


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



Re: Components can no longer be added

2013-12-08 Thread Bernard
Hi,

I am an expert in shooting myself in the foot with Wicket / Java
problems.

In a situation like this, I would do the same as you do - isolate the
pattern and make a quickstart. Unfortunately, this approach is full of
assumptions, and my statistics say that this succeeds only in 20% of
all cases.

So I usually have to do it the hard way: Take a copy of the
application and strip it down generation by generation until the
culprit is isolated in its most simplistic form.

I think in 50% of all cases, I could see my own fault. In the other
50% I submitted a Wicket jira issue, where again in 50% of these it
was my fault not Wicket.

Regards,

Bernard



On Mon, 9 Dec 2013 05:28:52 +, you wrote:

Wicketeers,

I have another hard-to-track down issue.

To make matters worse, I've actually taken this code/pattern, put it into a 
quickstart - and what do you know - it works fine...! This means I have no way 
to recreate this error in a demonstrable way. Hopefully if I throw this out 
there, someone might be able to describe the error and I can then determine 
what I'm doing to cause it. Unfortunately google has zero results for;

+Components can no  longer be added +wicket

Anyway... the exception I'm getting is;

java.lang.IllegalStateException: Components can no  longer be added
 at 
 org.apache.wicket.ajax.AbstractAjaxResponse.assertNotFrozen(AbstractAjaxResponse.java:740)
 at 
 org.apache.wicket.ajax.AbstractAjaxResponse.assertComponentsNotFrozen(AbstractAjaxResponse.java:733)
 at 
 org.apache.wicket.ajax.AbstractAjaxResponse.add(AbstractAjaxResponse.java:358)
 at 
 org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:239)
 at 
 org.apache.wicket.ajax.AjaxRequestHandler.add(AjaxRequestHandler.java:232)
 at 
 org.apache.wicket.extensions.markup.html.repeater.tree.TableTree.updateBranch(TableTree.java:178)
 at 
 org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree.expand(AbstractTree.java:204)
 at myapp.TreeUtils.expandNode(TreeUtils.java:25)
 at myapp.TreeUtils.expandAll(TreeUtils.java:19)


It is caused when refreshing a table-tree component, that had previous 
rendered correctly and had successfully expanded the nodes. This problem 
happens when the table-trees parent component is refreshed, in which the table 
is rebuilt from new, and replaced the old table. Having debugged the code, 
it's something to do with the AjaxRequestHandler that has been retrieved - in 
that it's components are 'frozen'. It's odd as I'm in  the onConfigure() part 
of the lifecycle, and therefore components should be okay to be added - 
especially as they are brand new components. Could the AjaxRequestHandler 
being retrieved be the wrong one, stale one?

List I said - I can't recreate it in a Quickstart, so there is obviously 
something else in the 100k+s of the projects code that is doing something else 
to mess it up.

The 'Tree Utils' class looks like this;

public class TreeUtils {

@SuppressWarnings(unchecked)
public static void expandAll( AbstractTree? tree ) {

// stupid cast!! Has to happen for use to retrieve the roots, 
 generically.
AbstractTreeObject castTree = (AbstractTreeObject) tree;

Iterator? roots = tree.getProvider().getRoots();
while( roots.hasNext() ) {

Object root = roots.next();
expandNode( castTree, root );
}
}

private static void expandNode( AbstractTreeObject tree, Object node) {

tree.expand(node);

Iterator? children = tree.getProvider().getChildren(node);
while( children.hasNext() ) {

Object child = children.next();
expandNode( tree, child );
}
}
}


Any pointers and tips would be greatly appreciated.

Cheers,
Col.
EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and 
with authority, states them to be the considered view, opinion, conclusions, 
advice or statement of this company. Every care is taken but we recommend that 
you scan any attachments for viruses.


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


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

Re: Stateful / versioned / bookmarkable

2013-10-27 Thread Bernard
Hi,

1) Stateful pages don't need to be versioned: setVersioned(false). But
they get a version id in the URL nevertheless, meaning the
implementation is not as good as it could be. A stateful page can be
bookmarkable. As said above, you get 2 URLs for it, not unique.

2) I agree this has valid use cases, e.g. where the user works with a
page that changes state, e.g. via panel replacement, and the user
should NOT be able to go back to any of the previous states. Otherwise
one cannot implement a reliable state machine if the user can
undermine it with back button support.

Wicket should support this use case, but AFAIK it does not.

We have been able to code various workarounds but there is a problem
with these workarounds: They are not stable - Wicket has broken these
with subsequent releases - and I have given up playing this cat and
mouse game.

So until a non-versioned URL coding strategy becomes part of the
Wicket core, this will remainin a frustrating up-hill battle.

Please note that there will likely not be a 100% perfect solution to
this because of the servlet API. On the first page visit, the
container adds a jsessionid parameter to the URL until cookie support
is established. In that case, there will still be 2 URLs for the same
non-versioned page, even without a versioning parameter in the URL.
But that is only a minor issue if you can put another page in front of
your non-versioned page.

Summing it up, I would suggest that you create a Jira issue for Wicket
non-versioned URL support for our use cases. A page has to be
mountable with such a policy so that as you say, only the latest
version is available, and that must be reflected in a stable URL where
ony one unique value exists.

It can be done, it has been done before, it is just a matter of good
will and policy. The Post-Redirect-Get pattern supports this, and I
know that other frameworks support this, too.

Regards,

Bernard

On Sun, 27 Oct 2013 05:26:07 -0700 (PDT), you wrote:

Afaik stateful pages are always versioned. I wonder about these two
questions:

1. In this case links to versioned pages are not bookmarkable (since they
contain the verion identifier). Correct? This would meen that stateful pages
cannot have bookmarkable links. But this contradicts some statements in the
wicket documenbtation (e.g.
https://cwiki.apache.org/confluence/display/WICKET/Pages).

2. I believe having stateful pages without versioninig are a valid use case
(i.e. storing just one page instance per page, e.g. for caching pre
calculated values or remembering some GUI settings, the back button leads
always to the same stored instance). Are there good reasons to avoid such a
scenario? Or are there good practices to achive it?

Thanks, Frank


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



Re: Interesting article from Zeroturnaround

2013-08-03 Thread Bernard
Simon's article is entertaining but of low quality.

It contains a few errors.

Wicket received negative points certainly for the wrong reasons.

I don't know what Simon tries to address with his criticism of
Wicket's inheritance. Designing a web site based on markup inheritance
could be considered difficult to grasp. But that is optional and I
don't think he even tried to get there. He does not comment on whether
other frameworks even provide this.  Unfortunately he used this in
multiple rating criteria.

But he did not mention markup composition and dynamic component
replacement which in Wicket is very easy.

Components have to extend Wicket's basic components like Panel. This
is easy. Not understanding this concept easily would be a concern.

His comments on scalability are not convincing. He does not
distinguish between performance and scalability. Wicket has a slight
scalability disadvantage because of its reliance on session affinity
which he did not mention. Wicket generates content on the server like
Grails, Struts, Spring MVC, Play and JSF. GWT and Vaadin are more
client centric. So he would have to group client side and server side
frameworks to clarify.

Wicket works well for scalability if that is your goal when
developing the foundation; otherwise, you’re better off using another
framework that doesn’t have such a huge server resource consumption
problem.

This sentence is nonsense, semantically and technically. It
disqualifies the whole article.

He would need to clarify what his foundation is and provide a
scenario to back up his claim of huge server resource consumption
problem. 

I think it is quite difficult to rate Web frameworks, especially when
they are based on different architectures, and have different
purposes.


Bernard


On Wed, 31 Jul 2013 13:56:09 +0200, you wrote:

I don't agree with everything in it, but it's a good article anyway :) ...

http://zeroturnaround.com/rebellabs/the-curious-coders-java-web-frameworks-comparison-spring-mvc-grails-vaadin-gwt-wicket-play-struts-and-jsf/

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


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



Re: How to deal with JPA Entities in a Wicket Model? (Data handling in models)

2013-05-06 Thread Bernard
Hi,

This can be solved by using a generic LoadableDetachableModel
implementation that loads a model via an interface that constructs a
new entity. 

Preferably it is a subclass of a persisting LoadableDetachableModel
that has access to EntityManager.

The new POJO entity can be stored in the session at low cost without
effort. Once entity is persisted, the LDM changes its behavior into
that of the super class, and the model object (POJO) is removed from
the session. Now its primary key that is used to get it back from
EntityManager is stored in the session as usual.

The Wicket LDM concept is very powerful.


Kind Regards,

Bernard


On Sat, 04 May 2013 15:35:37 +0200, you wrote:


Am 03.05.2013 16:28, schrieb Bertrand Guay-Paquet:
 Best solution I can imagine would be if there would be a callback or 
 overridable method which is called when the user navigates to a page 
 and another one which is called when the user leaves a page. Those 
 methods would be great to prepare and cleanup models. Are there such 
 methods?
 No method will reliably inform you that a user left a page. His WIFI 
 could die, the power could go out, etc. You must clear all expired 
 temporary data after some time. If your data is stored in the session, 
 that's done automatically for you.

Thanks for your answer.

I understand, that there can be situations when a user actually doesn't 
leave a page the usual way, but if there were a method as described, it 
could at least be helpful for all the preceding page-leave-events under 
normal conditions.

At the moment I think I could handle the problem of unsaved data by 
using a Stateful Session Bean.

Best Regards,

Christian



Mit freundlichen Grüßen,  ///  Kind Regards,
  Christian Reiter


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



Panel replacement and No Page found for component

2013-04-25 Thread Bernard
Hi,

My form with multiple buttons replaces its parent panel at the end of
the button's onSubmit().

But after onSubmit(), the StateLessForm's process() method calls
getPage() with the result of a RuntimeException No Page found for
component.

I use StatelessForm because I want the page to be stateless with it in
most cases but in other cases the page should become stateful.

Any ideas?

Many thanks,

Bernard







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



Re: Panel replacement and No Page found for component

2013-04-25 Thread Bernard
Thanks. Will do.

On Thu, 25 Apr 2013 13:27:06 +0300, you wrote:

Hi,

I don't see another solution but to copy/paste StatelessForm code in your
own class until Wicket 6.8.0 and use #findPage() instead of #getPage().
File a ticket for improvement.


On Thu, Apr 25, 2013 at 1:13 PM, Bernard bht...@gmail.com wrote:

 Hi,

 My form with multiple buttons replaces its parent panel at the end of
 the button's onSubmit().

 But after onSubmit(), the StateLessForm's process() method calls
 getPage() with the result of a RuntimeException No Page found for
 component.

 I use StatelessForm because I want the page to be stateless with it in
 most cases but in other cases the page should become stateful.

 Any ideas?

 Many thanks,

 Bernard







 -
 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: setDefaultFormProcessing and models

2013-04-08 Thread Bernard
Hi,

Perhaps you can use a combination of what is avaliable in the javadoc
of org.apache.wicket.markup.html.form.Form e.g.
FormComponent#updateModel()

Regards,

Bernard


On Sun, 7 Apr 2013 15:14:19 -0700 (PDT), you wrote:

Maybe I just need this explained to me a little clearer, but I was wondering
about what appears to me to be a contradiction in how validation and
model-setting and the setDefaultFormProcessing(false) works.  Maybe
contradiction is the wrong word.  Let's say inconvenience.

So I get that when I set form processing to false that validators are not
called.  I need this on any ajax event I want to perform.  However, it is
very rare that my ajax events don't operate on some number of inputs set by
the user.  So I want the models to be loaded with the data from the form as
if form processing were happening.

Instead, I seem to be forced to use this getInput() method which is much
less refined than the model setting mechanisms and forces me to do more
coding.  Is there a way I can turn validators off, but still get my models
loaded with data as if form processing were on?  Or is getInput() really my
only alternative?


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



Re: how to create a new Session

2013-03-27 Thread Bernard
Hi,

Do you want to get rid of an existing session?

Bernard


On Wed, 27 Mar 2013 02:00:53 -0700 (PDT), you wrote:

hello.

how can tell the wicket application to create and use a new session for
subsequent requests?
the problem to solve is: 
the session keeps track of userdata. on the login page a new session should
be created and used. 
one solution would be to reset the userdata when i'm on the login page.
however, if in a browser (chrome) i try to log in from 2 different tabs the
session is shared, which obviously is not what i want.

can someone lighten me on the relationship between httpsession and wicket
session. 

thanks.


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



Re: Adding a large amount of MarkupContainers into the ListView or RepeatingView

2013-03-26 Thread Bernard
Hi,

AFAIK the solutions for large numbers of cells in GUI frameworks are:

1) Do not render cells that are not in the scrollable view
2) Create components only per once row or column and provide cell
renderers. See javax.swing.table.TableCellRenderer

With these approaches there is basically no limit to the amount of
data that can be displayed on the screen.

The current architecture seems to be here that the entire view is
rendered on the server irrespective of how much of it is displayed
in the client. This rules out 1)

Still the current architecture allows to exploit 2) which would solve
your performance problem if applicable to your use case. But that is
theory until someone creates TableCellRenderer for Wicket.

Kind Regards,

Bernard


On Tue, 26 Mar 2013 16:07:17 +0100, you wrote:

Hi,

Lets say I have about ~100.000 of MarkupContainer objects that I want to put 
into a ListView or RepeatingView.
This works fine functional wise... It's rather slow though.

It boils down to:
MarkupContainer:
1309 private Component put(final Component child)
1310   {
1311   int index = children_indexOf(child);
1312   if (index == -1)
1313   {
1314   children_add(child);
1315   return null;
1316   }
1317   else
1318   {
1319   return children_set(index, child);
1320   }
1321   }

and the call to children_indexOf(child) where it loops over all it's 
existing children and compares the id's until a match is found.
With an increasing amount of children this can get rather slow...

I though off overruling some functionality in the MarkupContainer class since 
I'm sure that for this list of items the children will be unique in their id 
and don't need that lookup, and overruling the put or children_indexOf 
function would give me enough power to skip that performance impacting part.
But most functions have private access, leaving me nothing to control the 
adding of child components to a MarkupContainer.

Does anyone else have experience with adding rather large quantities to 
something like the ListView and/or RepeatingView?
Or is there another way of rendering this large amount of containers?

Thanks in advance.

Kind regards,
Marco


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



Re: lost session and error modal

2013-03-18 Thread Bernard
Hi,

Perhaps you can afford to look at this from a simplified perspective.

I am thinking of two levels of sophistication:

1) the page simply refreshes after expiry. The user then has to repeat
the action with a new session. This is Wicket default behavoir.

2) In the case where the Wicket server state is not logically vital (
it is only technically required to prevent harm in complex cases) we
could expect that Wicket responds with the requested AJAX behavior
after re-creating the page and storing it in the new session.

For 2), there is a suggestion for improvement that you might be
interested in if you would benefit from Wicket responding to your ajax
call with the expected result even after session expiry:

Optionally execute Callback Behavior on Re-construction after Expiry
https://issues.apache.org/jira/browse/WICKET-5070


Regards,

Bernard





So , 


On Mon, 18 Mar 2013 09:24:49 -0700 (PDT), you wrote:

I added an ajax behavior to maintain the session alive. However in certain
cases the page can still expire and the session can still be lost, so I'm
showing an error modal using #getFailureScript(). But I'm facing a problem,
which is, for example, when the user refreshes the page the failure script
error modal will show up a couple of secs, but of course that's not cool.
If you have dealt with this or have suggestions, please let me know. Thanks.


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



Re: Wicket 6: AjaxFormComponentUpdatingBehavior on dropdown leads to page reload

2013-03-08 Thread Bernard
Hi,

I would try to debug the constructor of the page and/or override and
debug life cycle methods of the page and then work up the call stack
why they are executed.

As an example (not necessarily applicable in your case), one could
find this way that the page had expired and Wicket just reconstructed
it which could be surprising. See
ListenerInterfaceRequestHandler#respond().

Regards

Bernard

On Fri, 8 Mar 2013 23:04:13 +0100, you wrote:

I've just spent several hours trying to debug a rather strange
effect with a dropdown and a AjaxFormComponentUpdatingBehavior.

I have a component which is used in several places of the
system. It contains a dropdown to which a
AjaxFormComponentUpdatingBehavior is added. Whenever the user
selects a value, a label is displayed underneath.

This component has been in use in different parts of the system
for quite some time now. After having upgraded to Wicket 6.6, it
does no longer work - on one particular page. While on all other
pages it works just fine, on that particular page every time I
change something, the page reloads (just as if I had attached an
AjaxFormSubmitBehavior (which of course I had not, actually
there is not a single one used within the whole project).

When doing this reloading, my AjaxFormSubmitBehavior's handler
is never invoked.

I checked the requests the browser gets to see, and it seems
like there isn't any difference. Just in case, here's roughly
what I get on the pages where it works:

Path: 
http://localhost:8080/editor/editorial-tools/rundschreiben?7-1.IBehaviorListener.1-page~body-stage-stage_content-wrapped_content-content-editor-form-object_editor-groups-0-group-attributes-7-item-value-choice-ajax~holder-drop~downrubrik=Rundschreiben
Method: POST

The next request is an icon for the stuff displayed later.

On the bad page, the request does not look too much different
(it's just a different page):

Path: 
http://localhost:8080/foo/bar/nav/foobar-xxx?14-1.IBehaviorListener.1-page~body-stage-stage_content-wrapped_content-foo~content-choice-ajax~holder-drop~downaction=newvariant=foo-sub-page
Method: POST

Only after it, I get the original path, but a redirect:
:
Path: 
http://localhost:8080/foo/bar/nav/foobar-xxx?action=newvariant=foo-sub-page
Method: GET
Status Text: 302 (Moved Temporarily)

Now this indicates that something's going wrong in the Java code
rather than in Javascript. I tried to find the point where the
multiplexing is done and from where the Ajax behaviours are
invoked, but I did not find it.


Now I feel really clueless. Is there a wellknown Gotcha which
simply I don't know of? Maybe anybody had the same problem
before? Or, at least, where should I step into the Wicket code
in order to find out where it goes wrong?

Any help appreciated!

Cheers,

M'bert


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



Re: Processing form input at the start of a session?

2013-03-04 Thread Bernard
Hi,

On Mon, 04 Mar 2013 22:16:06 +0100, you wrote:

Thanks, I thought this answer will come. Let me ask differently:

What is it which prevents Wicket applying the input on the first request?

Please see the comments in ListenerInterfaceRequestHandler#respond()

Wicket ignores the input if the page is re-created after expiry.

What's the conceptual difference between creating a page, rendering a 
page, receiving a request and applying the incoming data,
versus creating a page and applying the incoming data? Regardless of 
whether there are stateful components or not.

Please see ListenerInterfaceRequestHandler#respond()

A stateful page might get fetched from the page store if it is not
expired. Alternatively, after expiry, it is created with its page
constructor.

A page is rendered after the incoming data and any other model data is
applied to the page instance.


Is this going to be targetted in the future?


Please see the jira links below.

I believe this has been discussed, so a link to such conversation is 
appreciated.

Please see for an example discussion (AJAX)
http://stackoverflow.com/questions/10582601/how-can-i-make-wickets-ajaxlink-stateless



There are jira issues to improve Wicket's response to various page
expiry scenarios:

Optionally execute Callback Behavior on Re-construction after Expiry
https://issues.apache.org/jira/browse/WICKET-5070

PageParameters missing from re-created Page
https://issues.apache.org/jira/browse/WICKET-5068

Mounted bookmarkable Page not recreated on Session Expiry
https://issues.apache.org/jira/browse/WICKET-4997

Page not bookmarkable with WebApplication#mountPackage
https://issues.apache.org/jira/browse/WICKET-5043

Recovery of bookmarkable Page after Session Expiry
https://issues.apache.org/jira/browse/WICKET-5001

Validation and Code Quality Issues with Default Constructor on
Re-creation after Page Expiry
https://issues.apache.org/jira/browse/WICKET-5069

I think that for best results, only minimal cooperation of the
application with the framework, e.g. some configuration in the page
object is required.

IMHO Wicket is in the position to eliminate most existing issues
related to PageExpiredException. So far, Wicket has adopted a black
and white approach to server state which is basically denial of
service. The justification has been that Wicket does not know whether
the component state is valid after reconstruction of the page
(re-construction being is a relatively recent addition since
https://issues.apache.org/jira/browse/WICKET-4014)

So not knowing whether the component state after re-constructing the
page is valid, Wicket currently refuses to invoke behavior of links
and form submits.

My idea for an approach is to keep some vital state e.g. record ID,
edit/view mode, in PageParameters client side and manage the loss of
the remaining state gracefully. In this context, it is interesting to
know that AJAX components make the page stateful but often such state
is not vital for invocation of behavior after expiry.

Wicket server side component state provides a great advantage compared
with having to encode all state in parameters and pass it to and from
the client.

However this advantage is over-compensated by the effort one has to
spend on testing and fixing the expiry behavior of every single page
of a site. The effort can be enormous.

Regards,

Bernard


Thanks!
Ondra



On 03/04/2013 03:27 PM, Martin Grigorov wrote:
 Hi,

 Make the page stateless, i.e. StatelessForm instead and avoid any other
 stateful components.


 On Mon, Mar 4, 2013 at 4:23 PM, Ondrej Zizka ozi...@redhat.com wrote:

 Hi all,

 let's have a bookmarkable page with a form.
 This form is submitted after session expiration.
 The result is that Wicket ignores the input and renders the page as it was
 just loaded by URL.

 How can I make Wicket process the POST body and do the whole cycle - fill
 the models, validate, etc.?

 Thanks,
 Ondra

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-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: Ignoring requests already processed by other servlet (REST)

2013-03-03 Thread Bernard
See
https://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-Ignoringpaths


On Sun, 03 Mar 2013 10:35:17 +0100, you wrote:

Hi all,

I have a wicket app at /*  and REST API at /rest .
When REST returns 404 (e.g. to reqest for non-existent ID), Wicket 
processes this.

What's the technique to tell wicket to let some requests pass?

I was thinking I could mount a page to /rest which would just copy the 
response somehow, like

   getRequestCycle().scheduleRequestHandlerAfterCurrent(new 
ErrorCodeRequestHandler(...));

But I believe there is a declarative way - in settings. Maybe even some 
filter?


Thanks,
Ondra

-
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: What is the best strategy for non versioned pages?

2013-02-25 Thread Bernard
Thanks. Sorry, I was assuming that pages are mounted. Without mounting
of course we cannot get stable URLs.

But with a form submit from a mounted page we are still getting

/mypage?-1.IFormSubmitListener-panel-form

That can be avoided with setStatelessHint(false);

which will then produce a URL

/mypage?0

I am just asking what the strategy is because the documentation does
not mention this rather common problem.

Regards,

Bernard

On Mon, 25 Feb 2013 17:01:46 -0500, you wrote:

Is moutning the page what you're looking for?

http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/

On Sun, Feb 24, 2013 at 8:02 AM, Bernard bht...@gmail.com wrote:

 Hi,

 We don't want back button support. setVersioned(false) with the
 default RenderStrategy looks like a good match for this.

 But sometimes pages become stateless which results in multiple URLs
 for the same page, e.g.

 /mypage
 and
 /mypage?-1.IFormSubmitListener-panel-form

 I know that Wicket pages are stateless if they don't contain state,
 and that Wicket makes a page stateful as soon as it needs to e.g. when
 state is added.

 Does Wicket provide a strategy for a page to always have a unique
 non-versioned URL - stateless or not?

 Regards,

 Bernard

 -
 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



What is the best strategy for non versioned pages?

2013-02-24 Thread Bernard
Hi,

We don't want back button support. setVersioned(false) with the
default RenderStrategy looks like a good match for this.

But sometimes pages become stateless which results in multiple URLs
for the same page, e.g.

/mypage
and
/mypage?-1.IFormSubmitListener-panel-form

I know that Wicket pages are stateless if they don't contain state,
and that Wicket makes a page stateful as soon as it needs to e.g. when
state is added.

Does Wicket provide a strategy for a page to always have a unique
non-versioned URL - stateless or not?

Regards,

Bernard

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



Re: Redirect to relative URL

2013-02-22 Thread Bernard
You will find solutions under these subjects:

redirect to an external non-Wicket page
redirect to an external URL

e.g.
https://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html

Regards,

Bernard

On Fri, 22 Feb 2013 17:06:09 +0100, you wrote:

Hello,

I have a server-relative URL like /target/index (starting with a slash) and
I'm looking for a way to redirect to http://mydomain.com*/target/index*.

In Wicket (unfortunately still 1.4) I tried the following:

RequestCycle.get().setRequestTarget(
new RedirectRequestTarget(/target/index)
);

Unfortunately Wicket thinks that the root slash refers to the Wicket
application rather than the server's root. Therefore the redirect ends up
here:

http://mydomain.com/*wicketapp*/target/index
*
*
I don't want Wicket to change my URL, so the Servlet should redirect to
http://mydomain.com/target/index.  Any ideas how to achieve that?


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



How to make a stateful mounted page bookmarkable?

2013-02-16 Thread Bernard
Hi all,

We mount all our pages so that the user can open them from bookmarks.

But as soon as a page aquires some state - it does not matter how
insignificant that state is - the page mount is discarded and we get
URLs such as

/wicket/page?0

which cause PageExpiredException.

We can always re-create a formerly stateful page without state because
that is very easy. It is far better than PageExpiredException. But we
can't do it if Wicket does not tell us which page to create even if
the page is mounted.

The question: How to get a bookmarkable URL for a stateful page
instead of /wicket/page?0

Regards,

Bernard




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



Re: How to make a stateful mounted page bookmarkable?

2013-02-16 Thread Bernard
Thanks. This works.

But it does not work with PackageMapper via
WebApplication#mountPackage() with a Page constructor with IModel
parameter.

Would this be an expected behavior?

Regards,

Bernard


On Sun, 17 Feb 2013 01:27:13 +0100, you wrote:

Have a look to MountedMapper
And also the Wicket in Action blog 
http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/


François Meillet
Formation Wicket - Développement Wicket





Le 17 févr. 2013 à 01:17, Bernard bht...@gmail.com a écrit :

 Hi all,
 
 We mount all our pages so that the user can open them from bookmarks.
 
 But as soon as a page aquires some state - it does not matter how
 insignificant that state is - the page mount is discarded and we get
 URLs such as
 
 /wicket/page?0
 
 which cause PageExpiredException.
 
 We can always re-create a formerly stateful page without state because
 that is very easy. It is far better than PageExpiredException. But we
 can't do it if Wicket does not tell us which page to create even if
 the page is mounted.
 
 The question: How to get a bookmarkable URL for a stateful page
 instead of /wicket/page?0
 
 Regards,
 
 Bernard
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Re: How to make a stateful mounted page bookmarkable?

2013-02-16 Thread Bernard
A convenient way to check how Wicket considers pages bookmarkable:
@Override
public boolean bookmarkable() {
boolean bookmarkable = super.isBookmarkable();
if(! bookmarkable){
throw new IllegalStateException(Page should be
bookmarkable);
}
return bookmarkable;
}


What I am seeing with mountPackage() looks like a bug. Please see

Page not bookmarkable with WebApplication#mountPackage
https://issues.apache.org/jira/browse/WICKET-5043


Re your browser navigation back and forward. I try to avoid this by
using setVersioned(false). This is not perfect though because if the
link is from a page outside your Wicket site, and the user does not
yet have a session then there will be 2 versions of the page one with
;jsessionid=... and one without it. Haven't figured out how to get rid
of it.

If this does not suit you and you get nulls then I would suggest you
pinpoint this with a quickstart.

Regards,

Bernard



On Sun, 17 Feb 2013 06:05:52 +0100, you wrote:

IIRC, bookmarkable pages need PageParameters, which also makes sense - 
it must be able to reconstruct the page just from URL. IModel is just 
stored in PageStore (or PageMap or how is it called) during a session.

What bothers me more is that various back and forth moves always give 
some nulls everywhere even when following this strategy... Didn't 
understood yet how to fix that.

my2c




On 02/17/2013 05:02 AM, Bernard wrote:
 Thanks. This works.

 But it does not work with PackageMapper via
 WebApplication#mountPackage() with a Page constructor with IModel
 parameter.

 Would this be an expected behavior?

 Regards,

 Bernard


 On Sun, 17 Feb 2013 01:27:13 +0100, you wrote:

 Have a look to MountedMapper
 And also the Wicket in Action blog 
 http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/


 François Meillet
 Formation Wicket - Développement Wicket





 Le 17 févr. 2013 à 01:17, Bernard bht...@gmail.com a écrit :

 Hi all,

 We mount all our pages so that the user can open them from bookmarks.

 But as soon as a page aquires some state - it does not matter how
 insignificant that state is - the page mount is discarded and we get
 URLs such as

 /wicket/page?0

 which cause PageExpiredException.

 We can always re-create a formerly stateful page without state because
 that is very easy. It is far better than PageExpiredException. But we
 can't do it if Wicket does not tell us which page to create even if
 the page is mounted.

 The question: How to get a bookmarkable URL for a stateful page
 instead of /wicket/page?0

 Regards,

 Bernard




 -
 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: call the same page using setResponsePage()

2013-02-08 Thread Bernard
Hi,

This is what I like about Wiket.

Even if I start with a stateless page! So I update a component, and
Wicket takes care of it via server side state - job done.

The page is then no longer stateless which is fair.

But:

When the user stays on this page and the session expires, then even
simple Links on the page like a sign-out link that do NOT require
state cause PageExpiredException. In this case the beautiful
advantages of using Wicket are gone. Working around these issues can
be very expensive because one has to examine every single page in the
special session expiry scenario. The workaround code becomes very
ugly.

Are there any plans to fix this or is this a feature?

Bernard



On Fri, 8 Feb 2013 09:09:34 +0100, you wrote:

Hi,

It is OK.
But you can also just update some field/model in the current page instance.


On Fri, Feb 8, 2013 at 7:00 AM, snair 
sreelatha.n...@transport.wa.gov.auwrote:

 Is it ok to call the same page using setResponsePage(), only calling a
 different constructor, since the page now needs to display additional
 information, which I will be passing into this new constructor?  For
 example, from PageA, can I say setResponsePage(new PageA(String a)) when a
 submit button button is clicked.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/call-the-same-page-using-setResponsePage-tp4656192.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Wicket job market

2013-02-05 Thread Bernard
I think it would be exhausting and possibly risky to rely on the
appeal of the Wicket site. This appeal can already be provided by
third party sites that use Wicket. A developer can then choose to show
management a selection of sites that are relevant in context.

What drives adoption rate is development efficiency, meeting deadlines
and ease of deployment.

Sure in small markets it is difficult to find developers for Wicket,
but it is not difficult to convince a manager with the prospect of an
earlier completion date even if a couple of developers have to be
trained (or may not have to be trained because they can focus on
HTML). It is not very difficult to convince managers of that.

So what is wrong? Why is it not working? I can't provide the full
answer. But to feel confident about meeting deadlines, I would like to
see improvements in the following areas:

1) Better support of statelessness in general
2) Some stateless AJAX if possible, even if only in basic cases with
constraints say for auto-complete text fields
3) Transition from stateless pages to statful pages
4) Recovery from loss of state. Is implemented but it does not work.

So while after so many years, we don't have that, I can only
confidently recommend to use Wicket if users are allowed to have 10
hour web sessions (I have been there), or the users are already used
to be kicked out after x minutes like in some online banking sites.

Most users today are used to remember-me cookies. So how do we explain
to them that a page expired while they can prove that they were
still signed in?

Bernard


On Tue, 5 Feb 2013 19:52:18 +1100, you wrote:

your loosing the focus pretended to be justify before: marketing,
not tech. and many people first see, later think :)

I think the problem is that most good software engineers see 'beauty' in
the elegant component based, object oriented architecture of Wicket - we
can all go oooh and h just thinking about how truly beautiful
Wicket has been 'engineered'.
 
We see beauty beyond the external presentation.

People out in the real world however, or developers who don't get the
oooh/aaah value from elegant design and architecture, are usually
'beauty is only skin deep' people - and given then don't care about
elegant engineering 'under the hood' their evaluation of the 'goodness'
of something is based totally on the appearance of the 'skin'.

I think we have to grasp the concept that there are two different types
of people and they're on opposite ends of the spectrum - the less
'engineering' someone is the more they crave 'funky look and feel'.

Because of the above, and maybe I'm going out on a limb here, IMHO
Wicket's much wider adoption is totally reliant on improving the Wicket
website's 'looks' to newcomers on their first visit.

Regards,
Chris

-
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



Can we use stateful pages for web sites?

2013-02-03 Thread Bernard
Hi all,

It takes us more time to work around Wicket bugs than the gain of
using Wicket's statefulness.

It is productive to use Wicket's AJAX and passing around IModel
between pages.

But when doing this we get bugs where page links are no longer
bookmarkable even if the pages are in fact bookmarkable.

Wicket gets confused with bookmarkable pages that are not stateful.
See issues:

PageProvider should create a new Page instance if PageParameters are
changed, even if a stored page exists.
https://issues.apache.org/jira/browse/WICKET-4441


Mounted bookmarkable Page not recreated on Session Expiry
https://issues.apache.org/jira/browse/WICKET-4997

Recovery of bookmarkable Page after Session Expiry
https://issues.apache.org/jira/browse/WICKET-5001


PageProvider#getPageInstance() calls wrong Page Constructor if
pageParameters is null
https://issues.apache.org/jira/browse/WICKET-5008

We can't have all pages stateless because any standard Wicket AJAX
needs server state.

I think there is a major issue with
org.apache.wicket.Component#urlFor() which handles pages as
bookmarkable only if they are stateless.

How are you dealing with this?

Regards

Bernard

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



How to reload form page on PageExpiredException

2013-01-24 Thread Bernard
Hi all,

How can I get Wicket 6 to respond with a refreshed stateful mounted
form page that expired on submit?

Just instead of showing an error page for the dreaded
PageExpiredException, show the form page again with the user's values
in it.

Many thanks,

Bernard


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



Re: Passing IModel in Constructor of bookmarkable Page?

2013-01-22 Thread Bernard
Hi again, Martin.

I have thought about it. This dev list discussion is interesting. I
use static parameter converters in pages which is type safe but not
automatic.

I thought about your suggestion to use IPageFactory.

Suppose a page meets the constructor criteria(default, PageParameters)
for bookmarkable, and it is mapped.

We load it with

setResponsePage(new SomePage(someModel));

Now we get http://localhost:8080/wicket/page?2

because we did not do 

setResponsePage(SomePage.class, somePageParameters);

but we want to see

http://localhost:8080/SomeMountedBookmarkablePage?2

otherwise links break after expiry.

How do we get that?


Kind Regards,

Bernard


On Tue, 22 Jan 2013 10:16:42 +0200, you wrote:

Hi,

By default Wicket recognizes a page as bookmarkable if it has default
constructor or a constructor with PageParameters as a single parameter.

Check this thread that explains how you can do something similar as your
requirement.
http://markmail.org/thread/faoipbe6m6jh57ps


On Tue, Jan 22, 2013 at 8:59 AM, Bernard bht...@gmail.com wrote:

 Hi Martin,

 I now have second thoughts before replacing a page constructor having
 an IModel parameter with the use of PageParameters which I need when
 letting Wicket create the page. It can be a nightmare.

 Passing IModel server side on page constructon has many advantages. We
 get security because the model cannot be manipulated by the client. We
 get type safety because we don't need to wrap the model's key(s) into
 PageParameters. And we get brevity and convenience which is a Wicket
 plus. Could it be that expecting ModalWindow to have the same instance
 as the parent page has to be seen in a different light?

 Please challenge me. I can't find at the moment any reference that
 passing LDM in Page constructors is a bad thing. I always thought that
 it is the Wicket way to exploit its statefulness.

 Back to the original subject, I would need a bookmarkable page that I
 can still pass an IModel to - either in a constructor or via a
 callback.

 So if the page is created from the bookmarkable URL and the page finds
 that the session is expired then it cannot get the model from the
 session but it can take corrective action. Otherwise we don't even
 have a page because of the non-bookmarkable dilemma. This very
 un-Wicket.

 In other words, if in a stateful web framework, we fail to identify
 the page class (not its identity - it is expired) - only because we
 were passing parameters to it server side - then this is a big issue
 that would be rewarding to address. The framwork is completely blind
 wrt to state even though the user can see the full state on the
 screen.

 Should I open a Jira issue to address this?

 Kind Regards,

 Bernard

 On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

 Hi,
 
 I think using Page#Page(IModel) constructor is not very useful. It appears
 to be anti-pattern lately.
 There were several tickets related to ModalWindow when a model is shared
 between the page that contains the modal and the page inside the modal.
 The
 two different pages are being serialized with different state of the model
 and after deserialization this model is no more the same instance anymore
 and the benefit of sharing a model is no more there.
 
 If you still want to go the way you want then check IPageFactory and its
 default impl - DefaultPageFactory.
 
 
 
 On Mon, Jan 21, 2013 at 3:45 AM, Bernard bht...@gmail.com wrote:
 
  Hi all
 
  I am searching for a robust pattern to work around
  PageExpiredException.
 
  My first idea was to have all pages bookmarkable and rely on
 
 
 org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
  to recover.
 
  But this breaks when passing IModel in page constructors because then
  pages are no longer bookmarkable.
 
  Of course avoiding the constructor and letting Wicket create the page
  with PageParameters would solve this problem but I want to avoid this.
 
  It would be very useful to pass an IModel to a bookmarkable Page. How
  can this be done?
 
  I am trying to avoid expiring logout links (the primary driver of all
  this). In case of page expiry I can deal with the exceptional call of
  the default constructor from
  IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
  a bookmarkable page.
 
  Many thanks,
 
  Bernard
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




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



Re: Wicket Session Expiration - Ajax interactions

2013-01-22 Thread Bernard
Hi,

We have created similar workarounds in 1.4 as you have. These are now
in Wicket 6. I am still trying to find opportunities for improvements
in 6. Please consider Mounted bookmarkable Page not recreated on
Session Expiry
https://issues.apache.org/jira/browse/WICKET-4997

Perhaps you want to create a Wicket Jira issue for the AJAX case - a
basic solution with extension points. Something that can be enabled
optionally on a per page basis.

IMHO the most we could expect is that the AJAX call is executed after
the page is recreated, even if the state of the re-created page is not
necessarily the same as before expiry. If this can be done than that
could be the subject of the Jira issue. But I guess it is tricky
because Wicket in comparison with Tapestry allows for more complex
page changes via AJAX i.e. change of the component hierarchy. So if
the AJAX call tries to address a component that a previous
modification has added in the page, leading to a component hierarchy
change, that component will not be addressible safely after
re-creation and the AJAX call could crash. The solution to this could
be that the state of the page is stored in the client - effectively
stateless wrt server state - which could become too complex to
handle for the framework, better done with a custom component.

Bernard

On Mon, 21 Jan 2013 08:56:23 -0800 (PST), you wrote:

I'm currently in the process of evaluating frameworks.  We are currently
using Wicket 1.4.

The ones I've looked at so far have been Vaadin, Tapestry 5.4, and Wicket
6.0.

Vaadin I ruled out for various reasons.

One of the problems that our users have complained quite a bit about is the
dreaded PageExpiration problem.

In Wicket 6.0 the issue is resolved somewhat by the framework recreating the
page and then issuing a redirect.

While understand why it does this

// If the page is stateful then we cannot assume that the listener interface
is
// invoked on its initial state (right after page initialization) and that
its
// component and/or behavior will be available. That's why the listener
interface
// should be ignored and the best we can do is to re-paint the newly
constructed
// page.

it's still not the solution we want.  The Ajax interaction should continue
on as normal.

Due to how Tapestry is architected, this is not an isssue.

In Wicket 1.4, I got around this somewhat by extending the
WebRequestCycleProcessor and recreating the request when a PageExpiration
was encountered.

It doesn't appear that I can carry this forward in Wicket 6.0.

I just want to make sure that I'm not missing anything.

Thanks


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



Re: Wicket Session Expiration - Ajax interactions

2013-01-22 Thread Bernard
For Wicket 6 I have a workaround shown in Mounted bookmarkable Page
not recreated on Session Expiry
https://issues.apache.org/jira/browse/WICKET-4997

The other workarounds I made were in 1.4. Wicket 6 solves these
non-AJAX issues out of the box. Please follow the recent thread
Passing IModel in Constructor of bookmarkable Page? where I am
hoping to get feedback on a special non-AJAX case where behavior after
session expiry could potentially be improved.

Bernard

On Tue, 22 Jan 2013 10:32:07 -0800 (PST), you wrote:

Hi Bernard,

Would you care to share what workarounds you have made to Wicket 1.6?

Shaun


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



Re: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Bernard
Hi Martin,

Thanks for the advice. So I will use PageParameters then and let
Wicket construct the page.

But:

I also have page constructors with PageReference parameter to link
back to. This would break bookmarkable as well. Would you have similar
concerns about PageReference?

Kind Regards,

Bernard


On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

Hi,

I think using Page#Page(IModel) constructor is not very useful. It appears
to be anti-pattern lately.
There were several tickets related to ModalWindow when a model is shared
between the page that contains the modal and the page inside the modal. The
two different pages are being serialized with different state of the model
and after deserialization this model is no more the same instance anymore
and the benefit of sharing a model is no more there.

If you still want to go the way you want then check IPageFactory and its
default impl - DefaultPageFactory.



On Mon, Jan 21, 2013 at 3:45 AM, Bernard bht...@gmail.com wrote:

 Hi all

 I am searching for a robust pattern to work around
 PageExpiredException.

 My first idea was to have all pages bookmarkable and rely on

 org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
 to recover.

 But this breaks when passing IModel in page constructors because then
 pages are no longer bookmarkable.

 Of course avoiding the constructor and letting Wicket create the page
 with PageParameters would solve this problem but I want to avoid this.

 It would be very useful to pass an IModel to a bookmarkable Page. How
 can this be done?

 I am trying to avoid expiring logout links (the primary driver of all
 this). In case of page expiry I can deal with the exceptional call of
 the default constructor from
 IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
 a bookmarkable page.

 Many thanks,

 Bernard



 -
 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: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Bernard
Hi Martin,

This is great.

Thanks for the quick response.

Bernard

On Mon, 21 Jan 2013 10:57:19 +0200, you wrote:

You can pass the oldPageId as a request parameter too. Then use it: new
PageReference(oldPageId.toInt()).getPage()


On Mon, Jan 21, 2013 at 10:39 AM, Bernard bht...@gmail.com wrote:

 Hi Martin,

 Thanks for the advice. So I will use PageParameters then and let
 Wicket construct the page.

 But:

 I also have page constructors with PageReference parameter to link
 back to. This would break bookmarkable as well. Would you have similar
 concerns about PageReference?

 Kind Regards,

 Bernard


 On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

 Hi,
 
 I think using Page#Page(IModel) constructor is not very useful. It appears
 to be anti-pattern lately.
 There were several tickets related to ModalWindow when a model is shared
 between the page that contains the modal and the page inside the modal.
 The
 two different pages are being serialized with different state of the model
 and after deserialization this model is no more the same instance anymore
 and the benefit of sharing a model is no more there.
 
 If you still want to go the way you want then check IPageFactory and its
 default impl - DefaultPageFactory.
 
 
 
 On Mon, Jan 21, 2013 at 3:45 AM, Bernard bht...@gmail.com wrote:
 
  Hi all
 
  I am searching for a robust pattern to work around
  PageExpiredException.
 
  My first idea was to have all pages bookmarkable and rely on
 
 
 org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
  to recover.
 
  But this breaks when passing IModel in page constructors because then
  pages are no longer bookmarkable.
 
  Of course avoiding the constructor and letting Wicket create the page
  with PageParameters would solve this problem but I want to avoid this.
 
  It would be very useful to pass an IModel to a bookmarkable Page. How
  can this be done?
 
  I am trying to avoid expiring logout links (the primary driver of all
  this). In case of page expiry I can deal with the exceptional call of
  the default constructor from
  IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
  a bookmarkable page.
 
  Many thanks,
 
  Bernard
 
 
 
  -
  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: Passing IModel in Constructor of bookmarkable Page?

2013-01-21 Thread Bernard
Hi Martin,

I now have second thoughts before replacing a page constructor having
an IModel parameter with the use of PageParameters which I need when
letting Wicket create the page. It can be a nightmare.

Passing IModel server side on page constructon has many advantages. We
get security because the model cannot be manipulated by the client. We
get type safety because we don't need to wrap the model's key(s) into
PageParameters. And we get brevity and convenience which is a Wicket
plus. Could it be that expecting ModalWindow to have the same instance
as the parent page has to be seen in a different light?

Please challenge me. I can't find at the moment any reference that
passing LDM in Page constructors is a bad thing. I always thought that
it is the Wicket way to exploit its statefulness.

Back to the original subject, I would need a bookmarkable page that I
can still pass an IModel to - either in a constructor or via a
callback.

So if the page is created from the bookmarkable URL and the page finds
that the session is expired then it cannot get the model from the
session but it can take corrective action. Otherwise we don't even
have a page because of the non-bookmarkable dilemma. This very
un-Wicket.

In other words, if in a stateful web framework, we fail to identify
the page class (not its identity - it is expired) - only because we
were passing parameters to it server side - then this is a big issue
that would be rewarding to address. The framwork is completely blind
wrt to state even though the user can see the full state on the
screen.

Should I open a Jira issue to address this?

Kind Regards,

Bernard

On Mon, 21 Jan 2013 10:05:57 +0200, you wrote:

Hi,

I think using Page#Page(IModel) constructor is not very useful. It appears
to be anti-pattern lately.
There were several tickets related to ModalWindow when a model is shared
between the page that contains the modal and the page inside the modal. The
two different pages are being serialized with different state of the model
and after deserialization this model is no more the same instance anymore
and the benefit of sharing a model is no more there.

If you still want to go the way you want then check IPageFactory and its
default impl - DefaultPageFactory.



On Mon, Jan 21, 2013 at 3:45 AM, Bernard bht...@gmail.com wrote:

 Hi all

 I am searching for a robust pattern to work around
 PageExpiredException.

 My first idea was to have all pages bookmarkable and rely on

 org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
 to recover.

 But this breaks when passing IModel in page constructors because then
 pages are no longer bookmarkable.

 Of course avoiding the constructor and letting Wicket create the page
 with PageParameters would solve this problem but I want to avoid this.

 It would be very useful to pass an IModel to a bookmarkable Page. How
 can this be done?

 I am trying to avoid expiring logout links (the primary driver of all
 this). In case of page expiry I can deal with the exceptional call of
 the default constructor from
 IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
 a bookmarkable page.

 Many thanks,

 Bernard



 -
 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



Passing IModel in Constructor of bookmarkable Page?

2013-01-20 Thread Bernard
Hi all

I am searching for a robust pattern to work around
PageExpiredException.

My first idea was to have all pages bookmarkable and rely on
org.apache.wicket.settings.IPageSettings#getRecreateMountedPagesAfterExpiry()
to recover.

But this breaks when passing IModel in page constructors because then
pages are no longer bookmarkable.

Of course avoiding the constructor and letting Wicket create the page
with PageParameters would solve this problem but I want to avoid this.

It would be very useful to pass an IModel to a bookmarkable Page. How
can this be done?

I am trying to avoid expiring logout links (the primary driver of all
this). In case of page expiry I can deal with the exceptional call of
the default constructor from
IPageSettings#getRecreateMountedPagesAfterExpiry() by responding with
a bookmarkable page.

Many thanks,

Bernard



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



Wicket 6.4.0 sources?

2012-12-18 Thread Bernard
Hi,

How can I get the sources? The 4MB apache-wicket-6.4.0.tar.gz is
basically empty.

It contains 142 KB of quickstart stuff - if I run mvn install then I
am not getting any wicket source files copied into my m2 repository.

I must be missing something.

Many thanks

Bernard

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



Re: Wicket 6.4.0 sources?

2012-12-18 Thread Bernard
Thanks very much Martin.

I am not using Eclipse at this stage. I read the README file. It has a
long list of contents which do not exist in the archive file.

Because the archive file has a size of 4M but contains only 142K files
I thought I might be missing something. Or this README file belongs to
an older version of the distribution.

What would be the maven command without Eclipse plugin to get the
sources? Or does Wicket depend on the Eclipse IDE?

It would be nice to have the missing bits mentioned in the README e.g.
you must have the Eclipse IDE to get the sources and JavaDoc so one
can get started.

Many thanks,

Bernard



README:

...
The archive you just downloaded and unpacked contains the source code
and the
jars of the core projects of Wicket. If you are just starting out, you
probably only need to include wicket-x.jar, where x stands for the
version. As
a rule, use just the jars you need.

You will find the source code here:

|-- apidocs
|   |-- org
|   `-- resources
|-- lib
|-- licenses
`-- src
|-- archetypes
|-- testing
|-- wicket
|-- wicket-auth-roles
|-- wicket-core
...


On Tue, 18 Dec 2012 23:03:45 +0100, you wrote:

On Tue, Dec 18, 2012 at 10:42 PM, Bernard bht...@gmail.com wrote:
 How can I get the sources? The 4MB apache-wicket-6.4.0.tar.gz is
 basically empty.

Those are the sources. All of it. You are actually asking for the
Maven source jars. Depending on your environment, Maven will
automatically download the sources from Maven Central (e.g. the
maven-eclipse-plugin does so, provided you set downloadSources=true in
the plugin configuration, m2e in eclipse will also download the
sources, if you set it in the settings).

 It contains 142 KB of quickstart stuff - if I run mvn install then I
 am not getting any wicket source files copied into my m2 repository.

 I must be missing something.

Just ran mvn package in a freshly untarred distribution and this is what I got:

./archetypes/quickstart/target/wicket-archetype-quickstart-6.4.0-sources.jar
./archetypes/quickstart/target/wicket-archetype-quickstart-6.4.0-test-sources.jar
./testing/wicket-common-tests/target/wicket-common-tests-6.4.0-sources.jar
./testing/wicket-common-tests/target/wicket-common-tests-6.4.0-test-sources.jar
./wicket-auth-roles/target/wicket-auth-roles-6.4.0-sources.jar
./wicket-auth-roles/target/wicket-auth-roles-6.4.0-test-sources.jar
./wicket-cdi/target/wicket-cdi-6.4.0-sources.jar
./wicket-cdi/target/wicket-cdi-6.4.0-test-sources.jar
./wicket-core/target/wicket-core-6.4.0-sources.jar
./wicket-core/target/wicket-core-6.4.0-test-sources.jar
./wicket-datetime/target/wicket-datetime-6.4.0-sources.jar
./wicket-datetime/target/wicket-datetime-6.4.0-test-sources.jar
./wicket-devutils/target/wicket-devutils-6.4.0-sources.jar
./wicket-devutils/target/wicket-devutils-6.4.0-test-sources.jar
./wicket-examples/target/wicket-examples-6.4.0-sources.jar
./wicket-examples/target/wicket-examples-6.4.0-test-sources.jar
./wicket-experimental/wicket-atmosphere/target/wicket-atmosphere-0.6-sources.jar
./wicket-experimental/wicket-atmosphere/target/wicket-atmosphere-0.6-test-sources.jar
./wicket-experimental/wicket-bean-validation/target/wicket-bean-validation-0.5-sources.jar
./wicket-experimental/wicket-bean-validation/target/wicket-bean-validation-0.5-test-sources.jar
./wicket-experimental/wicket-bootstrap/target/wicket-bootstrap-0.5-sources.jar
./wicket-experimental/wicket-bootstrap/target/wicket-bootstrap-0.5-test-sources.jar
./wicket-experimental/wicket-examples-parent/wicket-examples-jar/target/wicket-examples-jar-0.5-sources.jar
./wicket-experimental/wicket-examples-parent/wicket-examples-jar/target/wicket-examples-jar-0.5-test-sources.jar
./wicket-experimental/wicket-examples-parent/wicket-examples-war/target/wicket-examples-war-0.5/WEB-INF/lib/wicket-examples-jar-0.5-sources.jar
./wicket-experimental/wicket-examples-parent/wicket-examples-war/target/wicket-examples-war-0.5-sources.jar
./wicket-experimental/wicket-examples-parent/wicket-examples-war/target/wicket-examples-war-0.5-test-sources.jar
./wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/target/wicket-native-websocket-core-0.5-sources.jar
./wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/target/wicket-native-websocket-core-0.5-test-sources.jar
./wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty/target/wicket-native-websocket-jetty-0.5-sources.jar
./wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty/target/wicket-native-websocket-jetty-0.5-test-sources.jar
./wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/target/wicket-native-websocket-jetty9-0.5-sources.jar
./wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/target/wicket-native-websocket-jetty9-0.5-test-sources.jar
./wicket-experimental/wicket-native-websocket

apache-wicket-6.4.0.tar.gz broken

2012-12-18 Thread Bernard
I checked several mirrors.

It contains only a quickstart, no parent pom. README has contents
which seems to reflect what the file should contain.

I would use the zip file instead.

This is not an authorised message, just an observation from a user.

Kind Regards

Bernard

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



Re: apache-wicket-6.4.0.tar.gz broken

2012-12-18 Thread Bernard
Hi,

Apparently apache-wicket-6.4.0.tar.gz is broken in a version of WinZip
not in 7-Zip so this looks like a file compatibility bug.

Kind Regards,

Bernard


On Wed, 19 Dec 2012 13:56:34 +1300, you wrote:

I checked several mirrors.

It contains only a quickstart, no parent pom. README has contents
which seems to reflect what the file should contain.

I would use the zip file instead.

This is not an authorised message, just an observation from a user.

Kind Regards

Bernard

-
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: reloading of HTML and classes

2012-04-07 Thread Bernard
Hi,

The HTML part is covered if your IDE copies HTML files to the
deployment directory when you save them. Wicket will then pick up this
change and reload the corresponding pages. This works for existing
markup but not for new markup that was missing.

The Java classes part can only be handled with debugging, JRebel or a
complete re-deployment. There is no hot-deployment of individual
classes in GlassFish (I don't know whether any other server supports
this). However GlassFish has session preservation so the re-deploy
process is seamless. To further speed up the deployment, one can copy
most libraries (including Wicket) into the GlassFish domain's lib dir
instead of copying them on every deployment.

The Deploy on Save feature is only useful for mini applications - it
is too slow.

Bernard


On Fri, 06 Apr 2012 16:48:11 +0200, you wrote:


I've been fighting this for the past two days, but I'm not succeeding. I'm 
using Wicket 1.5.5 on GlassFish 3.1.2 and that runs without a problem. I have 
configured

filter-classorg.apache.wicket.protocol.http.ReloadingWicketFilter/filter-class

to reload the classes, but that is not working. The only way to reload the 
class file is by using JRebel.

Also Wicket reports that it runs in DEVELOPMENT mode, but it is not reloading 
the HTML files. In an attempting to resolve that I explicitely configured

 getResourceSettings().setDefaultCacheDuration(Duration.ONE_SECOND);

but that does not make a difference. The only way I can get it to work 
somewhat, is to add my own ResourceFinder directly on the src folder:

 getResourceSettings().setResourceFinder(new IResourceFinder()
 {
 @Override
 public IResourceStream find(Class? clazz, String pathname)
 {
 File f = new File(C:/Documents and Settings/User/My 
 Documents/s2m/sources/components/service/src/main/java/ + pathname);
 if (f.exists())
 {
 return new FileResourceStream( f );
 }
 return null;
 }
 });
 getResourceSettings().setUseDefaultOnMissingResource(true);

But still the source are not reloaded reliably. I figure if the cache expires, 
a new call to the resource finder should be done, correct?

Is there any debugging of these autoreload features, so I can see what Wicket 
is doing?

Tom





-
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: Performance optimization

2012-02-23 Thread Bernard
If there are thousands of objects in a page then there is the question
whether all of these objects actually represent state - state being
the only reason why Wicket should serialize the page.

In other words, is the page so complex that it requires 10MBytes to
serialize itself in a manner that it can be re-created accurately from
a stream. If yes then there is probably nothing you can do about it.

If not then perhaps Wicket could be improved in that area. I would not
be surprised if that was the case.

Consider Java Swing desktop components. Swing has optimizations such
as TableCellRenderer and TableCellEditor that are used as single
instances to render cells for all rows in a column or more. If that
makes sense in desktop applications with cheap memory and CPU then
this makes even more sense on the server side. However, Wicket does
NOT have such components and therefore really large lists are
hopeless. There are things like IItemReuseStrategy but I cannot see
how these would achieve the required efficiency.

On Thu, 23 Feb 2012 09:06:42 +0200, you wrote:

I think that would be something that should be implemented at wicket
core... anybody done this before?

Is there any way to tell wicket NOT to serialize a page? For example
give a timer if user does not invoke the page for 1 minutes it
will not be serializeed..?
[snip]

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



set focus on a field when opening a ModalWindow

2010-04-16 Thread Bernard

Hello,
Sorry to come back with this item, but I can't figure out how to set focus
on a form element when opening a ModalWindow (iframe version).

I tried to use target.focusComponent() within the calling page, but as
components are created inside the called page, I can't have the right
focusComponent() parameter.

I also tried the FocusBehavior() class found on the wiki, but it works only
for regular forms, not Ajax.

I finally tried some javascript stuff within my called html page (something
like frames[0].document.forms[0].elements[1].focus();), but this don't work
bacause the iframe is not ready when my javascript is called.

Does somebody knows how to set focus on my first form field in my modal
window ?

Best regards,
Bernard
-- 
View this message in context: 
http://n4.nabble.com/set-focus-on-a-field-when-opening-a-ModalWindow-tp1989918p1989918.html
Sent from the Wicket - User 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: unit test of AjaxLazyLoadPanel and ModalWindow

2009-12-15 Thread Bernard Lupin

 Hi,
As suggested by message subject, you had a problem for testing
AjaxLazyLoadPanel and ModalWindow. You provided a solution for the first
case (great!), but there is nothing in this thread about testing
ModelWindow.
Does your solution apply to ModalWindow too ? Or is there another method ?
NB : I'm using the iframe version of ModalWindows...
Regards
Bernard



Antony Stubbs wrote:
 
 And here's a nicer version to add to your library:
 
 
 /**
  * Triggers an {...@link AjaxLazyLoadPanel} to fetch it's contents.
  *
  * @param wc the {...@link WicketTester} to execute the behaviour (
 {...@link WicketTester#executeBehavior} ).
  * @param container contains the {...@link AjaxLazyLoadPanel} to trigger
  */
 private void executeAjaxLazyLoadPanel(final WicketTester wc, Panel
 container) {
 container.visitChildren( AjaxLazyLoadPanel.class, new
 IVisitorAjaxLazyLoadPanel() {
 
 @Override
 public Object component(AjaxLazyLoadPanel component) {
 ListIBehavior behaviors = component.getBehaviors();
 // get the AbstractAjaxBehaviour which is responsible for
 // getting the contents of the lazy panel
 AbstractAjaxBehavior b = (AbstractAjaxBehavior)
 behaviors.get( 0 );
 // tell wicket tester to execute it :)
 wc.executeBehavior( b );
 // continue with visitation rights, or not, i don't care
 return CONTINUE_TRAVERSAL;
 }
 } );
 }
 
 
 Antony Stubbs wrote:
 
 And boom! Thanks for the  inspiration Frank! 
 
 final WicketTester wc = constructBasicPanel();
 wc.debugComponentTrees();
 wc.dumpPage();
 // delicious is the constructed panel, which contains a
 AjaxLazyLoadPanel...
 // visit it's children, looking for the AjaxLazyLoadPanel
 delicious.visitChildren( AjaxLazyLoadPanel.class, new
 IVisitorAjaxLazyLoadPanel(){
 
 @Override
 public Object component(AjaxLazyLoadPanel component) {
 // get the AbstractAjaxBehaviour which is responsible for getting the
 contents of the lazy panel
 ListIBehavior behaviors = component.getBehaviors();
 final AbstractAjaxBehavior b;
 b = (AbstractAjaxBehavior) behaviors.get( 0 );
 // tell wicket tester to execute it :)
 wc.executeBehavior( b );
 // continue with visitation rights, or not, i don't care
 return null;
 }} );
 
 wc.debugComponentTrees();
 wc.dumpPage();
 // and volah, your lazy panel is now replaced with the contents :)
 wc.assertComponent(
 panel:lazy:content:repeaterContainer:bookmarks:1, Item.class );
 wc.assertInvisible( panel:lazy:content:noBookmarks );
 
 Let me know what you think or if you have any improvements!
 
 
 Antony Stubbs wrote:
 
 Thanks for the info Frank. Any tips on how to do so?
 
 
 Frank Bille wrote:
 
 On Thu, Apr 24, 2008 at 8:10 PM, qk wuhanqiangk...@gmail.com wrote:
  1. after the page was rendered using WicketTester.startPage(), the
 real
  content (the one that returned by getLazyLoadComponent()) was not
 loaded by
  default. I always got an empty panel. Is there a way that I can have
 the
  real content rendered?
 
 Wicket tester doesn't parse javascript, so it can't execute the ajax
 callback. You have to do that yourself.
 
 Frank
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/unit-test-of-AjaxLazyLoadPanel-and-ModalWindow-tp16851306p26793515.html
Sent from the Wicket - User 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: close a ModalWindow when session expired

2009-12-14 Thread Bernard Lupin

Thank you Johan, you're right... except that there is always a cross in the
upper right corner of the modal window, that allows to close the modal
window without sending any ajax request to the server.
So I just would like to have a close button that do the same as the cross
image, but I'm not able to find which javascript code is executed on this
cross image.
Regards
Bernard


Johan Compagner wrote:
 
 it could be that if you do that then in normal use
 the serverside doesnt know that the modal window isnt shown anymore.
 So i guess you should also try to let the server know.
 
 On Fri, Dec 4, 2009 at 10:16, Bernard Lupin  wrote:
 

 Hi again,
 After a lot of various tries, I finally found a solution that seems to
 work.
 On my ModalWindow close button, I don't need javacode anymore, I just
 have
 this small javascript command in the markup file:

 onclick=window.parent.Wicket.Window.close();

 Do you think that it's a good way to solve my problem ?
 Regards,
 Bernard


 Bernard Lupin wrote:
 
  Hi,
  On my ModalWindow's close button, I only want to ... close the modal
  window. It seems that myWindow.close(target) calls some Ajax request,
  which is failing when session is expired.
  But if I click on the cross button in the upper right of the modal
 window,
  everything works well : the modal window is closed and the original
 window
  becomes active again.
  I searched in source page and in wicket source code, but can't find
 what
  code is behind this cross button.
  Could you tell me which javascript code I could invoke on my close
 button,
  to close the window without ajax request ?
  Thanks a lot
  Bernard
 

-- 
View this message in context: 
http://old.nabble.com/close-a-ModalWindow-when-session-expired-tp26622679p26779142.html
Sent from the Wicket - User 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: ModalWindow on Firefox plus IE tab

2009-12-10 Thread Bernard Lupin

Hi,

On line 1129 in modal.js, I replaced 
iframe src='\/\/:' frameborder=...
with 
iframe src='about:blank' frameborder=...
and this solved the problem.
I don't know which browser do not understand about:blank, but both my IE
and my firefox does...



Bernard Lupin wrote:
 
 Hi,
 My web site as to run on Firefox and Internet Explorer, so I use IE tab
 (https://addons.mozilla.org/fr/firefox/addon/1419) to test it, and for the
 first time I see a difference between IE tab and normal IE.
 
 I introduced one ModalWindow (IFrame version) in my page : it works well
 on IE and on firefox, but on IE tab I have an error The page cannot be
 displayed, with a bad URL : http://:/; when creating this modal window.
 
 OK, the problem is perhaps within IE tab, but perhaps it can be easily
 corrected with one more hack in modal.js file, around the iframe
 creation. If some javascript expert can help me...
 
 Many thanks
 Bernard
 
 
 
 

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

-- 
View this message in context: 
http://old.nabble.com/ModalWindow-on-Firefox-plus-IE-tab-tp26613842p26736728.html
Sent from the Wicket - User 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: close a ModalWindow when session expired

2009-12-04 Thread Bernard Lupin

Hi again,
After a lot of various tries, I finally found a solution that seems to work.
On my ModalWindow close button, I don't need javacode anymore, I just have
this small javascript command in the markup file:

onclick=window.parent.Wicket.Window.close();

Do you think that it's a good way to solve my problem ?
Regards,
Bernard


Bernard Lupin wrote:
 
 Hi,
 On my ModalWindow's close button, I only want to ... close the modal
 window. It seems that myWindow.close(target) calls some Ajax request,
 which is failing when session is expired.
 But if I click on the cross button in the upper right of the modal window,
 everything works well : the modal window is closed and the original window
 becomes active again.
 I searched in source page and in wicket source code, but can't find what
 code is behind this cross button.
 Could you tell me which javascript code I could invoke on my close button,
 to close the window without ajax request ?
 Thanks a lot
 Bernard
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/close-a-ModalWindow-when-session-expired-tp26622679p26635817.html
Sent from the Wicket - User 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



close a ModalWindow when session expired

2009-12-03 Thread Bernard LUPIN
Hi,
On my ModalWindow's close button, I only want to ... close the modal window. It 
seems that myWindow.close(target) calls some Ajax request, which is failing 
when session is expired.
But if I click on the cross button in the upper right of the modal window, 
everything works well : the modal window is closed and the original window 
becomes active again.
I searched in source page and in wicket source code, but can't find what code 
is behind this cross button.
Could you tell me which javascript code I could invoke on my close button, to 
close the window without ajax request ?
Thanks a lot
Bernard





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



Re: Session timeout - AJAX-enabled controls

2009-12-02 Thread Bernard Lupin

Thank you Igor.

Does somebody have a short example of java code to check for wicket-Ajax
header ?
Or an example of what such a header looks like ?
In the debug window, I can see wicket xml responses, bot no query...

Bernard


in your servlet filter you will have to check for Wicket-Ajax header
and if it is present return a properly formatted ajax-response that
contains javascript to redirect to your login page.

-igor

On Tue, Dec 1, 2009 at 1:01 PM, Bernard Lupin beal6...@yahoo.fr wrote:

 And I'm using wicket version 1.4.3...


 Bernard Lupin wrote:

 Hello,

 I also have a similar problem : when the session is over, debug shows me
 that all my Ajax links receive an html response with my login page,
 instead of an xml response, because I have a servlet filter for that.
 So wicket says in the wicket ajax debug window ERROR:
 Wicket.Ajax.Call.failure: Error while parsing response: Could not find
 root ajax-response element, and for users nothing happens when
 clicking
 on AjaxLink's.

 Is it a way to solve this please ?
 Regards,
 Bernard



-- 
View this message in context: 
http://old.nabble.com/Session-timeout---AJAX-enabled-controls-tp26422932p26611019.html
Sent from the Wicket - User 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



ModalWindow on Firefox plus IE tab

2009-12-02 Thread Bernard LUPIN
Hi,
My web site as to run on Firefox and Internet Explorer, so I use IE tab 
(https://addons.mozilla.org/fr/firefox/addon/1419) to test it, and for the 
first time I see a difference between IE tab and normal IE.

I introduced one ModalWindow (IFrame version) in my page : it works well on IE 
and on firefox, but on IE tab I have an error The page cannot be displayed, 
with a bad URL : http://:/; when creating this modal window.

OK, the problem is perhaps within IE tab, but perhaps it can be easily 
corrected with one more hack in modal.js file, around the iframe creation. If 
some javascript expert can help me...

Many thanks
Bernard




   

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



Re: Session timeout - AJAX-enabled controls

2009-12-01 Thread Bernard LUPIN
Hello,

I also have a similar problem : when the session is over, debug shows me that 
all my Ajax links receive an html response with my login page, instead of an 
xml response, because I have a servlet filter for that.
So wicket says in the wicket ajax debug window ERROR: 
Wicket.Ajax.Call.failure: Error while parsing response: Could not find root 
ajax-response element, and for users nothing happens when clicking on 
AjaxLink's.

Is it a way to solve this please ?
Regards,
Bernard


--- En date de : Ven 20.11.09, Carlo Camerino carlo.camer...@gmail.com a 
écrit :

 De: Carlo Camerino carlo.camer...@gmail.com
 Objet: Re: Session timeout - AJAX-enabled controls
 À: users@wicket.apache.org
 Date: Vendredi 20 Novembre 2009, 3h44
 yes we also have this prob lem
 For example i use a wicket in
 dicating ajax button in our logi n page. If thne user doesn
 t click a
 link that moves a page he will not be able to k now that
 the session
 has i ndeed expired. The screen o ly shows the rotating
 image  but
 nothing happens.  but if i use a normal submit li nk,
 im immeddiately
 redirected..
 Some clients didnt mind it bbut some clients do
 
 thanks
 
 On 11/20/09, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  afair any ajax interaction on an expired page causes
 the same reaction
  as a non-ajax interaction - going to the page expired
 page. open a bug
  with a quickstart if that is not the case.
 
  -igor
 
  2009/11/19 David Matoušek david.matou...@monetplus.cz:
  Hi,
  I have a problem with ajax behavior, that i use to
 fill various dropdowns
  by
  data from database.
  When session expires(user was inactive), non-ajax
 controls correctly
  redirect me to some kind of Error page. Thats
 correct.
  Components that have defined ajax behavior to
 update another components
  don't redirect, and doesn't update another
 components either.
  Is that Wicket feature, or a bug? Can components
 with ajax behaviors be
  forced to redirect to error page on session expire
 like non-ajax ones do?
  Any suggestions?
 
  Thanks for reply
 
  David Matousek
 
 
 
 
  --
  Tato zprava byla prohledana na vyskyt viru
  a nebezpecneho obsahu antivirovym systemem
  MailScanner a zda se byt cista.
 
 
 
 -
  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: Session timeout - AJAX-enabled controls

2009-12-01 Thread Bernard Lupin

And I'm using wicket version 1.4.3...


Bernard Lupin wrote:
 
 Hello,
 
 I also have a similar problem : when the session is over, debug shows me
 that all my Ajax links receive an html response with my login page,
 instead of an xml response, because I have a servlet filter for that.
 So wicket says in the wicket ajax debug window ERROR:
 Wicket.Ajax.Call.failure: Error while parsing response: Could not find
 root ajax-response element, and for users nothing happens when clicking
 on AjaxLink's.
 
 Is it a way to solve this please ?
 Regards,
 Bernard
 
 
 --- En date de : Ven 20.11.09, Carlo Camerino carlo.camer...@gmail.com a
 écrit :
 
 De: Carlo Camerino carlo.camer...@gmail.com
 Objet: Re: Session timeout - AJAX-enabled controls
 À: users@wicket.apache.org
 Date: Vendredi 20 Novembre 2009, 3h44
 yes we also have this prob lem
 For example i use a wicket in
 dicating ajax button in our logi n page. If thne user doesn
 t click a
 link that moves a page he will not be able to k now that
 the session
 has i ndeed expired. The screen o ly shows the rotating
 image  but
 nothing happens.  but if i use a normal submit li nk,
 im immeddiately
 redirected..
 Some clients didnt mind it bbut some clients do
 
 thanks
 
 On 11/20/09, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  afair any ajax interaction on an expired page causes
 the same reaction
  as a non-ajax interaction - going to the page expired
 page. open a bug
  with a quickstart if that is not the case.
 
  -igor
 
  2009/11/19 David Matoušek david.matou...@monetplus.cz:
  Hi,
  I have a problem with ajax behavior, that i use to
 fill various dropdowns
  by
  data from database.
  When session expires(user was inactive), non-ajax
 controls correctly
  redirect me to some kind of Error page. Thats
 correct.
  Components that have defined ajax behavior to
 update another components
  don't redirect, and doesn't update another
 components either.
  Is that Wicket feature, or a bug? Can components
 with ajax behaviors be
  forced to redirect to error page on session expire
 like non-ajax ones do?
  Any suggestions?
 
  Thanks for reply
 
  David Matousek
 
 
 
 
  --
  Tato zprava byla prohledana na vyskyt viru
  a nebezpecneho obsahu antivirovym systemem
  MailScanner a zda se byt cista.
 
 
 
 -
  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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Session-timeout---AJAX-enabled-controls-tp26422932p26598984.html
Sent from the Wicket - User 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: method assertWarningMessages

2009-11-23 Thread Bernard Lupin

Hi again,
This question seems to be simple, no ?
Do I have to open a JIRA ?
Bernard


Bernard Lupin wrote:
 
 Hi all,
 Components have 3 methods to put information in a feedback panel : info(),
 warn() and error().
 
 But in the WicketTester class, there are only 2 asserts available :
 assertInfoMessages() and assertErrorMessages().
 
 How can I verify my warning messages ? I can't find an assertWarnMessages.
 Even googling 'wicket +assertWarnMessages' returns nothing.
 
 Am I missing something ?
 
 Many thanks,
 Bernard
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/method-assertWarningMessages-tp26411632p26481845.html
Sent from the Wicket - User 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: best approach for a criteria and result page

2009-11-18 Thread Bernard LUPIN
Thank you very much Igor for your answer. 
You're right, this is working even without any code in the onSubmit() method 
(in fact I just added one line to manage the visibility of my result 
WebMarkupContainer).
Bernard

-Message d'origine-
De : Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Envoyé : lundi 9 novembre 2009 17:27
À : users@wicket.apache.org
Objet : Re: best approach for a criteria and result page

On Mon, Nov 9, 2009 at 6:21 AM,  bernard.lu...@orange-ftgroup.com wrote:
 Hi all,

 I browsed a lot of wicket example and searched through many articles, 
 but never found this classical web application example : I would have 
 on the same page a form with some criteria, a search button and a 
 result list : I enter some data, hit search and get the results under 
 my criteria, just like google does.

 No problem for me to define all these parts using wicket components, 
 but I don't know how to manage the workflow, and  especially what code 
 should I put in my form's onSubmit method.

you dont need to put any code in your onsubmit...

class mysearchpage extends webpage {
  private searchcriteria criteria=new searchcriteria();

  public mysearchpage() {
     add(new searchcriteriaform(form, new propertymodel(this, 
searchcriteria)));
     ^ form object connected to the criteria field of this page via a property 
model

     add(new listview(results, new propertymodel(this,
searchresults)) {...});
     ^ listview that will display results retrieved from the
getSearchresults() method on this page
   }

   public list getSearchresults() {
       // get whatever results based on the criteria field
   }
}

so in short, form pushes your criteria into the criteria field, listview uses 
the criteria field to build the resultset. yes, its that simple :)

-igor






 Here is a sample code :

 public class TestPage extends WebPage {
        public TestPage() {
                super();
                createComponents();
        }

       �...@suppresswarnings(serial)
        protected void createComponents() {
                final WebMarkupContainer datacontainer = new 
 WebMarkupContainer(data);

                FormSearchParameterBean searchForm = new 
 FormSearchParameterBean(searchForm,
                                new
 CompoundPropertyModelSearchParameterBean(new SearchParameterBean())) 
 {
                       �...@override
                        protected void onSubmit() {
                                SearchParameterBean searchParam =
 (SearchParameterBean) getModelObject();
                                // get contract list in a 
 LoadableDetachableModel, but can't give it to ListView
                                IModelListResultParameter 
 contractListModel = new 
 LoadableDetachableModelListResultParameter()
 {
                                       �...@override
                                        protected ListResultParameter
 load() {
                                                ListResultParameter 
 contractList = manageContract.getContracts();
                                                return contractList;
                                        }
                                };
                                // This is working, but I must have an 
 inner class and final WebMarkupContainer datacontainer
                                // What to do if I want to create a 
 class ConsultForm extends FormSearchParameterBean
                                datacontainer.setVisible(true);

                        }
                };
                searchForm.add(new TextFieldString(Id));
                add(searchForm);

                datacontainer.setVersioned(false);
                datacontainer.setVisible(false);
                add(datacontainer);

                // here I do not have access to my contractListModel
                PageableListViewResultParameter listView = new 
 PageableListViewResultParameter(contracts, contractListModel, 10){
                       �...@override
                        public void
 populateItem(ListItemResultParameter listItem) {
                                ResultParameter contract = 
 listItem.getModelObject();
                                Label name = new Label(Name, 
 contract.getName());
                                listItem.add(name);
                        }
                };
                datacontainer.add(listView);
        }


 The questions I have are :
 - How to pass model between the onSubmit() message which defines it, 
 and the FormView which shows itin the page ?
 - Do I have to define a setResponsePage() in my onSubmit() ? If I do 
 so, I must go to another page, and then I lost the user's choosen 
 criteria
 - What is the best practice to build such an application ?
 - Is there somewhere an example with criteria and results on the same 
 page ?

 Thank you very much,
 Bernard






-
To unsubscribe, e-mail: users

method assertWarningMessages

2009-11-18 Thread Bernard LUPIN
Hi all,
Components have 3 methods to put information in a feedback panel : info(), 
warn() and error().

But in the WicketTester class, there are only 2 asserts available : 
assertInfoMessages() and assertErrorMessages().

How can I verify my warning messages ? I can't find an assertWarnMessages. Even 
googling 'wicket +assertWarnMessages' returns nothing.

Am I missing something ?

Many thanks,
Bernard





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



Wicket Development with NetBeans

2009-07-24 Thread Bernard
Hi,

NetBeans is a great IDE for Wicket Development.

It will be even better with the implementation of the deploy on save
feature for HTML files in action.

Please vote for the following bug and add youself to the cc list:

http://www.netbeans.org/issues/show_bug.cgi?id=145666

The Wicket plugin can be found here
http://plugins.netbeans.org/PluginPortal/faces/PluginListPage.jsp?search=wicket


Bernard

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



Re: Spring and Wicket - is it worth it?

2009-07-24 Thread Bernard
I am using EJB 3.0. So easy to work with. Toplink, GlassFish do
everything. The ORM creates my tables from POJOs, transactions are a
no-brainer. Comes with NetBeans out of the box. Why don't more users
write about it?

Most of the time is spent on coding web pages (messy due to browser
bugs and high user demands). Wicket is fun and easy. Business logic
and all the persistence stuff are not issues that occupy my mind.

What do you think about that?

Bernard

On Wed, 22 Jul 2009 18:40:19 -0700, you wrote:

Due to the fact that nearly every substantial sample Wicket app is
Spring-based, I imagine that there's something awesome about using Spring.
In fact, Wicket is what has finally gotten me to start learning Spring.

I think I understand the basics of dependency injection -- configure your
objects in xml files and then inject them into your classes -- but I'm still
not clear on the advantage of it. I've read quite a ways into Spring in
Action, and the author seems to assume that the reader will automatically
see why xml-based dependency injection is great thing. I must just be
missing something here. What I love about Wicket is being free from xml
files. Can anyone give me a concise explanation of how the advantages of
Spring are worth introducing a new layer into my applications?

Dane


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



Wicket NetBeans Users please vote for these Issues

2009-07-08 Thread Bernard
Hi,

Please vote for:

Source root's non-class files not included on Auto deploy
http://www.netbeans.org/issues/show_bug.cgi?id=145666


Unnecessary redeploys by deploy on save
http://www.netbeans.org/issues/showvotes.cgi?issue_id=15


The Wicket plugin can be found here
http://plugins.netbeans.org/PluginPortal/faces/PluginListPage.jsp?search=wicket


Thanks

Bernard


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



Re: AjaxFallbackLink Text

2009-06-28 Thread Bernard
Hi,

I cannot find the purpose of the IModel constructor argument in
AjaxFallbackLink(java.lang.String id, IModelT model) as I was also
trying to modify the anchor text via the IModel with AJAX.

What is it?

Many thanks.

Bernard


On Thu, 25 Jun 2009 12:11:37 -0500, you wrote:

Two ways come to mind:
- override onComponentTagBody and write it directly to the response
- use a wicket:fragment - add the fragment to the column, the link to
the fragment, and define the text in the html (or use wicket:message,
etc)


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



URL Resolution Magic for Applets as for Images?

2009-06-26 Thread Bernard
Hi,

I am pleased with the URL resolution in wicket pages. But it does not
work for me with applets.

In my case, wicket translates img src=images/image.gif into img
src=../images/image.gif (note the ../).

This works fine.

However, translation does not work for applets. In my case, with

applet code=MyClass.class
archive=jars/MyJar.jar
width=100
height=100
/applet

, the attribute archive=jars/MyJar.jar should have its value
translated, too. I guess Wicket does not look into applet tags.

I would be quite happy to write code for each tag to tell Wicket to
translate the attribute and property that it does not cover
automatically. Is there a Wicket way to do this?

Many thanks.

Bernard


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



Re: URL Resolution Magic for Applets as for Images?

2009-06-26 Thread Bernard
Igor, thanks very much for the hint. I could fix this as follows:

WebMarkupContainer appletContainer = new
WebMarkupContainer(myAppletWicketId);
appletContainer.add(new AbstractBehavior() {
private static final long serialVersionUID = 1L;
@Override
public void onComponentTag(Component component,
ComponentTag tag)
{
// Modify the relevant attribute
String attrName = archive;
IValueMap valueMap = tag.getAttributes();
String attrValue = valueMap.getString(attrName);
if(attrValue != null){
IRequestCodingStrategy coder = RequestCycle.get()
.getProcessor()
.getRequestCodingStrategy();
valueMap.put(attrName,
coder.rewriteStaticRelativeUrl(attrValue));
}
}
});
add(appletContainer);

Bernard


On Fri, 26 Jun 2009 08:06:16 -0700, you wrote:

see org.apache.wicket.markup.parser.filter.RelativePathPrefixHandler

-igor

On Thu, Jun 25, 2009 at 9:28 PM, bern...@actrix.co.nz wrote:
 Hi,

 I am pleased with the URL resolution in wicket pages. But it does not
 work for me with applets.

 In my case, wicket translates img src=images/image.gif into img
 src=../images/image.gif (note the ../).

 This works fine.

 However, translation does not work for applets. In my case, with

 applet code=MyClass.class
    archive=jars/MyJar.jar
    width=100
    height=100
 /applet

 , the attribute archive=jars/MyJar.jar should have its value
 translated, too. I guess Wicket does not look into applet tags.

 I would be quite happy to write code for each tag to tell Wicket to
 translate the attribute and property that it does not cover
 automatically. Is there a Wicket way to do this?

 Many thanks.

 Bernard


 -
 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: [VOTE] Release Wicket 1.4-rc5

2009-06-09 Thread Bernard
Great, meany thanks.

But ...

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

NullPointerException NPE in DiskPageStore after Session Timeout

This looks both fundamental and catastrophic to me. Other issues might
be hiding behind this, so I am surprised about new releases without a
fix for this.

Regards

Bernard

On Tue, 9 Jun 2009 17:53:42 +0200, you wrote:

[XXX] Yes release 1.4-rc5

On Tue, Jun 9, 2009 at 17:08, Jeremy Thomerson 
jer...@wickettraining.comwrote:

 I've created a release for Wicket 1.4-rc5.  Until it is officially
 released, you can download from the following locations:
[snip]


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



Re: Wicket-Guice: Inject into Session

2009-04-29 Thread Bernard
This sounds good, Igor.

But I have a question.

If I only use EJB 3.0/JPA with http://code.google.com/p/fdiotalevi/
(no Spring, no Guice, no Salve), then how would I let a session object
hold on to references to services and yet remain lightweight?

Is there any information about best Wicket practices, patterns for
session objects and pages that need EJB references?

What would be in your opinion the most robust approach to this
starting with the technologies that I am already using?

Would it be better to use look-ups like
InitialContext#lookup(java:comp/env/.);instead of @EJB
injection?

I thought Wicket and EJB 3.0 makes a fairly robust and compact and
easy to learn set of technologies, but I understand your concerns, and
I have been looking for an answer in this area for a while.

I use @EJB session bean injection in pages but I wonder what happens
to the references as these are pooled resources that have a price.

Many thanks,
Bernard

On Tue, 28 Apr 2009 23:42:02 -0700, you wrote:

there is absolutely nothing wrong with having authenticate() on
session. this kind of thinking is exactly what is wrong with the
current state of java technology.

session is an object in wicket, why should it fall prey to the anemic
data model antipattern? why should it contain data only and no
behavior?

what looks better?

session.setuserid(long id);
session.getuserid();

or

session.authenticate(credentials cred);
session.getuserid();

the former has absolutely no encapsulation or protection of data,
anyone can set whatever id they want via a simple call to setuserid().
the latter properly encapsulates the user id and protects against code
abuse.

there are a number of technologies that allow you to break out of the
anemic data model mold by allowing, in this case the session, objects
to hold on to references to services and yet remain lightweight.

wicket provides the lightweight serializable proxies which can be used
inside any object.

class mysession extends websession {
   @SpringBean/@Inject
   private SessionFactory sf;
   private long id; == id is private with no direct setter
   public mysession(webrequest req) {
 super(req);
 injectionholder.getinjector().inject(this); == injects sf var
   }
   public void authenticate(credentials creds) throws AuthException {
 user u=sf.getnamedquery(auth)..
 id=u.getid();
   }

salve.googlecode.com removes the reference field altogether and
rewrites field access with a lookup.

class mysession extends websession {
   @Dependency
   private SessionFactory sf; == field will be removed via bytecode
instrumentation leaving the session object lightweight and
serializable
   private long id; == id is private with no direct setter
   public mysession(webrequest req) {
 super(req);
   }
   public void authenticate(credentials creds) throws AuthException {
 user u=sf.getnamedquery(auth) == this access to the removed sf
field will be rewritten as a lookup from configured ioc container
...
 id=u.getid();
   }

-igor

On Tue, Apr 28, 2009 at 9:49 PM, Marc Ende mli...@e-beyond.de wrote:
 Hmm... I'm not sure why it's done this way in the
 AuthenticatedWebSession but
 nevertheless it's the only task of a session object to keep informations
 between
 two requests. From this point of view a authenticate(String,String)
 doesnt' really
 make sense in the Class. May be there is someone here who can explain this
 point. I wouldn't say that this is wrong, but unusual... :)

 May be you can get the database connection from inside the method for
 authentication purposes,
 Then you haven't got any private or public members which should be
 serialized and contains a database connection.

 m.


 Jan Torben Heuer schrieb:
 Marc Ende wrote:


 webapps do. In this case you've got to serialize the connection. I don't
 think that's easy/possible to seralize a database connection.
 I would go another approach which uses the session only as a
 information-container and get those needed information from the
 database in the page-lifecycle. That keeps the session-object small
 (which is also an aspect).


 Hmm, following your argumentation, would you say that the
 AuthenticatedWebSession is implemented wrong because it contains a
 #authenticate method (which clearly needs a reference to some kind of
 database)?

 Or would marking the field as transient be fine?


 Cheers,

 Jan



 -
 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: sessionsize of requestlogger

2009-04-18 Thread Bernard
Igor,

Thanks for referring to Page#getPageReference.

Regarding the reload, I created my own error loading a page.

On Fri, Apr 17, 2009 at 5:49 PM, Bernard b...@actrix.gen.nz wrote:
 I prefer not to instantiate a page with a non-default constructor
 because it breaks if the user reloads it. How do we pass parameters
 between pages except via query strings which I try to avoid for
 various reasons?

can you please explain this a bit more? it is perfectly normal to do
setresponsepage(new edituserpage(usermodel));

wicket will redirect to a GET url which will always properly load that
instance of the page, not create a new one every time.

you can pass page references around using Page#getPageReference,
formerly Page#getPageId, and constructing a url to it using
requestcycle.urlfor() method.

-igor

[snip]


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



Re: sessionsize of requestlogger

2009-04-17 Thread Bernard
It is tempting to use references of previous pages. But I understand
that passing references between pages and page serialization don't
mix nicely
http://mail-archives.apache.org/mod_mbox/wicket-dev/200903.mbox/%3c2e1ce7cd0903030143h4a525b8cu46915c799061a...@mail.gmail.com%3e

What would be the best Wicket way of letting the current page directly
modify the model of the previous page and then let the current page
show the previous page with the new model?

I prefer not to instantiate a page with a non-default constructor
because it breaks if the user reloads it. How do we pass parameters
between pages except via query strings which I try to avoid for
various reasons?

Or as Daniele asked: Is there a way to recover the last Page in a non
restful way?

Is there any jira issue that tracks this subject?

Bernard

On Wed, 15 Apr 2009 09:09:12 -0700, you wrote:

On Wed, Apr 15, 2009 at 2:22 AM, Daniele Dellafiore ilde...@gmail.com wrote:
 On Mon, Jan 12, 2009 at 5:43 PM, carloc carlo_ca...@yahoo.com wrote:

 What Page Does Wicket Store in its HttpSession?

the last page accessed from every pagemap is stored in httpsession.

 Is it bad to keep a reference to the previous pages in instance variables of
 new pages?

when using diskpagestore there are certain usecases that break. if you
keep a page purely for navigation purposes it is fine. but if you
manipulate instance of a page from inside a page that holds a
reference to it it might lead to unintended sideeffects like your
changes to that instance being lost. this has to do with how
diskpagestore keeps each page separate and how it rewrites references
during serialization.

-igor


 I am really interested in an answer about this two questions. I am
 using 1.3 so I cannot use Page Reference mechanism.

 Finally, I cannot find a way to recover the last Page in a non restful
 way and as I stated in another mail, history.back does not work in all
 conditions (i.e. submit that reload the page instead of calling a
 setResponse)

 --
 Daniele Dellafiore
 http://blog.ildella.net/

 -
 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: Migration to 1.4 - generic headache

2008-10-31 Thread Bernard Niset

Hi Martin,
There *is* a way to evaluate the type parameter at runtime. Something 
like the following will give you the first type used:


(ClassT) ((ParameterizedType) getClass()
   .getGenericSuperclass()).getActualTypeArguments()[0]

Regards,
Bernard.

Martin Voigt a écrit :

if we could get something like

T default Void

from sun, all my generics problems would go away.

no code clutter anymore just because you generify classes that
should be. and type safety would still be ensured at runtime. if the
vm would give me a way to evaluate the type parameter at runtime, i'd
be more than happy, but that will stay a dream for a long time ;)

Regards,
Martin

2008/10/30 Ricky [EMAIL PROTECTED]:
  

I don't know if i should speak up amongst elite group of people discussing,
but hey i'll try ... :)

From what i understand most people have issues with readability of generics;
but as i have indicated time and again as java improves and generic types
become reified; and java becomes inferred static typed; generic notation
will be less DRY violating and more clear.

But its the conceptual approach that i am not sure I am following (which is
why said may be I shouldn't be posting this :)). A component has to have an
associated model type with it. Generifying models is mandatory... but from
what i see; not generifying components would be a big mistake.

I cannot see any model less component. A component interacts with underlying
application data using model wrapper ... that was the beauty of wicket that
i had come to love the most and if now we are saying that it is valid in
some cases and in some it isn't is contradictory. If anything; for
consistency sake we should go with component level generification. But i
guess i am in the minority in that issue.

Generics is something that java developers have to get used to and it takes
some time ... but just because it takes some time; we should choose a middle
ground solution isn't exactly right; may be more practical (oh well ;) ).

On Thu, Oct 30, 2008 at 2:34 PM, Johan Compagner [EMAIL PROTECTED]wrote:



i agree and we only need 2 things to be fixed improved by sun and then all
the current problems are completely gone
But i guess we never get them
Because they find JavaFX way more importand.. I am glad the focused on that
because it gave us Java6U10 but that whole JavaFX i dont have much hope for
that.

johan


On Thu, Oct 30, 2008 at 6:25 PM, Edward [EMAIL PROTECTED]
wrote:

  

Well I'll speak up and say I don't like generics in Wicket.  I like them
 in other places... just not here.  It is a lot of extra ugly code just
to fix the rare occurrence that I have to cast the model object.

Not to mention in my opinion it breaks the data abstraction the model
provides.  Might as well get rid of the model all together.

When I first started using Wicket I admit I was shocked there were no
generics and I was accessing the model object all the time and casting.
 As I got better at using Wicket though I found better ways of doing
things and I believe I haven't done a cast even once in the past 6
months - and I have developed some fairly complicated apps in that time.

I think 1.3 is designed very well and I like it a lot.

Edward



Jan Kriesten wrote:



Hi Igor,

 you are against generics completely. but they are going to happen. the
  

way they are now is not perfect, in 1.5 we will try to move them to a
better place, but like it or not they are here to stay.



huh - hell, no, I'm not against generics at all. Where do you get that
from? I'm
against generics on Components which are not FormComponents (or
ListViews)!

I'm using Wicket together with Scala and other than with Java, I can't
just drop
the generics attributes (and live with the warnings). And the Void is
really a
hell of a generic...

Generics on Models are what is needed and if your vision to decouple
models from
the component and use introspection/reflection to support them comes
  

true
  

I'd be
quite happy (and could use Scala's mixin-feature to have my model
functionality
on the components).

Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--

Regards
Vyas, Anirudh
||  ॐ  ||




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-12 Thread Bernard Niset

Hi Lukasz,
I use about the same configuration as yours. I think you can safely 
replace the provided version of log4j (in the lib directory) with a more 
recent one. I have a production environment working with log4j 1.2.8, 
other test environments I use have more recent versions. My production 
environment is producing a huge amount of logging and no issues there 
with logging.

Bernard.


Lukasz Kucharski a écrit :

Hi group

Did anyone use wicket witch such configuration - i know this may sound
silly but  I'm having serious issues with slf4j binding for log4j.
Jboss internally uses very old implementation of log4j for which i
guess no slf4j binding exists (pre 1.2.x versions i guess).

I run wicket application successfully and log4j logging is working but
my wicket markup does not refresh, ever! This is because when
refreshing worker thread is starting it generates this error:

2008-09-11 15:46:04,781 ERROR [] thread.Task  - Task
ModificationWatcher terminated
java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
at 
org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
at org.apache.wicket.util.thread.Task$1.run(Task.java:107)
at java.lang.Thread.run(Thread.java:619)


which makes it unusable - my markup does not get refreshed. This is
serious concern for us. Please help.

Regards
Lukasz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Apache Wicket 1.3.4 is released!

2008-06-27 Thread Bernard Niset


Martijn Dashorst a écrit :

On Fri, Jun 27, 2008 at 10:47 AM, Bernard Niset [EMAIL PROTECTED] wrote:
  

Hi Martijn,
Thanks for the release.
I don't find how to build the javadoc. Apparently, mvn package doesn't do
that anymore.



Not by default: it took too long and too much processing for the
default build. We have enabled it for the release profile. mvn
-Prelease package will build the javadoc.

  
Could you please update the page Building from svn 
(http://wicket.apache.org/building-from-svn.html) with this information? 
It's not wiki otherwise I'd be pleased to do it myself.

BTW, it's a pity you don't provide the javadoc by default in the
distribution.



I beg to differ: adding JavaDoc will increase the download size
considerably for little benefit. If you just use maven to manage your
project, you can attach the source/javadoc jars easily to your project
(mvn eclipse:eclipse -DdownloadSources=true)

  
I don't why every other open source project does it then. Not everybody 
is a maven magician or use it in their projects. Having the javadoc 
prebuilt would avoid this kind of error:


[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] There are test failures.
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 minute 3 seconds
[INFO] Finished at: Fri Jun 27 14:33:04 CEST 2008
[INFO] Final Memory: 23M/52M
[INFO] 


Anyways, thanks for your help.
Bernard.



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Bernard Niset

Hi all,

  [X] Can best be done in a limited fashion, where we only generify
IModel but not components. I care more about what generifying can do
for API clarity (declaring a component to only accept certain models
for instance) than static type checking.

[X] I might rethink upgrading if my choice doesn't win.


I didn't try wicket 1.4 yet, but I read questions and comments from 
users in this list. My impression so far has been that there has been a 
small design mistake in the way the current 1.4 implementation has been 
done. I perceive that IModelT is conceptually correct as a Model can 
be seen as a container of something (of type T). Writing 
DropDownChoiceT is a shortcut that does not seem conceptually correct 
as in this case, the component is not a container of type T but a 
container of type IModelT. So you should have something like 
DropDownChoiceIModelT (I know this not valid java). Generifying the 
Page component is even worse as possibly a page can hold components with 
different model types and not have a model type on its own. Also, wicket 
is designed to allow some components not to have model on their own and 
rely on the model stored in a parent component (very nice and powerful 
feature).


Please note that using generic this way is already possible with wicket 
1.3 if you define an interface that would be for instance IMyModelT 
extends IModel. For instance, I have a generic model defined as 
DetachableBeanModelK,T where K is the key type and T is the bean type. 
This type is indeed a container of a key element and of a bean element.


I hope it helps,
Bernard.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Bernard Niset

Hi Atul,
Please read again the initial post from Eelco. He explicitly wrote: 
Note that it is not a vote; we only want to get an idea of what you 
think. and further away: Thanks in advance for everyone participating, 
and pls feel free to explain yourself further beyond just answering 
these questions!.

Bernard.

atul singh a écrit :

Hello everyone,
I feel bad that a vote thread has been converted to one of discussion...
At this moment wicket is *for *creating custom components. If these custom
component writing gets complicated we will not be able to appreciate wicket
as much(as much as we do now).Generics will complicate the *extend* at the
moment for new user...I feel(after reading through everything). In core-java
, fewer classes aim for extension by user. They rather are end product to be
used, to be composed of.

The best way still for wicket is *to implement generics partially *and* then
start incorporating into OUT-OF-BOX(components less prone to extension)
later on in further releases.
The fact is that less people can make to wicket core-development team, and
then who will maintain the bloat(meaning undesired syntactical features).
Who will release non-generics versions for freshers.

In Design Patterns I learnt about the open-closed principle. Closed for
change and open for extension.
Generics forces us to see into a new design pattern---Generify the the most
closed only, based on use cases--If there is more of a need of extension of
classes by end user AND there is flexibility while extending(wicket is one
case which is flexible when you extend)--then wait, do not generify. *
On Mon, Jun 2, 2008 at 11:03 PM, Bernard Niset [EMAIL PROTECTED] wrote:

  

Hi all,

 [X] Can best be done in a limited fashion, where we only generify
IModel but not components. I care more about what generifying can do
for API clarity (declaring a component to only accept certain models
for instance) than static type checking.

[X] I might rethink upgrading if my choice doesn't win.


I didn't try wicket 1.4 yet, but I read questions and comments from users
in this list. My impression so far has been that there has been a small
design mistake in the way the current 1.4 implementation has been done. I
perceive that IModelT is conceptually correct as a Model can be seen as a
container of something (of type T). Writing DropDownChoiceT is a shortcut
that does not seem conceptually correct as in this case, the component is
not a container of type T but a container of type IModelT. So you should
have something like DropDownChoiceIModelT (I know this not valid java).
Generifying the Page component is even worse as possibly a page can hold
components with different model types and not have a model type on its own.
Also, wicket is designed to allow some components not to have model on their
own and rely on the model stored in a parent component (very nice and
powerful feature).

Please note that using generic this way is already possible with wicket 1.3
if you define an interface that would be for instance IMyModelT extends
IModel. For instance, I have a generic model defined as
DetachableBeanModelK,T where K is the key type and T is the bean type.
This type is indeed a container of a key element and of a bean element.

I hope it helps,
Bernard.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  


Re: [vote] Release 1.4 with only generics and stop support for 1.3

2008-03-17 Thread Bernard Niset

+1

Regards,
Bernard


Martijn Dashorst wrote:

This thread is for voting only. Use the [discuss] thread for voicing
your opinion or asking questions. This makes counting the votes much
easier.

The discussion on our development list makes it clear that a lot of
folks are anxious for generified models. Most users if not all wish us
to release a quick release which is 1.3 + generics. The consequence is
that the core team will stop to support 1.3, and that everybody that
wishes updates will have to migrate to 1.4, and upgrade to Java 5.

Everybody is invited to vote! Please use

[ ] +1, Wicket 1.4 is 1.3 + generics, drop support for 1.3
[ ] -1, I need a supported version running on Java 1.4

Let your voices be heard!

Martijn
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [newbie question] How to refresh Image using an AjaxLink

2008-02-27 Thread Bernard Niset

Hi,
I had the same issue yesterday and found a solution somewhere else in 
this mailing list. Adding some random query to the url forces the 
browser not to reuse a cached image. To achieve that you have to 
subclass Image and override onComponentTag like this:


   @Override
   protected void onComponentTag(ComponentTag tag)
   {
   super.onComponentTag(tag);
   String src = (String) tag.getAttributes().get(src);
   src = src + rand= + Math.random();
   tag.getAttributes().put(src, src);
   }

Bernard.


Igor Vaynberg wrote:

most people want stable urls for their images i would imagine, so they
can be cached by the browser.

in case of ajax this doesnt work because the url has to change so that
browser needs to know to refresh it.

maybe image can know if its requested within an ajax request and
automatically add random noise to the url...there maybe room for
improvement here.

please add an rfe

-igor


On Wed, Feb 27, 2008 at 11:12 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Should nocachingImage be default, and then have a cachingImage? Or would
 that result in the same amount of confusion? WDYT?

 As a couple of people has been confused by this...

 regards Nino



 Igor Vaynberg wrote:
  use NonCachingImage
 
  -igor
 
 
  On Wed, Feb 27, 2008 at 2:43 AM, Karol Wrzesniewski
  [EMAIL PROTECTED] wrote:
 
  Hi,
 
   I'm having problems with refreshing an Image using AjaxLink.
 
   I have a ModalWindow. On it's left side theres a ListView containing Ajax
   links:
 
   --
   add(listaObrazow = new ListView(pics, obrazki) {
   public void populateItem(final ListItem listItem) {
   final String obr = (String)listItem.getModelObject();
   listItem.add(new Label(pic,new Model(obr)));
 
   listItem.add(new AjaxLink(picAjaxLink) {
   public void onClick(AjaxRequestTarget
   ajaxRequestTarget) {
 
   imgPreview.setImageResource(
   EbokTools.getImageResource(
   (String)listItem.getModelObject()
   )
   );
 
   ajaxRequestTarget.addComponent(imgPreview);
 
 
   
myModal.setObraz((String)listItem.getModelObject());
   ajaxRequestTarget.addComponent(wyborObrazow);
   }});
   }
   });
   --
 
 
 
   imgPreview is an Image object, placed on the same modal Window. What Im
   trying to achieve is to refresh this image after the AjaxLink is clicked.
   Unfortunately it doesn't. After I click on AjaxLink content of form
   wyborObrazow is refreshed, but image stays unchanged.
 
   Image resource is being changed - i know that because after i close modal
   and open it again imgPreview is showing me  the right Resource.
 
   The problem is that calling ajaxRequestTarget.addComponent(imgPreview);
   after changing imageResource doesn't seem to be enough.
 
   I would be very grateful for some hints.
 
   best regards,
   Zyx
 
   --
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Cordialement,
Bernard Niset.

SmartObjects SPRL
Avenue Hergé, 21/14
1050 - Bruxelles
BELGIQUE

Tel: +32 (0)2 770 68 04
Fax: +32 (0)2 791 92 78
E-mail: [EMAIL PROTECTED]




Re: [RFE] packed JS in DEPLOYMENT mode.

2007-11-30 Thread David Bernard

What do you mean by included resources ?
By default every js and css under src/main/resources, src/main/webapp, 
src/main/js are minified. (using the resources option is for exceptionnal case)

Contact me privatly for questions about the plugin (not related to wicket).

Alex Objelean wrote:

David, what is the best practice to specify the order of included resources?

Thank you!


David Bernard-2 wrote:

You could aggregate every type of resources.

Alex Objelean wrote:

Very interesting. Would be nice to have also aggregate css.

Regards, 
Alex.



David Bernard-2 wrote:

If you want you could use the yuicompressor-maven-plugin to minified
(more than just strip whitespace) at build time.
http://alchim.sf.net/yuicompressor-maven-plugin
Other features:
* aggregate js
* minified css

So you could test/run with minified in development and/or deployment
mode

Disclamer, I'm the author of the plugin, but not of the compressor.

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] packed JS in DEPLOYMENT mode.

2007-11-29 Thread David Bernard

If you want you could use the yuicompressor-maven-plugin to minified (more 
than just strip whitespace) at build time.
http://alchim.sf.net/yuicompressor-maven-plugin
Other features:
* aggregate js
* minified css

So you could test/run with minified in development and/or deployment mode

Disclamer, I'm the author of the plugin, but not of the compressor.

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RFE] packed JS in DEPLOYMENT mode.

2007-11-29 Thread David Bernard

You could aggregate every type of resources.

Alex Objelean wrote:

Very interesting. Would be nice to have also aggregate css.

Regards, 
Alex.



David Bernard-2 wrote:

If you want you could use the yuicompressor-maven-plugin to minified
(more than just strip whitespace) at build time.
http://alchim.sf.net/yuicompressor-maven-plugin
Other features:
* aggregate js
* minified css

So you could test/run with minified in development and/or deployment mode

Disclamer, I'm the author of the plugin, but not of the compressor.

Regards

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple onchange AjaxUpdatingBehavior

2007-11-15 Thread Bernard Niset
Hi,
I would like to use multiple updating behaviors attached to the same
component (In my case a DropDownChoice). It works for one component, but
when I add 2 only one gets updated.
Is it possible to do so? I tried initially on wicket-1.2.6, it didn't
work, then made the effort to the port to 1.3.0-rc1 but to my deception,
it doesn't work either.
Any help appreciated.
Thanks for the great framework anyway.
Bernard.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple onchange AjaxUpdatingBehavior

2007-11-15 Thread Bernard Niset
Thanks for the info.
Any ideas for another way to achieve this or a work around?
Bernard.

Gerolf Seitz wrote:
 unfortunately, this is not (yet) possible, and won't be for 1.3.
 see [0] for more details...

   Gerolf

 [0] https://issues.apache.org/jira/browse/WICKET-214


 On Nov 15, 2007 11:04 AM, Bernard Niset [EMAIL PROTECTED] wrote:

   
 Hi,
 I would like to use multiple updating behaviors attached to the same
 component (In my case a DropDownChoice). It works for one component, but
 when I add 2 only one gets updated.
 Is it possible to do so? I tried initially on wicket-1.2.6, it didn't
 work, then made the effort to the port to 1.3.0-rc1 but to my deception,
 it doesn't work either.
 Any help appreciated.
 Thanks for the great framework anyway.
 Bernard.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 

   


Re: How to Jquery, Json, wicket spring?

2007-11-04 Thread David Bernard

Hi,

I started the wicketstuff-jquery project, currently there is no doc/wiki, only 
the [source][1] is available and a demo application ([source][2], [war][3]).
For the communication with between client and server, I used the native Wicket API, 
simpler than trying to write it in JSON (client and server).

every feedbacks, helps,... are welcome through this mailing list (please prefix 
subject with [wicketstuff-jquery] or via the issue tracker) [4].

[1]: 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/
[2]: 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery-examples/
[3]: 
http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war
[4]: http://wicketstuff.org/jira/browse/WSJQUERY

Pen wrote:


We are developing a new web based application in wicket, we need to
integrate Ajax(Jquery 1.2) with JSON data format and wicket(1.3). 
Does anybody know how to do this? any sample example or pointer will be

great full. I have googled and could not find anything.
Also is there any example to integrate Wicket(1.3) with spring using new
spring annotations 2.5?

thanks
Pen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Netbeans 6

2007-10-20 Thread David Bernard

I try NB 6 some time ago with wicket and maven.
You don't need to mvn netbeans:netbeans, but you need to install NB 
module/plugins to manage maven2 project.
ToolsPluginsAvailable plugins
Sort by category, select to install : maven in category java, and if you want 
(optional) other plugin in category maven.

Regard

ZedroS Schwart wrote:

Hi all

Following what's written here http://wicket.apache.org/quickstart.html
I've tried to have the quickstart to run in Netbeans 6 beta 1.

I successfully managed to create the project using the mvn
archetype:create ... command, but I don't manage to use it with
Netbeans 6 even if I read :
* To create a NetBeans project perform the mvn netbeans:netbeans
command inside the project directory, or if using NetBeans 6, just
open the pom.xml directly.

I've tried the mvn netbeans:netbeans command in various locations
(at the same level as the project folder and inside it) but got :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'netbeans'.
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not exis
t or no valid version could be found
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time:  1 second
[INFO] Finished at: Sat Oct 20 14:59:25 CEST 2007
[INFO] Final Memory: 1M/4M
[INFO] 

Furthermore, I don't manage to just open the pom.xml directly. I
open the file with Netbeans, then I see it but I see nothing to have
some action. Furthermore, when doing open project in my project
folder, NEtbeans doesn't recognise the pom file, so no project is
open.

Where am I doing wrong ?

Thanks in advance
ZedroS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Netbeans 6

2007-10-20 Thread David Bernard

I can't help you more, I didn't use those feature when I work with netbeans. I run the 
webapp from a shell with mvn jetty:run.

Sorry

ZedroS Schwart wrote:

Thanks a lot.

Netbeans has now created a quickstart project. However its name is
quickstart (war) and I don't manage to have it running. I run the
Start.java but nothing happens...

Sorry for all these questions, I'm new to Netbeans (which I choose to
try out the UML part).

Thanks in advance

ZedroS

On 10/20/07, David Bernard [EMAIL PROTECTED] wrote:

I try NB 6 some time ago with wicket and maven.
You don't need to mvn netbeans:netbeans, but you need to install NB 
module/plugins to manage maven2 project.
ToolsPluginsAvailable plugins
Sort by category, select to install : maven in category java, and if you want 
(optional) other plugin in category maven.

Regard

ZedroS Schwart wrote:

Hi all

Following what's written here http://wicket.apache.org/quickstart.html
I've tried to have the quickstart to run in Netbeans 6 beta 1.

I successfully managed to create the project using the mvn
archetype:create ... command, but I don't manage to use it with
Netbeans 6 even if I read :
* To create a NetBeans project perform the mvn netbeans:netbeans
command inside the project directory, or if using NetBeans 6, just
open the pom.xml directly.

I've tried the mvn netbeans:netbeans command in various locations
(at the same level as the project folder and inside it) but got :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'netbeans'.
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not exis
t or no valid version could be found
[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time:  1 second
[INFO] Finished at: Sat Oct 20 14:59:25 CEST 2007
[INFO] Final Memory: 1M/4M
[INFO] 

Furthermore, I don't manage to just open the pom.xml directly. I
open the file with Netbeans, then I see it but I see nothing to have
some action. Furthermore, when doing open project in my project
folder, NEtbeans doesn't recognise the pom file, so no project is
open.

Where am I doing wrong ?

Thanks in advance
ZedroS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PopupDatePicker + AjaxButton + IE 7 + visibility

2007-10-10 Thread David Bernard

WARNself promotion/WARN

In the wicketstuff-jquery there is a date picker (based on jquery) that should 
(not tested I'm on linux) work on IE7.
You could download the examples war at (quicker than svn co + build only for 
test)
http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war


Juha Alatalo wrote:

Hi,

we are still using old DatePicker (PopupDatePicker in
wicket-contrib-datepicker) and found an error in following situation.

- Panel is invisible
- AjaxButton sets panel visible
- DatePicker (in that panel) doens't work when using IE 7

I created a simple example:
http://download.syncrontech.com/public/PopupDatePickerExample.zip
which contains two errors when using IE 7

Expected ';' (when pressing AjaxButton)
'Calendar._TT.DEF_DATE_FORMAT' is null or not an object (when pressing 
PopupDatePicker link)


- Juha


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Stuff

2007-10-10 Thread David Bernard

WARNself promotion/WARN

In the wicketstuff-jquery there is a sortable list (by DnD) (based on jquery).
You could download the examples war at (quicker than svn co + build only for 
test)
http://alchim.sourceforge.net/download/wicketstuff-jquery-examples-0.1-SNAPSHOT.war



anita nichols wrote:

 I tried to create Sortable list using Wicket Stuff, but the
SortableListView give me an error. What do I do wrong here, below is the
code:

import wicket.contrib.scriptaculous.*;


add(new SortableListView(item, items)
{
protected void populateItem(ListItem item)
{
// add an AJAX checkbox to the item
item.add(new AjaxCheckBox(check,
new PropertyModel(item.getModel(), checked))

{

protected void onUpdate(AjaxRequestTarget target)
{
// no need to do anything, the model is updated
by
// itself, and we don't have to re-render a
// component (the client already has the correct
// state).

}
});
// display the text of the milestone item

item.add(new Label(text, new PropertyModel(
item.getModel(), text)));
 }
});
}
}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pass information through ajax without form

2007-10-03 Thread David Bernard

For a similar case, I override (in MyBehavior)
@Override
public final void respond(AjaxRequestTarget target) {
try {
Request req = RequestCycle.get().getRequest();
String param1 = req.getParameter(param1);
// to stuff
super.respond(target); //??
} catch (RuntimeException exc) {
throw exc;
} catch (Exception exc) {
throw new RuntimeException(wrap:  + exc.getMessage(), exc);
}
}

And you need to override (server or client side) the callbackUrl to add 
parameter.



ywtsang wrote:

How to pass information (stored in an attribute of a html tag, or javascript
variable) through ajax without involving form?

e.g. there is an ajax link and after I click this ajax link, an ajax event
is triggered and I want to get the states of other html elements/javascript
states in this ajax event

it is no problem to use form, but we have a restriction that no form is used
(may look weird to all here), so I would like to see if there is workaround
in wicket.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pass information through ajax without form

2007-10-03 Thread David Bernard

Currently I have no simple example :-(
In my case (wicketstuff-jquery),  I've got a link that call a javascript 
function generated (with a template on server side).
In this function :
var wcall = wicketAjaxGet('${callbackUrl}' + 
DnDSortableBehavior.asQueryString(), function(){}, function(){});

And the method DnDSortableBehavior.asQueryString() is in charge of formated 
collected state, params,...
var DnDSortableBehavior = {
  ...
  asQueryString : function() {
return 'itemId=' + this.itemId + 'srcContainerId=' + this.srcContainerId + 
'srcPosition=' + this.srcPosition + 'destContainerId='+ this.destContainerId + 
'destPosition=' + this.destPosition;
  }
};

In my case I use jquery to retrieve states, values.

If I've got time this evening, I'll try to create a sample.
Which type of information do you want to send back to server ?

ywtsang wrote:

i have traced the wicket source codes at the place that how it generates the
ajax js like
wcall=wicketAjaxGet('xxx') 
but i don't know exactly what this does, so how to add parameter to the

wicket ajax request?

i can add custom js to the wicket ajax javascript, but how can I pass the
some dynamic js state into that ajax request, e.g. i trigger the ajax
request by a link with AjaxEventBehavior on onclick event.

would you mind show me a simple example?




David Bernard-2 wrote:

For a similar case, I override (in MyBehavior)
 @Override
 public final void respond(AjaxRequestTarget target) {
 try {
 Request req = RequestCycle.get().getRequest();
 String param1 = req.getParameter(param1);
 // to stuff
 super.respond(target); //??
 } catch (RuntimeException exc) {
 throw exc;
 } catch (Exception exc) {
 throw new RuntimeException(wrap:  + exc.getMessage(), exc);
 }
 }

And you need to override (server or client side) the callbackUrl to add
parameter.



ywtsang wrote:

How to pass information (stored in an attribute of a html tag, or
javascript
variable) through ajax without involving form?

e.g. there is an ajax link and after I click this ajax link, an ajax
event
is triggered and I want to get the states of other html
elements/javascript
states in this ajax event

it is no problem to use form, but we have a restriction that no form is
used
(may look weird to all here), so I would like to see if there is
workaround
in wicket.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pass information through ajax without form

2007-10-03 Thread David Bernard



ywtsang wrote:

my case is:

there is a javascript variable (let say var STATE;) that will be updated
througout the client side javascript event

there is a link (for example) that I want to use to pass the STATE through
ajax to server.

in your codes, does client side javascript method
DnDSortableBehavior.asQueryString() generate the query string and append
to the wicketAjaxGet?


YES
I think you could use the code sent by swaroop
@Override
public CharSequence getCallbackUrl() {
return super.getCallbackUrl()+STATE=' + 
STATE;
}

protected CharSequence getCallbackScript(boolean 
recordPageVersion,
boolean onlyTargetActivePage){
return getCallbackScript(wicketAjaxGet('
+ getCallbackUrl(), null, null);
}

and you parse the parameters in the server side?


YES with the code sent ealier.



I think you have already given me good hints and I will continue work on
that, thanks very much


David Bernard-2 wrote:

Currently I have no simple example :-(
In my case (wicketstuff-jquery),  I've got a link that call a javascript
function generated (with a template on server side).
In this function :
var wcall = wicketAjaxGet('${callbackUrl}' +
DnDSortableBehavior.asQueryString(), function(){}, function(){});

And the method DnDSortableBehavior.asQueryString() is in charge of
formated collected state, params,...
var DnDSortableBehavior = {
   ...
   asQueryString : function() {
 return 'itemId=' + this.itemId + 'srcContainerId=' +
this.srcContainerId + 'srcPosition=' + this.srcPosition +
'destContainerId='+ this.destContainerId + 'destPosition=' +
this.destPosition;
   }
};

In my case I use jquery to retrieve states, values.

If I've got time this evening, I'll try to create a sample.
Which type of information do you want to send back to server ?

ywtsang wrote:

i have traced the wicket source codes at the place that how it generates
the
ajax js like
wcall=wicketAjaxGet('xxx') 
but i don't know exactly what this does, so how to add parameter to the

wicket ajax request?

i can add custom js to the wicket ajax javascript, but how can I pass the
some dynamic js state into that ajax request, e.g. i trigger the ajax
request by a link with AjaxEventBehavior on onclick event.

would you mind show me a simple example?




David Bernard-2 wrote:

For a similar case, I override (in MyBehavior)
 @Override
 public final void respond(AjaxRequestTarget target) {
 try {
 Request req = RequestCycle.get().getRequest();
 String param1 = req.getParameter(param1);
 // to stuff
 super.respond(target); //??
 } catch (RuntimeException exc) {
 throw exc;
 } catch (Exception exc) {
 throw new RuntimeException(wrap:  + exc.getMessage(),
exc);
 }
 }

And you need to override (server or client side) the callbackUrl to add
parameter.



ywtsang wrote:

How to pass information (stored in an attribute of a html tag, or
javascript
variable) through ajax without involving form?

e.g. there is an ajax link and after I click this ajax link, an ajax
event
is triggered and I want to get the states of other html
elements/javascript
states in this ajax event

it is no problem to use form, but we have a restriction that no form is
used
(may look weird to all here), so I would like to see if there is
workaround
in wicket.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: is wicket well-suited for integrating JS widgets?

2007-10-03 Thread David Bernard

Hi,

It's lot of easier to integrate JS lib with wicket, than with JSF.
I currently work on JQuery's widget. About integration with YUI or Scriptaclus, 
take a look at wicketstuff.org (svn and wiki), there is already some project 
about it.

Regards.

dukehoops wrote:

I'm a complete newbie to wicket (coming from JSF, Swing world) and am in
process of building small examples as part of framework eval. 


I'm looking for a framework that'd make it easy to integrate arbitrary JS ui
components. Let's say Y!UI  or Script.aculo.us develops a new
super-accordion (or autocomplete 2.0) widget?

Is Wicket designed in a way that'd make integrating this widget relatively
easy? Or is this not considered an important use case?

If it is an important use could, could someone please elaborate why Wicket
has own implementation of an Autocomplete widget (rather than integrating an
existing one)?

thanks
-nikita


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

If I understand right you use Apache as a front end ?
If it work when you access to resin via a direct call 
(http://foo.bar.com:8080/app) then I don't think it a problem with resin but 
with your apache front-end configuration.
What do you map from apache to resin (1)/app, (2)/app* or (3)/app/* ?
In my experience you need to map (1 and 3) or 2. You don't need to map 1 and 3 
only if you have a rewrite rule /app = /app/.

/david

smallufo wrote:

Hi , I think it seems resin's problem (2.1.7).
After a lot of combinations , I still cannot make the wicket filter work.
The error (URL not found) is reported by apache , not by resin . which means
the filter request is not passed to resin.
After I assign port  ( http://foo.bar.com:8080/app ) , everything works fine
now.
But other servlets are not required to assign port , it means
http://foo.bar.com/servlet/OtherServlets works very well.
( servlets are mapped to /servlet/* URL pattern )

Therefore , it maybe resin's problem I think.
To avoid exposing port 8080 , maybe I have to set a reverse-proxy in
apache's config. ...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

It depends of how you map/forward from apache to resin.
What is your apache configuration?

If it works when you access resin directly, what is done when you access 
throught port 8080, then it's not a resin problem.


smallufo wrote:

Yes , I use Apache as a front end.
If any configuration goes wrong , servlets' requests will not be processed
by resin, either.
But http://foo.bar.com/servlet/other.servlet just works fine. (No port
assign)
It means resin (2.1.7) seems doesn't intercept filter's requests.
I've also reported this issue to resin's maillist.


2007/10/2, David Bernard [EMAIL PROTECTED]:

If I understand right you use Apache as a front end ?
If it work when you access to resin via a direct call (
http://foo.bar.com:8080/app) then I don't think it a problem with resin
but with your apache front-end configuration.
What do you map from apache to resin (1)/app, (2)/app* or (3)/app/* ?
In my experience you need to map (1 and 3) or 2. You don't need to map 1
and 3 only if you have a rewrite rule /app = /app/.



Yes , I tried but in vain.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

Sorry I need the mapping, could you send /usr/local/resin/conf/resin.conf.

smallufo wrote:

2007/10/2, David Bernard [EMAIL PROTECTED]:

It depends of how you map/forward from apache to resin.
What is your apache configuration?

If it works when you access resin directly, what is done when you access
throught port 8080, then it's not a resin problem.




Hi , this is my (partial) httpd.conf

NameVirtualHost *:80

VirtualHost *:80
ServerName foo.bar.com
DocumentRoot /home/foobar/www
ErrorLog/home/foobar/log/error_log
CustomLog /home/foobar/log/access_log combined
Directory /
# DAV on
AllowOverride
# AuthConfig
order deny,allow
Options Indexes FollowSymLinks ExecCGI
/Directory
/VirtualHost


#
# mod_caucho Resin Configuration
#

LoadModule caucho_module /usr/lib/httpd/modules/mod_caucho.so

CauchoConfigFile /usr/local/resin/conf/resin.conf



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Url Coding Strategy

2007-10-02 Thread David Bernard

Have you try to customise (ignore fragment1 and fragment2, or override matches 
methods) the following class:
* org.apache.wicket.request.target.coding.IndexedParamUrlCodingStrategy
* or org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy

Or use a filter like urlrewrite (http://tuckey.org/urlrewrite/) to convert
/{var1}/fragment1/fragment2/{var2}/{var3}
into
/fragment1/fragment2/{var1}/{var2}/{var3}

/david

kent lai wrote:

Hi,
I am wondering if Wicket supports an in-built coding strategy where 
I can, given the following form


/{var1}/fragment1/fragment2/{var2}/{var3}

it can be mounted as a url to a page, passing in page parameters 
var1, var2, and var3.


A more real use case of this could be a multi user site, with each 
user having a publicly accessible page.


/kentlai/blog/2007/june - BlogMonthArchivePage with page parameters 
user:kentlai, year:2007, month:june
/wicket/blog/2006/may - BlogMonthArchivePage with page parameters 
user:wicket, year:2006, month:may


I looked through the available IRequestTargetUrlCodingStrategy, but 
could not find anything that is described to perform as above, so would 
like to check in the mailing list if it has been done before.


Thanks

Kent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard

Sorry No idea :-(

abstract of your problem :

http://foo.bar.com/app  KO
http://foo.bar.com/app/ ??
http://foo.bar.com:8080/app OK
http://127.0.0.1:6802/app   ??
http://foo.bar.com/servlet/TotoServet   OK

servlet/TotoServlet is part of the same webapp
your filter mapping ?
  filter-mapping
filter-namewicket/filter-name
url-pattern/app/url-pattern
  /filter-mapping
  filter-mapping
filter-namewicket/filter-name
url-pattern/app/*/url-pattern
  /filter-mapping

is it right ?

Have you try:
* to set port to 80 instead of 8080
* to create an empty dir app under your webapp, I know that Websphere failed if 
a filter is not apply on a file or servlet.

Sorry.
smallufo wrote:

2007/10/3, David Bernard [EMAIL PROTECTED]:

Sorry I need the mapping, could you send /usr/local/resin/conf/resin.conf.



This is my partial resin.conf  , thanks in advanced.

http port='8080'/
  ...
  srun host='127.0.0.1' port='6802'/
  ...
host id='foo.bar.com' 
  error-log id='log/error.log' /

  jsp precompile='true' static-encoding='true'
recompile-on-error='true'/
  servlet-mapping url-pattern='*.jsp' servlet-name='
com.caucho.jsp.JspServlet'/

  web-app id='/' app-dir='/home/foobar/www'
session-config
  session-max4096/session-max
  session-timeout30/session-timeout
  enable-cookiestrue/enable-cookies
  enable-url-rewritingtrue/enable-url-rewriting
/session-config
  /web-app

  access-log id='/home/foobar/log/servlet/access_log'
rollover-period2W/rollover-period
  /access-log

/host



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Server cannot find /app url after migration to 1.3 filter

2007-10-02 Thread David Bernard



Have you try:

* to set port to 80 instead of 8080



Port 80 is listened by apache httpd.
I need apache httpd to serve  large amount of static contents.


Yes, and resin.conf isn't run as part of Apache?
Apache (port 80) - srun(6802)

Sorry , no other idea, except may be create an dummyServlet mapped to /app in 
web.xml.
Have you the same problem with resin 3.x ?

:-(

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Presented Wicket to my Company...

2007-09-28 Thread David Bernard

Short version of my experience, last year I created a project with 
Seam+Facelets+JSF+EJB3/JPA+jBPM. I was optimist JSF is a standard with 2+ years 
old, lot of providers,...
* JSF : I tried to mixed components from several provider, Trinidad, ADT, 
MyFaces, Ajax4JSF,... it was a nightweird and time lost (lost of 
incompatibility in the configuration, rendering,...)
* JSF : I try to create my own components (and read  Pro JSF and Ajax: Building 
Rich Internet Components), very complex : Request lifec cycle, extensions points, 
lot of xml to write and keep sync
* JSF : sometime nothing appends due to exception or reject in the dark zone of the 
request life cycle, so don't forget to display messages on every page
* JSF : some basic widget (select) always need hack to work
* JSF : create nasty/crapy html, with lot of form, javascript, div : difficult 
to debug
* Seam : lot of good idea, need to understand Injection and Outjection, need to 
be carefull of scope (request, conversation, session, application) of 
In/outjection
* Seam : some features didn't work with third party JSF components
* Seam : required EJB
* Facelets : nice, helping information on failure, templating, tools/facilities 
to create simples components
* jBPM : nice GUI to design workflow and pageflow = lot of getter/setter, lot 
of xml, not easy to test/mock
* documenation : too many source

After 3 month, I switch to :
* Spring instead of Seam + full EJB3
* hand code instead of jBPM
* session instead conversation scope (spring doesn't support 
conversation/continuation natively)
And keep JSF(Facelets+Ajax4JSF+MyFaces), JPA(Hibernate).

About Spring + JSF, you had 2 choice
* every Bean (from spring) could be accessed from a JSF page
* only bean declared into an xml file could be accessed

About html preview :
* facelet allow to use regular html tag with attribute like wicket, but it's an option, and lot of components need to have child component with special tagname and every/lot of component add tag when 
it's rendering (runtime)  = css from static page template need to be changed.

* facelet like wicket allosw to define fragment, displaying page with fragment 
or fragment alone isn't very usefull. (note : I use fragment as general term, 
not in the Wicket terminology)

Result : I was pretty happy with the final solution but lot of xml to maintain.
It's quicker to start wth JSF than Wicket, but when to start to customize and 
use none basic widget,... welcome to hell (of configuration, documentation,...)

WARN: it's a 2006 experience. I've not used JSF extension/preview from IDE

/david

robert.mcguinness wrote:

...to tell you the truth, it impressed the developers but I didn't get that
feeling from the top brass.  I am pretty sure we will move towards
Seam/JSF/Facelets (we have a presentation on that tech next week given by
another developer) since it is standard.

Has anyone here worked with the Seam tech?  All the examples I have seen
(including Facelets) is nothing but tag soup with scriptlets in the page
(albeit small).  The configuration for a Seam project seems like a pain and
was also told that the JSF/Seam/Faclets jsp pages can be previewed in a
browser (something I thought was so clever about Wicket html pages...and I
was under the impression that Wicket was the only tech that allowed true
separation of concerns; allowing the web designer to work independenly of
the programmer with no duplication of work between the two).  Maybe I'm
blind to Wicket and I'm overlooking Seam and the techs related to it?  


I've worked with Freemarker and Struts before and Wicket feels like
natural web development.  I thought I covered all the great concepts about
Wicket: Ajax, Templating, Inheritance, Reusable Components, OO Concepts…etc…

Bah…just venting.  I’m going to have to win the votes of the developers. 
I’ll keep everyone posted.  Thanks amigos!


- rm3



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket 1.3 examples

2007-09-27 Thread David Bernard

Hi,

What do you download exactly ?
in the .zip or .tar.gz from 
http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
* the source of org.apache.wicket.examples in under
apache-wicket-1.3.0-beta3/src/jdk-1.5/wicket-examples/src/main/java/
* the war under
apache-wicket-1.3.0-beta3/lib

/david

tsuresh wrote:

Hello, I downloaded the wicket 1.3 , but could not find the package
org.apache.wicket.examples , please help me.
thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about GWT, JSF and Wicket

2007-09-25 Thread David Bernard

Hi,

A list of url, that could help you...

About Wicket vs JSF, there is some articles :
* http://ptrthomas.wordpress.com/2007/05/14/a-wicket-user-tries-jsf/ (from the 
author of JTrac)
* a list of articles : http://cwiki.apache.org/WICKET/articles-about-wicket.html

About widgets :
* take a look to
  * wicket-extensions :
  * wicketstuff (provide some way to integrate with third party js lib) :
* a main difference with JSF and why I switch, it's the easier way to create 
custom component (see the documentation, wiki, slides).

About GWT :
Sorry I can't help you, :-(. I didn't choose it when I start my current project, because it was too younger (no validation, need to implement ISerializable, bad maven integration,... lot of things 
that seems to be fixed now).


/david


Patrick Labonte wrote:

Hello,

at the moment I'm writing my diploma-thesis. The project I'm working
on is for a big company in germany and consists of porting a
Rich-Client-Java-Application to a web-based Application. It should
make heavy use of AJAX-Components, because it should behave like the
Rich-Client. If the experiences with the prototype turn out
satisfactory, the complete application may be ported and maybe other
applications will follow.

At the moment I'm thinking about the architecture: From the
Rich-Client I will reuse Spring, Hibernate and the Business-Objects,
but I'm not sure which Web-Framework to choose from.
I have used JSF in former projects and were not happy with it (the
Web-Designer thought about committing suicide ;)
Well for my thesis I have to give reasons, why I have chosen a
specific technology and I have to convince some people, because they
have hopes to raise some new projects out of the result of my project.
They know about the JSF-Hype, but they don't know about Wicket. I have
heared about it 2 weeks ago the first time.
I'm doing a comparison between JSF and Wicket. I figured out a lot of
disadvantages on JSF-Side, but I have no experience on Wicket-Side and
it's disadvantages. I found out that JBoss Seam fixes some bad JSF
issues.
One guy in my department likes the Google Web Toolkit and is writing a
book about it. I'll give it a try. It's a bit like Wicket from the
programming style, but it needs a separate compiler and I haven't got
a backend solution. I have red that it's possible to use GWT with
Wicket. How far is this grown?
I fear about a lack of AJAX-Wicket components, because I have seen
only few components. I hope someone has experience with similar
projects and can give me a few helpful advices.

Thanks very much.
Patrick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updating a Dynamic Image with AJAX (and JFreeChart)

2007-09-25 Thread David Bernard

Hi,

Have you try to extend NonCachingImage instead of Image  (and comments 
setHeaders(...))?

/david

Jason Mihalick wrote:

I am integrating JFreeChart into my application and I've followed the
JFreeChart example on the wiki.  That works very nicely.  I was impressed. 
What I want to do now is update the graph that I display based on the

selection from a drop down list.  I've successfully added the DropDownChoice
component and added a AjaxFormComponentUpdatingBehavior to it.  I've
verified that my onUpdate( AjaxRequestTarget ) method is being invoked and
I'm receiving the updated value, which is very cool.  Here is my onUpdate
implementation for the DropDownChoice control:

protected void onUpdate( AjaxRequestTarget target ) {
  log.debug( graphStyles onUpdate invoked! SelectedGraphStyle =  +  
 FieldResultsPanel.this.getSelectedGraphStyle() );

  FieldResultsPanel.this.updateGraph();  // Update the model and re-create
the JFreeChart Image

  // fieldGraph is my JFreeChartImage instance (derived from Image)
  // This is supposed to indicate back to the browser that the image needs
updated.  I think this
  // is working properly
  target.addComponent( FieldResultsPanel.this.fieldGraph );  
}


Even though I am updating the model of my JFreeChartImage, it appears that
the getImageData method is never invoked afterwards.

What do I need to do in order to get the image data to be re-read?

Here is my JFreeChartImage class:

public class JFreeChartImage extends Image {

  private static final Logger log = LoggerFactory.getLogger(
JFreeChartImage.class );
  
  private int width;

  private int height;

  public JFreeChartImage( String id ) {
super( id );
  }

  public JFreeChartImage( String id, int width, int height ) {
this( id );
this.width = width;
this.height = height;
  }
  
  public JFreeChartImage( String id, JFreeChart chart, int width, int height

) {
super(id, new Model( chart ) );
this.width = width;
this.height = height;
  }

  public Component setModel( JFreeChart chart ) {
log.debug( setModel invoked with chart:  + chart );
return super.setModel( new Model( chart ) );
  }
  
  @Override

  protected Resource getImageResource() {

return new DynamicImageResource(){
  private static final long serialVersionUID = 1L;

  @Override
  protected byte[] getImageData() {
log.debug( Invoking getImageData... );
JFreeChart chart = (JFreeChart)getModelObject();
log.debug( Chart object:  + chart );
return toImageData( chart.createBufferedImage( width, height ) );
  }
  
  @Override

  protected void setHeaders( WebResponse response ) {
if ( isCacheable() ) {
  super.setHeaders(response);
} else {
  response.setHeader( Pragma, no-cache );
  response.setHeader( Cache-Control, no-cache );
  response.setDateHeader( Expires, 0 );
}
  }
};
  }
 
Any help is much appreciated!


--
Jason


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [podcast] Wicket talk at JavaZone 2007

2007-09-24 Thread David Bernard

Why not add it to the wiki or the main site (and other presentations)?
It's a good support for internal/customer show.

I suggest a list with the following information :
* authors
* original target (ex: javazone 2007), first presentation date
* wicket version (1.3.0)
* attachament (slides, src...)
* agenda/toc

/david

Xavier Hanin wrote:

On 9/22/07, Gerolf Seitz [EMAIL PROTECTED] wrote:

for those of you couldn't attend JavaZone 2007 (probably most of you)
and haven't already listened to the podcast, here we go:

http://www4.java.no/presentations/javazone/2007/podcast/5301.mp3



As a reminder, slides and eclipse project for the custom component example
are here:
http://people.apache.org/~xavier/wicket/

Xavier

the rss-feed for all podcasts can be found here:

http://www4.java.no/web/show.do?page=141

Xavier, thank you again for stepping in...

  Gerolf







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [podcast] Wicket talk at JavaZone 2007

2007-09-24 Thread David Bernard

Done,

I added 
http://cwiki.apache.org/confluence/display/WICKET/Slides+and+presentations .
Xavier, could you check information. I create links to your presentations, but 
may do you prefer to convert to attachement (part of the wiki).

/david


Gerolf Seitz wrote:

n 9/24/07, David Bernard [EMAIL PROTECTED] wrote:

Why not add it to the wiki or the main site (and other presentations)?
It's a good support for internal/customer show.



believe it or not, but nobody will stop you from doing this ;)

  gerolf


I suggest a list with the following information :

* authors
* original target (ex: javazone 2007), first presentation date
* wicket version (1.3.0)
* attachament (slides, src...)
* agenda/toc

/david

Xavier Hanin wrote:

On 9/22/07, Gerolf Seitz [EMAIL PROTECTED] wrote:

for those of you couldn't attend JavaZone 2007 (probably most of you)
and haven't already listened to the podcast, here we go:

http://www4.java.no/presentations/javazone/2007/podcast/5301.mp3


As a reminder, slides and eclipse project for the custom component

example

are here:
http://people.apache.org/~xavier/wicket/

Xavier

the rss-feed for all podcasts can be found here:

http://www4.java.no/web/show.do?page=141

Xavier, thank you again for stepping in...

  Gerolf





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to HTTPS?

2007-09-24 Thread David Bernard

Hi,

In my previous project, it was done by configuring (rewrite rules) the http 
front-end (apache, lighttpd,...).
It's an other solution, that avoid developper to deal certificate and all the 
ssl machinery.

/david

Daniel Frisk wrote:
I'm trying to add a check to the constructor on one of our pages (a 
credit card processing page) which should:

1. If protocol is HTTPS; continue as usual
2. Else redirect so that HTTPS is used to access the same page

I saw the sample in the wiki with the annotations that intercepted the 
request processing and etc but it seemed overly complicated for this 
tiny check, any ideas for a minimal implementation which could serve 
this purpose?


// Daniel Frisk
jalbum.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >