Re: WicketTester and the test of image visibility

2011-02-04 Thread Dmitriy Neretin
Could you provide me a simple exmaplte how can I do that?

Thank you!

On 3 February 2011 18:33, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 visibility can be triggered from a lot of places, isvisible() only
 checks the visibility flag. the best way to test it is to see if the
 image tag appears in the rendered markup.

 -igor

 On Thu, Feb 3, 2011 at 1:16 AM, Dmitriy Neretin
 dmitriy.nere...@googlemail.com wrote:
  Hello everybody!
 
  Is the WicketTester method isVisible() the right solution to test if the
  Image is shown on the webpage?
 
  Thank you!
 

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




Re: Wicket Sessions and Load Balancing

2011-02-04 Thread Setya

Hi,

I'm experiencing the same problem, only I use mod_jk. How did you solve the
problem ?

Thanks  Regards,

Setya
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Sessions-and-Load-Balancing-tp2274552p3259914.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: http 500 status on GitHub

2011-02-04 Thread Martin Funk
thank you

 

by the way, they fixed it in the meantime.

mf

Am 26.01.2011 um 21:00 schrieb Igor Vaynberg:

 works for me :/
 
 -igor
 
 On Wed, Jan 26, 2011 at 11:42 AM, Martin Funk mafulaf...@googlemail.com 
 wrote:
 Hi,
 
 anyone experiencing something similar, as I described here?
 
 http://support.github.com/discussions/site/2640-wiki-git-access-leads-to-500
 
 mf
 
 -
 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: MarkupId generation

2011-02-04 Thread Uwe Schäfer

On 02/04/2011 05:02 AM, msj121 wrote:

Well I think that all of the markup ids being output are based off of the
name  in wicket:id=name. If memory serves correct so the easiest (ie:
less obtrusive) solution is to simply change your tags.


this is only true for development mode. in deployment, id generation 
differs (it generates id1,id2...)



Of course tedious if
you already had completed your project, so perhaps overriding the code that
generates the markup id. Not sure, but an interesting question.


overriding is not an option due to this method being on Component. i do 
not want to use own components in my code. imagine smth like

add(new TextField(...){
 public String getMarkupId(boolean create){
  ...
  }
});

yuck ;)

cu uwe

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



Re: Submit form after onchange of Field

2011-02-04 Thread MattyDE

Very nice. Thanks a lot for your reply :)
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Submit-form-after-onchange-of-Field-tp3236003p3259960.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



Simplified visibility control of Enclosures in Ajax requests

2011-02-04 Thread Joo Hama
I just posted a new feature to JIRA with the topic:
Simplified visibility control of Enclosures in Ajax requests.
I also posted a patch against wicket 1.4.15 that implements
this feature.

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


Problem:

The amount of boilerplate code needed to create partitions of a web page
that take their
visibility setting from a controlling component.

Changing the visibility of a child component in Ajax callback
method will not affect the entire
enclosure but just the child component itself. This is because only
the child component is added
to the AjaxRequestTarget.
- https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html

Solution:

1. 'Inline' Enclosure tags, implemented as an attribute that can be
attached to an arbitrary html tag.
Works just like a regular Enclosure, but is Ajax ready.
2. When handling Ajax requests, Inline Enclosures that are controlled by
Components already in the Ajax
request target are automatically added to the Ajax request target.

.

Full description and patch at:
https://issues.apache.org/jira/browse/WICKET-3422


-
This mail relates to the dev thread i started two weeks
ago with the title: 'How to streamline ajax page region toggle'.

Thanks for support:
Martin Makundi
Igor Vaynberg
Jeremy Thomerson
-

- Joonas Hämäläinen


Re: double validation with two different values for a text field

2011-02-04 Thread Pedro Santos
I guess you added an IValidator to the text field validating the input for
US zip before, both remove it from the component when this is not the
country being informed, or provide an IValidator aware of the
selected country, as your textfield already are: determining the converter
to be used based on selected country.

On Thu, Feb 3, 2011 at 8:24 PM, Doug Leeper douglee...@yahoo.com wrote:

 I have created a custom zip text field that validates against several
 country
 formats, i.e. US and Canada.  I have created specific country converters
 and
 validators that are utilized by this custom zip field.

 In my test scenario, I have a valid US address displayed.

 I then change the country that has a AjaxFormComponentUpdatingBehavior
 which
 sends back the zip and state fields.  Note: zip field has a model reference
 of
 the country value which determines which validator/converter to use.

 I change the zip to be a valid Canadian zip (A#A #A#) and submit the
 changes.

 In my debug statements, I see the new value is parsed and validated with no
 error detected.

 But what is interesting, the previous US zip value is also being validated
 which
 causes an unexpected.

 Where did this zip value come from?  Did I forget to change/refresh a
 value/component?

 Any help is much appreciated.

 Thanks
 - Doug




-- 
Pedro Henrique Oliveira dos Santos


Re: AjaxLazyLoadPanel question

2011-02-04 Thread Pedro Santos
I Matt, try to decorate the AJAX javascript to show/hide the indicator using
an IAjaxCallDecorator

On Thu, Feb 3, 2011 at 5:40 PM, Matt Schmidt mschmid...@gmail.com wrote:

 I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
 including the service call to get the data.

 myLazyLoadPanel = new AjaxLazyLoadPanel(id, new CollectionModelPojo())
 {
public Component getLazyLoadComponent(String markupId) {
if(getDefaultModelObject() == null) {
setDefaultModelObject(myPojoService.readAll());
}
return new MyDataGridView(markupId, getDefaultModel()); //ignoring
 casting for simplicity
}
 }

 That works great for loading the page before the service call is complete.

 But now I need to add a DropDownChoice to change the collection in the data
 grid via Ajax after the page is loaded. Is there anyway to get the
 DataGridView to be replaced with an Ajax indicator (like on page load)
 during an Ajax onchange event for the DropDownChoice? I've added an Ajax
 indicator to the DropDownChoice, but I would like the same behavior I get
 on
 page load for the AjaxLazyLoadPanel.

 This is what I have for the drop down for starters:

 myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
if(myDropDownChoice.getModelObject().equals(foo)) {
myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
}
//check other selections
   target.addComponent(myLazyLoadPanel);
}
 }

 I may be looking at this entirely wrong... Any suggestions?




-- 
Pedro Henrique Oliveira dos Santos


Re: How to append an # anchor to an href?

2011-02-04 Thread norckon

Hi,

I'm having the exact same problem; I want an #anchor added to the URL my
Link generates, but after clicking the Link, the user is redirected to the
mount URL (with version number, '/mypage.0.2'), loosing the anchor.

Since this topic is last replied to in 2007, are there any new solutions for
this problem? My application uses the ONE_PASS_RENDER strategy and
link.setRedirect(false) doesn't help.

Thanks,
Pepijn
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-append-an-anchor-to-an-href-tp1845378p3260138.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: File upload progress bar

2011-02-04 Thread Valentin Avksentyev
So has anyone out there has been able to get the upload progress bar working?  
If so, please advise.

I definitely don't mind putting together a quickstart, are there directions for 
that anywhere?

-Valentin

On Feb 3, 2011, at 10:18 AM, Valentin Avksentyev wrote:

 No I'm testing on my own machine, with a 300Mb file, in fact Chrome gives me 
 upload feedback, but nothing from the upload progress bar.
 
 Here is the code I'm using:
 
 I'm overriding newWebRequest in my Application class:
 @Override
   protected WebRequest newWebRequest(HttpServletRequest servletRequest)
   {
   return new UploadWebRequest(servletRequest);
   }
 
 Here is the code in my upload panel class:
   FormVoid uploadform = new FormVoid(fileUploadForm) {
   @Override
   protected void onSubmit() {
   final FileUpload upload = 
 fileUploadField.getFileUpload();
   if (upload != null) {
   try {
   File newFile = new 
 File(uploadFolder, upload.getClientFileName() );
   // Save to new file
   newFile.createNewFile();
   upload.writeTo(newFile);
   _processSelection(server, 
 newFile, destFolder);
   } catch (Exception e) {
   throw new 
 RuntimeException(Unable to write file);
   }
   } else {
   throw new RuntimeException( file 
 selected for upload is empty );
   }
   }
   };
   uploadform.setMultiPart(true);
   uploadform.setMaxSize(Bytes.gigabytes(1));
 
   uploadform.add(fileUploadField = new 
 FileUploadField(fileInput));
   uploadform.add(new UploadProgressBar(progress, uploadform));
   uploadform.add( new UploadValidator(fileUploadField, prefix) );
   add( uploadform );
 
 
 On Feb 3, 2011, at 12:37 AM, Timo Schmidt wrote:
 
 On Wed 02.02.2011 23:49, Valentin Avksentyev wrote:
 On Feb 2, 2011, at 2:22 PM, Valentin Avksentyev wrote:
 
 The files get uploaded just fine in my app, but no progress
 is tracked.
 
 It's definitely hard to verify if the progress bar works in
 the example sites, with a limit of 100k, I haven't tried
 throttling my upload speed, I guess I should try that next.
 
 Any suggestions?
 
 Is your application runnning behind a proxy? If so, maybe the
 entire client request will be buffered by the proxy before
 being passed on to the backend proxied servers. As a result,
 upload progress meters will not function correctly if they work
 by measuring the data received by the backend servers.
 
 -Timo
 
 -
 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: File upload progress bar

2011-02-04 Thread moèz ben rhouma
If the example doesn't work so I  think the problem in your browser. Try to
empty the cache, cookies, histories ... and tries again.

2011/2/2 Valentin Avksentyev v...@360works.com

 Hi I've been beating my head against the wall with this.

 I'm overriding newWebRequest in my Application class:
 @Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest)
{
return new UploadWebRequest(servletRequest);
}

 Here is the code in my upload panel class:
FormVoid uploadform = new FormVoid(fileUploadForm) {
@Override
protected void onSubmit() {
final FileUpload upload =
 fileUploadField.getFileUpload();
if (upload != null) {
try {
File newFile = new
 File(uploadFolder, upload.getClientFileName() );
// Save to new file
newFile.createNewFile();
upload.writeTo(newFile);
_processSelection(server,
 newFile, destFolder);
} catch (Exception e) {
throw new
 RuntimeException(Unable to write file);
}
} else {
throw new RuntimeException( file
 selected for upload is empty );
}
}
};
uploadform.setMultiPart(true);
uploadform.setMaxSize(Bytes.gigabytes(1));

uploadform.add(fileUploadField = new
 FileUploadField(fileInput));
uploadform.add(new UploadProgressBar(progress,
 uploadform));
uploadform.add( new UploadValidator(fileUploadField, prefix)
 );
add( uploadform );


 This is based on the examples, the examples themselves are not working for
 me either:
 I tried, http://wicketstuff.org/wicket13/upload and
 http://www.wicket-library.com/wicket-examples/upload/ (the latter URL
 kinda works, it increments the remaining time but does not track the
 progress)

 What am I doing wrong

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




Re: File upload progress bar

2011-02-04 Thread James Carman
http://wicket.apache.org/start/quickstart.html

On Fri, Feb 4, 2011 at 8:17 AM, Valentin Avksentyev v...@360works.com wrote:
 So has anyone out there has been able to get the upload progress bar working? 
  If so, please advise.

 I definitely don't mind putting together a quickstart, are there directions 
 for that anywhere?

 -Valentin

 On Feb 3, 2011, at 10:18 AM, Valentin Avksentyev wrote:

 No I'm testing on my own machine, with a 300Mb file, in fact Chrome gives me 
 upload feedback, but nothing from the upload progress bar.

 Here is the code I'm using:

 I'm overriding newWebRequest in my Application class:
 @Override
   protected WebRequest newWebRequest(HttpServletRequest servletRequest)
   {
       return new UploadWebRequest(servletRequest);
   }

 Here is the code in my upload panel class:
               FormVoid uploadform = new FormVoid(fileUploadForm) {
                       @Override
                       protected void onSubmit() {
                               final FileUpload upload = 
 fileUploadField.getFileUpload();
                               if (upload != null) {
                                       try {
                                               File newFile = new 
 File(uploadFolder, upload.getClientFileName() );
                                               // Save to new file
                                               newFile.createNewFile();
                                               upload.writeTo(newFile);
                                               _processSelection(server, 
 newFile, destFolder);
                                       } catch (Exception e) {
                                               throw new 
 RuntimeException(Unable to write file);
                                       }
                               } else {
                                       throw new RuntimeException( file 
 selected for upload is empty );
                               }
                       }
               };
               uploadform.setMultiPart(true);
               uploadform.setMaxSize(Bytes.gigabytes(1));

               uploadform.add(fileUploadField = new 
 FileUploadField(fileInput));
               uploadform.add(new UploadProgressBar(progress, uploadform));
               uploadform.add( new UploadValidator(fileUploadField, prefix) );
               add( uploadform );


 On Feb 3, 2011, at 12:37 AM, Timo Schmidt wrote:

 On Wed 02.02.2011 23:49, Valentin Avksentyev wrote:
 On Feb 2, 2011, at 2:22 PM, Valentin Avksentyev wrote:

 The files get uploaded just fine in my app, but no progress
 is tracked.

 It's definitely hard to verify if the progress bar works in
 the example sites, with a limit of 100k, I haven't tried
 throttling my upload speed, I guess I should try that next.

 Any suggestions?

 Is your application runnning behind a proxy? If so, maybe the
 entire client request will be buffered by the proxy before
 being passed on to the backend proxied servers. As a result,
 upload progress meters will not function correctly if they work
 by measuring the data received by the backend servers.

 -Timo

 -
 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: Ajax wizard and page anchor

2011-02-04 Thread N. Metzger

Hi all,

as we're talking anchors today, does anybody have an idea about how to
change the anchor from the next button to the top of the page?

Also: has anybody tried to nest wizards? I'd like to have a second wizard as
one of my wizard steps. I can just experiment, but if someone has experince
with this, any input will be greatly appreciated.

Thanks!

Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-wizard-and-page-anchor-tp2223007p3260201.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



Converter for interface

2011-02-04 Thread Jan Ferko

Hi,

I wrote custom converter for entity class. convertToObject() works fine, 
but I have problem with convertToString(). Since i have different 
implementations for my entity (immutable and mutable version) I work 
with their common interface in my web layer and wicket seems not to 
recognize that it should convert entity with converter and always uses 
default converter. By the way converter is registered globally for whole 
application. Is there any way how to solve this or i have to set 
converter for each component which uses it? Thanks for help.


example:

interface IEntity {
getName();
}

class Entity implements IEntity{
getName(){};
}

interface IMutableEntity extends IEntity{
setName(String name);
}

class MutableEntity implements IMutableEntity {
getName(){};
setName(){};
}

my converter is registered for IEntity interface.

Jan


Re: Converter for interface

2011-02-04 Thread Pedro Santos
You can override the the application converter locator to return your
converter under the instanceof or Class#isAssignableFrom test.
I believe Wicket default converter locator don't do so since it can be
problematic in some cases. If the text field has the Integer type, you can't
use an the NumberConverter because it's contract probably would not specify
that it converts to Integer.

On Fri, Feb 4, 2011 at 11:54 AM, Jan Ferko julyl...@gmail.com wrote:

 Hi,

 I wrote custom converter for entity class. convertToObject() works fine,
 but I have problem with convertToString(). Since i have different
 implementations for my entity (immutable and mutable version) I work with
 their common interface in my web layer and wicket seems not to recognize
 that it should convert entity with converter and always uses default
 converter. By the way converter is registered globally for whole
 application. Is there any way how to solve this or i have to set converter
 for each component which uses it? Thanks for help.

 example:

 interface IEntity {
getName();
 }

 class Entity implements IEntity{
getName(){};
 }

 interface IMutableEntity extends IEntity{
setName(String name);
 }

 class MutableEntity implements IMutableEntity {
getName(){};
setName(){};
 }

 my converter is registered for IEntity interface.

 Jan




-- 
Pedro Henrique Oliveira dos Santos


Re: Ajax wizard and page anchor

2011-02-04 Thread Pedro Santos
On Fri, Feb 4, 2011 at 11:48 AM, N. Metzger nmetz...@odu.edu wrote:


 Hi all,

 as we're talking anchors today, does anybody have an idea about how to
 change the anchor from the next button to the top of the page?


You can override the Wizard panel and provide your html doing your layout,
you can first copy/pasty from
https://fisheye6.atlassian.com/browse/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard.html?hb=true
and
then do the customization.


 Also: has anybody tried to nest wizards? I'd like to have a second wizard
 as
 one of my wizard steps. I can just experiment, but if someone has experince
 with this, any input will be greatly appreciated.

 Thanks!

 Natalie
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Ajax-wizard-and-page-anchor-tp2223007p3260201.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




-- 
Pedro Henrique Oliveira dos Santos


Re: Ajax wizard and page anchor

2011-02-04 Thread Ernesto Reinaldo Barreiro
We have implemented a custom component that acts as a two level (steps
+ sub-steps) AJAX wizard. It was not difficult to achieve what we
wanted, so, I did not try to use the standard wizard and adapt it to
this use case. If you are interested I can clean up a bit or classes
and share them with you.

Ernesto

On Fri, Feb 4, 2011 at 2:48 PM, N. Metzger nmetz...@odu.edu wrote:

 Hi all,

 as we're talking anchors today, does anybody have an idea about how to
 change the anchor from the next button to the top of the page?

 Also: has anybody tried to nest wizards? I'd like to have a second wizard as
 one of my wizard steps. I can just experiment, but if someone has experince
 with this, any input will be greatly appreciated.

 Thanks!

 Natalie
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-wizard-and-page-anchor-tp2223007p3260201.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: File upload progress bar

2011-02-04 Thread Pedro Santos
Hi Valentin, your code looks good, please fill an ticket with an quickstar
reproducing the problem.

On Fri, Feb 4, 2011 at 11:21 AM, James Carman ja...@carmanconsulting.comwrote:

 http://wicket.apache.org/start/quickstart.html

 On Fri, Feb 4, 2011 at 8:17 AM, Valentin Avksentyev v...@360works.com
 wrote:
  So has anyone out there has been able to get the upload progress bar
 working?  If so, please advise.
 
  I definitely don't mind putting together a quickstart, are there
 directions for that anywhere?
 
  -Valentin
 
  On Feb 3, 2011, at 10:18 AM, Valentin Avksentyev wrote:
 
  No I'm testing on my own machine, with a 300Mb file, in fact Chrome
 gives me upload feedback, but nothing from the upload progress bar.
 
  Here is the code I'm using:
 
  I'm overriding newWebRequest in my Application class:
  @Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest)
{
return new UploadWebRequest(servletRequest);
}
 
  Here is the code in my upload panel class:
FormVoid uploadform = new FormVoid(fileUploadForm) {
@Override
protected void onSubmit() {
final FileUpload upload =
 fileUploadField.getFileUpload();
if (upload != null) {
try {
File newFile = new
 File(uploadFolder, upload.getClientFileName() );
// Save to new file
newFile.createNewFile();
upload.writeTo(newFile);
_processSelection(server,
 newFile, destFolder);
} catch (Exception e) {
throw new
 RuntimeException(Unable to write file);
}
} else {
throw new RuntimeException( file
 selected for upload is empty );
}
}
};
uploadform.setMultiPart(true);
uploadform.setMaxSize(Bytes.gigabytes(1));
 
uploadform.add(fileUploadField = new
 FileUploadField(fileInput));
uploadform.add(new UploadProgressBar(progress,
 uploadform));
uploadform.add( new UploadValidator(fileUploadField,
 prefix) );
add( uploadform );
 
 
  On Feb 3, 2011, at 12:37 AM, Timo Schmidt wrote:
 
  On Wed 02.02.2011 23:49, Valentin Avksentyev wrote:
  On Feb 2, 2011, at 2:22 PM, Valentin Avksentyev wrote:
 
  The files get uploaded just fine in my app, but no progress
  is tracked.
 
  It's definitely hard to verify if the progress bar works in
  the example sites, with a limit of 100k, I haven't tried
  throttling my upload speed, I guess I should try that next.
 
  Any suggestions?
 
  Is your application runnning behind a proxy? If so, maybe the
  entire client request will be buffered by the proxy before
  being passed on to the backend proxied servers. As a result,
  upload progress meters will not function correctly if they work
  by measuring the data received by the backend servers.
 
  -Timo
 
  -
  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




-- 
Pedro Henrique Oliveira dos Santos


URL generation

2011-02-04 Thread Uwe Schäfer

Hi

i am working on a wicket app which is to be included in some 3rd party 
page. the page somewhat uses a thing like $.load to include the 
wicket-generated code.
To sum up, wicket has no idea that its created page will be sliced into 
pieces and included in some other page.


any url wicket creates, is relative to the generated page, like:
http://localhost:8080/home#../../../?wicket:interface=:0:wrapper:form::IFormSubmitListener:: 
for posting a form.


is there a way to make wicket create absolute URLs instead?

cu uwe


Re: Ajax wizard and page anchor

2011-02-04 Thread N. Metzger

Thanks Pedro and Ernesto.

And yes, I'll take any code you'd like to share, no need to reinvent the
wheel :-)

Natalie
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-wizard-and-page-anchor-tp2223007p3260445.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: double validation with two different values for a text field

2011-02-04 Thread Doug Leeper

Found out the issue.  I was always returning a null value in my
converter.convertToObject().   When I returned the parsed value
correctly...everything worked fine.  With the null value, for some reason,
my underlying object model  did not set with a null value.  Very bizarre.

As far as removing validators...you can't.  I had to create a base validator
which was added to my ZipTextField and it was responsible for delegating to
correct country zip validator on the fly.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/double-validation-with-two-different-values-for-a-text-field-tp3259122p3260453.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



PageExpiredException since version 1.4.13

2011-02-04 Thread Daniel Soneira

Hi there,

I'm experiencing a weird problem that I've tried to solve for 2 days now.

After updating Wicket from 1.4.12 to the latest version (1.4.15) because 
of WICKET-3136 (JVM 1.6 crash) one particular page (bookmarkable) always 
throws
a PageExpiredException on clicking an AjaxSubmitLink. I simply start the 
application, open the page, click the link = BAM, exception!


The curious thing about this is that, if I just remove (== not add) one 
other button (from a group of 3 - all doing nearly the same thing) it works.
Those 3 buttons all subclass a nested abstract inner class inside 
another nested class of the page. Also there are a lot of buttons / menu 
items on that page.
But that one exact button is not causing the problem because I can 
remove any of those 3 buttons of the group to get it working.

2 of those buttons: GOOD
3 of those buttons: EXCEPTION

The problem also vanishes if I remove code from the buttons that 
reference the page implicitly like the following:


== CODE ==

public void onConfigure() {
super.onConfigure();
setEnabled(isFormEnabled()  isDetailObjectPersistent());
}

== == == ==

Here isFormEnabled and isDetailObjectPersistent are methods of the PAGE 
not the buttons.


Essentially it looks like there is a problem serializing the whole page, 
which is why the page map is null inside the following code block from 
WebRequestCycleProcessor.resolve:


== CODE ==
if (requestParameters.isOnlyProcessIfPathActive())
{
.
if (pageMap == null) {
processRequest = 1;
}

}

== == == ==

I've tested all versions after 1.4.12 and they all show the same 
behavior while 1.4.12 itself works for this case.
I don't think I'm able to reproduce this in a QuickStart without some 
major effort since there is a deep class hierarchy involved, but I guess 
this issue has something to do with WICKET-3108 (Problems with page maps 
stored in session). I've tried to do a QuickStart with a simple test 
page with nested classes - but that worked (sadly).


Also I'm having one @SpringBean inside the page that is used by those 
buttons which seem to cause trouble.

Maybe someone can point me in the right direction?

Because of WICKET-3136 staying with 1.4.12 unfortunately is not an 
option for us.

Any help is really appreciated.


Kind regards,
Daniel

PS: I know no one is looking forward to digging into a serialization / 
page expired problem but maybe someone has mercy and helps me out on 
this one.


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



Re: PageExpiredException since version 1.4.13

2011-02-04 Thread Zilvinas Vilutis
well it is an open source project - you can checkout source of 1.4.12
and merge the require fix on to it  build it yourself.

Should be easy if you're not planning to migrate to newer versions :)

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Fri, Feb 4, 2011 at 9:46 AM, Daniel Soneira
daniel.sone...@joyn-it.at wrote:
 Hi there,

 I'm experiencing a weird problem that I've tried to solve for 2 days now.

 After updating Wicket from 1.4.12 to the latest version (1.4.15) because of
 WICKET-3136 (JVM 1.6 crash) one particular page (bookmarkable) always throws
 a PageExpiredException on clicking an AjaxSubmitLink. I simply start the
 application, open the page, click the link = BAM, exception!

 The curious thing about this is that, if I just remove (== not add) one
 other button (from a group of 3 - all doing nearly the same thing) it works.
 Those 3 buttons all subclass a nested abstract inner class inside another
 nested class of the page. Also there are a lot of buttons / menu items on
 that page.
 But that one exact button is not causing the problem because I can remove
 any of those 3 buttons of the group to get it working.
    2 of those buttons: GOOD
    3 of those buttons: EXCEPTION

 The problem also vanishes if I remove code from the buttons that reference
 the page implicitly like the following:

 == CODE ==

 public void onConfigure() {
    super.onConfigure();
    setEnabled(isFormEnabled()  isDetailObjectPersistent());
 }

 == == == ==

 Here isFormEnabled and isDetailObjectPersistent are methods of the PAGE not
 the buttons.

 Essentially it looks like there is a problem serializing the whole page,
 which is why the page map is null inside the following code block from
 WebRequestCycleProcessor.resolve:

 == CODE ==
    if (requestParameters.isOnlyProcessIfPathActive())
    {
        .
        if (pageMap == null) {
            processRequest = 1;
        }
    
    }

 == == == ==

 I've tested all versions after 1.4.12 and they all show the same behavior
 while 1.4.12 itself works for this case.
 I don't think I'm able to reproduce this in a QuickStart without some major
 effort since there is a deep class hierarchy involved, but I guess this
 issue has something to do with WICKET-3108 (Problems with page maps stored
 in session). I've tried to do a QuickStart with a simple test page with
 nested classes - but that worked (sadly).

 Also I'm having one @SpringBean inside the page that is used by those
 buttons which seem to cause trouble.
 Maybe someone can point me in the right direction?

 Because of WICKET-3136 staying with 1.4.12 unfortunately is not an option
 for us.
 Any help is really appreciated.


 Kind regards,
 Daniel

 PS: I know no one is looking forward to digging into a serialization / page
 expired problem but maybe someone has mercy and helps me out on this one.

 -
 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: PageExpiredException since version 1.4.13

2011-02-04 Thread Pedro Santos
Hi Daniel, try to increase the application max page map number, if the
problem remains we can eliminate the WICKET-3108 as the source.

On Fri, Feb 4, 2011 at 2:46 PM, Daniel Soneira daniel.sone...@joyn-it.atwrote:

 Hi there,

 I'm experiencing a weird problem that I've tried to solve for 2 days now.

 After updating Wicket from 1.4.12 to the latest version (1.4.15) because of
 WICKET-3136 (JVM 1.6 crash) one particular page (bookmarkable) always throws
 a PageExpiredException on clicking an AjaxSubmitLink. I simply start the
 application, open the page, click the link = BAM, exception!

 The curious thing about this is that, if I just remove (== not add) one
 other button (from a group of 3 - all doing nearly the same thing) it works.
 Those 3 buttons all subclass a nested abstract inner class inside another
 nested class of the page. Also there are a lot of buttons / menu items on
 that page.
 But that one exact button is not causing the problem because I can remove
 any of those 3 buttons of the group to get it working.
2 of those buttons: GOOD
3 of those buttons: EXCEPTION

 The problem also vanishes if I remove code from the buttons that reference
 the page implicitly like the following:

 == CODE ==

 public void onConfigure() {
super.onConfigure();
setEnabled(isFormEnabled()  isDetailObjectPersistent());
 }

 == == == ==

 Here isFormEnabled and isDetailObjectPersistent are methods of the PAGE not
 the buttons.

 Essentially it looks like there is a problem serializing the whole page,
 which is why the page map is null inside the following code block from
 WebRequestCycleProcessor.resolve:

 == CODE ==
if (requestParameters.isOnlyProcessIfPathActive())
{
.
if (pageMap == null) {
processRequest = 1;
}

}

 == == == ==

 I've tested all versions after 1.4.12 and they all show the same behavior
 while 1.4.12 itself works for this case.
 I don't think I'm able to reproduce this in a QuickStart without some major
 effort since there is a deep class hierarchy involved, but I guess this
 issue has something to do with WICKET-3108 (Problems with page maps stored
 in session). I've tried to do a QuickStart with a simple test page with
 nested classes - but that worked (sadly).

 Also I'm having one @SpringBean inside the page that is used by those
 buttons which seem to cause trouble.
 Maybe someone can point me in the right direction?

 Because of WICKET-3136 staying with 1.4.12 unfortunately is not an option
 for us.
 Any help is really appreciated.


 Kind regards,
 Daniel

 PS: I know no one is looking forward to digging into a serialization / page
 expired problem but maybe someone has mercy and helps me out on this one.

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




-- 
Pedro Henrique Oliveira dos Santos


Re: URL generation

2011-02-04 Thread Erik van Oosten

Hi Uwe,

I sometimes use absolute URLs in a project. For code see
https://issues.apache.org/jira/browse/WICKET-1974

Regards,
Erik.


Op 04-02-11 16:46, Uwe Schäfer schreef:

Hi

i am working on a wicket app which is to be included in some 3rd party 
page. the page somewhat uses a thing like $.load to include the 
wicket-generated code.
To sum up, wicket has no idea that its created page will be sliced 
into pieces and included in some other page.


any url wicket creates, is relative to the generated page, like:
http://localhost:8080/home#../../../?wicket:interface=:0:wrapper:form::IFormSubmitListener:: 
for posting a form.


is there a way to make wicket create absolute URLs instead?

cu uwe



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: MarkupId generation

2011-02-04 Thread msj121

True, perhaps using .setMarkupId(someid);. I had no idea about that in
production mode, I guess I never checked, I am still somewhat surprised that
is true.

You could have an automatic listener that takes the getMarkupId(...) and
preppend, or append to the id, or do it by hand (not my favourite choice).

Perhaps, you can change the non-wicket ids? would that help? I am not sure
why there would be collisions, could you explain more? Perhaps there is a
more elegant solution, without using wicket 

Matthew


Uwe Schäfer-2 wrote:
 
 On 02/04/2011 05:02 AM, msj121 wrote:
 Well I think that all of the markup ids being output are based off of the
 name  in wicket:id=name. If memory serves correct so the easiest
 (ie:
 less obtrusive) solution is to simply change your tags.
 
 this is only true for development mode. in deployment, id generation 
 differs (it generates id1,id2...)
 
 Of course tedious if
 you already had completed your project, so perhaps overriding the code
 that
 generates the markup id. Not sure, but an interesting question.
 
 overriding is not an option due to this method being on Component. i do 
 not want to use own components in my code. imagine smth like
 add(new TextField(...){
   public String getMarkupId(boolean create){
...
}
 });
 
 yuck ;)
 
 cu uwe
 
 -
 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://apache-wicket.1842946.n4.nabble.com/MarkupId-generation-tp3258525p3260937.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



[WUG DK] Wicket User Group DK

2011-02-04 Thread nino martinez wael
Hi

Im thinking on hosting a wicket user group event, in DK Farum...

Would anyone be interested..?

regards Nino