Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Harald Gruber

you could write a HttpSessionListener:

in your WEB-INF:

listener
listener-classcom.my.SessionObserver/listener-class
/listener


class:

public class SessionObserver implements HttpSessionListener
{
private static final Log LOG = LogFactory.getLog(SessionObserver.class);

public void sessionCreated(HttpSessionEvent se) {
HttpSession s=se.getSession();
if (LOG.isDebugEnabled()) LOG.debug(sessionCreated  + 
s.getId());
}

public void sessionDestroyed(HttpSessionEvent se) {
HttpSession s=se.getSession();

/* do something here */
}

public SessionObserver() {
if (LOG.isDebugEnabled()) LOG.debug(init);
}

}


-harald



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] noob question about wicket

2007-06-18 Thread Eelco Hillenius
Just tested it and found an entry on their mailing list. In maven 2,
at least the current version mvn eclipse:eclipse tries to download
sources and javadocs automatically.

Eelco


On 6/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 I'm guessing it includes the source jars if they are in your local
 repository, but doesn't download them unless you provide the extra
 argument. Anyway, to be sure, you can provide the argument.

 Eelco

 On 6/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  On 6/14/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   no, you probably edited your mvn launch script and added it there?
 
  Haha, that would be funny. No, of course I didn't.
 
  Eelco
 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] noob question about wicket

2007-06-18 Thread Martijn Dashorst
If you look at the settings for the eclipse project in our parent
pom.xml you will see a setting that is responsible for downloading the
sources:

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-eclipse-plugin/artifactId
version2.3/version
configuration
downloadSourcestrue/downloadSources
/configuration
/plugin

Martijn

On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Just tested it and found an entry on their mailing list. In maven 2,
 at least the current version mvn eclipse:eclipse tries to download
 sources and javadocs automatically.

 Eelco


 On 6/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  I'm guessing it includes the source jars if they are in your local
  repository, but doesn't download them unless you provide the extra
  argument. Anyway, to be sure, you can provide the argument.
 
  Eelco
 
  On 6/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   On 6/14/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
no, you probably edited your mvn launch script and added it there?
  
   Haha, that would be funny. No, of course I didn't.
  
   Eelco
  
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] noob question about wicket

2007-06-18 Thread Eelco Hillenius
Yeah, you're right. I just found a similar entry in our pom. Gawd, why
don't they just do that automatically.

Eelco

On 6/17/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 If you look at the settings for the eclipse project in our parent
 pom.xml you will see a setting that is responsible for downloading the
 sources:

 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-eclipse-plugin/artifactId
 version2.3/version
 configuration
 downloadSourcestrue/downloadSources
 /configuration
 /plugin

 Martijn

 On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Just tested it and found an entry on their mailing list. In maven 2,
  at least the current version mvn eclipse:eclipse tries to download
  sources and javadocs automatically.
 
  Eelco
 
 
  On 6/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   I'm guessing it includes the source jars if they are in your local
   repository, but doesn't download them unless you provide the extra
   argument. Anyway, to be sure, you can provide the argument.
  
   Eelco
  
   On 6/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
On 6/14/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 no, you probably edited your mvn launch script and added it there?
   
Haha, that would be funny. No, of course I didn't.
   
Eelco
   
  
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 --
 Join the wicket community at irc.freenode.net: ##wicket
 Wicket 1.2.6 contains a very important fix. Download Wicket now!
 http://wicketframework.org

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] noob question about wicket

2007-06-18 Thread Eelco Hillenius
 Yeah, you're right. I just found a similar entry in our pom. Gawd, why
 don't they just do that automatically.

 our == Teachscape

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Juha Alatalo
Eelco Hillenius wrote:
 Thanks. I had blocked cookies on my test site for some reason. Why
 cookies are needed in 1.3? In 1.2 that wasn't the case, was it?
 
 It shouldn't be the case now either; links should always be rewritten
 so that it includes the jsessionid if the cookie is not available (the
 actual rewriting is done by the servlet container btw).
 
 I just tested the site I'm working off and turned cookies off and it
 works fine. Can you track a little bit further where your problem
 comes from?
 

I can track it further a little bit later. First we are trying to get 
things working somehow with 1.3. However this same problem occurs in 
wicket examples.
- disable cookies
- http://www.wicketstuff.org/wicket13/
- test any page where are links or buttons

- Juha

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread wicket21



Eelco Hillenius wrote:
 
 On 6/17/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 thats not entirely correct. while the event cannot be pushed to you, you
 can
 pull for it. you can set a cookie with expiration null - such a cookie is
 destroyed when the window is closed. so you can poll for it ad if its
 gone
 you know its a new window being opened. in the same manner you can use
 window.name variable, which is what we do.

 so when a request comes in and the user has a last_login cookie (set
 expiratio to 30 mins), but no login_session cookie (which is the one with
 expiration null) you know they closed the window and are coming back
 
 Yeah, that could work, though only when that particular user uses the
 same browser instance though. It would be better than nothing I guess.
 
 Eelco
 
 
 Yes, it might, but it is not sufficient for my case, because the same user
 may need access from different pcs, plus the login/logout data are shared
 across more than one (existing) applications.
 
 Konstantinos
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11170714
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread wicket21


I was looking for a wicket solution, but this is not a bad idea.  I will
try this later on today and see how it goes (it does seem straightforward
enough...)

Konstantinos



Harald Gruber wrote:
 
 
 you could write a HttpSessionListener:
 
 in your WEB-INF:
 
   listener
   listener-classcom.my.SessionObserver/listener-class
   /listener
 
 
 class:
 
 public class SessionObserver implements HttpSessionListener
 {
   private static final Log LOG = LogFactory.getLog(SessionObserver.class);
 
   public void sessionCreated(HttpSessionEvent se) {
   HttpSession s=se.getSession();
   if (LOG.isDebugEnabled()) LOG.debug(sessionCreated  + 
 s.getId());
   }
 
   public void sessionDestroyed(HttpSessionEvent se) {
   HttpSession s=se.getSession();
 
   /* do something here */
   }
 
   public SessionObserver() {
   if (LOG.isDebugEnabled()) LOG.debug(init);
   }
 
 }
 
 
 -harald
 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11170785
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Eelco Hillenius
That won't solve your problem though. You'd get the same kind of call
back as you would get by overriding onUnbind in a custom session
store. It won't do anything for catching the event that a user closes
a browser without properly logging out.

Eelco

On 6/17/07, wicket21 [EMAIL PROTECTED] wrote:


 I was looking for a wicket solution, but this is not a bad idea.  I will
 try this later on today and see how it goes (it does seem straightforward
 enough...)

 Konstantinos



 Harald Gruber wrote:
 
 
  you could write a HttpSessionListener:
 
  in your WEB-INF:
 
listener
listener-classcom.my.SessionObserver/listener-class
/listener
 
 
  class:
 
  public class SessionObserver implements HttpSessionListener
  {
private static final Log LOG = 
  LogFactory.getLog(SessionObserver.class);
 
public void sessionCreated(HttpSessionEvent se) {
HttpSession s=se.getSession();
if (LOG.isDebugEnabled()) LOG.debug(sessionCreated  + 
  s.getId());
}
 
public void sessionDestroyed(HttpSessionEvent se) {
HttpSession s=se.getSession();
 
/* do something here */
}
 
public SessionObserver() {
if (LOG.isDebugEnabled()) LOG.debug(init);
}
 
  }
 
 
  -harald
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context: 
 http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11170785
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Harald Gruber
wicket21 schrieb:
 
 I was looking for a wicket solution, but this is not a bad idea.  I will
 try this later on today and see how it goes (it does seem straightforward
 enough...)

probably you can implement the HttpSessionListener interface in your wicket 
application and
install it programatically at application start. then you'd have some sort of 
wicket-solution.
not sure, if it is possible though. i used this approach in a project already 
and it worked well.
you just have to remember the association user-sessionId anywhere.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Harald Gruber
Eelco Hillenius schrieb:
 That won't solve your problem though. You'd get the same kind of call
 back as you would get by overriding onUnbind in a custom session
 store. It won't do anything for catching the event that a user closes
 a browser without properly logging out.

those methods are called either when the session timeout occurs in the app 
server (and the user 
closed the browser long before) or the session gets invalidated manually.
at least my experience...

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Eelco Hillenius
 Eelco Hillenius schrieb:
  That won't solve your problem though. You'd get the same kind of call
  back as you would get by overriding onUnbind in a custom session
  store. It won't do anything for catching the event that a user closes
  a browser without properly logging out.

 those methods are called either when the session timeout occurs in the app 
 server (and the user
 closed the browser long before) or the session gets invalidated manually.
 at least my experience...

Yes, and the same happens for AbstractHttpSessionStore#onUnbind

What that class does on #bind is this:

// register an unbinding listener for cleaning up
String applicationKey = application.getApplicationKey();
httpSession.setAttribute(Wicket:SessionUnbindingListener- + 
applicationKey,
new SessionBindingListener(applicationKey, 
httpSession.getId()));

where SessionBindingListener is this:

/**
 * Reacts on unbinding from the session by cleaning up the session 
related
 * application data.
 */
protected static final class SessionBindingListener
implements
HttpSessionBindingListener,
Serializable
{
private static final long serialVersionUID = 1L;

/** Session id. */
private final String sessionId;

/** The unique key of the application within this web 
application. */
private final String applicationKey;

/** Whether it is already unbound. */
private boolean unbound = false;

/**
 * Construct.
 *
 * @param applicationKey
 *The unique key of the application within this web
 *application
 * @param sessionId
 *The session's id
 */
public SessionBindingListener(String applicationKey, String 
sessionId)
{
this.applicationKey = applicationKey;
this.sessionId = sessionId;
}

/**
 * @see 
javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)
 */
public void valueBound(HttpSessionBindingEvent evg)
{
}

/**
 * @see 
javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
 */
public void valueUnbound(HttpSessionBindingEvent evt)
{
if (!unbound)
{
unbound = true;
Application application = 
Application.get(applicationKey);
if (application != null)
{

application.getSessionStore().unbind(sessionId);
}
}
}
}

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Harald Gruber
 Yes, and the same happens for AbstractHttpSessionStore#onUnbind

ok, admit, i didnt check the source code of AbstractHttpSessionStore ;-)
so i guess, that's what he needs...

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Al Maw
Juha Alatalo wrote:
 Eelco Hillenius wrote:
 Thanks. I had blocked cookies on my test site for some reason. Why
 cookies are needed in 1.3? In 1.2 that wasn't the case, was it?
 It shouldn't be the case now either; links should always be rewritten
 so that it includes the jsessionid if the cookie is not available (the
 actual rewriting is done by the servlet container btw).

 I just tested the site I'm working off and turned cookies off and it
 works fine. Can you track a little bit further where your problem
 comes from?

 
 I can track it further a little bit later. First we are trying to get 
 things working somehow with 1.3. However this same problem occurs in 
 wicket examples.
 - disable cookies
 - http://www.wicketstuff.org/wicket13/
 - test any page where are links or buttons

Odd. On my local wicket-examples running under Jetty, things work fine 
(I get a ;jsessionid=[...]?wicket:interface=[...] link). But you're 
right, on wicketstuff.org, it doesn't seem to cope.

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread wicket21


Al Maw wrote:
 
 Eelco Hillenius wrote:
 well, I have a project where the requirement is to do some things when
 user
 logs out, otherwise the same user can't use the application for the next
 30
 minutes. It works fine when user uses the logout link, but I want the
 same
 behavior when the user closes the window. Any hints how to do this?
 
 That's just not possible to my best knowledge. It has nothing to do
 with Wicket, but just with the fact that such an event (closing a
 browser window using the functionality the OS provides for that) can't
 be trapped.
 
 Hmmm. You might be able to mess with the onbeforeunload event on body.
 
 Regards,
 
 Al
 -- 
 
 I tried something like this with no success.
 
 I used 
 getBodyContainer().getBodyContainer().add(new
 AjaxEventBehavior(onunload){
 protected void onEvent(AjaxRequestTarget target){
 System.out.println(here);
 }
 });
 
  but it never gets in there. I put it in the constructor of a subclass of
 WebPage that I use as a base page for the project.  Should the call to
 getBodyContainer() be the first thing to do inside the constructor of the
 page?
 
 Just before this I output some javascript using a label that goes between
 the the head and the body of the html. Could this mess things up?
 
 I tried placing a simple onunload=alert('this is from the body tag') at
 the body tag of the page's html, but this did not succed as well...
 
 
 Konstantinos
 
 
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-detect-http-session-expiry---timeout-due-to-no-user-activity-tf3930442.html#a11171055
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Harald Gruber

though it implements the HttpSessionBindingListener and not the 
HttpSessionListener.
i guess the difference between both ist, that the binding listener only 
realizes and observes which 
values of the session are bound and the session listener recognizes if a 
session itself is created 
or destroyed.

-harald

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Al Maw
Konstantinos:

Firstly, please quit replying with your own text indented with a , the 
same as the text you're quoting. It makes it really difficult to see 
what the heck is going on. ;-)

Secondly, I said onbeforeunload, not onunload.

Al
-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Copenhagen Wicket Users Group - interested?

2007-06-18 Thread Nino Saturnino Martinez Vazquez Wael
Inspired by Al Maw's mail:)

I've seen some guys from DK around here and wanted to hear if any were 
interested in a user day?

Not topics has been decided, so its free for grabs, both on the taking 
and giving side.

Depending on how many we are we could spl


regards Nino


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] infinite loop

2007-06-18 Thread Johan Compagner

can't you debug it and break on the exception NullPointer?

But i agree somehow we should log this better.

On 6/18/07, Jonathan Locke [EMAIL PROTECTED] wrote:




aha.  we might have two of these bugs, but i'm getting this trace
now.  does
anyone have any idea what line of code it is that is failing to print the
stack trace for this NPE into the log?  it looks like an NPE is causing
the
processing step to restart over and over again.  would be a good fix to
wicket to have it print that stack trace and not just the exception
message.

[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
[10:19:01] ERROR - [default] - Servlet.service() for servlet default threw
exception java.lang.IllegalStateException?: Request processing executed
32767 steps, which means it is probably in an infinite loop.

at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at
org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at
org.apache.wicket.protocol.http.WicketFilter
?.doGet(WicketFilter?.java:251)
at
org.apache.wicket.protocol.http.WicketFilter
?.doFilter(WicketFilter?.java:125)
at
org.apache.catalina.core.ApplicationFilterChain
?.internalDoFilter(ApplicationFilterChain?.java:202)
at
org.apache.catalina.core.ApplicationFilterChain
?.doFilter(ApplicationFilterChain?


Al Maw wrote:

 I've seen this happen if you run behind a mod_proxy and fail to set up
 the ProxyPassReverse setting properly. Make sure you have
 ProxyPassReverseCookiePath, too. See the wiki for details.

 Al

 Jonathan Locke wrote:

 anyone have any ideas on what might cause this?  in particular can a
user
 exception cause it or is it definitely a wicket bug?

 java.lang.IllegalStateException?: Request processing executed 32767
 steps,
 which means it is probably in an infinite loop.

 at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at
 org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at
 org.apache.wicket.protocol.http.WicketFilter
?.doGet(WicketFilter?.java:251)
 at
 org.apache.wicket.protocol.http.WicketFilter
?.doFilter(WicketFilter?.java:125)
 at
 org.apache.catalina.core.ApplicationFilterChain
?.internalDoFilter(ApplicationFilterChain?.java:202)
 at
 org.apache.catalina.core.ApplicationFilterChain
?.doFilter(ApplicationFilterChain?.java:173)
 at
 org.apache.catalina.core.StandardWrapperValve
?.invoke(StandardWrapperValve?.java:213)
 at
 org.apache.catalina.core.StandardContextValve
?.invoke(StandardContextValve?.java:178)
 at
 org.apache.catalina.core.StandardHostValve
?.invoke(StandardHostValve?.java:126)
 at
 org.apache.catalina.cluster.tcp.ReplicationValve
?.invoke(ReplicationValve?.java:346)
 at
 org.apache.catalina.valves.ErrorReportValve
?.invoke(ErrorReportValve?.java:105)
 at
 org.apache.catalina.core.StandardEngineValve
?.invoke(StandardEngineValve?.java:107)
 at
 org.apache.catalina.connector.CoyoteAdapter
?.service(CoyoteAdapter?.java:148)
 at
 org.apache.coyote.ajp.AjpAprProcessor
?.process(AjpAprProcessor?.java:425)
 at
 org.apache.coyote.ajp.AjpAprProtocol
?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452)
 at
 org.apache.tomcat.util.net.AprEndpoint
?$Worker.run(AprEndpoint?.java:1285)
 at java.lang.Thread.run(Thread.java:619)





-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:
http://www.nabble.com/infinite-loop-tf3933416.html#a11167872
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___

Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Johan Compagner


Yes you have :). private final static IGetAndSet getGetAndSetter(String
exp, Class clz) has changed quite a lot.

 Do you have a unit test that fails now that shouldn't that i can add to
 the PropertyResolverTest ?

No I don't.




is this exception now thrown then:

throw new WicketRuntimeException(The expression ' + exp
   + ' is neither an index nor is it a
method for the list 
   + clz);

??
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] handling expiring pages

2007-06-18 Thread Pieter Cogghe

Hi,

As a result of how wicket stores pages in the session, links and pages do
expire quite often. I read a lot about it in the mailinglist archive, but
I'm still unsure how to handle it. It just seems very weird to run in to the
page expired message all the time. It's such a bad user experience: you
got to some page by some actions in the browser. For some time you leave the
browser for what it is, doing something else. You get back to your browser,
everything seems fine. You click a link and BAM: you get directed to the
home page, completely loosing track from where you was.

Solutions I found:

- only use bookmarkable links, stateless pages - can't use a lot of the
wicket-goodness, no stateless forms in 1.2 (?)
- keep pages alive with an ajax ping (doesn't help for the back button)

When do you use stateless pages and when statefull pages? Let's say I've got
this site structure:

mysite/login
mysite/home
mysite/songs/... (search, view, edit, add songs)
mysite/books/... (search, view, edit, add books)

Every action requires the user to be logged in!

Consider the following scenario's:

1
---
User Frederick logs in, searches the book Snales and other monsters and
views the details for that book. He gets distracted by the pineapple at his
desk for quite a while. He gets his attention back to the screen and clicks
to edit the book Snales and other monsters he was viewing before. He gets
redirected to the login page because the session has expired. He logs in and
gets automatically redirected to the edit form for the book Snales and
other monsters.

2 (nearly the same, but with a form)
---
User Sarah logs in, searches a song Anton aus Tirol and starts editing the
song data, but doesn't submit the data. She gets away from her desk and when
she returns everyting seems fine to her. She continues editing the data of
Anton aus Tirol and submits. Her session has expired, so she gets
redirected to the login page. She logs in again and the data she wanted to
submit get submitted by the application. Sarah is shown the new data of
Anton aus Tirol, which she submitted.

I guess the behaviour I want to achieve is only possible by using stateless
pages and bookmarkable links. Redirecting to the login page is no problem (
setPageExpiredErrorPage*)*. How do I redirect users to the page they left,
after they logged in again and secondly how do I preserve submitted data and
submit it after the user logged in again?

thanks a lot,

Pieter

--
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket and Lazslo

2007-06-18 Thread karthik Guru

Hi All,

We might have to embed lazslo inside some of our Wicket templates. Does it
generally play well with Wicket? Is there any information that you can
share. I'm yet to try this out - embedding Lazlso markup with Wicket, but
would be of great help if you already have something to share.

thanks,
karthik
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Alberto Bueno
Hi,

I'm using IComponentInstantiationListener to add additional 
functionality to my components. But in this listener I need to know the 
model of the component to condition this functionality.
If we inspect the code, we can see that the listeners are called before 
assigning the model to the component:

public Component(final String id, final IModel model)
{
setId(id);
getApplication().notifyComponentInstantiationListeners(this);
this.model = wrap(model);

final IDebugSettings debugSettings = 
Application.get().getDebugSettings();
if (debugSettings.getComponentUseCheck())
{
setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new 
MarkupException(
constructed)));
}
}

Are there any reason to do the notification in that moment?

Thanks



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Copenhagen Wicket Users Group - interested?

2007-06-18 Thread Nino Saturnino Martinez Vazquez Wael
Aha:)

Then we just need some people to sign up...:)

regards Nino

Frank Bille wrote:
 Was just thinking the same :)

 I also think we can borrow a room at Avaleo (ITU's meeting rooms).

 Frank


 On 6/15/07, *Nino Saturnino Martinez Vazquez Wael * 
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 Hi Inspired by Al im writing this mail.

 I think we should be enough people to make a group, however im not
 certain.

 So please reply to this mail if interested.

 Jayway will gladly host the group, providing we arent above 15
 peeps or
 so(we havent got room for more:))

 regards Nino

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Al Maw
Al Maw wrote:
 Konstantinos:
 
 Firstly, please quit replying with your own text indented with a , the 
 same as the text you're quoting. It makes it really difficult to see 
 what the heck is going on. ;-)
 
 Secondly, I said onbeforeunload, not onunload.

I've just added this functionality to trunk (1.3.0-SNAPSHOT).

You can now go:

add(new AbstractDefaultAjaxBehavior() {

 public void renderHead(IHeaderResponse response) {
 super.renderHead(response);
 response.renderOnBeforeUnloadJavascript(
 getCallbackScript(false).toString()
 );
 }

 protected void respond(AjaxRequestTarget target) {
 // Do stuff here.
 }
});


Regards,

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Joel Trunick is out of the office.

2007-06-18 Thread Joel Trunick

I will be out of the office starting  06/18/2007 and will not return until
06/25/2007.

I will check messages daily.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Copenhagen Wicket Users Group - interested?

2007-06-18 Thread Nino Saturnino Martinez Vazquez Wael
We are 2 guys so far:) Guessing that we need at least 5 to make it happend?

regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
 Aha:)

 Then we just need some people to sign up...:)

 regards Nino

 Frank Bille wrote:
   
 Was just thinking the same :)

 I also think we can borrow a room at Avaleo (ITU's meeting rooms).

 Frank


 On 6/15/07, *Nino Saturnino Martinez Vazquez Wael * 
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 Hi Inspired by Al im writing this mail.

 I think we should be enough people to make a group, however im not
 certain.

 So please reply to this mail if interested.

 Jayway will gladly host the group, providing we arent above 15
 peeps or
 so(we havent got room for more:))

 regards Nino

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Copenhagen Wicket Users Group - interested?

2007-06-18 Thread Frank Bille

Yeah, perhaps we could start out as an introduction/getting-started thingy
for a go-home-meeting or something. I don't have the time to arrange a lot
right now, but perhaps in aug.

Frank

On 6/18/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:


We are 2 guys so far:) Guessing that we need at least 5 to make it
happend?

regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
 Aha:)

 Then we just need some people to sign up...:)

 regards Nino

 Frank Bille wrote:

 Was just thinking the same :)

 I also think we can borrow a room at Avaleo (ITU's meeting rooms).

 Frank


 On 6/15/07, *Nino Saturnino Martinez Vazquez Wael *
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 Hi Inspired by Al im writing this mail.

 I think we should be enough people to make a group, however im not
 certain.

 So please reply to this mail if interested.

 Jayway will gladly host the group, providing we arent above 15
 peeps or
 so(we havent got room for more:))

 regards Nino


-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user






-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/



 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Copenhagen Wicket Users Group - interested?

2007-06-18 Thread Nino Saturnino Martinez Vazquez Wael
Yup better be late aug then, so we dont run into my vacation.. I've held 
a couple of getting started wicket things now..

This should defiantly attract some people(it's like a free getting 
started with wicket course...:))...

regards Nino

Frank Bille wrote:
 Yeah, perhaps we could start out as an introduction/getting-started 
 thingy for a go-home-meeting or something. I don't have the time to 
 arrange a lot right now, but perhaps in aug.

 Frank

 On 6/18/07, *Nino Saturnino Martinez Vazquez Wael* 
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 We are 2 guys so far:) Guessing that we need at least 5 to make it
 happend?

 regards Nino

 Nino Saturnino Martinez Vazquez Wael wrote:
  Aha:)
 
  Then we just need some people to sign up...:)
 
  regards Nino
 
  Frank Bille wrote:
 
  Was just thinking the same :)
 
  I also think we can borrow a room at Avaleo (ITU's meeting rooms).
 
  Frank
 
 
  On 6/15/07, *Nino Saturnino Martinez Vazquez Wael *
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
  Hi Inspired by Al im writing this mail.
 
  I think we should be enough people to make a group, however
 im not
  certain.
 
  So please reply to this mail if interested.
 
  Jayway will gladly host the group, providing we arent above 15
  peeps or
  so(we havent got room for more:))
 
  regards Nino
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express
 and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  mailto: Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 

 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
 
 

 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 -

  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 

 -

 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. 

Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Ryan Sonnek

I've had this same issue when trying to build a component instantiation
listener for inspecting hibernate annotations.  Since the
IComponentInstantiationListener interface doesn't have a hook for
onModelBinding, i've tried to use Behaviors instead.  Can you try
something like this?

public MyComponentInstantiationListener implements
IComponentInstantiationListener {
   public void onInstantiation(Component component) {
   component.add(new MyBehavior());
   }
}

public MyBehavior extends AbstractBehavior {
   public void bind(Component component) {
   super.bind(component);

   //inspect the model of the component and do your crazy work here
  }
}


On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:


Hi,

I'm using IComponentInstantiationListener to add additional
functionality to my components. But in this listener I need to know the
model of the component to condition this functionality.
If we inspect the code, we can see that the listeners are called before
assigning the model to the component:

public Component(final String id, final IModel model)
{
setId(id);
getApplication().notifyComponentInstantiationListeners(this);
this.model = wrap(model);

final IDebugSettings debugSettings =
Application.get().getDebugSettings();
if (debugSettings.getComponentUseCheck())
{
setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
MarkupException(
constructed)));
}
}

Are there any reason to do the notification in that moment?

Thanks



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Alberto Bueno
I think I cannot use this solution.
The problem in that case is that the behavior is executed in another 
moment, not in instantiation time of the component.  And the children of 
the component depend of this listener.
For this reason, the only moment where I can execute the functionality 
is in the listener, when component is instantiated.

 I've had this same issue when trying to build a component 
 instantiation listener for inspecting hibernate annotations.  Since 
 the IComponentInstantiationListener interface doesn't have a hook for 
 onModelBinding, i've tried to use Behaviors instead.  Can you try 
 something like this?

 public MyComponentInstantiationListener implements 
 IComponentInstantiationListener {
 public void onInstantiation(Component component) {
 component.add(new MyBehavior());
 }
 }

 public MyBehavior extends AbstractBehavior {
 public void bind(Component component) {
 super.bind(component);

 //inspect the model of the component and do your crazy work here
}
 }


 On 6/18/07, *Alberto Bueno* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi,

 I'm using IComponentInstantiationListener to add additional
 functionality to my components. But in this listener I need to
 know the
 model of the component to condition this functionality.
 If we inspect the code, we can see that the listeners are called
 before
 assigning the model to the component:

 public Component(final String id, final IModel model)
 {
 setId(id);
 getApplication().notifyComponentInstantiationListeners(this);
  this.model = wrap(model);

 final IDebugSettings debugSettings =
 Application.get().getDebugSettings();
 if (debugSettings.getComponentUseCheck())
 {
 setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
 MarkupException(
 constructed)));
 }
 }

 Are there any reason to do the notification in that moment?

 Thanks



 -

 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to show PDF file?

2007-06-18 Thread Tishkin, Eugene

Thank you Ernesto.
 
I've found a different solution.
 
Need 2 pages: NoPdfPage and MyPdfPage.
 
1). When hyperlink for PDF is clicked, onclick event opens a new window, which  
points to PDF url, e.g. /myapp/MyPdf.go?params_go_here (Extension doesn't 
matter. Iframes also work, just supply iframe id as a target to hyperlink or 
form); 
 
2). Create NoPdf page.
 
3). MyPdf.go maps to MyPdfPage.java
/**
 * 
 */
package ...;
 
public class MyPdfPage extends WebPage
{
 
  public MyPdfPage(PageParameters parameters) {
super(parameters);

String url = generate_url_to_pdf_file;
if(!readPdf(url)) {
  //Redirect to No Pdf page.
  this.setResponsePage(NoPdfPage.class);
}
  }
 
  private boolean readPdf(String stmtUrl) throws Exception {
final HttpServletResponse response = 
getWebRequestCycle().getWebResponse().getHttpServletResponse();
BufferedInputStream in = null;
OutputStream out = null;
 
try {
  //pdf file may locate either on the same or other box. 
  URL url = new URL(stmtUrl);
  URLConnection con = url.openConnection();
  in = new BufferedInputStream(con.getInputStream());
  //Get here if file exists
  response.setContentType(application/pdf);
  out = response.getOutputStream();
  in = new BufferedInputStream(con.getInputStream());
  int i = 0;
  byte[] bytesIn = new byte[1024];
  while ((i = in.read(bytesIn)) = 0) {
out.write(bytesIn, 0, i);
  }
  return true;
} catch (FileNotFoundException ex) {
  String errMsg = File not exists:  + stmtUrl;
  logger.info(errMsg);
  return false;
} catch (Exception ex) {
  String errMsg = Error processing file:  + stmtUrl;
  throw ex;
} finally {
  if (in != null) {
try{in.close();}catch(Exception e) {}
  }
  if (out != null) {
try{out.close();}catch(Exception e) {}
  }
}
  }
 
  /* (non-Javadoc)
   * @see wicket.Page#onRender(wicket.markup.MarkupStream)
   */
  protected void onRender(MarkupStream markupStream)
  {
  }
  

  /* (non-Javadoc)
   * @see wicket.markup.html.WebPage#configureResponse()
   */
  protected void configureResponse()
  {
  }
 
}
 
Works fine without .pdf extension and response.setHeader(Content-Disposition, 
inline; 
filename=\ + name + \);
 

Eugene
 




This e-mail and any attachments may contain confidential information. Any 
distributing, copying or reliance upon the contents of this e-mail by anyone 
other 
than the intended recipient is strictly prohibited. If you have received this 
e-mail 
accidentally, please delete it and notify the sender. Although this message has 
been 
screened for viruses, we cannot guarantee that our virus scanner will detect 
all 
viruses and take no responsibility for any damage or loss that may be caused by 
its 
contents.-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Juha Alatalo
Johan Compagner wrote:
 Yes you have :). private final static IGetAndSet getGetAndSetter(String
 exp, Class clz) has changed quite a lot.
 
   Do you have a unit test that fails now that shouldn't that i can
 add to
   the PropertyResolverTest ?
 
 No I don't.
 
 
 
 is this exception now thrown then:
 
 throw new WicketRuntimeException(The expression ' + exp
 + ' is neither an index nor is it a 
 method for the list 
 + clz);
 
 ??
 

WicketMessage: The expression 'automationEnabled' is neither an index 
nor is it a method for the list class 
syncrontech.common.gate.ModelSettingsColl

Root cause:

org.apache.wicket.WicketRuntimeException: The expression 
'automationEnabled' is neither an index nor is it a method for the list 
class syncrontech.common.gate.ModelSettingsColl
at 
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:253)
at 
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:198)
at 
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:85)


 
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] infinite loop

2007-06-18 Thread Jonathan Locke


no repro case currently.


Johan Compagner wrote:
 
 can't you debug it and break on the exception NullPointer?
 
 But i agree somehow we should log this better.
 
 On 6/18/07, Jonathan Locke [EMAIL PROTECTED] wrote:



 aha.  we might have two of these bugs, but i'm getting this trace
 now.  does
 anyone have any idea what line of code it is that is failing to print the
 stack trace for this NPE into the log?  it looks like an NPE is causing
 the
 processing step to restart over and over again.  would be a good fix to
 wicket to have it print that stack trace and not just the exception
 message.

 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - RequestCycle? - java.lang.NullPointerException?
 [10:19:01] ERROR - [default] - Servlet.service() for servlet default
 threw
 exception java.lang.IllegalStateException?: Request processing executed
 32767 steps, which means it is probably in an infinite loop.

 at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at
 org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at
 org.apache.wicket.protocol.http.WicketFilter
 ?.doGet(WicketFilter?.java:251)
 at
 org.apache.wicket.protocol.http.WicketFilter
 ?.doFilter(WicketFilter?.java:125)
 at
 org.apache.catalina.core.ApplicationFilterChain
 ?.internalDoFilter(ApplicationFilterChain?.java:202)
 at
 org.apache.catalina.core.ApplicationFilterChain
 ?.doFilter(ApplicationFilterChain?


 Al Maw wrote:
 
  I've seen this happen if you run behind a mod_proxy and fail to set up
  the ProxyPassReverse setting properly. Make sure you have
  ProxyPassReverseCookiePath, too. See the wiki for details.
 
  Al
 
  Jonathan Locke wrote:
 
  anyone have any ideas on what might cause this?  in particular can a
 user
  exception cause it or is it definitely a wicket bug?
 
  java.lang.IllegalStateException?: Request processing executed 32767
  steps,
  which means it is probably in an infinite loop.
 
  at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at
  org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at
  org.apache.wicket.protocol.http.WicketFilter
 ?.doGet(WicketFilter?.java:251)
  at
  org.apache.wicket.protocol.http.WicketFilter
 ?.doFilter(WicketFilter?.java:125)
  at
  org.apache.catalina.core.ApplicationFilterChain
 ?.internalDoFilter(ApplicationFilterChain?.java:202)
  at
  org.apache.catalina.core.ApplicationFilterChain
 ?.doFilter(ApplicationFilterChain?.java:173)
  at
  org.apache.catalina.core.StandardWrapperValve
 ?.invoke(StandardWrapperValve?.java:213)
  at
  org.apache.catalina.core.StandardContextValve
 ?.invoke(StandardContextValve?.java:178)
  at
  org.apache.catalina.core.StandardHostValve
 ?.invoke(StandardHostValve?.java:126)
  at
  org.apache.catalina.cluster.tcp.ReplicationValve
 ?.invoke(ReplicationValve?.java:346)
  at
  org.apache.catalina.valves.ErrorReportValve
 ?.invoke(ErrorReportValve?.java:105)
  at
  org.apache.catalina.core.StandardEngineValve
 ?.invoke(StandardEngineValve?.java:107)
  at
  org.apache.catalina.connector.CoyoteAdapter
 ?.service(CoyoteAdapter?.java:148)
  at
  org.apache.coyote.ajp.AjpAprProcessor
 ?.process(AjpAprProcessor?.java:425)
  at
  org.apache.coyote.ajp.AjpAprProtocol
 ?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452)
  at
  org.apache.tomcat.util.net.AprEndpoint
 ?$Worker.run(AprEndpoint?.java:1285)
  at java.lang.Thread.run(Thread.java:619)
 
 
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/infinite-loop-tf3933416.html#a11167872
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE 

Re: [Wicket-user] wicket-contrib-gmap2

2007-06-18 Thread Jeremy Thomerson

I'm just trying to use one of these two solutions in my Wicket app, and am
unsure of a couple things:

- I used gmap (original) first, and it checked out and installed super
easy.  (As a sidenote, for some reason I had to add the dependency to
javax.servlet, servlet-api, 2.3 to my POM after adding gmap to it, which I
did not need before because it was a dependency of jetty or tomcat - don't
know why that happened).
 - then, I tried to use it (i'm using wicket 1.3 from SVN HEAD).  The
example is old, and doesn't work, and when I modified it to work, I received
this exception:

WicketMessage: Cannot modify component hierarchy during render phase

Root cause:

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
during render phase
at org.apache.wicket.Component.checkHierarchyChange(Component.java:2849)
at org.apache.wicket.Component.addStateChange(Component.java:2781)
at org.apache.wicket.Component.add(Component.java:788)
at wicket.contrib.gmap.JavaScriptComponent.onComponentTag(
JavaScriptComponent.java:25)


SO - I tried gmap2.  It's not installing as easily (apparently it depends on
you having things checked out into certain places, it doesn't just have a
simple dependency on org.apache.wicket, wicket-1.3.0-INCUBATING-SNAPSHOT,
like everything else).
That's as far as I've gone.  Here's the question:

Which one is working with 1.3 right now?

Once I know that, I can try to use it, and contribute fixes that I find.
If you're curious, here's what I'm converting to Wicket:
https://www.theatdgroup.com/app/webroot/index.cfm?event=dealer-finder

Thanks!
Jeremy Thomerson





On 6/16/07, Al Maw [EMAIL PROTECTED] wrote:


I really think you guys should get together and do this, right now while
the project still has lots of momentum and the code is fresh. Having two
components, one of which seems to have a superset of the functionality
of the other, seems a little unnecessary.

I've checked gmap2 out, BTW - very nice. ;-)

Al

Iulian Costan wrote:
 yap, well done, also maybe we can put together the effort and improve
 things.

 /iulian

 On 6/14/07, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED]
 wrote:

 Hi Martin

 Well, both Iulian and me has done a lot of work on this during the last
 couple of weeks. It's always nice to see to sides of the coin, maybe we
 should pick the best stuff from our components and join up?

 Currently Iulian are working on upgrading the gmap contrib to wicket
 1.3, we decided not to make a release on wicket 1.2.6 since some of the
 ajax stuff we are using arent working on the IE browser series(I have
 another thread concering this). Upon releasing v 1 we will update
 confluence so that the features we are using will be shown installation
 instructions etc, heres a short list of features:

 All updates done via ajax, clicklisteners of all sorts(dragend,
 zoomend). Possibility to integrate loading screens. 2 step initialized
 and  refresh, meaning no visible postbacks, we are using panTo. Control
 the map serverside eg if user clicks the las vegas button the map will
 pan to that area. Add overlays at will. Create custom overlays with
 tooltips. Since we are using ajax all normal wicket ajax  behavior are
 also supported from the ajax target.

 Not sure if I forgot anything...


 regards Nino

 Martin Funk wrote:
  Hi,
 
  may I draw your attention to a little project I was allowed to add to
  the wicket-stuff svn repository yesterday.
 
  Being highly inspired by Julians and Nicos wicket-contrib-gmap I got
  exited enough to try to create a project that does the same and a
 little
  bit more with a little different approach. Kinda bold, since I
haven't
  looked into JavaScript before. Julian and Nico I hope you don't mind
  that I tried to invent the wheel a second time, but if your project
  wouldn't have been around I probably never would have tried. So thank
  you for that.
 
  Features:
  There can be more than one GMap on a page, I think there can be
 many, at
  least I succeeded with two.
 
  Components may become controls of the GMap. Any Component capable of
  firing events can become a controller. The controls are executed
  whenever the named event is fired by the Component. Currently ZooOut,
  ZoomIn, PanDirection, AddOverlay and OpenInfoWindow are implemented.
 
  Listeners may be added to the GMap. These are called whenever the
GMap
  fires the corresponding Events. So far a ClickListener and a
  MoveEndListener are implemented. This allows to dynamically update
any
  Component and the GMap itself.
 
  The events and the controls always do a round trip from the browser
to
  the server and back, this way any call can be intercepted and
 controlled
  on the server side. The network traffic is kept down, since all
needed
  JavaScript functions are defined in a js-file. So only arguments
 have to
  be transfered.
 
  Status:
  Is best described by, consolidating. As I said, being a JavaScript
  newbie and a Java mediocre, it was sort of bold to 

Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Thomas R. Corbin
On Monday 18 June 2007 2:19 am, Eelco Hillenius escreveu:
  Eelco Hillenius schrieb:
   That won't solve your problem though. You'd get the same kind of call
   back as you would get by overriding onUnbind in a custom session
   store. It won't do anything for catching the event that a user closes
   a browser without properly logging out.
 
  those methods are called either when the session timeout occurs in the
  app server (and the user closed the browser long before) or the session
  gets invalidated manually. at least my experience...

 Yes, and the same happens for AbstractHttpSessionStore#onUnbind

How do you get from the sessionId to the session itself?

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-contrib-gmap2

2007-06-18 Thread Iulian Costan

On 6/18/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:


I'm just trying to use one of these two solutions in my Wicket app, and am
unsure of a couple things:

- I used gmap (original) first, and it checked out and installed super
easy.  (As a sidenote, for some reason I had to add the dependency to
javax.servlet, servlet-api, 2.3 to my POM after adding gmap to it, which I
did not need before because it was a dependency of jetty or tomcat - don't
know why that happened).
  - then, I tried to use it (i'm using wicket 1.3 from SVN HEAD).  The
example is old, and doesn't work, and when I modified it to work, I received
this exception:



fixed, i've also updated the examples as well, please try now.

WicketMessage: Cannot modify component hierarchy during render phase


Root cause:

org.apache.wicket.WicketRuntimeException: Cannot modify component
hierarchy during render phase
at org.apache.wicket.Component.checkHierarchyChange(Component.java:2849)
at org.apache.wicket.Component.addStateChange (Component.java:2781)
at org.apache.wicket.Component.add(Component.java:788)
at wicket.contrib.gmap.JavaScriptComponent.onComponentTag(
JavaScriptComponent.java:25)


SO - I tried gmap2.  It's not installing as easily (apparently it depends
on you having things checked out into certain places, it doesn't just have a
simple dependency on org.apache.wicket, wicket-1.3.0-INCUBATING-SNAPSHOT,
like everything else).
That's as far as I've gone.  Here's the question:

Which one is working with 1.3 right now?


Once I know that, I can try to use it, and contribute fixes that I find.


If you're curious, here's what I'm converting to Wicket: 
https://www.theatdgroup.com/app/webroot/index.cfm?event=dealer-finder


Thanks!
Jeremy Thomerson





On 6/16/07, Al Maw [EMAIL PROTECTED] wrote:

 I really think you guys should get together and do this, right now while
 the project still has lots of momentum and the code is fresh. Having two

 components, one of which seems to have a superset of the functionality
 of the other, seems a little unnecessary.

 I've checked gmap2 out, BTW - very nice. ;-)

 Al

 Iulian Costan wrote:
  yap, well done, also maybe we can put together the effort and improve
  things.
 
  /iulian
 
  On 6/14/07, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED]
  wrote:
 
  Hi Martin
 
  Well, both Iulian and me has done a lot of work on this during the
 last
  couple of weeks. It's always nice to see to sides of the coin, maybe
 we
  should pick the best stuff from our components and join up?
 
  Currently Iulian are working on upgrading the gmap contrib to wicket
  1.3, we decided not to make a release on wicket 1.2.6 since some of
 the
  ajax stuff we are using arent working on the IE browser series(I have

  another thread concering this). Upon releasing v 1 we will update
  confluence so that the features we are using will be shown
 installation
  instructions etc, heres a short list of features:
 
  All updates done via ajax, clicklisteners of all sorts(dragend,
  zoomend). Possibility to integrate loading screens. 2 step
 initialized
  and  refresh, meaning no visible postbacks, we are using panTo.
 Control
  the map serverside eg if user clicks the las vegas button the map
 will
  pan to that area. Add overlays at will. Create custom overlays with
  tooltips. Since we are using ajax all normal wicket ajax  behavior
 are
  also supported from the ajax target.
 
  Not sure if I forgot anything...
 
 
  regards Nino
 
  Martin Funk wrote:
   Hi,
  
   may I draw your attention to a little project I was allowed to add
 to
   the wicket-stuff svn repository yesterday.
  
   Being highly inspired by Julians and Nicos wicket-contrib-gmap I
 got
   exited enough to try to create a project that does the same and a
  little
   bit more with a little different approach. Kinda bold, since I
 haven't
   looked into JavaScript before. Julian and Nico I hope you don't
 mind
   that I tried to invent the wheel a second time, but if your project
   wouldn't have been around I probably never would have tried. So
 thank
   you for that.
  
   Features:
   There can be more than one GMap on a page, I think there can be
  many, at
   least I succeeded with two.
  
   Components may become controls of the GMap. Any Component capable
 of
   firing events can become a controller. The controls are executed
   whenever the named event is fired by the Component. Currently
 ZooOut,
   ZoomIn, PanDirection, AddOverlay and OpenInfoWindow are
 implemented.
  
   Listeners may be added to the GMap. These are called whenever the
 GMap
   fires the corresponding Events. So far a ClickListener and a
   MoveEndListener are implemented. This allows to dynamically update
 any
   Component and the GMap itself.
  
   The events and the controls always do a round trip from the browser
 to
   the server and back, this way any call can be intercepted and
  controlled
   on the server side. The network traffic is kept down, since all
 needed

Re: [Wicket-user] wicket-contrib-gmap2

2007-06-18 Thread Jeremy Thomerson

With GMap2, how do I remove an overlay in a click event?

I need to be able to do this:

   mapPanel.addClickListener(new ClickListener() {
   private static final long serialVersionUID =
-7743409010362331350L;

   @Override
   public void clickPerformed(ClickEvent clickEvent,
AjaxRequestTarget target) {
   double lat = clickEvent.getPoint().getLat();
   double lng = clickEvent.getPoint().getLng();
   latLbl.setModelObject(lat);
   lngLbl.setModelObject(lng);
   //map.removeOverlay(memberDot); // this is the GMarker in
it's original location
   // when they click, it should remove the old one, and add
the new one in the clicked location
   map.addOverlay(new GMarker(new GLatLng(lat, lng)));
   if (target != null) {
   target.addComponent(latLbl);
   target.addComponent(lngLbl);
   target.addComponent(mapPanel);
   }
   }
   });

Thank you!
Jeremy Thomerson
On 6/13/07, Martin Funk [EMAIL PROTECTED] wrote:


Hi,

may I draw your attention to a little project I was allowed to add to
the wicket-stuff svn repository yesterday.

Being highly inspired by Julians and Nicos wicket-contrib-gmap I got
exited enough to try to create a project that does the same and a little
bit more with a little different approach. Kinda bold, since I haven't
looked into JavaScript before. Julian and Nico I hope you don't mind
that I tried to invent the wheel a second time, but if your project
wouldn't have been around I probably never would have tried. So thank
you for that.

Features:
There can be more than one GMap on a page, I think there can be many, at
least I succeeded with two.

Components may become controls of the GMap. Any Component capable of
firing events can become a controller. The controls are executed
whenever the named event is fired by the Component. Currently ZooOut,
ZoomIn, PanDirection, AddOverlay and OpenInfoWindow are implemented.

Listeners may be added to the GMap. These are called whenever the GMap
fires the corresponding Events. So far a ClickListener and a
MoveEndListener are implemented. This allows to dynamically update any
Component and the GMap itself.

The events and the controls always do a round trip from the browser to
the server and back, this way any call can be intercepted and controlled
on the server side. The network traffic is kept down, since all needed
JavaScript functions are defined in a js-file. So only arguments have to
be transfered.

Status:
Is best described by, consolidating. As I said, being a JavaScript
newbie and a Java mediocre, it was sort of bold to start this. The
features in mind I basically cut right through any API ahead of me
without taking care of any design principles. So if you ever find the
time to look into the code, give feedback! And I fear this project is in
need for a lot of feedback.

Last but not least: Installation.
There is no release currently planed. The code compiles against the
current HEAD of wicket. So get get wicket from svn as described in
http://incubator.apache.org/wicket/building-from-svn.html first.
This project relies on the well maintained structure of wickets pom.xml
files. It needs to be checked out into wicket jdk-1.5 folder:

cd wickets-jdk-1.5-folder
svn co

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2
svn co

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2-examples

This should do the install and get a jetty started for the examples:
mvn -f wicket-contrib-gmap2/pom.xml install
mvn -f wicket-contrib-gmap2-examples/pom.xml jetty:run

Now browse to:
http://localhost:8080/wicket-contrib-gmap2-examples/gmap/
and click around.


Have fun,

Martin


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread shumbola
Çäðàâñòâóéòå, Al.

Âû ïèñàëè Monday, June 18, 2007, 3:08:44 PM:

 Al Maw wrote:
 Konstantinos:
 
 Firstly, please quit replying with your own text indented with a , the
 same as the text you're quoting. It makes it really difficult to see
 what the heck is going on. ;-)
 
 Secondly, I said onbeforeunload, not onunload.

 I've just added this functionality to trunk (1.3.0-SNAPSHOT).

 You can now go:

 add(new AbstractDefaultAjaxBehavior() {

  public void renderHead(IHeaderResponse response) {
  super.renderHead(response);
  response.renderOnBeforeUnloadJavascript(
  getCallbackScript(false).toString()
  );
  }

  protected void respond(AjaxRequestTarget target) {
  // Do stuff here.
  }
 });
How to find out what was the reason for firing onbeforeunload, window
close, navigate to other place, back button, forward button, etc?
I.e. is there a way to find out the exact window close here?

 Regards,

 Al

 shumbola  mailto:[EMAIL PROTECTED]


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-contrib-gmap2

2007-06-18 Thread Jeremy Thomerson

I patched the code (my local checkout, although I'd like to see this
contributed) as follows:

   /**
* Add an overlay to this map.
*
* @see GOverlay
* @see GMarker
*
* @param overlay
*/
   public void addOverlay(GOverlay overlay)
   {
   overlay.setGMap2(this);
   overlays.add(overlay);
   }

   /**
* Remove an overlay from this map.
*
* @see GOverlay
* @see GMarker
*
* @param overlay
*/
   public void removeOverlay(GOverlay overlay)
   {
   overlays.remove(overlay);
   }

(I added the removeOverlay method)

Then, I was able to do this, which works great:
   mapPanel.addClickListener(new ClickListener() {
   private static final long serialVersionUID =
-7743409010362331350L;

   @Override
   public void clickPerformed(ClickEvent clickEvent,
AjaxRequestTarget target) {
   double lat = clickEvent.getPoint().getLat();
   double lng = clickEvent.getPoint().getLng();
   latLbl.setModelObject(lat);
   lngLbl.setModelObject(lng);
   map.removeOverlay(mMarker);
   // when they click, it should remove the old one, and add
the new one in the clicked location
   GLatLng point = new GLatLng(lat, lng);
   map.addOverlay(mMarker = new GMarker(point));
   map.setCenter(point);
   if (target != null) {
   target.addComponent(latLbl);
   target.addComponent(lngLbl);
   target.addComponent(mapPanel);
   }
   }
   });

Jeremy Thomerson
On 6/18/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:


With GMap2, how do I remove an overlay in a click event?

I need to be able to do this:

mapPanel.addClickListener(new ClickListener() {
private static final long serialVersionUID =
-7743409010362331350L;

@Override
public void clickPerformed(ClickEvent clickEvent,
AjaxRequestTarget target) {
double lat = clickEvent.getPoint().getLat();
double lng = clickEvent.getPoint ().getLng();
latLbl.setModelObject(lat);
lngLbl.setModelObject(lng);
//map.removeOverlay(memberDot); // this is the GMarker in
it's original location
// when they click, it should remove the old one, and add
the new one in the clicked location
map.addOverlay(new GMarker(new GLatLng(lat, lng)));
if (target != null) {
target.addComponent(latLbl);
target.addComponent(lngLbl);
target.addComponent(mapPanel);
}
}
});

Thank you!
Jeremy Thomerson
On 6/13/07, Martin Funk  [EMAIL PROTECTED] wrote:

 Hi,

 may I draw your attention to a little project I was allowed to add to
 the wicket-stuff svn repository yesterday.

 Being highly inspired by Julians and Nicos wicket-contrib-gmap I got
 exited enough to try to create a project that does the same and a little
 bit more with a little different approach. Kinda bold, since I haven't
 looked into JavaScript before. Julian and Nico I hope you don't mind
 that I tried to invent the wheel a second time, but if your project
 wouldn't have been around I probably never would have tried. So thank
 you for that.

 Features:
 There can be more than one GMap on a page, I think there can be many, at
 least I succeeded with two.

 Components may become controls of the GMap. Any Component capable of
 firing events can become a controller. The controls are executed
 whenever the named event is fired by the Component. Currently ZooOut,
 ZoomIn, PanDirection, AddOverlay and OpenInfoWindow are implemented.

 Listeners may be added to the GMap. These are called whenever the GMap
 fires the corresponding Events. So far a ClickListener and a
 MoveEndListener are implemented. This allows to dynamically update any
 Component and the GMap itself.

 The events and the controls always do a round trip from the browser to
 the server and back, this way any call can be intercepted and controlled
 on the server side. The network traffic is kept down, since all needed
 JavaScript functions are defined in a js-file. So only arguments have to

 be transfered.

 Status:
 Is best described by, consolidating. As I said, being a JavaScript
 newbie and a Java mediocre, it was sort of bold to start this. The
 features in mind I basically cut right through any API ahead of me
 without taking care of any design principles. So if you ever find the
 time to look into the code, give feedback! And I fear this project is in
 need for a lot of feedback.

 Last but not least: Installation.
 There is no release currently planed. The code compiles against the
 current HEAD of wicket. So get get wicket from svn as described in
 http://incubator.apache.org/wicket/building-from-svn.html first.
 This project relies on the well maintained 

Re: [Wicket-user] London Wicket Users Group, July 3rd - interested?

2007-06-18 Thread wfaler

Crap! 10th of July and I would have been there.. :)

..unfortunately away in sunnier climes 1-9th of July.. :(

However, feel free to e-mail me about future events or things of
Wicket-interest at wille.faler (a t) gmail.com


Al Maw wrote:
 
 
 Hello everyone,
 
 As Wicket grows in popularity, we bump into increasing numbers of UK 
 users. We think there are enough of you out there to set up a 
 London-based users group, so this e-mail is to gauge interest in that.
 
 We're proposing an initial meet on Tuesday 3rd July in a reasonably 
 central location. Although I'm sure there will be plenty of room for 
 having a pint and a chat, we'd also like to bring some real value to 
 people, so are proposing to kick off with a couple of short talks.
 
 There will probably be an introductory talk and a more advanced one. 
 Topics are yet to be decided - please tell us if you have any ideas on 
 what you'd like covering, or if would like to contribute a short talk, 
 presentation, demo or whatever else.
 
 For example, we could cover:
 
 Beginner - Aimed at new users; basic Models and validation.
 Some sprinklings of AJAX.
 
 Advanced - Implementing custom form validators, invoking them using
 AJAX, using CSS component highlighting for errors, making
 it all automatic for a given Form.
 
 If any of that sounds like your kind of thing, please tell us!
 
 If enough people are interested to make this a goer, we'll organise a 
 venue and sign-up list some time next week. Just hit reply and post a 
 yes please or similar on this thread.
 
 
 Best regards,
 
 Al
 
 -- 
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Users-Group%2C-July-3rd---interested--tf3924587.html#a11178880
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] issue with iframes custom pagemap on 1.3 beta1

2007-06-18 Thread Tom Desmet
Hi all,

I want to use an InlineFrame with a custom pagemap.
I created some simple demo code to illustrate, but I have some problems 
with it ...

To create an InlineFrame with custom pagemap, there was the possibility to 
choose from three different constructors on InlineFrame ...

1.  -- public InlineFrame(final String id, final IPageMap pageMap, final 
Class c) 
This one is unusable to me as I cannot pass any constructor parameters for 
page creation.

2. -- public InlineFrame(final String id, final IPageMap pageMap, final 
Page page)
I tried this one, by first creating my page as follows ...

Page iframePage=Session.get().getPageFactory().newPage(IframePage.class, 
pageParameters);
final InlineFrame iFrame =new 
InlineFrame(iframePage,PageMap.forName(IFRAME_PAGEMAP), iframePage); 

If I use this, the pagemap is not initialized correctly in the subframe 
(it's null, same as my main pagemap)

3. -- public InlineFrame(final String id, final IPageMap pageMap, 
IPageLink pageLink)
This one works, but is not very practical to code ...

final InlineFrame iFrame = new InlineFrame(iframePage,
  PageMap.forName(IFRAME_PAGEMAP),
  new IPageLink() {
public Page getPage() {
  return 
Session.get().getPageFactory().newPage(iframePageClass,
  pageParameters);
}

public Class getPageIdentity() {
  return iframePageClass;
}
  });

So the question for you guys is the following ...
Am I doing something totally wrong here,
or if this is a correct way to deal with iframes?

Is the second constructor supposed to work?
Is this an issue or am I trying to create the page at the wrong time in 
program flow?

Is it possible to add a constructor to InlineFrame that takes following 
parameters ...
InlineFrame, PageMap, PageClass, PageParameters

Is this an option to have such a constructor?
I'm fairly new to wicket, so please do not hesitate to point out my 
mistakes.
Thank you in advance for taking the time to look at this.


Code included ...


= mainpage.java =

package com.tvh.test;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitButton;
import org.apache.wicket.ajax.AjaxRequestTarget;
import java.util.Map;
import java.util.HashMap;
import org.apache.wicket.markup.html.link.InlineFrame;
import org.apache.wicket.PageMap;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.IPageLink;
import org.apache.wicket.Session;
import org.apache.wicket.Page;
import org.apache.wicket.model.Model;
import com.tvh.test.MainPage.InputForm;
import org.apache.wicket.markup.html.basic.Label;

public class MainPage
extends WebPage {
  private static final String IFRAME_PAGEMAP = iframePageMap;
  public MainPage() {
TestBean testBean = new TestBean(initValOne, initValTwo);
add(new InputForm(inputForm, new CompoundPropertyModel(testBean)));
add(new Label(pageMap, new Model(getPageMap(;
final InlineFrame iFrame = new InlineFrame(iframePage,
 PageMap.forName(IFRAME_PAGEMAP),
   IframePage.class);
iFrame.setOutputMarkupId(true);
add(iFrame);
  }

  public class InputForm
  extends Form {
public InputForm(String id, IModel model) {
  super(id, model);
  final TestBean testBean = (TestBean) getModel().getObject();
  add(new TextField(valueOne));
  add(new TextField(valueTwo));
  add(new AjaxSubmitButton(ajaxSubmitButton, this) {
protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form 
form) {
  Map pageParameterMap = new HashMap();
  pageParameterMap.put(passthrValOne, testBean.getValueOne());
  pageParameterMap.put(passthrValTwo, testBean.getValueTwo());

  final PageParameters pageParameters = new PageParameters(
  pageParameterMap);
  final Class iframePageClass = IframePage.class;

  final InlineFrame iFrame = new InlineFrame(iframePage,
  PageMap.forName(IFRAME_PAGEMAP),
  new IPageLink() {
public Page getPage() {
  return 
Session.get().getPageFactory().newPage(iframePageClass,
  pageParameters);
}

public Class getPageIdentity() {
  return iframePageClass;
}
  });
  iFrame.setOutputMarkupId(true);
  MainPage.this.replace(iFrame);

  ajaxRequestTarget.addComponent(form);
  ajaxRequestTarget.addComponent(iFrame);
}
  });
}
  }
}

= mainpage.html =

html
  headMain Page/head
  body
h1Main Page/h1
PageMap: span wicket:id=pageMap/spanbr/
form wicket:id=inputForm
Value one: input 

Re: [Wicket-user] handling expiring pages

2007-06-18 Thread Igor Vaynberg

it really depends on what you consider a reasonable while. two hours? six
hours? ten hours? set your session timeout to that period and you wont have
a problem - configure your container to swap idle session to disk.

if you have pages in your app that you consider reasonable to abandon for a
while then the only requirement is to have bookmarkable links on those
pages. however, the backbutton still wont work.

-igor


On 6/18/07, Pieter Cogghe [EMAIL PROTECTED] wrote:


Hi,

As a result of how wicket stores pages in the session, links and pages do
expire quite often. I read a lot about it in the mailinglist archive, but
I'm still unsure how to handle it. It just seems very weird to run in to the
page expired message all the time. It's such a bad user experience: you
got to some page by some actions in the browser. For some time you leave the
browser for what it is, doing something else. You get back to your browser,
everything seems fine. You click a link and BAM: you get directed to the
home page, completely loosing track from where you was.

Solutions I found:

- only use bookmarkable links, stateless pages - can't use a lot of the
wicket-goodness, no stateless forms in 1.2 (?)
- keep pages alive with an ajax ping (doesn't help for the back button)

When do you use stateless pages and when statefull pages? Let's say I've
got this site structure:

mysite/login
mysite/home
mysite/songs/... (search, view, edit, add songs)
mysite/books/... (search, view, edit, add books)

Every action requires the user to be logged in!

Consider the following scenario's:

1
---
User Frederick logs in, searches the book Snales and other monsters and
views the details for that book. He gets distracted by the pineapple at his
desk for quite a while. He gets his attention back to the screen and clicks
to edit the book Snales and other monsters he was viewing before. He gets
redirected to the login page because the session has expired. He logs in and
gets automatically redirected to the edit form for the book Snales and
other monsters.

2 (nearly the same, but with a form)
---
User Sarah logs in, searches a song Anton aus Tirol and starts editing
the song data, but doesn't submit the data. She gets away from her desk and
when she returns everyting seems fine to her. She continues editing the data
of Anton aus Tirol and submits. Her session has expired, so she gets
redirected to the login page. She logs in again and the data she wanted to
submit get submitted by the application. Sarah is shown the new data of
Anton aus Tirol, which she submitted.

I guess the behaviour I want to achieve is only possible by using
stateless pages and bookmarkable links. Redirecting to the login page is no
problem ( setPageExpiredErrorPage*)*. How do I redirect users to the page
they left, after they logged in again and secondly how do I preserve
submitted data and submit it after the user logged in again?

thanks a lot,

Pieter

--
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] infinite loop

2007-06-18 Thread Jonathan Locke


how could it be set up incorrectly?  we got the message part of the NPE
just not the stack trace. 


Eelco Hillenius wrote:
 
 could it be this code that's not logging the whole exception?

 protected void logRuntimeException(RuntimeException e)
 {
 log.error(e.getMessage(), e);
 }
 
 That should typically print the stack trace if your logging
 configuration is set up properly.
 
 Eelco
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/infinite-loop-tf3933416.html#a11179559
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] how to detect http session expiry - timeout due to no user activity

2007-06-18 Thread Eelco Hillenius
 though it implements the HttpSessionBindingListener and not the 
 HttpSessionListener.
 i guess the difference between both ist, that the binding listener only 
 realizes and observes which
 values of the session are bound and the session listener recognizes if a 
 session itself is created
 or destroyed.

Yep. Another difference is that HttpSessionListener needs to be
configured in web.xml and HttpSessionBindingListener doesn't. So from
Wicket's point of view, HttpSessionBindingListener works good because
clients don't need to know about it. But HttpSessionListener might be
more what you want, in which case you can simply implement and install
it.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Eelco Hillenius
There is now - since a few weeks - also
org.apache.wicket.application.IComponentOnBeforeRenderListener, which
may suit your needs better.

We (Teachscape) use it like:

public final class ValidationListener implements
IComponentOnBeforeRenderListener {

  public void onBeforeRender(Component component) {
if (component instanceof FormComponent  !component.hasBeenRendered()) {
  // add validators
  processComponent((FormComponent) component);
}
}

and in our application's init method:

addComponentOnBeforeRenderListener(new ValidationListener());


Eelco

On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
 Hi,

 I'm using IComponentInstantiationListener to add additional
 functionality to my components. But in this listener I need to know the
 model of the component to condition this functionality.
 If we inspect the code, we can see that the listeners are called before
 assigning the model to the component:

 public Component(final String id, final IModel model)
 {
 setId(id);
 getApplication().notifyComponentInstantiationListeners(this);
 this.model = wrap(model);

 final IDebugSettings debugSettings =
 Application.get().getDebugSettings();
 if (debugSettings.getComponentUseCheck())
 {
 setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
 MarkupException(
 constructed)));
 }
 }

 Are there any reason to do the notification in that moment?

 Thanks



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] issue with iframes custom pagemap on 1.3 beta1

2007-06-18 Thread Igor Vaynberg

the second constructor doesnt really make sense. imho it should be removed.

for it to work your page needs to have a constructor that takes a pagemap so
you can do

ipagemap map=new PageMap.forName(foo);
new InlineFrame(id, map, new MyPage(map)) where MyPage() { super(map); }

the third constructor can be used like this:

new InlineFrame(id, PageMap.forName(foo), new ipagelink() { getpage() {
return new mypage(params); } ...}

but i also think that instead of taking ipagemap directly it should take a
string name of the pagemap.

could you please add a jira issue for this?

-igor


On 6/18/07, Tom Desmet [EMAIL PROTECTED] wrote:



Hi all,

I want to use an InlineFrame with a custom pagemap.
I created some simple demo code to illustrate, but I have some problems
with it ...

To create an InlineFrame with custom pagemap, there was the possibility to
choose from three different constructors on InlineFrame ...

1.  -- public InlineFrame(final String id, final IPageMap pageMap, final
Class c)
This one is unusable to me as I cannot pass any constructor parameters for
page creation.

2. -- public InlineFrame(final String id, final IPageMap pageMap, final
Page page)
I tried this one, by first creating my page as follows ...

Page iframePage=Session.get().getPageFactory().newPage(IframePage.class,
pageParameters);
final InlineFrame iFrame =new 
InlineFrame(iframePage,PageMap.forName(IFRAME_PAGEMAP),
iframePage);

If I use this, the pagemap is not initialized correctly in the subframe
(it's null, same as my main pagemap)

3. -- public InlineFrame(final String id, final IPageMap pageMap,
IPageLink pageLink)
This one works, but is not very practical to code ...

final InlineFrame iFrame = new InlineFrame(iframePage,
  PageMap.forName(IFRAME_PAGEMAP),
  new IPageLink() {
public Page getPage() {
  return Session.get
().getPageFactory().newPage(iframePageClass,
  pageParameters);
}

public Class getPageIdentity() {
  return iframePageClass;
}
  });

So the question for you guys is the following ...
Am I doing something totally wrong here,
or if this is a correct way to deal with iframes?

Is the second constructor supposed to work?
Is this an issue or am I trying to create the page at the wrong time in
program flow?

Is it possible to add a constructor to InlineFrame that takes following
parameters ...
InlineFrame, PageMap, PageClass, PageParameters

Is this an option to have such a constructor?
I'm fairly new to wicket, so please do not hesitate to point out my
mistakes.
Thank you in advance for taking the time to look at this.


Code included ...


= mainpage.java =

package com.tvh.test;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitButton;
import org.apache.wicket.ajax.AjaxRequestTarget;
import java.util.Map;
import java.util.HashMap;
import org.apache.wicket.markup.html.link.InlineFrame;
import org.apache.wicket.PageMap;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.IPageLink;
import org.apache.wicket.Session;
import org.apache.wicket.Page;
import org.apache.wicket.model.Model;
import com.tvh.test.MainPage.InputForm;
import org.apache.wicket.markup.html.basic.Label;

public class MainPage
extends WebPage {
  private static final String IFRAME_PAGEMAP = iframePageMap;
  public MainPage() {
TestBean testBean = new TestBean(initValOne, initValTwo);
add(new InputForm(inputForm, new CompoundPropertyModel(testBean)));
add(new Label(pageMap, new Model(getPageMap(;
final InlineFrame iFrame = new InlineFrame(iframePage,
   PageMap.forName
(IFRAME_PAGEMAP),
   IframePage.class);
iFrame.setOutputMarkupId(true);
add(iFrame);
  }

  public class InputForm
  extends Form {
public InputForm(String id, IModel model) {
  super(id, model);
  final TestBean testBean = (TestBean) getModel().getObject();
  add(new TextField(valueOne));
  add(new TextField(valueTwo));
  add(new AjaxSubmitButton(ajaxSubmitButton, this) {
protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form
form) {
  Map pageParameterMap = new HashMap();
  pageParameterMap.put(passthrValOne, testBean.getValueOne());
  pageParameterMap.put(passthrValTwo, testBean.getValueTwo());

  final PageParameters pageParameters = new PageParameters(
  pageParameterMap);
  final Class iframePageClass = IframePage.class;

  final InlineFrame iFrame = new InlineFrame(iframePage,
  PageMap.forName(IFRAME_PAGEMAP),
  new 

Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Alberto Bueno
I know IComponentOnBeforeRenderListener, but I cannot use this
interface, because I need to condition
the instantiation of the children of my component, depending of the
functionality of the Listener.
And if I use IComponentOnBeforeRenderListener, the instantiation has
been finished when the interface
is called.
The best moment to use this functionality is in the
IComponentInstantiationListener... because any children
have been still instantiated.

 There is now - since a few weeks - also
 org.apache.wicket.application.IComponentOnBeforeRenderListener, which
 may suit your needs better.

 We (Teachscape) use it like:

 public final class ValidationListener implements
 IComponentOnBeforeRenderListener {

   public void onBeforeRender(Component component) {
 if (component instanceof FormComponent  !component.hasBeenRendered()) {
   // add validators
   processComponent((FormComponent) component);
 }
 }

 and in our application's init method:

 addComponentOnBeforeRenderListener(new ValidationListener());


 Eelco

 On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 Hi,

 I'm using IComponentInstantiationListener to add additional
 functionality to my components. But in this listener I need to know the
 model of the component to condition this functionality.
 If we inspect the code, we can see that the listeners are called before
 assigning the model to the component:

 public Component(final String id, final IModel model)
 {
 setId(id);
 getApplication().notifyComponentInstantiationListeners(this);
 this.model = wrap(model);

 final IDebugSettings debugSettings =
 Application.get().getDebugSettings();
 if (debugSettings.getComponentUseCheck())
 {
 setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
 MarkupException(
 constructed)));
 }
 }

 Are there any reason to do the notification in that moment?

 Thanks



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Eelco Hillenius
I think we could move the wrap up:

setId(id);
this.model = wrap(model);
getApplication().notifyComponentInstantiationListeners(this);

I can't really think of anything that would go wrong because of that
(wrap is final), and it doesn't result in test failures or does it
cause anything to go wrong with the app I'm working on. So I committed
this change.

Hope that helps you.

Eelco


On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
 I know IComponentOnBeforeRenderListener, but I cannot use this
 interface, because I need to condition
 the instantiation of the children of my component, depending of the
 functionality of the Listener.
 And if I use IComponentOnBeforeRenderListener, the instantiation has
 been finished when the interface
 is called.
 The best moment to use this functionality is in the
 IComponentInstantiationListener... because any children
 have been still instantiated.

  There is now - since a few weeks - also
  org.apache.wicket.application.IComponentOnBeforeRenderListener, which
  may suit your needs better.
 
  We (Teachscape) use it like:
 
  public final class ValidationListener implements
  IComponentOnBeforeRenderListener {
 
public void onBeforeRender(Component component) {
  if (component instanceof FormComponent  !component.hasBeenRendered()) 
  {
// add validators
processComponent((FormComponent) component);
  }
  }
 
  and in our application's init method:
 
  addComponentOnBeforeRenderListener(new ValidationListener());
 
 
  Eelco
 
  On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I'm using IComponentInstantiationListener to add additional
  functionality to my components. But in this listener I need to know the
  model of the component to condition this functionality.
  If we inspect the code, we can see that the listeners are called before
  assigning the model to the component:
 
  public Component(final String id, final IModel model)
  {
  setId(id);
  getApplication().notifyComponentInstantiationListeners(this);
  this.model = wrap(model);
 
  final IDebugSettings debugSettings =
  Application.get().getDebugSettings();
  if (debugSettings.getComponentUseCheck())
  {
  setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
  MarkupException(
  constructed)));
  }
  }
 
  Are there any reason to do the notification in that moment?
 
  Thanks
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Igor Vaynberg

i do not think we will allow what you want here.

this listener is invoked during the construction of the component, it is
really UNSAFE to call any methods on that component because it is still
being constructed. the only safe method to call is getid(), thats it. that
much is expressed in the javadoc.

that argument should have been Class? extends Component instead of
Component, but for various reasons that have to do with resource injection
we have conceeded and made it Component - that doesnt mean you can go and
start calling whatever methods you want on it.

besides, what if i do new Component().setModel(foo) instead of new
Component(id, foo); then your instantiation listener is out of luck anyways.
the only good way is to add a behavior like was suggested and intercept at
proper points. of course without knowing your exact usecase its hard to
help.

-igor



On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:


I know IComponentOnBeforeRenderListener, but I cannot use this
interface, because I need to condition
the instantiation of the children of my component, depending of the
functionality of the Listener.
And if I use IComponentOnBeforeRenderListener, the instantiation has
been finished when the interface
is called.
The best moment to use this functionality is in the
IComponentInstantiationListener... because any children
have been still instantiated.

 There is now - since a few weeks - also
 org.apache.wicket.application.IComponentOnBeforeRenderListener, which
 may suit your needs better.

 We (Teachscape) use it like:

 public final class ValidationListener implements
 IComponentOnBeforeRenderListener {

   public void onBeforeRender(Component component) {
 if (component instanceof FormComponent 
!component.hasBeenRendered()) {
   // add validators
   processComponent((FormComponent) component);
 }
 }

 and in our application's init method:

 addComponentOnBeforeRenderListener(new ValidationListener());


 Eelco

 On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:

 Hi,

 I'm using IComponentInstantiationListener to add additional
 functionality to my components. But in this listener I need to know the
 model of the component to condition this functionality.
 If we inspect the code, we can see that the listeners are called before
 assigning the model to the component:

 public Component(final String id, final IModel model)
 {
 setId(id);
 getApplication().notifyComponentInstantiationListeners(this);
 this.model = wrap(model);

 final IDebugSettings debugSettings =
 Application.get().getDebugSettings();
 if (debugSettings.getComponentUseCheck())
 {
 setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
 MarkupException(
 constructed)));
 }
 }

 Are there any reason to do the notification in that moment?

 Thanks




-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Igor Vaynberg

gah!

wrap() is final. but getmodel() calls initmodel() which is not! we are just
heading for a lot of trouble if we allow this! we are dealing with
unconstructed objects here, we should be as strict as possible.

and who is to say wrap() will stay final, that looks like a pretty handy
method to have nonfinal if you want to post/preprocess the model in some
way.

-igor


On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


I think we could move the wrap up:

setId(id);
this.model = wrap(model);

getApplication().notifyComponentInstantiationListeners(this);

I can't really think of anything that would go wrong because of that
(wrap is final), and it doesn't result in test failures or does it
cause anything to go wrong with the app I'm working on. So I committed
this change.

Hope that helps you.

Eelco


On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
 I know IComponentOnBeforeRenderListener, but I cannot use this
 interface, because I need to condition
 the instantiation of the children of my component, depending of the
 functionality of the Listener.
 And if I use IComponentOnBeforeRenderListener, the instantiation has
 been finished when the interface
 is called.
 The best moment to use this functionality is in the
 IComponentInstantiationListener... because any children
 have been still instantiated.

  There is now - since a few weeks - also
  org.apache.wicket.application.IComponentOnBeforeRenderListener, which
  may suit your needs better.
 
  We (Teachscape) use it like:
 
  public final class ValidationListener implements
  IComponentOnBeforeRenderListener {
 
public void onBeforeRender(Component component) {
  if (component instanceof FormComponent 
!component.hasBeenRendered()) {
// add validators
processComponent((FormComponent) component);
  }
  }
 
  and in our application's init method:
 
  addComponentOnBeforeRenderListener(new ValidationListener());
 
 
  Eelco
 
  On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I'm using IComponentInstantiationListener to add additional
  functionality to my components. But in this listener I need to know
the
  model of the component to condition this functionality.
  If we inspect the code, we can see that the listeners are called
before
  assigning the model to the component:
 
  public Component(final String id, final IModel model)
  {
  setId(id);
  getApplication().notifyComponentInstantiationListeners(this);
  this.model = wrap(model);
 
  final IDebugSettings debugSettings =
  Application.get().getDebugSettings();
  if (debugSettings.getComponentUseCheck())
  {
  setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this,
new
  MarkupException(
  constructed)));
  }
  }
 
  Are there any reason to do the notification in that moment?
 
  Thanks
 
 
 
 
-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take

Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Eelco Hillenius
 wrap() is final. but getmodel() calls initmodel() which is not!

Yeah, but that isn't called in wrap, so whatever he is doing in the
listener, it won't be broken more than it would be now.

 we are just
 heading for a lot of trouble if we allow this! we are dealing with
 unconstructed objects here, we should be as strict as possible.

Yeah, that's been the danger with that listener from the beginning. So
we either keep it as strict as possible (though we should always set
the id) and limit the things you can do with it, or we add this case,
which may help out people, but possibly open up a can of worms.

 and who is to say wrap() will stay final, that looks like a pretty handy
 method to have nonfinal if you want to post/preprocess the model in some
 way.

If that is the case, that call shouldn't be made before calling the
listener. Otoh, we've been here before, discussing methods that might
be non-final someday. If I look at that method, I currently see no
good reason to ever remove final tbh. Whatever the wrapping does, it
is delegated to that model, which gets the component passed in.
Opening up wrap would make the idea of wrapping much fuzzier, as now
it's not only an extension point of models, but also of components!

Anyway, if you are serious, and think you can imagine good use cases,
we should roll back the change and remove final on wrap.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Eelco Hillenius
Alberto, it would be interesting to learn what exactly you plan to do.
The before render listener should be pretty useful actually, also if
you want to add behaviors or set properties of components etc. The
construction of the components is one thing, but as long as they are
not rendered yet, it is still possible to change some of their
behavior.

Eelco


On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  wrap() is final. but getmodel() calls initmodel() which is not!

 Yeah, but that isn't called in wrap, so whatever he is doing in the
 listener, it won't be broken more than it would be now.

  we are just
  heading for a lot of trouble if we allow this! we are dealing with
  unconstructed objects here, we should be as strict as possible.

 Yeah, that's been the danger with that listener from the beginning. So
 we either keep it as strict as possible (though we should always set
 the id) and limit the things you can do with it, or we add this case,
 which may help out people, but possibly open up a can of worms.

  and who is to say wrap() will stay final, that looks like a pretty handy
  method to have nonfinal if you want to post/preprocess the model in some
  way.

 If that is the case, that call shouldn't be made before calling the
 listener. Otoh, we've been here before, discussing methods that might
 be non-final someday. If I look at that method, I currently see no
 good reason to ever remove final tbh. Whatever the wrapping does, it
 is delegated to that model, which gets the component passed in.
 Opening up wrap would make the idea of wrapping much fuzzier, as now
 it's not only an extension point of models, but also of components!

 Anyway, if you are serious, and think you can imagine good use cases,
 we should roll back the change and remove final on wrap.

 Eelco


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] getting an NS_ERROR_NOT_AVAILABLE in ff 2.0.0.4

2007-06-18 Thread carbonbasednerd

I saw there was another message posted about this being a problem with ff
1.0.6 and the wikki states that ff 1.5* has only been verified working with
ajax.  That being said, I'm using ff 2.0.04 and I am occasionally getting
this error:

Error: [Exception... Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]  nsresult: 0x80040111
(NS_ERROR_NOT_AVAILABLE)  location: JS frame ::
http://qa-major2:10001/resources/wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js
:: anonymous :: line 626  data: no]
Source File:
http://qa-major2:10001/resources/wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax.js
Line: 626

the component this is happening on is a home grown nested paging table.  
When the page loads the first time there is no problem.  When we use our
paging controls(which extend the AjaxPagingNavigator) is when we will
occasionally see this happening. And once this error happens, the links to
expand the row (not surprisingly) return wicketAjaxGet is not defined.
Any ideas where I should look to figure this out?

* may be nothing but it seems like this issue only happens on pages that
also use the datepicker.

thanks in advance for the help.
-- 
View this message in context: 
http://www.nabble.com/getting-an-NS_ERROR_NOT_AVAILABLE-in-ff-2.0.0.4-tf3942387.html#a11182629
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Igor Vaynberg

On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 wrap() is final. but getmodel() calls initmodel() which is not!

Yeah, but that isn't called in wrap, so whatever he is doing in the
listener, it won't be broken more than it would be now.



no, it isnt called in wrap. but the reason he wants this is to access the
model, so i would imagine a call to getmodel() from within the listener isnt
far behind.

the only reason i agreed to allow to set the id is that getid() is the only
way to get to it, it is a simple field and getid() is final - so all paths
to that are final as well.

-igor
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Eelco Hillenius
 no, it isnt called in wrap. but the reason he wants this is to access the
 model, so i would imagine a call to getmodel() from within the listener isnt
 far behind.

True, but this is not directly related to whether wrap can be called
there or not.

 the only reason i agreed to allow to set the id is that getid() is the only
 way to get to it, it is a simple field and getid() is final - so all paths
 to that are final as well.

Yes, that was my reasoning when I implemented it like that. But wrap
didn't exist yet so I obviously didn't have an opinion about that.

Anyway, roll back?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Igor Vaynberg

i say rollback. i dont want to have a can of worms opened this late in the
game. lets wait for his usecase, it might even be doable without this thing.

-igor


On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 no, it isnt called in wrap. but the reason he wants this is to access
the
 model, so i would imagine a call to getmodel() from within the listener
isnt
 far behind.

True, but this is not directly related to whether wrap can be called
there or not.

 the only reason i agreed to allow to set the id is that getid() is the
only
 way to get to it, it is a simple field and getid() is final - so all
paths
 to that are final as well.

Yes, that was my reasoning when I implemented it like that. But wrap
didn't exist yet so I obviously didn't have an opinion about that.

Anyway, roll back?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Eelco Hillenius
 Anyway, roll back?

Done. I agree with Igor after haven given it a bit of thought.

Sorry Alberto, if you give us more details on your use case we can try
to find another way.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [wicket-datetime] fire onchange() after date was selected with datepicker

2007-06-18 Thread Gerolf Seitz

thx for fixing it.
using a method is obviously better, too.

gerolf

On 6/18/07, Gerolf Seitz [EMAIL PROTECTED] wrote:


done
checkout https://issues.apache.org/jira/browse/WICKET-661

gerolf

On 6/17/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

  hi,
  sometimes i'd like the datepicker to fire the onchange event of the
  component it's bound to.
  it doesn't seem to do it ootb.
 
  the main fix would probably only meen to call the onchange() method of
 the
  targetcomponent after the call to cal.hide() (line 236 in
 DatePicker.java)
 
  i could also imagine making this optional, by adding a constructor
  DatePicker(boolean notifyOnSelect) and setting the default to false to
 not
  break existing code.
 
  any comments? should i open a jira issue with a patch?

 Yes please.

 Eelco


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AjaxLink works in FF2,IE7, Page Expired in IE6

2007-06-18 Thread Matej Knopp
Weird, wicket-ajax works for me well in IE6.

-Matej

On 6/17/07, Thies Edeling [EMAIL PROTECTED] wrote:
 AjaxLink works in FF2 and IE7, however in IE6 I get a Page Expired
 immediately. I saw some previous threads about the jsessionid not set
 but I doubt this is the same problem as it works in ff2/ie7. Any ideas?

 gr,
 Thies


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Customer management of site after development is completed

2007-06-18 Thread Tauren Mills
Earlier I asked how to relocate html, css, and other resources away
from the Java code and Al Maw gave me some good help in IRC.  In our
conversation, he helped me to realize that the approach I was planning
would not work the way I had desired.  I'd like to find out how others
on the list have handled this situation for their clients.

I am building a simple wicket database app for a client.  The client
would like to be able to update the static content on the site.  In
addition, she would like to change the site design in the distant
future if she wants a new look down the road.

She is not a programmer or designer in the least.  She built her
original site with FrontPage (ick!) and would like to be able to
continue editing her site.  I've made it clear that she will no
longer be able to use FrontPage, but that I will provider her with a
way to make edits to her site.

One of the main reasons I like wicket is because of the pure
separation of layout and logic. But how does one go about giving
access to the layout to an unskilled person?  She could easily mess up
the component hierarchy in the html.  And she certainly doesn't know
how to deploy a war file.

I've thought about creating a simple CMS system for the static
content in the html pages. But that really isn't in the scope of the
project.  Maybe it should be. I could extract all static content
into properties files and use Labels all over, then have the app
search for properties files somewhere external from the war on the web
server.  But neither of these will help if she wants to redesign the
layout of the site and needs to edit the html/css.

Basically, I need to be able to finish this project and walk away from
it.  I don't want to forever more be her webmaster whenever she
wants little changes made to the site.

How would you handle this?  I'd love some ideas.

Thanks,
Tauren

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Customer management of site after development is completed

2007-06-18 Thread Rüdiger Schulz

In my (humble) oponion, I'd say this is hardly possible, at least not in a
satisfactory way. You will have to find some compromise with your customer
on what parts can be redesigned and which not. Sure, there are good ways
to edit a Wicket application say with Dreamweaver. But still you have to
consider the component hierarchie and possibly some Markup hierarchie.

To ease the pain, you could provide her with Junit tests and a linked batch
file, so that she can test beforehand, and maybe fix some stuff - if she can
interpret the error messages correctly.

Maybe your best bet is if you just say that the layout can be changed by CSS
only. Show her csszengarden.com. Many things can be done with CSS, if your
HTML is generic enough. For easy maintence you could provide a little form
where the CSS can be uploaded and changed. And it's harder to completely
mess up in CSS.

HTH,

Rüdiger

2007/6/18, Tauren Mills [EMAIL PROTECTED]:


Earlier I asked how to relocate html, css, and other resources away
from the Java code and Al Maw gave me some good help in IRC.  In our
conversation, he helped me to realize that the approach I was planning
would not work the way I had desired.  I'd like to find out how others
on the list have handled this situation for their clients.

I am building a simple wicket database app for a client.  The client
would like to be able to update the static content on the site.  In
addition, she would like to change the site design in the distant
future if she wants a new look down the road.

She is not a programmer or designer in the least.  She built her
original site with FrontPage (ick!) and would like to be able to
continue editing her site.  I've made it clear that she will no
longer be able to use FrontPage, but that I will provider her with a
way to make edits to her site.

One of the main reasons I like wicket is because of the pure
separation of layout and logic. But how does one go about giving
access to the layout to an unskilled person?  She could easily mess up
the component hierarchy in the html.  And she certainly doesn't know
how to deploy a war file.

I've thought about creating a simple CMS system for the static
content in the html pages. But that really isn't in the scope of the
project.  Maybe it should be. I could extract all static content
into properties files and use Labels all over, then have the app
search for properties files somewhere external from the war on the web
server.  But neither of these will help if she wants to redesign the
layout of the site and needs to edit the html/css.

Basically, I need to be able to finish this project and walk away from
it.  I don't want to forever more be her webmaster whenever she
wants little changes made to the site.

How would you handle this?  I'd love some ideas.

Thanks,
Tauren

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
greetings from Berlin,

Rüdiger Schulz

www.2rue.de
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Customer management of site after development is completed

2007-06-18 Thread Eelco Hillenius
 I've thought about creating a simple CMS system for the static
 content in the html pages. But that really isn't in the scope of the
 project.  Maybe it should be. I could extract all static content
 into properties files and use Labels all over, then have the app
 search for properties files somewhere external from the war on the web
 server.  But neither of these will help if she wants to redesign the
 layout of the site and needs to edit the html/css.

If I were in your shoes I would rely as much as possible on CSS for my
layout, and if I had enough time for it, I would try to provide a
couple of templates/ configurations (like a three column layout, a
layout with a head- and bottom banner, etc) so that parts of the
site's look can be changed without too much tinkering. Of course, she
would have to learn CSS, and it might be hard to convince her to do
that :) Otoh, if you do a good job with doing the layout with CSS,
she'll only be able to mess up the layout, never the business logic,
which is a completely different story compared to when you would have
delivered e.g. JSP or PHP templates.

It is *not* a recommendation, but If your client has 'some' coding
skills, you could even consider using velocity panels. You can find
some examples of that in wicket-examples.

The bottom line is, and I think many of us have been there before,
that promising your client a web site that he/ she can maintain
themselves is a slippery slope. In my experience, just being able to
do basic adjustements soon won't suffice, and before you know it,
you'll be developing a full fledged CMS system. Which of course will
get both and your client into trouble. But I think that if you keep
the focus and very clear limit the kind of adjustements that can be
done - like a choosing from couple of master templates and adjusting
CSS - you can make something very useful.

My 2c,

Eelco


 Basically, I need to be able to finish this project and walk away from
 it.  I don't want to forever more be her webmaster whenever she
 wants little changes made to the site.

 How would you handle this?  I'd love some ideas.

 Thanks,
 Tauren

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] inspector causes page expired

2007-06-18 Thread Jonathan Locke

i added an enhancement request for next wicket version to support the
inspector better.  the problem i'm having with it right now is that after
visiting the inspectorpage, every request to the web app results in a page
expired exception. the app is basically dead. has anyone seen this type of
behavior before (in the inspector or elsewhere)? any ideas on what this
might be?  thanks!

   jonathan


-- 
View this message in context: 
http://www.nabble.com/inspector-causes-page-expired-tf3944109.html#a11188069
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Is it possible to set visibility in an IBehavior (in 1.3.0 trunk)?

2007-06-18 Thread Timo Rantalaiho
Hello Wicket,

We have to hide a couple of components from certain groups 
of users. We tried doing it with a reusable AbstractBehavior, 
but calling component.setVisible() in IBehavior.beforeRender()
caused the good old cannot modify component hierarchy 
during render phase exception. There is no onBeforeRender() 
in IBehavior.

Should it be possible for an IBehavior to control visibility
(Component.isVisible(), not just HTML or CSS attributes)?

The code (calling same code in all relevant isVisible() 
methods()) works, but it would be interesting to know if 
there would be a more elegant or reusable solution.

We develop on 1.3.0 trunk.


Visiting all relevant components (e.g. marked with an 
interface) from a parent might be possible too.

Thanks,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Convertes Hell (Wicket 1.2.x)

2007-06-18 Thread Andrew Klochkov
I should say this class seems too heavy for http session - it holds
SimpleDateFormat instance which in turn holds DateFormatSymbols instance
which in turn has several arrays inside. BTW I've created class which
can dump http session contents into a file in the form of object tree,
in fact it's modified org.apache.wicket.util.io.SerializableChecker.

Francisco Diaz Trepat - gmail wrote:
 I use the wicket-datetime package.  in there, you'll find the
 DateTextField:
 DateTextField myDate = DateTextField.forDatePattern(myDate, dd.MM.yy);

 wicket.extensions.markup.html.form.DateTextField

 Hope this help,
  

 f(t)

  
 On 6/15/07, *Paolo Di Tommaso* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 I need to replace the default Wicket Date conversion with a custom
 one to override the default format for dates.

 To do that I've made something like that in my wicket application :


   getApplicationSettings().setConverterFactory( new
 IConverterFactory() {
 public IConverter newConverter(Locale locale) {
 return new MyConverter() ;
 } }  );


 Where:


 public class MyConverter extends Converter {

 public MyConverter() {
 super();
 set(Date.class, new MyDateConverter());
 set(String.class, new MyStringConverter() );
 }
 
 public MyConverter(final Locale locale)
 {
 this();
 setLocale(locale);
 }

 }

 public class MyDateConverter extends AbstractConverter {
   
 protected Class getTargetType()
 {
 return Date.class;
 }

 public Object convert(final Object value, Locale locale)
 {
 return parse(MY_DATE_FORMAT, value);
 }
 }

 public class MyStringConverter extends AbstractConverter {  
   /*
* ... that requires also an extra class MyDateToStringConverter ..
*/
 }


 This is really too complex to do a trivial job like a Date ---
 String conversion .

 Exists a better and simpler way to override the default
 date-string conversion ?

 Thank you,

 Paolo Di Tommaso


 -

 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   


-- 
Andrew Klochkov


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Convertes Hell (Wicket 1.2.x)

2007-06-18 Thread Eelco Hillenius
 I should say this class seems too heavy for http session - it holds
 SimpleDateFormat instance which in turn holds DateFormatSymbols instance
 which in turn has several arrays inside.

DateTextField? Not the one from wicket-datetime! That holds the
datePattern as a string, shouldn't hold references to much else.
Unless I overlooked something. Can you give details please?

 BTW I've created class which
 can dump http session contents into a file in the form of object tree,
 in fact it's modified org.apache.wicket.util.io.SerializableChecker.

That sounds cool. Can you please, please, please contribute that to
http://issues.apache.org/jira/browse/WICKET-643? :)

If you can print to a file, you can print it to an arbitrairy string/
stream. It would be nice to have some kind of inspectorbug-like tool
so that you can interactively inspect pages. Might be component number
2 if Jonathan would make a separate project for the inspectorbug
project.

Cheers,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket ate my exception

2007-06-18 Thread Iman Rahmatizadeh

I ran into a problem where wicket(1.2.x) actually swallowed my exception
before reporting it to me and showed another exception. Take this code for
example :

add(new MyComponent(id,new LoadableDetachableModel() {
   public void load() {
 // do something that throws some nasty exception
 // but expect to return an object of type
MyModelObject
   }

} ) {
 public boolean isVisible() {

((MyModelObject)getModel().getObject(null)).isComponentVisible();
 }

};

The exception thrown in the load method will not be shown, because
1 - the LoadableDetachableModel first sets attached=true then loads the
object
2 - An exception is thrown, so in Markupcontainer it will be catched
3 - the exception is appended with the MarkupContainer.toString() String ,
which will call many methods on the component, including isVisible()
4 - the isVisible method uses the model again which it thinks its attached ,
but the getObject will return null , so a new nullpointerexception will be
thrown, and the previous exception is lost

Actually the Component.toString() method is somehow heavy, and normally any
exception thrown in the middle of it would cause bad behavior in wicket. Is
there a chance to improve this somehow, or make exception handling aware of
problems that might arise when calling the toString method and let it handle
them ?
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Convertes Hell (Wicket 1.2.x)

2007-06-18 Thread Andrew Klochkov
Eelco Hillenius wrote:
 I should say this class seems too heavy for http session - it holds
 SimpleDateFormat instance which in turn holds DateFormatSymbols instance
 which in turn has several arrays inside.
 

 DateTextField? Not the one from wicket-datetime! That holds the
 datePattern as a string, shouldn't hold references to much else.
 Unless I overlooked something. Can you give details please?
   
The one which was mentioned is
org.apache.wicket.extensions.markup.html.form.DateTextField
Here is some code from 1.3 beta 1:

public DateTextField(String id, String datePattern)
{
super(id, Date.class);
this.dateFormat = new SimpleDateFormat(datePattern);
this.converter = new DateConverter()
{
private static final long serialVersionUID = 1L;

/**
 * @see
org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
 */
public DateFormat getDateFormat(Locale locale)
{
return dateFormat;
}
};
}


   
 BTW I've created class which
 can dump http session contents into a file in the form of object tree,
 in fact it's modified org.apache.wicket.util.io.SerializableChecker.
 

 That sounds cool. Can you please, please, please contribute that to
 http://issues.apache.org/jira/browse/WICKET-643? :)
   
attached my class to the issue

-- 
Andrew Klochkov


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Customer management of site after development is completed

2007-06-18 Thread Tauren Mills
Eelco and Rüdiger,

Thanks for your responses.  I must admit I was hoping to hear that
others had solved similar problems with a more robust solution.  I was
starting to wonder if what I wanted to do was possible, and it sounds
like it would be very difficult if even possible.

I've already designed the site with very clean and simple html with
all layout/look/feel done in CSS.  So going that direction will not be
difficult, except that getting the client up to speed on CSS seems
like a daunting task.

If I was to allow the client to customize and upload new CSS files,
how would you suggest this be done?  Where would the CSS files be
saved and how would the app know where to look for them?  How would
the override the CSS files that are within the WAR file?

Also, as far as static content management goes, I'm thinking of
putting all the static stuff into the properties files and using
labels for it.  Thus creating a very simple and cheap CMS.  Then it
would be simply a matter of editing the properties files and uploading
them.  But again, how would that work?  What would I do so that the
app would read the uploaded files instead of the ones in the WAR?

Thanks again for the ideas.  I'd still love to hear if anyone else has
solved this problem in a different way.

Tauren


On 6/18/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
  I've thought about creating a simple CMS system for the static
  content in the html pages. But that really isn't in the scope of the
  project.  Maybe it should be. I could extract all static content
  into properties files and use Labels all over, then have the app
  search for properties files somewhere external from the war on the web
  server.  But neither of these will help if she wants to redesign the
  layout of the site and needs to edit the html/css.

 If I were in your shoes I would rely as much as possible on CSS for my
 layout, and if I had enough time for it, I would try to provide a
 couple of templates/ configurations (like a three column layout, a
 layout with a head- and bottom banner, etc) so that parts of the
 site's look can be changed without too much tinkering. Of course, she
 would have to learn CSS, and it might be hard to convince her to do
 that :) Otoh, if you do a good job with doing the layout with CSS,
 she'll only be able to mess up the layout, never the business logic,
 which is a completely different story compared to when you would have
 delivered e.g. JSP or PHP templates.

 It is *not* a recommendation, but If your client has 'some' coding
 skills, you could even consider using velocity panels. You can find
 some examples of that in wicket-examples.

 The bottom line is, and I think many of us have been there before,
 that promising your client a web site that he/ she can maintain
 themselves is a slippery slope. In my experience, just being able to
 do basic adjustements soon won't suffice, and before you know it,
 you'll be developing a full fledged CMS system. Which of course will
 get both and your client into trouble. But I think that if you keep
 the focus and very clear limit the kind of adjustements that can be
 done - like a choosing from couple of master templates and adjusting
 CSS - you can make something very useful.

 My 2c,

 Eelco


  Basically, I need to be able to finish this project and walk away from
  it.  I don't want to forever more be her webmaster whenever she
  wants little changes made to the site.
 
  How would you handle this?  I'd love some ideas.
 
  Thanks,
  Tauren
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user