RE: Validation errors

2010-01-21 Thread Riccardo Trombini
Great thank you very much !

-Original Message-
From: Stefan Droog [mailto:sdr...@educator.eu] 
Sent: Donnerstag, 21. Januar 2010 17:13
To: users@wicket.apache.org
Subject: RE: Validation errors

Try

form.error(getString("error.SolrConnectionFault"));

-Original Message-
From: Riccardo Trombini [mailto:riccardo.tromb...@csnc.ch]
Sent: Thursday, January 21, 2010 5:09 PM
To: users@wicket.apache.org
Subject: Validation errors

Hi



I have problems with FormValidation. Everything works perfect till
Wicket has to promt the Errormessages.

Something with the localization went wrong, instead of the message I
receive : "[ValidationError message=[null],
keys=[error.SolrConnectionFault], variables=[null]]"



I use a FeedbackPanel which is added to a form.



final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");

feedbackPanel.setOutputMarkupId(true);

searchForm.add(feedbackPanel);



AjaxButton searchbutton = new AjaxButton("searchbutton", new
PropertyModel(dataContainer, "visible")) {



protected void onError(AjaxRequestTarget target, Form
arg1) {

  target.addComponent(feedbackPanel);

}



@Override

protected void onSubmit(AjaxRequestTarget target, Form
form) {

  ...

  form.error(new
ValidationError().addMessageKey("error.SolrConnectionFault"));

  

}

};


The information contained in this communication is confidential,
intended solely for the use of the individual or entity to whom it is
addressed and may be legally privileged and protected by professional
secrecy. Access to this message by anyone else is unauthorized. If you
are not the intended recipient, any disclosure, copying, or distribution
of the message, or any action or omission taken by you in reliance on it
is prohibited and may be unlawful. Please immediately contact the sender
if you have received this message in error. This email does not
constitute any commitment from Cordys Holding BV or any of its
subsidiaries except when expressly agreed in a written agreement between
the intended recipient and Cordys Holding BV or its subsidiaries. Cordys
is neither liable for the proper and complete transmission of the
information contained in this communication nor for any delay in its
receipt. Cordys does not guarantee that the integrity of this
communication has been maintained nor that the communication is free of
viruses, interceptions or interference. If you are not the intended
recipient of this communication please return the communication to the
sender and delete and destroy all copies.

-
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: Graphs, Charts and Wicket

2010-01-21 Thread Fernando Wermus
The code to make swfObject to work into a Modal Window

if (AjaxRequestTarget.get() != null){

AjaxRequestTarget.get().appendJavascript(js);

 }


shoudnt be by default?


if there is no modal window, it will work too.


On Wed, Feb 11, 2009 at 8:27 PM, PY  wrote:

>
> The javascript is done in the SWFObject.
>
> To make it work in a Ajax request you need to add :
>if (AjaxRequestTarget.get() != null){
>   AjaxRequestTarget.get().appendJavascript(js);
>}
>
> where js is the javascript generated .
> This will make evaluate the javascript and therefore add the flash object.
>
> -PY
>
> Thies Edeling-2 wrote:
> >
> > Works nicely but how to initialize the chart when the panel is loaded
> > through an ajax req/res ? Is there a javascript method that writes out
> the
> > Flash object tag ? That seems to be completely missing.
> >
> > On Mon, Feb 2, 2009 at 10:28 AM, Maarten Bosteels
> > wrote:
> >
> >> Also have a look at
> >> http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html
> >>
> >> Maarten
> >>
> >> On Thu, Jan 29, 2009 at 2:45 PM, newbieabc  wrote:
> >>
> >> >
> >> > If you don't mind, could you post your code to display the chart you
> >> used?
> >> > I was interested the gradient fill chart they offered, but am really
> >> new
> >> to
> >> > wicket and didn't understand how to add it in wicket.
> >> >
> >> > Thanks!
> >> >
> >> >
> >> > Jurek Piasek wrote:
> >> > >
> >> > > I have been using Amcharts
> >> > >
> >> > > http://www.amcharts.com/
> >> > >
> >> > > together with SWFObject
> >> > >
> >> >
> >>
> http://cwiki.apache.org/WICKET/creating-a-behavior-to-use-a-javascript-library.html
> >> > >
> >> > > Regards,
> >> > > Jurek
> >> > >
> >> > >
> >> > > On Sun, Nov 16, 2008 at 8:20 PM, Yazbek, Daniel (Daniel)
> >> > > wrote:
> >> > >
> >> > >> Hi all,
> >> > >>
> >> > >>
> >> > >>
> >> > >> I'd like to put some simple bar graphs, pie graphs and possible
> line
> >> > >> graphs into my wicket pages.
> >> > >>
> >> > >>
> >> > >>
> >> > >> Have any of you used a good framework that you can recommend, that
> >> also
> >> > >> plays nicely with Wicket?
> >> > >>
> >> > >>
> >> > >>
> >> > >> Thanks!
> >> > >>
> >> > >>
> >> > >>
> >> > >> -Daniel.
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >>
> >> > >
> >> > >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://www.nabble.com/Graphs%2C-Charts-and-Wicket-tp20532374p21727142.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
> >> >
> >> >
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Graphs%2C-Charts-and-Wicket-tp20532374p21965728.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
>
>


-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: How to get Log Level: DEBUG?

2010-01-21 Thread Andrew Lombardi
you should modify it in your log4j.properties file.  If you're using the 
default maven generated project it would be in src/main/resources

On Jan 21, 2010, at 9:59 PM, Tony Wu wrote:

> Can someone point me in the right direction for setting the default console
> log output to include DEBUG level messages? It's currently showing INFO and
> WARN only. I'm using the default maven generated project. Can I do something
> like System.setProperty("org.apache.wicket.level", "DEBUG"); in
> WicketApplication's init() - I tried that but it didn't seem to work?
> 
> Thanks,
> Tony


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



How to get Log Level: DEBUG?

2010-01-21 Thread Tony Wu
Can someone point me in the right direction for setting the default console
log output to include DEBUG level messages? It's currently showing INFO and
WARN only. I'm using the default maven generated project. Can I do something
like System.setProperty("org.apache.wicket.level", "DEBUG"); in
WicketApplication's init() - I tried that but it didn't seem to work?

Thanks,
Tony


Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-21 Thread Steve Swinsburg
Thanks Sven, that works nicely.

Now if only the iframe this panel loads in was in was being resized 
appropriately after the panel loads its contents

cheers,
Steve


On 21/01/2010, at 10:55 PM, Steve Swinsburg wrote:

> If it was my own Panel class then I would add the extra markup. But I am 
> using the built in AjaxLazyLoadPanel class and was hoping to just override it 
> easily.
> 
> Looks like I'll extend it as per Sven's suggestion below.
> 
> cheers,
> Steve
> 
> 
> 
> On 21/01/2010, at 6:37 PM, svenmeier wrote:
> 
>> 
>> class SomePanel extends Panel implements IHeaderContributor
>> {
>>   public SomePanel(String id)
>>   {
>>   super(id);
>>   }
>> 
>>   public void renderHead(IHeaderResponse response)
>>   {
>>   response.renderOnDomReadyJavascript("alert('hello');");
>>   }
>> }
>> 
>> Sven
>> 
>> 
>> Steve Swinsburg-3 wrote:
>>> 
>>> Hi Lionel,
>>> 
>>> Thanks and yes, thats what I am trying to do, attach some javascript after
>>> something has rendered. So I attached an AjaxEventBehaviour to it and now
>>> have this:
>>> 
>>> add(new AjaxLazyLoadPanel("myPanel") {
>>> 
>>> @Override
>>>public Component getLazyLoadComponent(String markupId) {
>>> return new SomePanel(markupId);
>>>}
>>> }.add(new AjaxEventBehavior("onload"){
>>>   protected void onEvent(AjaxRequestTarget target){
>>> target.appendJavascript("alert('hello)';");
>>>   }
>>> }));
>>> 
>>> but the javascript is never fired.
>>> 
>>> Any more ideas?
>>> 
>>> cheers,
>>> Steve
>>> 
>>> 
>>> On 21/01/2010, at 3:09 PM, Lionel Port wrote:
>>> 
 Hi Steve,
 
 Are you trying to do this..
 
 http://cwiki.apache.org/WICKET/adding-javascript-from-wicket.html
 
 with an onload event instead of onblur, or do I misunderstand.
 
 regards,
 Lionel
 
 On Thu, Jan 21, 2010 at 2:56 PM, Steve Swinsburg
  wrote:
> So  overriding onAfterRender for a component doesn't just override it
> for that instance of the component?
> 
> Also I can see the markup is being added to the end of the page after
> the closing HTML. However, the Javadocs say it is meant to be called
> after after the actual component is finished rendering. So it look s
> like onAfterRender is not what I need.
> 
> Can I attach to a different phase in the render lifecycle to call the
> javascript when that specific panel has just finished rendering?
> 
> thanks,
> Steve
> 
> 
> 
> 
> On 21/01/2010, at 2:52 PM, Igor Vaynberg wrote:
> 
>> you are writing out javascript after every component render...
>> 
>> perhaps you should keep a boolean flag that marks if you rendered the
>> js yet or not.
>> 
>> alternatively you can add a behavior to the panel with istemporary() {
>> return true; }
>> 
>> -igor
>> 
>> On Wed, Jan 20, 2010 at 7:24 PM, Steve Swinsburg
>>  wrote:
>>> I have an AjaxLazyLoadPanel and want some javascript to fire after its
>>> loaded it's contents:
>>> 
>>> I assumed I could override onAfterRender and add my javascript like
>>> so:
>>> 
>>> add(new AjaxLazyLoadPanel("myPanel") {
>>> 
>>>  @Override
>>>  public Component getLazyLoadComponent(String markupId) {
>>>  return new SomePamel(markupId);
>>>  }
>>> 
>>>  @Override
>>>  protected void onAfterRender() {
>>>  JavascriptUtils.writeJavascript(getResponse(),
>>> "alert('hello');");
>>>  super.onAfterRender();
>>>  }
>>> 
>>> });
>>> 
>>> Except it is called twice, it looks like once when the page is loading
>>> and then again when the actual panel has been loaded.
>>> 
>>> Is there another way to achieve what I want?
>>> 
>>> thanks,
>>> Steve
>>> 
>>> 
>> 
>> -
>> 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/onAfterRender-called-twice-in-AjaxLazyLoadPanel-tp27252299p27253924.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@

Re: palette onSubmit

2010-01-21 Thread wic...@geofflancaster.com
Is there any way I can override what happens when the user adds or removes
an item to/from the selected list? i know its done via javascript but is it
possible to have an ajax call that calls a method where I can manually keep
track of what is being added or removed?

Original Message:
-
From: wic...@geofflancaster.com wic...@geofflancaster.com
Date: Thu, 21 Jan 2010 17:35:53 -0500
To: users@wicket.apache.org
Subject: Re: palette onSubmit


Are there any other solutions? palette.getrecorder().getconvertedinput()
returns a String, i need it to return a serialized list of selected
components so that i can iterate through them

Original Message:
-
From: Igor Vaynberg igor.vaynb...@gmail.com
Date: Tue, 19 Jan 2010 15:32:13 -0800
To: users@wicket.apache.org
Subject: Re: palette onSubmit


you can get the items using palette.getrecorder().getconvertedinput()

-igor

On Tue, Jan 19, 2010 at 3:27 PM, wic...@geofflancaster.com
 wrote:
> well if the form doesn't validate it calls the "onError" method which
> doesnt actually submit the form, hence the selected items aren't saved.
>
> at the time the user types into the textfield, the entire form has yet to
> be filled out so validation will always fail.
>
> Original Message:
> -
> From: Igor Vaynberg igor.vaynb...@gmail.com
> Date: Tue, 19 Jan 2010 15:11:43 -0800
> To: users@wicket.apache.org
> Subject: Re: palette onSubmit
>
>
> why would you want? simply do not repaint the feedback panel...
>
> -igor
>
> On Tue, Jan 19, 2010 at 3:07 PM, wic...@geofflancaster.com
>  wrote:
>> is there any way i can get around form validation using
>> ajaxformsubmitbehavior?
>>
>> Original Message:
>> -
>> From: Igor Vaynberg igor.vaynb...@gmail.com
>> Date: Tue, 19 Jan 2010 14:19:28 -0800
>> To: users@wicket.apache.org
>> Subject: Re: palette onSubmit
>>
>>
>> you should use ajaxformsubmitbehavior instead - that way all the
>> values are submitted.
>>
>> -igor
>>
>> On Tue, Jan 19, 2010 at 2:11 PM, wic...@geofflancaster.com
>>  wrote:
>>> right, they do stay after a submit. but when i use an
> OnChangeAjaxBehavior
>>> on another field of the form, it isn't actually functioning as a submit
> so
>>> the palette gets refreshed and loses the selected items.
>>>
>>> (I'm still trying to narrow down the available items in a palette using
a
>>> textfield so i'm trying to get it to mimic a submit without actually
>>> submitted because a submit would require form validation which won't
pass
>>> at the time the palette is used)
>>>
>>> Original Message:
>>> -
>>> From: Igor Vaynberg igor.vaynb...@gmail.com
>>> Date: Tue, 19 Jan 2010 12:14:57 -0800
>>> To: users@wicket.apache.org
>>> Subject: Re: palette onSubmit
>>>
>>>
>>> if you set up your models properly then selected items stay selected.
>>> eg [1] where selected items stay selected after submit button is
>>> pressed
>>>
>>> [1]
>>>
>>
>
http://wicketstuff.org/wicket/compref/?wicket:bookmarkablePage=:org.apache.w
>>> icket.examples.compref.PalettePage
>>>
>>> -igor
>>>
>>> On Tue, Jan 19, 2010 at 11:45 AM, wic...@geofflancaster.com
>>>  wrote:
 Is there a document anywhere that would show me that workflow?

 I'm trying to force an OnChangeAjaxBehavior to do some of the methods
 executed during a submit on a palette to make the selected items stay
 selected.

 Original Message:
 -
 From: Igor Vaynberg igor.vaynb...@gmail.com
 Date: Tue, 19 Jan 2010 10:31:44 -0800
 To: users@wicket.apache.org
 Subject: Re: palette onSubmit


 Recorder is a HiddenField<-FormComponent so the regular form component
 workflow methods are called on it.

 -igor

 On Tue, Jan 19, 2010 at 10:02 AM, wic...@geofflancaster.com
  wrote:
> Can anyone tell me which methods are called on a palette when it is
> submitted?
>
> i know the recorder keeps track of the selected items but how are they
> persisted after a form submit? ie. what method is called to make them
>>> stay
> selected?
>
> 
> mail2web.com – Enhanced email for the mobile individual based on
 Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
>
>
>
> -
> 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



 
 mail2web - Check your email from the web at
 http://link.mail2web.com/mail2web



 

Custom error messages for fields inside Fragments

2010-01-21 Thread Tony Wu
I have a PatternValidator and cannot figure out what is the correct path to
target a custom error message (page.properties) to a field inside a
fragment. Here's the markup: http://pastebin.com/m4c4744e3

I tried targeting:
zones.fullRecord.recordForm.fragment.insuranceFragment.insuranceProvider.PatternValidator=Custom
text
And also:
zones.fullRecord.recordForm.insuranceFragment.insuranceProvider.PatternValidator=Custom
text
And also:
zones.fullRecord.recordForm.fragment.insuranceProvider.PatternValidator=Custom
text

But all 3 don't work, I get the ugly default error message in my
Feedbackpanel. What am I doing incorrectly?

The code flow is:

PageConstructor {

add(new ListView("zones"...
   @Override populateItem
   item.add(new ListView("fullRecord"...
  @Override populateItem
  item.add(Form recordForm = new Form("recordForm");
 recordForm.add(new Fragment("fragment", "insuranceFragment"

}


Re: palette onSubmit

2010-01-21 Thread wic...@geofflancaster.com
Are there any other solutions? palette.getrecorder().getconvertedinput()
returns a String, i need it to return a serialized list of selected
components so that i can iterate through them

Original Message:
-
From: Igor Vaynberg igor.vaynb...@gmail.com
Date: Tue, 19 Jan 2010 15:32:13 -0800
To: users@wicket.apache.org
Subject: Re: palette onSubmit


you can get the items using palette.getrecorder().getconvertedinput()

-igor

On Tue, Jan 19, 2010 at 3:27 PM, wic...@geofflancaster.com
 wrote:
> well if the form doesn't validate it calls the "onError" method which
> doesnt actually submit the form, hence the selected items aren't saved.
>
> at the time the user types into the textfield, the entire form has yet to
> be filled out so validation will always fail.
>
> Original Message:
> -
> From: Igor Vaynberg igor.vaynb...@gmail.com
> Date: Tue, 19 Jan 2010 15:11:43 -0800
> To: users@wicket.apache.org
> Subject: Re: palette onSubmit
>
>
> why would you want? simply do not repaint the feedback panel...
>
> -igor
>
> On Tue, Jan 19, 2010 at 3:07 PM, wic...@geofflancaster.com
>  wrote:
>> is there any way i can get around form validation using
>> ajaxformsubmitbehavior?
>>
>> Original Message:
>> -
>> From: Igor Vaynberg igor.vaynb...@gmail.com
>> Date: Tue, 19 Jan 2010 14:19:28 -0800
>> To: users@wicket.apache.org
>> Subject: Re: palette onSubmit
>>
>>
>> you should use ajaxformsubmitbehavior instead - that way all the
>> values are submitted.
>>
>> -igor
>>
>> On Tue, Jan 19, 2010 at 2:11 PM, wic...@geofflancaster.com
>>  wrote:
>>> right, they do stay after a submit. but when i use an
> OnChangeAjaxBehavior
>>> on another field of the form, it isn't actually functioning as a submit
> so
>>> the palette gets refreshed and loses the selected items.
>>>
>>> (I'm still trying to narrow down the available items in a palette using
a
>>> textfield so i'm trying to get it to mimic a submit without actually
>>> submitted because a submit would require form validation which won't
pass
>>> at the time the palette is used)
>>>
>>> Original Message:
>>> -
>>> From: Igor Vaynberg igor.vaynb...@gmail.com
>>> Date: Tue, 19 Jan 2010 12:14:57 -0800
>>> To: users@wicket.apache.org
>>> Subject: Re: palette onSubmit
>>>
>>>
>>> if you set up your models properly then selected items stay selected.
>>> eg [1] where selected items stay selected after submit button is
>>> pressed
>>>
>>> [1]
>>>
>>
>
http://wicketstuff.org/wicket/compref/?wicket:bookmarkablePage=:org.apache.w
>>> icket.examples.compref.PalettePage
>>>
>>> -igor
>>>
>>> On Tue, Jan 19, 2010 at 11:45 AM, wic...@geofflancaster.com
>>>  wrote:
 Is there a document anywhere that would show me that workflow?

 I'm trying to force an OnChangeAjaxBehavior to do some of the methods
 executed during a submit on a palette to make the selected items stay
 selected.

 Original Message:
 -
 From: Igor Vaynberg igor.vaynb...@gmail.com
 Date: Tue, 19 Jan 2010 10:31:44 -0800
 To: users@wicket.apache.org
 Subject: Re: palette onSubmit


 Recorder is a HiddenField<-FormComponent so the regular form component
 workflow methods are called on it.

 -igor

 On Tue, Jan 19, 2010 at 10:02 AM, wic...@geofflancaster.com
  wrote:
> Can anyone tell me which methods are called on a palette when it is
> submitted?
>
> i know the recorder keeps track of the selected items but how are they
> persisted after a form submit? ie. what method is called to make them
>>> stay
> selected?
>
> 
> mail2web.com – Enhanced email for the mobile individual based on
 Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
>
>
>
> -
> 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



 
 mail2web - Check your email from the web at
 http://link.mail2web.com/mail2web



 -
 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 bench in eclipse

2010-01-21 Thread Lionel Port
Thanks but I don't have any problem with m2eclipse, its works great.

On Fri, Jan 22, 2010 at 3:17 AM, Andreas Lüdtke  wrote:
> Hi Lionel,
>
> since you don't write what exactly doesn't work, I can only guess: is the
> M2_REPO variable beeing defined/set in eclipse?
>
> This was my main problem when I used eclipse. You should give NetBeans a try.
> Just open the pom file and everything is fine and working.
>
> Andreas
>
>
>> -Original Message-
>> From: Lionel Port [mailto:lio...@portconnection.com]
>> Sent: Thursday, January 21, 2010 4:48 AM
>> To: users@wicket.apache.org
>> Subject: wicket bench in eclipse
>>
>> Hi Guys,
>>
>> Not strictly a wicket question, I know. Does anyone have wicket bench
>> working in Galileo or recent version of eclipse or know of a good
>> plugin I should be using?. My project has a maven structure, not sure
>> if thats why it doesn't work.
>>
>>
>> regards,
>> Lionel
>
>
> -
> 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 bench in eclipse

2010-01-21 Thread Lionel Port
Thats exactly what I want it for. Some reason it doesn't detect wicket
pages. I tried setting the wicket context in the project properties
but it doesn't change and if I force opening the html page with wicket
bench it throws an initialisation error. At least if you saying it
works for you I know it should work and I should keep trying.

BTW. What are you meant to get your wicket context set to in the
project properties, is it "/src/main/resources".


On Fri, Jan 22, 2010 at 12:25 AM, Swanthe Lindgren
 wrote:
> We are using Galileo and m2eclipse (Maven) with Wicket bench, no problem,
> but we are only using wicket bench when creating new pages and panels as a
> lazy way to get both the java and html file.
>
> //Swanthe
>
> On 2010-01-21 04:48, Lionel Port wrote:
>>
>> Hi Guys,
>>
>> Not strictly a wicket question, I know. Does anyone have wicket bench
>> working in Galileo or recent version of eclipse or know of a good
>> plugin I should be using?. My project has a maven structure, not sure
>> if thats why it doesn't work.
>>
>>
>> regards,
>> Lionel
>>
>> -
>> 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: The Field 'emailInput' is required

2010-01-21 Thread Jeffrey Schneller
Actually, this is how you would do it.  Or at least how I did it in the
past.

If you call setLabel on the input component and the value you pass to
set label can come from the xml file based on the language using the
StringResourceModel.  
Example:

Java Code (myform.java):
RequiredTextField firstName = new RequiredTextField("firstName");
firstName.setLabel(new StringResourceModel("firstName", this, null));

Xml File:

English (myform.xml):

forename



German (myform_de.xml):

Vorname



You can also customize the error messages as others have shown and you
can have both English and German error messages.



-Original Message-
From: Whats'Up [mailto:s.abel...@gmx.de] 
Sent: Thursday, January 21, 2010 2:52 PM
To: users@wicket.apache.org
Subject: Re: The Field 'emailInput' is required


No this it isn't.
A better example, I have 2 properties files (german and englisch)
English: Field 'forenameInput' is required.
German: Bitte tragen Sie einen Wert im Feld 'forenameInput' ein.
These both texts wicket generates by using "add(new
RequiredTextField("forenameInput"))". 
These both texts are great, but I want to change the forenameInput to
"forename" in the englisch properties file and in the german to
"Vorname"
without writing the whole error code.




svenmeier wrote:
> 
> FormComponent#setLabel() ?
> 
> Sven
> 
> Whats'Up wrote:
>> Sorry, I think I wrote not enough, to tell you the problem.
>> With the code test.emailInput.Required=The Email address is required:
I
>> have
>> to write for every field the same code, but the wicket code is ok,
and I
>> thought it is perhaps possible only to change the field name.
>> Normally I get the error code: Field 'emailInput' is required.
>> I only want to change the field-name and not the completely
error-code.
>> The
>> standart wicket-error code ist ok, and I only want to change the
field
>> name,
>> because I have very much fields.
>>
>>
>>
>>   
> 
> 
> -
> 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/The-Field-%27emailInput%27-is-required-tp27262234p
27263504.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



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



Re: The Field 'emailInput' is required

2010-01-21 Thread thisisme

they appear in the same order as you add the fields to the form. so by
changing this order, you will change the order of the messages, too


Whats'Up wrote:
> 
> 
> Do you know how I can order the error-codes?
> 
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263872.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: The Field 'emailInput' is required

2010-01-21 Thread Whats'Up

@thisis me

PErfekt, this is the answer

Do you know how I can order the error-codes?


thisisme wrote:
> 
> try:
> 
> emailInput = email
> 
> in the property file
> 
> 
> Whats'Up wrote:
>> 
>> test.EMAIL.Required=test
>> EMAIL.Required=test
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263793.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: The Field 'emailInput' is required

2010-01-21 Thread thisisme

try:

emailInput = email

in the property file


Whats'Up wrote:
> 
> test.EMAIL.Required=test
> EMAIL.Required=test
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263737.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: The Field 'emailInput' is required

2010-01-21 Thread Whats'Up

Thank you for the fast answer. A custom validator, I don't want to write,
because it must be easier.
The strange think is, that wicket uses the value "emailInput" or "forename"
and I hope to change these values with the properties.



rmattler wrote:
> 
> Still not sure I understand your problem.  If the field names are the same
> on many forms, I.E. an email field on several forms, you can put the error
> message in the application.properties file.
> 
> If my application is MyApplication.java then create a
> MyApplication.properties file and put in the validation.
> PasswordValidator= The Password must contain a number and a letter and be
> 6 characters long.
> 
> Or you can create a custom validator and create your own default message.
> 
> Hope that helps.
> 
> 
> 
> Whats'Up wrote:
>> 
>> Sorry, I think I wrote not enough, to tell you the problem.
>> With the code test.emailInput.Required=The Email address is required: I
>> have to write for every field the same code, but the wicket code is ok,
>> and I thought it is perhaps possible only to change the field name.
>> Normally I get the error code: Field 'emailInput' is required.
>> I only want to change the field-name and not the completely error-code.
>> The standart wicket-error code ist ok, and I only want to change the
>> field name, because I have very much fields.
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263586.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: The Field 'emailInput' is required

2010-01-21 Thread rmattler

Still not sure I understand your problem.  If the field names are the same on
many forms, I.E. an email field on several forms, you can put the error
message in the application.properties file.

If my application is MyApplication.java then create a
MyApplication.properties file and put in the validation.
PasswordValidator= The Password must contain a number and a letter and be 6
characters long.

Or you can create a custom validator and create your own default message.

Hope that helps.



Whats'Up wrote:
> 
> Sorry, I think I wrote not enough, to tell you the problem.
> With the code test.emailInput.Required=The Email address is required: I
> have to write for every field the same code, but the wicket code is ok,
> and I thought it is perhaps possible only to change the field name.
> Normally I get the error code: Field 'emailInput' is required.
> I only want to change the field-name and not the completely error-code.
> The standart wicket-error code ist ok, and I only want to change the field
> name, because I have very much fields.
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263523.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: The Field 'emailInput' is required

2010-01-21 Thread Whats'Up

No this it isn't.
A better example, I have 2 properties files (german and englisch)
English: Field 'forenameInput' is required.
German: Bitte tragen Sie einen Wert im Feld 'forenameInput' ein.
These both texts wicket generates by using "add(new
RequiredTextField("forenameInput"))". 
These both texts are great, but I want to change the forenameInput to
"forename" in the englisch properties file and in the german to "Vorname"
without writing the whole error code.




svenmeier wrote:
> 
> FormComponent#setLabel() ?
> 
> Sven
> 
> Whats'Up wrote:
>> Sorry, I think I wrote not enough, to tell you the problem.
>> With the code test.emailInput.Required=The Email address is required: I
>> have
>> to write for every field the same code, but the wicket code is ok, and I
>> thought it is perhaps possible only to change the field name.
>> Normally I get the error code: Field 'emailInput' is required.
>> I only want to change the field-name and not the completely error-code.
>> The
>> standart wicket-error code ist ok, and I only want to change the field
>> name,
>> because I have very much fields.
>>
>>
>>
>>   
> 
> 
> -
> 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/The-Field-%27emailInput%27-is-required-tp27262234p27263504.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: The Field 'emailInput' is required

2010-01-21 Thread Sven Meier

FormComponent#setLabel() ?

Sven

Whats'Up wrote:

Sorry, I think I wrote not enough, to tell you the problem.
With the code test.emailInput.Required=The Email address is required: I have
to write for every field the same code, but the wicket code is ok, and I
thought it is perhaps possible only to change the field name.
Normally I get the error code: Field 'emailInput' is required.
I only want to change the field-name and not the completely error-code. The
standart wicket-error code ist ok, and I only want to change the field name,
because I have very much fields.



  



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



Re: The Field 'emailInput' is required

2010-01-21 Thread Whats'Up

Sorry, I think I wrote not enough, to tell you the problem.
With the code test.emailInput.Required=The Email address is required: I have
to write for every field the same code, but the wicket code is ok, and I
thought it is perhaps possible only to change the field name.
Normally I get the error code: Field 'emailInput' is required.
I only want to change the field-name and not the completely error-code. The
standart wicket-error code ist ok, and I only want to change the field name,
because I have very much fields.



rmattler wrote:
> 
> Java code: (VendorSignupEntry.java)
> 
> Form form = new Form("vendorSignupForm",
>   new 
> CompoundPropertyModel(profileModel))
> 
> RequiredTextField mainEmail = new
> RequiredTextField("mainEmail");
> 
> HTML: (VendorSignupEntry.html)
> 
> 
> 
> 
> 
> Properties: (VendorSignupEntry.properties)
> 
> vendorSignupForm.mainEmail.Required=The Email address is required.
> vendorSignupForm.mainEmail.StringValidator.maximum=The Email address must
> between less than ${maximum} letters.
> vendorSignupForm.mainEmail.EmailAddressValidator=The Email address is not
> a valid address.
> 
> 
> 
> Whats'Up wrote:
>> 
>> Hi rmattler and Wilhelmsen Tor Iver
>> 
>> thank you both for the fast answers! With "test.emailInput.Required=test"
>> I changed the completely error code to "test", but how can I change the
>> error code to this "Field 'email' is required." ?
>> I also tested it with  test.emailInput.RequiredValidator=email, but it
>> doesn't work
>> 
>> rmattler wrote:
>>> 
>>> try:  test.emailInput.Required=test
>>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263298.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: The Field 'emailInput' is required

2010-01-21 Thread rmattler

Java code: (VendorSignupEntry.java)

Form form = new Form("vendorSignupForm",
new 
CompoundPropertyModel(profileModel))

RequiredTextField mainEmail = new
RequiredTextField("mainEmail");

HTML: (VendorSignupEntry.html)





Properties: (VendorSignupEntry.properties)

vendorSignupForm.mainEmail.Required=The Email address is required.
vendorSignupForm.mainEmail.StringValidator.maximum=The Email address must
between less than ${maximum} letters.
vendorSignupForm.mainEmail.EmailAddressValidator=The Email address is not a
valid address.



Whats'Up wrote:
> 
> Hi rmattler and Wilhelmsen Tor Iver
> 
> thank you both for the fast answers! With "test.emailInput.Required=test"
> I changed the completely error code to "test", but how can I change the
> error code to this "Field 'email' is required." ?
> I also tested it with  test.emailInput.RequiredValidator=email, but it
> doesn't work
> 
> rmattler wrote:
>> 
>> try:  test.emailInput.Required=test
>> 
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27263033.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: The Field 'emailInput' is required

2010-01-21 Thread Whats'Up

Hi rmattler

thank you for the fast answer! With "test.emailInput.Required=test" I
changed the completely error code to "test", but how can I change the error
code to this "Field 'email' is required." ?
I also tested it with  test.emailInput.RequiredValidator=email, but it
doesn't work

rmattler wrote:
> 
> try:  test.emailInput.Required=test
> 



-- 
View this message in context: 
http://old.nabble.com/The-Field-%27emailInput%27-is-required-tp27262234p27262883.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: The Field 'emailInput' is required

2010-01-21 Thread rmattler

try:  test.emailInput.Required=test



Whats'Up wrote:
> 
> Hello,
> 
> this is my first post and I hope you could help me.
> I have a Form with the id="test" and a Textfield="EMAIL". The Textfield I
> added with "add(new RequiredTextField("emailInput"))".
> After pressing submit (wihout entering an emali), I get the failure "Field
> 'emailInput' is required." I want to change 'emailInput' to email. I
> tested in the properties.
> 
> test.EMAIL.Required=test
> EMAIL.Required=test
> but it doesn't work. The propertie file must work, I can change the submit
> text.  
> Do you have any idea?
> -- 
> Haiti-Nothilfe! Helfen Sie per SMS: Sende UIHAITI an die Nummer 81190.
> Von 5 Euro je SMS (zzgl. SMS-Gebühr) gehen 4,83 Euro an UNICEF.
> 
> -
> 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/The-Field-%27emailInput%27-is-required-tp27262234p27262676.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



SV: The Field 'emailInput' is required

2010-01-21 Thread Wilhelmsen Tor Iver
> I have a Form with the id="test" and a Textfield="EMAIL".

Claim the first, then:

> The Textfield I added with "add(new RequiredTextField("emailInput"))".

Claim the second.

These conflict, because the id used in the actual code is "emailInput".

> test.EMAIL.Required=test
> EMAIL.Required=test

So that needs to have EMAIL replaced with the id used which was emailInput.

HTH. HAND. :)

- Tor Iver

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



The Field 'emailInput' is required

2010-01-21 Thread Steffen
Hello,

this is my first post and I hope you could help me.
I have a Form with the id="test" and a Textfield="EMAIL". The Textfield I added 
with "add(new RequiredTextField("emailInput"))".
After pressing submit (wihout entering an emali), I get the failure "Field 
'emailInput' is required." I want to change 'emailInput' to email. I tested in 
the properties.

test.EMAIL.Required=test
EMAIL.Required=test
but it doesn't work. The propertie file must work, I can change the submit 
text.  
Do you have any idea?
-- 
Haiti-Nothilfe! Helfen Sie per SMS: Sende UIHAITI an die Nummer 81190.
Von 5 Euro je SMS (zzgl. SMS-Gebühr) gehen 4,83 Euro an UNICEF.

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



RE: wicket bench in eclipse

2010-01-21 Thread Andreas Lüdtke
Hi Jeroen,

I can open the parent pom and build/test the whole thing. Is that what you're
looking for?

The project explorer lists under "Modules" all the sub projects... 

Andreas 

> -Original Message-
> From: Jeroen Steenbeeke [mailto:j.steenbeeke...@gmail.com] 
> Sent: Thursday, January 21, 2010 5:56 PM
> To: users@wicket.apache.org
> Subject: Re: wicket bench in eclipse
> 
> Does it support parent POMs yet? This was an issue I had back when I
> used Netbeans and had to work with a multi-module project.
> 
> 2010/1/21 Andreas Lüdtke :
> > Hi Lionel,
> >
> > since you don't write what exactly doesn't work, I can only 
> guess: is the
> > M2_REPO variable beeing defined/set in eclipse?
> >
> > This was my main problem when I used eclipse. You should 
> give NetBeans a try.
> > Just open the pom file and everything is fine and working.
> >
> > Andreas
> >
> >
> >> -Original Message-
> >> From: Lionel Port [mailto:lio...@portconnection.com]
> >> Sent: Thursday, January 21, 2010 4:48 AM
> >> To: users@wicket.apache.org
> >> Subject: wicket bench in eclipse
> >>
> >> Hi Guys,
> >>
> >> Not strictly a wicket question, I know. Does anyone have 
> wicket bench
> >> working in Galileo or recent version of eclipse or know of a good
> >> plugin I should be using?. My project has a maven 
> structure, not sure
> >> if thats why it doesn't work.
> >>
> >>
> >> regards,
> >> Lionel
> Jeroen Steenbeeke
> www.fortuityframework.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: Cannot get default invisible TextField's ModelObject ?

2010-01-21 Thread smallufo
I think it is a bug , and already submitted to JIRA
https://issues.apache.org/jira/browse/WICKET-2694


2010/1/21 Chuck Brinkman 

> I looked some more and found the following:
>
> When it works, with my modification, FormComponent.getInputAsArray tries to
> get parameters for the TextField named "more:moreForm:textfield".  I looked
> in the parameter map or the RequestFacade object and found these:
> wicket:interface, wicket:ignoreIfNotActive, random,
> more:moreForm:textfield,
> radioGroup and more:moreForm:submit.  And it finds the TextField.
>
> The version that fails is looking for TextField named "more:textfield".
>  The
> RequestFacade object has: wicket:interface, wicket:ignoreIfNotActive,
> random, forma_hf_0, radioGroup and more:submit.  Is there a problem with
> "forma_hf_0?
>
>
>
> On Thu, Jan 21, 2010 at 7:35 AM, smallufo  wrote:
>
> > Yes , indeed , if the form is in the second row (default invisible) , it
> > works , But I cannot get the first row's data (such as radioGroup's model
> > object will become null ).
> > Moreover ,  Form with multiple row , with something visible and something
> > extensible (default invisible), it is not so rare.
> > If the form is not inside a ListView , it will work.
> > But it just fails if it is inside a  ListView.
>


AW: AW: get set attribute wicket session

2010-01-21 Thread Giambalvo, Christian
Put them in its own jar and add it as dependency to both projects. (dirty but 
it does the job)


-Ursprüngliche Nachricht-
Von: Martin Asenov [mailto:mase...@velti.com] 
Gesendet: Donnerstag, 21. Januar 2010 17:38
An: users@wicket.apache.org
Betreff: RE: AW: get set attribute wicket session

Unfortunatelly I can't use this since the webapp module builds the core and UI 
modules in one and builds resources and stuff like this in the war.

Maybe I should think of something else...

Regards,

-Original Message-
From: Joseph Pachod [mailto:j...@thomas-daily.de] 
Sent: Thursday, January 21, 2010 6:26 PM
To: users@wicket.apache.org
Subject: Re: AW: get set attribute wicket session

Giambalvo, Christian wrote:
> Hi,
>
> with getSession() you will always get the session attached to the current 
> request.
> So yes it is session specific.
>
> Greets chris
I would add that, in order to save this nasty cast all over the place, 
you could create your own getMySessionImpl this way :
class MySessionImpl
public static MySessionImpl getMySessionImpl(){
  return (MySessionImpl) get();
}



-
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: wicket bench in eclipse

2010-01-21 Thread Jeroen Steenbeeke
Does it support parent POMs yet? This was an issue I had back when I
used Netbeans and had to work with a multi-module project.

2010/1/21 Andreas Lüdtke :
> Hi Lionel,
>
> since you don't write what exactly doesn't work, I can only guess: is the
> M2_REPO variable beeing defined/set in eclipse?
>
> This was my main problem when I used eclipse. You should give NetBeans a try.
> Just open the pom file and everything is fine and working.
>
> Andreas
>
>
>> -Original Message-
>> From: Lionel Port [mailto:lio...@portconnection.com]
>> Sent: Thursday, January 21, 2010 4:48 AM
>> To: users@wicket.apache.org
>> Subject: wicket bench in eclipse
>>
>> Hi Guys,
>>
>> Not strictly a wicket question, I know. Does anyone have wicket bench
>> working in Galileo or recent version of eclipse or know of a good
>> plugin I should be using?. My project has a maven structure, not sure
>> if thats why it doesn't work.
>>
>>
>> regards,
>> Lionel
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



AW: AW: get set attribute wicket session

2010-01-21 Thread Giambalvo, Christian
Not possible cause "What should I do when I don't have the MySessionImpl class 
visible".
The class need to be visible to do that.


-Ursprüngliche Nachricht-
Von: Joseph Pachod [mailto:j...@thomas-daily.de] 
Gesendet: Donnerstag, 21. Januar 2010 17:26
An: users@wicket.apache.org
Betreff: Re: AW: get set attribute wicket session

Giambalvo, Christian wrote:
> Hi,
>
> with getSession() you will always get the session attached to the current 
> request.
> So yes it is session specific.
>
> Greets chris
I would add that, in order to save this nasty cast all over the place, 
you could create your own getMySessionImpl this way :
class MySessionImpl
public static MySessionImpl getMySessionImpl(){
  return (MySessionImpl) get();
}



-
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: AW: get set attribute wicket session

2010-01-21 Thread Martin Asenov
Unfortunatelly I can't use this since the webapp module builds the core and UI 
modules in one and builds resources and stuff like this in the war.

Maybe I should think of something else...

Regards,

-Original Message-
From: Joseph Pachod [mailto:j...@thomas-daily.de] 
Sent: Thursday, January 21, 2010 6:26 PM
To: users@wicket.apache.org
Subject: Re: AW: get set attribute wicket session

Giambalvo, Christian wrote:
> Hi,
>
> with getSession() you will always get the session attached to the current 
> request.
> So yes it is session specific.
>
> Greets chris
I would add that, in order to save this nasty cast all over the place, 
you could create your own getMySessionImpl this way :
class MySessionImpl
public static MySessionImpl getMySessionImpl(){
  return (MySessionImpl) get();
}



-
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: AW: get set attribute wicket session

2010-01-21 Thread Joseph Pachod

Giambalvo, Christian wrote:

Hi,

with getSession() you will always get the session attached to the current 
request.
So yes it is session specific.

Greets chris
I would add that, in order to save this nasty cast all over the place, 
you could create your own getMySessionImpl this way :

class MySessionImpl
public static MySessionImpl getMySessionImpl(){
 return (MySessionImpl) get();
}



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



AW: get set attribute wicket session

2010-01-21 Thread Giambalvo, Christian
Well, you have wrong dependency.
Webapp shouldn't depend on UI. But UI on webapp.
You have to reverse the dependency otherwise there is no possibility.


-Ursprüngliche Nachricht-
Von: Martin Asenov [mailto:mase...@velti.com] 
Gesendet: Donnerstag, 21. Januar 2010 17:04
An: users@wicket.apache.org
Betreff: RE: get set attribute wicket session 

Well, here comes another issue... What should I do when I don't have the 
MySessionImpl class visible, because it's in the webapp module which is 
invisible for the UI module. Because webapp has a dependency to the UI and 
otherwise I'll have a cyclic reference and compile time error.?

How could I get session specific attributes then? By using getMetaData()?

Thanks,

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Thursday, January 21, 2010 5:54 PM
To: users@wicket.apache.org
Subject: RE: get set attribute wicket session 

Thanks, Chris!

Have a nice evening!

Cheers,
Martin

-Original Message-
From: Giambalvo, Christian [mailto:christian.giamba...@excelsisnet.com] 
Sent: Thursday, January 21, 2010 5:46 PM
To: users@wicket.apache.org
Subject: AW: get set attribute wicket session 

Hi,

with getSession() you will always get the session attached to the current 
request.
So yes it is session specific.

Greets chris


-Ursprüngliche Nachricht-
Von: Martin Asenov [mailto:mase...@velti.com] 
Gesendet: Donnerstag, 21. Januar 2010 16:44
An: users@wicket.apache.org
Betreff: get set attribute wicket session 

Hello, everyone!

I would like to ask if:

-I've got an AuthenticatedWebSession implementation and there I have the fields
 -field1
 -field2

with getters and setters.

After that somewhere in my code, no matter where I say 
((MySessionImpl)getSession()).getField1() will I get session specific 
attribute, since there are no set/getAttribute() methods for the session.

I want to save session specific attributes in that manner, is this the correct 
way to do so?

Thanks,


-
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: wicket bench in eclipse

2010-01-21 Thread Andreas Lüdtke
Hi Lionel,

since you don't write what exactly doesn't work, I can only guess: is the
M2_REPO variable beeing defined/set in eclipse?

This was my main problem when I used eclipse. You should give NetBeans a try.
Just open the pom file and everything is fine and working.

Andreas


> -Original Message-
> From: Lionel Port [mailto:lio...@portconnection.com] 
> Sent: Thursday, January 21, 2010 4:48 AM
> To: users@wicket.apache.org
> Subject: wicket bench in eclipse
> 
> Hi Guys,
> 
> Not strictly a wicket question, I know. Does anyone have wicket bench
> working in Galileo or recent version of eclipse or know of a good
> plugin I should be using?. My project has a maven structure, not sure
> if thats why it doesn't work.
> 
> 
> regards,
> Lionel


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



Re: Component hierarchy question

2010-01-21 Thread Marek Šabo
Hi,
thanks, sorry about silly question I forgot that java passes method
arguments by value and copies references.
Maybe I got confused with c++ pointers.

Regards,

--
Marek Šabo


On 01/21/2010 03:48 PM, Alexander Monakhov wrote:
> Hi.
>
> I'm not sure. But when you call add() method you pass reference to the
> certain component. If you create new object and assign reference to it, you
> just create reference to new object, but old one references to old object.
> For example,
>
> // here is new component creation
> 1. Component c = new Component(  );
> 2. add( c );// add to component tree
>
> 3. c = new Component( .. );//initialize another component
> 4. replaceWith( c );// replace old component with new one
>
> if are you asking why sould 4th lines be invoked, the question is simple,
> you have to push reference to new component to component tree. If you are
> why doesn't it work with out 4th, try to read about references in Java.
>
> Best regards, Alexander.
>
>   


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



RE: Validation errors

2010-01-21 Thread Stefan Droog
Try

form.error(getString("error.SolrConnectionFault"));

-Original Message-
From: Riccardo Trombini [mailto:riccardo.tromb...@csnc.ch]
Sent: Thursday, January 21, 2010 5:09 PM
To: users@wicket.apache.org
Subject: Validation errors

Hi



I have problems with FormValidation. Everything works perfect till
Wicket has to promt the Errormessages.

Something with the localization went wrong, instead of the message I
receive : "[ValidationError message=[null],
keys=[error.SolrConnectionFault], variables=[null]]"



I use a FeedbackPanel which is added to a form.



final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");

feedbackPanel.setOutputMarkupId(true);

searchForm.add(feedbackPanel);



AjaxButton searchbutton = new AjaxButton("searchbutton", new
PropertyModel(dataContainer, "visible")) {



protected void onError(AjaxRequestTarget target, Form
arg1) {

  target.addComponent(feedbackPanel);

}



@Override

protected void onSubmit(AjaxRequestTarget target, Form
form) {

  ...

  form.error(new
ValidationError().addMessageKey("error.SolrConnectionFault"));

  

}

};


The information contained in this communication is confidential, intended 
solely for the use of the individual or entity to whom it is addressed and may 
be legally privileged and protected by professional secrecy. Access to this 
message by anyone else is unauthorized. If you are not the intended recipient, 
any disclosure, copying, or distribution of the message, or any action or 
omission taken by you in reliance on it is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this message in 
error. This email does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written agreement 
between the intended recipient and Cordys Holding BV or its subsidiaries. 
Cordys is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt. 
Cordys does not guarantee that the integrity of this communication has been 
maintained nor that the communication is free of viruses, interceptions or 
interference. If you are not the intended recipient of this communication 
please return the communication to the sender and delete and destroy all copies.

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



Validation errors

2010-01-21 Thread Riccardo Trombini
Hi

 

I have problems with FormValidation. Everything works perfect till
Wicket has to promt the Errormessages.

Something with the localization went wrong, instead of the message I
receive : "[ValidationError message=[null],
keys=[error.SolrConnectionFault], variables=[null]]"

 

I use a FeedbackPanel which is added to a form.

 

final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");

feedbackPanel.setOutputMarkupId(true);

searchForm.add(feedbackPanel); 

 

AjaxButton searchbutton = new AjaxButton("searchbutton", new
PropertyModel(dataContainer, "visible")) {

 

protected void onError(AjaxRequestTarget target, Form
arg1) {

  target.addComponent(feedbackPanel);

} 

   

@Override

protected void onSubmit(AjaxRequestTarget target, Form
form) {

  ...

  form.error(new
ValidationError().addMessageKey("error.SolrConnectionFault"));

  

}

};



Re: Using style AND variation

2010-01-21 Thread Daniel Stoch
Hi all,

Liz Huber wrote:
> In our application we use Panels in different variations.
> For example: Foot.html, Foot_withTextLinks.html, Foot_withImageLinks.html, 
> Head.html, Head_error.html
>
> Now we'd additionally like to use different styles.
> For example on Valentine's Day all image links in our footer should be shown 
> in pink. (Just as example to describe)
> -> session.setStyle("Valentine");
>
> We added File "Footer_withImageLinks_Valentine.html" and thought everthing is 
> fine.
> But once the style "Valentine" is set, the Markup "Head_error.html" is never 
> used again, because Wicket is looking for "Head_error_Valentine.html".
>
> Unfortunately wicket combines variant and style when looking for resources.
> That's why the loading order is:
> 1. Head_error_Valentine.html  (= __

RE: get set attribute wicket session

2010-01-21 Thread Martin Asenov
Well, here comes another issue... What should I do when I don't have the 
MySessionImpl class visible, because it's in the webapp module which is 
invisible for the UI module. Because webapp has a dependency to the UI and 
otherwise I'll have a cyclic reference and compile time error.?

How could I get session specific attributes then? By using getMetaData()?

Thanks,

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Thursday, January 21, 2010 5:54 PM
To: users@wicket.apache.org
Subject: RE: get set attribute wicket session 

Thanks, Chris!

Have a nice evening!

Cheers,
Martin

-Original Message-
From: Giambalvo, Christian [mailto:christian.giamba...@excelsisnet.com] 
Sent: Thursday, January 21, 2010 5:46 PM
To: users@wicket.apache.org
Subject: AW: get set attribute wicket session 

Hi,

with getSession() you will always get the session attached to the current 
request.
So yes it is session specific.

Greets chris


-Ursprüngliche Nachricht-
Von: Martin Asenov [mailto:mase...@velti.com] 
Gesendet: Donnerstag, 21. Januar 2010 16:44
An: users@wicket.apache.org
Betreff: get set attribute wicket session 

Hello, everyone!

I would like to ask if:

-I've got an AuthenticatedWebSession implementation and there I have the fields
 -field1
 -field2

with getters and setters.

After that somewhere in my code, no matter where I say 
((MySessionImpl)getSession()).getField1() will I get session specific 
attribute, since there are no set/getAttribute() methods for the session.

I want to save session specific attributes in that manner, is this the correct 
way to do so?

Thanks,


-
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: get set attribute wicket session

2010-01-21 Thread Martin Asenov
Thanks, Chris!

Have a nice evening!

Cheers,
Martin

-Original Message-
From: Giambalvo, Christian [mailto:christian.giamba...@excelsisnet.com] 
Sent: Thursday, January 21, 2010 5:46 PM
To: users@wicket.apache.org
Subject: AW: get set attribute wicket session 

Hi,

with getSession() you will always get the session attached to the current 
request.
So yes it is session specific.

Greets chris


-Ursprüngliche Nachricht-
Von: Martin Asenov [mailto:mase...@velti.com] 
Gesendet: Donnerstag, 21. Januar 2010 16:44
An: users@wicket.apache.org
Betreff: get set attribute wicket session 

Hello, everyone!

I would like to ask if:

-I've got an AuthenticatedWebSession implementation and there I have the fields
 -field1
 -field2

with getters and setters.

After that somewhere in my code, no matter where I say 
((MySessionImpl)getSession()).getField1() will I get session specific 
attribute, since there are no set/getAttribute() methods for the session.

I want to save session specific attributes in that manner, is this the correct 
way to do so?

Thanks,


-
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: CryptedUrlWebRequestCodingStrategy + WebRequestCodingStrategy = resource URLs are not encrypted (bug?).

2010-01-21 Thread Igor Vaynberg
not sure that is possible currently. the aliasing only works on a per
class level. see SharedResources.putClassAlias().

you can add an rfe to have it enhanced.

seems like a quiet arbitrary requirement, especially when it comes to
security. an fqn does not give anything away security-wise.

-igor



On Thu, Jan 21, 2010 at 1:18 AM, Antoine van Wel
 wrote:
> What can you do if you need to enforce that no fqn's are ever
> generated in (resource) paths?
>
> Best I can think of now is putting a breakpoint in the resourceKey
> method where the fqn is retrieved, and then stepping through your full
> webapp - which is a rather poor solution. Any other ideas?
>
>
> Antoine
>
>
>
>
>
> On Mon, Jan 18, 2010 at 5:18 PM, Igor Vaynberg  
> wrote:
>> the original design goal of the crypted strategy was to only encrypt
>> what the user sees in the url bar. since they never see resource urls
>> there was no reason to encrypt those.
>>
>> re fqns, you can add class aliases into SharedResources to hide those.
>>
>> -igor
>>
>> 2010/1/18 Sergejs Olefirs :
>>> Hi,
>>>
>>> I started using Wicket rather recently. As part of our security
>>> considerations, we do not want immediately expose the underlying
>>> framework(s) we are using, so we went ahead with URL encryption. We used
>>> standard approach as described in examples:
>>>
>>> @Override
>>> protected IRequestCycleProcessor newRequestCycleProcessor() {
>>>
>>> return new WebRequestCycleProcessor(){
>>>  protected IRequestCodingStrategy newRequestCodingStrategy(){
>>>        return new CryptedUrlWebRequestCodingStrategy(new
>>> WebRequestCodingStrategy());
>>>       }
>>> };
>>>
>>> }
>>>
>>>
>>> Unfortunately I later discovered that this approach doesn't encrypt resource
>>> URLs, e.g. from:
>>> CSSPackageResource.getHeaderContribution(..);
>>> or
>>> link.add(new Image("logoImage"));
>>>
>>> What's worse such resource references include FQN of related classes.
>>>
>>>
>>> After some investigation I found out that the problem is that
>>> CryptedUrlWebRequestCodingStrategy only encrypts arguments string of the URL
>>> and WebRequestCodingStrategy encodes resource references as path rather than
>>> as argument.
>>>
>>> I was able to get around this by subclassing WebRequestCodingStrategy and
>>> overriding methods:
>>> addResourceParameters(..);
>>> encode(RequestCycle requestCycle, ISharedResourceRequestTarget
>>> requestTarget);
>>> to use arguments rather than path as resource reference.
>>>
>>>
>>> However I'm unsure as to original reasoning behind original
>>> CryptedUrlWebRequestCodingStrategy and WebRequestCodingStrategy. Is the
>>> resource behaviour simply a bug? Or is it there for some reason that is
>>> going to bite me down the road if I use my own 'fix'?
>>>
>>>
>>> Best regards,
>>> Sergey
>>>
>>> -
>>> 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
>>
>>
>
>
>
> --
> take your photos everywhere you go - https://www.memolio.com
> follow us on Twitter - http://twitter.com/Memolio
>
> -
> 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



AW: get set attribute wicket session

2010-01-21 Thread Giambalvo, Christian
Hi,

with getSession() you will always get the session attached to the current 
request.
So yes it is session specific.

Greets chris


-Ursprüngliche Nachricht-
Von: Martin Asenov [mailto:mase...@velti.com] 
Gesendet: Donnerstag, 21. Januar 2010 16:44
An: users@wicket.apache.org
Betreff: get set attribute wicket session 

Hello, everyone!

I would like to ask if:

-I've got an AuthenticatedWebSession implementation and there I have the fields
 -field1
 -field2

with getters and setters.

After that somewhere in my code, no matter where I say 
((MySessionImpl)getSession()).getField1() will I get session specific 
attribute, since there are no set/getAttribute() methods for the session.

I want to save session specific attributes in that manner, is this the correct 
way to do so?

Thanks,


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



get set attribute wicket session

2010-01-21 Thread Martin Asenov
Hello, everyone!

I would like to ask if:

-I've got an AuthenticatedWebSession implementation and there I have the fields
 -field1
 -field2

with getters and setters.

After that somewhere in my code, no matter where I say 
((MySessionImpl)getSession()).getField1() will I get session specific 
attribute, since there are no set/getAttribute() methods for the session.

I want to save session specific attributes in that manner, is this the correct 
way to do so?

Thanks,



Re: Component hierarchy question

2010-01-21 Thread Alexander Monakhov
Hi.

I'm not sure. But when you call add() method you pass reference to the
certain component. If you create new object and assign reference to it, you
just create reference to new object, but old one references to old object.
For example,

// here is new component creation
1. Component c = new Component(  );
2. add( c );// add to component tree

3. c = new Component( .. );//initialize another component
4. replaceWith( c );// replace old component with new one

if are you asking why sould 4th lines be invoked, the question is simple,
you have to push reference to new component to component tree. If you are
why doesn't it work with out 4th, try to read about references in Java.

Best regards, Alexander.


CryptedUrlWebRequestCodingStrategy and setResponsePage

2010-01-21 Thread Giambalvo, Christian
Hi all,

just a question to url encryption.

I added following section to my application class 

/**
 * @see
org.apache.wicket.authentication.AuthenticatedWebApplication#newRequestC
ycleProcessor()
 */
@Override
protected IRequestCycleProcessor newRequestCycleProcessor() {
return new WebRequestCycleProcessor() {
@Override
protected IRequestCodingStrategy newRequestCodingStrategy()
{
return new CryptedUrlWebRequestCodingStrategy(new
WebRequestCodingStrategy());
}
};
}

And implemented ICryptFactory like this

  this.getSecuritySettings().setCryptFactory(new ICryptFactory() {

@Override
public ICrypt newCrypt() {
return new AbstractCrypt() {

@Override
protected byte[] crypt(final byte[] input, final
int mode) throws GeneralSecurityException {

}
};
}
});

Urls are now crypted if using links. But if I use setResponsePage the
url is in clearText.
Am I missing something or why aren't they crypted?

Greets Chris

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



Re: Adding child to parent component

2010-01-21 Thread Muro Copenhagen
And this is link explains it pretty good:
http://cwiki.apache.org/WICKET/markup-inheritance.html

On Thu, Jan 21, 2010 at 2:25 PM, Muro Copenhagen wrote:

> Hi
>
> I think i found a solution...
>
> I was looking for something like this:
> http://old.nabble.com/panel-wicket:extend-confusion-td22862369.html
> http://www.mail-archive.com/wicket-u...@lists.sourceforge.net/msg15151.html
>
> So i think the transparent resolver should fix my problem...
>
> Best Regards...
> Muro
>
>
> On Thu, Jan 21, 2010 at 2:10 PM, Muro Copenhagen wrote:
>
>> Thanks for the answer
>>
>> It's not exactly what i mean...But if you look at the provided example...
>>
>> What if you wanted the child to be placed insided a component on the
>> parent...
>>
>> something like:
>>
>> 
>>   
>> 
>>
>> In example you provided the child is not placed inside a component added
>> to the parent, rather its at top level:
>> 
>>   
>> 
>>
>> Could this be achieved ... ?
>> Best Regards
>> Muro...
>>
>>
>> On Thu, Jan 21, 2010 at 1:21 PM, Stefan Droog  wrote:
>>
>>> Is this what you mean?
>>> http://wicket.apache.org/examplemarkupinheritance.html
>>>
>>>
>>> -Original Message-
>>> From: Muro Copenhagen [mailto:copenha...@gmail.com]
>>> Sent: Thursday, January 21, 2010 1:16 PM
>>> To: users@wicket.apache.org
>>> Subject: Adding child to parent component
>>>
>>> Hi,
>>>
>>> Can anyone tell me if it is possible to extend a panel, and adding the
>>> child
>>> panel inside a component of the parent panel.
>>>
>>> So i'm looking for something like this:
>>>
>>> Parent extends Panel {
>>>
>>>public Parent (String id) {
>>>super(id);
>>>WebMarkupContainer div = new WebMarkupContainer("myDiv");
>>>add(div);
>>>}
>>> }
>>>
>>> Child extends Parent {
>>>public Child (String id) {
>>>super(id);
>>>add(new Label("label", "HelloWorld");
>>> }
>>>
>>> Then the web part of the Parent panel should be something like:
>>>
>>> 
>>>   
>>> 
>>>
>>>
>>> So how to add the child to a component on the parent rather than adding
>>> on
>>> head level ?
>>>
>>> Any ideas ?
>>>
>>> Best Regards
>>> Muro
>>>
>>> The information contained in this communication is confidential, intended
>>> solely for the use of the individual or entity to whom it is addressed and
>>> may be legally privileged and protected by professional secrecy. Access to
>>> this message by anyone else is unauthorized. If you are not the intended
>>> recipient, any disclosure, copying, or distribution of the message, or any
>>> action or omission taken by you in reliance on it is prohibited and may be
>>> unlawful. Please immediately contact the sender if you have received this
>>> message in error. This email does not constitute any commitment from Cordys
>>> Holding BV or any of its subsidiaries except when expressly agreed in a
>>> written agreement between the intended recipient and Cordys Holding BV or
>>> its subsidiaries. Cordys is neither liable for the proper and complete
>>> transmission of the information contained in this communication nor for any
>>> delay in its receipt. Cordys does not guarantee that the integrity of this
>>> communication has been maintained nor that the communication is free of
>>> viruses, interceptions or interference. If you are not the intended
>>> recipient of this communication please return the communication to the
>>> sender and delete and destroy all copies.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>


Re: wicket bench in eclipse

2010-01-21 Thread Swanthe Lindgren
We are using Galileo and m2eclipse (Maven) with Wicket bench, no 
problem, but we are only using wicket bench when creating new pages and 
panels as a lazy way to get both the java and html file.


//Swanthe

On 2010-01-21 04:48, Lionel Port wrote:

Hi Guys,

Not strictly a wicket question, I know. Does anyone have wicket bench
working in Galileo or recent version of eclipse or know of a good
plugin I should be using?. My project has a maven structure, not sure
if thats why it doesn't work.


regards,
Lionel

-
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: Adding child to parent component

2010-01-21 Thread Muro Copenhagen
Hi

I think i found a solution...

I was looking for something like this:
http://old.nabble.com/panel-wicket:extend-confusion-td22862369.html
http://www.mail-archive.com/wicket-u...@lists.sourceforge.net/msg15151.html

So i think the transparent resolver should fix my problem...

Best Regards...
Muro


On Thu, Jan 21, 2010 at 2:10 PM, Muro Copenhagen wrote:

> Thanks for the answer
>
> It's not exactly what i mean...But if you look at the provided example...
>
> What if you wanted the child to be placed insided a component on the
> parent...
>
> something like:
>
> 
>   
> 
>
> In example you provided the child is not placed inside a component added to
> the parent, rather its at top level:
> 
>   
> 
>
> Could this be achieved ... ?
> Best Regards
> Muro...
>
>
> On Thu, Jan 21, 2010 at 1:21 PM, Stefan Droog  wrote:
>
>> Is this what you mean?
>> http://wicket.apache.org/examplemarkupinheritance.html
>>
>>
>> -Original Message-
>> From: Muro Copenhagen [mailto:copenha...@gmail.com]
>> Sent: Thursday, January 21, 2010 1:16 PM
>> To: users@wicket.apache.org
>> Subject: Adding child to parent component
>>
>> Hi,
>>
>> Can anyone tell me if it is possible to extend a panel, and adding the
>> child
>> panel inside a component of the parent panel.
>>
>> So i'm looking for something like this:
>>
>> Parent extends Panel {
>>
>>public Parent (String id) {
>>super(id);
>>WebMarkupContainer div = new WebMarkupContainer("myDiv");
>>add(div);
>>}
>> }
>>
>> Child extends Parent {
>>public Child (String id) {
>>super(id);
>>add(new Label("label", "HelloWorld");
>> }
>>
>> Then the web part of the Parent panel should be something like:
>>
>> 
>>   
>> 
>>
>>
>> So how to add the child to a component on the parent rather than adding on
>> head level ?
>>
>> Any ideas ?
>>
>> Best Regards
>> Muro
>>
>> The information contained in this communication is confidential, intended
>> solely for the use of the individual or entity to whom it is addressed and
>> may be legally privileged and protected by professional secrecy. Access to
>> this message by anyone else is unauthorized. If you are not the intended
>> recipient, any disclosure, copying, or distribution of the message, or any
>> action or omission taken by you in reliance on it is prohibited and may be
>> unlawful. Please immediately contact the sender if you have received this
>> message in error. This email does not constitute any commitment from Cordys
>> Holding BV or any of its subsidiaries except when expressly agreed in a
>> written agreement between the intended recipient and Cordys Holding BV or
>> its subsidiaries. Cordys is neither liable for the proper and complete
>> transmission of the information contained in this communication nor for any
>> delay in its receipt. Cordys does not guarantee that the integrity of this
>> communication has been maintained nor that the communication is free of
>> viruses, interceptions or interference. If you are not the intended
>> recipient of this communication please return the communication to the
>> sender and delete and destroy all copies.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Adding child to parent component

2010-01-21 Thread Muro Copenhagen
Thanks for the answer

It's not exactly what i mean...But if you look at the provided example...

What if you wanted the child to be placed insided a component on the
parent...

something like:


  


In example you provided the child is not placed inside a component added to
the parent, rather its at top level:

  


Could this be achieved ... ?
Best Regards
Muro...

On Thu, Jan 21, 2010 at 1:21 PM, Stefan Droog  wrote:

> Is this what you mean?
> http://wicket.apache.org/examplemarkupinheritance.html
>
>
> -Original Message-
> From: Muro Copenhagen [mailto:copenha...@gmail.com]
> Sent: Thursday, January 21, 2010 1:16 PM
> To: users@wicket.apache.org
> Subject: Adding child to parent component
>
> Hi,
>
> Can anyone tell me if it is possible to extend a panel, and adding the
> child
> panel inside a component of the parent panel.
>
> So i'm looking for something like this:
>
> Parent extends Panel {
>
>public Parent (String id) {
>super(id);
>WebMarkupContainer div = new WebMarkupContainer("myDiv");
>add(div);
>}
> }
>
> Child extends Parent {
>public Child (String id) {
>super(id);
>add(new Label("label", "HelloWorld");
> }
>
> Then the web part of the Parent panel should be something like:
>
> 
>   
> 
>
>
> So how to add the child to a component on the parent rather than adding on
> head level ?
>
> Any ideas ?
>
> Best Regards
> Muro
>
> The information contained in this communication is confidential, intended
> solely for the use of the individual or entity to whom it is addressed and
> may be legally privileged and protected by professional secrecy. Access to
> this message by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it is prohibited and may be
> unlawful. Please immediately contact the sender if you have received this
> message in error. This email does not constitute any commitment from Cordys
> Holding BV or any of its subsidiaries except when expressly agreed in a
> written agreement between the intended recipient and Cordys Holding BV or
> its subsidiaries. Cordys is neither liable for the proper and complete
> transmission of the information contained in this communication nor for any
> delay in its receipt. Cordys does not guarantee that the integrity of this
> communication has been maintained nor that the communication is free of
> viruses, interceptions or interference. If you are not the intended
> recipient of this communication please return the communication to the
> sender and delete and destroy all copies.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Ernesto Reinaldo Barreiro
I would use timer as comet introduces additional dependencies...

I have used comet-push for other things but not via  wicket-stuff project.
Thus, I can't offer any help.

Ernesto

On Thu, Jan 21, 2010 at 1:07 PM, Carlo Camerino wrote:

> no prob.
>
> i was thinking, if was going to do timerbehaior approach, might as well go
> with comet
>
> have any of you guys used comet for this kind of situation before?
>
> thanks
> carlo
>
> On Thu, Jan 21, 2010 at 3:54 AM, Jeroen Steenbeeke  gmail.com> wrote:
>
> > My apologies, that is a class we use internally. Must have confused it
> > with some basic wicket class.
> >
> > You can use AbstractAjaxTimerBehavior to similar effect. Just override
> > the onTimer method
> >
> > 2010/1/21 Carlo Camerino :
> > > where do i get this class?
> > >
> > > AjaxStoppableSelfUpdatingTimer ?
> > > On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino <
> > carlo.camer...@gmail.com>wrote:
> > >
> > >> hi,
> > >>
> > >> please do.
> > >>
> > >> thanks a lot!
> > >>
> > >>
> > >> On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro <
> > >> reier...@gmail.com> wrote:
> > >>
> > >>> Carlo,
> > >>>
> > >>> If you need some code illustrating  how to do this, I can mail you
> the
> > >>> source code of a similar use case: creating a lengthy PDF and
> providing
> > >>> users with progress feedback... It uses the same approach Jeroen
> > >>> mentioned.
> > >>>
> > >>> Best,
> > >>>
> > >>> Ernesto
> > >>>
> > >>> On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke  @
> > >>> gmail.com> wrote:
> > >>>
> > >>> > If you do it my way, then you don't have to
> > >>> >
> > >>> > 2010/1/21 Carlo Camerino :
> > >>> > > is there anyway that i could just kill the previous thread?
> > >>> > >
> > >>> > > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
> > >>> > carlo.camer...@gmail.com>wrote:
> > >>> > >
> > >>> > >> if i can't do this, is there anyway that i could at least
> increase
> > >>> the
> > >>> > >> timeout of the pagemap to greater than 1 minute?
> > >>> > >> 1 minute would be too little i guess
> > >>> > >>
> > >>> > >>
> > >>> > >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
> > >>> > >> reier...@gmail.com> wrote:
> > >>> > >>
> > >>> > >>> Why not follow the Jeroen's suggestion instead of trying to
> trick
> > >>> > >>> framework
> > >>> > >>> internals?
> > >>> > >>>
> > >>> > >>> Ernesto
> > >>> > >>>
> > >>> > >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
> > >>> > >>> wrote:
> > >>> > >>>
> > >>> > >>> > hi,
> > >>> > >>> >
> > >>> > >>> > i believe this is due to the fact that wicket has
> synchronized
> > >>> page
> > >>> > maps
> > >>> > >>> > for
> > >>> > >>> > access.
> > >>> > >>> >
> > >>> > >>> > do you think it is safe to remove it?
> > >>> > >>> > what are the precautions when removing synchronized for
> wicket
> > >>> page
> > >>> > >>> maps?
> > >>> > >>> >
> > >>> > >>> > Is there a setting that I could use to disable this?
> > >>> > >>> >
> > >>> > >>> > Thanks A Lot
> > >>> > >>> >
> > >>> > >>> > Carlo
> > >>> > >>> >
> > >>> > >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke <
> > >>> j.steenbeeke.ml@
> > >>> > >>> > gmail.com> wrote:
> > >>> > >>> >
> > >>> > >>> > > I'd suggest running the transaction in the background
> > (separate
> > >>> > >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to
> > >>> periodically
> > >>> > >>> > > check if the thread was finished and only do the redirect
> > after
> > >>> > >>> > > finishing. This way, the pagemap remains unlocked.
> > >>> > >>> > >
> > >>> > >>> > > 2010/1/21 Carlo Camerino :
> > >>> > >>> > > > Hi,
> > >>> > >>> > > >
> > >>> > >>> > > > if any of you could help, we have a problem in one of our
> > >>> wicket
> > >>> > >>> > > > installations. We have a system that connects to another
> > >>> system.
> > >>> > >>> > > Sometimes
> > >>> > >>> > > > the system's reply lasts for more than a minute.
> > >>> > >>> > > > Wicket is having problem with regards to the page map
> being
> > >>> > locked.
> > >>> > >>> > > >
> > >>> > >>> > > > I click for example on a page to request for a balance,
> the
> > >>> host
> > >>> > >>> > doesn't
> > >>> > >>> > > > return anymessage for about 1 minute or more.
> > >>> > >>> > > >
> > >>> > >>> > > > So instead of waiting, i will try to move to another
> page,
> > >>> > problem
> > >>> > >>> > is...
> > >>> > >>> > > i
> > >>> > >>> > > > can't switch pages. wicket seems to have locked the
> > page
> > >>> map
> > >>> > and
> > >>> > >>> i
> > >>> > >>> > > can't
> > >>> > >>> > > > get out or even logout.
> > >>> > >>> > > >
> > >>> > >>> > > > After  a minute, an exception is thrown saying that the
> > page
> > >>> map
> > >>> > may
> > >>> > >>> > have
> > >>> > >>> > > > been locked for more than 1 minute
> > >>> > >>> > > >
> > >>> > >>> > > > is there any way around this?
> > >>> > >>> > > >
> > >>> > >>> > > > Thanks A Lot
> > >>> > >>> > > > Carlo
> > >>> > >>> > > >
> > >>> > >>> > >
> > >>> > >>> > >
> > >>> > >>> > >

Re: Cannot get default invisible TextField's ModelObject ?

2010-01-21 Thread Chuck Brinkman
I looked some more and found the following:

When it works, with my modification, FormComponent.getInputAsArray tries to
get parameters for the TextField named "more:moreForm:textfield".  I looked
in the parameter map or the RequestFacade object and found these:
wicket:interface, wicket:ignoreIfNotActive, random, more:moreForm:textfield,
radioGroup and more:moreForm:submit.  And it finds the TextField.

The version that fails is looking for TextField named "more:textfield".  The
RequestFacade object has: wicket:interface, wicket:ignoreIfNotActive,
random, forma_hf_0, radioGroup and more:submit.  Is there a problem with
"forma_hf_0?



On Thu, Jan 21, 2010 at 7:35 AM, smallufo  wrote:

> Yes , indeed , if the form is in the second row (default invisible) , it
> works , But I cannot get the first row's data (such as radioGroup's model
> object will become null ).
> Moreover ,  Form with multiple row , with something visible and something
> extensible (default invisible), it is not so rare.
> If the form is not inside a ListView , it will work.
> But it just fails if it is inside a  ListView.
>
> 2010/1/21 Chuck Brinkman 
>
> > I stepped through the code and found that the convertedInput is null when
> > processing submit.  I didn't see anything that looked like an error
> message
> > from wicket.I look forward to seeing what the wicket developers have
> to
> > say.
> >
> > I'm just a new wicket user but was interested in this issue.  I also
> found
> > that if you make the following changes it will work.
> >
> >
> > **
> >  >wicket:id="textfield" />
> > > wicket:id="submit" />
> >* *
> >
> >
> >
> >
> >*Form moreForm = new Form("moreForm");
> >more.add(moreForm);*
> > final TextField textfield = new
> TextField(
> >"textfield", new Model());
> > *moreForm*.add(textfield);
> > AjaxButton button = new AjaxButton("submit") {
> >@Override
> >protected void onSubmit(AjaxRequestTarget arg0,
> Form
> > form) {
> >System.out.println("radioGroup = "
> >+ radioGroup.getModelObject()
> >+ " , textfield.getModelObject() = "
> >+ textfield.getModelObject());
> >}
> >};
> > *moreForm*.add(button);
> >
> >
> > On Wed, Jan 20, 2010 at 10:47 PM, smallufo  wrote:
> >
> > > This is a full functional Page  :
> > >
> > > I found this problem only occurs when the form is in the listView :
> > > If I move the form out of the listView , it works like a charm.
> > > Bug ? I am not sure...
> > >
> > > The link is the screen capture :
> > > http://xs.to/image-B859_4B57CDD0.gif
> > >
> > >
> > > MyPage.html
> > >
> > > 
> > >  
> > >name
> > >more ?
> > >  
> > >  
> > >
> > >  
> > >[name]
> > >
> > >  
> > >yes
> > >no
> > >  
> > >
> > >  
> > >  
> > >
> > >   > > wicket:id="textfield"/>
> > >  
> > >
> > >  
> > >
> > >  
> > > 
> > >
> > >
> > > MyPage.java
> > >
> > > package quickstart.ajax;
> > >
> > > import java.util.ArrayList;
> > > import java.util.List;
> > >
> > > import org.apache.wicket.ajax.AjaxEventBehavior;
> > > import org.apache.wicket.ajax.AjaxRequestTarget;
> > > import org.apache.wicket.ajax.markup.html.form.AjaxButton;
> > > import org.apache.wicket.markup.html.WebMarkupContainer;
> > > import org.apache.wicket.markup.html.WebPage;
> > > import org.apache.wicket.markup.html.basic.Label;
> > > import org.apache.wicket.markup.html.form.Form;
> > > import org.apache.wicket.markup.html.form.Radio;
> > > import org.apache.wicket.markup.html.form.RadioGroup;
> > > import org.apache.wicket.markup.html.form.TextField;
> > > import org.apache.wicket.markup.html.list.ListItem;
> > > import org.apache.wicket.markup.html.list.ListView;
> > > import org.apache.wicket.model.Model;
> > >
> > > public class MyPage extends WebPage
> > > {
> > >  private final static List names = new ArrayList();
> > >  static
> > >  {
> > >names.add("Andy");
> > >names.add("Brian");
> > >names.add("Carol");
> > >  }
> > >
> > >  public MyPage()
> > >  {
> > >ListView listView = new ListView("listView" , names)
> > >{
> > >  @Override
> > >  protected void populateItem(ListItem item)
> > >  {
> > >
> > >Form form = new Form("form");
> > >item.add(form);
> > >
> > >String name = item.getModelObject();
> > >
> > >form.add(new Label("name" , name));
> > >
> > >final WebMarkupContainer more = new WebMarkupConta

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
Afraid not, but I believe wicketstuff-push is integrated with comet.

2010/1/21 Carlo Camerino :
> no prob.
>
> i was thinking, if was going to do timerbehaior approach, might as well go
> with comet
>
> have any of you guys used comet for this kind of situation before?
>
> thanks
> carlo
>
> On Thu, Jan 21, 2010 at 3:54 AM, Jeroen Steenbeeke  gmail.com> wrote:
>
>> My apologies, that is a class we use internally. Must have confused it
>> with some basic wicket class.
>>
>> You can use AbstractAjaxTimerBehavior to similar effect. Just override
>> the onTimer method
>>
>> 2010/1/21 Carlo Camerino :
>> > where do i get this class?
>> >
>> > AjaxStoppableSelfUpdatingTimer ?
>> > On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino <
>> carlo.camer...@gmail.com>wrote:
>> >
>> >> hi,
>> >>
>> >> please do.
>> >>
>> >> thanks a lot!
>> >>
>> >>
>> >> On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro <
>> >> reier...@gmail.com> wrote:
>> >>
>> >>> Carlo,
>> >>>
>> >>> If you need some code illustrating  how to do this, I can mail you the
>> >>> source code of a similar use case: creating a lengthy PDF and providing
>> >>> users with progress feedback... It uses the same approach Jeroen
>> >>> mentioned.
>> >>>
>> >>> Best,
>> >>>
>> >>> Ernesto
>> >>>
>> >>> On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke > >>> gmail.com> wrote:
>> >>>
>> >>> > If you do it my way, then you don't have to
>> >>> >
>> >>> > 2010/1/21 Carlo Camerino :
>> >>> > > is there anyway that i could just kill the previous thread?
>> >>> > >
>> >>> > > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
>> >>> > carlo.camer...@gmail.com>wrote:
>> >>> > >
>> >>> > >> if i can't do this, is there anyway that i could at least increase
>> >>> the
>> >>> > >> timeout of the pagemap to greater than 1 minute?
>> >>> > >> 1 minute would be too little i guess
>> >>> > >>
>> >>> > >>
>> >>> > >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
>> >>> > >> reier...@gmail.com> wrote:
>> >>> > >>
>> >>> > >>> Why not follow the Jeroen's suggestion instead of trying to trick
>> >>> > >>> framework
>> >>> > >>> internals?
>> >>> > >>>
>> >>> > >>> Ernesto
>> >>> > >>>
>> >>> > >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
>> >>> > >>> wrote:
>> >>> > >>>
>> >>> > >>> > hi,
>> >>> > >>> >
>> >>> > >>> > i believe this is due to the fact that wicket has synchronized
>> >>> page
>> >>> > maps
>> >>> > >>> > for
>> >>> > >>> > access.
>> >>> > >>> >
>> >>> > >>> > do you think it is safe to remove it?
>> >>> > >>> > what are the precautions when removing synchronized for wicket
>> >>> page
>> >>> > >>> maps?
>> >>> > >>> >
>> >>> > >>> > Is there a setting that I could use to disable this?
>> >>> > >>> >
>> >>> > >>> > Thanks A Lot
>> >>> > >>> >
>> >>> > >>> > Carlo
>> >>> > >>> >
>> >>> > >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke <
>> >>> j.steenbeeke.ml@
>> >>> > >>> > gmail.com> wrote:
>> >>> > >>> >
>> >>> > >>> > > I'd suggest running the transaction in the background
>> (separate
>> >>> > >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to
>> >>> periodically
>> >>> > >>> > > check if the thread was finished and only do the redirect
>> after
>> >>> > >>> > > finishing. This way, the pagemap remains unlocked.
>> >>> > >>> > >
>> >>> > >>> > > 2010/1/21 Carlo Camerino :
>> >>> > >>> > > > Hi,
>> >>> > >>> > > >
>> >>> > >>> > > > if any of you could help, we have a problem in one of our
>> >>> wicket
>> >>> > >>> > > > installations. We have a system that connects to another
>> >>> system.
>> >>> > >>> > > Sometimes
>> >>> > >>> > > > the system's reply lasts for more than a minute.
>> >>> > >>> > > > Wicket is having problem with regards to the page map being
>> >>> > locked.
>> >>> > >>> > > >
>> >>> > >>> > > > I click for example on a page to request for a balance, the
>> >>> host
>> >>> > >>> > doesn't
>> >>> > >>> > > > return anymessage for about 1 minute or more.
>> >>> > >>> > > >
>> >>> > >>> > > > So instead of waiting, i will try to move to another page,
>> >>> > problem
>> >>> > >>> > is...
>> >>> > >>> > > i
>> >>> > >>> > > > can't switch pages. wicket seems to have locked the
>> page
>> >>> map
>> >>> > and
>> >>> > >>> i
>> >>> > >>> > > can't
>> >>> > >>> > > > get out or even logout.
>> >>> > >>> > > >
>> >>> > >>> > > > After  a minute, an exception is thrown saying that the
>> page
>> >>> map
>> >>> > may
>> >>> > >>> > have
>> >>> > >>> > > > been locked for more than 1 minute
>> >>> > >>> > > >
>> >>> > >>> > > > is there any way around this?
>> >>> > >>> > > >
>> >>> > >>> > > > Thanks A Lot
>> >>> > >>> > > > Carlo
>> >>> > >>> > > >
>> >>> > >>> > >
>> >>> > >>> > >
>> >>> > >>> > >
>> >>> > >>> > > --
>> >>> > >>> > > Jeroen Steenbeeke
>> >>> > >>> > > www.fortuityframework.com
>> >>> > >>> > >
>> >>> > >>> > >
>> >>> > -
>> >>> > >>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >>> > >>

AutoCompleteTextField and HTML Encoding question (1.4.4)

2010-01-21 Thread Leon Nieuwoudt
Hi :)

I'm trying to use a AutoCompleteTextField that shows a list of E-Mail
addresses. The problem I'm running into is that the "<" character is causing
rendering issues, for example: John Doe .

I've already bypassed the selection list rendering problem by using a custom
renderer (code below), but now when I select an entry it only copies the
first part up to the "<" into the textbox.

Any quick way around it?

Thanks in advance



private class KeyRenderer extends AbstractAutoCompleteTextRenderer {
@Override
protected String getTextValue(Key object) {
return Strings.escapeMarkup(object.getName()).toString();
}
}

...

add(new AutoCompleteTextField("key", model, new KeyRenderer()) {
   @Override
protected Iterator getChoices(String input) {
return keyService.getPublicKeyFor(input).iterator();
   }
});




Re: Cannot get default invisible TextField's ModelObject ?

2010-01-21 Thread smallufo
Yes , indeed , if the form is in the second row (default invisible) , it
works , But I cannot get the first row's data (such as radioGroup's model
object will become null ).
Moreover ,  Form with multiple row , with something visible and something
extensible (default invisible), it is not so rare.
If the form is not inside a ListView , it will work.
But it just fails if it is inside a  ListView.

2010/1/21 Chuck Brinkman 

> I stepped through the code and found that the convertedInput is null when
> processing submit.  I didn't see anything that looked like an error message
> from wicket.I look forward to seeing what the wicket developers have to
> say.
>
> I'm just a new wicket user but was interested in this issue.  I also found
> that if you make the following changes it will work.
>
>
> **
> wicket:id="textfield" />
> wicket:id="submit" />
>* *
>
>
>
>
>*Form moreForm = new Form("moreForm");
>more.add(moreForm);*
> final TextField textfield = new TextField(
>"textfield", new Model());
> *moreForm*.add(textfield);
> AjaxButton button = new AjaxButton("submit") {
>@Override
>protected void onSubmit(AjaxRequestTarget arg0, Form
> form) {
>System.out.println("radioGroup = "
>+ radioGroup.getModelObject()
>+ " , textfield.getModelObject() = "
>+ textfield.getModelObject());
>}
>};
> *moreForm*.add(button);
>
>
> On Wed, Jan 20, 2010 at 10:47 PM, smallufo  wrote:
>
> > This is a full functional Page  :
> >
> > I found this problem only occurs when the form is in the listView :
> > If I move the form out of the listView , it works like a charm.
> > Bug ? I am not sure...
> >
> > The link is the screen capture :
> > http://xs.to/image-B859_4B57CDD0.gif
> >
> >
> > MyPage.html
> >
> > 
> >  
> >name
> >more ?
> >  
> >  
> >
> >  
> >[name]
> >
> >  
> >yes
> >no
> >  
> >
> >  
> >  
> >
> >   > wicket:id="textfield"/>
> >  
> >
> >  
> >
> >  
> > 
> >
> >
> > MyPage.java
> >
> > package quickstart.ajax;
> >
> > import java.util.ArrayList;
> > import java.util.List;
> >
> > import org.apache.wicket.ajax.AjaxEventBehavior;
> > import org.apache.wicket.ajax.AjaxRequestTarget;
> > import org.apache.wicket.ajax.markup.html.form.AjaxButton;
> > import org.apache.wicket.markup.html.WebMarkupContainer;
> > import org.apache.wicket.markup.html.WebPage;
> > import org.apache.wicket.markup.html.basic.Label;
> > import org.apache.wicket.markup.html.form.Form;
> > import org.apache.wicket.markup.html.form.Radio;
> > import org.apache.wicket.markup.html.form.RadioGroup;
> > import org.apache.wicket.markup.html.form.TextField;
> > import org.apache.wicket.markup.html.list.ListItem;
> > import org.apache.wicket.markup.html.list.ListView;
> > import org.apache.wicket.model.Model;
> >
> > public class MyPage extends WebPage
> > {
> >  private final static List names = new ArrayList();
> >  static
> >  {
> >names.add("Andy");
> >names.add("Brian");
> >names.add("Carol");
> >  }
> >
> >  public MyPage()
> >  {
> >ListView listView = new ListView("listView" , names)
> >{
> >  @Override
> >  protected void populateItem(ListItem item)
> >  {
> >
> >Form form = new Form("form");
> >item.add(form);
> >
> >String name = item.getModelObject();
> >
> >form.add(new Label("name" , name));
> >
> >final WebMarkupContainer more = new WebMarkupContainer("more");
> >more.setVisible(false);
> >more.setOutputMarkupPlaceholderTag(true);
> >form.add(more);
> >
> >
> >final RadioGroup radioGroup = new
> > RadioGroup("radioGroup" , Model.of(Boolean.FALSE));
> >form.add(radioGroup);
> >
> >Radio yes = new Radio("yes" ,
> > Model.of(Boolean.TRUE));
> >Radio no = new Radio("no" ,
> > Model.of(Boolean.FALSE));
> >radioGroup.add(yes);
> >radioGroup.add(no);
> >
> >yes.add(new AjaxEventBehavior("onClick")
> >{
> >  @Override
> >  protected void onEvent(AjaxRequestTarget target)
> >  {
> >more.setVisible(true);
> >target.addComponent(more);
> >  }
> >});
> >
> >no.add(new AjaxEventBehavior("onClick")
> >{
> >  @Override
> >  protected void onEvent(AjaxRequestTarget target)
> >  {
> >more.setVisible(false);
> >

RE: Adding child to parent component

2010-01-21 Thread Stefan Droog
Is this what you mean?
http://wicket.apache.org/examplemarkupinheritance.html


-Original Message-
From: Muro Copenhagen [mailto:copenha...@gmail.com]
Sent: Thursday, January 21, 2010 1:16 PM
To: users@wicket.apache.org
Subject: Adding child to parent component

Hi,

Can anyone tell me if it is possible to extend a panel, and adding the child
panel inside a component of the parent panel.

So i'm looking for something like this:

Parent extends Panel {

public Parent (String id) {
super(id);
WebMarkupContainer div = new WebMarkupContainer("myDiv");
add(div);
}
}

Child extends Parent {
public Child (String id) {
super(id);
add(new Label("label", "HelloWorld");
}

Then the web part of the Parent panel should be something like:


   



So how to add the child to a component on the parent rather than adding on
head level ?

Any ideas ?

Best Regards
Muro

The information contained in this communication is confidential, intended 
solely for the use of the individual or entity to whom it is addressed and may 
be legally privileged and protected by professional secrecy. Access to this 
message by anyone else is unauthorized. If you are not the intended recipient, 
any disclosure, copying, or distribution of the message, or any action or 
omission taken by you in reliance on it is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this message in 
error. This email does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written agreement 
between the intended recipient and Cordys Holding BV or its subsidiaries. 
Cordys is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt. 
Cordys does not guarantee that the integrity of this communication has been 
maintained nor that the communication is free of viruses, interceptions or 
interference. If you are not the intended recipient of this communication 
please return the communication to the sender and delete and destroy all copies.

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



Adding child to parent component

2010-01-21 Thread Muro Copenhagen
Hi,

Can anyone tell me if it is possible to extend a panel, and adding the child
panel inside a component of the parent panel.

So i'm looking for something like this:

Parent extends Panel {

public Parent (String id) {
super(id);
WebMarkupContainer div = new WebMarkupContainer("myDiv");
add(div);
}
}

Child extends Parent {
public Child (String id) {
super(id);
add(new Label("label", "HelloWorld");
}

Then the web part of the Parent panel should be something like:


   



So how to add the child to a component on the parent rather than adding on
head level ?

Any ideas ?

Best Regards
Muro


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
no prob.

i was thinking, if was going to do timerbehaior approach, might as well go
with comet

have any of you guys used comet for this kind of situation before?

thanks
carlo

On Thu, Jan 21, 2010 at 3:54 AM, Jeroen Steenbeeke  wrote:

> My apologies, that is a class we use internally. Must have confused it
> with some basic wicket class.
>
> You can use AbstractAjaxTimerBehavior to similar effect. Just override
> the onTimer method
>
> 2010/1/21 Carlo Camerino :
> > where do i get this class?
> >
> > AjaxStoppableSelfUpdatingTimer ?
> > On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino <
> carlo.camer...@gmail.com>wrote:
> >
> >> hi,
> >>
> >> please do.
> >>
> >> thanks a lot!
> >>
> >>
> >> On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro <
> >> reier...@gmail.com> wrote:
> >>
> >>> Carlo,
> >>>
> >>> If you need some code illustrating  how to do this, I can mail you the
> >>> source code of a similar use case: creating a lengthy PDF and providing
> >>> users with progress feedback... It uses the same approach Jeroen
> >>> mentioned.
> >>>
> >>> Best,
> >>>
> >>> Ernesto
> >>>
> >>> On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke  >>> gmail.com> wrote:
> >>>
> >>> > If you do it my way, then you don't have to
> >>> >
> >>> > 2010/1/21 Carlo Camerino :
> >>> > > is there anyway that i could just kill the previous thread?
> >>> > >
> >>> > > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
> >>> > carlo.camer...@gmail.com>wrote:
> >>> > >
> >>> > >> if i can't do this, is there anyway that i could at least increase
> >>> the
> >>> > >> timeout of the pagemap to greater than 1 minute?
> >>> > >> 1 minute would be too little i guess
> >>> > >>
> >>> > >>
> >>> > >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
> >>> > >> reier...@gmail.com> wrote:
> >>> > >>
> >>> > >>> Why not follow the Jeroen's suggestion instead of trying to trick
> >>> > >>> framework
> >>> > >>> internals?
> >>> > >>>
> >>> > >>> Ernesto
> >>> > >>>
> >>> > >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
> >>> > >>> wrote:
> >>> > >>>
> >>> > >>> > hi,
> >>> > >>> >
> >>> > >>> > i believe this is due to the fact that wicket has synchronized
> >>> page
> >>> > maps
> >>> > >>> > for
> >>> > >>> > access.
> >>> > >>> >
> >>> > >>> > do you think it is safe to remove it?
> >>> > >>> > what are the precautions when removing synchronized for wicket
> >>> page
> >>> > >>> maps?
> >>> > >>> >
> >>> > >>> > Is there a setting that I could use to disable this?
> >>> > >>> >
> >>> > >>> > Thanks A Lot
> >>> > >>> >
> >>> > >>> > Carlo
> >>> > >>> >
> >>> > >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke <
> >>> j.steenbeeke.ml@
> >>> > >>> > gmail.com> wrote:
> >>> > >>> >
> >>> > >>> > > I'd suggest running the transaction in the background
> (separate
> >>> > >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to
> >>> periodically
> >>> > >>> > > check if the thread was finished and only do the redirect
> after
> >>> > >>> > > finishing. This way, the pagemap remains unlocked.
> >>> > >>> > >
> >>> > >>> > > 2010/1/21 Carlo Camerino :
> >>> > >>> > > > Hi,
> >>> > >>> > > >
> >>> > >>> > > > if any of you could help, we have a problem in one of our
> >>> wicket
> >>> > >>> > > > installations. We have a system that connects to another
> >>> system.
> >>> > >>> > > Sometimes
> >>> > >>> > > > the system's reply lasts for more than a minute.
> >>> > >>> > > > Wicket is having problem with regards to the page map being
> >>> > locked.
> >>> > >>> > > >
> >>> > >>> > > > I click for example on a page to request for a balance, the
> >>> host
> >>> > >>> > doesn't
> >>> > >>> > > > return anymessage for about 1 minute or more.
> >>> > >>> > > >
> >>> > >>> > > > So instead of waiting, i will try to move to another page,
> >>> > problem
> >>> > >>> > is...
> >>> > >>> > > i
> >>> > >>> > > > can't switch pages. wicket seems to have locked the
> page
> >>> map
> >>> > and
> >>> > >>> i
> >>> > >>> > > can't
> >>> > >>> > > > get out or even logout.
> >>> > >>> > > >
> >>> > >>> > > > After  a minute, an exception is thrown saying that the
> page
> >>> map
> >>> > may
> >>> > >>> > have
> >>> > >>> > > > been locked for more than 1 minute
> >>> > >>> > > >
> >>> > >>> > > > is there any way around this?
> >>> > >>> > > >
> >>> > >>> > > > Thanks A Lot
> >>> > >>> > > > Carlo
> >>> > >>> > > >
> >>> > >>> > >
> >>> > >>> > >
> >>> > >>> > >
> >>> > >>> > > --
> >>> > >>> > > Jeroen Steenbeeke
> >>> > >>> > > www.fortuityframework.com
> >>> > >>> > >
> >>> > >>> > >
> >>> > -
> >>> > >>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> > >>> > > For additional commands, e-mail:
> users-h...@wicket.apache.org
> >>> > >>> > >
> >>> > >>> > >
> >>> > >>> >
> >>> > >>>
> >>> > >>
> >>> > >>
> >>> > >
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Jeroen Steenbeeke
> >>> > www.fortuityframework.com
> >>> >
> >>> > --

Re: add javascript after AjaxLazyLoadPanel finishes rendering - (was: onAfterRender called twice in AjaxLazyLoadPanel)

2010-01-21 Thread Steve Swinsburg
If it was my own Panel class then I would add the extra markup. But I am using 
the built in AjaxLazyLoadPanel class and was hoping to just override it easily.

Looks like I'll extend it as per Sven's suggestion below.

cheers,
Steve



On 21/01/2010, at 6:37 PM, svenmeier wrote:

> 
> class SomePanel extends Panel implements IHeaderContributor
> {
>public SomePanel(String id)
>{
>super(id);
>}
> 
>public void renderHead(IHeaderResponse response)
>{
>response.renderOnDomReadyJavascript("alert('hello');");
>}
> }
> 
> Sven
> 
> 
> Steve Swinsburg-3 wrote:
>> 
>> Hi Lionel,
>> 
>> Thanks and yes, thats what I am trying to do, attach some javascript after
>> something has rendered. So I attached an AjaxEventBehaviour to it and now
>> have this:
>> 
>> add(new AjaxLazyLoadPanel("myPanel") {
>> 
>>  @Override
>> public Component getLazyLoadComponent(String markupId) {
>>  return new SomePanel(markupId);
>> }
>> }.add(new AjaxEventBehavior("onload"){
>>protected void onEvent(AjaxRequestTarget target){
>>  target.appendJavascript("alert('hello)';");
>>}
>> }));
>> 
>> but the javascript is never fired.
>> 
>> Any more ideas?
>> 
>> cheers,
>> Steve
>> 
>> 
>> On 21/01/2010, at 3:09 PM, Lionel Port wrote:
>> 
>>> Hi Steve,
>>> 
>>> Are you trying to do this..
>>> 
>>> http://cwiki.apache.org/WICKET/adding-javascript-from-wicket.html
>>> 
>>> with an onload event instead of onblur, or do I misunderstand.
>>> 
>>> regards,
>>> Lionel
>>> 
>>> On Thu, Jan 21, 2010 at 2:56 PM, Steve Swinsburg
>>>  wrote:
 So  overriding onAfterRender for a component doesn't just override it
 for that instance of the component?
 
 Also I can see the markup is being added to the end of the page after
 the closing HTML. However, the Javadocs say it is meant to be called
 after after the actual component is finished rendering. So it look s
 like onAfterRender is not what I need.
 
 Can I attach to a different phase in the render lifecycle to call the
 javascript when that specific panel has just finished rendering?
 
 thanks,
 Steve
 
 
 
 
 On 21/01/2010, at 2:52 PM, Igor Vaynberg wrote:
 
> you are writing out javascript after every component render...
> 
> perhaps you should keep a boolean flag that marks if you rendered the
> js yet or not.
> 
> alternatively you can add a behavior to the panel with istemporary() {
> return true; }
> 
> -igor
> 
> On Wed, Jan 20, 2010 at 7:24 PM, Steve Swinsburg
>  wrote:
>> I have an AjaxLazyLoadPanel and want some javascript to fire after its
>> loaded it's contents:
>> 
>> I assumed I could override onAfterRender and add my javascript like
>> so:
>> 
>> add(new AjaxLazyLoadPanel("myPanel") {
>> 
>>   @Override
>>   public Component getLazyLoadComponent(String markupId) {
>>   return new SomePamel(markupId);
>>   }
>> 
>>   @Override
>>   protected void onAfterRender() {
>>   JavascriptUtils.writeJavascript(getResponse(),
>> "alert('hello');");
>>   super.onAfterRender();
>>   }
>> 
>> });
>> 
>> Except it is called twice, it looks like once when the page is loading
>> and then again when the actual panel has been loaded.
>> 
>> Is there another way to achieve what I want?
>> 
>> thanks,
>> Steve
>> 
>> 
> 
> -
> 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/onAfterRender-called-twice-in-AjaxLazyLoadPanel-tp27252299p27253924.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
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
My apologies, that is a class we use internally. Must have confused it
with some basic wicket class.

You can use AbstractAjaxTimerBehavior to similar effect. Just override
the onTimer method

2010/1/21 Carlo Camerino :
> where do i get this class?
>
> AjaxStoppableSelfUpdatingTimer ?
> On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino 
> wrote:
>
>> hi,
>>
>> please do.
>>
>> thanks a lot!
>>
>>
>> On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro <
>> reier...@gmail.com> wrote:
>>
>>> Carlo,
>>>
>>> If you need some code illustrating  how to do this, I can mail you the
>>> source code of a similar use case: creating a lengthy PDF and providing
>>> users with progress feedback... It uses the same approach Jeroen
>>> mentioned.
>>>
>>> Best,
>>>
>>> Ernesto
>>>
>>> On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke >> gmail.com> wrote:
>>>
>>> > If you do it my way, then you don't have to
>>> >
>>> > 2010/1/21 Carlo Camerino :
>>> > > is there anyway that i could just kill the previous thread?
>>> > >
>>> > > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
>>> > carlo.camer...@gmail.com>wrote:
>>> > >
>>> > >> if i can't do this, is there anyway that i could at least increase
>>> the
>>> > >> timeout of the pagemap to greater than 1 minute?
>>> > >> 1 minute would be too little i guess
>>> > >>
>>> > >>
>>> > >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
>>> > >> reier...@gmail.com> wrote:
>>> > >>
>>> > >>> Why not follow the Jeroen's suggestion instead of trying to trick
>>> > >>> framework
>>> > >>> internals?
>>> > >>>
>>> > >>> Ernesto
>>> > >>>
>>> > >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
>>> > >>> wrote:
>>> > >>>
>>> > >>> > hi,
>>> > >>> >
>>> > >>> > i believe this is due to the fact that wicket has synchronized
>>> page
>>> > maps
>>> > >>> > for
>>> > >>> > access.
>>> > >>> >
>>> > >>> > do you think it is safe to remove it?
>>> > >>> > what are the precautions when removing synchronized for wicket
>>> page
>>> > >>> maps?
>>> > >>> >
>>> > >>> > Is there a setting that I could use to disable this?
>>> > >>> >
>>> > >>> > Thanks A Lot
>>> > >>> >
>>> > >>> > Carlo
>>> > >>> >
>>> > >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke <
>>> j.steenbeeke.ml@
>>> > >>> > gmail.com> wrote:
>>> > >>> >
>>> > >>> > > I'd suggest running the transaction in the background (separate
>>> > >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to
>>> periodically
>>> > >>> > > check if the thread was finished and only do the redirect after
>>> > >>> > > finishing. This way, the pagemap remains unlocked.
>>> > >>> > >
>>> > >>> > > 2010/1/21 Carlo Camerino :
>>> > >>> > > > Hi,
>>> > >>> > > >
>>> > >>> > > > if any of you could help, we have a problem in one of our
>>> wicket
>>> > >>> > > > installations. We have a system that connects to another
>>> system.
>>> > >>> > > Sometimes
>>> > >>> > > > the system's reply lasts for more than a minute.
>>> > >>> > > > Wicket is having problem with regards to the page map being
>>> > locked.
>>> > >>> > > >
>>> > >>> > > > I click for example on a page to request for a balance, the
>>> host
>>> > >>> > doesn't
>>> > >>> > > > return anymessage for about 1 minute or more.
>>> > >>> > > >
>>> > >>> > > > So instead of waiting, i will try to move to another page,
>>> > problem
>>> > >>> > is...
>>> > >>> > > i
>>> > >>> > > > can't switch pages. wicket seems to have locked the page
>>> map
>>> > and
>>> > >>> i
>>> > >>> > > can't
>>> > >>> > > > get out or even logout.
>>> > >>> > > >
>>> > >>> > > > After  a minute, an exception is thrown saying that the page
>>> map
>>> > may
>>> > >>> > have
>>> > >>> > > > been locked for more than 1 minute
>>> > >>> > > >
>>> > >>> > > > is there any way around this?
>>> > >>> > > >
>>> > >>> > > > Thanks A Lot
>>> > >>> > > > Carlo
>>> > >>> > > >
>>> > >>> > >
>>> > >>> > >
>>> > >>> > >
>>> > >>> > > --
>>> > >>> > > Jeroen Steenbeeke
>>> > >>> > > www.fortuityframework.com
>>> > >>> > >
>>> > >>> > >
>>> > -
>>> > >>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> > >>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>>> > >>> > >
>>> > >>> > >
>>> > >>> >
>>> > >>>
>>> > >>
>>> > >>
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > Jeroen Steenbeeke
>>> > www.fortuityframework.com
>>> >
>>> > -
>>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> > For additional commands, e-mail: users-h...@wicket.apache.org
>>> >
>>> >
>>>
>>
>>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
where do i get this class?

AjaxStoppableSelfUpdatingTimer ?
On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino wrote:

> hi,
>
> please do.
>
> thanks a lot!
>
>
> On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Carlo,
>>
>> If you need some code illustrating  how to do this, I can mail you the
>> source code of a similar use case: creating a lengthy PDF and providing
>> users with progress feedback... It uses the same approach Jeroen
>> mentioned.
>>
>> Best,
>>
>> Ernesto
>>
>> On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke > gmail.com> wrote:
>>
>> > If you do it my way, then you don't have to
>> >
>> > 2010/1/21 Carlo Camerino :
>> > > is there anyway that i could just kill the previous thread?
>> > >
>> > > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
>> > carlo.camer...@gmail.com>wrote:
>> > >
>> > >> if i can't do this, is there anyway that i could at least increase
>> the
>> > >> timeout of the pagemap to greater than 1 minute?
>> > >> 1 minute would be too little i guess
>> > >>
>> > >>
>> > >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
>> > >> reier...@gmail.com> wrote:
>> > >>
>> > >>> Why not follow the Jeroen's suggestion instead of trying to trick
>> > >>> framework
>> > >>> internals?
>> > >>>
>> > >>> Ernesto
>> > >>>
>> > >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
>> > >>> wrote:
>> > >>>
>> > >>> > hi,
>> > >>> >
>> > >>> > i believe this is due to the fact that wicket has synchronized
>> page
>> > maps
>> > >>> > for
>> > >>> > access.
>> > >>> >
>> > >>> > do you think it is safe to remove it?
>> > >>> > what are the precautions when removing synchronized for wicket
>> page
>> > >>> maps?
>> > >>> >
>> > >>> > Is there a setting that I could use to disable this?
>> > >>> >
>> > >>> > Thanks A Lot
>> > >>> >
>> > >>> > Carlo
>> > >>> >
>> > >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke <
>> j.steenbeeke.ml@
>> > >>> > gmail.com> wrote:
>> > >>> >
>> > >>> > > I'd suggest running the transaction in the background (separate
>> > >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to
>> periodically
>> > >>> > > check if the thread was finished and only do the redirect after
>> > >>> > > finishing. This way, the pagemap remains unlocked.
>> > >>> > >
>> > >>> > > 2010/1/21 Carlo Camerino :
>> > >>> > > > Hi,
>> > >>> > > >
>> > >>> > > > if any of you could help, we have a problem in one of our
>> wicket
>> > >>> > > > installations. We have a system that connects to another
>> system.
>> > >>> > > Sometimes
>> > >>> > > > the system's reply lasts for more than a minute.
>> > >>> > > > Wicket is having problem with regards to the page map being
>> > locked.
>> > >>> > > >
>> > >>> > > > I click for example on a page to request for a balance, the
>> host
>> > >>> > doesn't
>> > >>> > > > return anymessage for about 1 minute or more.
>> > >>> > > >
>> > >>> > > > So instead of waiting, i will try to move to another page,
>> > problem
>> > >>> > is...
>> > >>> > > i
>> > >>> > > > can't switch pages. wicket seems to have locked the page
>> map
>> > and
>> > >>> i
>> > >>> > > can't
>> > >>> > > > get out or even logout.
>> > >>> > > >
>> > >>> > > > After  a minute, an exception is thrown saying that the page
>> map
>> > may
>> > >>> > have
>> > >>> > > > been locked for more than 1 minute
>> > >>> > > >
>> > >>> > > > is there any way around this?
>> > >>> > > >
>> > >>> > > > Thanks A Lot
>> > >>> > > > Carlo
>> > >>> > > >
>> > >>> > >
>> > >>> > >
>> > >>> > >
>> > >>> > > --
>> > >>> > > Jeroen Steenbeeke
>> > >>> > > www.fortuityframework.com
>> > >>> > >
>> > >>> > >
>> > -
>> > >>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > >>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>> > >>> > >
>> > >>> > >
>> > >>> >
>> > >>>
>> > >>
>> > >>
>> > >
>> >
>> >
>> >
>> > --
>> > Jeroen Steenbeeke
>> > www.fortuityframework.com
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
hi,

please do.

thanks a lot!

On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Carlo,
>
> If you need some code illustrating  how to do this, I can mail you the
> source code of a similar use case: creating a lengthy PDF and providing
> users with progress feedback... It uses the same approach Jeroen mentioned.
>
> Best,
>
> Ernesto
>
> On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke  gmail.com> wrote:
>
> > If you do it my way, then you don't have to
> >
> > 2010/1/21 Carlo Camerino :
> > > is there anyway that i could just kill the previous thread?
> > >
> > > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
> > carlo.camer...@gmail.com>wrote:
> > >
> > >> if i can't do this, is there anyway that i could at least increase the
> > >> timeout of the pagemap to greater than 1 minute?
> > >> 1 minute would be too little i guess
> > >>
> > >>
> > >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
> > >> reier...@gmail.com> wrote:
> > >>
> > >>> Why not follow the Jeroen's suggestion instead of trying to trick
> > >>> framework
> > >>> internals?
> > >>>
> > >>> Ernesto
> > >>>
> > >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
> > >>> wrote:
> > >>>
> > >>> > hi,
> > >>> >
> > >>> > i believe this is due to the fact that wicket has synchronized page
> > maps
> > >>> > for
> > >>> > access.
> > >>> >
> > >>> > do you think it is safe to remove it?
> > >>> > what are the precautions when removing synchronized for wicket page
> > >>> maps?
> > >>> >
> > >>> > Is there a setting that I could use to disable this?
> > >>> >
> > >>> > Thanks A Lot
> > >>> >
> > >>> > Carlo
> > >>> >
> > >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke <
> j.steenbeeke.ml@
> > >>> > gmail.com> wrote:
> > >>> >
> > >>> > > I'd suggest running the transaction in the background (separate
> > >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to
> periodically
> > >>> > > check if the thread was finished and only do the redirect after
> > >>> > > finishing. This way, the pagemap remains unlocked.
> > >>> > >
> > >>> > > 2010/1/21 Carlo Camerino :
> > >>> > > > Hi,
> > >>> > > >
> > >>> > > > if any of you could help, we have a problem in one of our
> wicket
> > >>> > > > installations. We have a system that connects to another
> system.
> > >>> > > Sometimes
> > >>> > > > the system's reply lasts for more than a minute.
> > >>> > > > Wicket is having problem with regards to the page map being
> > locked.
> > >>> > > >
> > >>> > > > I click for example on a page to request for a balance, the
> host
> > >>> > doesn't
> > >>> > > > return anymessage for about 1 minute or more.
> > >>> > > >
> > >>> > > > So instead of waiting, i will try to move to another page,
> > problem
> > >>> > is...
> > >>> > > i
> > >>> > > > can't switch pages. wicket seems to have locked the page
> map
> > and
> > >>> i
> > >>> > > can't
> > >>> > > > get out or even logout.
> > >>> > > >
> > >>> > > > After  a minute, an exception is thrown saying that the page
> map
> > may
> > >>> > have
> > >>> > > > been locked for more than 1 minute
> > >>> > > >
> > >>> > > > is there any way around this?
> > >>> > > >
> > >>> > > > Thanks A Lot
> > >>> > > > Carlo
> > >>> > > >
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > > --
> > >>> > > Jeroen Steenbeeke
> > >>> > > www.fortuityframework.com
> > >>> > >
> > >>> > >
> > -
> > >>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >>> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >>> > >
> > >>> > >
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
> >
> >
> > --
> > Jeroen Steenbeeke
> > www.fortuityframework.com
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: Cannot get default invisible TextField's ModelObject ?

2010-01-21 Thread Chuck Brinkman
I stepped through the code and found that the convertedInput is null when
processing submit.  I didn't see anything that looked like an error message
from wicket.I look forward to seeing what the wicket developers have to
say.

I'm just a new wicket user but was interested in this issue.  I also found
that if you make the following changes it will work.
   

**


   * *




*Form moreForm = new Form("moreForm");
more.add(moreForm);*
final TextField textfield = new TextField(
"textfield", new Model());
*moreForm*.add(textfield);
AjaxButton button = new AjaxButton("submit") {
@Override
protected void onSubmit(AjaxRequestTarget arg0, Form
form) {
System.out.println("radioGroup = "
+ radioGroup.getModelObject()
+ " , textfield.getModelObject() = "
+ textfield.getModelObject());
}
};
*moreForm*.add(button);


On Wed, Jan 20, 2010 at 10:47 PM, smallufo  wrote:

> This is a full functional Page  :
>
> I found this problem only occurs when the form is in the listView :
> If I move the form out of the listView , it works like a charm.
> Bug ? I am not sure...
>
> The link is the screen capture :
> http://xs.to/image-B859_4B57CDD0.gif
>
>
> MyPage.html
>
> 
>  
>name
>more ?
>  
>  
>
>  
>[name]
>
>  
>yes
>no
>  
>
>  
>  
>
>   wicket:id="textfield"/>
>  
>
>  
>
>  
> 
>
>
> MyPage.java
>
> package quickstart.ajax;
>
> import java.util.ArrayList;
> import java.util.List;
>
> import org.apache.wicket.ajax.AjaxEventBehavior;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import org.apache.wicket.ajax.markup.html.form.AjaxButton;
> import org.apache.wicket.markup.html.WebMarkupContainer;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.form.Form;
> import org.apache.wicket.markup.html.form.Radio;
> import org.apache.wicket.markup.html.form.RadioGroup;
> import org.apache.wicket.markup.html.form.TextField;
> import org.apache.wicket.markup.html.list.ListItem;
> import org.apache.wicket.markup.html.list.ListView;
> import org.apache.wicket.model.Model;
>
> public class MyPage extends WebPage
> {
>  private final static List names = new ArrayList();
>  static
>  {
>names.add("Andy");
>names.add("Brian");
>names.add("Carol");
>  }
>
>  public MyPage()
>  {
>ListView listView = new ListView("listView" , names)
>{
>  @Override
>  protected void populateItem(ListItem item)
>  {
>
>Form form = new Form("form");
>item.add(form);
>
>String name = item.getModelObject();
>
>form.add(new Label("name" , name));
>
>final WebMarkupContainer more = new WebMarkupContainer("more");
>more.setVisible(false);
>more.setOutputMarkupPlaceholderTag(true);
>form.add(more);
>
>
>final RadioGroup radioGroup = new
> RadioGroup("radioGroup" , Model.of(Boolean.FALSE));
>form.add(radioGroup);
>
>Radio yes = new Radio("yes" ,
> Model.of(Boolean.TRUE));
>Radio no = new Radio("no" ,
> Model.of(Boolean.FALSE));
>radioGroup.add(yes);
>radioGroup.add(no);
>
>yes.add(new AjaxEventBehavior("onClick")
>{
>  @Override
>  protected void onEvent(AjaxRequestTarget target)
>  {
>more.setVisible(true);
>target.addComponent(more);
>  }
>});
>
>no.add(new AjaxEventBehavior("onClick")
>{
>  @Override
>  protected void onEvent(AjaxRequestTarget target)
>  {
>more.setVisible(false);
>target.addComponent(more);
>  }
>});
>
>final TextField textfield = new
> TextField("textfield" , new Model());
>more.add(textfield);
>AjaxButton button = new AjaxButton("submit")
>{
>  @Override
>  protected void onSubmit(AjaxRequestTarget arg0, Form form)
>  {
>System.out.println("radioGroup = " + radioGroup.getModelObject()
> + " , textfield.getModelObject() = " + textfield.getModelObject());
>  }
>};
>more.add(button);
>  }
>};
>add(listView);
>  }
> }
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Ernesto Reinaldo Barreiro
Carlo,

If you need some code illustrating  how to do this, I can mail you the
source code of a similar use case: creating a lengthy PDF and providing
users with progress feedback... It uses the same approach Jeroen mentioned.

Best,

Ernesto

On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke  wrote:

> If you do it my way, then you don't have to
>
> 2010/1/21 Carlo Camerino :
> > is there anyway that i could just kill the previous thread?
> >
> > On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino <
> carlo.camer...@gmail.com>wrote:
> >
> >> if i can't do this, is there anyway that i could at least increase the
> >> timeout of the pagemap to greater than 1 minute?
> >> 1 minute would be too little i guess
> >>
> >>
> >> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
> >> reier...@gmail.com> wrote:
> >>
> >>> Why not follow the Jeroen's suggestion instead of trying to trick
> >>> framework
> >>> internals?
> >>>
> >>> Ernesto
> >>>
> >>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
> >>> wrote:
> >>>
> >>> > hi,
> >>> >
> >>> > i believe this is due to the fact that wicket has synchronized page
> maps
> >>> > for
> >>> > access.
> >>> >
> >>> > do you think it is safe to remove it?
> >>> > what are the precautions when removing synchronized for wicket page
> >>> maps?
> >>> >
> >>> > Is there a setting that I could use to disable this?
> >>> >
> >>> > Thanks A Lot
> >>> >
> >>> > Carlo
> >>> >
> >>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke  >>> > gmail.com> wrote:
> >>> >
> >>> > > I'd suggest running the transaction in the background (separate
> >>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
> >>> > > check if the thread was finished and only do the redirect after
> >>> > > finishing. This way, the pagemap remains unlocked.
> >>> > >
> >>> > > 2010/1/21 Carlo Camerino :
> >>> > > > Hi,
> >>> > > >
> >>> > > > if any of you could help, we have a problem in one of our wicket
> >>> > > > installations. We have a system that connects to another system.
> >>> > > Sometimes
> >>> > > > the system's reply lasts for more than a minute.
> >>> > > > Wicket is having problem with regards to the page map being
> locked.
> >>> > > >
> >>> > > > I click for example on a page to request for a balance, the host
> >>> > doesn't
> >>> > > > return anymessage for about 1 minute or more.
> >>> > > >
> >>> > > > So instead of waiting, i will try to move to another page,
> problem
> >>> > is...
> >>> > > i
> >>> > > > can't switch pages. wicket seems to have locked the page map
> and
> >>> i
> >>> > > can't
> >>> > > > get out or even logout.
> >>> > > >
> >>> > > > After  a minute, an exception is thrown saying that the page map
> may
> >>> > have
> >>> > > > been locked for more than 1 minute
> >>> > > >
> >>> > > > is there any way around this?
> >>> > > >
> >>> > > > Thanks A Lot
> >>> > > > Carlo
> >>> > > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > Jeroen Steenbeeke
> >>> > > www.fortuityframework.com
> >>> > >
> >>> > >
> -
> >>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> > > For additional commands, e-mail: users-h...@wicket.apache.org
> >>> > >
> >>> > >
> >>> >
> >>>
> >>
> >>
> >
>
>
>
> --
> Jeroen Steenbeeke
> www.fortuityframework.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Martijn Dashorst
Read up on Future's in the java.concurrent packages. They might
provide you with a good way to work with answers that lie in the
future...

Martijn

On Thu, Jan 21, 2010 at 12:14 PM, Carlo Camerino
 wrote:
> is there anyway that i could just kill the previous thread?
>
> On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino 
> wrote:
>
>> if i can't do this, is there anyway that i could at least increase the
>> timeout of the pagemap to greater than 1 minute?
>> 1 minute would be too little i guess
>>
>>
>> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
>> reier...@gmail.com> wrote:
>>
>>> Why not follow the Jeroen's suggestion instead of trying to trick
>>> framework
>>> internals?
>>>
>>> Ernesto
>>>
>>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
>>> wrote:
>>>
>>> > hi,
>>> >
>>> > i believe this is due to the fact that wicket has synchronized page maps
>>> > for
>>> > access.
>>> >
>>> > do you think it is safe to remove it?
>>> > what are the precautions when removing synchronized for wicket page
>>> maps?
>>> >
>>> > Is there a setting that I could use to disable this?
>>> >
>>> > Thanks A Lot
>>> >
>>> > Carlo
>>> >
>>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke >> > gmail.com> wrote:
>>> >
>>> > > I'd suggest running the transaction in the background (separate
>>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
>>> > > check if the thread was finished and only do the redirect after
>>> > > finishing. This way, the pagemap remains unlocked.
>>> > >
>>> > > 2010/1/21 Carlo Camerino :
>>> > > > Hi,
>>> > > >
>>> > > > if any of you could help, we have a problem in one of our wicket
>>> > > > installations. We have a system that connects to another system.
>>> > > Sometimes
>>> > > > the system's reply lasts for more than a minute.
>>> > > > Wicket is having problem with regards to the page map being locked.
>>> > > >
>>> > > > I click for example on a page to request for a balance, the host
>>> > doesn't
>>> > > > return anymessage for about 1 minute or more.
>>> > > >
>>> > > > So instead of waiting, i will try to move to another page, problem
>>> > is...
>>> > > i
>>> > > > can't switch pages. wicket seems to have locked the page map and
>>> i
>>> > > can't
>>> > > > get out or even logout.
>>> > > >
>>> > > > After  a minute, an exception is thrown saying that the page map may
>>> > have
>>> > > > been locked for more than 1 minute
>>> > > >
>>> > > > is there any way around this?
>>> > > >
>>> > > > Thanks A Lot
>>> > > > Carlo
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Jeroen Steenbeeke
>>> > > www.fortuityframework.com
>>> > >
>>> > > -
>>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>>> > >
>>> > >
>>> >
>>>
>>
>>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
If you do it my way, then you don't have to

2010/1/21 Carlo Camerino :
> is there anyway that i could just kill the previous thread?
>
> On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino 
> wrote:
>
>> if i can't do this, is there anyway that i could at least increase the
>> timeout of the pagemap to greater than 1 minute?
>> 1 minute would be too little i guess
>>
>>
>> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
>> reier...@gmail.com> wrote:
>>
>>> Why not follow the Jeroen's suggestion instead of trying to trick
>>> framework
>>> internals?
>>>
>>> Ernesto
>>>
>>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
>>> wrote:
>>>
>>> > hi,
>>> >
>>> > i believe this is due to the fact that wicket has synchronized page maps
>>> > for
>>> > access.
>>> >
>>> > do you think it is safe to remove it?
>>> > what are the precautions when removing synchronized for wicket page
>>> maps?
>>> >
>>> > Is there a setting that I could use to disable this?
>>> >
>>> > Thanks A Lot
>>> >
>>> > Carlo
>>> >
>>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke >> > gmail.com> wrote:
>>> >
>>> > > I'd suggest running the transaction in the background (separate
>>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
>>> > > check if the thread was finished and only do the redirect after
>>> > > finishing. This way, the pagemap remains unlocked.
>>> > >
>>> > > 2010/1/21 Carlo Camerino :
>>> > > > Hi,
>>> > > >
>>> > > > if any of you could help, we have a problem in one of our wicket
>>> > > > installations. We have a system that connects to another system.
>>> > > Sometimes
>>> > > > the system's reply lasts for more than a minute.
>>> > > > Wicket is having problem with regards to the page map being locked.
>>> > > >
>>> > > > I click for example on a page to request for a balance, the host
>>> > doesn't
>>> > > > return anymessage for about 1 minute or more.
>>> > > >
>>> > > > So instead of waiting, i will try to move to another page, problem
>>> > is...
>>> > > i
>>> > > > can't switch pages. wicket seems to have locked the page map and
>>> i
>>> > > can't
>>> > > > get out or even logout.
>>> > > >
>>> > > > After  a minute, an exception is thrown saying that the page map may
>>> > have
>>> > > > been locked for more than 1 minute
>>> > > >
>>> > > > is there any way around this?
>>> > > >
>>> > > > Thanks A Lot
>>> > > > Carlo
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Jeroen Steenbeeke
>>> > > www.fortuityframework.com
>>> > >
>>> > > -
>>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>>> > >
>>> > >
>>> >
>>>
>>
>>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
is there anyway that i could just kill the previous thread?

On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino wrote:

> if i can't do this, is there anyway that i could at least increase the
> timeout of the pagemap to greater than 1 minute?
> 1 minute would be too little i guess
>
>
> On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Why not follow the Jeroen's suggestion instead of trying to trick
>> framework
>> internals?
>>
>> Ernesto
>>
>> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
>> wrote:
>>
>> > hi,
>> >
>> > i believe this is due to the fact that wicket has synchronized page maps
>> > for
>> > access.
>> >
>> > do you think it is safe to remove it?
>> > what are the precautions when removing synchronized for wicket page
>> maps?
>> >
>> > Is there a setting that I could use to disable this?
>> >
>> > Thanks A Lot
>> >
>> > Carlo
>> >
>> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke > > gmail.com> wrote:
>> >
>> > > I'd suggest running the transaction in the background (separate
>> > > thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
>> > > check if the thread was finished and only do the redirect after
>> > > finishing. This way, the pagemap remains unlocked.
>> > >
>> > > 2010/1/21 Carlo Camerino :
>> > > > Hi,
>> > > >
>> > > > if any of you could help, we have a problem in one of our wicket
>> > > > installations. We have a system that connects to another system.
>> > > Sometimes
>> > > > the system's reply lasts for more than a minute.
>> > > > Wicket is having problem with regards to the page map being locked.
>> > > >
>> > > > I click for example on a page to request for a balance, the host
>> > doesn't
>> > > > return anymessage for about 1 minute or more.
>> > > >
>> > > > So instead of waiting, i will try to move to another page, problem
>> > is...
>> > > i
>> > > > can't switch pages. wicket seems to have locked the page map and
>> i
>> > > can't
>> > > > get out or even logout.
>> > > >
>> > > > After  a minute, an exception is thrown saying that the page map may
>> > have
>> > > > been locked for more than 1 minute
>> > > >
>> > > > is there any way around this?
>> > > >
>> > > > Thanks A Lot
>> > > > Carlo
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Jeroen Steenbeeke
>> > > www.fortuityframework.com
>> > >
>> > > -
>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>> > >
>> > >
>> >
>>
>
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
if i can't do this, is there anyway that i could at least increase the
timeout of the pagemap to greater than 1 minute?
1 minute would be too little i guess

On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Why not follow the Jeroen's suggestion instead of trying to trick framework
> internals?
>
> Ernesto
>
> On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
> wrote:
>
> > hi,
> >
> > i believe this is due to the fact that wicket has synchronized page maps
> > for
> > access.
> >
> > do you think it is safe to remove it?
> > what are the precautions when removing synchronized for wicket page maps?
> >
> > Is there a setting that I could use to disable this?
> >
> > Thanks A Lot
> >
> > Carlo
> >
> > On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke  > gmail.com> wrote:
> >
> > > I'd suggest running the transaction in the background (separate
> > > thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
> > > check if the thread was finished and only do the redirect after
> > > finishing. This way, the pagemap remains unlocked.
> > >
> > > 2010/1/21 Carlo Camerino :
> > > > Hi,
> > > >
> > > > if any of you could help, we have a problem in one of our wicket
> > > > installations. We have a system that connects to another system.
> > > Sometimes
> > > > the system's reply lasts for more than a minute.
> > > > Wicket is having problem with regards to the page map being locked.
> > > >
> > > > I click for example on a page to request for a balance, the host
> > doesn't
> > > > return anymessage for about 1 minute or more.
> > > >
> > > > So instead of waiting, i will try to move to another page, problem
> > is...
> > > i
> > > > can't switch pages. wicket seems to have locked the page map and
> i
> > > can't
> > > > get out or even logout.
> > > >
> > > > After  a minute, an exception is thrown saying that the page map may
> > have
> > > > been locked for more than 1 minute
> > > >
> > > > is there any way around this?
> > > >
> > > > Thanks A Lot
> > > > Carlo
> > > >
> > >
> > >
> > >
> > > --
> > > Jeroen Steenbeeke
> > > www.fortuityframework.com
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Ernesto Reinaldo Barreiro
Why not follow the Jeroen's suggestion instead of trying to trick framework
internals?

Ernesto

On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
wrote:

> hi,
>
> i believe this is due to the fact that wicket has synchronized page maps
> for
> access.
>
> do you think it is safe to remove it?
> what are the precautions when removing synchronized for wicket page maps?
>
> Is there a setting that I could use to disable this?
>
> Thanks A Lot
>
> Carlo
>
> On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke  gmail.com> wrote:
>
> > I'd suggest running the transaction in the background (separate
> > thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
> > check if the thread was finished and only do the redirect after
> > finishing. This way, the pagemap remains unlocked.
> >
> > 2010/1/21 Carlo Camerino :
> > > Hi,
> > >
> > > if any of you could help, we have a problem in one of our wicket
> > > installations. We have a system that connects to another system.
> > Sometimes
> > > the system's reply lasts for more than a minute.
> > > Wicket is having problem with regards to the page map being locked.
> > >
> > > I click for example on a page to request for a balance, the host
> doesn't
> > > return anymessage for about 1 minute or more.
> > >
> > > So instead of waiting, i will try to move to another page, problem
> is...
> > i
> > > can't switch pages. wicket seems to have locked the page map and i
> > can't
> > > get out or even logout.
> > >
> > > After  a minute, an exception is thrown saying that the page map may
> have
> > > been locked for more than 1 minute
> > >
> > > is there any way around this?
> > >
> > > Thanks A Lot
> > > Carlo
> > >
> >
> >
> >
> > --
> > Jeroen Steenbeeke
> > www.fortuityframework.com
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
I'd suggest adapting your application to use Wicket properly instead
of the other way around. I'm not a Wicket Dev but I'm pretty sure that
desynchronizing page map access will cause more problems than it
solves.

Your problem is that Page A displays data which can take a lot of time
to gather due to polling an external system. So use this scenario.

1) Upon load, Page A starts a thread that fetches the information, and
displays a placeholder (a "loading" image or something like that).
Once the page is loaded your thread will be running and the pagemap
unlocked.
2) Use Ajax polling (in the way I suggested) to check if the thread
has finished. This will not lock the pagemap so you are free to
navigate the site. Once the thread is finished, you can replace the
placeholder from step 1 with the actual panel

Alternatively, you could use a push solution (e.g. wicketstuff-push)
to automatically publish the data upon thread completion (or append it
as the data comes in).

2010/1/21 Carlo Camerino :
> hi,
>
> i believe this is due to the fact that wicket has synchronized page maps for
> access.
>
> do you think it is safe to remove it?
> what are the precautions when removing synchronized for wicket page maps?
>
> Is there a setting that I could use to disable this?
>
> Thanks A Lot
>
> Carlo
>
> On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke  gmail.com> wrote:
>
>> I'd suggest running the transaction in the background (separate
>> thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
>> check if the thread was finished and only do the redirect after
>> finishing. This way, the pagemap remains unlocked.
>>
>> 2010/1/21 Carlo Camerino :
>> > Hi,
>> >
>> > if any of you could help, we have a problem in one of our wicket
>> > installations. We have a system that connects to another system.
>> Sometimes
>> > the system's reply lasts for more than a minute.
>> > Wicket is having problem with regards to the page map being locked.
>> >
>> > I click for example on a page to request for a balance, the host doesn't
>> > return anymessage for about 1 minute or more.
>> >
>> > So instead of waiting, i will try to move to another page, problem is...
>> i
>> > can't switch pages. wicket seems to have locked the page map and i
>> can't
>> > get out or even logout.
>> >
>> > After  a minute, an exception is thrown saying that the page map may have
>> > been locked for more than 1 minute
>> >
>> > is there any way around this?
>> >
>> > Thanks A Lot
>> > Carlo
>> >
>>
>>
>>
>> --
>> Jeroen Steenbeeke
>> www.fortuityframework.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: dropdown issue

2010-01-21 Thread chinedu efoagui
@jonas :
I admit am quite new at wicket but i think i understand how
compoundpropertymodel and propertymodel works. I have used them quite
extensively in my code.
I think i have an issue with properly using the choice renderer cos
that is where the problem is.
Thank you for you help.


On 1/21/10, Jonas  wrote:
> Make sure you fully understand how CompoundPropertyModel and
> PropertyModel work first.
> I suggest to study some documentation about CompoundPropertyModel (as
> in [1], [2] or [3])
> and to do some googleing for code examples.
>
> [1] 
> [2]
> 
> [3] 
>
>
> On Thu, Jan 21, 2010 at 9:28 AM, chinedu efoagui 
> wrote:
>> @jonas
>>
>> Thanks a lot for your help but could illustrate with some code please
>> so i can get the full idea
>> ..
>>
>>
>> On 1/20/10, Jonas  wrote:
>>> with this code, you're trying to set a PersonnelrecordsDepartment Object
>>> into the field called parentId of the object referred to by the
>>> 'selected' variable
>>> that you're passing to the CompoundPropertyModel. The data types don't
>>> match, that's why wicket trys to safe the day using conversion (which
>>> obviously
>>> cannot succeed in this case...).
>>> You can either:
>>> a) change the data type of the parentId field of your 'selected' object
>>> or
>>> b) change your dropdown choice so only the id is propagated instead of
>>> the
>>> whole PersonnelrecordsDepartment Object. you could do that e.g. by
>>> setting the ids
>>> as choices, and use a custom choicerenderer which retrieves and
>>> renders the PersonnelrecordsDepartment Objects
>>>
>>> I hope that helps...
>>>
>>> On Wed, Jan 20, 2010 at 4:54 PM, chinedu efoagui 
>>> wrote:
 @jonas ignore that. i was just refactoring the code for the email.
 the error is runtime not compile time.
 I think it is a conversion problem
 please help
 The field parentid is integer but the dropdown is expecting object
 the form
 
 IModel zaModel=new CompoundPropertyModel(selected);
        departmentform.setModel(zaModel);
        RequiredTextField  departmentname=new
 RequiredTextField("departmentname");
        departmentname.setOutputMarkupId(true);
        departmentform.add(departmentname);

        DepartmentDropDownChoice title=new
 DepartmentDropDownChoice("parentid",zaModel);
        departmentform.add(title);

        departmentform.add(new
 AjaxFallbackLink("canceldepartmentformbutton"){

               �...@override
                public void onClick(AjaxRequestTarget target) {
                   closeModalWindow(target);

                }


        });
        feedback = new FeedbackPanel("feedback");
      feedback.setOutputMarkupId(true);
      int[] filteredErrorLevels = new int[]{FeedbackMessage.ERROR};
      feedback.setFilter(new
 ErrorLevelsFeedbackMessageFilter(filteredErrorLevels));
     departmentform.add(feedback);


        FeedbackLabel departmentFeedbackLabel = new
 FeedbackLabel("departmentfeedback", departmentname,new
 Model("Department is required"));
        departmentFeedbackLabel.setOutputMarkupId(true);
        departmentname.add(new ComponentVisualErrorBehavior("onblur",
 departmentFeedbackLabel));
        departmentform.add(departmentFeedbackLabel);


      departmentform.add(new
 AjaxFallbackButton("savedepartmentbutton", departmentform) {

           @Override
      protected void onSubmit(AjaxRequestTarget target, Form form) {

       PersonnelrecordsDepartment
 pr=(PersonnelrecordsDepartment)form.getDefaultModel().getObject();

        try {
            if(isNew){
            dao.addPersonnelrecordsDepartment(pr);
            }
            else{

            dao.savePersonnelrecordsDepartment(pr);
            }
        } catch (GenericBusinessException ex) {

  Logger.getLogger(DepartmentPanel.class.getName()).log(Level.SEVERE,
 null, ex);
        }
        //target.addComponent(form);
        setFormReponse(target);

    }

         @Override
                        protected void onError(AjaxRequestTarget target,
 Form form)
                        {
                        // repaint the feedback panel so errors are shown

                           target.addComponent(feedback);
                        }

            });

        add(departmentform);
    }
        private void setFormReponse(AjaxRequestTarget target){


            info("Save Operation was Successful");

            target.addComponent(feedback);

  }
    FeedbackPanel feedback;


    }



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
hi,

i believe this is due to the fact that wicket has synchronized page maps for
access.

do you think it is safe to remove it?
what are the precautions when removing synchronized for wicket page maps?

Is there a setting that I could use to disable this?

Thanks A Lot

Carlo

On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke  wrote:

> I'd suggest running the transaction in the background (separate
> thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
> check if the thread was finished and only do the redirect after
> finishing. This way, the pagemap remains unlocked.
>
> 2010/1/21 Carlo Camerino :
> > Hi,
> >
> > if any of you could help, we have a problem in one of our wicket
> > installations. We have a system that connects to another system.
> Sometimes
> > the system's reply lasts for more than a minute.
> > Wicket is having problem with regards to the page map being locked.
> >
> > I click for example on a page to request for a balance, the host doesn't
> > return anymessage for about 1 minute or more.
> >
> > So instead of waiting, i will try to move to another page, problem is...
> i
> > can't switch pages. wicket seems to have locked the page map and i
> can't
> > get out or even logout.
> >
> > After  a minute, an exception is thrown saying that the page map may have
> > been locked for more than 1 minute
> >
> > is there any way around this?
> >
> > Thanks A Lot
> > Carlo
> >
>
>
>
> --
> Jeroen Steenbeeke
> www.fortuityframework.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: dropdown issue

2010-01-21 Thread Jonas
Make sure you fully understand how CompoundPropertyModel and
PropertyModel work first.
I suggest to study some documentation about CompoundPropertyModel (as
in [1], [2] or [3])
and to do some googleing for code examples.

[1] 
[2] 

[3] 


On Thu, Jan 21, 2010 at 9:28 AM, chinedu efoagui  wrote:
> @jonas
>
> Thanks a lot for your help but could illustrate with some code please
> so i can get the full idea
> ..
>
>
> On 1/20/10, Jonas  wrote:
>> with this code, you're trying to set a PersonnelrecordsDepartment Object
>> into the field called parentId of the object referred to by the
>> 'selected' variable
>> that you're passing to the CompoundPropertyModel. The data types don't
>> match, that's why wicket trys to safe the day using conversion (which
>> obviously
>> cannot succeed in this case...).
>> You can either:
>> a) change the data type of the parentId field of your 'selected' object
>> or
>> b) change your dropdown choice so only the id is propagated instead of the
>> whole PersonnelrecordsDepartment Object. you could do that e.g. by
>> setting the ids
>> as choices, and use a custom choicerenderer which retrieves and
>> renders the PersonnelrecordsDepartment Objects
>>
>> I hope that helps...
>>
>> On Wed, Jan 20, 2010 at 4:54 PM, chinedu efoagui 
>> wrote:
>>> @jonas ignore that. i was just refactoring the code for the email.
>>> the error is runtime not compile time.
>>> I think it is a conversion problem
>>> please help
>>> The field parentid is integer but the dropdown is expecting object
>>> the form
>>> 
>>> IModel zaModel=new CompoundPropertyModel(selected);
>>>        departmentform.setModel(zaModel);
>>>        RequiredTextField  departmentname=new
>>> RequiredTextField("departmentname");
>>>        departmentname.setOutputMarkupId(true);
>>>        departmentform.add(departmentname);
>>>
>>>        DepartmentDropDownChoice title=new
>>> DepartmentDropDownChoice("parentid",zaModel);
>>>        departmentform.add(title);
>>>
>>>        departmentform.add(new
>>> AjaxFallbackLink("canceldepartmentformbutton"){
>>>
>>>               �...@override
>>>                public void onClick(AjaxRequestTarget target) {
>>>                   closeModalWindow(target);
>>>
>>>                }
>>>
>>>
>>>        });
>>>        feedback = new FeedbackPanel("feedback");
>>>      feedback.setOutputMarkupId(true);
>>>      int[] filteredErrorLevels = new int[]{FeedbackMessage.ERROR};
>>>      feedback.setFilter(new
>>> ErrorLevelsFeedbackMessageFilter(filteredErrorLevels));
>>>     departmentform.add(feedback);
>>>
>>>
>>>        FeedbackLabel departmentFeedbackLabel = new
>>> FeedbackLabel("departmentfeedback", departmentname,new
>>> Model("Department is required"));
>>>        departmentFeedbackLabel.setOutputMarkupId(true);
>>>        departmentname.add(new ComponentVisualErrorBehavior("onblur",
>>> departmentFeedbackLabel));
>>>        departmentform.add(departmentFeedbackLabel);
>>>
>>>
>>>      departmentform.add(new
>>> AjaxFallbackButton("savedepartmentbutton", departmentform) {
>>>
>>>           @Override
>>>      protected void onSubmit(AjaxRequestTarget target, Form form) {
>>>
>>>       PersonnelrecordsDepartment
>>> pr=(PersonnelrecordsDepartment)form.getDefaultModel().getObject();
>>>
>>>        try {
>>>            if(isNew){
>>>            dao.addPersonnelrecordsDepartment(pr);
>>>            }
>>>            else{
>>>
>>>            dao.savePersonnelrecordsDepartment(pr);
>>>            }
>>>        } catch (GenericBusinessException ex) {
>>>
>>>  Logger.getLogger(DepartmentPanel.class.getName()).log(Level.SEVERE,
>>> null, ex);
>>>        }
>>>        //target.addComponent(form);
>>>        setFormReponse(target);
>>>
>>>    }
>>>
>>>         @Override
>>>                        protected void onError(AjaxRequestTarget target,
>>> Form form)
>>>                        {
>>>                        // repaint the feedback panel so errors are shown
>>>
>>>                           target.addComponent(feedback);
>>>                        }
>>>
>>>            });
>>>
>>>        add(departmentform);
>>>    }
>>>        private void setFormReponse(AjaxRequestTarget target){
>>>
>>>
>>>            info("Save Operation was Successful");
>>>
>>>            target.addComponent(feedback);
>>>
>>>  }
>>>    FeedbackPanel feedback;
>>>
>>>
>>>    }
>>>
>>>
>>> 
>>>
>>> On 1/20/10, Jonas  wrote:
 not sure if that's the problem, but shouldn't

 setChoices(titles);

 be

 setChoices(departments);




 On Wed, Jan 20, 2010 at 4:14 PM, chinedu efoagui 
 wrote:
> Hello , I have a class PersonnelrecordsDepartment
>  with the following fields with corresponding getters and setters
>   private java.lang.Integer id;
>   private java.lang.String departmentname;
>>>

[release] Wicket Security 1.4-beta1

2010-01-21 Thread Emond Papegaaij
Wicket Security 1.4-beta1 has just been released.

This release contains all updates made by Olger Warnier in the last 6 months 
to make Wicket Security work with Wicket 1.4 and the examples he added. It 
also contains the new ComponentSubclassPermission, which makes it possible to 
authorize a class and all its subclasses. But most importantly: it is the 
first release for Wicket Security 1.4!

To include Wicket Security (with Swarm) in your project, add:


org.apache.wicket.wicket-security
swarm
1.4-beta1


More information about Wicket Security can be found at:
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

Although this release works with Wicket 1.4, it does not yet make use of the 
generics provided in Wicket 1.4. This will be included in the next release 
(beta2), which will follow shortly.

Best regards,

Martijn and Emond

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



Re: CryptedUrlWebRequestCodingStrategy + WebRequestCodingStrategy = resource URLs are not encrypted (bug?).

2010-01-21 Thread Antoine van Wel
What can you do if you need to enforce that no fqn's are ever
generated in (resource) paths?

Best I can think of now is putting a breakpoint in the resourceKey
method where the fqn is retrieved, and then stepping through your full
webapp - which is a rather poor solution. Any other ideas?


Antoine





On Mon, Jan 18, 2010 at 5:18 PM, Igor Vaynberg  wrote:
> the original design goal of the crypted strategy was to only encrypt
> what the user sees in the url bar. since they never see resource urls
> there was no reason to encrypt those.
>
> re fqns, you can add class aliases into SharedResources to hide those.
>
> -igor
>
> 2010/1/18 Sergejs Olefirs :
>> Hi,
>>
>> I started using Wicket rather recently. As part of our security
>> considerations, we do not want immediately expose the underlying
>> framework(s) we are using, so we went ahead with URL encryption. We used
>> standard approach as described in examples:
>>
>> @Override
>> protected IRequestCycleProcessor newRequestCycleProcessor() {
>>
>> return new WebRequestCycleProcessor(){
>>  protected IRequestCodingStrategy newRequestCodingStrategy(){
>>        return new CryptedUrlWebRequestCodingStrategy(new
>> WebRequestCodingStrategy());
>>       }
>> };
>>
>> }
>>
>>
>> Unfortunately I later discovered that this approach doesn't encrypt resource
>> URLs, e.g. from:
>> CSSPackageResource.getHeaderContribution(..);
>> or
>> link.add(new Image("logoImage"));
>>
>> What's worse such resource references include FQN of related classes.
>>
>>
>> After some investigation I found out that the problem is that
>> CryptedUrlWebRequestCodingStrategy only encrypts arguments string of the URL
>> and WebRequestCodingStrategy encodes resource references as path rather than
>> as argument.
>>
>> I was able to get around this by subclassing WebRequestCodingStrategy and
>> overriding methods:
>> addResourceParameters(..);
>> encode(RequestCycle requestCycle, ISharedResourceRequestTarget
>> requestTarget);
>> to use arguments rather than path as resource reference.
>>
>>
>> However I'm unsure as to original reasoning behind original
>> CryptedUrlWebRequestCodingStrategy and WebRequestCodingStrategy. Is the
>> resource behaviour simply a bug? Or is it there for some reason that is
>> going to bite me down the road if I use my own 'fix'?
>>
>>
>> Best regards,
>> Sergey
>>
>> -
>> 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
>
>



-- 
take your photos everywhere you go - https://www.memolio.com
follow us on Twitter - http://twitter.com/Memolio

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



Using BreadCrumb to travel through pages which display object hierarchy?

2010-01-21 Thread Ashika Umanga Umagiliya

In my application I travel forward among pages using DataTables :


Link alink = new Link(arg1) {
@Override
public void onClick() {
setResponsePage(new SubFamilyPage(selectedSubfamily));
   }
};


Is it possible to use 'BreadCrum' to navigate through pages like follows?


FamilyesPage -> SubFamilesPage   ->   LocusPage

Familes  family1> SubFamiles
family1>subfamily1>Locus 
family1  subfamily1   locus1

family2  subfamily2   locus2
family3  subfamily3   locus3



I noticed that in BreadCtrumPanelLink it only get the class type of the 
target panel.


eg: new BreadCrumbPanelLink("linkToSecond", this, SecondPanel.class));

But in my case I want to pass appropriate parent object to panel/page ?





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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
I'd suggest running the transaction in the background (separate
thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
check if the thread was finished and only do the redirect after
finishing. This way, the pagemap remains unlocked.

2010/1/21 Carlo Camerino :
> Hi,
>
> if any of you could help, we have a problem in one of our wicket
> installations. We have a system that connects to another system. Sometimes
> the system's reply lasts for more than a minute.
> Wicket is having problem with regards to the page map being locked.
>
> I click for example on a page to request for a balance, the host doesn't
> return anymessage for about 1 minute or more.
>
> So instead of waiting, i will try to move to another page, problem is... i
> can't switch pages. wicket seems to have locked the page map and i can't
> get out or even logout.
>
> After  a minute, an exception is thrown saying that the page map may have
> been locked for more than 1 minute
>
> is there any way around this?
>
> Thanks A Lot
> Carlo
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Wicket+Guice

2010-01-21 Thread nino martinez wael
regarding number 2 it should be as doing normal java coding..

2010/1/21 Peter Karich 

> Hi,
>
> now I blogged about this stuff recently:
>
> http://karussell.wordpress.com/2010/01/18/crud-with-wicket-guice-db4o-neodatis/
>
> Comments and requests of reformulations are welcome ;-) !
>
> Question 1. is fixed ... maybe someone could point me to a solution of 2.?
>
> Regards,
> Peter.
>
>  Hi,
>>
>> Thanks to Jeremy Thomerson who pointed me to jweekend [1] which helped me
>> a lot to get started with a simple CRUD webapp based on wicket and guice
>> (+db4o)
>> see [2] for a screenshot.
>>
>> I have now the following problems:
>>
>> 1. If I select an Event (row of DataView) and want to remove it directly
>> after the selection
>>
>> I lost the database connnection. It seems to me that something with guice
>> and
>> session management is not properly handled of my app.
>>
>> 2. E.g. if I select event1 from the list and want to create a new event2
>> based on
>> the properties of event1. event2 is shown correctly where the row of
>> event1 is
>> now identical to the one of event2, although this is fixed after
>> refreshing the page via F5.
>>
>> Do you have a feeling which could be wrong here?
>> I would simply attach two failing test cases but I didn't get the tests
>> working.
>> I try to figure this out now...
>>
>> The maven project is here:
>>
>> https://timefinder.svn.sourceforge.net/svnroot/timefinder/branches/timefinderwicket/
>>
>> After mvn install (it should compile without any set up)
>> run mvn jetty:run and go to
>> http://localhost:8080/timefinderwicket/event
>>
>>
>> Regards,
>> Peter.
>>
>> [1]
>> http://www.jweekend.com/dev/LegUp
>>
>> [2]
>> http://peat_hal.users.sourceforge.net/wicket-guice.png
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
Hi,

if any of you could help, we have a problem in one of our wicket
installations. We have a system that connects to another system. Sometimes
the system's reply lasts for more than a minute.
Wicket is having problem with regards to the page map being locked.

I click for example on a page to request for a balance, the host doesn't
return anymessage for about 1 minute or more.

So instead of waiting, i will try to move to another page, problem is... i
can't switch pages. wicket seems to have locked the page map and i can't
get out or even logout.

After  a minute, an exception is thrown saying that the page map may have
been locked for more than 1 minute

is there any way around this?

Thanks A Lot
Carlo


wicket bench in eclipse

2010-01-21 Thread Lionel Port
Hi Guys,

Not strictly a wicket question, I know. Does anyone have wicket bench
working in Galileo or recent version of eclipse or know of a good
plugin I should be using?. My project has a maven structure, not sure
if thats why it doesn't work.


regards,
Lionel

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



Re: Custom DropDownChoice with css style

2010-01-21 Thread Martin Makundi
http://mail-archives.apache.org/mod_mbox/wicket-users/201001.mbox/%3c303141551001110817p7b03f6a0rb93848a012380...@mail.gmail.com%3e

2010/1/21 German Morales :
> Hallo Alexander,
>
> Perhaps you could change this to be a FormComponent (actually inheriting
> from FormComponentPanel).
> Then, when your ajax call refreshes the "component", the whole div
> (containing drop down + span) will be replaced by a new one.
> In your version, if i understand correctly, wicket removes the old select
> (but not your extra span, of which it is not aware of) and puts the new one
> (which puts another span every time).
>
> Regards,
>
> German
>
> 2010/1/20 Alexander Monakhov 
>
>> Hi, guys.
>>
>> I'm trying to implement DropDownChoice that could render  tag with
>> possiblity to add style with css.
>> What do I mean:
>>  tag rendering is OS dependent. So, plain  element is
>> always
>> ugly. There is no possibility to change arrow, or border of drop down list
>> only with css.
>> One of the ways to resolve this problem is to add  tag before
>> 
>> tag to show currently selected value, then apply to it desired background
>> and any desired styles and give  tag's opacity zero value. So, drop
>> down menu would appear any time user clicks on span element. To push
>> selected value to span onChange method for  tag is appropriated.
>>
>> So, I've created this class:
>> 
>> public class StyledDropDownChoice extends DropDownChoice {
>>
>> 
>> /*Here goes constructors and StyleDropDownSpan is added as behavior. */
>> 
>>
>>   �...@override
>>    protected void onComponentTag( ComponentTag tag ) {
>>        tag.put( "onChange", "var span = document.getElementById('" +
>> getMarkupId()
>>                + "-span'); var select = document.getElementById('" +
>> getMarkupId()
>>                +  "'); span.innerHTML = select.options[
>> select.selectedIndex ].innerHTML;" );
>>        //todo move javascript output to renderJavascript( CharSequence,
>> String )
>>
>>        super.onComponentTag( tag );
>>    }
>>
>>    private class StyledDropDownSpan extends AbstractBehavior {
>>
>>       �...@override
>>        public void onComponentTag( Component component, ComponentTag tag )
>> {
>>            replaceComponentTagBody( getMarkupStream(), tag,
>>                    "> component.getMarkupId()
>>                    + "-span\">" + component.getDefaultModelObjectAsString()
>>
>>                    + "" );
>>            super.onComponentTag( component, tag );
>>        }
>>
>>    }
>>
>> }
>> 
>>
>> So, this code works fine with usual drop down choices. But, when I'm trying
>> to update list of choice via AJAX call, another span element appear on the
>> page. So, I get that  tag is added any time dropdownchoice is
>> rendered. Could you help me to resolve this issue?
>>
>> Best regards, Alexander.
>>
>

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



Component hierarchy question

2010-01-21 Thread Marek Šabo
Hi,

suppose you have menubar with ajaxfallbacklinks that you want to change
panels in the main area.

new AjaxFallbackLink("search") {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
Panel np = new UserSearchPanel("moduleMain");
moduleMain.replaceWith(np);
moduleMain = np;
target.addComponent(moduleMain);
}
}

Simple question - why do we need to use replaceWith? Would someone
please explain how the component hierarchy works, I thought that simply
assigning new object to referrence would suffice.

Thanks,

Marek

-- 
Marek Šabo
Server Manager
Club SU CVUT Buben
Bubenečská Kolej (421)
XMPP: zeratul...@gmail.com


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



Re: dropdown issue

2010-01-21 Thread chinedu efoagui
@jonas

Thanks a lot for your help but could illustrate with some code please
so i can get the full idea
..


On 1/20/10, Jonas  wrote:
> with this code, you're trying to set a PersonnelrecordsDepartment Object
> into the field called parentId of the object referred to by the
> 'selected' variable
> that you're passing to the CompoundPropertyModel. The data types don't
> match, that's why wicket trys to safe the day using conversion (which
> obviously
> cannot succeed in this case...).
> You can either:
> a) change the data type of the parentId field of your 'selected' object
> or
> b) change your dropdown choice so only the id is propagated instead of the
> whole PersonnelrecordsDepartment Object. you could do that e.g. by
> setting the ids
> as choices, and use a custom choicerenderer which retrieves and
> renders the PersonnelrecordsDepartment Objects
>
> I hope that helps...
>
> On Wed, Jan 20, 2010 at 4:54 PM, chinedu efoagui 
> wrote:
>> @jonas ignore that. i was just refactoring the code for the email.
>> the error is runtime not compile time.
>> I think it is a conversion problem
>> please help
>> The field parentid is integer but the dropdown is expecting object
>> the form
>> 
>> IModel zaModel=new CompoundPropertyModel(selected);
>>        departmentform.setModel(zaModel);
>>        RequiredTextField  departmentname=new
>> RequiredTextField("departmentname");
>>        departmentname.setOutputMarkupId(true);
>>        departmentform.add(departmentname);
>>
>>        DepartmentDropDownChoice title=new
>> DepartmentDropDownChoice("parentid",zaModel);
>>        departmentform.add(title);
>>
>>        departmentform.add(new
>> AjaxFallbackLink("canceldepartmentformbutton"){
>>
>>               �...@override
>>                public void onClick(AjaxRequestTarget target) {
>>                   closeModalWindow(target);
>>
>>                }
>>
>>
>>        });
>>        feedback = new FeedbackPanel("feedback");
>>      feedback.setOutputMarkupId(true);
>>      int[] filteredErrorLevels = new int[]{FeedbackMessage.ERROR};
>>      feedback.setFilter(new
>> ErrorLevelsFeedbackMessageFilter(filteredErrorLevels));
>>     departmentform.add(feedback);
>>
>>
>>        FeedbackLabel departmentFeedbackLabel = new
>> FeedbackLabel("departmentfeedback", departmentname,new
>> Model("Department is required"));
>>        departmentFeedbackLabel.setOutputMarkupId(true);
>>        departmentname.add(new ComponentVisualErrorBehavior("onblur",
>> departmentFeedbackLabel));
>>        departmentform.add(departmentFeedbackLabel);
>>
>>
>>      departmentform.add(new
>> AjaxFallbackButton("savedepartmentbutton", departmentform) {
>>
>>           @Override
>>      protected void onSubmit(AjaxRequestTarget target, Form form) {
>>
>>       PersonnelrecordsDepartment
>> pr=(PersonnelrecordsDepartment)form.getDefaultModel().getObject();
>>
>>        try {
>>            if(isNew){
>>            dao.addPersonnelrecordsDepartment(pr);
>>            }
>>            else{
>>
>>            dao.savePersonnelrecordsDepartment(pr);
>>            }
>>        } catch (GenericBusinessException ex) {
>>
>>  Logger.getLogger(DepartmentPanel.class.getName()).log(Level.SEVERE,
>> null, ex);
>>        }
>>        //target.addComponent(form);
>>        setFormReponse(target);
>>
>>    }
>>
>>         @Override
>>                        protected void onError(AjaxRequestTarget target,
>> Form form)
>>                        {
>>                        // repaint the feedback panel so errors are shown
>>
>>                           target.addComponent(feedback);
>>                        }
>>
>>            });
>>
>>        add(departmentform);
>>    }
>>        private void setFormReponse(AjaxRequestTarget target){
>>
>>
>>            info("Save Operation was Successful");
>>
>>            target.addComponent(feedback);
>>
>>  }
>>    FeedbackPanel feedback;
>>
>>
>>    }
>>
>>
>> 
>>
>> On 1/20/10, Jonas  wrote:
>>> not sure if that's the problem, but shouldn't
>>>
>>> setChoices(titles);
>>>
>>> be
>>>
>>> setChoices(departments);
>>>
>>>
>>>
>>>
>>> On Wed, Jan 20, 2010 at 4:14 PM, chinedu efoagui 
>>> wrote:
 Hello , I have a class PersonnelrecordsDepartment
  with the following fields with corresponding getters and setters
   private java.lang.Integer id;
   private java.lang.String departmentname;
   private java.lang.Integer parentid;

 I left out the getters and setters . Any the field parentid can refer
 to an existing department like a recursive stuff like having a self
 foreign key
 Anyway the problem is that i have a dropdownlchoice for the form
 
 public class DepartmentDropDownChoice extends DropDownChoice {

   �...@springbean(name="IHRService")
    private  IHRService dao;

 */    /**
     *
     * @param id
     * @param model
     */
    public DepartmentDropDownChoice(String id,final IModel model){

        super(id,model);

Re: Custom DropDownChoice with css style

2010-01-21 Thread German Morales
Hallo Alexander,

Perhaps you could change this to be a FormComponent (actually inheriting
from FormComponentPanel).
Then, when your ajax call refreshes the "component", the whole div
(containing drop down + span) will be replaced by a new one.
In your version, if i understand correctly, wicket removes the old select
(but not your extra span, of which it is not aware of) and puts the new one
(which puts another span every time).

Regards,

German

2010/1/20 Alexander Monakhov 

> Hi, guys.
>
> I'm trying to implement DropDownChoice that could render  tag with
> possiblity to add style with css.
> What do I mean:
>  tag rendering is OS dependent. So, plain  element is
> always
> ugly. There is no possibility to change arrow, or border of drop down list
> only with css.
> One of the ways to resolve this problem is to add  tag before
> 
> tag to show currently selected value, then apply to it desired background
> and any desired styles and give  tag's opacity zero value. So, drop
> down menu would appear any time user clicks on span element. To push
> selected value to span onChange method for  tag is appropriated.
>
> So, I've created this class:
> 
> public class StyledDropDownChoice extends DropDownChoice {
>
> 
> /*Here goes constructors and StyleDropDownSpan is added as behavior. */
> 
>
>@Override
>protected void onComponentTag( ComponentTag tag ) {
>tag.put( "onChange", "var span = document.getElementById('" +
> getMarkupId()
>+ "-span'); var select = document.getElementById('" +
> getMarkupId()
>+  "'); span.innerHTML = select.options[
> select.selectedIndex ].innerHTML;" );
>//todo move javascript output to renderJavascript( CharSequence,
> String )
>
>super.onComponentTag( tag );
>}
>
>private class StyledDropDownSpan extends AbstractBehavior {
>
>@Override
>public void onComponentTag( Component component, ComponentTag tag )
> {
>replaceComponentTagBody( getMarkupStream(), tag,
>" component.getMarkupId()
>+ "-span\">" + component.getDefaultModelObjectAsString()
>
>+ "" );
>super.onComponentTag( component, tag );
>}
>
>}
>
> }
> 
>
> So, this code works fine with usual drop down choices. But, when I'm trying
> to update list of choice via AJAX call, another span element appear on the
> page. So, I get that  tag is added any time dropdownchoice is
> rendered. Could you help me to resolve this issue?
>
> Best regards, Alexander.
>