Re: JQuery contribution question

2013-05-23 Thread Martin Grigorov
Hi,


On Thu, May 23, 2013 at 11:21 PM, Raul  wrote:

> Hello, I also need to upgrade the version of jQuery to 1.9.1, I do it with
> getJavaScriptLibrarySettings (). setJQueryReference (resource), but I have
> some problems running this version with AjaxEventBehavior.
>

Please start a new thread with more details about the problem.


>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/JQuery-contribution-question-tp4658999p4659003.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: DatePicker doesn't work in the WSRP portlet

2013-05-23 Thread jhi
I forgot to mention that the Wicket version is 1.4.22.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DatePicker-doesn-t-work-in-the-WSRP-portlet-tp4659006p4659007.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



DatePicker doesn't work in the WSRP portlet

2013-05-23 Thread jhi
Hi all, 

I'm developing WicketPortlet which will be used via WSRP. I'm using GateIn
3.5 as a producer and a consumer. 

DatePicker works fine when I use portlet straight from the producer portal,
but when I try to use it via WSRP something goes wrong. It try to load
following file org.apache.wicket.extensions.yui.YuiLib/. I think it should
not do anything like that? 

Error message: 
13:32:48,528 ERROR [org.gatein.wsrp.consumer.handlers.InvocationHandler]
(http--127.0.0.1-8680-2) The portlet threw an exception:
java.io.FileNotFoundException:
http://localhost:8085/blaa-web/blaa-web/ps::!blaa.!blaa-web.blaaApplication/resources/org.apache.wicket.extensions.yui.YuiLib/
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [rt.jar:1.6.0_22] 
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[rt.jar:1.6.0_22] 
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[rt.jar:1.6.0_22] 
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[rt.jar:1.6.0_22] 
at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1496)
[rt.jar:1.6.0_22] 
at java.security.AccessController.doPrivileged(Native Method)
[rt.jar:1.6.0_22] 
at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1490)
 
... 
... 
... 
Caused by: java.io.FileNotFoundException:
http://localhost:8085/blaa-web/blaa-web/ps::!blaa.!blaa-web.blaaApplication/resources/org.apache.wicket.extensions.yui.YuiLib/
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
[rt.jar:1.6.0_22] 
at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2301)
[rt.jar:1.6.0_22] 
at java.net.URLConnection.getContentType(URLConnection.java:485)
[rt.jar:1.6.0_22] 
at
org.gatein.wsrp.consumer.handlers.DirectResourceServingHandler.performRequest(DirectResourceServingHandler.java:77)
[wsrp-consumer-2.2.0.Final.jar:2.2.0.Final] 
... 72 more 

HTML: 


Does anyone have some ideas how this can be fixed?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DatePicker-doesn-t-work-in-the-WSRP-portlet-tp4659006.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Dirk Forchel
Unfortunately I can not build the package. Any help would be appreciated.

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test (default-test) on
project wicket-core: There are test failures.
[ERROR]
[ERROR] Please refer to
C:\projects\wicket\wicket-core\target\surefire-reports for the individual
test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test
(default-test) on project wicket-core: There are test failures.

Please refer to C:\projects\wicket\wicket-core\target\surefire-reports for
the individual test results.
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test
failures.

Please refer to C:\projects\wicket\wicket-core\target\surefire-reports for
the individual test results.
at
org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:83)
at
org.apache.maven.plugin.surefire.SurefirePlugin.writeSummary(SurefirePlugin.java:185)
at
org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:159)
at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:626)
at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:587)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
... 19 more



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659004.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: JQuery contribution question

2013-05-23 Thread Raul
Hello, I also need to upgrade the version of jQuery to 1.9.1, I do it with
getJavaScriptLibrarySettings (). setJQueryReference (resource), but I have
some problems running this version with AjaxEventBehavior.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JQuery-contribution-question-tp4658999p4659003.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Issue in 6.8.0 - Form with CompoundPropertyModel and AjaxSubmitLink

2013-05-23 Thread Petr Zajac

Hi,
after fighting with registration AjaxCallListener to AjaxSubmitLink it 
works fine now. :-)


Thanks
Petr

Dne 23.5.2013 13:13, Martin Grigorov napsal(a):

Hi,

Just re-read your previous message. I see now: $submitBtn.click(function(e)
{...

So you have two listeners on 'click' event on this button. Depending on
which one is executed first the data will be send or not.
By moving this logic in onAfter() handler you can be sure that the data is
already sent when you disable the fields.


On Thu, May 23, 2013 at 1:58 PM, Petr Zajac  wrote:


Hi,
the JS is registered in
  @Override
 public void renderHead(IHeaderResponse response) {
  ClientSettings settings = new ClientSettings(getMarkupId());
   response.render(**OnDomReadyHeaderItem.**forScript("new
IJC.LoginForm(" + settings.toJson() + ");"));
 }

of panel with the form.

I'll try to do it like you proposed it.

Thanks
Petr

Dne 23.5.2013 9:05, Martin Grigorov napsal(a):


Hi Petr,

How do you register this JS execution ?
You should do it in AjaxCallListener#afterHandler because if you do it
earlier then form submit wont sent the values for disabled fields.


On Thu, May 23, 2013 at 12:39 AM, Petr Zajac 
wrote:

  Hi Martin,

thanks for the quick answer. Yes, the text fields are not empty and the
parameters in requests are also empty. I found why after small
investigation. The text fields are disabled after pressing submit button
by
using jquery in our code:

$form.find('input[type="text"]').add($form.find('input[**type=**
"password"]')).attr('disabled', true);


It looks like it's pretty danger to manipulate with input elements after
submit. Have I report this issue?

registration:

 var $form = $('form');
  var $submitBtn = $form.find('input[type="submit"]');
  if (!IJC.Utils.isDefined($submitBtn.data("ui-button"))) {

  $submitBtn.button({ icons: { primary: "ui-icon-gear",
secondary: "ui-icon-triangle-1-s" } });
  }
  $submitBtn.click(function(e) {
  $submitBtn.button("option", "label", "Connecting.." );
  $submitBtn.button("option", "icons", {
  primary : "ui-icon-clock"
  });
  $submitBtn.button("refresh");
  $submitBtn.button("disable");
// $form.find('input[type="text"]').add($form.find('input[**type=**
"password"]')).attr('disabled', true);

  });


Petr

Dne 22.5.2013 22:18, Martin Grigorov napsal(a):

  Hi,


On Wed, May 22, 2013 at 11:07 PM, Petr Zajac 
wrote:

   Hi,


when I tried to upgrade to to Wicket 6.8.0 I found probably serious
issue.
We have Form with two text fields ('username' and 'password').
We set CompoundPropertyModel and bound properties to two textfields.
The
submit button uses AjaxSubmitLink.  When I click to submit button the
the
form shows feedback that 'username' and 'password' fields cannot be
empty.
It works fine in 6.6.0 and 6.7.0 versions.

Form implementation:

form = new Form(ID_LOGIN_**FORM) {


   private static final long serialVersionUID = 1L;
   private String username;
   private String password;
   @Override
   protected void onInitialize() {
   super.onInitialize();
   setDefaultModel(new CompoundPropertyModel>(this));
   usernameTF = new RequiredTextField(ID_*

*USERNAME);

   RequiredTextField => cannot be empty


usernameTF.setOutputMarkupId(**true);


   usernameTF.add(new DefaultFocusBehavior());

   add(usernameTF);
   add(new PasswordTextField(ID_PASSWORD)**);

   PasswordTextField also has setRequired(true);


Its javadoc states this.



Do you enter data in these fields ?
If YES, then check whether it is being sent to the server (Dev Tools,
Firebug).
If you cannot find the issue then please put this code in a quickstart
app
and attach it to a ticket in Jira.


add(new AjaxSubmitLink(ID_SUBMIT_LINK, this) {


   /** */
   private static final long serialVersionUID = 1L;

   @Override
   protected void onSubmit(AjaxRequestTarget target,
Form form) {
   // process input
   }

   @Override
   protected void onError(AjaxRequestTarget target,
Form form) {
   // Method is invoked only if the input is
invalid
   target.add(getPage());
   }
   });
   }

Html of the form:

   




 
   
   
   


Petr

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

Re: JQuery contribution question

2013-05-23 Thread Martin Grigorov
Hi,

Check
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax#WicketAjax-Setup

You can contribute
JavaScriptHeaderItem.forReference(app.getJavaScriptLibrarySettings().getJQueryReference());
You can do this in a global header contributor:
app.getHeaderContributors().add(new IHeaderContributor() {...});

If there are Ajax components/behaviors then Wicket will contribute it just
once.


On Thu, May 23, 2013 at 3:11 PM, heikki  wrote:

> hello list,
>
> the way things work with Wicket-provided contributions confuses me a bit.
> I'm using Wicket 6.5.
>
> What I'd like to achieve is: a single jQuery library available in my page.
>
> Whether or not my page includes jQuery-contributing Wicket components like
> the Ajax components: I need jQuery for non-Wicket-related clientside stuff
> too.
>
> Ideally a jQuery version of my choice, not contributed by Wicket but a
> simple local or remote link, although if it's more easy to simply always
> contribute jQuery through Wicket that would be fine too.
>
> Any suggestions ?
>
> Kind regards,
> Heikki Doeleman
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/JQuery-contribution-question-tp4658999.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
>
>


JQuery contribution question

2013-05-23 Thread heikki
hello list,

the way things work with Wicket-provided contributions confuses me a bit.
I'm using Wicket 6.5.

What I'd like to achieve is: a single jQuery library available in my page. 

Whether or not my page includes jQuery-contributing Wicket components like
the Ajax components: I need jQuery for non-Wicket-related clientside stuff
too.

Ideally a jQuery version of my choice, not contributed by Wicket but a
simple local or remote link, although if it's more easy to simply always
contribute jQuery through Wicket that would be fine too. 

Any suggestions ?

Kind regards,
Heikki Doeleman



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JQuery-contribution-question-tp4658999.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Issue in 6.8.0 - Form with CompoundPropertyModel and AjaxSubmitLink

2013-05-23 Thread Martin Grigorov
Hi,

Just re-read your previous message. I see now: $submitBtn.click(function(e)
{...

So you have two listeners on 'click' event on this button. Depending on
which one is executed first the data will be send or not.
By moving this logic in onAfter() handler you can be sure that the data is
already sent when you disable the fields.


On Thu, May 23, 2013 at 1:58 PM, Petr Zajac  wrote:

> Hi,
> the JS is registered in
>  @Override
> public void renderHead(IHeaderResponse response) {
>  ClientSettings settings = new ClientSettings(getMarkupId());
>   response.render(**OnDomReadyHeaderItem.**forScript("new
> IJC.LoginForm(" + settings.toJson() + ");"));
> }
>
> of panel with the form.
>
> I'll try to do it like you proposed it.
>
> Thanks
> Petr
>
> Dne 23.5.2013 9:05, Martin Grigorov napsal(a):
>
>> Hi Petr,
>>
>> How do you register this JS execution ?
>> You should do it in AjaxCallListener#afterHandler because if you do it
>> earlier then form submit wont sent the values for disabled fields.
>>
>>
>> On Thu, May 23, 2013 at 12:39 AM, Petr Zajac 
>> wrote:
>>
>>  Hi Martin,
>>> thanks for the quick answer. Yes, the text fields are not empty and the
>>> parameters in requests are also empty. I found why after small
>>> investigation. The text fields are disabled after pressing submit button
>>> by
>>> using jquery in our code:
>>>
>>> $form.find('input[type="text"]').add($form.find('input[**type=**
>>> "password"]')).attr('disabled', true);
>>>
>>>
>>> It looks like it's pretty danger to manipulate with input elements after
>>> submit. Have I report this issue?
>>>
>>> registration:
>>>
>>> var $form = $('form');
>>>  var $submitBtn = $form.find('input[type="submit"]');
>>>  if (!IJC.Utils.isDefined($submitBtn.data("ui-button"))) {
>>>
>>>  $submitBtn.button({ icons: { primary: "ui-icon-gear",
>>> secondary: "ui-icon-triangle-1-s" } });
>>>  }
>>>  $submitBtn.click(function(e) {
>>>  $submitBtn.button("option", "label", "Connecting.." );
>>>  $submitBtn.button("option", "icons", {
>>>  primary : "ui-icon-clock"
>>>  });
>>>  $submitBtn.button("refresh");
>>>  $submitBtn.button("disable");
>>> // $form.find('input[type="text"]').add($form.find('input[**type=**
>>> "password"]')).attr('disabled', true);
>>>
>>>  });
>>>
>>>
>>> Petr
>>>
>>> Dne 22.5.2013 22:18, Martin Grigorov napsal(a):
>>>
>>>  Hi,


 On Wed, May 22, 2013 at 11:07 PM, Petr Zajac 
 wrote:

   Hi,

> when I tried to upgrade to to Wicket 6.8.0 I found probably serious
> issue.
> We have Form with two text fields ('username' and 'password').
> We set CompoundPropertyModel and bound properties to two textfields.
> The
> submit button uses AjaxSubmitLink.  When I click to submit button the
> the
> form shows feedback that 'username' and 'password' fields cannot be
> empty.
> It works fine in 6.6.0 and 6.7.0 versions.
>
> Form implementation:
>
> form = new Form(ID_LOGIN_**FORM) {
>
>
>   private static final long serialVersionUID = 1L;
>   private String username;
>   private String password;
>   @Override
>   protected void onInitialize() {
>   super.onInitialize();
>   setDefaultModel(new CompoundPropertyModel LoginFormPanel>>(this));
>   usernameTF = new RequiredTextField(ID_*
>
> *USERNAME);
>
>   RequiredTextField => cannot be empty
>

usernameTF.setOutputMarkupId(**true);

>   usernameTF.add(new DefaultFocusBehavior());
>
>   add(usernameTF);
>   add(new PasswordTextField(ID_PASSWORD)**);
>
>   PasswordTextField also has setRequired(true);
>
 Its javadoc states this.



 Do you enter data in these fields ?
 If YES, then check whether it is being sent to the server (Dev Tools,
 Firebug).
 If you cannot find the issue then please put this code in a quickstart
 app
 and attach it to a ticket in Jira.


add(new AjaxSubmitLink(ID_SUBMIT_LINK, this) {

>   /** */
>   private static final long serialVersionUID = 1L;
>
>   @Override
>   protected void onSubmit(AjaxRequestTarget target,
> Form form) {
>   // process input
>   }
>
>   @Override
>   protected void onError(AjaxRequestTarget target,
> Form form) {
>   // Method is invoked only if the input is
> invalid
>

Re: Issue in 6.8.0 - Form with CompoundPropertyModel and AjaxSubmitLink

2013-05-23 Thread Petr Zajac

Hi,
the JS is registered in
 @Override
public void renderHead(IHeaderResponse response) {
 ClientSettings settings = new ClientSettings(getMarkupId());
  response.render(OnDomReadyHeaderItem.forScript("new 
IJC.LoginForm(" + settings.toJson() + ");"));

}

of panel with the form.

I'll try to do it like you proposed it.

Thanks
Petr

Dne 23.5.2013 9:05, Martin Grigorov napsal(a):

Hi Petr,

How do you register this JS execution ?
You should do it in AjaxCallListener#afterHandler because if you do it
earlier then form submit wont sent the values for disabled fields.


On Thu, May 23, 2013 at 12:39 AM, Petr Zajac  wrote:


Hi Martin,
thanks for the quick answer. Yes, the text fields are not empty and the
parameters in requests are also empty. I found why after small
investigation. The text fields are disabled after pressing submit button by
using jquery in our code:

$form.find('input[type="text"]**').add($form.find('input[type=**
"password"]')).attr('disabled'**, true);

It looks like it's pretty danger to manipulate with input elements after
submit. Have I report this issue?

registration:

var $form = $('form');
 var $submitBtn = $form.find('input[type="**submit"]');
 if (!IJC.Utils.isDefined($**submitBtn.data("ui-button"))) {
 $submitBtn.button({ icons: { primary: "ui-icon-gear",
secondary: "ui-icon-triangle-1-s" } });
 }
 $submitBtn.click(function(e) {
 $submitBtn.button("option", "label", "Connecting.." );
 $submitBtn.button("option", "icons", {
 primary : "ui-icon-clock"
 });
 $submitBtn.button("refresh");
 $submitBtn.button("disable");
// $form.find('input[type="text"]**').add($form.find('input[type=**
"password"]')).attr('disabled'**, true);
 });


Petr

Dne 22.5.2013 22:18, Martin Grigorov napsal(a):


Hi,


On Wed, May 22, 2013 at 11:07 PM, Petr Zajac 
wrote:

  Hi,

when I tried to upgrade to to Wicket 6.8.0 I found probably serious
issue.
We have Form with two text fields ('username' and 'password').
We set CompoundPropertyModel and bound properties to two textfields. The
submit button uses AjaxSubmitLink.  When I click to submit button the the
form shows feedback that 'username' and 'password' fields cannot be
empty.
It works fine in 6.6.0 and 6.7.0 versions.

Form implementation:

form = new Form(ID_LOGIN_FORM) {

  private static final long serialVersionUID = 1L;
  private String username;
  private String password;
  @Override
  protected void onInitialize() {
  super.onInitialize();
  setDefaultModel(new CompoundPropertyModel>(this));
  usernameTF = new RequiredTextField(ID_***
*USERNAME);

  RequiredTextField => cannot be empty


   usernameTF.setOutputMarkupId(true);

  usernameTF.add(new DefaultFocusBehavior());

  add(usernameTF);
  add(new PasswordTextField(ID_PASSWORD));

  PasswordTextField also has setRequired(true);

Its javadoc states this.



Do you enter data in these fields ?
If YES, then check whether it is being sent to the server (Dev Tools,
Firebug).
If you cannot find the issue then please put this code in a quickstart app
and attach it to a ticket in Jira.


   add(new AjaxSubmitLink(ID_SUBMIT_LINK, this) {

  /** */
  private static final long serialVersionUID = 1L;

  @Override
  protected void onSubmit(AjaxRequestTarget target,
Form form) {
  // process input
  }

  @Override
  protected void onError(AjaxRequestTarget target,
Form form) {
  // Method is invoked only if the input is
invalid
  target.add(getPage());
  }
  });
  }

Html of the form:
   
  



 
  
  
  


Petr

--**
--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.org

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




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





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



Re: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Martin Grigorov
On Thu, May 23, 2013 at 1:18 PM, Dirk Forchel wrote:

> A simple quickstart application running with Wicket 6.8.0 and Jetty and two
> mounted pages (stateless?) do not trigger the problem. It might be more
> difficult to figure out what causes the redirect. Any hint?
>

Clone Wicket code locally and with git bisect you can find which commit
caused the change in the behavior in your app.


>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4658993.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Dirk Forchel
A simple quickstart application running with Wicket 6.8.0 and Jetty and two
mounted pages (stateless?) do not trigger the problem. It might be more
difficult to figure out what causes the redirect. Any hint?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4658993.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Sven Meier
Please attach a quickstart to a new jira issue showing the difference 
between 6.7.0 and 6.8.0.


Thanks
Sven

On 05/23/2013 11:41 AM, Dirk Forchel wrote:

For security reasons we've added a filter to our web application which
invalidates session if the session ID is exposed in the URL (disable
JSessionID URL encoding). We only accept HttpSession creation if the user
allows cookies. But this may be a problem for web crawlers (e.g. Google
bot), as they do not use cookies.
With Wicket 6.7.0 we did not have any problem as no page version has been
added to bookmarkable URLs by default (no redirect) as long as no form
submits occured. Which is sufficient because web crawlers can index the
site. After upgrading to Wicket 6.8.0 the page version number is added for
each bookmarkable page request and we can not display any page if cookies
and Javascript are deactivated in the browser. This results in an endless
loop ("The page isn't redirecting properly Firefox has detected that the
server is redirecting the request for this address in a way that will never
complete."). What causes the new behavior? What has been changed? I reckon
this relies to bug https://issues.apache.org/jira/browse/WICKET-5164. The
only solution I can think of, is to change the render strategy to
REDIRECT_TO_RENDER, as we've had the same problem with Wicket 1.5.x.
Or is there anything else I'm not being aware of?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991.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



REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Dirk Forchel
For security reasons we've added a filter to our web application which
invalidates session if the session ID is exposed in the URL (disable
JSessionID URL encoding). We only accept HttpSession creation if the user
allows cookies. But this may be a problem for web crawlers (e.g. Google
bot), as they do not use cookies. 
With Wicket 6.7.0 we did not have any problem as no page version has been
added to bookmarkable URLs by default (no redirect) as long as no form
submits occured. Which is sufficient because web crawlers can index the
site. After upgrading to Wicket 6.8.0 the page version number is added for
each bookmarkable page request and we can not display any page if cookies
and Javascript are deactivated in the browser. This results in an endless
loop ("The page isn't redirecting properly Firefox has detected that the
server is redirecting the request for this address in a way that will never
complete."). What causes the new behavior? What has been changed? I reckon
this relies to bug https://issues.apache.org/jira/browse/WICKET-5164. The
only solution I can think of, is to change the render strategy to
REDIRECT_TO_RENDER, as we've had the same problem with Wicket 1.5.x. 
Or is there anything else I'm not being aware of?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991.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



[ANNOUNCE] WicketStuff 6.8.0 is released

2013-05-23 Thread Martin Grigorov
Hi,

WicketStuff core 6.8.0 based on Apache Wicket 6.8.0 is released and shortly
will be available in Maven Central.

The changelog for this release is:

Martin Tzvetanov Grigorov (5):
  [gmap3] Issue #210 - Added GIcon constructor with char parameter
  Use Wicket 6.8.0-SNAPSHOT
  Merge branch 'for-upstream2' of https://github.com/wickeria/core into
wickeria-for-upstream2
  [stateless] Import Jolira's stateless components
  release 6.8.0

Horsed (4):
  Project UrlFragment added: Components for reading and writing URL
fragment parameters
  Project UrlFragment added: Components for reading and writing URL
fragment parameters
  changed fragment writing API of bookmarkable components in order to
better encapsulate the corresponding JavaScripts and support custom
fragment updating strategies
  [urlfragment] added method for replacing window.location.hash with a
key-value-pair

dan (3):
  sitemap-xml upgrade to wicket 6
  sitemap-xml upgrade to wicket 6
  sitemap-xml pom artefactId fix

reiern70 (3):
  https://github.com/wicketstuff/core/issues/215. Utility methods to
  trigger events on map.
  added start class to make it easier testing/developing
  Merge branch 'master' of https://github.com/wicketstuff/core.git

Martin Grigorov (2):
  Merge pull request #210 from rbalent/feature
  Merge pull request #214 from seyyaw/master

Nadeem Mohammad (2):
  Fix for issue 205
  Enhance as per 216

Robert Balent (1):
  Issue #209 - Added GIcon constructor with char parameter

seyyaw (1):
  keyboard shortcuts are not working on safari. update it based on the
latest version here
http://www.openjs.com/scripts/events/keyboard_shortcuts/

svenmeier (1):
  added wicketstuff-lazymodel to modules

The WicketStuff team


Re: Revisit WICKET-2684?

2013-05-23 Thread Martin Grigorov
Hi,

You can
override org.apache.wicket.model.CompoundPropertyModel#propertyExpression
and use something else, not the component id.


On Wed, May 22, 2013 at 4:49 PM, John Krasnay  wrote:

> WICKET-2684 is titled 'Provide a way to disable "Child component has a
> non-safe child id"'. It was closed as "invalid", but I think I have a
> use-case that wasn't considered when it was closed.
>
> In our application we're moving to an approach of building most of our UI
> by adding panels to RepeatingViews. This allows us to build our pages
> without creating HTML files for each page, making it easy to keep HTML
> patterns consistent across the app.
>
> As part of this strategy we've implemented a series of panels that each
> house a single input control and it's associated label. We might build a
> form like this:
>
> ---
> FormPanel form = new FormPanel(newPanelId(), new CompoundPropertyModel(**
> empModel));
> addPanel(form);
> form.addPanel(new TextFieldPanel("firstName"));
> form.addPanel(new TextFieldPanel("lastName"));
> ---
>
> "addPanel(...)" is a method we implement on our pages and container panels
> that simply adds the given component to a RepeatingView on the parent. The
> non-numeric child ID warning would be triggered twice here, for the text
> field panels, but these IDs are required for the example to work with
> CompoundPropertyModel.
>
> BTW to use CompoundPropertyModel as shown above, we've created something
> called a DelegateModel:
>
> ---
> public class DelegateModel implements IModel {
>
> private Component component;
>
> public DelegateModel(Component component) {
> this.component = component;
> }
> public T getObject() {
> IModel model = (IModel) component.getDefaultModel();
> return model != null ? model.getObject() : null;
> }
> public void setObject(T object) {
> IModel model = (IModel) component.getDefaultModel();
> if (model != null) {
> model.setObject(object);
> }
> }
> }
> ---
>
> We then create our TextFieldPanel like this:
>
> ---
> public TextFieldPanel(String id) {
> this(id, null);
> }
> public TextFieldPanel(String id, IModel model) {
> super(id, model);
> add(new TextField("field", new DelegateModel(this)));
> }
> ---
>
> This seems to work well, except for the slew of warnings about non-safe
> child IDs.
>
> In WICKET-2684, Igor advised to "use a low-level repeater where you have
> total control - RepeatingView", which we're doing, but later warned "you do
> realize that if you use nonnumeric ids some things will break".
>
> So I have two questions:
>
> 1. Is this use-case enough to re-open WICKET-2684 to remove the warning
> (or at least relocate it if, for example, ListView depends on it)? Or
> should I just silence the warning in my log4j config and move on?
> 2. Is there really something in AbstractRepeater/RepeatingView that
> depends on numeric IDs? I can't see anything myself, but I'd like to know
> in case it interferes with our panel-based approach.
>
> Thanks and sorry for the longish post.
>
> jk
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: when i click the link quickly in my page,then will show the wrong page

2013-05-23 Thread Martin Grigorov
Hi,

Check your server logs.
Most probably the current page is not stored due to some error, e.g. not
serializable object in the page.


On Thu, May 23, 2013 at 8:56 AM, fan wang  wrote:

> in my project,i have a menu in my page,but when i click the menu
> quickly,the
> will show the wrong page,,
>
> Page Expired
>
> The page you requested has expired.
>
> Return to home page
>
> THX
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/when-i-click-the-link-quickly-in-my-page-then-will-show-the-wrong-page-tp4658982.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Component:continueToOriginalDestination to pass parameters to original page

2013-05-23 Thread Martin Grigorov
Hi,

No. At the moment there is no such API.
The collected parameters during the interception will be used.


On Thu, May 23, 2013 at 8:24 AM, glidek  wrote:

> When Component:continueToOriginalDestination() is called, is there a way to
> pass parameters to the original destination Wicket is redirecting to?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Component-continueToOriginalDestination-to-pass-parameters-to-original-page-tp4658981.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Issue in 6.8.0 - Form with CompoundPropertyModel and AjaxSubmitLink

2013-05-23 Thread Martin Grigorov
Hi Petr,

How do you register this JS execution ?
You should do it in AjaxCallListener#afterHandler because if you do it
earlier then form submit wont sent the values for disabled fields.


On Thu, May 23, 2013 at 12:39 AM, Petr Zajac  wrote:

> Hi Martin,
> thanks for the quick answer. Yes, the text fields are not empty and the
> parameters in requests are also empty. I found why after small
> investigation. The text fields are disabled after pressing submit button by
> using jquery in our code:
>
> $form.find('input[type="text"]**').add($form.find('input[type=**
> "password"]')).attr('disabled'**, true);
>
> It looks like it's pretty danger to manipulate with input elements after
> submit. Have I report this issue?
>
> registration:
>
>var $form = $('form');
> var $submitBtn = $form.find('input[type="**submit"]');
> if (!IJC.Utils.isDefined($**submitBtn.data("ui-button"))) {
> $submitBtn.button({ icons: { primary: "ui-icon-gear",
> secondary: "ui-icon-triangle-1-s" } });
> }
> $submitBtn.click(function(e) {
> $submitBtn.button("option", "label", "Connecting.." );
> $submitBtn.button("option", "icons", {
> primary : "ui-icon-clock"
> });
> $submitBtn.button("refresh");
> $submitBtn.button("disable");
> // $form.find('input[type="text"]**').add($form.find('input[type=**
> "password"]')).attr('disabled'**, true);
> });
>
>
> Petr
>
> Dne 22.5.2013 22:18, Martin Grigorov napsal(a):
>
>> Hi,
>>
>>
>> On Wed, May 22, 2013 at 11:07 PM, Petr Zajac 
>> wrote:
>>
>>  Hi,
>>> when I tried to upgrade to to Wicket 6.8.0 I found probably serious
>>> issue.
>>> We have Form with two text fields ('username' and 'password').
>>> We set CompoundPropertyModel and bound properties to two textfields. The
>>> submit button uses AjaxSubmitLink.  When I click to submit button the the
>>> form shows feedback that 'username' and 'password' fields cannot be
>>> empty.
>>> It works fine in 6.6.0 and 6.7.0 versions.
>>>
>>> Form implementation:
>>>
>>> form = new Form(ID_LOGIN_FORM) {
>>>
>>>  private static final long serialVersionUID = 1L;
>>>  private String username;
>>>  private String password;
>>>  @Override
>>>  protected void onInitialize() {
>>>  super.onInitialize();
>>>  setDefaultModel(new CompoundPropertyModel>> LoginFormPanel>>(this));
>>>  usernameTF = new RequiredTextField(ID_***
>>> *USERNAME);
>>>
>>>  RequiredTextField => cannot be empty
>>
>>
>>   usernameTF.setOutputMarkupId(true);
>>>  usernameTF.add(new DefaultFocusBehavior());
>>>
>>>  add(usernameTF);
>>>  add(new PasswordTextField(ID_PASSWORD));
>>>
>>>  PasswordTextField also has setRequired(true);
>> Its javadoc states this.
>>
>>
>>
>> Do you enter data in these fields ?
>> If YES, then check whether it is being sent to the server (Dev Tools,
>> Firebug).
>> If you cannot find the issue then please put this code in a quickstart app
>> and attach it to a ticket in Jira.
>>
>>
>>   add(new AjaxSubmitLink(ID_SUBMIT_LINK, this) {
>>>  /** */
>>>  private static final long serialVersionUID = 1L;
>>>
>>>  @Override
>>>  protected void onSubmit(AjaxRequestTarget target,
>>> Form form) {
>>>  // process input
>>>  }
>>>
>>>  @Override
>>>  protected void onError(AjaxRequestTarget target,
>>> Form form) {
>>>  // Method is invoked only if the input is
>>> invalid
>>>  target.add(getPage());
>>>  }
>>>  });
>>>  }
>>>
>>> Html of the form:
>>>   
>>>  >>
>>> />  >>  wicket:id="username" />  
>>> >>  key="LoginFormPanel.lbPassword" />
>>> 
>>>
>>>  
>>>  
>>>  >>
>>> class="ui-button-process"
>>>  wicket:id="submitLink" />
>>>  
>>>
>>>
>>> Petr
>>>
>>> --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org
>>> 
>>> >
>>>
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>