Re: Question on page inheritance...

2008-04-01 Thread Maurice Marrink
Yep that way you can switch between an application scoped strategy
(like wicket-auth-roles)  and a session scoped strategy (like swarm)
Anyway the default is for the session to ask the application to return
the strategy.


On Wed, Apr 2, 2008 at 8:18 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Session could provide that too? Cool:)
>
>
>
>  Maurice Marrink wrote:
>
> > Or Session. Session.getAuthorizationStrategy().
> >
> > Maurice
> >
> > On Tue, Apr 1, 2008 at 8:51 PM, Nino Saturnino Martinez Vazquez Wael
> > <[EMAIL PROTECTED]> wrote:
> >
> >
> > > It's your webapplication that takes the ISecurityStrategy..
> > >
> > >  public class ZeuzGroupApplication extends WebApplication {
> > >
> > >private SpringComponentInjector springComponentInjector;
> > >
> > >@Override
> > >protected void init() {
> > >super.init();
> > >  //getSecuritySettings().setAuthorizationStrategy(
> > >  //new RoleAuthorizationStrategy(new
> UserRolesAuthorizer()));
> > >getSecuritySettings().setAuthorizationStrategy(
> > >new ZeuzSecurity(ZeuzAuthorizedPage.class,
> > >  LoginPage.class) {
> > >@Override
> > >protected boolean isAuthorized(Class pageClass) {
> > >return (((ZeuzSession)
> > >  Session.get()).isAuthorized());
> > >}
> > >});
> > >  ...
> > >
> > >
> > >
> > >  Bruce Petro wrote:
> > >  > Thanks to the replies I received... yeah I didn't say it well, but I
> > >  > assumed the user would be kept in the session and that seems to fit
> > >  > everyone's reply. On top of that, I think I'm hearing I can use
> > >  > inheritance and have every page utilize ISecurityStrategy to then
> > >  > control access to the page.
> > >  >
> > >  > I'll check into it and see if I've got that all correct.  Thanks
> again.
> > >  >
> > >  >
> > >  > -Original Message-
> > >  > From: Nino Saturnino Martinez Vazquez Wael
> > >  > [mailto:[EMAIL PROTECTED]
> > >  > Sent: Tuesday, April 01, 2008 1:49 PM
> > >  > To: users@wicket.apache.org
> > >  > Subject: Re: Question on page inheritance...
> > >  >
> > >  > True, as Igor wrote this is meant to be in conjuction with at
> > >  > ISecurityStrategy.
> > >  >
> > >  > Nino Saturnino Martinez Vazquez Wael wrote:
> > >  >
> > >  >> You could actually also do this another way... Im using markup
> > >  >> inheritance alot, but I stuff user object into the session like
> this:
> > >  >>
> > >  >> See a nice view here:
> > >  >> http://papernapkin.org/pastebin/view/281/
> > >  >>
> > >  >> package zeuzgroup.application;
> > >  >>
> > >  >> import javax.servlet.http.HttpSession;
> > >  >>
> > >  >> import org.apache.wicket.Application;
> > >  >> import org.apache.wicket.Request;
> > >  >> import org.apache.wicket.protocol.http.WebRequest;
> > >  >> import org.apache.wicket.protocol.http.WebSession;
> > >  >>
> > >  >> import zeuzgroup.core.Person;
> > >  >> import zeuzgroup.core.user.UserType;
> > >  >>
> > >  >> public class ZeuzSession extends WebSession {
> > >  >>
> > >  >>private boolean authorized = false;
> > >  >>
> > >  >>private Person person;
> > >  >>
> > >  >>private HttpSession httpSession;
> > >  >>
> > >  >>protected ZeuzSession(Application application, Request request) {
> > >  >>super(application, request);
> > >  >>httpSession = ((WebRequest) request).getHttpServletRequest()
> > >  >>.getSession();
> > >  >>
> > >  >>}
> > >  >>
> > >  >>public boolean isAuthorized() {
> > >  >>return authorized;
> > >  >>}
> > >  >>
> > >  >>public void setAuthorized(boolean authorized) {
> > >  >>
> > >  >>this.authorized = authorized;
> > >  >>if (authorized) {
> > >  >>
> > >  >>httpSession.setAttribute("sso.password.attribute", person
> > >  >>.getPassword());
> > >  >>httpSession.setAttribute("sso.email.attribute",
> > >  >> person.getEmail());
> > >  >>httpSession.setAttribute("password",
> person.getPassword());
> > >  >>httpSession.setAttribute("email", person.getEmail());
> > >  >>
> > >  >>} else {
> > >  >>httpSession.setAttribute("sso.password.attribute", null);
> > >  >>httpSession.setAttribute("sso.email.attribute", null);
> > >  >>}
> > >  >>}
> > >  >>
> > >  >>public Person getPerson() {
> > >  >>if (person != null) {
> > >  >>return person;
> > >  >>} else {
> > >  >>Person person = new Person();
> > >  >>person.setUserType(UserType.Guest);
> > >  >>return person;
> > >  >>}
> > >  >>}
> > >  >>
> > >  >>public void setPerson(Person person) {
> > >  >>this.person = person;
> > >  >>}
> > >  >>
> > >  >> }
> > >  >>
> > >  >>
> > >  >> Bruce Petro wrote:
> > >  >>
> > >  >>> I'm just getting 

Re: export excel file via an OutputStream

2008-04-01 Thread Igor Vaynberg
it is trivial to implement and can be pretty much factored out of downloadlink.

-igor


On Tue, Apr 1, 2008 at 11:35 PM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> That looks like an excellent API. Would it be very hard to implement this?
>
>  Personally I am also looking for something like this, but then
>  bookmarkable. I got some suggestions on how to do this with the current
>  APIs, but I did not like them at all. So now I am using a servlet.
>
>  Regards,
> Erik.
>
>
>
>  Al Maw wrote:
>  > I think he makes a valid point, personally. People do want to do this sort
>  > of thing quite frequently. It wouldn't kill us to implement an
>  > OutputStreamLink that looked like this:
>  >
>  > add(new StreamingLink("link") {
>  > public String getFileName() {
>  > return "download.xls";
>  > }
>  > public String getMimeType() {
>  > return "application/vnd.excel"; // Or whatever it is.
>  > }
>  > public void writeToOutputStream(OutputStream outputStream) {
>  > excelGenerator.writeOutput(outputStream);
>  > }
>  > });
>  >
>  > I don't think the current API here is very pleasant or obvious to use.
>  >
>  > Regards,
>  >
>  > Al
>  >
>  >
>
>
>  --
>  Erik van Oosten
>  http://www.day-to-day-stuff.blogspot.com/
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: export excel file via an OutputStream

2008-04-01 Thread Erik van Oosten

That looks like an excellent API. Would it be very hard to implement this?

Personally I am also looking for something like this, but then 
bookmarkable. I got some suggestions on how to do this with the current 
APIs, but I did not like them at all. So now I am using a servlet.


Regards,
   Erik.


Al Maw wrote:

I think he makes a valid point, personally. People do want to do this sort
of thing quite frequently. It wouldn't kill us to implement an
OutputStreamLink that looked like this:

add(new StreamingLink("link") {
public String getFileName() {
return "download.xls";
}
public String getMimeType() {
return "application/vnd.excel"; // Or whatever it is.
}
public void writeToOutputStream(OutputStream outputStream) {
excelGenerator.writeOutput(outputStream);
}
});

I don't think the current API here is very pleasant or obvious to use.

Regards,

Al

  



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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to capture not BookmarkablePage

2008-04-01 Thread freak182

Hello,
when i click submit using IndicatingAjaxButton,it captures the current page?
is this possible?
Thanks a lot..Cheers


igor.vaynberg wrote:
> 
> just keep a reference to it, thats all you need
> 
> -igor
> 
> 
> On Tue, Apr 1, 2008 at 6:32 PM, freak182 <[EMAIL PROTECTED]> wrote:
>>
>>  Hello,
>>
>>  1. My problem is how to capture not bookmarkable page? (I already see
>> the
>>  wicket-example on how to capture bookmarkable page)
>>  2. All data i put in the textfields values/radio selected/checkboxes
>>  selected/list will be captured also? (of course in a form of html)
>>  3. For example if i have a constructor page w/ parameters, is there a
>> way to
>>  capture the page?
>>   e.g
>>   public TestPage(){ nothing to do here and no wicket codes }
>>
>>   public TestPage(List list,Page prevPage){ so many logic here }
>>
>>   Thanks a lot...Cheers.
>>  --
>>  View this message in context:
>> http://www.nabble.com/How-to-capture-not-BookmarkablePage-tp16434693p16434693.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-capture-not-BookmarkablePage-tp16434693p16443280.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on page inheritance...

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael

Session could provide that too? Cool:)

Maurice Marrink wrote:

Or Session. Session.getAuthorizationStrategy().

Maurice

On Tue, Apr 1, 2008 at 8:51 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

It's your webapplication that takes the ISecurityStrategy..

 public class ZeuzGroupApplication extends WebApplication {

private SpringComponentInjector springComponentInjector;

@Override
protected void init() {
super.init();
 //getSecuritySettings().setAuthorizationStrategy(
 //new RoleAuthorizationStrategy(new UserRolesAuthorizer()));
getSecuritySettings().setAuthorizationStrategy(
new ZeuzSecurity(ZeuzAuthorizedPage.class,
 LoginPage.class) {
@Override
protected boolean isAuthorized(Class pageClass) {
return (((ZeuzSession)
 Session.get()).isAuthorized());
}
});
 ...



 Bruce Petro wrote:
 > Thanks to the replies I received... yeah I didn't say it well, but I
 > assumed the user would be kept in the session and that seems to fit
 > everyone's reply. On top of that, I think I'm hearing I can use
 > inheritance and have every page utilize ISecurityStrategy to then
 > control access to the page.
 >
 > I'll check into it and see if I've got that all correct.  Thanks again.
 >
 >
 > -Original Message-
 > From: Nino Saturnino Martinez Vazquez Wael
 > [mailto:[EMAIL PROTECTED]
 > Sent: Tuesday, April 01, 2008 1:49 PM
 > To: users@wicket.apache.org
 > Subject: Re: Question on page inheritance...
 >
 > True, as Igor wrote this is meant to be in conjuction with at
 > ISecurityStrategy.
 >
 > Nino Saturnino Martinez Vazquez Wael wrote:
 >
 >> You could actually also do this another way... Im using markup
 >> inheritance alot, but I stuff user object into the session like this:
 >>
 >> See a nice view here:
 >> http://papernapkin.org/pastebin/view/281/
 >>
 >> package zeuzgroup.application;
 >>
 >> import javax.servlet.http.HttpSession;
 >>
 >> import org.apache.wicket.Application;
 >> import org.apache.wicket.Request;
 >> import org.apache.wicket.protocol.http.WebRequest;
 >> import org.apache.wicket.protocol.http.WebSession;
 >>
 >> import zeuzgroup.core.Person;
 >> import zeuzgroup.core.user.UserType;
 >>
 >> public class ZeuzSession extends WebSession {
 >>
 >>private boolean authorized = false;
 >>
 >>private Person person;
 >>
 >>private HttpSession httpSession;
 >>
 >>protected ZeuzSession(Application application, Request request) {
 >>super(application, request);
 >>httpSession = ((WebRequest) request).getHttpServletRequest()
 >>.getSession();
 >>
 >>}
 >>
 >>public boolean isAuthorized() {
 >>return authorized;
 >>}
 >>
 >>public void setAuthorized(boolean authorized) {
 >>
 >>this.authorized = authorized;
 >>if (authorized) {
 >>
 >>httpSession.setAttribute("sso.password.attribute", person
 >>.getPassword());
 >>httpSession.setAttribute("sso.email.attribute",
 >> person.getEmail());
 >>httpSession.setAttribute("password", person.getPassword());
 >>httpSession.setAttribute("email", person.getEmail());
 >>
 >>} else {
 >>httpSession.setAttribute("sso.password.attribute", null);
 >>httpSession.setAttribute("sso.email.attribute", null);
 >>}
 >>}
 >>
 >>public Person getPerson() {
 >>if (person != null) {
 >>return person;
 >>} else {
 >>Person person = new Person();
 >>person.setUserType(UserType.Guest);
 >>return person;
 >>}
 >>}
 >>
 >>public void setPerson(Person person) {
 >>this.person = person;
 >>}
 >>
 >> }
 >>
 >>
 >> Bruce Petro wrote:
 >>
 >>> I'm just getting started in wicket, so forgive me if this is a
 >>>
 > too-dumb
 >
 >>> question...
 >>>
 >>>
 >>>
 >>> I know wicket can check the session for a user to ask a "user" object
 >>>
 > if
 >
 >>> it is logged in.
 >>>
 >>> However, you don't really want to paste code on every page.
 >>>
 >>> What is the best way, to have each page inherit the base "security
 >>> check" routine?
 >>>
 >>>
 >>>
 >>> Would you create a BasePage extends WebPage and put the logic there
 >>>
 > and
 >
 >>> have all other pages extend BasePage?
 >>>
 >>> Or would you attach some sort of a command object to each page and
 >>>
 > put
 >
 >>> the logic in that?
 >>>
 >>>
 >>>
 >>> Anyone have a reference to an example of code to do this?
 >>>
 >>>
 >>>
 >>> THANKS!
 >>>
 >>>
 >>>
 >>>
 >>>
 >>>
 >>>
 >>>
 >>>
 >>>
 >
 >

 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROT

Re: Reg: issue in using ListView component

2008-04-01 Thread Igor Vaynberg
read models wiki page

-igor


On Tue, Apr 1, 2008 at 9:59 PM, Sathish Gopal <[EMAIL PROTECTED]> wrote:
>
>  Hi all,
>
>  I'm trying to create a table using wickets repeater component ListView. The
>  problem that i face now is i have search panel where search query will be
>  entered. When the form is submitted the table needs to be populated with
>  data received from the Database. The data received from the database is a
>  list of DataTransferObjects. I need to pass this List of transferObjects to
>  the ListView. But the listview expects that this object should be passed  at
>  the time of creation. i.e
>
>  add(new ListView("rows", listData){
>   public void populateItem(final ListItem item)
> {
> final UserDetails user = (UserDetails)item.getModelObject();
> item.add(new Label("id", user.getId()));
> }
>   });
>
>  I cannot pass the list of DataTransferObject until the user enters search
>  criteria and submits the form.
>  Is there any better way to do this?
>  --
>  View this message in context: 
> http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p16442209.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display a swing component/applet in wicket?

2008-04-01 Thread Igor Vaynberg
yep, an applet is probably the most straight forward way.

-igor


On Tue, Apr 1, 2008 at 8:37 PM, jianfei <[EMAIL PROTECTED]> wrote:
>
>  Yes, and that's why I am having the trouble. I need that JTreeMap thingy,
>  which is like a map with different squres in it. I want that map to be able
>  to display in a web page, but there is no similar function in Wicket that
>  allows me to do such a map, so I have to use the JTreeMap library. The
>  problem is that the library only provide swing component, so I can't really
>  use it in WicketI'm guessing applet is the way to go?
>
>
>
>
>  igor.vaynberg wrote:
>  >
>  > by work with swing what do you mean exactly? wicket is a web
>  > framework, swing is a desktop framework, not really meant to work
>  > together...
>  >
>  > -igor
>  >
>  >
>  > On Tue, Apr 1, 2008 at 5:52 PM, jianfei <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  I am developing an webapp that has to use the JTreeMap
>  >>  (http://jtreemap.sourceforge.net/) library. It provides either a swing
>  >>  component or an applet for the treemap. I have searched some of the old
>  >>  threads and it seems like wicket doesn't really work well with swing. So
>  >> I
>  >>  wonder is there any way to solve this kind of problem? Thanks in
>  >> advance!
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/How-to-display-a-swing-component-applet-in-wicket--tp16432883p16432883.html
>  >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  -
>  >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  For additional commands, e-mail: [EMAIL PROTECTED]
>  >>
>  >>
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/How-to-display-a-swing-component-applet-in-wicket--tp16432883p16440017.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reg: issue in using ListView component

2008-04-01 Thread Sathish Gopal

Hi all,

I'm trying to create a table using wickets repeater component ListView. The
problem that i face now is i have search panel where search query will be
entered. When the form is submitted the table needs to be populated with
data received from the Database. The data received from the database is a
list of DataTransferObjects. I need to pass this List of transferObjects to
the ListView. But the listview expects that this object should be passed  at
the time of creation. i.e

add(new ListView("rows", listData){
 public void populateItem(final ListItem item)
{
final UserDetails user = (UserDetails)item.getModelObject();
item.add(new Label("id", user.getId()));
}
  });

I cannot pass the list of DataTransferObject until the user enters search
criteria and submits the form.
Is there any better way to do this?
-- 
View this message in context: 
http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p16442209.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Swarm Examples

2008-04-01 Thread Warren
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security+Examples

> -Original Message-
> From: Gareth Segree [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 01, 2008 8:21 PM
> To: users@wicket.apache.org
> Subject: Re: Swarm Examples
> 
> 
> Where can I download source code for the swarm examples.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display a swing component/applet in wicket?

2008-04-01 Thread jianfei

Yes, and that's why I am having the trouble. I need that JTreeMap thingy,
which is like a map with different squres in it. I want that map to be able
to display in a web page, but there is no similar function in Wicket that
allows me to do such a map, so I have to use the JTreeMap library. The
problem is that the library only provide swing component, so I can't really
use it in WicketI'm guessing applet is the way to go?


igor.vaynberg wrote:
> 
> by work with swing what do you mean exactly? wicket is a web
> framework, swing is a desktop framework, not really meant to work
> together...
> 
> -igor
> 
> 
> On Tue, Apr 1, 2008 at 5:52 PM, jianfei <[EMAIL PROTECTED]> wrote:
>>
>>  I am developing an webapp that has to use the JTreeMap
>>  (http://jtreemap.sourceforge.net/) library. It provides either a swing
>>  component or an applet for the treemap. I have searched some of the old
>>  threads and it seems like wicket doesn't really work well with swing. So
>> I
>>  wonder is there any way to solve this kind of problem? Thanks in
>> advance!
>>  --
>>  View this message in context:
>> http://www.nabble.com/How-to-display-a-swing-component-applet-in-wicket--tp16432883p16432883.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-display-a-swing-component-applet-in-wicket--tp16432883p16440017.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Swarm Examples

2008-04-01 Thread Gareth Segree

Where can I download source code for the swarm examples.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Swarm Examples

2008-04-01 Thread Gareth Segree
Where can I download the swarm examples.

Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread Ryan Gravener
decorateScript(java.lang.CharSequence script) {

return "if(confirm('Are you sure?')) {" + script " + "}";

}

On Tue, Apr 1, 2008 at 10:03 PM, Pinger <[EMAIL PROTECTED]> wrote:
>
>  Opps I think I deleted my reply somehow.. Anyway I said if you could post
a
>
>
> code example of the behavior you made, you would be my hero :)
>
>  djo.mos wrote:
>  >
>  > Hi,
>  >
>  > Pinger wrote:
>  >>
>  >> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they
say
>  >> yes..
>  >>
>  >
>  > What kind of confirmation ? Javascript ? Html ?
>  > for the first, you could use this
>  >
>  > ajaxButton.add(new SimpleAttributeModifier("onclick", "return
>  > confirm('Delete ?');"));
>  >
>  > Cheers
>  >
>
>  --
>  View this message in context:
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16436264.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Ryan Gravener
http://ryangravener.com


Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread Pinger

Opp I think I deleted my reply somehow.. Anyway I said if you could post a
code example of the behavior you made, you would be my hero :) 

djo.mos wrote:
> 
> Hi,
> 
> Pinger wrote:
>> 
>> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
>> yes..
>> 
> 
> What kind of confirmation ? Javascript ? Html ?
> for the first, you could use this
> 
> ajaxButton.add(new SimpleAttributeModifier("onclick", "return
> confirm('Delete ?');"));
> 
> Cheers
> 

-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16436264.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to capture not BookmarkablePage

2008-04-01 Thread Igor Vaynberg
just keep a reference to it, thats all you need

-igor


On Tue, Apr 1, 2008 at 6:32 PM, freak182 <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
>  1. My problem is how to capture not bookmarkable page? (I already see the
>  wicket-example on how to capture bookmarkable page)
>  2. All data i put in the textfields values/radio selected/checkboxes
>  selected/list will be captured also? (of course in a form of html)
>  3. For example if i have a constructor page w/ parameters, is there a way to
>  capture the page?
>   e.g
>   public TestPage(){ nothing to do here and no wicket codes }
>
>   public TestPage(List list,Page prevPage){ so many logic here }
>
>   Thanks a lot...Cheers.
>  --
>  View this message in context: 
> http://www.nabble.com/How-to-capture-not-BookmarkablePage-tp16434693p16434693.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unclosed leading to trouble

2008-04-01 Thread Igor Vaynberg
img src="" will issue another request to the server to the same url,
which will most likely bump up your version and render ajax stuff
useless because versions wont match. its in the faqs and gotchas.

-igor


On Tue, Apr 1, 2008 at 6:07 PM, atul singh <[EMAIL PROTECTED]> wrote:
> I by mistake had this tag ** left in my markup. I was
>  experiencing a lot of other issues because of this, and I don't know why.
>  The problems were the following::
>  1.
>  An ajax link ,when clicked, not found on its page
>  org.apache.wicket.WicketRuntimeException: component somewicketpath:link not
>  found on page somepage listener interface = [RequestListenerInterface
>  name=IBehaviorListener, method=public abstract void
>  org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>  at
>  
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget
>  (AbstractRequestCycleProcessor.java:394)
>  at
>  org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(
>  AbstractRequestCycleProcessor.java:440)
>  at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
>  WebRequestCycleProcessor.java:139)
>
>  2.
>  When repainting a component via ajax--markup id of my html element not the
>  same as what is expected by ajax repaint.
>
>  3.
>  Similar issues as if there was something wrong going on, *(And wicket was
>  not complaining anything).*
>
>  Does anyone have an idea on what might be happening.
>  If required I can send across a small quick start.( this can be simulated
>  very easily by adding  ).
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread Pinger

I will look. However, if you could post a code example, you would be my hero.
:)




freak182 wrote:
> 
> You need to extend AbstractBehavior of course and add some javascript to
> do the trick...you can use javascript already available or you can
> customise to yuorself..im using jquery..you can google it :) 
> 
> 
> 
> Pinger wrote:
>> 
>> That would be sweet.. how do I do that? Sorry I saw one example for that
>> for the button but I could not get that could not get it working for the
>> ajax button. If I can get this to work, I was going to see if the
>> developers want it for the release; I think it is a very common behavior
>> that many people would use.
>> 
>> 
>> 
>> 
>> freak182 wrote:
>>> 
>>> You could add a behavior... e.g a confirmbehavior for your needs :) 
>>> 
>>> Pinger wrote:
 
 That is all well and good, but it does not 
 
 "Do Stuff" 
 
 now after i hit ok
 
 djo.mos wrote:
> 
> Hi,
> 
> Pinger wrote:
>> 
>> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they
>> say yes..
>> 
> 
> What kind of confirmation ? Javascript ? Html ?
> for the first, you could use this
> 
> ajaxButton.add(new SimpleAttributeModifier("onclick", "return
> confirm('Delete ?');"));
> 
> Cheers
> 
 
 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16435564.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to display a swing component/applet in wicket?

2008-04-01 Thread Igor Vaynberg
by work with swing what do you mean exactly? wicket is a web
framework, swing is a desktop framework, not really meant to work
together...

-igor


On Tue, Apr 1, 2008 at 5:52 PM, jianfei <[EMAIL PROTECTED]> wrote:
>
>  I am developing an webapp that has to use the JTreeMap
>  (http://jtreemap.sourceforge.net/) library. It provides either a swing
>  component or an applet for the treemap. I have searched some of the old
>  threads and it seems like wicket doesn't really work well with swing. So I
>  wonder is there any way to solve this kind of problem? Thanks in advance!
>  --
>  View this message in context: 
> http://www.nabble.com/How-to-display-a-swing-component-applet-in-wicket--tp16432883p16432883.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread freak182

You need to extend AbstractBehavior of course and add some javascript to do
the trick...you can use javascript already available or you can customise to
yuorself..im using jquery..you can google it :) 



Pinger wrote:
> 
> That would be sweet.. how do I do that? Sorry I saw one example for that
> for the button but I could not get that could not get it working for the
> ajax button. If I can get this to work, I was going to see if the
> developers want it for the release; I think it is a very common behavior
> that many people would use.
> 
> 
> 
> 
> freak182 wrote:
>> 
>> You could add a behavior... e.g a confirmbehavior for your needs :) 
>> 
>> Pinger wrote:
>>> 
>>> That is all well and good, but it does not 
>>> 
>>> "Do Stuff" 
>>> 
>>> now after i hit ok
>>> 
>>> djo.mos wrote:
 
 Hi,
 
 Pinger wrote:
> 
> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they
> say yes..
> 
 
 What kind of confirmation ? Javascript ? Html ?
 for the first, you could use this
 
 ajaxButton.add(new SimpleAttributeModifier("onclick", "return
 confirm('Delete ?');"));
 
 Cheers
 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16435230.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread Pinger

That would be sweet.. how do I do that? Sorry I saw one example for that for
the button but I could not get that could not get it working for the ajax
button. If I can get this to work, I was going to see if the developers want
it for the release; I think it is a very common behavior that many people
would use.




freak182 wrote:
> 
> You could add a behavior... e.g a confirmbehavior for your needs :) 
> 
> Pinger wrote:
>> 
>> That is all well and good, but it does not 
>> 
>> "Do Stuff" 
>> 
>> now after i hit ok
>> 
>> djo.mos wrote:
>>> 
>>> Hi,
>>> 
>>> Pinger wrote:
 
 I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
 yes..
 
>>> 
>>> What kind of confirmation ? Javascript ? Html ?
>>> for the first, you could use this
>>> 
>>> ajaxButton.add(new SimpleAttributeModifier("onclick", "return
>>> confirm('Delete ?');"));
>>> 
>>> Cheers
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16435225.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread freak182

You could add a behavior... e.g a confirmbehavior for your needs :) 

Pinger wrote:
> 
> That is all well and good, but it does not 
> 
> "Do Stuff" 
> 
> now after i hit ok
> 
> djo.mos wrote:
>> 
>> Hi,
>> 
>> Pinger wrote:
>>> 
>>> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
>>> yes..
>>> 
>> 
>> What kind of confirmation ? Javascript ? Html ?
>> for the first, you could use this
>> 
>> ajaxButton.add(new SimpleAttributeModifier("onclick", "return
>> confirm('Delete ?');"));
>> 
>> Cheers
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16435223.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to capture not BookmarkablePage

2008-04-01 Thread freak182

Hello,

1. My problem is how to capture not bookmarkable page? (I already see the
wicket-example on how to capture bookmarkable page)
2. All data i put in the textfields values/radio selected/checkboxes
selected/list will be captured also? (of course in a form of html)
3. For example if i have a constructor page w/ parameters, is there a way to
capture the page? 
 e.g
 public TestPage(){ nothing to do here and no wicket codes }

 public TestPage(List list,Page prevPage){ so many logic here }

 Thanks a lot...Cheers.
-- 
View this message in context: 
http://www.nabble.com/How-to-capture-not-BookmarkablePage-tp16434693p16434693.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



unclosed leading to trouble

2008-04-01 Thread atul singh
I by mistake had this tag ** left in my markup. I was
experiencing a lot of other issues because of this, and I don't know why.
The problems were the following::
1.
An ajax link ,when clicked, not found on its page
org.apache.wicket.WicketRuntimeException: component somewicketpath:link not
found on page somepage listener interface = [RequestListenerInterface
name=IBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget
(AbstractRequestCycleProcessor.java:394)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(
AbstractRequestCycleProcessor.java:440)
at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
WebRequestCycleProcessor.java:139)

2.
When repainting a component via ajax--markup id of my html element not the
same as what is expected by ajax repaint.

3.
Similar issues as if there was something wrong going on, *(And wicket was
not complaining anything).*

Does anyone have an idea on what might be happening.
If required I can send across a small quick start.( this can be simulated
very easily by adding  ).


How to display a swing component/applet in wicket?

2008-04-01 Thread jianfei

I am developing an webapp that has to use the JTreeMap
(http://jtreemap.sourceforge.net/) library. It provides either a swing
component or an applet for the treemap. I have searched some of the old
threads and it seems like wicket doesn't really work well with swing. So I
wonder is there any way to solve this kind of problem? Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/How-to-display-a-swing-component-applet-in-wicket--tp16432883p16432883.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread Pinger

That is all well and good, but it does not 

"Do Stuff" 

now after i hit ok

djo.mos wrote:
> 
> Hi,
> 
> Pinger wrote:
>> 
>> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
>> yes..
>> 
> 
> What kind of confirmation ? Javascript ? Html ?
> for the first, you could use this
> 
> ajaxButton.add(new SimpleAttributeModifier("onclick", "return
> confirm('Delete ?');"));
> 
> Cheers
> 

-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16432136.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RequestCycle exception explanation

2008-04-01 Thread Jeremy Levy
2008-04-01 19:53:27,944 ERROR Wap [ajp-0.0.0.0-8009-1] [RequestCycle] :
component previous:previousPage not found on page
com.mdate.wap.pages.NoAuthHome[id = 614], listener
 interface = [RequestListenerInterface name=ILinkListener, method=public
abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked
()]
org.apache.wicket.WicketRuntimeException: component previous:previousPage
not found on page com.mdate.wap.pages.NoAuthHome[id = 614], listener
interface = [RequestListenerI
nterface name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget
(AbstractRequestCycleProcessor.java:411)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(
AbstractRequestCycleProcessor.java:456)
at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(
WicketFilter.java:354)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(
WicketFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(
JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(
CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:241)
at org.apache.coyote.ajp.AjpAprProcessor.process(
AjpAprProcessor.java:419)
at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process
(AjpAprProtocol.java:393)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(
AprEndpoint.java:1513)
at java.lang.Thread.run(Thread.java:619)


thanks.

On Tue, Apr 1, 2008 at 8:25 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> can you paste a full stack trace please
>
> -igor
>
> On Tue, Apr 1, 2008 at 5:21 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> > Yes, ILinkListener in all of the exceptions.
> >
> >  The deserialize exception seems to be unrelated.,. I think it has to do
> with
> >  Yahoo crawling us at the time and requesting expired pages...
> >
> >  Jeremy
> >
> >  On Tue, Apr 1, 2008 at 8:14 PM, Igor Vaynberg <[EMAIL PROTECTED]>
> >
> >
> > wrote:
> >
> >  > does it only happen to ILinkListener urls?
> >  >
> >  > -igor
> >  >
> >  >
> >  > On Tue, Apr 1, 2008 at 4:15 PM, Jeremy Levy <[EMAIL PROTECTED]>
> wrote:
> >  > > I've tried to reproduce this for the last several hours with no
> luck.
> >  >  It
> >  > >  reports that it's happening for many different components from
> many
> >  > >  different pages, nor is there any discernible pattern to the pages
> or
> >  > the
> >  > >  components the excpetion  mentions.  This one was interesting.
> >  > >
> >  > >  This was the page the we have Wicket set up to redirect to on
> 500's...
> >  > >  However there no other exceptions.
> >  > >
> >  > >  component signinPanel:signInForm:resetPassword not found on page
> >  > >  com.foo.errors.InternalErrorPage
> >  > >
> >  > >  We also started getting these as well:
> >  > >
> >  > >  java.lang.RuntimeException: Could not deserialize object using
> >  > >
> >  >
>  `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> >  > >  object factory
> >  > >
> >  > >  Not sure if they are related.. We are running 1.3.1.  Are these
> >  > manifesting
> >  > >  in errors for users, we haven't seen any as far as we can tell.
> >  > >
> >  > >  Jeremy
> >  > >
> >  > >  On Tue, Apr 1, 2008 at 4:58 PM, Igor Vaynberg <
> [EMAIL PROTECTED]>
> >  > >  wrote:
> >  > >
> >  > >
> >  > >
> >  > >  > On 

Re: RequestCycle exception explanation

2008-04-01 Thread Igor Vaynberg
can you paste a full stack trace please

-igor

On Tue, Apr 1, 2008 at 5:21 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> Yes, ILinkListener in all of the exceptions.
>
>  The deserialize exception seems to be unrelated.,. I think it has to do with
>  Yahoo crawling us at the time and requesting expired pages...
>
>  Jeremy
>
>  On Tue, Apr 1, 2008 at 8:14 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>
>
> wrote:
>
>  > does it only happen to ILinkListener urls?
>  >
>  > -igor
>  >
>  >
>  > On Tue, Apr 1, 2008 at 4:15 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
>  > > I've tried to reproduce this for the last several hours with no luck.
>  >  It
>  > >  reports that it's happening for many different components from many
>  > >  different pages, nor is there any discernible pattern to the pages or
>  > the
>  > >  components the excpetion  mentions.  This one was interesting.
>  > >
>  > >  This was the page the we have Wicket set up to redirect to on 500's...
>  > >  However there no other exceptions.
>  > >
>  > >  component signinPanel:signInForm:resetPassword not found on page
>  > >  com.foo.errors.InternalErrorPage
>  > >
>  > >  We also started getting these as well:
>  > >
>  > >  java.lang.RuntimeException: Could not deserialize object using
>  > >
>  >  
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
>  > >  object factory
>  > >
>  > >  Not sure if they are related.. We are running 1.3.1.  Are these
>  > manifesting
>  > >  in errors for users, we haven't seen any as far as we can tell.
>  > >
>  > >  Jeremy
>  > >
>  > >  On Tue, Apr 1, 2008 at 4:58 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>  > >  wrote:
>  > >
>  > >
>  > >
>  > >  > On Tue, Apr 1, 2008 at 1:51 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>  > >  > > OK, but the reason is always the same - the user will be trying to
>  > click
>  > >  > on
>  > >  > >  something that doesn't exist any more.
>  > >  > >
>  > >  > >  I can't quite remember how our page versioning works for this
>  > (Eelco?
>  > >  > Igor?)
>  > >  > >  but it might be possible that users are clicking the same link
>  > twice
>  > >  > and
>  > >  > >  that the first click removes the component they've clicked on from
>  > the
>  > >  > >  hierarchy, causing the second click to fail?
>  > >  >
>  > >  > in theory the second click should actually unroll the version back so
>  > >  > the link would comeback and then get clicked again. it is possible
>  > >  > that this happens on stateless pages or the ones where versioning has
>  > >  > been explicitly turned off.
>  > >  >
>  > >  > -igor
>  > >  >
>  > >  >
>  > >  > >
>  > >  > >  Regards,
>  > >  > >
>  > >  > >  Al
>  > >  > >
>  > >  > >
>  > >  > >
>  > >  > >  On Tue, Apr 1, 2008 at 9:44 PM, Jeremy Levy <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > >
>  > >  > >  > On this site we aren't using any Ajax components. :(
>  > >  > >  >
>  > >  > >  > J
>  > >  > >  >
>  > >  > >  > On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>  > >  > >  >
>  > >  > >  > > What seems to be happening is that you're trying to click a
>  > link
>  > >  > for a
>  > >  > >  > > component that no longer exists. Did you maybe remove it with
>  > AJAX
>  > >  > or
>  > >  > >  > > something but not update the page? I think you sometimes can
>  > get
>  > >  > this
>  > >  > >  > > issue
>  > >  > >  > > in a ListView if you don't think about how stuff is added and
>  > >  > removed,
>  > >  > >  > and
>  > >  > >  > > interactions with setReuseItems(true).
>  > >  > >  > >
>  > >  > >  > > Al
>  > >  > >  > >
>  > >  > >  > > On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]>
>  > >  > wrote:
>  > >  > >  > >
>  > >  > >  > > > I've started seeing exceptions like the onces below more
>  > >  > frequently
>  > >  > >  > can
>  > >  > >  > > > someone explain what is actually going on?  We've been
>  > making a
>  > >  > lot of
>  > >  > >  > > > changes, but I can't say exactly what may have set this
>  > off...
>  > >  > >  > > >
>  > >  > >  > > >
>  > >  > >  > > >
>  > >  > >  > > > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component
>  > >  > myLink
>  > >  > >  > not
>  > >  > >  > > > found on page com.foo.bar.SomePage [id = 459], listener
>  > interface
>  > >  > = [R
>  > >  > >  > > > equestListenerInterface name=ILinkListener, method=public
>  > >  > abstract
>  > >  > >  > void
>  > >  > >  > > >
>  > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>  > >  > >  > > > org.apache.wicket.WicketRuntimeException: component myLink
>  > not
>  > >  > found
>  > >  > >  > on
>  > >  > >  > > > page
>  > >  > >  > > > com.foo.bar.SomePage [id = 459], listener interface =
>  > [RequestLis
>  > >  > >  > > > tenerInterface name=ILinkListener, method=public abstract
>  > void
>  > >  > >  > > >
>  > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>  > >  > >  > > >
>  > >  > >  > > >
>  > >  > >  > > > j
>  > >  > >  > > >
>  > >  > >  > >
>  > >

Re: RequestCycle exception explanation

2008-04-01 Thread Jeremy Levy
Yes, ILinkListener in all of the exceptions.

The deserialize exception seems to be unrelated.,. I think it has to do with
Yahoo crawling us at the time and requesting expired pages...

Jeremy

On Tue, Apr 1, 2008 at 8:14 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> does it only happen to ILinkListener urls?
>
> -igor
>
>
> On Tue, Apr 1, 2008 at 4:15 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> > I've tried to reproduce this for the last several hours with no luck.
>  It
> >  reports that it's happening for many different components from many
> >  different pages, nor is there any discernible pattern to the pages or
> the
> >  components the excpetion  mentions.  This one was interesting.
> >
> >  This was the page the we have Wicket set up to redirect to on 500's...
> >  However there no other exceptions.
> >
> >  component signinPanel:signInForm:resetPassword not found on page
> >  com.foo.errors.InternalErrorPage
> >
> >  We also started getting these as well:
> >
> >  java.lang.RuntimeException: Could not deserialize object using
> >
>  `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> >  object factory
> >
> >  Not sure if they are related.. We are running 1.3.1.  Are these
> manifesting
> >  in errors for users, we haven't seen any as far as we can tell.
> >
> >  Jeremy
> >
> >  On Tue, Apr 1, 2008 at 4:58 PM, Igor Vaynberg <[EMAIL PROTECTED]>
> >  wrote:
> >
> >
> >
> >  > On Tue, Apr 1, 2008 at 1:51 PM, Al Maw <[EMAIL PROTECTED]> wrote:
> >  > > OK, but the reason is always the same - the user will be trying to
> click
> >  > on
> >  > >  something that doesn't exist any more.
> >  > >
> >  > >  I can't quite remember how our page versioning works for this
> (Eelco?
> >  > Igor?)
> >  > >  but it might be possible that users are clicking the same link
> twice
> >  > and
> >  > >  that the first click removes the component they've clicked on from
> the
> >  > >  hierarchy, causing the second click to fail?
> >  >
> >  > in theory the second click should actually unroll the version back so
> >  > the link would comeback and then get clicked again. it is possible
> >  > that this happens on stateless pages or the ones where versioning has
> >  > been explicitly turned off.
> >  >
> >  > -igor
> >  >
> >  >
> >  > >
> >  > >  Regards,
> >  > >
> >  > >  Al
> >  > >
> >  > >
> >  > >
> >  > >  On Tue, Apr 1, 2008 at 9:44 PM, Jeremy Levy <[EMAIL PROTECTED]>
> wrote:
> >  > >
> >  > >  > On this site we aren't using any Ajax components. :(
> >  > >  >
> >  > >  > J
> >  > >  >
> >  > >  > On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:
> >  > >  >
> >  > >  > > What seems to be happening is that you're trying to click a
> link
> >  > for a
> >  > >  > > component that no longer exists. Did you maybe remove it with
> AJAX
> >  > or
> >  > >  > > something but not update the page? I think you sometimes can
> get
> >  > this
> >  > >  > > issue
> >  > >  > > in a ListView if you don't think about how stuff is added and
> >  > removed,
> >  > >  > and
> >  > >  > > interactions with setReuseItems(true).
> >  > >  > >
> >  > >  > > Al
> >  > >  > >
> >  > >  > > On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]>
> >  > wrote:
> >  > >  > >
> >  > >  > > > I've started seeing exceptions like the onces below more
> >  > frequently
> >  > >  > can
> >  > >  > > > someone explain what is actually going on?  We've been
> making a
> >  > lot of
> >  > >  > > > changes, but I can't say exactly what may have set this
> off...
> >  > >  > > >
> >  > >  > > >
> >  > >  > > >
> >  > >  > > > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component
> >  > myLink
> >  > >  > not
> >  > >  > > > found on page com.foo.bar.SomePage [id = 459], listener
> interface
> >  > = [R
> >  > >  > > > equestListenerInterface name=ILinkListener, method=public
> >  > abstract
> >  > >  > void
> >  > >  > > >
> org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> >  > >  > > > org.apache.wicket.WicketRuntimeException: component myLink
> not
> >  > found
> >  > >  > on
> >  > >  > > > page
> >  > >  > > > com.foo.bar.SomePage [id = 459], listener interface =
> [RequestLis
> >  > >  > > > tenerInterface name=ILinkListener, method=public abstract
> void
> >  > >  > > >
> org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> >  > >  > > >
> >  > >  > > >
> >  > >  > > > j
> >  > >  > > >
> >  > >  > >
> >  > >  >
> >  > >
> >  >
> >  > -
> >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  > For additional commands, e-mail: [EMAIL PROTECTED]
> >  >
> >  >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: RequestCycle exception explanation

2008-04-01 Thread Igor Vaynberg
does it only happen to ILinkListener urls?

-igor


On Tue, Apr 1, 2008 at 4:15 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> I've tried to reproduce this for the last several hours with no luck.  It
>  reports that it's happening for many different components from many
>  different pages, nor is there any discernible pattern to the pages or the
>  components the excpetion  mentions.  This one was interesting.
>
>  This was the page the we have Wicket set up to redirect to on 500's...
>  However there no other exceptions.
>
>  component signinPanel:signInForm:resetPassword not found on page
>  com.foo.errors.InternalErrorPage
>
>  We also started getting these as well:
>
>  java.lang.RuntimeException: Could not deserialize object using
>  `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
>  object factory
>
>  Not sure if they are related.. We are running 1.3.1.  Are these manifesting
>  in errors for users, we haven't seen any as far as we can tell.
>
>  Jeremy
>
>  On Tue, Apr 1, 2008 at 4:58 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > On Tue, Apr 1, 2008 at 1:51 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>  > > OK, but the reason is always the same - the user will be trying to click
>  > on
>  > >  something that doesn't exist any more.
>  > >
>  > >  I can't quite remember how our page versioning works for this (Eelco?
>  > Igor?)
>  > >  but it might be possible that users are clicking the same link twice
>  > and
>  > >  that the first click removes the component they've clicked on from the
>  > >  hierarchy, causing the second click to fail?
>  >
>  > in theory the second click should actually unroll the version back so
>  > the link would comeback and then get clicked again. it is possible
>  > that this happens on stateless pages or the ones where versioning has
>  > been explicitly turned off.
>  >
>  > -igor
>  >
>  >
>  > >
>  > >  Regards,
>  > >
>  > >  Al
>  > >
>  > >
>  > >
>  > >  On Tue, Apr 1, 2008 at 9:44 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
>  > >
>  > >  > On this site we aren't using any Ajax components. :(
>  > >  >
>  > >  > J
>  > >  >
>  > >  > On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>  > >  >
>  > >  > > What seems to be happening is that you're trying to click a link
>  > for a
>  > >  > > component that no longer exists. Did you maybe remove it with AJAX
>  > or
>  > >  > > something but not update the page? I think you sometimes can get
>  > this
>  > >  > > issue
>  > >  > > in a ListView if you don't think about how stuff is added and
>  > removed,
>  > >  > and
>  > >  > > interactions with setReuseItems(true).
>  > >  > >
>  > >  > > Al
>  > >  > >
>  > >  > > On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > >
>  > >  > > > I've started seeing exceptions like the onces below more
>  > frequently
>  > >  > can
>  > >  > > > someone explain what is actually going on?  We've been making a
>  > lot of
>  > >  > > > changes, but I can't say exactly what may have set this off...
>  > >  > > >
>  > >  > > >
>  > >  > > >
>  > >  > > > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component
>  > myLink
>  > >  > not
>  > >  > > > found on page com.foo.bar.SomePage [id = 459], listener interface
>  > = [R
>  > >  > > > equestListenerInterface name=ILinkListener, method=public
>  > abstract
>  > >  > void
>  > >  > > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>  > >  > > > org.apache.wicket.WicketRuntimeException: component myLink not
>  > found
>  > >  > on
>  > >  > > > page
>  > >  > > > com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
>  > >  > > > tenerInterface name=ILinkListener, method=public abstract void
>  > >  > > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>  > >  > > >
>  > >  > > >
>  > >  > > > j
>  > >  > > >
>  > >  > >
>  > >  >
>  > >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RequestCycle exception explanation

2008-04-01 Thread Jeremy Levy
I've tried to reproduce this for the last several hours with no luck.  It
reports that it's happening for many different components from many
different pages, nor is there any discernible pattern to the pages or the
components the excpetion  mentions.  This one was interesting.

This was the page the we have Wicket set up to redirect to on 500's...
However there no other exceptions.

component signinPanel:signInForm:resetPassword not found on page
com.foo.errors.InternalErrorPage

We also started getting these as well:

java.lang.RuntimeException: Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory

Not sure if they are related.. We are running 1.3.1.  Are these manifesting
in errors for users, we haven't seen any as far as we can tell.

Jeremy

On Tue, Apr 1, 2008 at 4:58 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> On Tue, Apr 1, 2008 at 1:51 PM, Al Maw <[EMAIL PROTECTED]> wrote:
> > OK, but the reason is always the same - the user will be trying to click
> on
> >  something that doesn't exist any more.
> >
> >  I can't quite remember how our page versioning works for this (Eelco?
> Igor?)
> >  but it might be possible that users are clicking the same link twice
> and
> >  that the first click removes the component they've clicked on from the
> >  hierarchy, causing the second click to fail?
>
> in theory the second click should actually unroll the version back so
> the link would comeback and then get clicked again. it is possible
> that this happens on stateless pages or the ones where versioning has
> been explicitly turned off.
>
> -igor
>
>
> >
> >  Regards,
> >
> >  Al
> >
> >
> >
> >  On Tue, Apr 1, 2008 at 9:44 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> >
> >  > On this site we aren't using any Ajax components. :(
> >  >
> >  > J
> >  >
> >  > On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:
> >  >
> >  > > What seems to be happening is that you're trying to click a link
> for a
> >  > > component that no longer exists. Did you maybe remove it with AJAX
> or
> >  > > something but not update the page? I think you sometimes can get
> this
> >  > > issue
> >  > > in a ListView if you don't think about how stuff is added and
> removed,
> >  > and
> >  > > interactions with setReuseItems(true).
> >  > >
> >  > > Al
> >  > >
> >  > > On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]>
> wrote:
> >  > >
> >  > > > I've started seeing exceptions like the onces below more
> frequently
> >  > can
> >  > > > someone explain what is actually going on?  We've been making a
> lot of
> >  > > > changes, but I can't say exactly what may have set this off...
> >  > > >
> >  > > >
> >  > > >
> >  > > > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component
> myLink
> >  > not
> >  > > > found on page com.foo.bar.SomePage [id = 459], listener interface
> = [R
> >  > > > equestListenerInterface name=ILinkListener, method=public
> abstract
> >  > void
> >  > > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> >  > > > org.apache.wicket.WicketRuntimeException: component myLink not
> found
> >  > on
> >  > > > page
> >  > > > com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
> >  > > > tenerInterface name=ILinkListener, method=public abstract void
> >  > > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> >  > > >
> >  > > >
> >  > > > j
> >  > > >
> >  > >
> >  >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread djo.mos

Hi,

Pinger wrote:
> 
> I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
> yes..
> 

What kind of confirmation ? Javascript ? Html ?
for the first, you could use this

ajaxButton.add(new SimpleAttributeModifier("onclick", "return
confirm('Delete ?');"));

Cheers
-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16429221.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread djo.mos

Hello,

Martijn Dashorst wrote:
> 
> There is a solution: not to deploy your application more than 2-3 times...
> 
> Martijn
> 
Actually, there is a less radical solution, which is not to use a Sun JVM,
as the PermGenSpace is a specific implementation limitation of these.
IcedTea for example do not suffer from this problem.

Anyway, Piller Sébastien is using a shared server, so changing the JVM is
clearly not an option to consider.

Cheers.
-- 
View this message in context: 
http://www.nabble.com/OOM-in-PermGen-after-several-deploy-undeploy-tp16424948p16427202.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validate HTML generated from getMarkupResourceStream()

2008-04-01 Thread hjuturu

Hi All
I use a class which implements IMarkupResourceStreamProvider,
IMarkupCacheKeyProvider to
generated HTML dynamically and sent it to wicket as a IResourceStream.
//code snippet
public IResourceStream getMarkupResourceStream(MarkupContainer container,
Class containerClass){   return new StringResourceStream(HTMLString);
}

If the HTMLString is not properly formed , wicket throws
"java.text.ParseException" and org.apache.wicket.markup.MarkupException.
after i set the responsepage.

I would like to validate whether this string is correct before it goes to
wicket code and a exception is thrown.Is there anyway to validate this
HTMLString and catch the exception.

If not in wicket are there any third party packages available to validate
dynamically generated HTML strings .

Thanks All
Haritha

-- 
View this message in context: 
http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16427198p16427198.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: refreshing page

2008-04-01 Thread Igor Vaynberg
in soviet wicket the page calls you!

yes, read the models link given to you below.

-igor


On Tue, Apr 1, 2008 at 2:25 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> All I want to know is how you tell a page that its data is dirty and it 
> should reload.
>
>  Thanks
>
>
>
>  -Original Message-
>  From: Maurice Marrink [mailto:[EMAIL PROTECTED]
>  Sent: Tuesday, April 01, 2008 3:49 PM
>  To: users@wicket.apache.org
>  Subject: Re: refreshing page
>
>  It really does not hurt to google before asking you know :(
>  
> http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html
>
>  Maurice
>
>  On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  >  I'm sure this is a basic newbie lack of knowledge showing here, but when 
> I save some data to my DB from my wicket page (adding an object), my master 
> (list) page is not updated. Okay, I thought, maybe I just need to modify the 
> model at the same time as saving it. So I did that, and the new row still 
> does not appear. How do I tell Wicket to do a "deep" refresh of the page, and 
> not just redisplay the existing contents?
>  >
>  >  Thanks
>  >
>  >  ___
>  >
>  >  The  information in this email or in any file attached
>  >  hereto is intended only for the personal and confiden-
>  >  tial  use  of  the individual or entity to which it is
>  >  addressed and may contain information that is  propri-
>  >  etary  and  confidential.  If you are not the intended
>  >  recipient of this message you are hereby notified that
>  >  any  review, dissemination, distribution or copying of
>  >  this message is strictly prohibited.  This  communica-
>  >  tion  is  for information purposes only and should not
>  >  be regarded as an offer to sell or as  a  solicitation
>  >  of an offer to buy any financial product. Email trans-
>  >  mission cannot be guaranteed to be  secure  or  error-
>  >  free. P6070214
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: refreshing page

2008-04-01 Thread Scott Swank
My guess is that you are using a static model like "new
Model(someDomainObject)" when you need to use a dynamic model.  See:

http://cwiki.apache.org/WICKET/working-with-wicket-models.html

- Scott


On Tue, Apr 1, 2008 at 2:25 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> All I want to know is how you tell a page that its data is dirty and it 
> should reload.
>
>  Thanks
>
>
>
>  -Original Message-
>  From: Maurice Marrink [mailto:[EMAIL PROTECTED]
>  Sent: Tuesday, April 01, 2008 3:49 PM
>  To: users@wicket.apache.org
>  Subject: Re: refreshing page
>
>  It really does not hurt to google before asking you know :(
>  
> http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html
>
>  Maurice
>
>  On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  >  I'm sure this is a basic newbie lack of knowledge showing here, but when 
> I save some data to my DB from my wicket page (adding an object), my master 
> (list) page is not updated. Okay, I thought, maybe I just need to modify the 
> model at the same time as saving it. So I did that, and the new row still 
> does not appear. How do I tell Wicket to do a "deep" refresh of the page, and 
> not just redisplay the existing contents?
>  >
>  >  Thanks
>  >
>  >  ___
>  >
>  >  The  information in this email or in any file attached
>  >  hereto is intended only for the personal and confiden-
>  >  tial  use  of  the individual or entity to which it is
>  >  addressed and may contain information that is  propri-
>  >  etary  and  confidential.  If you are not the intended
>  >  recipient of this message you are hereby notified that
>  >  any  review, dissemination, distribution or copying of
>  >  this message is strictly prohibited.  This  communica-
>  >  tion  is  for information purposes only and should not
>  >  be regarded as an offer to sell or as  a  solicitation
>  >  of an offer to buy any financial product. Email trans-
>  >  mission cannot be guaranteed to be  secure  or  error-
>  >  free. P6070214
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Make a Ajax button have a confirm dialog

2008-04-01 Thread Maurice Marrink
Override getAjaxCallDecorator and in the returned
IAjaxCallDecorator#decorateScript you can return your custom
javascript.

Maurice

On Tue, Apr 1, 2008 at 11:17 PM, Pinger <[EMAIL PROTECTED]> wrote:
>
>  I have an ajaxbutton I make like this
>
> AjaxButton newPositionButton = new AjaxButton("addPosition") {
>
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form form) {
>  //Do Stuff
> }
> };
>
>
>  I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
>  yes..
>
>  Thanks
>
>  P.S.
>  I like wicket.. coming from Asp.net, I prefer it to the other java web
>  frameworks :)
>  --
>  View this message in context: 
> http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16425091.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: refreshing page

2008-04-01 Thread Andrew Broderick
All I want to know is how you tell a page that its data is dirty and it should 
reload.

Thanks

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 3:49 PM
To: users@wicket.apache.org
Subject: Re: refreshing page

It really does not hurt to google before asking you know :(
http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html

Maurice

On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'm sure this is a basic newbie lack of knowledge showing here, but when I 
> save some data to my DB from my wicket page (adding an object), my master 
> (list) page is not updated. Okay, I thought, maybe I just need to modify the 
> model at the same time as saving it. So I did that, and the new row still 
> does not appear. How do I tell Wicket to do a "deep" refresh of the page, and 
> not just redisplay the existing contents?
>
>  Thanks
>
>  ___
>
>  The  information in this email or in any file attached
>  hereto is intended only for the personal and confiden-
>  tial  use  of  the individual or entity to which it is
>  addressed and may contain information that is  propri-
>  etary  and  confidential.  If you are not the intended
>  recipient of this message you are hereby notified that
>  any  review, dissemination, distribution or copying of
>  this message is strictly prohibited.  This  communica-
>  tion  is  for information purposes only and should not
>  be regarded as an offer to sell or as  a  solicitation
>  of an offer to buy any financial product. Email trans-
>  mission cannot be guaranteed to be  secure  or  error-
>  free. P6070214
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Make a Ajax button have a confirm dialog

2008-04-01 Thread Pinger

I have an ajaxbutton I make like this

AjaxButton newPositionButton = new AjaxButton("addPosition") {

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
 //Do Stuff
} 
};


I want to get a Yes/No confirm dialog, so I only "Do Stuff" if they say
yes..

Thanks

P.S.
I like wicket.. coming from Asp.net, I prefer it to the other java web
frameworks :)
-- 
View this message in context: 
http://www.nabble.com/Make-a-Ajax-button-have-a-confirm-dialog-tp16425091p16425091.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StackOverflowError using 1.3.2

2008-04-01 Thread Johan Compagner
do you have a unit test or quickstart for this?

johan


On Tue, Apr 1, 2008 at 10:57 PM, Mark Lichtenberg <[EMAIL PROTECTED]>
wrote:

> Hi,
> We've been experiencing StackOverflowErrors when our application is
> under a load of around 4 sessions, mostly clicks to load pages without
> necessarily waiting for the previous click to finish.  I saw this was
> addressed with jira issue 1365, and was part of 1.3.2, which we are
> using. For good measure, we took out all instance variables
> referencing Page objects, which was mentioned in the jira issue, but
> this did not help either. We also tried the wicket nightly today, but
> got the same results. Seems to be due to page deserialization - a
> snippet of the exception is below.
>
> Any help would be greatly appreciated.
>
> 11:15:15,497 ERROR [[default]] Servlet.service() for servlet default
> threw exception
> java.lang.StackOverflowError
>at java.io.ObjectInputStream
> $PeekInputStream.read(ObjectInputStream.java:2213)
>at java.io.ObjectInputStream
> $PeekInputStream.readFully(ObjectInputStream.java:2226)
>at java.io.ObjectInputStream
> $BlockDataInputStream.readUTFBody(ObjectInputStream.java:2963)
>at java.io.ObjectInputStream
> $BlockDataInputStream.readUTF(ObjectInputStream.java:2764)
>at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1032)
>at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java
> :600)
>at
> java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:
> 789)
>at java.io.ObjectInputStream.readNonProxyDesc(
> ObjectInputStream.java:
> 1534)
>at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java
> :1466)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> 1699)
>at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> :1305)
>at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>at java.util.HashSet.readObject(HashSet.java:278)
>at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
>at
> sun
> .reflect
> .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>at java.lang.reflect.Method.invoke(Method.java:585)
>at java.io.ObjectStreamClass.invokeReadObject(
> ObjectStreamClass.java:
> 946)
>at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
> 1809)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> 1719)
>at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> :1305)
>at java.io.ObjectInputStream.defaultReadFields(
> ObjectInputStream.java:
> 1908)
>at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
> 1832)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> 1719)
>at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> :1305)
>at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>at java.util.HashMap.readObject(HashMap.java:1067)
>at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
>at
> sun
> .reflect
> .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>at java.lang.reflect.Method.invoke(Method.java:585)
>at java.io.ObjectStreamClass.invokeReadObject(
> ObjectStreamClass.java:
> 946)
>at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:
> 1809)
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> 1719)
> 
>at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
> 1719)
>at java.io.ObjectInputStream.readObject0(ObjectInputStream.java
> :1305)
>at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>at org.apache.wicket.util.lang.Objects.byteArrayToObject(
> Objects.java:
> 392)
>at
> org
> .apache
> .wicket
> .protocol
> .http
> .pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
>at
> org
> .apache
> .wicket
> .protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
>at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore
> $SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
>at org.apache.wicket.Session.getPage(Session.java:751)
>at org.apache.wicket.protocol.http.pagestore.AbstractPageStore
> $PageHolder.readResolve(AbstractPageStore.java:363)
>at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
>at
> sun
> .reflect
> .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
> ..
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


StackOverflowError using 1.3.2

2008-04-01 Thread Mark Lichtenberg

Hi,
We've been experiencing StackOverflowErrors when our application is  
under a load of around 4 sessions, mostly clicks to load pages without  
necessarily waiting for the previous click to finish.  I saw this was  
addressed with jira issue 1365, and was part of 1.3.2, which we are  
using. For good measure, we took out all instance variables  
referencing Page objects, which was mentioned in the jira issue, but  
this did not help either. We also tried the wicket nightly today, but  
got the same results. Seems to be due to page deserialization - a  
snippet of the exception is below.


Any help would be greatly appreciated.

11:15:15,497 ERROR [[default]] Servlet.service() for servlet default  
threw exception

java.lang.StackOverflowError
	at java.io.ObjectInputStream 
$PeekInputStream.read(ObjectInputStream.java:2213)
	at java.io.ObjectInputStream 
$PeekInputStream.readFully(ObjectInputStream.java:2226)
	at java.io.ObjectInputStream 
$BlockDataInputStream.readUTFBody(ObjectInputStream.java:2963)
	at java.io.ObjectInputStream 
$BlockDataInputStream.readUTF(ObjectInputStream.java:2764)

at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1032)
at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:600)
	at  
java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java: 
789)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java: 
1534)

at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
	at  
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 
1699)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at java.util.HashSet.readObject(HashSet.java:278)
at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

at java.lang.reflect.Method.invoke(Method.java:585)
	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java: 
946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java: 
1809)
	at  
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 
1719)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java: 
1908)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java: 
1832)
	at  
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 
1719)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at java.util.HashMap.readObject(HashMap.java:1067)
at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

at java.lang.reflect.Method.invoke(Method.java:585)
	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java: 
946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java: 
1809)
	at  
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 
1719)


	at  
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java: 
1719)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
	at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java: 
392)
	at  
org 
.apache 
.wicket 
.protocol 
.http 
.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
	at  
org 
.apache 
.wicket 
.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
	at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore 
$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)

at org.apache.wicket.Session.getPage(Session.java:751)
	at org.apache.wicket.protocol.http.pagestore.AbstractPageStore 
$PageHolder.readResolve(AbstractPageStore.java:363)

at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

..

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validate HTML generated from getMarkupResourceStream()

2008-04-01 Thread Igor Vaynberg
you can probably user our markupparser...

-igor


On Tue, Apr 1, 2008 at 1:26 PM, hjuturu <[EMAIL PROTECTED]> wrote:
>
>  Hi All
>  I use a class which implements IMarkupResourceStreamProvider,
>  IMarkupCacheKeyProvider to
>  generated HTML dynamically and sent it to wicket as a IResourceStream.
>  //code snippet
>  public IResourceStream getMarkupResourceStream(MarkupContainer container,
>  Class containerClass){ return new 
> StringResourceStream(HTMLString);
> }
>
>  If the HTMLString is not properly formed , wicket throws
>  "java.text.ParseException" and org.apache.wicket.markup.MarkupException.
>  after i set the responsepage.
>
>  I would like to validate whether this string is correct before it goes to
>  wicket code and a exception is thrown.Is there anyway to validate this
>  HTMLString and catch the exception.
>
>  If not in wicket are there any third party packages available to validate
>  dynamically generated HTML strings .
>
>  Thanks All
>  Haritha
>
>
>
>
>
>  --
>  View this message in context: 
> http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RequestCycle exception explanation

2008-04-01 Thread Igor Vaynberg
On Tue, Apr 1, 2008 at 1:51 PM, Al Maw <[EMAIL PROTECTED]> wrote:
> OK, but the reason is always the same - the user will be trying to click on
>  something that doesn't exist any more.
>
>  I can't quite remember how our page versioning works for this (Eelco? Igor?)
>  but it might be possible that users are clicking the same link twice and
>  that the first click removes the component they've clicked on from the
>  hierarchy, causing the second click to fail?

in theory the second click should actually unroll the version back so
the link would comeback and then get clicked again. it is possible
that this happens on stateless pages or the ones where versioning has
been explicitly turned off.

-igor


>
>  Regards,
>
>  Al
>
>
>
>  On Tue, Apr 1, 2008 at 9:44 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
>
>  > On this site we aren't using any Ajax components. :(
>  >
>  > J
>  >
>  > On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>  >
>  > > What seems to be happening is that you're trying to click a link for a
>  > > component that no longer exists. Did you maybe remove it with AJAX or
>  > > something but not update the page? I think you sometimes can get this
>  > > issue
>  > > in a ListView if you don't think about how stuff is added and removed,
>  > and
>  > > interactions with setReuseItems(true).
>  > >
>  > > Al
>  > >
>  > > On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
>  > >
>  > > > I've started seeing exceptions like the onces below more frequently
>  > can
>  > > > someone explain what is actually going on?  We've been making a lot of
>  > > > changes, but I can't say exactly what may have set this off...
>  > > >
>  > > >
>  > > >
>  > > > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component myLink
>  > not
>  > > > found on page com.foo.bar.SomePage [id = 459], listener interface = [R
>  > > > equestListenerInterface name=ILinkListener, method=public abstract
>  > void
>  > > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>  > > > org.apache.wicket.WicketRuntimeException: component myLink not found
>  > on
>  > > > page
>  > > > com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
>  > > > tenerInterface name=ILinkListener, method=public abstract void
>  > > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>  > > >
>  > > >
>  > > > j
>  > > >
>  > >
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



IllegalStateException closing my modal

2008-04-01 Thread Michael Mehrle
When closing my modal (modal.close()) I get this:

IllegalStateException: ServletRequest does not contain multipart content

Multipart is not set on my form, so I'm not sure why this is
happening...

Any ideas? I'm kind of stuck on this one.

Michael

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RequestCycle exception explanation

2008-04-01 Thread Al Maw
OK, but the reason is always the same - the user will be trying to click on
something that doesn't exist any more.

I can't quite remember how our page versioning works for this (Eelco? Igor?)
but it might be possible that users are clicking the same link twice and
that the first click removes the component they've clicked on from the
hierarchy, causing the second click to fail?

Regards,

Al

On Tue, Apr 1, 2008 at 9:44 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:

> On this site we aren't using any Ajax components. :(
>
> J
>
> On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>
> > What seems to be happening is that you're trying to click a link for a
> > component that no longer exists. Did you maybe remove it with AJAX or
> > something but not update the page? I think you sometimes can get this
> > issue
> > in a ListView if you don't think about how stuff is added and removed,
> and
> > interactions with setReuseItems(true).
> >
> > Al
> >
> > On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> >
> > > I've started seeing exceptions like the onces below more frequently
> can
> > > someone explain what is actually going on?  We've been making a lot of
> > > changes, but I can't say exactly what may have set this off...
> > >
> > >
> > >
> > > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component myLink
> not
> > > found on page com.foo.bar.SomePage [id = 459], listener interface = [R
> > > equestListenerInterface name=ILinkListener, method=public abstract
> void
> > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> > > org.apache.wicket.WicketRuntimeException: component myLink not found
> on
> > > page
> > > com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
> > > tenerInterface name=ILinkListener, method=public abstract void
> > > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> > >
> > >
> > > j
> > >
> >
>


Calling a JS function from onNodeLinkClicked in a Tree?

2008-04-01 Thread Amanda Pacheco
Hi all,
I'm using a Tree for navigation and I have a need to load an external page in a 
new window when a link is clicked in the tree.  I was hoping to put something 
in the onNodeLinkClicked function for my tree that could create/call a JS 
function to load the URL in a new window as required.  This does not need to be 
done for the entire tree structure, so I need to be able to set up this 
functionality for specified nodes only.  Is there a way to do this?

I have read the JS related article on the wiki 
(http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html),
 but I don't see how to add this to only a few nodes in a tree.

Here's my tree definition:

private Tree getTree()
{
  final Tree linkTree = new Tree("navTree", createNavigationTreeModel())
  {
private static final long serialVersionUID = -4646756742893751770L;

@Override
protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node)
{
  // If this is a MenuItem, reload content.
  if (((DefaultMutableTreeNode) node).getUserObject() instanceof MenuItem)
  {
MenuItem menuItem = (MenuItem) ((DefaultMutableTreeNode) 
node).getUserObject();
Panel contentPanel = menuItem.getContent();
contentPanel.setOutputMarkupId(true);

MenuPanel.this.getParent().replace(contentPanel);
target.addComponent(contentPanel);
  }
  else if (((DefaultMutableTreeNode) node).getUserObject() instanceof Menu)
  {
Menu menu = (Menu) ((DefaultMutableTreeNode) node).getUserObject();

// Use Javascript to open new window?  Get URL from menu object.
  }

  getTreeState().selectNode(node, true);
  super.onNodeLinkClicked(target, node);
}
  };

  linkTree.setRootLess(true);
  linkTree.setOutputMarkupId(true);
  return linkTree;
}

The if(MenuItem) replace portion works great, it's the else if(Menu) part that 
has me stuck.  Thanks in advance for any suggestions or comments.
-- Amanda


Re: refreshing page

2008-04-01 Thread Maurice Marrink
It really does not hurt to google before asking you know :(
http://www.theserverside.com/tt/articles/content/IntroducingApacheWicket/article.html

Maurice

On Tue, Apr 1, 2008 at 10:39 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'm sure this is a basic newbie lack of knowledge showing here, but when I 
> save some data to my DB from my wicket page (adding an object), my master 
> (list) page is not updated. Okay, I thought, maybe I just need to modify the 
> model at the same time as saving it. So I did that, and the new row still 
> does not appear. How do I tell Wicket to do a "deep" refresh of the page, and 
> not just redisplay the existing contents?
>
>  Thanks
>
>  ___
>
>  The  information in this email or in any file attached
>  hereto is intended only for the personal and confiden-
>  tial  use  of  the individual or entity to which it is
>  addressed and may contain information that is  propri-
>  etary  and  confidential.  If you are not the intended
>  recipient of this message you are hereby notified that
>  any  review, dissemination, distribution or copying of
>  this message is strictly prohibited.  This  communica-
>  tion  is  for information purposes only and should not
>  be regarded as an offer to sell or as  a  solicitation
>  of an offer to buy any financial product. Email trans-
>  mission cannot be guaranteed to be  secure  or  error-
>  free. P6070214
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: refreshing page

2008-04-01 Thread Al Maw
Really need some code to see exactly what you're doing wrong here.

Wicket uses models to bind your view components to your actual data.

Assuming you're using a ListView, you'll need something like:

IModel model = new AbstractReadOnlyModel() {
public Object getObject() {
// Database query here, e.g:
List products = productDao.findByStatus(Status.LIVE);
return products;
}
};
add(new ListView("foo", model) {
void populateItem(ListItem item) {
Product product = (Product)item.getModelObject();
item.add(new Label("name", product.getName()));
}
});

This model lets you pull stuff on-demand out of your database every time the
page is rendered. The ListView by default will recreate its entire set of
items every page render. You can change this behaviour with
#setReuseItems(true), but you probably don't want to for this. ;-)

Make sense?

Regards,

Al

On Tue, Apr 1, 2008 at 9:39 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I'm sure this is a basic newbie lack of knowledge showing here, but when I
> save some data to my DB from my wicket page (adding an object), my master
> (list) page is not updated. Okay, I thought, maybe I just need to modify the
> model at the same time as saving it. So I did that, and the new row still
> does not appear. How do I tell Wicket to do a "deep" refresh of the page,
> and not just redisplay the existing contents?
>
> Thanks
>
> ___
>
> The  information in this email or in any file attached
> hereto is intended only for the personal and confiden-
> tial  use  of  the individual or entity to which it is
> addressed and may contain information that is  propri-
> etary  and  confidential.  If you are not the intended
> recipient of this message you are hereby notified that
> any  review, dissemination, distribution or copying of
> this message is strictly prohibited.  This  communica-
> tion  is  for information purposes only and should not
> be regarded as an offer to sell or as  a  solicitation
> of an offer to buy any financial product. Email trans-
> mission cannot be guaranteed to be  secure  or  error-
> free. P6070214
>


Re: RequestCycle exception explanation

2008-04-01 Thread Jeremy Levy
On this site we aren't using any Ajax components. :(

J

On Tue, Apr 1, 2008 at 4:39 PM, Al Maw <[EMAIL PROTECTED]> wrote:

> What seems to be happening is that you're trying to click a link for a
> component that no longer exists. Did you maybe remove it with AJAX or
> something but not update the page? I think you sometimes can get this
> issue
> in a ListView if you don't think about how stuff is added and removed, and
> interactions with setReuseItems(true).
>
> Al
>
> On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:
>
> > I've started seeing exceptions like the onces below more frequently can
> > someone explain what is actually going on?  We've been making a lot of
> > changes, but I can't say exactly what may have set this off...
> >
> >
> >
> > 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component myLink not
> > found on page com.foo.bar.SomePage [id = 459], listener interface = [R
> > equestListenerInterface name=ILinkListener, method=public abstract void
> > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> > org.apache.wicket.WicketRuntimeException: component myLink not found on
> > page
> > com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
> > tenerInterface name=ILinkListener, method=public abstract void
> > org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> >
> >
> > j
> >
>


Re: Advance RadioChoice Examples

2008-04-01 Thread Al Maw
You have to use the constructor that takes an IChoiceRenderer, same as any
other AbstractChoice component like a DropDownChoice. You should be able to
figure the rest out from the JavaDocs and examples for that.

Regards,

Al


On Tue, Apr 1, 2008 at 9:29 PM, Shelli D. Orton <[EMAIL PROTECTED]>
wrote:

> I'm trying to figure out how to have a RadioChoice's display value be
> different from the option value.  For example, I want to display:
>
> (x) Display Options on Single Page
> ( ) Display Options on Mulitple Pages
>
> But I want the value saved to the model to be either "single" or
> "multiple".  I'm guessing it has to do with using a RadioChoice constructor
> that takes a IChoiceRenderer that has overridden methods that do what I
> want.  But I can't find any but the simplest of of RadioChoice examples.
>
> Can someone point me to web resource or show me how this is done?
>
> Thanks in advance!
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


refreshing page

2008-04-01 Thread Andrew Broderick
Hi,

I'm sure this is a basic newbie lack of knowledge showing here, but when I save 
some data to my DB from my wicket page (adding an object), my master (list) 
page is not updated. Okay, I thought, maybe I just need to modify the model at 
the same time as saving it. So I did that, and the new row still does not 
appear. How do I tell Wicket to do a "deep" refresh of the page, and not just 
redisplay the existing contents?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Re: RequestCycle exception explanation

2008-04-01 Thread Al Maw
What seems to be happening is that you're trying to click a link for a
component that no longer exists. Did you maybe remove it with AJAX or
something but not update the page? I think you sometimes can get this issue
in a ListView if you don't think about how stuff is added and removed, and
interactions with setReuseItems(true).

Al

On Tue, Apr 1, 2008 at 9:12 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:

> I've started seeing exceptions like the onces below more frequently can
> someone explain what is actually going on?  We've been making a lot of
> changes, but I can't say exactly what may have set this off...
>
>
>
> 2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component myLink not
> found on page com.foo.bar.SomePage [id = 459], listener interface = [R
> equestListenerInterface name=ILinkListener, method=public abstract void
> org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
> org.apache.wicket.WicketRuntimeException: component myLink not found on
> page
> com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
> tenerInterface name=ILinkListener, method=public abstract void
> org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
>
>
> j
>


Advance RadioChoice Examples

2008-04-01 Thread Shelli D. Orton
I'm trying to figure out how to have a RadioChoice's display value be different 
from the option value.  For example, I want to display:

(x) Display Options on Single Page
( ) Display Options on Mulitple Pages

But I want the value saved to the model to be either "single" or "multiple".  
I'm guessing it has to do with using a RadioChoice constructor that takes a 
IChoiceRenderer that has overridden methods that do what I want.  But I can't 
find any but the simplest of of RadioChoice examples.

Can someone point me to web resource or show me how this is done?

Thanks in advance!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validate HTML generated from getMarkupResourceStream()

2008-04-01 Thread hjuturu

Hi All
I use a class which implements IMarkupResourceStreamProvider,
IMarkupCacheKeyProvider to 
generated HTML dynamically and sent it to wicket as a IResourceStream.
//code snippet
public IResourceStream getMarkupResourceStream(MarkupContainer container,
Class containerClass){ return new 
StringResourceStream(HTMLString);
}

If the HTMLString is not properly formed , wicket throws
"java.text.ParseException" and org.apache.wicket.markup.MarkupException.
after i set the responsepage. 

I would like to validate whether this string is correct before it goes to
wicket code and a exception is thrown.Is there anyway to validate this
HTMLString and catch the exception.

If not in wicket are there any third party packages available to validate
dynamically generated HTML strings .

Thanks All
Haritha





-- 
View this message in context: 
http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RequestCycle exception explanation

2008-04-01 Thread Jeremy Levy
I've started seeing exceptions like the onces below more frequently can
someone explain what is actually going on?  We've been making a lot of
changes, but I can't say exactly what may have set this off...



2008-04-01 16:07:12,514 ERROR Wap [RequestCycle] : component myLink not
found on page com.foo.bar.SomePage [id = 459], listener interface = [R
equestListenerInterface name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
org.apache.wicket.WicketRuntimeException: component myLink not found on page
com.foo.bar.SomePage [id = 459], listener interface = [RequestLis
tenerInterface name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]


j


Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread Johan Compagner
cool thx for that list!

On Tue, Apr 1, 2008 at 5:50 PM, godin <[EMAIL PROTECTED]> wrote:

> a common solution is to use this vm options
> -XX:+CMSPermGenSweepingEnabled
> -XX:+CMSClassUnloadingEnabled
> but be aware that this options are avaible in only recent jdk
> http://blogs.sun.com/watt/resource/jvm-options-list.html
> regards marc
>
>
>
>
>
>
> Piller Sébastien a écrit :
> > Thanks... but it's impossible to find a clear solution to this problem
> > over the internet... Each things I try fails miserably... Nobody can
> > provide something that works... Setting the
> > "hibernate.bytecode.use_reflection_optimizer" property has no effect.
> > And others solutions are bad: monitor the application and manually
> > restitue the memory of useless objects, etc...
> >
> > Am I sentenced to restart Tomcat each time I redeploy the app? I am
> > under a shared server, I can't restart it myself! What do you do, you,
> > when you are deploying your applications? Do you phone to your
> > provider to ask him to restart the server himself? Or did you find a
> > workaround?
> >
> > It's so annoying... That's a problem everybody has when using tomcat,
> > but nobody can give a solution...
> >
> >
> >
> > Martijn Dashorst a écrit :
> >> http://www.google.com/search?q=permgen+outofmemory+tomcat
> >>
> >> On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
> >>
> >>>  Hello everybody,
> >>>
> >>>  I found some problem with my app, when I deploy it/undeploy it
> several
> >>> times under Tomcat (5.5) (Unix and Windows). I copied my app war file
> in the
> >>> webapp dir, and when it has been fully deployed, I surf on some pages.
> After
> >>> that, I delete that war, wait for the end of undeployment, and did it
> again.
> >>> The memory used by tomcat grows on each cycle. I did it about ten
> times, and
> >>> after that I got the message below:
> >>>
> >>>
> >>> java.lang.OutOfMemoryError: PermGen space
> >>>  at java.lang.ClassLoader.defineClass1(Native Method)
> >>>  at java.lang.ClassLoader.defineClass(Unknown Source)
> >>>  at java.security.SecureClassLoader.defineClass(Unknown
> >>> Source)
> >>>  at
> >>> org.apache.catalina.loader.WebappClassLoader.findClassInternal(
> WebappClassLoader.java:1853)
> >>>  at
> >>> org.apache.catalina.loader.WebappClassLoader.findClass(
> WebappClassLoader.java:875)
> >>>  at
> >>> org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1330)
> >>>  at
> >>> org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1209)
> >>>  at java.lang.ClassLoader.loadClassInternal(Unknown
> >>> Source)
> >>>  at java.lang.Class.getDeclaredMethods0(Native Method)
> >>>  at java.lang.Class.privateGetDeclaredMethods(Unknown
> >>> Source)
> >>>  at java.lang.Class.getMethod0(Unknown Source)
> >>>  at java.lang.Class.getMethod0(Unknown Source)
> >>>  at java.lang.Class.getMethod0(Unknown Source)
> >>>  at java.lang.Class.getMethod0(Unknown Source)
> >>>  at java.lang.Class.getMethod0(Unknown Source)
> >>>  at java.lang.Class.getMethod(Unknown Source)
> >>>  at
> >>> org.apache.wicket.util.lang.PropertyResolver.findGetter(
> PropertyResolver.java:506)
> >>>  at
> >>> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(
> PropertyResolver.java:331)
> >>>  at
> >>> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(
> PropertyResolver.java:275)
> >>>  at
> >>> org.apache.wicket.util.lang.PropertyResolver.getValue(
> PropertyResolver.java:84)
> >>>  at
> >>> org.apache.wicket.model.AbstractPropertyModel.getObject(
> AbstractPropertyModel.java:113)
> >>>  at
> >>> org.apache.wicket.Component.getModelObject(Component.java:1539)
> >>>  at
> >>>
> org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue
> (AbstractSingleSelectChoice.java:140)
> >>>  at
> >>> org.apache.wicket.markup.html.form.FormComponent.getValue(
> FormComponent.java:744)
> >>>  at
> >>> org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(
> AbstractChoice.java:344)
> >>>  at
> >>> org.apache.wicket.Component.renderComponent(Component.java:2459)
> >>>  at
> >>> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
> >>>  at
> >>> org.apache.wicket.Component.render(Component.java:2296)
> >>>  at
> >>> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java
> :1240)
> >>>  at
> >>> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
> >>>  at org.apache.wicket.Page.onRender(Page.java:1446)
> >>>  at
> >>> org.apache.wicket.Component.render(Component.java:2296)
> >>>
> >>>  As you can see, it talks about Wicket, but I don't know if it is
> really
> >>> related to it. I tried on Tomcat5.5/Linux too, and the message is not
> >>> exactly the same, but it stills speak of PermGen.
> >>>
> >>>  PS: I use Hibernate 3.2.6ga and several other things in my app, like
> >>

Re: Question on page inheritance...

2008-04-01 Thread Maurice Marrink
Or Session. Session.getAuthorizationStrategy().

Maurice

On Tue, Apr 1, 2008 at 8:51 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> It's your webapplication that takes the ISecurityStrategy..
>
>  public class ZeuzGroupApplication extends WebApplication {
>
> private SpringComponentInjector springComponentInjector;
>
> @Override
> protected void init() {
> super.init();
>  //getSecuritySettings().setAuthorizationStrategy(
>  //new RoleAuthorizationStrategy(new UserRolesAuthorizer()));
> getSecuritySettings().setAuthorizationStrategy(
> new ZeuzSecurity(ZeuzAuthorizedPage.class,
>  LoginPage.class) {
> @Override
> protected boolean isAuthorized(Class pageClass) {
> return (((ZeuzSession)
>  Session.get()).isAuthorized());
> }
> });
>  ...
>
>
>
>  Bruce Petro wrote:
>  > Thanks to the replies I received... yeah I didn't say it well, but I
>  > assumed the user would be kept in the session and that seems to fit
>  > everyone's reply. On top of that, I think I'm hearing I can use
>  > inheritance and have every page utilize ISecurityStrategy to then
>  > control access to the page.
>  >
>  > I'll check into it and see if I've got that all correct.  Thanks again.
>  >
>  >
>  > -Original Message-
>  > From: Nino Saturnino Martinez Vazquez Wael
>  > [mailto:[EMAIL PROTECTED]
>  > Sent: Tuesday, April 01, 2008 1:49 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: Question on page inheritance...
>  >
>  > True, as Igor wrote this is meant to be in conjuction with at
>  > ISecurityStrategy.
>  >
>  > Nino Saturnino Martinez Vazquez Wael wrote:
>  >
>  >> You could actually also do this another way... Im using markup
>  >> inheritance alot, but I stuff user object into the session like this:
>  >>
>  >> See a nice view here:
>  >> http://papernapkin.org/pastebin/view/281/
>  >>
>  >> package zeuzgroup.application;
>  >>
>  >> import javax.servlet.http.HttpSession;
>  >>
>  >> import org.apache.wicket.Application;
>  >> import org.apache.wicket.Request;
>  >> import org.apache.wicket.protocol.http.WebRequest;
>  >> import org.apache.wicket.protocol.http.WebSession;
>  >>
>  >> import zeuzgroup.core.Person;
>  >> import zeuzgroup.core.user.UserType;
>  >>
>  >> public class ZeuzSession extends WebSession {
>  >>
>  >>private boolean authorized = false;
>  >>
>  >>private Person person;
>  >>
>  >>private HttpSession httpSession;
>  >>
>  >>protected ZeuzSession(Application application, Request request) {
>  >>super(application, request);
>  >>httpSession = ((WebRequest) request).getHttpServletRequest()
>  >>.getSession();
>  >>
>  >>}
>  >>
>  >>public boolean isAuthorized() {
>  >>return authorized;
>  >>}
>  >>
>  >>public void setAuthorized(boolean authorized) {
>  >>
>  >>this.authorized = authorized;
>  >>if (authorized) {
>  >>
>  >>httpSession.setAttribute("sso.password.attribute", person
>  >>.getPassword());
>  >>httpSession.setAttribute("sso.email.attribute",
>  >> person.getEmail());
>  >>httpSession.setAttribute("password", person.getPassword());
>  >>httpSession.setAttribute("email", person.getEmail());
>  >>
>  >>} else {
>  >>httpSession.setAttribute("sso.password.attribute", null);
>  >>httpSession.setAttribute("sso.email.attribute", null);
>  >>}
>  >>}
>  >>
>  >>public Person getPerson() {
>  >>if (person != null) {
>  >>return person;
>  >>} else {
>  >>Person person = new Person();
>  >>person.setUserType(UserType.Guest);
>  >>return person;
>  >>}
>  >>}
>  >>
>  >>public void setPerson(Person person) {
>  >>this.person = person;
>  >>}
>  >>
>  >> }
>  >>
>  >>
>  >> Bruce Petro wrote:
>  >>
>  >>> I'm just getting started in wicket, so forgive me if this is a
>  >>>
>  > too-dumb
>  >
>  >>> question...
>  >>>
>  >>>
>  >>>
>  >>> I know wicket can check the session for a user to ask a "user" object
>  >>>
>  > if
>  >
>  >>> it is logged in.
>  >>>
>  >>> However, you don't really want to paste code on every page.
>  >>>
>  >>> What is the best way, to have each page inherit the base "security
>  >>> check" routine?
>  >>>
>  >>>
>  >>>
>  >>> Would you create a BasePage extends WebPage and put the logic there
>  >>>
>  > and
>  >
>  >>> have all other pages extend BasePage?
>  >>>
>  >>> Or would you attach some sort of a command object to each page and
>  >>>
>  > put
>  >
>  >>> the logic in that?
>  >>>
>  >>>
>  >>>
>  >>> Anyone have a reference to an example of code to do this?
>  >>>
>  >>>
>  >>>
>  >>> THANKS!
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  >>>
>  >
>  >
>

Re: export excel file via an OutputStream

2008-04-01 Thread Al Maw
I think he makes a valid point, personally. People do want to do this sort
of thing quite frequently. It wouldn't kill us to implement an
OutputStreamLink that looked like this:

add(new StreamingLink("link") {
public String getFileName() {
return "download.xls";
}
public String getMimeType() {
return "application/vnd.excel"; // Or whatever it is.
}
public void writeToOutputStream(OutputStream outputStream) {
excelGenerator.writeOutput(outputStream);
}
});

I don't think the current API here is very pleasant or obvious to use.

Regards,

Al

On Tue, Apr 1, 2008 at 1:15 PM, Peter Ertl <[EMAIL PROTECTED]> wrote:

> use AbstractResourceStreamWriter
>
>  > Wicket got to have a more structured api for this common task.
> usually it's not wicket but you when something is not working the way
> you expect it
>
>
>
>
>
> Am 01.04.2008 um 09:31 schrieb [EMAIL PROTECTED]:
>
> > Hello:
> > I am trying to export dynamically generated excel file.
> > The generator would send the file.xls to an OutputStream.
> >
> > In wicket, I am trying to use example as below but
> >  how can I connect the OutputStream to the inputstream
> > ins.  Pipedoutputstream would block. Using a separate thread
> > is not desirable.
> >
> > public void onClick() {
> >
> >   IResourceStream stream = new AbstractResourceStream() {
> >
> > public InputStream getInputStream() throws
> > ResourceStreamNotFoundException {
> >
> >
> > return ins;
> > }
> >
> > public void close() throws IOException {
> > ins.close();
> > }
> > };
> >
> > getRequestCycle().setRequestTarget(
> > new
> > ResourceStreamRequestTarget(stream).setFileName("file.xls"));
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Calling a JS function from onNodeLinkClicked in a Tree?

2008-04-01 Thread Al Maw
This isn't as easy to tweak as it could be, I'm afraid. :-(

You're better off using target on the href than doing this with JavaScript,
I'd have thought.

That said, most people think that choosing to open a new window or not is
pretty evil - the user has the option to do this if they want to, it breaks
the expected functionality of the back button, etc. etc.

I'd probably extend BaseTree in core and write my own little Panel which
just displays a link, which obviously you can tweak as you like. If you want
to pop things up using JavaScript, you can use Link#setPopupSettings(...) to
achieve this nicely.

Regards,

Al

On Tue, Apr 1, 2008 at 7:15 PM, webchick <[EMAIL PROTECTED]> wrote:

>
> Hi all,
> I'm using a Tree for navigation and I have a need to load an external page
> in a new window when a link is clicked in the tree.  I was hoping to put
> something in the onNodeLinkClicked function for my tree that could
> create/call a JS function to load the URL in a new window as required.
>  This
> does not need to be done for the entire tree structure, so I need to be
> able
> to set up this functionality for specified nodes only.  Is there a way to
> do
> this?
>
> I have read the JS related article on the wiki (
>
> http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html
>
> http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html
> ), but I don't see how to add this to only a few nodes in a tree.
>
> Here's my tree definition:
>
> private Tree getTree()
> {
>  final Tree linkTree = new Tree("navTree", createNavigationTreeModel())
>  {
>private static final long serialVersionUID = -4646756742893751770L;
>
>@Override
>protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode
> node)
>{
>  // If this is a MenuItem, reload content.
>  if (((DefaultMutableTreeNode) node).getUserObject() instanceof
> MenuItem)
>  {
>MenuItem menuItem = (MenuItem) ((DefaultMutableTreeNode)
> node).getUserObject();
>Panel contentPanel = menuItem.getContent();
>contentPanel.setOutputMarkupId(true);
>
>MenuPanel.this.getParent().replace(contentPanel);
>target.addComponent(contentPanel);
>  }
>  else if (((DefaultMutableTreeNode) node).getUserObject() instanceof
> Menu)
>  {
>Menu menu = (Menu) ((DefaultMutableTreeNode) node).getUserObject();
>
>// Use Javascript to open new window?  Get URL from menu object.
>  }
>
>  getTreeState().selectNode(node, true);
>  super.onNodeLinkClicked(target, node);
>}
>  };
>
>  linkTree.setRootLess(true);
>  linkTree.setOutputMarkupId(true);
>  return linkTree;
> }
>
> The if(MenuItem) replace portion works great, it's the else if(Menu) part
> that has me stuck.  Thanks in advance for any suggestions or comments.
> -- Amanda
> --
> View this message in context:
> http://www.nabble.com/Calling-a-JS-function-from-onNodeLinkClicked-in-a-Tree--tp16420093p16420093.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread Al Maw
The following two blog entries are very useful in understanding and
debugging this issue:
http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java
http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

We think we've fixed the instances in Wicket where this is a problem, but
there is an outstanding open bug for that because I've yet to verify it:
https://issues.apache.org/jira/browse/WICKET-625

If you do come across a concrete reference chain in your debugging travels
that involves Wicket then please update the JIRA issue and we'll fix it for
you.

Regards,

Al

On Tue, Apr 1, 2008 at 4:54 PM, Martijn Dashorst <[EMAIL PROTECTED]>
wrote:

> There is a solution: not to deploy your application more than 2-3 times...
>
> Martijn
>
> On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
> >
> >  Thanks... but it's impossible to find a clear solution to this problem
> over
> > the internet... Each things I try fails miserably... Nobody can provide
> > something that works... Setting the
> > "hibernate.bytecode.use_reflection_optimizer" property has
> > no effect. And others solutions are bad: monitor the application and
> > manually restitue the memory of useless objects, etc...
> >
> >  Am I sentenced to restart Tomcat each time I redeploy the app? I am
> under a
> > shared server, I can't restart it myself! What do you do, you, when you
> are
> > deploying your applications? Do you phone to your provider to ask him to
> > restart the server himself? Or did you find a workaround?
> >
> >  It's so annoying... That's a problem everybody has when using tomcat,
> but
> > nobody can give a solution...
> >
> >
> >
> >  Martijn Dashorst a écrit :
> >  http://www.google.com/search?q=permgen+outofmemory+tomcat
> >
> > On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
> >
> >
> >  Hello everybody,
> >
> >  I found some problem with my app, when I deploy it/undeploy it several
> > times under Tomcat (5.5) (Unix and Windows). I copied my app war file in
> the
> > webapp dir, and when it has been fully deployed, I surf on some pages.
> After
> > that, I delete that war, wait for the end of undeployment, and did it
> again.
> > The memory used by tomcat grows on each cycle. I did it about ten times,
> and
> > after that I got the message below:
> >
> >
> > java.lang.OutOfMemoryError: PermGen space
> >  at java.lang.ClassLoader.defineClass1(Native Method)
> >  at java.lang.ClassLoader.defineClass(Unknown Source)
> >  at java.security.SecureClassLoader.defineClass(Unknown
> > Source)
> >  at
> > org.apache.catalina.loader.WebappClassLoader.findClassInternal(
> WebappClassLoader.java:1853)
> >  at
> > org.apache.catalina.loader.WebappClassLoader.findClass(
> WebappClassLoader.java:875)
> >  at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1330)
> >  at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(
> WebappClassLoader.java:1209)
> >  at java.lang.ClassLoader.loadClassInternal(Unknown
> > Source)
> >  at java.lang.Class.getDeclaredMethods0(Native Method)
> >  at java.lang.Class.privateGetDeclaredMethods(Unknown
> > Source)
> >  at java.lang.Class.getMethod0(Unknown Source)
> >  at java.lang.Class.getMethod0(Unknown Source)
> >  at java.lang.Class.getMethod0(Unknown Source)
> >  at java.lang.Class.getMethod0(Unknown Source)
> >  at java.lang.Class.getMethod0(Unknown Source)
> >  at java.lang.Class.getMethod(Unknown Source)
> >  at
> > org.apache.wicket.util.lang.PropertyResolver.findGetter(
> PropertyResolver.java:506)
> >  at
> > org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(
> PropertyResolver.java:331)
> >  at
> > org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(
> PropertyResolver.java:275)
> >  at
> > org.apache.wicket.util.lang.PropertyResolver.getValue(
> PropertyResolver.java:84)
> >  at
> > org.apache.wicket.model.AbstractPropertyModel.getObject(
> AbstractPropertyModel.java:113)
> >  at
> > org.apache.wicket.Component.getModelObject(Component.java:1539)
> >  at
> >
> org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue
> (AbstractSingleSelectChoice.java:140)
> >  at
> > org.apache.wicket.markup.html.form.FormComponent.getValue(
> FormComponent.java:744)
> >  at
> > org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(
> AbstractChoice.java:344)
> >  at
> > org.apache.wicket.Component.renderComponent(Component.java:2459)
> >  at
> > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
> >  at
> > org.apache.wicket.Component.render(Component.java:2296)
> >  at
> > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
> >  at
> > org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
> >  at org.apache.wicket.Page.onRender(Page.java:1446)
> >  at
> > org.apache.wicket.Component.render(Component.java:2296)
> >
> >  As you can see, it talks about Wicket, but I don't know if it is really
> > related to it. I tried on Tomcat5.5/L

RE: Wizard seems to cache pages even on model change

2008-04-01 Thread Dan Kaplan
The most important part of this is probably HOW I update the model.  I am
using AJAX.

-Original Message-
From: Dan Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 11:07 AM
To: users@wicket.apache.org
Subject: Wizard seems to cache pages even on model change

Hello,

Here is my scenario.  I have a 2 page Wizard.  The first page asks you to
type in the primary key of a table.  If that row already exists in the
table, the second page gets loaded with the rest of that row's data.  So, in
summary, the first page of the wizard should be able to populate the second
page.  

But here's my problem: The first page only populates the 2nd page if I
haven't visited the second page yet.  If, on the second page, I click the
"previous" button and then pick a new primary key, when I visit the 2nd page
again, the input fields are not updated.  I've used the debugger to see that
the Model Object *is* being updated.

I can't figure out why this is happening.  I only use PropertyModels (those
are dynamic models, right?).  I can only guess that the Wizard serializes
the steps you've visited and doesn't check if the model has changed when you
go back to them.

One last thing that may be revealing: One of the things that second page
displays is a listview of fields.  If the second primary key I pick has more
items in the list than the first one, the extra items do get populated on
the page.  IE: First pk has 3 items.  Second pk has 4 items.  The second
page will have the correct 4th item in the list but the first 3 will be of
the first pk.

Here is my code in a pastebin: http://pastebin.org/26606

Here is my code inlined into the email:

package com.haverlocke.tellah.web.component;

import com.haverlocke.tellah.model.dao.WebsiteDao;
import com.haverlocke.tellah.model.dao.WebsiteHistoryDao;
import com.haverlocke.tellah.model.dto.LinkDto;
import com.haverlocke.tellah.model.dto.WebsiteDto;
import com.haverlocke.tellah.web.model.TellahUrlValidator;
import com.haverlocke.tellah.web.page.HomePage;
import com.haverlocke.tellah.web.util.SimilarWebsiteUtil;
import com.haverlocke.tellah.web.component.recaptcha.ReCaptchaPanel;
import net.databinder.components.AjaxOnKeyPausedUpdater;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.behavior.HeaderContributor;
import org.apache.wicket.extensions.wizard.Wizard;
import org.apache.wicket.extensions.wizard.WizardModel;
import org.apache.wicket.extensions.wizard.WizardStep;
import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.feedback.IFeedbackMessageFilter;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.apache.wicket.PageParameters;
import org.apache.wicket.Component;

import java.util.List;

/**
 * @author Daniel Kaplan
 * @since 7.10.5
 */
public class SubmitWizard extends Wizard {

private static final String PUBLIC_DEV = "fake";
private static final String PRIVATE_DEV = "fake";

@SpringBean
private WebsiteDao websiteDao;

@SpringBean
private WebsiteHistoryDao websiteHistoryDao;

private WebsiteDto websiteDto = new WebsiteDto();
private Label note;
private String noteString;
private boolean insert;

public SubmitWizard(String id, PageParameters pp) {
super(id, false);

insert = pp.getString("websiteName") == null ||
"".equals(pp.getString("websiteName"));

WizardModel model = new WizardModel();
model.add(new WebsiteName());

WebsiteDetails websiteDetails = new WebsiteDetails();
model.add(websiteDetails);

init(model);

websiteDetails.addReCaptchaPanel();

initPage(pp.getString("websiteName"));
}

@Override
public void onFinish() {
new WizardFinishedAction(new PropertyModel(this, "websiteDto"),
getPage()).onSubmit();
}

@Override
public void onCancel() {
setRedirect(true);
setResponsePage(HomePage.class);
}

@Override
protected FeedbackPanel newFeedbackPanel(String id) {
return new FeedbackPanel(id, new IFeedbackMessageFilter() {
public boolean accept(FeedbackMessage message) {
//never show anything.  We show all messages in a different
panel defined in the WizardPage.java
return false;
}
});
}

private class WebsiteName extends WizardStep {

public WebsiteName() {

add(HeaderContributor.forCss("images/submit.css"));

if (insert) {
add(new Label("formHeader", "Set the name"));
} else {
  

Re: continueToOriginalDestination resolves to wrong URL

2008-04-01 Thread Al Maw
My quickstart is not the quickstart you were looking at. See the one called
WICKET-1205.zip

Regardless, I have worked out what the underlying cause is.

You can fix this with a workaround: remove the index.html or index.jsp page
from your web context root directory, as noted on the bug.

Regards,

Al

On Tue, Apr 1, 2008 at 7:55 PM, Zheng, Xiahong <[EMAIL PROTECTED]>
wrote:

>
>
> -Original Message-
> From: Zheng, Xiahong
> Sent: Tuesday, April 01, 2008 12:50 PM
> To: 'users@wicket.apache.org'
> Subject: RE: continueToOriginalDestination resolves to wrong URL
>
> Yes, I was able to reproduce the bug with your example in eclipse 3.3
> and Tomcat 6.0.14 environment (WTP2.0). The color is gone on the second
> page (PageOne.html) after clicking the link on the first page
> (NoAuthHome.html). Changing hostname and port doesn't make a difference.
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Al Maw
> Sent: Monday, March 31, 2008 7:54 PM
> To: users@wicket.apache.org
> Subject: Re: continueToOriginalDestination resolves to wrong URL
>
> I've just spent two hours trying to reproduce this and failing to (see
> the
> bug). If anyone can give me a reproduceable test-case for this wrapped
> up in
> a nice Maven 2-backed project that I can just unzip and work with, then
> I
> will very keenly fix this. As it is, I just can't reproduce it.
>
> I guess it would be useful if you could see if the zip I've attached to
> the
> issue can reproduce the problem on your local machine. If it does,
> please be
> as specific as possible about your set-up as possible (OS, JDK version,
> browser version, Tomcat minor revision, etc.) and I'll try to get a
> mirror
> environment set up so we can work out what the heck the problem could
> be.
>
> Are people running this behind a mod_proxy or something? Or are you
> seeing
> this issue when pointed at localhost:8080?
>
> Regards,
>
> Alastair
>
> On Mon, Mar 31, 2008 at 10:23 PM, Al Maw <[EMAIL PROTECTED]> wrote:
>
> > Yep, this is probably
> https://issues.apache.org/jira/browse/WICKET-1205
> >
> > Am off to see if I can fix it right now.
> >
> > Regards,
> >
> > Alastair
> >
> >
> > On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong
> <[EMAIL PROTECTED]>
> > wrote:
> >
> > > My environment:
> > >
> > > Wicket version: 1.3.2
> > > Servlet Container: tomcat 6.0.14
> > >
> > > The problem is definitely still there if I map wicketfilter at /*.
> > > However, I just found if I add an extra path such as "/abc/*" in the
> > > mapping it starts to work. This workaround requires my application
> to
> > > add an extra path to the url which I want to avoid.
> > >
> > > Interestingly, this workaround also solves the relative stylesheet
> > > loading problem that I was facing at the same time.
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf
> > > Of Al Maw
> > > Sent: Monday, March 31, 2008 10:15 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: continueToOriginalDestination resolves to wrong URL
> > >
> > > That bug was closed for rc 1, so you shouldn't be having this issue
> > > unless
> > > you're on a beta version.
> > >
> > > Please could you provide some more details?
> > > Which Wicket version?
> > > Which servlet container?
> > >
> > > Regards,
> > >
> > > Alastair
> > >
> > > On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong
> <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Just realized this was reported in WICKET-588. Was the fix
> included in
> > > > 1.3.2 release?
> > > >
> > > > -Original Message-
> > > > From: Zheng, Xiahong
> > > > Sent: Sunday, March 30, 2008 9:28 PM
> > > > To: users@wicket.apache.org
> > > > Subject: continueToOriginalDestination resolves to wrong URL
> > > >
> > > > Scenario,
> > > >
> > > > 1) request http://myapp/pages/watchlist
> > > > 2) throws throw new
> > > > RestartResponseAtInterceptPageException(Login.class);
> > > > 3) Use sign in
> > > > 4) user redirected to http://pages/watchlist note: path /myapp is
> > > > dropped
> > > >
> > > > Any idea?
> > > >
> > > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Changing Wickets default styles

2008-04-01 Thread Al Maw
If you are having CSS issues in firefox, use firebug to debug it. It will
tell you which rules are being overridden and by what. You might be
including the CSS in the wrong order on the page, for example.

Regards,

Al

On Tue, Apr 1, 2008 at 6:06 PM, Matthew Young <[EMAIL PROTECTED]> wrote:

> >and is indented as in the original
>
> I think some browser use padding, others use margin to shift li.  You need
> to set both padding-left and margin-left to have them look the same on all
> browsers.
>
> On Tue, Apr 1, 2008 at 6:33 AM, Steen Larsen <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have made a stylesheet to change the default look of the
> FeedbackPanel,
> > and loaded it with response.renderCSSReference(new ResourceReference(
> > Style.class,"yousee.css"), "screen"), where the class Style and the css
> is
> > in the same package. The css looks like this:
> >
> > li.feedbackPanelERROR {
> >background-image: none;
> >color: red;
> >padding-left: 0px;
> >background-repeat: no-repeat;
> >background-position: 0px;
> >list-style-type: none;
> > }
> >
> > li.feedbackPanelINFO {
> >background-image: none;
> >color: red;
> >padding-left: 0px;
> >background-repeat: no-repeat;
> >background-position: 0px;
> >list-style-type: none;
> > }
> >
> > This works fine in IE7, but for some reason only works partly in
> Firefox.
> > The green background-image is removed but the text is not red, and is
> > indented as in the original. Looking at the styles with Firefoxs
> > WebDeveloper shows the correct styles. Anybody experienced this and
> found
> > a
> > solution ?.
> >
> > /Steen
> >
>


RE: continueToOriginalDestination resolves to wrong URL

2008-04-01 Thread Zheng, Xiahong
 

-Original Message-
From: Zheng, Xiahong 
Sent: Tuesday, April 01, 2008 12:50 PM
To: 'users@wicket.apache.org'
Subject: RE: continueToOriginalDestination resolves to wrong URL

Yes, I was able to reproduce the bug with your example in eclipse 3.3
and Tomcat 6.0.14 environment (WTP2.0). The color is gone on the second
page (PageOne.html) after clicking the link on the first page
(NoAuthHome.html). Changing hostname and port doesn't make a difference.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Al Maw
Sent: Monday, March 31, 2008 7:54 PM
To: users@wicket.apache.org
Subject: Re: continueToOriginalDestination resolves to wrong URL

I've just spent two hours trying to reproduce this and failing to (see
the
bug). If anyone can give me a reproduceable test-case for this wrapped
up in
a nice Maven 2-backed project that I can just unzip and work with, then
I
will very keenly fix this. As it is, I just can't reproduce it.

I guess it would be useful if you could see if the zip I've attached to
the
issue can reproduce the problem on your local machine. If it does,
please be
as specific as possible about your set-up as possible (OS, JDK version,
browser version, Tomcat minor revision, etc.) and I'll try to get a
mirror
environment set up so we can work out what the heck the problem could
be.

Are people running this behind a mod_proxy or something? Or are you
seeing
this issue when pointed at localhost:8080?

Regards,

Alastair

On Mon, Mar 31, 2008 at 10:23 PM, Al Maw <[EMAIL PROTECTED]> wrote:

> Yep, this is probably
https://issues.apache.org/jira/browse/WICKET-1205
>
> Am off to see if I can fix it right now.
>
> Regards,
>
> Alastair
>
>
> On Mon, Mar 31, 2008 at 5:54 PM, Zheng, Xiahong
<[EMAIL PROTECTED]>
> wrote:
>
> > My environment:
> >
> > Wicket version: 1.3.2
> > Servlet Container: tomcat 6.0.14
> >
> > The problem is definitely still there if I map wicketfilter at /*.
> > However, I just found if I add an extra path such as "/abc/*" in the
> > mapping it starts to work. This workaround requires my application
to
> > add an extra path to the url which I want to avoid.
> >
> > Interestingly, this workaround also solves the relative stylesheet
> > loading problem that I was facing at the same time.
> >
> >
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
> > Of Al Maw
> > Sent: Monday, March 31, 2008 10:15 AM
> > To: users@wicket.apache.org
> > Subject: Re: continueToOriginalDestination resolves to wrong URL
> >
> > That bug was closed for rc 1, so you shouldn't be having this issue
> > unless
> > you're on a beta version.
> >
> > Please could you provide some more details?
> > Which Wicket version?
> > Which servlet container?
> >
> > Regards,
> >
> > Alastair
> >
> > On Mon, Mar 31, 2008 at 3:32 AM, Zheng, Xiahong
<[EMAIL PROTECTED]>
> > wrote:
> >
> > > Just realized this was reported in WICKET-588. Was the fix
included in
> > > 1.3.2 release?
> > >
> > > -Original Message-
> > > From: Zheng, Xiahong
> > > Sent: Sunday, March 30, 2008 9:28 PM
> > > To: users@wicket.apache.org
> > > Subject: continueToOriginalDestination resolves to wrong URL
> > >
> > > Scenario,
> > >
> > > 1) request http://myapp/pages/watchlist
> > > 2) throws throw new
> > > RestartResponseAtInterceptPageException(Login.class);
> > > 3) Use sign in
> > > 4) user redirected to http://pages/watchlist note: path /myapp is
> > > dropped
> > >
> > > Any idea?
> > >
> > >
-
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
-
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Alastair Maw
Yikes. You're converting your domain data to some crazy type (NameValuePair)
just so you can display it differently. Not good.

Map choices = new TreeMap();
choices.put("foo", "Foo display value");

add(new DropDownChoice("foo", model, choices, new IChoiceRenderer() {
Object getDisplayValue(Object object) {
return choices.get(object);
}
String getIdValue(Object object, int index) {
return object;
}
});

Define that choice renderer in a separate class if you need to reuse it
across drop-downs. Call it a MapChoiceRenderer or something.

You really ought to try to use a more useful data type than a String in here
so you don't need to do lots of conversion later. It looks like you have
time intervals. Use a Joda Interval or TimeOfDay + Duration pair.

Unless you back your solution with a proper date/time library and
auto-generated values, your solution will fail when there is a day on a
daylight savings boundary, as you will either incorrectly display an hour
that doesn't exist, or you will not display the midnight hour twice (or
whatever the rules are for your particular timezone). I'd urge you to use
Joda or java.util.Calendar or similar to obviate the need to think about
this stuff too hard.

Regards,

Al

On Tue, Apr 1, 2008 at 7:26 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:

> Since it wasn't there, I extended DropDownChoice to encapsulate the whole
> name/value pair thing:
>
> package ...helper.ui;
>
> import java.util.ArrayList;
> import java.util.List;
> import java.util.Map;
>
> import org.apache.wicket.markup.html.form.ChoiceRenderer;
> import org.apache.wicket.markup.html.form.DropDownChoice;
> import org.apache.wicket.model.AbstractPropertyModel;
>
> public class EasyDropDownChoice extends DropDownChoice
> {
>public EasyDropDownChoice(String componentId, AbstractPropertyModel
> model, String[][] options)
>{
>this(componentId, model, toList(options));
>}
>
>public EasyDropDownChoice(String componentId, AbstractPropertyModel
> model, Map options)
>{
>this(componentId, model, toList(options));
>}
>
>public EasyDropDownChoice(String componentId, AbstractPropertyModel
> model, List options)
>{
>super(componentId, model, options, new
> ChoiceRenderer("value", "id"));
>}
>
>private static List toList(String[][] choices)
>{
>ArrayList options = new
> ArrayList();
>
>for (int n = 0; n < choices.length; n++)
>{
>options.add(new NameValuePair(choices[n][0],
> choices[n][1]));
>}
>
>return options;
>}
>
>private static List toList(Map
> choices)
>{
>ArrayList options = new
> ArrayList();
>
>for (String key: choices.keySet())
>{
>options.add(new NameValuePair(key, choices.get
> (key)));
>}
>
>return options;
>}
> }
>
> Which depends on:
>
> package ***.*..helper.ui;
>
> import java.io.Serializable;
>
> public class NameValuePair implements Serializable
> {
>private String id;
>private String value;
>
>public NameValuePair(String id, String value)
>{
>this.id = id;
>this.value = value;
>}
>
>public String getId()
>{
>return id;
>}
>
>public void setId(String id)
>{
>this.id = id;
>}
>
>public String getValue()
>{
>return value;
>}
>
>public void setValue(String value)
>{
>this.value = value;
>}
>
> }
>
> To initialize it with an array of choices, you now just have to do this:
>
> String[][] eventTimes = new String[][] { {"7:00:00", "7:00 AM"},
>
>   {"8:00:00", "8:00 AM"},
>
>   {"9:00:00", "9:00 AM"},
>
>   {"10:00:00", "10:00 AM"},
>
>   {"11:00:00", "11:00 AM"},
>
>   {"12:00:00", "12:00 PM"},
>
>   {"13:00:00", "1:00 PM"},
>
>   {"14:00:00", "2:00 PM"},
>
>   {"15:00:00", "3:00 PM"},
>
>   {"16:00:00", "4:00 PM"},
>
>   {"17:00:00", "5:00 PM"},
>
>   {"18:00:00", "6:00 PM"} };
>
> add(new EasyDropDownChoice("eventTime", new PropertyModel(this,
> "eventTime"), eventTimes));
>
> You can construct it with either a nested string array or a Map. Just have
> to make sure the property it's bound to is of type NameValuePair.
>
> -Andrew
>
> ___

Re: Question on page inheritance...

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael

It's your webapplication that takes the ISecurityStrategy..

public class ZeuzGroupApplication extends WebApplication {

   private SpringComponentInjector springComponentInjector;

   @Override
   protected void init() {
   super.init();
//getSecuritySettings().setAuthorizationStrategy(
//new RoleAuthorizationStrategy(new UserRolesAuthorizer()));
   getSecuritySettings().setAuthorizationStrategy(
   new ZeuzSecurity(ZeuzAuthorizedPage.class, 
LoginPage.class) {

   @Override
   protected boolean isAuthorized(Class pageClass) {
   return (((ZeuzSession) 
Session.get()).isAuthorized());

   }
   });
...

Bruce Petro wrote:

Thanks to the replies I received... yeah I didn't say it well, but I
assumed the user would be kept in the session and that seems to fit
everyone's reply. On top of that, I think I'm hearing I can use
inheritance and have every page utilize ISecurityStrategy to then
control access to the page.

I'll check into it and see if I've got that all correct.  Thanks again.


-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 1:49 PM

To: users@wicket.apache.org
Subject: Re: Question on page inheritance...

True, as Igor wrote this is meant to be in conjuction with at 
ISecurityStrategy.


Nino Saturnino Martinez Vazquez Wael wrote:
  
You could actually also do this another way... Im using markup 
inheritance alot, but I stuff user object into the session like this:


See a nice view here:
http://papernapkin.org/pastebin/view/281/

package zeuzgroup.application;

import javax.servlet.http.HttpSession;

import org.apache.wicket.Application;
import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebRequest;
import org.apache.wicket.protocol.http.WebSession;

import zeuzgroup.core.Person;
import zeuzgroup.core.user.UserType;

public class ZeuzSession extends WebSession {

   private boolean authorized = false;

   private Person person;

   private HttpSession httpSession;

   protected ZeuzSession(Application application, Request request) {
   super(application, request);
   httpSession = ((WebRequest) request).getHttpServletRequest()
   .getSession();

   }

   public boolean isAuthorized() {
   return authorized;
   }

   public void setAuthorized(boolean authorized) {

   this.authorized = authorized;
   if (authorized) {

   httpSession.setAttribute("sso.password.attribute", person
   .getPassword());
   httpSession.setAttribute("sso.email.attribute", 
person.getEmail());

   httpSession.setAttribute("password", person.getPassword());
   httpSession.setAttribute("email", person.getEmail());

   } else {
   httpSession.setAttribute("sso.password.attribute", null);
   httpSession.setAttribute("sso.email.attribute", null);
   }
   }

   public Person getPerson() {
   if (person != null) {
   return person;
   } else {
   Person person = new Person();
   person.setUserType(UserType.Guest);
   return person;
   }
   }

   public void setPerson(Person person) {
   this.person = person;
   }

}


Bruce Petro wrote:


I'm just getting started in wicket, so forgive me if this is a
  

too-dumb
  

question...

 


I know wicket can check the session for a user to ask a "user" object
  

if
  

it is logged in.

However, you don't really want to paste code on every page.

What is the best way, to have each page inherit the base "security
check" routine?

 


Would you create a BasePage extends WebPage and put the logic there
  

and
  

have all other pages extend BasePage?

Or would you attach some sort of a command object to each page and
  

put
  

the logic in that?

 


Anyone have a reference to an example of code to do this?

 


THANKS!

 

 

 



  
  


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question on page inheritance...

2008-04-01 Thread Bruce Petro
Thanks to the replies I received... yeah I didn't say it well, but I
assumed the user would be kept in the session and that seems to fit
everyone's reply. On top of that, I think I'm hearing I can use
inheritance and have every page utilize ISecurityStrategy to then
control access to the page.

I'll check into it and see if I've got that all correct.  Thanks again.


-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 1:49 PM
To: users@wicket.apache.org
Subject: Re: Question on page inheritance...

True, as Igor wrote this is meant to be in conjuction with at 
ISecurityStrategy.

Nino Saturnino Martinez Vazquez Wael wrote:
> You could actually also do this another way... Im using markup 
> inheritance alot, but I stuff user object into the session like this:
>
> See a nice view here:
> http://papernapkin.org/pastebin/view/281/
>
> package zeuzgroup.application;
>
> import javax.servlet.http.HttpSession;
>
> import org.apache.wicket.Application;
> import org.apache.wicket.Request;
> import org.apache.wicket.protocol.http.WebRequest;
> import org.apache.wicket.protocol.http.WebSession;
>
> import zeuzgroup.core.Person;
> import zeuzgroup.core.user.UserType;
>
> public class ZeuzSession extends WebSession {
>
>private boolean authorized = false;
>
>private Person person;
>
>private HttpSession httpSession;
>
>protected ZeuzSession(Application application, Request request) {
>super(application, request);
>httpSession = ((WebRequest) request).getHttpServletRequest()
>.getSession();
>
>}
>
>public boolean isAuthorized() {
>return authorized;
>}
>
>public void setAuthorized(boolean authorized) {
>
>this.authorized = authorized;
>if (authorized) {
>
>httpSession.setAttribute("sso.password.attribute", person
>.getPassword());
>httpSession.setAttribute("sso.email.attribute", 
> person.getEmail());
>httpSession.setAttribute("password", person.getPassword());
>httpSession.setAttribute("email", person.getEmail());
>
>} else {
>httpSession.setAttribute("sso.password.attribute", null);
>httpSession.setAttribute("sso.email.attribute", null);
>}
>}
>
>public Person getPerson() {
>if (person != null) {
>return person;
>} else {
>Person person = new Person();
>person.setUserType(UserType.Guest);
>return person;
>}
>}
>
>public void setPerson(Person person) {
>this.person = person;
>}
>
> }
>
>
> Bruce Petro wrote:
>> I'm just getting started in wicket, so forgive me if this is a
too-dumb
>> question...
>>
>>  
>>
>> I know wicket can check the session for a user to ask a "user" object
if
>> it is logged in.
>>
>> However, you don't really want to paste code on every page.
>>
>> What is the best way, to have each page inherit the base "security
>> check" routine?
>>
>>  
>>
>> Would you create a BasePage extends WebPage and put the logic there
and
>> have all other pages extend BasePage?
>>
>> Or would you attach some sort of a command object to each page and
put
>> the logic in that?
>>
>>  
>>
>> Anyone have a reference to an example of code to do this?
>>
>>  
>>
>> THANKS!
>>
>>  
>>
>>  
>>
>>  
>>
>>
>>   
>

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ListView with a Set instead of a List

2008-04-01 Thread Al Maw
// Simply:
IModel listModel = new AbstractReadOnlyModel() {
public Object getObject() {
return new ArrayList(mySet);
}
};

// Or if you want to wrap a property model (not that this is as nice):
IModel listModel = new PropertyModel(bean, "mySetHere") {
public Object getObject() {
return new ArrayList((Set)super.getObject());
}
};

// Then just:
new ListView("foo", listModel) {
public void populateItem(ListItem item) {
// ...
}
};



In your original code you go:
return Collections.unmodifiableSet(new
LinkedHashSet(m_functionSettings))

Which seems rather complex. If you're going to give the user a copy, why do
you care if they modify it? If you're building this all just for Wicket,
then you're quite mad and should figure out a way to make this much simpler.

You ought to think about your API contracts. If you're relying on your Set
being sorted in order to have it make sense in Wicket (which it seems you
are, given you've implemented this using a LinkedHashSet internally) then
you should expose it as a SortedSet through the API.

You could then either use a RepeatingView to display the items (which would
be trivial) or write a little model wrapping class that converts a List to a
SortedSet and back again. If you're only going to use the set as a read-only
data source for Wicket, and you're going to update the underlying set object
in your other code (e.g. onClick handlers) then you can get away with just
wrapping it as in my provided code.

Regards,

Alastair

On Tue, Apr 1, 2008 at 6:03 PM, reikje <[EMAIL PROTECTED]> wrote:

>
> 1> True, but why is it important that is has to be the same collection? I
> only care about changes being propagated to the ListItems, I don't care if
> they are contained in a Set within the Model or in a List given to the
> ListView. In other words, if you are saying, that you have to give the
> same
> List from the Model to the ListView, means you cannot render a Model
> object
> with a Set using a ListView. This is quite a restriction you have to be
> aware of then I think. We choosed the Set on purpose to avoid duplicates,
> there must be a way to render the contents of a Set using any Repeater
> component.
>
> 2> Yes, in my code snippet where it says "// getModelObject and save" this
> is very I call getModelObject().
>
>
>
> Johan Compagner wrote:
> >
> > 1> because you dont have that detacheable list in the listview?? You
> > are just giving a ArrayList directly to the listview
> >
> > 2> i dont see exactly where you call getModelObject on in onsubmit but
> > i guess thats on page? Then it is loaded yes, this has nothing to do
> > with the listview model.
> >
> > On 3/28/08, reikje <[EMAIL PROTECTED]> wrote:
> >>
> >> I have a rather specific question about a problem I am having. We have
> a
> >> domain object (OperatorSyncConfig) that we need to diplay in a page.
> That
> >> object contain a Set of FunctionSetting objects which I want to render
> in
> >> a
> >> ListView. For each ListItem (FunctionSetting) it should be possible to
> >> change the timeout value and then with one Form submit save the whole
> >> OperatorSyncConfig objects. Here is a snippet of the objects:
> >>
> >> public class OperatorSyncConfig implements Serializable
> >> {
> >> private Set m_functionSettings = new
> >> LinkedHashSet();
> >>
> >> public Set getFunctionSettings()
> >> {
> >> return Collections.unmodifiableSet(new
> >> LinkedHashSet(m_functionSettings));
> >> }
> >>
> >> .. no setter method for the set, just single add and remove
> accessors
> >> }
> >>
> >> public class FunctionSetting implements Serializable
> >> {
> >> private Long m_timeoutInMilliseconds;
> >> .. get and set for that
> >> }
> >>
> >>
> >> The WebPage looks in short like that:
> >>
> >> public class EditOperatorPage extends WebPage
> >> {
> >>  LoadableDetachableModel model = new LoadableDetachableModel() {
> ...
> >> }
> >> // load the OperatorSyncConfig
> >>  setModel(model);
> >>
> >>  Form updateDeleteForm = new Form("updateForm") {
> >> @Override
> >> protected void onSubmit() {
> >>// getModelObject and save
> >> }
> >>  };
> >>
> >>  OperatorSyncConfig operatorSyncConfig = (OperatorSyncConfig)
> >> getModelObject();
> >>  Set settingsAsSet =
> >> operatorSyncConfig.getFunctionSettings();
> >>  List settings = new
> >> ArrayList(settingsAsSet);
> >>
> >>  updateDeleteForm.add(new ListView("operatorFunctionsList",
> settings)
> >> {
> >> @Override
> >> protected void populateItem(ListItem item)
> >> {
> >> FunctionSetting functionSetting = (FunctionSetting)
> >> item.getModelObject();
> >>
> >> item.add(new TextField("Timeout", new
> >> PropertyModel(functionSetting, "timeoutInMilliseconds")));
> >> }
> >> });
> >>
> >>
> >> }
> >>
> >> The 

RE: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
Since it wasn't there, I extended DropDownChoice to encapsulate the whole 
name/value pair thing:

package ...helper.ui;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.model.AbstractPropertyModel;

public class EasyDropDownChoice extends DropDownChoice
{
public EasyDropDownChoice(String componentId, AbstractPropertyModel 
model, String[][] options)
{
this(componentId, model, toList(options));
}

public EasyDropDownChoice(String componentId, AbstractPropertyModel 
model, Map options)
{
this(componentId, model, toList(options));
}

public EasyDropDownChoice(String componentId, AbstractPropertyModel 
model, List options)
{
super(componentId, model, options, new ChoiceRenderer("value", 
"id"));
}

private static List toList(String[][] choices)
{
ArrayList options = new 
ArrayList();

for (int n = 0; n < choices.length; n++)
{
options.add(new NameValuePair(choices[n][0], 
choices[n][1]));
}

return options;
}

private static List toList(Map choices)
{
ArrayList options = new 
ArrayList();

for (String key: choices.keySet())
{
options.add(new NameValuePair(key, choices.get(key)));
}

return options;
}
}

Which depends on:

package ***.*..helper.ui;

import java.io.Serializable;

public class NameValuePair implements Serializable
{
private String id;
private String value;

public NameValuePair(String id, String value)
{
this.id = id;
this.value = value;
}

public String getId()
{
return id;
}

public void setId(String id)
{
this.id = id;
}

public String getValue()
{
return value;
}

public void setValue(String value)
{
this.value = value;
}

}

To initialize it with an array of choices, you now just have to do this:

String[][] eventTimes = new String[][] { {"7:00:00", "7:00 AM"},

 {"8:00:00", "8:00 AM"},

 {"9:00:00", "9:00 AM"},

 {"10:00:00", "10:00 AM"},

 {"11:00:00", "11:00 AM"},

 {"12:00:00", "12:00 PM"},

 {"13:00:00", "1:00 PM"},

 {"14:00:00", "2:00 PM"},

 {"15:00:00", "3:00 PM"},

 {"16:00:00", "4:00 PM"},

 {"17:00:00", "5:00 PM"},

 {"18:00:00", "6:00 PM"} };

add(new EasyDropDownChoice("eventTime", new PropertyModel(this, "eventTime"), 
eventTimes));

You can construct it with either a nested string array or a Map. Just have to 
make sure the property it's bound to is of type NameValuePair.

-Andrew

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
fr

Calling a JS function from onNodeLinkClicked in a Tree?

2008-04-01 Thread webchick

Hi all,
I'm using a Tree for navigation and I have a need to load an external page
in a new window when a link is clicked in the tree.  I was hoping to put
something in the onNodeLinkClicked function for my tree that could
create/call a JS function to load the URL in a new window as required.  This
does not need to be done for the entire tree structure, so I need to be able
to set up this functionality for specified nodes only.  Is there a way to do
this?  

I have read the JS related article on the wiki (
http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html
http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html
), but I don't see how to add this to only a few nodes in a tree.

Here's my tree definition:

private Tree getTree()
{
  final Tree linkTree = new Tree("navTree", createNavigationTreeModel())
  {
private static final long serialVersionUID = -4646756742893751770L;

@Override
protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode
node)
{
  // If this is a MenuItem, reload content.
  if (((DefaultMutableTreeNode) node).getUserObject() instanceof
MenuItem)
  {
MenuItem menuItem = (MenuItem) ((DefaultMutableTreeNode)
node).getUserObject();
Panel contentPanel = menuItem.getContent();
contentPanel.setOutputMarkupId(true);

MenuPanel.this.getParent().replace(contentPanel);
target.addComponent(contentPanel);
  }
  else if (((DefaultMutableTreeNode) node).getUserObject() instanceof
Menu)
  {
Menu menu = (Menu) ((DefaultMutableTreeNode) node).getUserObject();

// Use Javascript to open new window?  Get URL from menu object.  
  }

  getTreeState().selectNode(node, true);
  super.onNodeLinkClicked(target, node);
}
  };

  linkTree.setRootLess(true);
  linkTree.setOutputMarkupId(true);
  return linkTree;
}

The if(MenuItem) replace portion works great, it's the else if(Menu) part
that has me stuck.  Thanks in advance for any suggestions or comments.
-- Amanda
-- 
View this message in context: 
http://www.nabble.com/Calling-a-JS-function-from-onNodeLinkClicked-in-a-Tree--tp16420093p16420093.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing non-Wicket JavaScript variables inside Wicket

2008-04-01 Thread Alastair Maw
Your questions are rather too specific to be of much use without the code
itself.

How are you making the call back to Wicket? Are you writing your own
AjaxBehavior?

If so, AbstractDefaultAjaxBehavior, which most of the Wicket AJAX
functionality extends, uses getCallbackScript(boolean) to generate the
wicketAjaxGet(...) bit of javascript. That function internally calls
getCallbackUrl(boolean). You can override this function in your behavior and
add some GET params on the end (return super.getCallbackUrl(...) +
"&foo=bar"). You can then retrieve these from your respond method with
RequestCycle.get().getRequest().getParameter("foo").

For some example code, see the list editor at http://londonwicket.org

Regards,

Alastair

On Tue, Apr 1, 2008 at 6:28 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I wrote a file uploader that works inside a Wicket modal window based on
> jQuery. Here's the original PHP based framework I based my work on:
>
> http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
>
> It's up and running (took some tweaking to say the least), but I am
> still facing one hurdle:
>
> The file processing on the backend is done via a regular Wicket page.
> After verifying and saving the file it responds back with either an
> error or success JSON message that's sent back to my JavaScript function
> which originated the AJAX call. This way I can pop up alerts and advice
> the user if there are problems. So far so good.
>
> The problem I have is that I need to also bounce back the image id,
> since it needs to be further processed inside my Wicket panel. So, let's
> say I stick that id into my JSON message, and that it's available inside
> my JavaScript function that handles the success/failure function. What
> would be an elegant way to access that id from within Wicket? Again,
> remember that this whole image uploader is outside the Wicket framework.
> I would like to grab that id in my setCloseButtonCallback method after
> the modal has been closed.
>
> Any ideas would be greatly appreciated.
>
> Thanks!
>
> Michael
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Wizard seems to cache pages even on model change

2008-04-01 Thread Dan Kaplan
Hello,

Here is my scenario.  I have a 2 page Wizard.  The first page asks you to
type in the primary key of a table.  If that row already exists in the
table, the second page gets loaded with the rest of that row's data.  So, in
summary, the first page of the wizard should be able to populate the second
page.  

But here's my problem: The first page only populates the 2nd page if I
haven't visited the second page yet.  If, on the second page, I click the
"previous" button and then pick a new primary key, when I visit the 2nd page
again, the input fields are not updated.  I've used the debugger to see that
the Model Object *is* being updated.

I can't figure out why this is happening.  I only use PropertyModels (those
are dynamic models, right?).  I can only guess that the Wizard serializes
the steps you've visited and doesn't check if the model has changed when you
go back to them.

One last thing that may be revealing: One of the things that second page
displays is a listview of fields.  If the second primary key I pick has more
items in the list than the first one, the extra items do get populated on
the page.  IE: First pk has 3 items.  Second pk has 4 items.  The second
page will have the correct 4th item in the list but the first 3 will be of
the first pk.

Here is my code in a pastebin: http://pastebin.org/26606

Here is my code inlined into the email:

package com.haverlocke.tellah.web.component;

import com.haverlocke.tellah.model.dao.WebsiteDao;
import com.haverlocke.tellah.model.dao.WebsiteHistoryDao;
import com.haverlocke.tellah.model.dto.LinkDto;
import com.haverlocke.tellah.model.dto.WebsiteDto;
import com.haverlocke.tellah.web.model.TellahUrlValidator;
import com.haverlocke.tellah.web.page.HomePage;
import com.haverlocke.tellah.web.util.SimilarWebsiteUtil;
import com.haverlocke.tellah.web.component.recaptcha.ReCaptchaPanel;
import net.databinder.components.AjaxOnKeyPausedUpdater;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.behavior.HeaderContributor;
import org.apache.wicket.extensions.wizard.Wizard;
import org.apache.wicket.extensions.wizard.WizardModel;
import org.apache.wicket.extensions.wizard.WizardStep;
import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.feedback.IFeedbackMessageFilter;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.apache.wicket.PageParameters;
import org.apache.wicket.Component;

import java.util.List;

/**
 * @author Daniel Kaplan
 * @since 7.10.5
 */
public class SubmitWizard extends Wizard {

private static final String PUBLIC_DEV = "fake";
private static final String PRIVATE_DEV = "fake";

@SpringBean
private WebsiteDao websiteDao;

@SpringBean
private WebsiteHistoryDao websiteHistoryDao;

private WebsiteDto websiteDto = new WebsiteDto();
private Label note;
private String noteString;
private boolean insert;

public SubmitWizard(String id, PageParameters pp) {
super(id, false);

insert = pp.getString("websiteName") == null ||
"".equals(pp.getString("websiteName"));

WizardModel model = new WizardModel();
model.add(new WebsiteName());

WebsiteDetails websiteDetails = new WebsiteDetails();
model.add(websiteDetails);

init(model);

websiteDetails.addReCaptchaPanel();

initPage(pp.getString("websiteName"));
}

@Override
public void onFinish() {
new WizardFinishedAction(new PropertyModel(this, "websiteDto"),
getPage()).onSubmit();
}

@Override
public void onCancel() {
setRedirect(true);
setResponsePage(HomePage.class);
}

@Override
protected FeedbackPanel newFeedbackPanel(String id) {
return new FeedbackPanel(id, new IFeedbackMessageFilter() {
public boolean accept(FeedbackMessage message) {
//never show anything.  We show all messages in a different
panel defined in the WizardPage.java
return false;
}
});
}

private class WebsiteName extends WizardStep {

public WebsiteName() {

add(HeaderContributor.forCss("images/submit.css"));

if (insert) {
add(new Label("formHeader", "Set the name"));
} else {
add(new Label("formHeader", "Edit the name"));
}

TextField name = new TextField("name", new
PropertyModel(websiteDto, "name"));
add(name.setRequired(true).add(new WebsiteLoadBehavior()));

note = new Label("note", new Propert

Re: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Ryan Gravener
set the choicerenderer

setChoiceRenderer(new IChoiceRenderer() {
public Object getDisplayValue(Object object) {
return ((MyEnum) object).getTime();
}

public String getIdValue(Object object, int index) {
return String.valueOf(((MyEnum) object).ordinal());
}
});

On Tue, Apr 1, 2008 at 1:53 PM, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> Wicket 1.3 does not have a class called SelectOption. I downloade Wicket 
> Extension to obtain it, but found it to be incompatible with Wicket 1.3.
>
>  -Andrew
>
>
>  -Original Message-
>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
>
>
> Sent: Tuesday, April 01, 2008 12:26 PM
>  To: users@wicket.apache.org
>  Subject: Re: Simplest way to do name-value pairs in DropDownChoice
>
>  Its just a class with a get/set Value and Id
>
>  j
>
>  On Tue, Apr 1, 2008 at 12:50 PM, Andrew Broderick <[EMAIL PROTECTED]>
>  wrote:
>
>  > I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got
>  > the latest Extensions, but seem to be getting errors.
>  >
>  > Thanks
>  >
>  > -Original Message-
>  > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
>  > Sent: Tuesday, April 01, 2008 11:17 AM
>  > To: users@wicket.apache.org
>  > Subject: Re: Simplest way to do name-value pairs in DropDownChoice
>  >
>  > I think you are going to have to use a ChoiceRenderer. It's really not
>  > that
>  > complicated. Check out
>  >
>  >
>  > 
> http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html
>  >
>  > Jeremy
>  >
>  > On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick <[EMAIL PROTECTED]>
>  > wrote:
>  >
>  > > Hi,
>  > >
>  > > I have looked around at several examples of using DropDownChoice. I see
>  > it
>  > > is a very flexible component, with models, IChoiceRenderers and so on.
>  > But,
>  > > I just want to pass it simple name/value pairs to use, with a minimum of
>  > > fuss. Surely there must be an easy way to do this, since this is
>  > probably
>  > > the main use case for this component. My pairs are just:
>  > >
>  > >  All Day
>  > >  7:00AM
>  > >  8:00AM
>  > >  9:00AM
>  > >  10:00AM
>  > >  11:00AM
>  > >  12:00PM
>  > >  1:00PM
>  > >  2:00PM
>  > >  3:00PM
>  > >  4:00PM
>  > >  5:00PM
>  > >  6:00PM
>  > >
>  > > In HTML. What is the simplest possible way to use these with
>  > > DropDownChoice?
>  > >
>  > > Thanks.
>  > >
>  > >
>  > > ___
>  > >
>  > > The  information in this email or in any file attached
>  > > hereto is intended only for the personal and confiden-
>  > > tial  use  of  the individual or entity to which it is
>  > > addressed and may contain information that is  propri-
>  > > etary  and  confidential.  If you are not the intended
>  > > recipient of this message you are hereby notified that
>  > > any  review, dissemination, distribution or copying of
>  > > this message is strictly prohibited.  This  communica-
>  > > tion  is  for information purposes only and should not
>  > > be regarded as an offer to sell or as  a  solicitation
>  > > of an offer to buy any financial product. Email trans-
>  > > mission cannot be guaranteed to be  secure  or  error-
>  > > free. P6070214
>  > >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Ryan Gravener
http://ryangravener.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
Wicket 1.3 does not have a class called SelectOption. I downloade Wicket 
Extension to obtain it, but found it to be incompatible with Wicket 1.3.

-Andrew

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
Sent: Tuesday, April 01, 2008 12:26 PM
To: users@wicket.apache.org
Subject: Re: Simplest way to do name-value pairs in DropDownChoice

Its just a class with a get/set Value and Id

j

On Tue, Apr 1, 2008 at 12:50 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:

> I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got
> the latest Extensions, but seem to be getting errors.
>
> Thanks
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
> Sent: Tuesday, April 01, 2008 11:17 AM
> To: users@wicket.apache.org
> Subject: Re: Simplest way to do name-value pairs in DropDownChoice
>
> I think you are going to have to use a ChoiceRenderer. It's really not
> that
> complicated. Check out
>
>
> http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html
>
> Jeremy
>
> On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > I have looked around at several examples of using DropDownChoice. I see
> it
> > is a very flexible component, with models, IChoiceRenderers and so on.
> But,
> > I just want to pass it simple name/value pairs to use, with a minimum of
> > fuss. Surely there must be an easy way to do this, since this is
> probably
> > the main use case for this component. My pairs are just:
> >
> >  All Day
> >  7:00AM
> >  8:00AM
> >  9:00AM
> >  10:00AM
> >  11:00AM
> >  12:00PM
> >  1:00PM
> >  2:00PM
> >  3:00PM
> >  4:00PM
> >  5:00PM
> >  6:00PM
> >
> > In HTML. What is the simplest possible way to use these with
> > DropDownChoice?
> >
> > Thanks.
> >
> >
> > ___
> >
> > The  information in this email or in any file attached
> > hereto is intended only for the personal and confiden-
> > tial  use  of  the individual or entity to which it is
> > addressed and may contain information that is  propri-
> > etary  and  confidential.  If you are not the intended
> > recipient of this message you are hereby notified that
> > any  review, dissemination, distribution or copying of
> > this message is strictly prohibited.  This  communica-
> > tion  is  for information purposes only and should not
> > be regarded as an offer to sell or as  a  solicitation
> > of an offer to buy any financial product. Email trans-
> > mission cannot be guaranteed to be  secure  or  error-
> > free. P6070214
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on page inheritance...

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael
True, as Igor wrote this is meant to be in conjuction with at 
ISecurityStrategy.


Nino Saturnino Martinez Vazquez Wael wrote:
You could actually also do this another way... Im using markup 
inheritance alot, but I stuff user object into the session like this:


See a nice view here:
http://papernapkin.org/pastebin/view/281/

package zeuzgroup.application;

import javax.servlet.http.HttpSession;

import org.apache.wicket.Application;
import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebRequest;
import org.apache.wicket.protocol.http.WebSession;

import zeuzgroup.core.Person;
import zeuzgroup.core.user.UserType;

public class ZeuzSession extends WebSession {

   private boolean authorized = false;

   private Person person;

   private HttpSession httpSession;

   protected ZeuzSession(Application application, Request request) {
   super(application, request);
   httpSession = ((WebRequest) request).getHttpServletRequest()
   .getSession();

   }

   public boolean isAuthorized() {
   return authorized;
   }

   public void setAuthorized(boolean authorized) {

   this.authorized = authorized;
   if (authorized) {

   httpSession.setAttribute("sso.password.attribute", person
   .getPassword());
   httpSession.setAttribute("sso.email.attribute", 
person.getEmail());

   httpSession.setAttribute("password", person.getPassword());
   httpSession.setAttribute("email", person.getEmail());

   } else {
   httpSession.setAttribute("sso.password.attribute", null);
   httpSession.setAttribute("sso.email.attribute", null);
   }
   }

   public Person getPerson() {
   if (person != null) {
   return person;
   } else {
   Person person = new Person();
   person.setUserType(UserType.Guest);
   return person;
   }
   }

   public void setPerson(Person person) {
   this.person = person;
   }

}


Bruce Petro wrote:

I'm just getting started in wicket, so forgive me if this is a too-dumb
question...

 


I know wicket can check the session for a user to ask a "user" object if
it is logged in.

However, you don't really want to paste code on every page.

What is the best way, to have each page inherit the base "security
check" routine?

 


Would you create a BasePage extends WebPage and put the logic there and
have all other pages extend BasePage?

Or would you attach some sort of a command object to each page and put
the logic in that?

 


Anyone have a reference to an example of code to do this?

 


THANKS!

 

 

 



  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on page inheritance...

2008-04-01 Thread Per Newgro
Can you check the mailing-list by search the following topic 
"Where to apply a general security policy" 
- there much strategies are explained (or links can be found).

Cheers
Per

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on page inheritance...

2008-04-01 Thread Igor Vaynberg
such a check belongs in ISecurityStrategy and not really in your page
hierarchy. see wicket-auth-roles for examples.

-igor


On Tue, Apr 1, 2008 at 10:28 AM, Bruce Petro <[EMAIL PROTECTED]> wrote:
> I'm just getting started in wicket, so forgive me if this is a too-dumb
>  question...
>
>
>
>  I know wicket can check the session for a user to ask a "user" object if
>  it is logged in.
>
>  However, you don't really want to paste code on every page.
>
>  What is the best way, to have each page inherit the base "security
>  check" routine?
>
>
>
>  Would you create a BasePage extends WebPage and put the logic there and
>  have all other pages extend BasePage?
>
>  Or would you attach some sort of a command object to each page and put
>  the logic in that?
>
>
>
>  Anyone have a reference to an example of code to do this?
>
>
>
>  THANKS!
>
>
>
>
>
>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on page inheritance...

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael
You could actually also do this another way... Im using markup 
inheritance alot, but I stuff user object into the session like this:


See a nice view here:
http://papernapkin.org/pastebin/view/281/

package zeuzgroup.application;

import javax.servlet.http.HttpSession;

import org.apache.wicket.Application;
import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebRequest;
import org.apache.wicket.protocol.http.WebSession;

import zeuzgroup.core.Person;
import zeuzgroup.core.user.UserType;

public class ZeuzSession extends WebSession {

   private boolean authorized = false;

   private Person person;

   private HttpSession httpSession;

   protected ZeuzSession(Application application, Request request) {
   super(application, request);
   httpSession = ((WebRequest) request).getHttpServletRequest()
   .getSession();

   }

   public boolean isAuthorized() {
   return authorized;
   }

   public void setAuthorized(boolean authorized) {

   this.authorized = authorized;
   if (authorized) {

   httpSession.setAttribute("sso.password.attribute", person
   .getPassword());
   httpSession.setAttribute("sso.email.attribute", 
person.getEmail());

   httpSession.setAttribute("password", person.getPassword());
   httpSession.setAttribute("email", person.getEmail());

   } else {
   httpSession.setAttribute("sso.password.attribute", null);
   httpSession.setAttribute("sso.email.attribute", null);
   }
   }

   public Person getPerson() {
   if (person != null) {
   return person;
   } else {
   Person person = new Person();
   person.setUserType(UserType.Guest);
   return person;
   }
   }

   public void setPerson(Person person) {
   this.person = person;
   }

}


Bruce Petro wrote:

I'm just getting started in wicket, so forgive me if this is a too-dumb
question...

 


I know wicket can check the session for a user to ask a "user" object if
it is logged in.

However, you don't really want to paste code on every page.

What is the best way, to have each page inherit the base "security
check" routine?

 


Would you create a BasePage extends WebPage and put the logic there and
have all other pages extend BasePage?

Or would you attach some sort of a command object to each page and put
the logic in that?

 


Anyone have a reference to an example of code to do this?

 


THANKS!

 

 

 



  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple Wicket Servlets in same web application

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael
I guess you have tried using something like Jmeter to simulate a 
stressing environment? It could be a lot of stuff that clutters it up, 
like database acesss etc...


How does your filter mapping look like?

-regards Nino

Niels Bo wrote:

Hi

We have two WicketServlets/Applications in the same web application(war) and
that
has worked fine until we deployed on the big production server (Weblogic
10).

What we see now is that the homepage from application A is sometime showing
up
as response to request on urls that belong to the application B!
It is not a redirection. It is really the response that does not match the
url requested,
and we have it logged and documented with "Fiddler".

It looks just as if Application A is "stuck" to a worker thread (in its
ThreadLocal current), but looking at the wicket source we cant see how that
should happen. 


This right now happens for maybe 10% of the requests on the production
server, while have only been able to recreate it once a day on a development
server, so that makes it difficult to debug.

Any suggestions where and how to look for the error?
Is there a place where we can add an extra check to catch if the Application
is stuck on a worker thread?

Niels
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on page inheritance...

2008-04-01 Thread Maurice Marrink
Creating a BasePage and have every other page extend from it it the
preferred way. Your BasePage can but is not required to provide a base
markup.
See http://wicket.apache.org/examplemarkupinheritance.html

Maurice

On Tue, Apr 1, 2008 at 7:28 PM, Bruce Petro <[EMAIL PROTECTED]> wrote:
> I'm just getting started in wicket, so forgive me if this is a too-dumb
>  question...
>
>
>
>  I know wicket can check the session for a user to ask a "user" object if
>  it is logged in.
>
>  However, you don't really want to paste code on every page.
>
>  What is the best way, to have each page inherit the base "security
>  check" routine?
>
>
>
>  Would you create a BasePage extends WebPage and put the logic there and
>  have all other pages extend BasePage?
>
>  Or would you attach some sort of a command object to each page and put
>  the logic in that?
>
>
>
>  Anyone have a reference to an example of code to do this?
>
>
>
>  THANKS!
>
>
>
>
>
>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing non-Wicket JavaScript variables inside Wicket

2008-04-01 Thread Michael Mehrle
I wrote a file uploader that works inside a Wicket modal window based on
jQuery. Here's the original PHP based framework I based my work on:

http://www.phpletter.com/Demo/AjaxFileUpload-Demo/

It's up and running (took some tweaking to say the least), but I am
still facing one hurdle:

The file processing on the backend is done via a regular Wicket page.
After verifying and saving the file it responds back with either an
error or success JSON message that's sent back to my JavaScript function
which originated the AJAX call. This way I can pop up alerts and advice
the user if there are problems. So far so good.

The problem I have is that I need to also bounce back the image id,
since it needs to be further processed inside my Wicket panel. So, let's
say I stick that id into my JSON message, and that it's available inside
my JavaScript function that handles the success/failure function. What
would be an elegant way to access that id from within Wicket? Again,
remember that this whole image uploader is outside the Wicket framework.
I would like to grab that id in my setCloseButtonCallback method after
the modal has been closed.

Any ideas would be greatly appreciated.

Thanks!

Michael



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Jeremy Levy
Its just a class with a get/set Value and Id

j

On Tue, Apr 1, 2008 at 12:50 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:

> I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got
> the latest Extensions, but seem to be getting errors.
>
> Thanks
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
> Sent: Tuesday, April 01, 2008 11:17 AM
> To: users@wicket.apache.org
> Subject: Re: Simplest way to do name-value pairs in DropDownChoice
>
> I think you are going to have to use a ChoiceRenderer. It's really not
> that
> complicated. Check out
>
>
> http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html
>
> Jeremy
>
> On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > I have looked around at several examples of using DropDownChoice. I see
> it
> > is a very flexible component, with models, IChoiceRenderers and so on.
> But,
> > I just want to pass it simple name/value pairs to use, with a minimum of
> > fuss. Surely there must be an easy way to do this, since this is
> probably
> > the main use case for this component. My pairs are just:
> >
> >  All Day
> >  7:00AM
> >  8:00AM
> >  9:00AM
> >  10:00AM
> >  11:00AM
> >  12:00PM
> >  1:00PM
> >  2:00PM
> >  3:00PM
> >  4:00PM
> >  5:00PM
> >  6:00PM
> >
> > In HTML. What is the simplest possible way to use these with
> > DropDownChoice?
> >
> > Thanks.
> >
> >
> > ___
> >
> > The  information in this email or in any file attached
> > hereto is intended only for the personal and confiden-
> > tial  use  of  the individual or entity to which it is
> > addressed and may contain information that is  propri-
> > etary  and  confidential.  If you are not the intended
> > recipient of this message you are hereby notified that
> > any  review, dissemination, distribution or copying of
> > this message is strictly prohibited.  This  communica-
> > tion  is  for information purposes only and should not
> > be regarded as an offer to sell or as  a  solicitation
> > of an offer to buy any financial product. Email trans-
> > mission cannot be guaranteed to be  secure  or  error-
> > free. P6070214
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Question on page inheritance...

2008-04-01 Thread Bruce Petro
I'm just getting started in wicket, so forgive me if this is a too-dumb
question...

 

I know wicket can check the session for a user to ask a "user" object if
it is logged in.

However, you don't really want to paste code on every page.

What is the best way, to have each page inherit the base "security
check" routine?

 

Would you create a BasePage extends WebPage and put the logic there and
have all other pages extend BasePage?

Or would you attach some sort of a command object to each page and put
the logic in that?

 

Anyone have a reference to an example of code to do this?

 

THANKS!

 

 

 



Multiple Wicket Servlets in same web application

2008-04-01 Thread Niels Bo

Hi

We have two WicketServlets/Applications in the same web application(war) and
that
has worked fine until we deployed on the big production server (Weblogic
10).

What we see now is that the homepage from application A is sometime showing
up
as response to request on urls that belong to the application B!
It is not a redirection. It is really the response that does not match the
url requested,
and we have it logged and documented with "Fiddler".

It looks just as if Application A is "stuck" to a worker thread (in its
ThreadLocal current), but looking at the wicket source we cant see how that
should happen. 

This right now happens for maybe 10% of the requests on the production
server, while have only been able to recreate it once a day on a development
server, so that makes it difficult to debug.

Any suggestions where and how to look for the error?
Is there a place where we can add an extra check to catch if the Application
is stuck on a worker thread?

Niels
-- 
View this message in context: 
http://www.nabble.com/Multiple-Wicket-Servlets-in-same-web-application-tp16419432p16419432.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing Wickets default styles

2008-04-01 Thread Matthew Young
>and is indented as in the original

I think some browser use padding, others use margin to shift li.  You need
to set both padding-left and margin-left to have them look the same on all
browsers.

On Tue, Apr 1, 2008 at 6:33 AM, Steen Larsen <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I have made a stylesheet to change the default look of the FeedbackPanel,
> and loaded it with response.renderCSSReference(new ResourceReference(
> Style.class,"yousee.css"), "screen"), where the class Style and the css is
> in the same package. The css looks like this:
>
> li.feedbackPanelERROR {
>background-image: none;
>color: red;
>padding-left: 0px;
>background-repeat: no-repeat;
>background-position: 0px;
>list-style-type: none;
> }
>
> li.feedbackPanelINFO {
>background-image: none;
>color: red;
>padding-left: 0px;
>background-repeat: no-repeat;
>background-position: 0px;
>list-style-type: none;
> }
>
> This works fine in IE7, but for some reason only works partly in Firefox.
> The green background-image is removed but the text is not red, and is
> indented as in the original. Looking at the styles with Firefoxs
> WebDeveloper shows the correct styles. Anybody experienced this and found
> a
> solution ?.
>
> /Steen
>


Re: ListView with a Set instead of a List

2008-04-01 Thread reikje

1> True, but why is it important that is has to be the same collection? I
only care about changes being propagated to the ListItems, I don't care if
they are contained in a Set within the Model or in a List given to the
ListView. In other words, if you are saying, that you have to give the same
List from the Model to the ListView, means you cannot render a Model object
with a Set using a ListView. This is quite a restriction you have to be
aware of then I think. We choosed the Set on purpose to avoid duplicates,
there must be a way to render the contents of a Set using any Repeater
component.

2> Yes, in my code snippet where it says "// getModelObject and save" this
is very I call getModelObject().  



Johan Compagner wrote:
> 
> 1> because you dont have that detacheable list in the listview?? You
> are just giving a ArrayList directly to the listview
> 
> 2> i dont see exactly where you call getModelObject on in onsubmit but
> i guess thats on page? Then it is loaded yes, this has nothing to do
> with the listview model.
> 
> On 3/28/08, reikje <[EMAIL PROTECTED]> wrote:
>>
>> I have a rather specific question about a problem I am having. We have a
>> domain object (OperatorSyncConfig) that we need to diplay in a page. That
>> object contain a Set of FunctionSetting objects which I want to render in
>> a
>> ListView. For each ListItem (FunctionSetting) it should be possible to
>> change the timeout value and then with one Form submit save the whole
>> OperatorSyncConfig objects. Here is a snippet of the objects:
>>
>> public class OperatorSyncConfig implements Serializable
>> {
>> private Set m_functionSettings = new
>> LinkedHashSet();
>>
>> public Set getFunctionSettings()
>> {
>> return Collections.unmodifiableSet(new
>> LinkedHashSet(m_functionSettings));
>> }
>>
>> .. no setter method for the set, just single add and remove accessors
>> }
>>
>> public class FunctionSetting implements Serializable
>> {
>> private Long m_timeoutInMilliseconds;
>> .. get and set for that
>> }
>>
>>
>> The WebPage looks in short like that:
>>
>> public class EditOperatorPage extends WebPage
>> {
>>  LoadableDetachableModel model = new LoadableDetachableModel() { ...
>> }
>> // load the OperatorSyncConfig
>>  setModel(model);
>>
>>  Form updateDeleteForm = new Form("updateForm") {
>> @Override
>> protected void onSubmit() {
>>// getModelObject and save
>> }
>>  };
>>
>>  OperatorSyncConfig operatorSyncConfig = (OperatorSyncConfig)
>> getModelObject();
>>  Set settingsAsSet =
>> operatorSyncConfig.getFunctionSettings();
>>  List settings = new
>> ArrayList(settingsAsSet);
>>
>>  updateDeleteForm.add(new ListView("operatorFunctionsList", settings)
>> {
>> @Override
>> protected void populateItem(ListItem item)
>> {
>> FunctionSetting functionSetting = (FunctionSetting)
>> item.getModelObject();
>>
>> item.add(new TextField("Timeout", new
>> PropertyModel(functionSetting, "timeoutInMilliseconds")));
>> }
>> });
>>
>>
>> }
>>
>> The problem is that in the onSubmit of the Form I will always get the
>> "old"
>> version of the OperatorSyncConfig since getPage().getModelObject() in
>> there
>> will trigger LoadableDetachableModel.load() and get the object from the
>> Database. If I debug, I see that the new value for timeoutInMilliseconds
>> is
>> bound properly to the FunctionSetting object in the model of the
>> ListItem.
>> However, the model of the whole ListView contains an ArrayList which
>> itself
>> contains different FunctionSetting objects (not the ones contained in the
>> Page model OperatorSyncConfig.getFunctionSettings()). By different I mean
>> they are equal but different objects in memory.
>>
>> Question is:
>> 1) why are there different FunctionSetting objects in the Page model and
>> the
>> ListView model
>> 2) why does onSubmit() call load() on the DetachableModel if form values
>> have been bound already
>> --
>> View this message in context:
>> http://www.nabble.com/ListView-with-a-Set-instead-of-a-List-tp16349670p16349670.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ListView-with-a-Set-instead-of-a-List-tp16349670p16418733.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [

RE: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
I am using Wicket 1.3. Has Wicket Extensions been updated to 1.3? I got the 
latest Extensions, but seem to be getting errors.

Thanks

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Levy
Sent: Tuesday, April 01, 2008 11:17 AM
To: users@wicket.apache.org
Subject: Re: Simplest way to do name-value pairs in DropDownChoice

I think you are going to have to use a ChoiceRenderer. It's really not that
complicated. Check out

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html

Jeremy

On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I have looked around at several examples of using DropDownChoice. I see it
> is a very flexible component, with models, IChoiceRenderers and so on. But,
> I just want to pass it simple name/value pairs to use, with a minimum of
> fuss. Surely there must be an easy way to do this, since this is probably
> the main use case for this component. My pairs are just:
>
>  All Day
>  7:00AM
>  8:00AM
>  9:00AM
>  10:00AM
>  11:00AM
>  12:00PM
>  1:00PM
>  2:00PM
>  3:00PM
>  4:00PM
>  5:00PM
>  6:00PM
>
> In HTML. What is the simplest possible way to use these with
> DropDownChoice?
>
> Thanks.
>
>
> ___
>
> The  information in this email or in any file attached
> hereto is intended only for the personal and confiden-
> tial  use  of  the individual or entity to which it is
> addressed and may contain information that is  propri-
> etary  and  confidential.  If you are not the intended
> recipient of this message you are hereby notified that
> any  review, dissemination, distribution or copying of
> this message is strictly prohibited.  This  communica-
> tion  is  for information purposes only and should not
> be regarded as an offer to sell or as  a  solicitation
> of an offer to buy any financial product. Email trans-
> mission cannot be guaranteed to be  secure  or  error-
> free. P6070214
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Jeremy Levy
I think you are going to have to use a ChoiceRenderer. It's really not that
complicated. Check out

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/extensions/markup/html/form/select/SelectOption.html

Jeremy

On Tue, Apr 1, 2008 at 12:02 PM, Andrew Broderick <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I have looked around at several examples of using DropDownChoice. I see it
> is a very flexible component, with models, IChoiceRenderers and so on. But,
> I just want to pass it simple name/value pairs to use, with a minimum of
> fuss. Surely there must be an easy way to do this, since this is probably
> the main use case for this component. My pairs are just:
>
>  All Day
>  7:00AM
>  8:00AM
>  9:00AM
>  10:00AM
>  11:00AM
>  12:00PM
>  1:00PM
>  2:00PM
>  3:00PM
>  4:00PM
>  5:00PM
>  6:00PM
>
> In HTML. What is the simplest possible way to use these with
> DropDownChoice?
>
> Thanks.
>
>
> ___
>
> The  information in this email or in any file attached
> hereto is intended only for the personal and confiden-
> tial  use  of  the individual or entity to which it is
> addressed and may contain information that is  propri-
> etary  and  confidential.  If you are not the intended
> recipient of this message you are hereby notified that
> any  review, dissemination, distribution or copying of
> this message is strictly prohibited.  This  communica-
> tion  is  for information purposes only and should not
> be regarded as an offer to sell or as  a  solicitation
> of an offer to buy any financial product. Email trans-
> mission cannot be guaranteed to be  secure  or  error-
> free. P6070214
>


Simplest way to do name-value pairs in DropDownChoice

2008-04-01 Thread Andrew Broderick
Hi,

I have looked around at several examples of using DropDownChoice. I see it is a 
very flexible component, with models, IChoiceRenderers and so on. But, I just 
want to pass it simple name/value pairs to use, with a minimum of fuss. Surely 
there must be an easy way to do this, since this is probably the main use case 
for this component. My pairs are just:

  All Day
  7:00AM
  8:00AM
  9:00AM
  10:00AM
  11:00AM
  12:00PM
  1:00PM
  2:00PM
  3:00PM
  4:00PM
  5:00PM
  6:00PM

In HTML. What is the simplest possible way to use these with DropDownChoice?

Thanks.


___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread Martijn Dashorst
There is a solution: not to deploy your application more than 2-3 times...

Martijn

On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
>
>  Thanks... but it's impossible to find a clear solution to this problem over
> the internet... Each things I try fails miserably... Nobody can provide
> something that works... Setting the
> "hibernate.bytecode.use_reflection_optimizer" property has
> no effect. And others solutions are bad: monitor the application and
> manually restitue the memory of useless objects, etc...
>
>  Am I sentenced to restart Tomcat each time I redeploy the app? I am under a
> shared server, I can't restart it myself! What do you do, you, when you are
> deploying your applications? Do you phone to your provider to ask him to
> restart the server himself? Or did you find a workaround?
>
>  It's so annoying... That's a problem everybody has when using tomcat, but
> nobody can give a solution...
>
>
>
>  Martijn Dashorst a écrit :
>  http://www.google.com/search?q=permgen+outofmemory+tomcat
>
> On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
>
>
>  Hello everybody,
>
>  I found some problem with my app, when I deploy it/undeploy it several
> times under Tomcat (5.5) (Unix and Windows). I copied my app war file in the
> webapp dir, and when it has been fully deployed, I surf on some pages. After
> that, I delete that war, wait for the end of undeployment, and did it again.
> The memory used by tomcat grows on each cycle. I did it about ten times, and
> after that I got the message below:
>
>
> java.lang.OutOfMemoryError: PermGen space
>  at java.lang.ClassLoader.defineClass1(Native Method)
>  at java.lang.ClassLoader.defineClass(Unknown Source)
>  at java.security.SecureClassLoader.defineClass(Unknown
> Source)
>  at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
>  at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
>  at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
>  at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
>  at java.lang.ClassLoader.loadClassInternal(Unknown
> Source)
>  at java.lang.Class.getDeclaredMethods0(Native Method)
>  at java.lang.Class.privateGetDeclaredMethods(Unknown
> Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod(Unknown Source)
>  at
> org.apache.wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:506)
>  at
> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:331)
>  at
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
>  at
> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
>  at
> org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
>  at
> org.apache.wicket.Component.getModelObject(Component.java:1539)
>  at
> org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140)
>  at
> org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:744)
>  at
> org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344)
>  at
> org.apache.wicket.Component.renderComponent(Component.java:2459)
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
>  at
> org.apache.wicket.Component.render(Component.java:2296)
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
>  at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
>  at org.apache.wicket.Page.onRender(Page.java:1446)
>  at
> org.apache.wicket.Component.render(Component.java:2296)
>
>  As you can see, it talks about Wicket, but I don't know if it is really
> related to it. I tried on Tomcat5.5/Linux too, and the message is not
> exactly the same, but it stills speak of PermGen.
>
>  PS: I use Hibernate 3.2.6ga and several other things in my app, like
> Jasper, JFreeChart and C3P0 .
>
>  Does anybody know how to avoid this? Or is the Tomcat list a better place
> for this?
>
>  Thanks!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad

Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread godin

a common solution is to use this vm options
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
but be aware that this options are avaible in only recent jdk
http://blogs.sun.com/watt/resource/jvm-options-list.html
regards marc






Piller Sébastien a écrit :
Thanks... but it's impossible to find a clear solution to this problem 
over the internet... Each things I try fails miserably... Nobody can 
provide something that works... Setting the 
"hibernate.bytecode.use_reflection_optimizer" property has no effect. 
And others solutions are bad: monitor the application and manually 
restitue the memory of useless objects, etc...


Am I sentenced to restart Tomcat each time I redeploy the app? I am 
under a shared server, I can't restart it myself! What do you do, you, 
when you are deploying your applications? Do you phone to your 
provider to ask him to restart the server himself? Or did you find a 
workaround?


It's so annoying... That's a problem everybody has when using tomcat, 
but nobody can give a solution...




Martijn Dashorst a écrit :

http://www.google.com/search?q=permgen+outofmemory+tomcat

On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
  

 Hello everybody,

 I found some problem with my app, when I deploy it/undeploy it several
times under Tomcat (5.5) (Unix and Windows). I copied my app war file in the
webapp dir, and when it has been fully deployed, I surf on some pages. After
that, I delete that war, wait for the end of undeployment, and did it again.
The memory used by tomcat grows on each cycle. I did it about ten times, and
after that I got the message below:


java.lang.OutOfMemoryError: PermGen space
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown
Source)
 at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
 at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
 at java.lang.ClassLoader.loadClassInternal(Unknown
Source)
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Unknown
Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod(Unknown Source)
 at
org.apache.wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:506)
 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:331)
 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
 at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
 at
org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
 at
org.apache.wicket.Component.getModelObject(Component.java:1539)
 at
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140)
 at
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:744)
 at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344)
 at
org.apache.wicket.Component.renderComponent(Component.java:2459)
 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
 at
org.apache.wicket.Component.render(Component.java:2296)
 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
 at org.apache.wicket.Page.onRender(Page.java:1446)
 at
org.apache.wicket.Component.render(Component.java:2296)

 As you can see, it talks about Wicket, but I don't know if it is really
related to it. I tried on Tomcat5.5/Linux too, and the message is not
exactly the same, but it stills speak of PermGen.

 PS: I use Hibernate 3.2.6ga and several other things in my app, like
Jasper, JFreeChart and C3P0 .

 Does anybody know how to avoid this? Or is the Tomcat list a better place
for this?

 Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  


- 
To unsubscribe, e-mail: [EMAIL PROTECTED] For 
additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread Piller Sébastien




Thanks... but it's impossible to find a clear solution to this problem
over the internet... Each things I try fails miserably... Nobody can
provide something that works... Setting the
"hibernate.bytecode.use_reflection_optimizer" property has no effect.
And others solutions are bad: monitor the application and manually
restitue the memory of useless objects, etc...

Am I sentenced to restart Tomcat each time I redeploy the app? I am
under a shared server, I can't restart it myself! What do you do, you,
when you are deploying your applications? Do you phone to your provider
to ask him to restart the server himself? Or did you find a workaround?

It's so annoying... That's a problem everybody has when using tomcat,
but nobody can give a solution...



Martijn Dashorst a écrit :

  http://www.google.com/search?q=permgen+outofmemory+tomcat

On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
  
  
 Hello everybody,

 I found some problem with my app, when I deploy it/undeploy it several
times under Tomcat (5.5) (Unix and Windows). I copied my app war file in the
webapp dir, and when it has been fully deployed, I surf on some pages. After
that, I delete that war, wait for the end of undeployment, and did it again.
The memory used by tomcat grows on each cycle. I did it about ten times, and
after that I got the message below:


java.lang.OutOfMemoryError: PermGen space
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown
Source)
 at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
 at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
 at java.lang.ClassLoader.loadClassInternal(Unknown
Source)
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Unknown
Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod0(Unknown Source)
 at java.lang.Class.getMethod(Unknown Source)
 at
org.apache.wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:506)
 at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:331)
 at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
 at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
 at
org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
 at
org.apache.wicket.Component.getModelObject(Component.java:1539)
 at
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140)
 at
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:744)
 at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344)
 at
org.apache.wicket.Component.renderComponent(Component.java:2459)
 at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
 at
org.apache.wicket.Component.render(Component.java:2296)
 at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
 at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
 at org.apache.wicket.Page.onRender(Page.java:1446)
 at
org.apache.wicket.Component.render(Component.java:2296)

 As you can see, it talks about Wicket, but I don't know if it is really
related to it. I tried on Tomcat5.5/Linux too, and the message is not
exactly the same, but it stills speak of PermGen.

 PS: I use Hibernate 3.2.6ga and several other things in my app, like
Jasper, JFreeChart and C3P0 .

 Does anybody know how to avoid this? Or is the Tomcat list a better place
for this?

 Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  
  

  





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: export excel file via an OutputStream

2008-04-01 Thread Peter Ertl

use AbstractResourceStreamWriter

> Wicket got to have a more structured api for this common task.
usually it's not wicket but you when something is not working the way  
you expect it






Am 01.04.2008 um 09:31 schrieb [EMAIL PROTECTED]:


Hello:
I am trying to export dynamically generated excel file.
The generator would send the file.xls to an OutputStream.

In wicket, I am trying to use example as below but
 how can I connect the OutputStream to the inputstream
ins.  Pipedoutputstream would block. Using a separate thread
is not desirable.

public void onClick() {

  IResourceStream stream = new AbstractResourceStream() {

public InputStream getInputStream() throws  
ResourceStreamNotFoundException {



return ins;
}

public void close() throws IOException {
ins.close();
}
};

getRequestCycle().setRequestTarget(
new  
ResourceStreamRequestTarget(stream).setFileName("file.xls"));



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing Wickets default styles

2008-04-01 Thread Steen Larsen
I'm also developing mainly on firefox, and have tried clearing the cache an
all, but no luck. My colleague tried it out with the same result and he had
never downloaded the new stylesheet before.

The html is the standard feedback panel:


  

  Feltet
postnummer skal udfyldes.

  


and the css reference adds the following line to head, which should be ok:



/Steen

2008/4/1, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]>:
>
> Eeek TDC(yousee), which robs me of a montly fee for television!
>
> This might not be the rigth forum to ask CSS questions and is sort of
> offtopic. But usually when something works in IE and doesnt in firefox
> it means that IE breaks standard compability, and due to some bug in IE
> works anyway. My prefered way of working are using firefox to develop,
> checking in IE and then fix so it works in IE too..
>
> Could you show the corresponding html?
>
> regards Nino
>
>
> Steen Larsen wrote:
> > Hi,
> >
> > I have made a stylesheet to change the default look of the
> FeedbackPanel,
> > and loaded it with response.renderCSSReference(new ResourceReference(
> > Style.class,"yousee.css"), "screen"), where the class Style and the css
> is
> > in the same package. The css looks like this:
> >
> > li.feedbackPanelERROR {
> > background-image: none;
> > color: red;
> > padding-left: 0px;
> > background-repeat: no-repeat;
> > background-position: 0px;
> > list-style-type: none;
> > }
> >
> > li.feedbackPanelINFO {
> > background-image: none;
> > color: red;
> > padding-left: 0px;
> > background-repeat: no-repeat;
> > background-position: 0px;
> > list-style-type: none;
> > }
> >
> > This works fine in IE7, but for some reason only works partly in
> Firefox.
> > The green background-image is removed but the text is not red, and is
> > indented as in the original. Looking at the styles with Firefoxs
> > WebDeveloper shows the correct styles. Anybody experienced this and
> found a
> > solution ?.
> >
> > /Steen
> >
> >
>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Multiple TreeTables: wrong table expanded

2008-04-01 Thread Matej Knopp
That's really weird. Can you create a JIRA issue for it and maybe
attach a quickstart that demonstrates the behavior?

-Matej

On Tue, Apr 1, 2008 at 10:54 AM, Jaap Bos <[EMAIL PROTECTED]> wrote:
> On my ModalWindow I have a number of (about 6) TreeTables, all using
>  Ajax, generated in a ListView.
>
>  These trees have some equal nodes, but are not exact the same.
>
>  When I expand the roots of one of these, everything is fine.
>
>  However, if I want to Expand one of the subnodes of the root,
>  onClick(AjaxRequestTarget target) is called not on the owing TreeTable
>  but always on the last TreeTable.
>
>  One TreeTable works fine, what can be the cause wicket always wants to
>  expand nodes of the last one in case I have multiple TreeTables?
>
>
>
>  Jaap
>
>
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug on modal window

2008-04-01 Thread Matej Knopp
You can use display:inline for the div.

-Matej

On Tue, Apr 1, 2008 at 2:36 PM, Wouter Huijnink <[EMAIL PROTECTED]> wrote:
> Marco Aurélio Silva wrote:
>  > My point is: It doesn't work if the  is inside the . And I can't
>  > put a div (with div works) because the div has a line break.
>  >
>  >
>
>  then add a class attribute to the div in order to exclude it from having
>  a line break in your CSS
>
>  --
>  Wouter Huijnink
>  Func. Internet Integration
>  W http://www.func.nl
>  T +31 20 423
>  F +31 20 4223500
>
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OOM in PermGen after several deploy/undeploy

2008-04-01 Thread Martijn Dashorst
http://www.google.com/search?q=permgen+outofmemory+tomcat

On 4/1/08, Piller Sébastien <[EMAIL PROTECTED]> wrote:
>
>  Hello everybody,
>
>  I found some problem with my app, when I deploy it/undeploy it several
> times under Tomcat (5.5) (Unix and Windows). I copied my app war file in the
> webapp dir, and when it has been fully deployed, I surf on some pages. After
> that, I delete that war, wait for the end of undeployment, and did it again.
> The memory used by tomcat grows on each cycle. I did it about ten times, and
> after that I got the message below:
>
>
> java.lang.OutOfMemoryError: PermGen space
>  at java.lang.ClassLoader.defineClass1(Native Method)
>  at java.lang.ClassLoader.defineClass(Unknown Source)
>  at java.security.SecureClassLoader.defineClass(Unknown
> Source)
>  at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
>  at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
>  at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
>  at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
>  at java.lang.ClassLoader.loadClassInternal(Unknown
> Source)
>  at java.lang.Class.getDeclaredMethods0(Native Method)
>  at java.lang.Class.privateGetDeclaredMethods(Unknown
> Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod0(Unknown Source)
>  at java.lang.Class.getMethod(Unknown Source)
>  at
> org.apache.wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:506)
>  at
> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:331)
>  at
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
>  at
> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
>  at
> org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
>  at
> org.apache.wicket.Component.getModelObject(Component.java:1539)
>  at
> org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140)
>  at
> org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:744)
>  at
> org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344)
>  at
> org.apache.wicket.Component.renderComponent(Component.java:2459)
>  at
> org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
>  at
> org.apache.wicket.Component.render(Component.java:2296)
>  at
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
>  at
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
>  at org.apache.wicket.Page.onRender(Page.java:1446)
>  at
> org.apache.wicket.Component.render(Component.java:2296)
>
>  As you can see, it talks about Wicket, but I don't know if it is really
> related to it. I tried on Tomcat5.5/Linux too, and the message is not
> exactly the same, but it stills speak of PermGen.
>
>  PS: I use Hibernate 3.2.6ga and several other things in my app, like
> Jasper, JFreeChart and C3P0 .
>
>  Does anybody know how to avoid this? Or is the Tomcat list a better place
> for this?
>
>  Thanks!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing Wickets default styles

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael

Eeek TDC(yousee), which robs me of a montly fee for television!

This might not be the rigth forum to ask CSS questions and is sort of 
offtopic. But usually when something works in IE and doesnt in firefox 
it means that IE breaks standard compability, and due to some bug in IE 
works anyway. My prefered way of working are using firefox to develop, 
checking in IE and then fix so it works in IE too..


Could you show the corresponding html?

regards Nino

Steen Larsen wrote:

Hi,

I have made a stylesheet to change the default look of the FeedbackPanel,
and loaded it with response.renderCSSReference(new ResourceReference(
Style.class,"yousee.css"), "screen"), where the class Style and the css is
in the same package. The css looks like this:

li.feedbackPanelERROR {
background-image: none;
color: red;
padding-left: 0px;
background-repeat: no-repeat;
background-position: 0px;
list-style-type: none;
}

li.feedbackPanelINFO {
background-image: none;
color: red;
padding-left: 0px;
background-repeat: no-repeat;
background-position: 0px;
list-style-type: none;
}

This works fine in IE7, but for some reason only works partly in Firefox.
The green background-image is removed but the text is not red, and is
indented as in the original. Looking at the styles with Firefoxs
WebDeveloper shows the correct styles. Anybody experienced this and found a
solution ?.

/Steen

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Changing Wickets default styles

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael

Eeek TDC(yousee), which robs me of a montly fee for television!

This might not be the rigth forum to ask CSS questions and is sort of 
offtopic. But usually when something works in IE and doesnt in firefox 
it means that IE breaks standard compability, and due to some bug in IE 
works anyway. My prefered way of working are using firefox to develop, 
checking in IE and then fix so it works in IE too..


Could you show the corresponding html?

regards Nino

Steen Larsen wrote:

Hi,

I have made a stylesheet to change the default look of the FeedbackPanel,
and loaded it with response.renderCSSReference(new ResourceReference(
Style.class,"yousee.css"), "screen"), where the class Style and the css is
in the same package. The css looks like this:

li.feedbackPanelERROR {
background-image: none;
color: red;
padding-left: 0px;
background-repeat: no-repeat;
background-position: 0px;
list-style-type: none;
}

li.feedbackPanelINFO {
background-image: none;
color: red;
padding-left: 0px;
background-repeat: no-repeat;
background-position: 0px;
list-style-type: none;
}

This works fine in IE7, but for some reason only works partly in Firefox.
The green background-image is removed but the text is not red, and is
indented as in the original. Looking at the styles with Firefoxs
WebDeveloper shows the correct styles. Anybody experienced this and found a
solution ?.

/Steen

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OOM in PermGen after several deploy/undeploy

2008-04-01 Thread Piller Sébastien




Hello everybody,

I found some problem with my app, when I deploy it/undeploy it several
times under Tomcat (5.5) (Unix and Windows). I copied my app war file
in the webapp dir, and when it has been fully deployed, I surf on some
pages. After that, I delete that war, wait for the end of undeployment,
and did it again. The memory used by tomcat grows on each cycle. I did
it about ten times, and after that I got the message below:

java.lang.OutOfMemoryError: PermGen space
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(Unknown Source)
  at java.security.SecureClassLoader.defineClass(Unknown Source)
  at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
  at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
  at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
  at java.lang.ClassLoader.loadClassInternal(Unknown Source)
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod0(Unknown Source)
  at java.lang.Class.getMethod(Unknown Source)
  at
org.apache.wicket.util.lang.PropertyResolver.findGetter(PropertyResolver.java:506)
  at
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:331)
  at
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
  at
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
  at
org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
  at
org.apache.wicket.Component.getModelObject(Component.java:1539)
  at
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:140)
  at
org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:744)
  at
org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:344)
  at
org.apache.wicket.Component.renderComponent(Component.java:2459)
  at
org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
  at org.apache.wicket.Component.render(Component.java:2296)
  at
org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
  at
org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1370)
  at org.apache.wicket.Page.onRender(Page.java:1446)
  at org.apache.wicket.Component.render(Component.java:2296)


As you can see, it talks about Wicket, but I don't know if it is really
related to it. I tried on Tomcat5.5/Linux too, and the message is not
exactly the same, but it stills speak of PermGen.

PS: I use Hibernate 3.2.6ga and several other things in my app, like
Jasper, JFreeChart and C3P0 .

Does anybody know how to avoid this? Or is the Tomcat list a better
place for this?

Thanks!




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: consume rss feeds in wicket

2008-04-01 Thread Nino Saturnino Martinez Vazquez Wael

Yeah that sounds possible..

Ryan Sonnek wrote:

On Tue, Apr 1, 2008 at 8:23 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

works fine for me, only problem are that something cant handle if you
 have æ ø å in your domain... You then have to use the alternate domain
 qualifiyer



That sounds like a ROME specific issue?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >