Re: Remove pageparameters

2010-03-22 Thread Jens Alenius

Have a look at this. Mayby it helps
http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html
Jens


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



Re: Remove pageparameters

2010-03-22 Thread Jens Alenius

Sigmar Muuga skrev:

Hello,
another issue with wicket:
how to remove page parameters?
Lets say I set parameter like this: ?do=something

Now I navigate through my site and when I call setResponsePage for that
particular page, all these parameters appear also on the address bar. I dont
want them there and does anybody know, how to remve them or set them "not
stored"?

  
I dont use pageparameters. I'm using parameters on in the page 
constructor instead.

Jens


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



Re: modal in a modal problem

2010-02-15 Thread Jens Alenius

Martin Asenov skrev:

Does anyone know? Please, people, I'm getting despaired of this...

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Friday, February 12, 2010 10:23 AM

To: users@wicket.apache.org
Subject: RE: modal in a modal problem

I forgot to mention that the first time I click yes, I get:

confirmation dialog called
yes button clicked

in console, and the conf dialog closes itself. when I open it for second time, 
I get
confirmation dialog called
yes button clicked
removal supposed to be called

and the item really gets removed, but why triggering it twice?

Thanks in advance!

From: Martin Asenov
Sent: Friday, February 12, 2010 10:20 AM
To: 'users@wicket.apache.org'
Subject: modal in a modal problem

Hello, everyone!

I experience a problem when triggering a modal window from another modal 
window. When a removal icon is clicked in the first modal, there's a 
confirmation dialog, that pops up. Although I've set everything up, the 
windowClosedCallback gets activated only when I confirm removal twice. I have 
no idea why it happens this way. The confirmation dialog works fine for all 
RepeaterHoldingPage-s I have, excluding the one I have placed in another modal. 
Here's the code of the conf dialog:

   public ConfirmationDialog(String question, final ModalWindow parent, 
final RepeaterHoldingPage page, final Object entry) {

 System.out.println("confirmation dialog called");

 questionLabel = new Label("question", question);
 yesButton = new AjaxButton("yes_button", new 
Model(getString("yes"))) {

private static final long serialVersionUID = 1l;

@Override
protected void onSubmit(AjaxRequestTarget target, Form 
form) {
   System.out.println("yes button clicked");
   parent.setWindowClosedCallback(new 
ModalWindow.WindowClosedCallback() {

  private static final long serialVersionUID = 
1L;

  @Override
  public void onClose(AjaxRequestTarget target) 
{
page.removeItem(entry, target);
System.out.println("removal supposed to be 
called");
  }
   });

   parent.close(target);
}
 };

What happens is that I trigger the conf dialog, press the 'yes' button and in 
the console the following gets printed:
confirmation dialog called;


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

  
Are you using pagecreator with page or adding a panel as a content. I 
have found some problems with the AjaxRequestTarget when working with 
pagecreator. It will have a source form another page and might not 
update the destination page.

Jens


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



Different xml property filename for the markup and java

2009-06-03 Thread Jens Alenius
I would like to have two different webpages sharing the same xml 
property file. That could be solved be letting one of the markups

point to the others property file. Does anyone know if it is possible?

History
We got a core project and then we have different projects for different 
customers. We cant place all the propertys in the core's
Application.xml because it would add customers propertys in the core. 
And the Application.xml would become to large.
Im trying to solve the problem by letting the customers have there own 
base webpage where the xml properties could be located. The problem is 
just that I have to type of base
webpages and I dont want to extend two differnt webpages for each 
customer. If these two webpages could sher the same xml property file it 
would be nicer.

Mayby some one else have a better Idea for this problem?
Jens Alenius


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



AjaxResponse with control characters is not validated

2009-05-07 Thread Jens Alenius

Hi.
Found something that might be a wicket ajax bug.
This code wont work in Firefox and we believe that its the Ajax xml 
response that is invalid.
The control characters is not properly escaped. Ex: "\u0014" is written 
as 0014 in the xml Ajax Response but should be .

See: http://www.w3.org/TR/REC-xml/#dt-charref.

This code wont work in firefox

Markup:
...

   
   Submit

...


   Java:
  
   final Label testLabel = new Label("testValue",themodel);
   testLabel.setOutputMarkupId(true);
   add(testLabel);
   Form testForm = new Form("testform");
   testForm.add(new AjaxButton("testSubmit"){

   @Override
   protected void onSubmit(AjaxRequestTarget pTarget, Form 
pForm) {

   themodel.setObject("\u0014");
  
   pTarget.addComponent(testLabel);
   }   
      
   });

   add(testForm);
   ...

Jens Alenius


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



IE7 and file upload inside a wizard

2009-05-05 Thread Jens Alenius
Hi. Im having some problems with IE 7 and the UploadProgressBar in a 
Wizard. It seems to have some limits in my special case.

Inside my WizardStep constuctor I have this code:

 public class MyWizardStep(SomeValues){
   super(SomeValues);
   setOutputMarkupId(true);
   Form uploadForm = new Form("uploadForm");
   uploadForm.setMultiPart(true);
   add(uploadForm);
   
   FileUploadField fileUploadField = new FileUploadField("filefield", 
new Model());

   uploadForm.add(mFileUploadField);
   
   uploadForm.add(new UploadProgressBar("progress", uploadForm));


   SubmitLink uploadlink = new SubmitLink("uploadButton") {
   @Override
   public void onSubmit() {
   System.out.println("onSubmit runs");
   }
   };
   uploadForm.add(uploadlink);
   }
   
   And the markup...
   
   

   
   
   file
   
   
  
   
   
   onmouseout="this.className='submitbutton'" 
onmouseover="this.className='submitbutton_hover'" 
wicket:id="uploadButton">Upload

   
   
   
   
   
ajax upload progressbar
   
   
   
   
   
   Works fine i firefox but it does not work in IE 7.  I get a 
javascript error (object property or method is not supported) and the 
submit wont run.

   I have noticed
   1. If I remove the UploadProgressBar it starts to work.
   2. I can also change the upload button to and  
and keep the UploadProgressBar and then it will work.
   3. If I add above code to a ordenary page(not nested form as in the 
wizard) it will also work.
   
   It seems the wicket file upload example(as in 
http://www.wicketstuff.org/wicket13/upload/single) wont work inside a 
wizard for IE 7.
   
   Does anyone have any comment on this. Have I missed something?

   Jens Alenius
 
   
   



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