Re: Wicket 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread nino martinez wael
A screen shot? it's the text that should have shown this:

IT support vest æ ø å

http://www.imageupload.org/?d=4D92CA9C1

2011/3/29 Attila Király kiralyattila...@gmail.com:
 Could you provide a small example showing the problem?

 Attila

 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com

 Yeah I think so, the file encoding are utf-8

 Although this are in the header :

 !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; --
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
        xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;

 We had the meta tag aswell for utf-8 but it made no difference..

 Is there something else that I am missing?

 2011/3/29 Attila Király kiralyattila...@gmail.com:
  Yep I ment that and it looks ok. Is your html page in UTF-8 as well?
 
  Attila
 
  2011/3/29 nino martinez wael nino.martinez.w...@gmail.com
 
  you mean like this:
 
     Connector port=8080 protocol=HTTP/1.1
                connectionTimeout=2
                redirectPort=8443 URIEncoding=UTF-8 /
 
  Already done so.. Or?
 
  Thanks for helping..
 
  2011/3/29 Attila Király kiralyattila...@gmail.com:
   If this encoding issue is in url: did you configure Tomcat to use
 UTF-8
  for
   uri encoding (URIEncoding attribute on the HTTP connector)? The
 default
   encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty.
  
   Attila
  
   2011/3/29 nino martinez wael nino.martinez.w...@gmail.com
  
   Hi Guys
  
   Im not sure if this is a wicket issue (I don't think so). But we are
   experiencing encoding(æøå) issues with Tomcat 7.0.11 after using
   Apache Wicket 1.5-rc2. However this issue does not occur when running
   Jetty..
  
   Anyone has an idea on howto fix this?
  
  
   regards Nino
  
   -
   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



Listview gives mysterious log info

2011-03-30 Thread nino martinez wael
Listview gives mysterious log info what does it mean? This feels a bit
like deja vu but I could'nt find my post so forgive me i am double
posting ..



2011-03-29 15:27:32,316 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule23, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,348 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule26, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,363 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule29, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,379 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule2c, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,410 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule2f, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,410 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule32, component id: triggerSchedule, component tag:
container.

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



textarea

2011-03-30 Thread Thierry Peng

Quick question about textareas

I have on a panel two component, a textarea with a xml and a label. the 
label gets updated (via ajax)but the textarea not.


form2.add(area = new TextAreaString(userdata, new 
LoadableDetachableModelString() {

  @Override
  protected String load() {
  log.debug(loading in  area called);
return currentAccount.getUserdata();
  }
}));

form2.add(new Label(current, new LoadableDetachableModelString() {
  @Override
  protected String load() {
log.debug(loading in  area called);
return Ausgewählter Benutzer:  + currentAccount.getAccountName();
  }
}

the ajaxtarget is the parent of both components (the parent of the form2 
exactly). the loading in area called appears only once in the log, the 
other always. Does the textarea do some sort of caching?


greetings

thierry

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



1.5 visiting forms?

2011-03-30 Thread nino martinez wael
Hi

Can't I use the equals method on forms? How do I detect if 2 forms are
equal across requests?

Below does not work  But does iterate over the form where equals
should match. But I can see the forms contain different model types,
it's after a form submit...




public class DiscoverFeedBackPanelsVisitorT implements

IVisitorComponent, Void {

private Boolean shouldAccept;

private FormT form;

public DiscoverFeedBackPanelsVisitor(FormT form) {
setShouldAccept(false);
setForm(form);
}

@Override
public void component(Component component, IVisitVoid visit) {

if (Form.class.isAssignableFrom(component.getClass())) {
FormT possibleForm = 
Form.class.cast(component);
if (possibleForm.equals(getForm())) {

setShouldAccept(true);
visit.stop();
}
}

}

public void setShouldAccept(Boolean shouldAccept) {
this.shouldAccept = shouldAccept;
}

public Boolean getShouldAccept() {
return shouldAccept;
}

public void setForm(FormT form) {
this.form = form;
}

public FormT getForm() {
return form;
}

}

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



Re: Listview gives mysterious log info

2011-03-30 Thread Bas Gooren

Sounds like you are calling setOutputMarkupId on a container.

So I googled your error message and founr WICKET-3237 
(https://issues.apache.org/jira/browse/WICKET-3237)


Bas

Op 30-3-2011 8:54, nino martinez wael schreef:

Listview gives mysterious log info what does it mean? This feels a bit
like deja vu but I could'nt find my post so forgive me i am double
posting ..



2011-03-29 15:27:32,316 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule23, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,348 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule26, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,363 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule29, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,379 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule2c, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,410 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule2f, component id: triggerSchedule, component tag:
container.
2011-03-29 15:27:32,410 WARN  [org.apache.wicket.Component]  - Markup
id set on a component that is usually not rendered into markup. Markup
id: triggerSchedule32, component id: triggerSchedule, component tag:
container.

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



Re: 1.5 visiting forms?

2011-03-30 Thread Martin Grigorov
Iterate over Form.class, not Component.class
You may use form.getId() to check whether this is the form you're looking
for.

On Wed, Mar 30, 2011 at 11:12 AM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 Hi

 Can't I use the equals method on forms? How do I detect if 2 forms are
 equal across requests?

 Below does not work  But does iterate over the form where equals
 should match. But I can see the forms contain different model types,
 it's after a form submit...




public class DiscoverFeedBackPanelsVisitorT implements

IVisitorComponent, Void {

private Boolean shouldAccept;

private FormT form;

public DiscoverFeedBackPanelsVisitor(FormT form) {
setShouldAccept(false);
setForm(form);
}

@Override
public void component(Component component, IVisitVoid
 visit) {

if
 (Form.class.isAssignableFrom(component.getClass())) {
FormT possibleForm =
 Form.class.cast(component);
if (possibleForm.equals(getForm())) {

setShouldAccept(true);
visit.stop();
}
}

}

public void setShouldAccept(Boolean shouldAccept) {
this.shouldAccept = shouldAccept;
}

public Boolean getShouldAccept() {
return shouldAccept;
}

public void setForm(FormT form) {
this.form = form;
}

public FormT getForm() {
return form;
}

}

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: 1.5 visiting forms?

2011-03-30 Thread nino martinez wael
I have a page which have several panels of the same type which
contains forms, all those forms have the same id.. Currently I am
considering grabbing the modelobject on the form and equaling those,
this of course means if I have multiple forms editing the same object
on the same page with feedbackpanels those would show each others
messages.. In my case I do not have that. But I thought somehow the
equals method on forms where safe to use across requests...


About iterating over forms, I am doing so :) visitParents does not
allow other types than components AFAIK...

DiscoverFormsVisitorT discoverFeedBackPanelsVisitor = new
DiscoverFormsVisitorT(
getForm());
message.getReporter().visitParents(Form.class,
discoverFeedBackPanelsVisitor);
return discoverFeedBackPanelsVisitor.getShouldAccept();


2011/3/30 Martin Grigorov mgrigo...@apache.org:
 Iterate over Form.class, not Component.class
 You may use form.getId() to check whether this is the form you're looking
 for.

 On Wed, Mar 30, 2011 at 11:12 AM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

 Hi

 Can't I use the equals method on forms? How do I detect if 2 forms are
 equal across requests?

 Below does not work  But does iterate over the form where equals
 should match. But I can see the forms contain different model types,
 it's after a form submit...




        public class DiscoverFeedBackPanelsVisitorT implements

        IVisitorComponent, Void {

                private Boolean shouldAccept;

                private FormT form;

                public DiscoverFeedBackPanelsVisitor(FormT form) {
                        setShouldAccept(false);
                        setForm(form);
                }

                @Override
                public void component(Component component, IVisitVoid
 visit) {

                        if
 (Form.class.isAssignableFrom(component.getClass())) {
                                FormT possibleForm =
 Form.class.cast(component);
                                if (possibleForm.equals(getForm())) {

                                        setShouldAccept(true);
                                        visit.stop();
                                }
                        }

                }

                public void setShouldAccept(Boolean shouldAccept) {
                        this.shouldAccept = shouldAccept;
                }

                public Boolean getShouldAccept() {
                        return shouldAccept;
                }

                public void setForm(FormT form) {
                        this.form = form;
                }

                public FormT getForm() {
                        return form;
                }

        }

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/


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



Re: Listview gives mysterious log info

2011-03-30 Thread nino martinez wael
Ahh yes, I was diving a bit too deep in my ajax, to notice the html
side:) Nice that wicket is that way, I mean that you actually can
forget about js/html when doing ajax :)

2011/3/30 Bas Gooren b...@iswd.nl:
 Sounds like you are calling setOutputMarkupId on a container.

 So I googled your error message and founr WICKET-3237
 (https://issues.apache.org/jira/browse/WICKET-3237)

 Bas

 Op 30-3-2011 8:54, nino martinez wael schreef:

 Listview gives mysterious log info what does it mean? This feels a bit
 like deja vu but I could'nt find my post so forgive me i am double
 posting ..



 2011-03-29 15:27:32,316 WARN  [org.apache.wicket.Component]  - Markup
 id set on a component that is usually not rendered into markup. Markup
 id: triggerSchedule23, component id: triggerSchedule, component tag:
 container.
 2011-03-29 15:27:32,348 WARN  [org.apache.wicket.Component]  - Markup
 id set on a component that is usually not rendered into markup. Markup
 id: triggerSchedule26, component id: triggerSchedule, component tag:
 container.
 2011-03-29 15:27:32,363 WARN  [org.apache.wicket.Component]  - Markup
 id set on a component that is usually not rendered into markup. Markup
 id: triggerSchedule29, component id: triggerSchedule, component tag:
 container.
 2011-03-29 15:27:32,379 WARN  [org.apache.wicket.Component]  - Markup
 id set on a component that is usually not rendered into markup. Markup
 id: triggerSchedule2c, component id: triggerSchedule, component tag:
 container.
 2011-03-29 15:27:32,410 WARN  [org.apache.wicket.Component]  - Markup
 id set on a component that is usually not rendered into markup. Markup
 id: triggerSchedule2f, component id: triggerSchedule, component tag:
 container.
 2011-03-29 15:27:32,410 WARN  [org.apache.wicket.Component]  - Markup
 id set on a component that is usually not rendered into markup. Markup
 id: triggerSchedule32, component id: triggerSchedule, component tag:
 container.

 -
 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 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread Antoine van Wel
Maybe this in application startup?

getMarkupSettings().setDefaultMarkupEncoding(UTF-8);


Antoine


On Wed, Mar 30, 2011 at 8:13 AM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 A screen shot? it's the text that should have shown this:

 IT support vest æ ø å

 http://www.imageupload.org/?d=4D92CA9C1

 2011/3/29 Attila Király kiralyattila...@gmail.com:
 Could you provide a small example showing the problem?

 Attila

 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com

 Yeah I think so, the file encoding are utf-8

 Although this are in the header :

 !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; --
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
        xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;

 We had the meta tag aswell for utf-8 but it made no difference..

 Is there something else that I am missing?

 2011/3/29 Attila Király kiralyattila...@gmail.com:
  Yep I ment that and it looks ok. Is your html page in UTF-8 as well?
 
  Attila
 
  2011/3/29 nino martinez wael nino.martinez.w...@gmail.com
 
  you mean like this:
 
     Connector port=8080 protocol=HTTP/1.1
                connectionTimeout=2
                redirectPort=8443 URIEncoding=UTF-8 /
 
  Already done so.. Or?
 
  Thanks for helping..
 
  2011/3/29 Attila Király kiralyattila...@gmail.com:
   If this encoding issue is in url: did you configure Tomcat to use
 UTF-8
  for
   uri encoding (URIEncoding attribute on the HTTP connector)? The
 default
   encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty.
  
   Attila
  
   2011/3/29 nino martinez wael nino.martinez.w...@gmail.com
  
   Hi Guys
  
   Im not sure if this is a wicket issue (I don't think so). But we are
   experiencing encoding(æøå) issues with Tomcat 7.0.11 after using
   Apache Wicket 1.5-rc2. However this issue does not occur when running
   Jetty..
  
   Anyone has an idea on howto fix this?
  
  
   regards Nino
  
   -
   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



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



Re: Wicket 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread nino martinez wael
I remember something about it, I'll try it and tell if it made a difference..

thanks

2011/3/30 Antoine van Wel antoine.van@gmail.com:
 Maybe this in application startup?

 getMarkupSettings().setDefaultMarkupEncoding(UTF-8);


 Antoine


 On Wed, Mar 30, 2011 at 8:13 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 A screen shot? it's the text that should have shown this:

 IT support vest æ ø å

 http://www.imageupload.org/?d=4D92CA9C1

 2011/3/29 Attila Király kiralyattila...@gmail.com:
 Could you provide a small example showing the problem?

 Attila

 2011/3/29 nino martinez wael nino.martinez.w...@gmail.com

 Yeah I think so, the file encoding are utf-8

 Although this are in the header :

 !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; --
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
        xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;

 We had the meta tag aswell for utf-8 but it made no difference..

 Is there something else that I am missing?

 2011/3/29 Attila Király kiralyattila...@gmail.com:
  Yep I ment that and it looks ok. Is your html page in UTF-8 as well?
 
  Attila
 
  2011/3/29 nino martinez wael nino.martinez.w...@gmail.com
 
  you mean like this:
 
     Connector port=8080 protocol=HTTP/1.1
                connectionTimeout=2
                redirectPort=8443 URIEncoding=UTF-8 /
 
  Already done so.. Or?
 
  Thanks for helping..
 
  2011/3/29 Attila Király kiralyattila...@gmail.com:
   If this encoding issue is in url: did you configure Tomcat to use
 UTF-8
  for
   uri encoding (URIEncoding attribute on the HTTP connector)? The
 default
   encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty.
  
   Attila
  
   2011/3/29 nino martinez wael nino.martinez.w...@gmail.com
  
   Hi Guys
  
   Im not sure if this is a wicket issue (I don't think so). But we are
   experiencing encoding(æøå) issues with Tomcat 7.0.11 after using
   Apache Wicket 1.5-rc2. However this issue does not occur when running
   Jetty..
  
   Anyone has an idea on howto fix this?
  
  
   regards Nino
  
   -
   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



 -
 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: textarea

2011-03-30 Thread Martin Grigorov
no, it doesn't cache
it seems the textarea is not involved at all in the ajax request processing
and its model is not needed

On Wed, Mar 30, 2011 at 10:52 AM, Thierry Peng p...@glue.ch wrote:

 Quick question about textareas

 I have on a panel two component, a textarea with a xml and a label. the
 label gets updated (via ajax)but the textarea not.

 form2.add(area = new TextAreaString(userdata, new
 LoadableDetachableModelString() {
  @Override
  protected String load() {
  log.debug(loading in  area called);
return currentAccount.getUserdata();
  }
}));

 form2.add(new Label(current, new LoadableDetachableModelString() {
  @Override
  protected String load() {
log.debug(loading in  area called);
return Ausgewählter Benutzer:  + currentAccount.getAccountName();
  }
}

 the ajaxtarget is the parent of both components (the parent of the form2
 exactly). the loading in area called appears only once in the log, the
 other always. Does the textarea do some sort of caching?

 greetings

 thierry

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: textarea

2011-03-30 Thread Thierry Peng

On 03/30/2011 11:19 AM, Martin Grigorov wrote:

no, it doesn't cache
it seems the textarea is not involved at all in the ajax request processing
and its model is not needed

On Wed, Mar 30, 2011 at 10:52 AM, Thierry Pengp...@glue.ch  wrote:


Quick question about textareas

I have on a panel two component, a textarea with a xml and a label. the
label gets updated (via ajax)but the textarea not.

form2.add(area = new TextAreaString(userdata, new
LoadableDetachableModelString() {
  @Override
  protected String load() {
  log.debug(loading in  area called);
return currentAccount.getUserdata();
  }
}));

form2.add(new Label(current, new LoadableDetachableModelString() {
  @Override
  protected String load() {
log.debug(loading in  area called);
return Ausgewählter Benutzer:  + currentAccount.getAccountName();
  }
}

the ajaxtarget is the parent of both components (the parent of the form2
exactly). the loading in area called appears only once in the log, the
other always. Does the textarea do some sort of caching?

greetings

thierry

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




the problem was the page architecture. the page had two panels, an 
overview wmc with an inmethodgrid for all account registered in the 
application and a detail wmc with the the textarea. if someone clicked 
on an account displayed in the grid then the overviewpanel was made 
invisible and the detailpanel was made visible. the detailpanel had a 
submit and a cancelbutton.


if an user pressed the cancel button(formprocessing false) on the 
detailpanel, and selected another account on the overviewpanel, he saw 
the details (textarea) of the first account.
As it seems only the readonly part (the label) was reloaded and the 
textarea not. But I can't explain this behaviour. It seems that the 
model on these components didn't pickup the modelobject change even when 
the modelchanging()/modelchanged() was fired.


however, I solved this problem with a replace panel strategy instead of 
the isvisible strategy. works like a charm this way.


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



Nested forms and conditional validation

2011-03-30 Thread Robert Dahlström
Hi, I'm currently trying to work out how to do conditional validation 
with nested forms. Googling a bit gave me the following suggestion on 
how to disable a nested form:


(From https://cwiki.apache.org/WICKET/conditional-validation.html)
Form nestedForm = new Form(nestedForm) {
 @Override
  public boolean isEnabled() {
   if (getRootForm().findSubmittingButton() != null) {
return getRootForm().findSubmittingButton().getForm() == this;
   } else {
return true;
   }
}

But when I try this with Wicket 1.4.16 I noticed that 
findSubmittingButton internally calls isEnabledInHierarchy which ends up 
calling isEnabled so I get stuck in a loop that eventually throws an 
exception.


So how should one go about working with nested forms if I don't want the 
nested form to be submitted when the outer form is submitted?


Appreciative of any help,

Regards
Robert

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



Re: Wicket 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread Andrea Del Bene

Hi,

maybe I've got the same problem. I'm using Wicket 1.5 RC3 (but with 
tomcat 6.0.32) and each italian character (èàòì...) went lost, even if 
page encoding was UTF-8. I've tried each of the previous suggestions but 
they didn't work.
I've solved it adding a filter to my app, as described here 
http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q3


Hope this could help.

I remember something about it, I'll try it and tell if it made a difference..

thanks

2011/3/30 Antoine van Welantoine.van@gmail.com:

Maybe this in application startup?

getMarkupSettings().setDefaultMarkupEncoding(UTF-8);


Antoine


On Wed, Mar 30, 2011 at 8:13 AM, nino martinez wael
nino.martinez.w...@gmail.com  wrote:

A screen shot? it's the text that should have shown this:

IT support vest æ ø å

http://www.imageupload.org/?d=4D92CA9C1

2011/3/29 Attila Királykiralyattila...@gmail.com:

Could you provide a small example showing the problem?

Attila

2011/3/29 nino martinez waelnino.martinez.w...@gmail.com


Yeah I think so, the file encoding are utf-8

Although this are in the header :

!-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; --
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
xmlns:wicket=
http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;

We had the meta tag aswell for utf-8 but it made no difference..

Is there something else that I am missing?

2011/3/29 Attila Királykiralyattila...@gmail.com:

Yep I ment that and it looks ok. Is your html page in UTF-8 as well?

Attila

2011/3/29 nino martinez waelnino.martinez.w...@gmail.com


you mean like this:

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 URIEncoding=UTF-8 /

Already done so.. Or?

Thanks for helping..

2011/3/29 Attila Királykiralyattila...@gmail.com:

If this encoding issue is in url: did you configure Tomcat to use

UTF-8

for

uri encoding (URIEncoding attribute on the HTTP connector)? The

default

encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty.

Attila

2011/3/29 nino martinez waelnino.martinez.w...@gmail.com


Hi Guys

Im not sure if this is a wicket issue (I don't think so). But we are
experiencing encoding(æøå) issues with Tomcat 7.0.11 after using
Apache Wicket 1.5-rc2. However this issue does not occur when running
Jetty..

Anyone has an idea on howto fix this?


regards Nino

-
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



-
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 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread Martin Grigorov
Andrea,

do you have any other filters which process the request before WicketFilter
?

On Wed, Mar 30, 2011 at 4:34 PM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 Hi,

 maybe I've got the same problem. I'm using Wicket 1.5 RC3 (but with tomcat
 6.0.32) and each italian character (èàòì...) went lost, even if page
 encoding was UTF-8. I've tried each of the previous suggestions but they
 didn't work.
 I've solved it adding a filter to my app, as described here
 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q3

 Hope this could help.

  I remember something about it, I'll try it and tell if it made a
 difference..

 thanks

 2011/3/30 Antoine van Welantoine.van@gmail.com:

 Maybe this in application startup?

 getMarkupSettings().setDefaultMarkupEncoding(UTF-8);


 Antoine


 On Wed, Mar 30, 2011 at 8:13 AM, nino martinez wael
 nino.martinez.w...@gmail.com  wrote:

 A screen shot? it's the text that should have shown this:

 IT support vest æ ø å

 http://www.imageupload.org/?d=4D92CA9C1

 2011/3/29 Attila Királykiralyattila...@gmail.com:

 Could you provide a small example showing the problem?

 Attila

 2011/3/29 nino martinez waelnino.martinez.w...@gmail.com

  Yeah I think so, the file encoding are utf-8

 Although this are in the header :

 !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; --
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;

 We had the meta tag aswell for utf-8 but it made no difference..

 Is there something else that I am missing?

 2011/3/29 Attila Királykiralyattila...@gmail.com:

 Yep I ment that and it looks ok. Is your html page in UTF-8 as well?

 Attila

 2011/3/29 nino martinez waelnino.martinez.w...@gmail.com

  you mean like this:

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 URIEncoding=UTF-8 /

 Already done so.. Or?

 Thanks for helping..

 2011/3/29 Attila Királykiralyattila...@gmail.com:

 If this encoding issue is in url: did you configure Tomcat to use

 UTF-8

 for

 uri encoding (URIEncoding attribute on the HTTP connector)? The

 default

 encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty.

 Attila

 2011/3/29 nino martinez waelnino.martinez.w...@gmail.com

  Hi Guys

 Im not sure if this is a wicket issue (I don't think so). But we
 are
 experiencing encoding(æøå) issues with Tomcat 7.0.11 after using
 Apache Wicket 1.5-rc2. However this issue does not occur when
 running
 Jetty..

 Anyone has an idea on howto fix this?


 regards Nino


 -
 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


  -
 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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Wicket 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread Andrea Del Bene
No, I'm running my application in a development environment, that is 
tomcat started by Eclipse and I've got just one application. Its web.xml 
is the following:


?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

version=2.4

display-nameUgoCert/display-name

!--
There are three means to configure Wickets configuration mode 
and they

are tested in the order given. 1) A system property:
-Dwicket.configuration 2) servlet specific init-param 3) context
specific context-param The value might be either development
(reloading when templates change) or deployment. If no 
configuration

is found, development is the default.
--


filter
filter-namecharsetEncoding/filter-name
filter-classit.cise.commons.utility.servletFilter.CharacterEncodingFilter/filter-class 


/filter

filter
filter-namewicket.UgoCert/filter-name
filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name
param-valueit.cise.gesagen.portal.WicketApplication/param-value
/init-param
!-- init-param
param-nameconfiguration/param-name
param-valuedeployment/param-value
/init-param --
/filter

filter-mapping
filter-namecharsetEncoding/filter-name
url-pattern/*/url-pattern
/filter-mapping
filter-mapping
filter-namewicket.UgoCert/filter-name
url-pattern/*/url-pattern
/filter-mapping
session-config
session-timeout4096/session-timeout
/session-config
/web-app

Andrea,

do you have any other filters which process the request before WicketFilter
?

On Wed, Mar 30, 2011 at 4:34 PM, Andrea Del Beneadelb...@ciseonweb.itwrote:




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



Wicket Security (Swarm/Wasp) 1.4.2 released

2011-03-30 Thread Martijn Dashorst
Releasing the Wicket Security project used to be a simple mvn
release:prepare; mvn release:perform, but apparently something has
changed where finding and fixing a bug took all of 30 minutes and
releasing the software took over 3 hours with Maven's release plugin
(times two developers). While I'm not sure what changed why the ssh
wagon stopped working, the process was aggravated by the move to git
(and the old pom's insistence on still thinking in SVN terms).

Since the project needs to be in its own GIT repository for the
release plugin to work, we moved it out of the wicketstuff sandbox,
and temporarily put it in a git repository under

https://github.com/dashorst/wicketstuff-security

The reason for the release was a rare infinite loop that was caused by
a race condition [1]. This occurred on our systems for the first time
in about 4 years of production use.

The release has been uploaded to the wicketstuff.org maven repository
and can be obtained here:

http://wicketstuff.org/maven/repository/org/apache/wicket/wicket-security/

The future will hold the following:
 - integrate build into wicketstuff core
 - move to a new package structure to fit inside wicketstuff core
(including groupid)
 - upgrade to wicket 1.5

Emond and Martijn


[1] 
https://github.com/dashorst/wicketstuff-security/commit/c38e017aed780b29993524b5bdcb3d427b3ba216

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



Re: Nested forms and conditional validation

2011-03-30 Thread Robert Dahlström
I did manage to get this working using the other pattern from the 
conditional-validation page (i.e. using the FormVisitorParticipant) but 
I'm still curious if the isEnabled solution should work or not?


Regards
Robert

On 03/30/2011 02:45 PM, Robert Dahlström wrote:

Hi, I'm currently trying to work out how to do conditional validation
with nested forms. Googling a bit gave me the following suggestion on
how to disable a nested form:

(From https://cwiki.apache.org/WICKET/conditional-validation.html)
Form nestedForm = new Form(nestedForm) {
   @Override
public boolean isEnabled() {
 if (getRootForm().findSubmittingButton() != null) {
  return getRootForm().findSubmittingButton().getForm() == this;
 } else {
  return true;
 }
}

But when I try this with Wicket 1.4.16 I noticed that
findSubmittingButton internally calls isEnabledInHierarchy which ends up
calling isEnabled so I get stuck in a loop that eventually throws an
exception.

So how should one go about working with nested forms if I don't want the
nested form to be submitted when the outer form is submitted?

Appreciative of any help,

Regards
Robert

-
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: problems with spring integration

2011-03-30 Thread hrbaer
I added wicket-spring-annot to my project, removed all of the previous spring
code and just added getComponentInstantiationListeners().add(new
SpringComponentInjector(this)); to the init method of my xxxApplication
class.

But now I'm getting an error:
The type org.apache.wicket.injection.ComponentInjector cannot be resolved.
It is indirectly referenced from required .class files

Any idea?
Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418401.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: problems with spring integration

2011-03-30 Thread James Carman
Are you using maven?  If so, you should have all the dependencies you
need.  If not, you'll need wicket-ioc.jar

On Wed, Mar 30, 2011 at 11:23 AM, hrbaer herber.m...@gmail.com wrote:
 I added wicket-spring-annot to my project, removed all of the previous spring
 code and just added getComponentInstantiationListeners().add(new
 SpringComponentInjector(this)); to the init method of my xxxApplication
 class.

 But now I'm getting an error:
 The type org.apache.wicket.injection.ComponentInjector cannot be resolved.
 It is indirectly referenced from required .class files

 Any idea?
 Thanks in advance.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418401.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: problems with spring integration

2011-03-30 Thread hrbaer
No, I don't. So adding wicket-ioc.jar to my project solves this problem.

But because of the fact I don't have a default constructor I get an
exception.
My constructor looks like public Test( PageParameters params ){ ... }.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418449.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: problems with spring integration

2011-03-30 Thread hrbaer
Just to summarize my status:

I've added addComponentInstantiationListener( new
SpringComponentInjector(this) ); to the init method of my xxxApplication
file, I added  to my applicationContext and withing my WebPage I have this
code:

public class Test extends WebPage {

@SpringBean
private UserService userService;

public Test( PageParameters params ) {

(...)

}

If I add



to the applicationContext I get the error Could not instantiate bean class
[de.Test]: No default constructor found;

If I don't add this line I get the error message WicketMessage: Can't
instantiate page using constructor public
de.Test(org.apache.wicket.PageParameters) and argument
Root cause:
java.lang.ClassNotFoundException: net.sf.cglib.proxy.Callback (...)

At the moment I'm at a loss. Every help would be appreciated.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418488.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Nested forms and conditional validation

2011-03-30 Thread Igor Vaynberg
depending on external factors while overriding isenabled()/isvisible()
is dangerous for the reasons youve just found out.

this is why we take care to provide alternative hooks, such as
IFormVisitorParticipant

-igor


2011/3/30 Robert Dahlström robert.dahlst...@ongame.com:
 I did manage to get this working using the other pattern from the
 conditional-validation page (i.e. using the FormVisitorParticipant) but I'm
 still curious if the isEnabled solution should work or not?

 Regards
 Robert

 On 03/30/2011 02:45 PM, Robert Dahlström wrote:

 Hi, I'm currently trying to work out how to do conditional validation
 with nested forms. Googling a bit gave me the following suggestion on
 how to disable a nested form:

 (From https://cwiki.apache.org/WICKET/conditional-validation.html)
 Form nestedForm = new Form(nestedForm) {
   @Override
    public boolean isEnabled() {
     if (getRootForm().findSubmittingButton() != null) {
      return getRootForm().findSubmittingButton().getForm() == this;
     } else {
      return true;
     }
 }

 But when I try this with Wicket 1.4.16 I noticed that
 findSubmittingButton internally calls isEnabledInHierarchy which ends up
 calling isEnabled so I get stuck in a loop that eventually throws an
 exception.

 So how should one go about working with nested forms if I don't want the
 nested form to be submitted when the outer form is submitted?

 Appreciative of any help,

 Regards
 Robert

 -
 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: problems with spring integration

2011-03-30 Thread moèz ben rhouma
Hi,
For this error:
*java.lang.ClassNotFoundException: net.sf.cglib.proxy.Callback (...)*

you can add the cglib-nodep library .

I think, this link (
http://javajeedevelopment.blogspot.com/2011/03/integrating-spring-security-3-with.html)
can help you.

Thanks

2011/3/30 hrbaer herber.m...@gmail.com

 Just to summarize my status:

 I've added addComponentInstantiationListener( new
 SpringComponentInjector(this) ); to the init method of my xxxApplication
 file, I added  to my applicationContext and withing my WebPage I have this
 code:

 public class Test extends WebPage {

 @SpringBean
private UserService userService;

public Test( PageParameters params ) {

(...)

 }

 If I add



 to the applicationContext I get the error Could not instantiate bean class
 [de.Test]: No default constructor found;

 If I don't add this line I get the error message WicketMessage: Can't
 instantiate page using constructor public
 de.Test(org.apache.wicket.PageParameters) and argument
 Root cause:
 java.lang.ClassNotFoundException: net.sf.cglib.proxy.Callback (...)

 At the moment I'm at a loss. Every help would be appreciated.


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418488.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: problems with spring integration

2011-03-30 Thread jcgarciam
Hi,

I believe the problem to your [Could not instantiate bean class [de.Test]:
No default constructor found;] is that your are setting up a Wicket Page
(without default constructor) as a managed bean in Spring, when what you
actually mean was to define your [UserService] as the Spring bean.

Spring doesn't to managed the Wicket pages specifically, just bind your
services and then use the @SpringBean annotation on it and you will be fine.


On Wed, Mar 30, 2011 at 12:56 PM, hrbaer [via Apache Wicket] 
ml-node+3418488-701454310-65...@n4.nabble.com wrote:

 Just to summarize my status:

 I've added *addComponentInstantiationListener( new
 SpringComponentInjector(this) );* to the init method of my xxxApplication
 file, I added *bean id=userService
 class=de.service.UserService/bean* to my applicationContext and
 withing my WebPage I have this code:

 public class Test extends WebPage {

 @SpringBean
 private UserService userService;

 public Test( PageParameters params ) {

 (...)

 }

 If I add
 bean id=test class=de.Test
 property name=userService ref=userService/
 /bean
 to the applicationContext I get the error Could not instantiate bean class
 [de.Test]: No default constructor found;

 If I don't add this line I get the error message *WicketMessage: Can't
 instantiate page using constructor public
 de.Test(org.apache.wicket.PageParameters) and argument
 Root cause:
 java.lang.ClassNotFoundException: net.sf.cglib.proxy.Callback (...)*

 At the moment I'm at a loss. Every help would be appreciated.


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418488.html
  To start a new topic under Apache Wicket, email
 ml-node+1842946-398011874-65...@n4.nabble.com
 To unsubscribe from Apache Wicket, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=.





-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
--Anyone who has never made a mistake has never tried anything new.--


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/problems-with-spring-integration-tp3416484p3418767.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: flexible authentication

2011-03-30 Thread Bertrand Guay-Paquet
If I understand correctly, Marc wants to build a contact details page 
which can either be public (unprotected), private or semi-private (think 
Facebook privacy settings) based on a user preference, most likely 
stored in a database.


I am also trying to implement a similar mechanism and I am having 
trouble finding how to achieve this with the IAuthorizationStrategy. A 
pre-condition to achieving such an authorization check is to have access 
to the Page constructor parameters (PageParameters or otherwise). 
Without them, I can't see how it is possible to retrieve the privacy 
settings of a user's detail page.


IAuthorizationStrategy#isInstantiationAuthorized(ClassT 
componentClass) is called in the constructor of Component. At that time, 
Page#getPageParameters() cannot be used because its constructor has not 
been executed. Is there another way to access the PageParameters for the 
current Page instanciation? What about if the page is created with 
another constructor which receives model objects?


Marc, if you find an appropriate way to deal with this, could you please 
provide some hints? Also, please correct me if I misunderstood your purpose.


Regards,
Bertrand

On 29/03/2011 5:27 PM, mzem...@osc.state.ny.us wrote:

I think you could do it by using a base role that all users receive,
then add additional roles to tighten it down.  You would then need to fake
authentication of the base users by calling session.authenticate(user,
pass) and assigning the BASE role, even though the user won't
explicitly log in.  Users who do log in will receive the correct role such
as ADMIN

Some users secure (ADMIN), some users wide-open (BASE)
@AuthorizeInstantiation({ADMIN, BASE})

All users secure
@AuthorizeInstantiation(ADMIN)

You might also consider subclassing the page and marking that with the
annotation, then handle the response to the secured or unsecured version
by checking if the user is signed in.  I'm not sure where you are going
with this because I'm not sure why you have the requirement of being
secure for some users but not secure for others.




From:   hrbaerherber.m...@gmail.com
To: users@wicket.apache.org
Date:   03/29/2011 12:37 PM
Subject:flexible authentication



Hi all,

my web application is using the wicket authentication approach
(AuthenticatedWebSession) and all my secure java files are marked with
@AuthorizeInstantiation(ADMIN)
So once I added this annotation there is no chance to bypass the
authentication.

But what if there is the need to be flixible? What if for some users the
page A should be secure and for others don't?

Let's assume there is is page with e.g. contact informations and a user
can
decide for his own if the page should be accessible with or without
authentication. How can I achieve that without using the wicket approach?
At
the moment it don't think that the wicket approach is the right one?!

Thanks in advance.

--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/flexible-authentication-tp3415413p3415413.html

Sent from the Users forum mailing list archive at Nabble.com.

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






Notice: This communication, including any attachments, is intended solely
for the use of the individual or entity to which it is addressed. This
communication may contain information that is protected from disclosure
under State and/or Federal law. Please notify the sender immediately if
you have received this communication in error and delete this email from
your system. If you are not the intended recipient, you are requested not
to disclose, copy, distribute or take any action in reliance on the
contents of this information.


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



Re: Set all form fields to output markup id automatically

2011-03-30 Thread Martin Grigorov
@Bruno: this is interesting question. You should ask it in scala-users@. I
think this should be possible with some implicit declaration.

@Matthew: Do you use org.apache.wicket.markup.html.form.FormComponentLabel ?

On Tue, Mar 29, 2011 at 11:29 AM, Matthew Pennington 
m...@profounddecisions.co.uk wrote:


  I personally would suggest *not* having that second line
 component.setMarkupId(component.getId()) there.  Let Wicket generate the
 IDs for you so that they're all unique on a page.  Your approach above
 breaks using two EmailAddressTextField (fake example class) components on
 the same page.

 Designers should use css class to style.  An occasional ID that isn't
 attached to a Wicket component can also help (div surrounding content
 section, etc).

 The only problem with this argument is that ID fields are a part of the
 HTML syntax, via the for attribute of a html label...

 I've only recently started using wicket and I think it's *fantastic* but
 the only thing I don't like is the way it changes the ID value of elements.
 I'm sure it's necessary for the way Wicket works and I'm sure it's an issue
 that's been discussed by wicket people before, but it came as a pretty nasty
 surprise to me when I discovered it half way through writing my first
 application (it doesn't seem to me to be very well flagged up for such a
 major issue).

 Obviously I'm a newb, but the the only solution I am aware of to the
 problem is to rewrite every label on every form as a wicket component. That
 seems to run against the wicket philosophy of keeping the html and the code
 separate.

 I realize nothing in life is perfect, but so far it's the *only* thing
 about wicket that *isn't* perfect... :)


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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Set all form fields to output markup id automatically

2011-03-30 Thread Matthew Pennington

On 30/03/2011 19:44, Martin Grigorov wrote:

@Bruno: this is interesting question. You should ask it in scala-users@. I
think this should be possible with some implicit declaration.

@Matthew: Do you use org.apache.wicket.markup.html.form.FormComponentLabel ?
Going through the app and changing all the non-functioning plain html 
form labels to wicket FormComponentLabels is on my job list to do before 
it's finished!


So yeah, I'm aware of it, but while that component helps reduce the 
coding burden it still means that every single form component now needs 
a second wicket component creating and adding to the form *just to make 
the html work the way you would expect it to work.* That is tedious and 
it's additional plumbing code just for the sake of making things work 
so it strikes me as inherently undesirable. Wicket is fantastic at 
keeping code out of the html, it just seems to fly in the face of that 
ethos that it then forces me to write the html labels in the code.


Given that at some point in the processing cycle Wicket must be setting 
the ID of the form component labels, it seems a shame that it can't also 
detect any label that has a for attribute for the id it's altering and 
update the for attribute as well. I'm sure there are many good reasons 
why that wouldn't work but to my inexperienced mind it's a real pity! 
You'd still have the gotcha of discovering that Wicket was changing your 
ID values, but you'd never have to worry about keeping their attendant 
HTML labels in sync because Wicket could just do that for you?


Matt


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



Re: Set all form fields to output markup id automatically

2011-03-30 Thread Martin Grigorov
On Wed, Mar 30, 2011 at 10:18 PM, Matthew Pennington 
m...@profounddecisions.co.uk wrote:

 On 30/03/2011 19:44, Martin Grigorov wrote:

 @Bruno: this is interesting question. You should ask it in scala-users@.
 I
 think this should be possible with some implicit declaration.

 @Matthew: Do you use org.apache.wicket.markup.html.form.FormComponentLabel
 ?

 Going through the app and changing all the non-functioning plain html form
 labels to wicket FormComponentLabels is on my job list to do before it's
 finished!

 So yeah, I'm aware of it, but while that component helps reduce the coding
 burden it still means that every single form component now needs a second
 wicket component creating and adding to the form *just to make the html work
 the way you would expect it to work.* That is tedious and it's additional
 plumbing code just for the sake of making things work so it strikes me as
 inherently undesirable. Wicket is fantastic at keeping code out of the html,
 it just seems to fly in the face of that ethos that it then forces me to
 write the html labels in the code.

 Given that at some point in the processing cycle Wicket must be setting the
 ID of the form component labels, it seems a shame that it can't also detect
 any label that has a for attribute for the id it's altering and update the
 for attribute as well. I'm sure there are many good reasons why that
 wouldn't work but to my inexperienced mind it's a real pity! You'd still
 have the gotcha of discovering that Wicket was changing your ID values, but
 you'd never have to worry about keeping their attendant HTML labels in sync
 because Wicket could just do that for you?


I remember someone asked for 'wicket:for' attribute:
label wicket:for=someId/labelinput wicket:id=someId .../

I think it is not hard to implement with IMarkupFilter.
Look for 'wicket:for' in Google/Nabble. Maybe there is some stopper and
that's why it is not already implemented. Otherwise just add a RFE.


 Matt



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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Wicket 1.5 and Tomcat 7 encoding issues?

2011-03-30 Thread Attila Király
Hi,

you are right this is the issue: request encoding is not set. I forgot it
but I use spring's CharacterEncodingFilter for that in all my web apps (not
just wicket ones). But I think this could be done in wicket 1.5 out of the
box, so I made a patch for it:
https://issues.apache.org/jira/browse/WICKET-3578

https://issues.apache.org/jira/browse/WICKET-3578Attila

2011/3/30 Andrea Del Bene adelb...@ciseonweb.it

 Hi,

 maybe I've got the same problem. I'm using Wicket 1.5 RC3 (but with tomcat
 6.0.32) and each italian character (èàòì...) went lost, even if page
 encoding was UTF-8. I've tried each of the previous suggestions but they
 didn't work.
 I've solved it adding a filter to my app, as described here
 http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q3

 Hope this could help.

  I remember something about it, I'll try it and tell if it made a
 difference..

 thanks

 2011/3/30 Antoine van Welantoine.van@gmail.com:

 Maybe this in application startup?

 getMarkupSettings().setDefaultMarkupEncoding(UTF-8);


 Antoine


 On Wed, Mar 30, 2011 at 8:13 AM, nino martinez wael
 nino.martinez.w...@gmail.com  wrote:

 A screen shot? it's the text that should have shown this:

 IT support vest æ ø å

 http://www.imageupload.org/?d=4D92CA9C1

 2011/3/29 Attila Királykiralyattila...@gmail.com:

 Could you provide a small example showing the problem?

 Attila

 2011/3/29 nino martinez waelnino.martinez.w...@gmail.com

  Yeah I think so, the file encoding are utf-8

 Although this are in the header :

 !-- DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; --
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd;

 We had the meta tag aswell for utf-8 but it made no difference..

 Is there something else that I am missing?

 2011/3/29 Attila Királykiralyattila...@gmail.com:

 Yep I ment that and it looks ok. Is your html page in UTF-8 as well?

 Attila

 2011/3/29 nino martinez waelnino.martinez.w...@gmail.com

  you mean like this:

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 URIEncoding=UTF-8 /

 Already done so.. Or?

 Thanks for helping..

 2011/3/29 Attila Királykiralyattila...@gmail.com:

 If this encoding issue is in url: did you configure Tomcat to use

 UTF-8

 for

 uri encoding (URIEncoding attribute on the HTTP connector)? The

 default

 encoding for URI is ISO-8859-1 in Tomcat and UTF-8 in Jetty.

 Attila

 2011/3/29 nino martinez waelnino.martinez.w...@gmail.com

  Hi Guys

 Im not sure if this is a wicket issue (I don't think so). But we
 are
 experiencing encoding(æøå) issues with Tomcat 7.0.11 after using
 Apache Wicket 1.5-rc2. However this issue does not occur when
 running
 Jetty..

 Anyone has an idea on howto fix this?


 regards Nino


 -
 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


  -
 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: flexible authentication

2011-03-30 Thread Daniel Neugebauer

Hi!

We have the same situation in one of our web applications (profile pages 
may be hidden for everyone except the profile owner). Since I wasn't 
able to find a clean way to check such conditions from our page 
authorization strategy, I added that to the checks I already had in the 
page constructor method (other checks are to catch invalid indices 
etc.). If the validation fails I redirect the user to a friendly-written 
error page and call return to stop the method afterwards.


Maybe it's possible to get the page parameters by accessing the request 
cycle directly from an authorization strategy?


However, if there are more situations like that I would expect the 
authorization strategy to become big and cluttered very fast, so I don't 
think such checks should go there but instead be performed by the page 
class they are meant for. If the same checks are performed in different 
classes, they could go into a (static) method, maybe in a super class.


If there's (yet) another good place to put such checks in, I would be 
interested in it as well. :)


Bye,
Daniel

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



Re: StatelessForm redirect

2011-03-30 Thread lovewicket
Thank you so much. That worked! It didn't create a session and the request
went straight to the SearchResultspage.

I'm still not sure why StatelessForm didn't work... but this solution worked
fine for me.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StatelessForm-redirect-tp3406282p3419629.html
Sent from the Users forum mailing list archive at Nabble.com.

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



MetaDataKey in Wicket 1.5

2011-03-30 Thread Vytautas

Hi!
 Does anybody uses MetaDataKey in wicket 1.5 (Using wicket 1.5-rc2)?

 I've created simple quickstart application and added such code into HomePage:

private static final MetaDataKeyString DATA = new MetaDataKeyString() {

/**
 *
 */
private static final long serialVersionUID = 1L;
};
public HomePage(final PageParameters parameters) {
add(new Label(version, 
getApplication().getFrameworkSettings().getVersion()));
System.out.println(Session.get().getMetaData(DATA));
Session.get().setMetaData(DATA, String.valueOf(Math.random()));
}

However Session.get().getMetaData(DATA) always returns null. I did not find 
anything related to this in migration guide.
Any suggestions or usage examples? :)

--
Regards,
Vytautas
---
www.xaloon.org
www.allcarindex.com

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



WicketFilter 1.5

2011-03-30 Thread Jan Kriesten

Hi,

WicketFilter with 1.5 doesn't seem to use/support 'getRelativePath' any
more.

I used to override this to apply Locale selection and stripping this
information off:

/de/myRelativeWicketPath - /myRelativeWicketPath + Session Locale 'de'

Where can I hook that now?

Best regards, --- Jan.



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