[PROPOSAL] FragmentColumn...

2008-05-04 Thread James Carman
I came up with the following class that I find very useful in our application:

public abstract class FragmentColumnT extends AbstractColumnT
{
private static final long serialVersionUID = 1L;

protected FragmentColumn( IModelString displayModel )
{
super(displayModel);
}

protected FragmentColumn( IModelString displayModel, String sortProperty )
{
super(displayModel, sortProperty);
}

protected abstract FragmentT createFragment( String componentId,
IModelT model );

public void populateItem( ItemICellPopulatorT item, String
componentId, IModelT itemModel )
{
item.add(createFragment(componentId, itemModel));
}
}

Basically, it allows you to provide a Fragment (or a choice of
Fragments) as the contents of your column.  At runtime, you decide (by
overriding the createFragment() abstract method) which Fragment will
be displayed for the current row.  An example would be:

public class ActionsColumn extends FragmentColumnPerson
{
private static final long serialVersionUID = 1L;

public ActionsColumn()
{
super(new ModelString(Actions));
}

protected FragmentPerson createFragment(String componentId,
IModelPerson itemModel)
{
if (isEditable(itemModel.getObject())) // isEditable
implementation not provided!
{
final FragmentPerson fragment = new
FragmentPerson(componentId, actions, PersonListPage.this,
itemModel);
fragment.add(EditPersonPage.createLink(edit, itemModel.
return fragment;
}
else
{
return new FragmentPerson(componentId, doNothing,
AnalysisJobListPage.this, itemModel);
}
}
}

In the markup:

wicket:fragment wicket:id=actionsa href=#
wicket:id=editedit/a/wicket:fragment
wicket:fragment wicket:id=doNothingnbsp;/wicket:fragment

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



Re: What is session.dirty() for?

2008-05-04 Thread Martin Makundi
 If you subclassed the Session class and your attributes are properties
 of the subclass.

Yes I did.

 But you are required to call session.dirty() only if your pages are
 stateless and your application is deployed on cluster.

Why the session.dirty is called by the framework after modifying
feedback messages. I would expect feedback messages to be associated
only with stateful pages. So .dirty should be called in stateful
situations too?

Darn. This is not fell like a very clean design, does it? Practically,
the session is dirty after every request. I cannot imagine otherwise.
Does this mean that session is NOT the place to store state?

The problem with storing the state in a page is that when the page is
re-instantiated on a reload the instance variables are reset. Storing
the variables into the session overcomes this problem, but if I always
have to call .dirty my code gets cluttered and brittle - how can I
test that my app is now cluster-safe?

Ofcourse I could wrap all my state variables in a proxy object which
handles the dirty automatically, but this seems like an overkill.

I hope this was just a misunderstanding :)

**
Martin

2008/5/3 Johan Compagner [EMAIL PROTECTED]:
 Nop thats the best thing todo



  On 5/3/08, Michael Allan [EMAIL PROTECTED] wrote:
   Matej Knopp wrote:
Martin Makundi wrote:

  Let's say I have some variables in my session. If these variables
  change, do I have to call session.dirty?
   
If you subclassed the Session class and your attributes are properties
of the subclass.
   
But you are required to call session.dirty() only if your pages are
stateless and your application is deployed on cluster.
  
   Just to cover all eventualities, Matej (in case we later move to a
   cluster) is there any harm in *always* calling session.dirty(), when a
   Session field changes value?
  
   --
   Michael Allan
  
   Toronto, 647-436-4521
   http://zelea.com/
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  

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



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



Re: About the Session Leaking Problem

2008-05-04 Thread Jonathan Locke


actually, i think it would be more correct for the unset below to be inside
a nested finally block.  it's an edge case and probably will never happen,
but technically speaking the try/catch below could fail for Throwables that
are not exceptions (OOM errors, assertion failures, etc.) while finally is
fairly bulletproof.


Iman Rahmatizadeh wrote:
 
 Hi ,
 About the session leaking problem described in this thread :
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-td16550360.html
 I'm getting reports of the same problem from some of my clients. Where can
 I
 find  the fix committed for this problem ? Is it more than just this
 try/crach added to WicketFilter.java ?
 
 ---
 wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 2008/04/08
 17:23:34  646008
 +++
 wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 2008/04/09
 13:18:38  646331
 @@ -385,7 +385,16 @@
   {
   // Close response
   if (response != null)
 - response.close();
 + {
 + try
 + {
 + response.close();
 + }
 + catch (Exception e)
 + {
 + log.error(closing the buffer 
 error, e);
 + }
 + }
 
   // Clean up thread local session
   Session.unset();
 
 Regards,
 Iman
 
 

-- 
View this message in context: 
http://www.nabble.com/About-the-Session-Leaking-Problem-tp17043104p17043374.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread mfs

Looking for some follow up on this..

1) Just wondering as to why isnt a constructor a good place to do the
redirection to an external url , ?
2) What should be the right place for it, given my use-case..


Would writing a LogoutFilter be a good option..


Thanks in advance.. 




Johan Compagner wrote:
 
 I think this usecase should be supported but isnt the best way, you
 should throw an AbortException when you want to redirect in the
 constructor. Dont know from top of my head if we have one just for an
 url but that is easily made
 
 On 4/30/08, mfs [EMAIL PROTECTED] wrote:

 Guys,

 I have a LogoutPage which does the following in its constructor

 LogoutPage()
 {
 getSession().invalidate();

 // redirecting to the external app logout page
 RequestCycle.get().setRequestTarget(
 new RedirectRequestTarget(Host.getHttpsUrl()
 + xyz.getLogoutURL()));

 getRequestCycle().setRedirect(true);
 }

 Now, for some reasons the redirect to the specified external app page
 doesnt
 happen, infact i am taken to the session-expired page (which is because
 the
 request comes to wicket app, instead of redirection to this external app)
 .
 Let me add that i am using wiket-auth-roles for authorization...

 Also the reason i am doing this inside the Page itself (and not in the
 onClick or some other event as suggested in another other thread) is
 because
 i need to expose this LogoutPage to an external app as well, which will
 redirect to this page after invalidating the sessionThis part of
 Interoperability/SingleSignon Support.

 Thanks in advance.

 --
 View this message in context:
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17043421.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: keeping parameters when reloading a page

2008-05-04 Thread Eyal Golan
Johan,
Wonderful, it worked. All I did was:
mount(new HybridUrlCodingStrategy(/entityBrowser,
EurekifyBrowserPage.class));
I'm going to investigate this class, but it actually did the job!

Jeremy,
As you can see, the filed get set by the PropertyModel:
new DropDownChoice(confNames, new PropertyModel(this,
configurationName),
configurationNames);

This is what i do in the setter:
public void setConfigurationName(String configurationName) {
this.configurationName = configurationName;
setConfigurationToBrowserTabbedPanel();
}
I have put a breakpoint in the setter and it works.
As I mentioned, only refresh the page had the problem.
Anyway, the Hybrid stuff did the work :)

Thanks guys !!



On Sat, May 3, 2008 at 11:19 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 Mount it with the HybridUrlCoding strategy
 i think that should work because then a redirect to a bookmarkable page is
 done but that still has some state in the url for a refresh


 On Sat, May 3, 2008 at 9:01 PM, Eyal Golan [EMAIL PROTECTED] wrote:

  Anyone?
  Any idea?
  I thought about keeping it in the Session but it seems too much.
 
  On Thu, May 1, 2008 at 1:22 PM, Eyal Golan [EMAIL PROTECTED] wrote:
 
   I think it is ...
   I have this in my application: mountBookmarkablePage(/entityBrowser,
   EurekifyBrowserPage.class);
   And my link is: new BookmarkablePageLink(MenuItem.LINK_ID, classLink)
   ..
  
   So, is there a way to pass this problem?
  
  
   On Thu, May 1, 2008 at 12:23 PM, Johan Compagner [EMAIL PROTECTED]
 
   wrote:
  
What url do you refresh?
A bookmarkable one?
Then the page is recreated every time so field is null
   
On 5/1/08, Eyal Golan [EMAIL PROTECTED] wrote:
 Hello all,
 I have a page that has a variable called configurationName
 (private
String
 configurationName;)
 I set it using a DropDown component:
 DropDownChoice namesSelect =
 new DropDownChoice(confNames, new
PropertyModel(this,
 configurationName),
 configurationNames);

 The problem is that when I reload the page (press F5 for example),
  the
field
 is set back to null.
 What is the best way of keeping (remembering) the field?
 (is it using Parameters or something else).

 thanks


 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/

   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
Eyal Golan
   [EMAIL PROTECTED]
  
   Visit: http://jvdrums.sourceforge.net/
  
 
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: PropertyModel with default null model object ?

2008-05-04 Thread Per Newgro
Hello smallufo:

the onclick and the onbeforerender methods will be called if page is presented 
(or immidiatly before). But this
   myLink.add(new Image(hexagramImage , new
 ResourceReference(MyObject.class , icons/byIndex/+ new
 PropertyModel(model,index).getObject().toString()+.gif)));  //FAILED
will be called at custruction time of page. So there could be two possible 
causes for your problem.
1st: the bean which is assigned to panel model is null or 
2nd: the index in that bean is null.
1st solution: Assign a bean - if not possible make getMyObjectFromInts 
null-aware and return a default-image
2nd solution: Assign a standard value for index (int = 0)

I hope i got the issue - if not please ask again :-)
HTH
Per

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



Re: What is session.dirty() for?

2008-05-04 Thread Matej Knopp
On Sun, May 4, 2008 at 8:09 AM, Martin Makundi
[EMAIL PROTECTED] wrote:
  If you subclassed the Session class and your attributes are properties
   of the subclass.

  Yes I did.


   But you are required to call session.dirty() only if your pages are
   stateless and your application is deployed on cluster.

  Why the session.dirty is called by the framework after modifying
  feedback messages. I would expect feedback messages to be associated
  only with stateful pages. So .dirty should be called in stateful
  situations too?
No. Your assumption of feedback messages present only with stateful
pages is wrong. A stateless page can register feedback message, even a
flash message (feedback message not associated with a page).

  Darn. This is not fell like a very clean design, does it? Practically,
  the session is dirty after every request. I cannot imagine otherwise.
  Does this mean that session is NOT the place to store state?
I have no idea how did you come to that conclusion. Session is the
place to store state shared between pages (except for simple object
passing from page to page, you can use page constructor for it).

  The problem with storing the state in a page is that when the page is
  re-instantiated on a reload the instance variables are reset. Storing
  the variables into the session overcomes this problem, but if I always
  have to call .dirty my code gets cluttered and brittle - how can I
  test that my app is now cluster-safe?
Are you page stateless? If not, you don't have to worry about it. Also
if you don't want new page instance created on reload yet you want the
url to be bookmarkable, mount the page using HybridUrlCodingStrategy.

  Ofcourse I could wrap all my state variables in a proxy object which
  handles the dirty automatically, but this seems like an overkill.

  I hope this was just a misunderstanding :)


-Matej

  **
  Martin

  2008/5/3 Johan Compagner [EMAIL PROTECTED]:


  Nop thats the best thing todo
  
  
  
On 5/3/08, Michael Allan [EMAIL PROTECTED] wrote:
 Matej Knopp wrote:
  Martin Makundi wrote:
  
Let's say I have some variables in my session. If these variables
change, do I have to call session.dirty?
 
  If you subclassed the Session class and your attributes are properties
  of the subclass.
 
  But you are required to call session.dirty() only if your pages are
  stateless and your application is deployed on cluster.

 Just to cover all eventualities, Matej (in case we later move to a
 cluster) is there any harm in *always* calling session.dirty(), when a
 Session field changes value?

 --
 Michael Allan

 Toronto, 647-436-4521
 http://zelea.com/


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


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

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





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

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



Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Eyal Golan
Another question (mfs, if you don't mind).
I did the invalidate on a link:
Link logoutLink = new Link(logoutLink) {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
 getSession().invalidateNow();
setResponsePage(com.eurekify.web.Login.class);
}
};

It works, but I get an IllegalState Exception:
2008-05-04 11:49:06,625 ERROR [org.mortbay.log] - /eurekify/portal/:
java.lang.IllegalStateException
at
org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
at
com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

Is there a way to eliminate this?
I tried to put a catch surrounding the invalidate, but it's no use.


thanks,


On Sun, May 4, 2008 at 10:00 AM, mfs [EMAIL PROTECTED] wrote:


 Looking for some follow up on this..

 1) Just wondering as to why isnt a constructor a good place to do the
 redirection to an external url , ?
 2) What should be the right place for it, given my use-case..


 Would writing a LogoutFilter be a good option..


 Thanks in advance..




 Johan Compagner wrote:
 
  I think this usecase should be supported but isnt the best way, you
  should throw an AbortException when you want to redirect in the
  constructor. Dont know from top of my head if we have one just for an
  url but that is easily made
 
  On 4/30/08, mfs [EMAIL PROTECTED] wrote:
 
  Guys,
 
  I have a LogoutPage which does the following in its constructor
 
  LogoutPage()
  {
  getSession().invalidate();
 
  // redirecting to the external app logout page
  RequestCycle.get().setRequestTarget(
  new RedirectRequestTarget(Host.getHttpsUrl()
  + xyz.getLogoutURL()));
 
  getRequestCycle().setRedirect(true);
  }
 
  Now, for some reasons the redirect to the specified external app page
  doesnt
  happen, infact i am taken to the session-expired page (which is because
  the
  request comes to wicket app, instead of redirection to this external
 app)
  .
  Let me add that i am using wiket-auth-roles for authorization...
 
  Also the reason i am doing this inside the Page itself (and not in the
  onClick or some other event as suggested in another other thread) is
  because
  i need to expose this LogoutPage to an external app as well, which will
  redirect to this page after invalidating the sessionThis part of
  Interoperability/SingleSignon Support.
 
  Thanks in advance.
 
  --
  View this message in context:
 
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17043421.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Johan Compagner
In a constructor of another page is just fine, but use an
RestartXxxException. Else you have 2 things that wants to be the
response, the redirect and the page you are in.

On 5/4/08, mfs [EMAIL PROTECTED] wrote:

 Looking for some follow up on this..

 1) Just wondering as to why isnt a constructor a good place to do the
 redirection to an external url , ?
 2) What should be the right place for it, given my use-case..

 Thanks in advance..

 Johan Compagner wrote:
 
  I think this usecase should be supported but isnt the best way, you
  should throw an AbortException when you want to redirect in the
  constructor. Dont know from top of my head if we have one just for an
  url but that is easily made
 
  On 4/30/08, mfs [EMAIL PROTECTED] wrote:
 
  Guys,
 
  I have a LogoutPage which does the following in its constructor
 
  LogoutPage()
  {
  getSession().invalidate();
 
  // redirecting to the external app logout page
  RequestCycle.get().setRequestTarget(
  new RedirectRequestTarget(Host.getHttpsUrl()
  + xyz.getLogoutURL()));
 
  getRequestCycle().setRedirect(true);
  }
 
  Now, for some reasons the redirect to the specified external app page
  doesnt
  happen, infact i am taken to the session-expired page (which is because
  the
  request comes to wicket app, instead of redirection to this external app)
  .
  Let me add that i am using wiket-auth-roles for authorization...
 
  Also the reason i am doing this inside the Page itself (and not in the
  onClick or some other event as suggested in another other thread) is
  because
  i need to expose this LogoutPage to an external app as well, which will
  redirect to this page after invalidating the sessionThis part of
  Interoperability/SingleSignon Support.
 
  Thanks in advance.
 
  --
  View this message in context:
 
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17042343.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Eyal Golan
I tried the normal invalidate before and got the same exception.
I'm not sure I understood what you said about the constructor in your other
reply.

My scenario is like this:
The user will press the logout link, the session logs out and I redirect to
the Login page.

I had another solution like this:
public void onClick() {
PortalSession session = (PortalSession) getSession();
   session.setCredentials(null, );//our own method
setResponsePage(com.eurekify.web.Login.class);
}
It worked, but the I could reenter the pages with the back button.
After checking invalidate, I found that it's better, but the I saw this
exception.


On Sun, May 4, 2008 at 12:48 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 Why do you do invalidateNow?
 You want a new session for that next response page?
 It seems jetty does invalidate but doesnt give us a new one in the same
 request.
 Or wicket holds on to the http session object but i dont think we do that.

 On 5/4/08, Eyal Golan [EMAIL PROTECTED] wrote:
  Another question (mfs, if you don't mind).
  I did the invalidate on a link:
  Link logoutLink = new Link(logoutLink) {
  private static final long serialVersionUID = 1L;
 
  @Override
  public void onClick() {
   getSession().invalidateNow();
  setResponsePage(com.eurekify.web.Login.class);
  }
  };
 
  It works, but I get an IllegalState Exception:
  2008-05-04 11:49:06,625 ERROR [org.mortbay.log] - /eurekify/portal/:
  java.lang.IllegalStateException
  at
 
 org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
  at
 
 com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
  at
 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
  at
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
  at
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
  at
 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
  at
  org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
  at
  org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
  at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
  at
 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
  at
  org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
  at org.mortbay.jetty.Server.handle(Server.java:285)
  at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
  at
 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
  at
 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
  at
 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
 
  Is there a way to eliminate this?
  I tried to put a catch surrounding the invalidate, but it's no use.
 
 
  thanks,
 
 
  On Sun, May 4, 2008 at 10:00 AM, mfs [EMAIL PROTECTED] wrote:
 
  
   Looking for some follow up on this..
  
   1) Just wondering as to why isnt a constructor a good place to do the
   redirection to an external url , ?
   2) What should be the right place for it, given my use-case..
  
  
   Would writing a LogoutFilter be a good option..
  
  
   Thanks in advance..
  
  
  
  
   Johan Compagner wrote:
   
I think this usecase should be supported but isnt the best way, you
should throw an AbortException when you want to redirect in the
constructor. Dont know from top of my head if we have one just for
 an
url but that is easily made
   
On 4/30/08, mfs [EMAIL PROTECTED] wrote:
   
Guys,
   
I have a LogoutPage which does the following in its constructor
   
LogoutPage()
{
getSession().invalidate();
   
// redirecting to the external app logout page
RequestCycle.get().setRequestTarget(
new RedirectRequestTarget(Host.getHttpsUrl()
+ xyz.getLogoutURL()));
   
getRequestCycle().setRedirect(true);
}
   
Now, for some reasons the redirect to the specified external app
 page
doesnt
happen, infact i am taken to the session-expired page (which is
 because
the
request comes to wicket app, instead of redirection to this
 external
   app)
.
Let me add that i am using wiket-auth-roles for authorization...
   
Also the reason i am doing this inside the Page itself (and not in
 the
onClick or some other event as suggested in another 

Re: Modal window and height

2008-05-04 Thread Cristi Manole
For me it works just by using setinitialwidth/height... doesn't it work for
you too?

Cristi Manole

On Sat, May 3, 2008 at 3:14 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 The java doc for the modal windows says

  * licode[EMAIL PROTECTED] #setResizable(boolean)}/code specifies, 
 whether the
 window can be resized.
  * licode[EMAIL PROTECTED] #setInitialWidth(int)}/code and code[EMAIL 
 PROTECTED]
 #setInitialHeight(int)}/code
  * specify the initial width and height of window. If the window is
 resizable, the unit of these
  * dimensions is always px. If the window is not resizable, the unit can
 be specified using
  * code[EMAIL PROTECTED] #setWidthUnit(String)}/code and code[EMAIL 
 PROTECTED]
 #setHeightUnit(String)}/code.
  * If the window is not resizable and the content is a component (not a
 page), the initial height
  * value can be ignored and the actual height can be determined from the
 height of the content. To
  * enable this behavior use code[EMAIL PROTECTED]
 #setUseInitialHeight(boolean)}/code.
  * liThe window position (and size if the window is resizable) can be
 stored in a cookie, so that
  * it is preserved when window is close. The name of the cookie is
 specified
 via
  * code[EMAIL PROTECTED] #setCookieName(String)}/code. If the name is
 codenull/code, position is
  * not stored (initial width and height are always used). Default cookie
 name is null (position is
  * not stored).

 Now I have setCookieName( null ) , set minimum height but the window
 always
 opens in the same size.
 How do I set the height and width exactly as I want?

 --
 View this message in context:
 http://www.nabble.com/Modal-window-and-height-tp16960447p17034566.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Johan Compagner
Why do you do invalidateNow?
You want a new session for that next response page?
It seems jetty does invalidate but doesnt give us a new one in the same request.
Or wicket holds on to the http session object but i dont think we do that.

On 5/4/08, Eyal Golan [EMAIL PROTECTED] wrote:
 Another question (mfs, if you don't mind).
 I did the invalidate on a link:
 Link logoutLink = new Link(logoutLink) {
 private static final long serialVersionUID = 1L;

 @Override
 public void onClick() {
  getSession().invalidateNow();
 setResponsePage(com.eurekify.web.Login.class);
 }
 };

 It works, but I get an IllegalState Exception:
 2008-05-04 11:49:06,625 ERROR [org.mortbay.log] - /eurekify/portal/:
 java.lang.IllegalStateException
 at
 org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
 at
 com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
 at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
 at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
 at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
 at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
 at
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:285)
 at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
 at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
 at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
 at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

 Is there a way to eliminate this?
 I tried to put a catch surrounding the invalidate, but it's no use.


 thanks,


 On Sun, May 4, 2008 at 10:00 AM, mfs [EMAIL PROTECTED] wrote:

 
  Looking for some follow up on this..
 
  1) Just wondering as to why isnt a constructor a good place to do the
  redirection to an external url , ?
  2) What should be the right place for it, given my use-case..
 
 
  Would writing a LogoutFilter be a good option..
 
 
  Thanks in advance..
 
 
 
 
  Johan Compagner wrote:
  
   I think this usecase should be supported but isnt the best way, you
   should throw an AbortException when you want to redirect in the
   constructor. Dont know from top of my head if we have one just for an
   url but that is easily made
  
   On 4/30/08, mfs [EMAIL PROTECTED] wrote:
  
   Guys,
  
   I have a LogoutPage which does the following in its constructor
  
   LogoutPage()
   {
   getSession().invalidate();
  
   // redirecting to the external app logout page
   RequestCycle.get().setRequestTarget(
   new RedirectRequestTarget(Host.getHttpsUrl()
   + xyz.getLogoutURL()));
  
   getRequestCycle().setRedirect(true);
   }
  
   Now, for some reasons the redirect to the specified external app page
   doesnt
   happen, infact i am taken to the session-expired page (which is because
   the
   request comes to wicket app, instead of redirection to this external
  app)
   .
   Let me add that i am using wiket-auth-roles for authorization...
  
   Also the reason i am doing this inside the Page itself (and not in the
   onClick or some other event as suggested in another other thread) is
   because
   i need to expose this LogoutPage to an external app as well, which will
   redirect to this page after invalidating the sessionThis part of
   Interoperability/SingleSignon Support.
  
   Thanks in advance.
  
   --
   View this message in context:
  
 
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
 
 

Re: How to avoid Lazy loading exception

2008-05-04 Thread Johan Compagner
for which request does it through there the exception?
first you render it ? then you change it and it throws the exception on the
second request?
does load get called at that point?

On Sun, May 4, 2008 at 12:37 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Thanks!

 This is what I'm trying to do but I still get the exception.

 This is from my DAO

 @SuppressWarnings( unchecked )
 public ListCollection getCollections(){
   org.hibernate.Session hibernateSession =
 (org.hibernate.Session)getEntityManager().getDelegate();
   return hibernateSession.createCriteria Collection.class

 ,se.edgesoft.hairless.model.criteria.alias.Alias.COLLECTION.getAlias()).list();
 }

 I use the
 org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
 before the wicket filter.
 This is Entity manager and not sessionInView.

 In my base class I spring inject my dao's using @SpringBean annotation.

 Here is the model I'm using

 IModel collectionModel = new LoadableDetachableModel(){
  private static final long serialVersionUID = 1L;
  protected Object load(){
return getCollectionDao().getCollections();
  }
 };


 And it complains in my renderer

 public class CollectionChoiceRenderer extends ChoiceRenderer {
private static final long serialVersionUID = 1L;
public Object getDisplayValue(Object object) {
if (object instanceof Collection) {
Collection  collection = ( Collection ) object;

return collection.getIdentifier();
}
return null;
}
public String getIdValue(Object key, int index) {
if (key instanceof Collection) {
Collection collection = ( Collection ) key;
return collection.getId().toString();
}
return null;
}
 }

 Lazy loading exception when I try collection.getId().toString()

 I thought this was detaching hibernate entities. The Collection class is a
 hibernate annotated pojo.


 --
 View this message in context:
 http://www.nabble.com/How-to-avoid-Lazy-loading-exception-tp17040941p17044892.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: How to avoid Lazy loading exception

2008-05-04 Thread Mathias P.W Nilsson

Thanks!

This is what I'm trying to do but I still get the exception.

This is from my DAO

@SuppressWarnings( unchecked )
public ListCollection getCollections(){
   org.hibernate.Session hibernateSession =
(org.hibernate.Session)getEntityManager().getDelegate();
   return hibernateSession.createCriteria Collection.class 
,se.edgesoft.hairless.model.criteria.alias.Alias.COLLECTION.getAlias()).list();
}

I use the org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
before the wicket filter.
This is Entity manager and not sessionInView.

In my base class I spring inject my dao's using @SpringBean annotation.

Here is the model I'm using

IModel collectionModel = new LoadableDetachableModel(){
  private static final long serialVersionUID = 1L;
  protected Object load(){
return getCollectionDao().getCollections();
  }
};


And it complains in my renderer

public class CollectionChoiceRenderer extends ChoiceRenderer {
private static final long serialVersionUID = 1L;
public Object getDisplayValue(Object object) {
if (object instanceof Collection) {
Collection  collection = ( Collection ) object;

return collection.getIdentifier();
}
return null;
}
public String getIdValue(Object key, int index) {
if (key instanceof Collection) {
Collection collection = ( Collection ) key;
return collection.getId().toString();
}
return null;
}
}

Lazy loading exception when I try collection.getId().toString()

I thought this was detaching hibernate entities. The Collection class is a
hibernate annotated pojo.


-- 
View this message in context: 
http://www.nabble.com/How-to-avoid-Lazy-loading-exception-tp17040941p17044892.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal window and height

2008-05-04 Thread Cristi Manole
even if you don't use setcookiename at all? try not setting anything related
to a cookie...

this is how i do it and it works:
reportModalWindow = new ModalWindow(reportWindow);
reportModalWindow.setInitialHeight(410);
reportModalWindow.setInitialWidth(750);
reportModalWindow.setMinimalHeight(410);
reportModalWindow.setMinimalWidth(750);
return reportModalWindow;


On Sun, May 4, 2008 at 1:39 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 No it does not work. I have looked in the source code as well but to see
 if
 I'm doing something wrong but I still get default height and width that is
 set in the source.
 --
 View this message in context:
 http://www.nabble.com/Modal-window-and-height-tp16960447p17044911.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Modal window and height

2008-05-04 Thread Mathias P.W Nilsson

No it does not work. I have looked in the source code as well but to see if
I'm doing something wrong but I still get default height and width that is
set in the source.
-- 
View this message in context: 
http://www.nabble.com/Modal-window-and-height-tp16960447p17044911.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to avoid Lazy loading exception

2008-05-04 Thread Mathias P.W Nilsson

I have a page that list a Items that is hibernated annotated. When clicking
on a wicket link
using setResponsePage( new ItemPage( item ) ); I get the exception when
trying to render my DropDownChoice. 

I use Detached model for this. load is not called, if you mean
hibernatesession.load or entitymanager.load
-- 
View this message in context: 
http://www.nabble.com/How-to-avoid-Lazy-loading-exception-tp17040941p17045071.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal window and height

2008-05-04 Thread Matej Knopp
You have specified the cookie name. Thus it should remember the last
size - that takes precedence over the specified initial size.

-Matej

On Tue, Apr 29, 2008 at 3:29 PM, Mathias P.W Nilsson
[EMAIL PROTECTED] wrote:

  Hi! I can't set initial height and width on my modal window. It's always the
  same height and width when opening it.


 final ModalWindow modal;
 add(modal = new ModalWindow(modal));
 modal.setPageMapName(modal-4);
 modal.setCookieName(modal window 4);
 modal.setInitialWidth(350);
 modal.setInitialHeight(300);
 modal.setResizable(false);
 modal.setWidthUnit(px);
 modal.setHeightUnit(px);

  Any clues?
  --
  View this message in context: 
 http://www.nabble.com/Modal-window-and-height-tp16960447p16960447.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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





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

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



Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Johan Compagner
with using invalidate you shouldnt get that message
becacuse then invalidate is being done as last
What is the stacktrace then?

this should tjust work:

getSession().invalidate();
setResponsePage(com.eurekify.web.Login.class);

On Sun, May 4, 2008 at 12:02 PM, Eyal Golan [EMAIL PROTECTED] wrote:

 I tried the normal invalidate before and got the same exception.
 I'm not sure I understood what you said about the constructor in your
 other
 reply.

 My scenario is like this:
 The user will press the logout link, the session logs out and I redirect
 to
 the Login page.

 I had another solution like this:
public void onClick() {
PortalSession session = (PortalSession) getSession();
   session.setCredentials(null, );//our own method
 setResponsePage(com.eurekify.web.Login.class);
}
 It worked, but the I could reenter the pages with the back button.
 After checking invalidate, I found that it's better, but the I saw this
 exception.


 On Sun, May 4, 2008 at 12:48 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  Why do you do invalidateNow?
  You want a new session for that next response page?
  It seems jetty does invalidate but doesnt give us a new one in the same
  request.
  Or wicket holds on to the http session object but i dont think we do
 that.
 
  On 5/4/08, Eyal Golan [EMAIL PROTECTED] wrote:
   Another question (mfs, if you don't mind).
   I did the invalidate on a link:
   Link logoutLink = new Link(logoutLink) {
   private static final long serialVersionUID = 1L;
  
   @Override
   public void onClick() {
getSession().invalidateNow();
   setResponsePage(com.eurekify.web.Login.class);
   }
   };
  
   It works, but I get an IllegalState Exception:
   2008-05-04 11:49:06,625 ERROR [org.mortbay.log] - /eurekify/portal/:
   java.lang.IllegalStateException
   at
  
 
 org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
   at
  
 
 com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
   at
  
 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
   at
  
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
   at
  
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
   at
  
 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at
  
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at
  
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at
  org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at
  
 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at
  
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at
  
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at
  
 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
   at
 org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
   at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at
  
 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
   at
  
 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
  
   Is there a way to eliminate this?
   I tried to put a catch surrounding the invalidate, but it's no use.
  
  
   thanks,
  
  
   On Sun, May 4, 2008 at 10:00 AM, mfs [EMAIL PROTECTED] wrote:
  
   
Looking for some follow up on this..
   
1) Just wondering as to why isnt a constructor a good place to do
 the
redirection to an external url , ?
2) What should be the right place for it, given my use-case..
   
   
Would writing a LogoutFilter be a good option..
   
   
Thanks in advance..
   
   
   
   
Johan Compagner wrote:

 I think this usecase should be supported but isnt the best way,
 you
 should throw an AbortException when you want to redirect in the
 constructor. Dont know from top of my head if we have one just for
  an
 url but that is easily made

 On 4/30/08, mfs [EMAIL PROTECTED] wrote:

 Guys,

 I have a LogoutPage which does the following in its constructor

 LogoutPage()
 {
 getSession().invalidate();

 // redirecting to the external app logout page
 RequestCycle.get().setRequestTarget(
 new RedirectRequestTarget(Host.getHttpsUrl()
 + xyz.getLogoutURL()));

 getRequestCycle().setRedirect(true);
 }

 Now, for some 

Re: PropertyModel with default null model object ?

2008-05-04 Thread smallufo
Thank you , I found a way to solve this :

myLink.add(new Image(hexagramImage , new PropertyModel(model , index)
{
  @Override
  public Object getObject()
  {
int index = ((Integer)super.getObject()).intValue();
return new ResourceReference(MyObject.class , icons/byIndex/+
index+.gif);
  }
}));

It seems working now...


2008/5/4 Per Newgro [EMAIL PROTECTED]:

 Hello smallufo:

 the onclick and the onbeforerender methods will be called if page is
 presented
 (or immidiatly before). But this
myLink.add(new Image(hexagramImage , new
  ResourceReference(MyObject.class , icons/byIndex/+ new
  PropertyModel(model,index).getObject().toString()+.gif)));  //FAILED
 will be called at custruction time of page. So there could be two possible
 causes for your problem.
 1st: the bean which is assigned to panel model is null or
 2nd: the index in that bean is null.
 1st solution: Assign a bean - if not possible make getMyObjectFromInts
 null-aware and return a default-image
 2nd solution: Assign a standard value for index (int = 0)

 I hope i got the issue - if not please ask again :-)
 HTH
 Per

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




Re: Modal window and height

2008-05-04 Thread Mathias P.W Nilsson

I have tried that. Still does not work. The only differens is that it is a
resizable( false ) window
-- 
View this message in context: 
http://www.nabble.com/Modal-window-and-height-tp16960447p17045142.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Eyal Golan
I got this stack trace:
2008-05-04 14:55:17,638 ERROR [org.mortbay.log] - /eurekify/portal/:
java.lang.IllegalStateException
at
org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
at
com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

And I got it twice.
This is my code:
logoutLink = new Link(logoutLink) {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
getSession().invalidate();
setResponsePage(com.eurekify.web.Login.class);
}
};

If I put a breakpoint on the setResponsePage(...) line, I stop on it BEFORE
the exception.
I'm going to take a look at the Login itself.
But this is the situation now ...


On Sun, May 4, 2008 at 1:41 PM, Johan Compagner [EMAIL PROTECTED]
wrote:

 with using invalidate you shouldnt get that message
 becacuse then invalidate is being done as last
 What is the stacktrace then?

 this should tjust work:

 getSession().invalidate();
 setResponsePage(com.eurekify.web.Login.class);

 On Sun, May 4, 2008 at 12:02 PM, Eyal Golan [EMAIL PROTECTED] wrote:

  I tried the normal invalidate before and got the same exception.
  I'm not sure I understood what you said about the constructor in your
  other
  reply.
 
  My scenario is like this:
  The user will press the logout link, the session logs out and I redirect
  to
  the Login page.
 
  I had another solution like this:
 public void onClick() {
 PortalSession session = (PortalSession) getSession();
session.setCredentials(null, );//our own method
  setResponsePage(com.eurekify.web.Login.class);
 }
  It worked, but the I could reenter the pages with the back button.
  After checking invalidate, I found that it's better, but the I saw this
  exception.
 
 
  On Sun, May 4, 2008 at 12:48 PM, Johan Compagner [EMAIL PROTECTED]
  wrote:
 
   Why do you do invalidateNow?
   You want a new session for that next response page?
   It seems jetty does invalidate but doesnt give us a new one in the
 same
   request.
   Or wicket holds on to the http session object but i dont think we do
  that.
  
   On 5/4/08, Eyal Golan [EMAIL PROTECTED] wrote:
Another question (mfs, if you don't mind).
I did the invalidate on a link:
Link logoutLink = new Link(logoutLink) {
private static final long serialVersionUID = 1L;
   
@Override
public void onClick() {
 getSession().invalidateNow();
setResponsePage(com.eurekify.web.Login.class);
}
};
   
It works, but I get an IllegalState Exception:
2008-05-04 11:49:06,625 ERROR [org.mortbay.log] - /eurekify/portal/:
java.lang.IllegalStateException
at
   
  
 
 org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
at
   
  
 
 com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
at
   
  
 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at
   
  
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at
   
  org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
   
  
 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at
   
  

Re: How to avoid Lazy loading exception

2008-05-04 Thread Stefan Fußenegger

Do you have OpenSessionInViewFilter in your web.xml? If no, you will get this
exception whenever you try to do lazy loading outside your DAOs.

add to web.xml:
  filter
filter-nameOpenSessionFilter/filter-name
filter-class
  org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
/filter-class
init-param
  param-namesessionFactoryBeanName/param-name
  param-valuehibernateSessionFactory/param-value
/init-param
  /filter

  filter-mapping
filter-nameOpenSessionFilter/filter-name
url-pattern/*/url-pattern
  /filter-mapping

I always use a self-written class called PersistentObjectModel (a
LoadableDetachableModel) and let all my Persisent classes implement an
interface called IPersistentObject with a single method: Serializable
getId()

public class PersistentObjectModelT extends IPersistentObject extends
LoadableDetachableModel {

private static final long serialVersionUID = 1L;

private final ClassT _clazz;

private final int _id;

@SpringBean(name = myDao)
private IMyDao _myDao;

@SuppressWarnings(unchecked)
public PersistentObjectModel(final T object) {
super(object);

if (object instanceof HibernateProxy) {
_clazz = (ClassT) ((HibernateProxy)
object).getHibernateLazyInitializer()
.getImplementation().getClass();
} else {
_clazz = (ClassT) object.getClass();
}
_id = object.getId();
// inject the bean
InjectorHolder.getInjector().inject(this);
}

public PersistentObjectModel(final ClassT clazz, final int id) {
_clazz = clazz;
_id = id;
// inject the bean
InjectorHolder.getInjector().inject(this);
}

@Override
protected T load() {
return _myDao.getById(_clazz, _id);
}

@SuppressWarnings(unchecked)
@Override
public T getObject() {
return (T) super.getObject();
}

}


This makes working with hibernate objects really easy:

setModel(new PersistentObjectModel(Foo.class, 1)); // option 1: class and id
setModel(new PersistentObjectModel(foo)); // option 2: persistent object

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/How-to-avoid-Lazy-loading-exception-tp17040941p17045620.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: why swarm not render link

2008-05-04 Thread Maurice Marrink
Well everything looks fine, so i will ask you to verify a few things for me.
-Your hive file has permissions which continue over the next line, i
assume this is caused by copy pasting the file here and that in the
actual hive file each permission is on exactly 1 line.
-I assume all the page classes in the policy file extend this
BaseSecurePage of yours
-Can you turn on debug logging for BasicHive and
PolicyFileHiveFactory, i would like to see if you get any messages
about the user not having permissions for the links and messages about
skipped policy file lines
-Are you using 1.3.0 or 1.3-SNAPSHOT?
-According to the policy file these permissions are granted to any
authenticated user, can you confirm you indeed have an authenticated
user.
-Can you show me your application, in particular the methods swarm
requires you to implement

I cannot explain why your logoff link is not displayed, it is not
secured as far as i can see, so it should always render.

Maurice


On Sun, May 4, 2008 at 3:42 AM, NHSoft.YHW [EMAIL PROTECTED] wrote:


  my hive file:
  grant
  {
 permission ${ComponentPermission} wm.wicket.pages.HomePage, 
 inherit,
  render;
 permission ${ComponentPermission} wm.wicket.pages.HomePage, 
 enable;
 permission ${ComponentPermission} wm.wicket.pages.ManageCenterPage,
  inherit, render;
 permission ${ComponentPermission} wm.wicket.pages.ManageCenterPage,
  enable;
 permission ${ComponentPermission} 
 wm.wicket.pages.UserAccountFormPage,
  inherit, render;
 permission ${ComponentPermission} 
 wm.wicket.pages.UserAccountFormPage,
  enable;
  };

  BaseSecurePage extend SecureWebPage:

  public class BaseSecurePage extends SecureWebPage {
 private static final long serialVersionUID = 1L;

 protected static final Logger logger =
  LoggerFactory.getLogger(BaseSecurePage.class);

 public BaseSecurePage() {
 final HeaderPanel headerPanel = new HeaderPanel();
 headerPanel.setRenderBodyOnly(true);
 add(headerPanel);
 }
  ...
  }

  when i add link to headerPanel, the link(both wicket's Link and swarm
  SecurePageLink) will not render(not visible), but when i change my
  BaseSecurePage extend WebPage, the link will visible.

  my link create code in HeaderPanel as follow:

  public class HeaderPanel extends BasePanel {
 public HeaderPanel() {
 //general link
 Link logoff = new Link(logoff)
 {
 private static final long serialVersionUID = 1L;

 public void onClick()
 {
 WaspSession waspSession = 
 ((WaspSession)getSession());
 LoginContext loginContext =
  ((wm.wicket.Application)getApplication()).getLogoffContext();
 if (waspSession.logoff(loginContext))
 {
 // homepage is not allowed anymore so 
 we end up at the loginpage
 
 setResponsePage(Application.get().getHomePage());
 waspSession.invalidate();
 } else {
 error(A problem occured during the 
 logoff process, please try again or
  contact support);
 }
 }
 };
 add(logoff);

 //Swarm Secure Link
 final SecurePageLink lnkCreateUserAccount = new
  SecurePageLink(toCreateUserAccount, UserAccountFormPage.class);
 lnkCreateUserAccount.setAutoEnable(true);
 add(lnkCreateUserAccount);
 
 }
  }

  I want to know why link not render, if my hive file has some problem, how to
  change hive config file for can show link
  --
  View this message in context: 
 http://www.nabble.com/why-swarm-not-render-link-tp17041821p17041821.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: AjaxSelfUpdatingTimerBahaviour to enable button when process compete

2008-05-04 Thread Maurice Marrink
You can override onPostProcessTarget of your
AjaxSelfUpdatingTimerBehavior and enable your button there.

Maurice

On Sun, May 4, 2008 at 2:08 PM, Andrew Moore [EMAIL PROTECTED] wrote:

  Hi,
  I'm currently using an ajaxselfupdatingtimerbehaviour to update a message
  field for when a job is complete with the following code:
 final Label status = new Label(uploadstatus, new 
 AbstractReadOnlyModel()
  {
 private static final long serialVersionUID = 
 938943178761943953L;

 public Object getObject() {
 if (getMySession().isUploading()) {
 return getString(uploading);
 } else if (getMySession().isUploadComplete()) 
 {
 return getString(uploadcomplete);
 } else {
 return ;
 }
 }
 });
 status.add(new 
 AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
 add(status);

  ===
  What I'm wanting to also have happen is then when the
  session.isUploadComplete is true I want to be able to re-enable a button
  which got disabled when the process started.

  I just can't think what I need to do to my button:
  ===
  final Button cancel = new Button(cancel, new
  StringResourceModel(cancelbutton, this, null)) {
  private static final long serialVersionUID = 691332069442892669L;

  public void onSubmit() {
 setReturnPage(pageId, pageType, website);
  }
  };
  cancel.setDefaultFormProcessing(false);
  form.add(cancel);

  --
  View this message in context: 
 http://www.nabble.com/AjaxSelfUpdatingTimerBahaviour-to-enable-button-when-process-compete-tp17045416p17045416.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: About the Session Leaking Problem

2008-05-04 Thread Johan Compagner
yes thats better. i changed it

On Sun, May 4, 2008 at 8:50 AM, Jonathan Locke [EMAIL PROTECTED]
wrote:



 actually, i think it would be more correct for the unset below to be
 inside
 a nested finally block.  it's an edge case and probably will never happen,
 but technically speaking the try/catch below could fail for Throwables
 that
 are not exceptions (OOM errors, assertion failures, etc.) while finally is
 fairly bulletproof.


 Iman Rahmatizadeh wrote:
 
  Hi ,
  About the session leaking problem described in this thread :
 
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-td16550360.html
  I'm getting reports of the same problem from some of my clients. Where
 can
  I
  find  the fix committed for this problem ? Is it more than just this
  try/crach added to WicketFilter.java ?
 
  ---
 
 wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
  2008/04/08
  17:23:34  646008
  +++
 
 wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
  2008/04/09
  13:18:38  646331
  @@ -385,7 +385,16 @@
{
// Close response
if (response != null)
  - response.close();
  + {
  + try
  + {
  + response.close();
  + }
  + catch (Exception e)
  + {
  + log.error(closing the
 buffer error, e);
  + }
  + }
 
// Clean up thread local session
Session.unset();
 
  Regards,
  Iman
 
 

 --
 View this message in context:
 http://www.nabble.com/About-the-Session-Leaking-Problem-tp17043104p17043374.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: AjaxSelfUpdatingTimerBahaviour to enable button when process compete

2008-05-04 Thread Andrew Moore

Thanks, that's just what I was looking for.
Cheers
Andrew


Mr Mean wrote:
 
 You can override onPostProcessTarget of your
 AjaxSelfUpdatingTimerBehavior and enable your button there.
 
 Maurice
 
 On Sun, May 4, 2008 at 2:08 PM, Andrew Moore [EMAIL PROTECTED]
 wrote:

  Hi,
  I'm currently using an ajaxselfupdatingtimerbehaviour to update a
 message
  field for when a job is complete with the following code:
 final Label status = new Label(uploadstatus, new
 AbstractReadOnlyModel()
  {
 private static final long serialVersionUID =
 938943178761943953L;

 public Object getObject() {
 if (getMySession().isUploading()) {
 return getString(uploading);
 } else if
 (getMySession().isUploadComplete()) {
 return
 getString(uploadcomplete);
 } else {
 return ;
 }
 }
 });
 status.add(new
 AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
 add(status);

  ===
  What I'm wanting to also have happen is then when the
  session.isUploadComplete is true I want to be able to re-enable a button
  which got disabled when the process started.

  I just can't think what I need to do to my button:
  ===
  final Button cancel = new Button(cancel, new
  StringResourceModel(cancelbutton, this, null)) {
  private static final long serialVersionUID = 691332069442892669L;

  public void onSubmit() {
 setReturnPage(pageId, pageType, website);
  }
  };
  cancel.setDefaultFormProcessing(false);
  form.add(cancel);

  --
  View this message in context:
 http://www.nabble.com/AjaxSelfUpdatingTimerBahaviour-to-enable-button-when-process-compete-tp17045416p17045416.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/AjaxSelfUpdatingTimerBahaviour-to-enable-button-when-process-compete-tp17045416p17046752.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Hoover, William
Is there a reason why StringResourceModel is not using
StringResourceModelT ? 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Frank Bille
Sent: Friday, May 02, 2008 4:09 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
users@wicket.apache.org; Apache Wicket Development
Subject: [ANNOUNCE] Apache Wicket 1.4-M1

The Apache Wicket team is proud to announce the availability of the
first milestone release of our first java 1.5 Wicket version: Apache
Wicket 1.4-m1.

Eager people click here to download the distribution, others can read
further:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1

We thank you for your patience and support.

The Wicket Team

=== Apache Wicket ===

Apache Wicket is a component oriented Java web application framework.
With proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps simple
and enjoyable again. Swap the boilerplate, complex debugging and brittle
code for powerful, reusable components written with plain Java and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org

=== This release ===

The Apache Wicket team is proud to announce the availability of the
first milestone release of our first java 1.5 Wicket version: Apache
Wicket 1.4-m1. This is the first release with java 1.5 as a minimum.
Not everything has been converted to java 1.5 yet but we are getting
there.

=== Migrating from 1.3 ===

If you are coming from Wicket 1.3, you really want to read our migration
guide, found on the wiki:

http://cwiki.apache.org/WICKET/migrate-14.html

=== Downloading the release ===

You can download the release from the official Apache mirror system, and
you can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/

For the Maven and Ivy fans out there: update your pom's to the
following, and everything will be downloaded automatically:

   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket/artifactId
   version1.4-m1/version
   /dependency

Substitute the artifact ID with the projects of your liking to get the
other projects.

Please note that we don't prescribe a Logging implementation for SLF4J.
You need to specify yourself which one you prefer. Read more about SLF4J
here: [http://slf4j.org]

=== Validating the release ===

The release has been signed by Frank Bille, your release manager for
today. The public key can be found in the KEYS file in the download
area. Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.4-m1/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity

=== Reporting bugs ===

In case you do encounter a bug, we would appreciate a report in our
JIRA:

http://issues.apache.org/jira/browse/WICKET

=== The distribution ===

In the distribution you will find a README. The README contains
instructions on how to build from source yourself. You also find a
CHANEGELOG-1.4 which contains a list of all things that have been fixed,
added and/or removed since the first release in the 1.4 branch.

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



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



Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Frank Bille
It wasn't done at the time of m1. It's fixed in trunk (hardcoded to String)

Frank


On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED] wrote:
 Is there a reason why StringResourceModel is not using
  StringResourceModelT ?



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
  Frank Bille
  Sent: Friday, May 02, 2008 4:09 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
  users@wicket.apache.org; Apache Wicket Development
  Subject: [ANNOUNCE] Apache Wicket 1.4-M1

  The Apache Wicket team is proud to announce the availability of the
  first milestone release of our first java 1.5 Wicket version: Apache
  Wicket 1.4-m1.

  Eager people click here to download the distribution, others can read
  further:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1

  We thank you for your patience and support.

  The Wicket Team

  === Apache Wicket ===

  Apache Wicket is a component oriented Java web application framework.
  With proper mark-up/logic separation, a POJO data model, and a
  refreshing lack of XML, Apache Wicket makes developing web-apps simple
  and enjoyable again. Swap the boilerplate, complex debugging and brittle
  code for powerful, reusable components written with plain Java and HTML.

  You can find out more about Apache Wicket on our website:

  http://wicket.apache.org

  === This release ===

  The Apache Wicket team is proud to announce the availability of the
  first milestone release of our first java 1.5 Wicket version: Apache
  Wicket 1.4-m1. This is the first release with java 1.5 as a minimum.
  Not everything has been converted to java 1.5 yet but we are getting
  there.

  === Migrating from 1.3 ===

  If you are coming from Wicket 1.3, you really want to read our migration
  guide, found on the wiki:

  http://cwiki.apache.org/WICKET/migrate-14.html

  === Downloading the release ===

  You can download the release from the official Apache mirror system, and
  you can find it through the following link:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/

  For the Maven and Ivy fans out there: update your pom's to the
  following, and everything will be downloaded automatically:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.4-m1/version
/dependency

  Substitute the artifact ID with the projects of your liking to get the
  other projects.

  Please note that we don't prescribe a Logging implementation for SLF4J.
  You need to specify yourself which one you prefer. Read more about SLF4J
  here: [http://slf4j.org]

  === Validating the release ===

  The release has been signed by Frank Bille, your release manager for
  today. The public key can be found in the KEYS file in the download
  area. Download the KEYS file only from the Apache website.

  http://www.apache.org/dist/wicket/1.4-m1/KEYS

  Instructions on how to validate the release can be found here:

  http://www.apache.org/dev/release-signing.html#check-integrity

  === Reporting bugs ===

  In case you do encounter a bug, we would appreciate a report in our
  JIRA:

  http://issues.apache.org/jira/browse/WICKET

  === The distribution ===

  In the distribution you will find a README. The README contains
  instructions on how to build from source yourself. You also find a
  CHANEGELOG-1.4 which contains a list of all things that have been fixed,
  added and/or removed since the first release in the 1.4 branch.

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



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



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



Re: How to lookup Page or Class from a URI path ?

2008-05-04 Thread Chris Lintz

Sorry I should be more clear. I know how to use mounts.  What I need to
lookup the Class associated to a particular mount point.  Please see my code
below:

return new WebRequestCycle(this, (WebRequest) request, response)
{
   @Override
   protected void onBeginRequest()
   {
 super.onBeginRequest();
 HttpServletRequest req=(HttpServletRequest)request;
 String path=req.getServletPath();
 // I need to lookup the Page or Class from this path 
 ...
   }
 }



martin-g wrote:
 
 http://wicketstuff.org/wicket13/niceurl/the/homepage/path
 
 Browse the source code of NiceUrlApplication.java to see how to use
 mounts
 
 On Sat, 2008-05-03 at 18:35 +0200, Johan Compagner wrote:
 Use mounts
 
 On 5/2/08, Chris Lintz [EMAIL PROTECTED] wrote:
 
  Hi,
  Any one know how I can directly lookup a Page or the Page Class from a
 URI
  path?  For example, say I have /pic/convert .  How can I get the
  associated Page or Page class that path?
 
  thanks for any help
 
  chris
 
  --
  View this message in context:
 
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17020708.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048153.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Gzipping of pages (HTML output, not only resources)

2008-05-04 Thread Stefan Simik

One simple idea.
It's possible, that we use different versions of Jetty. I am using version
6.1.8.


I could'nt find either the same closing code in Gzip filter, 
nor finishResponse() method,
nor such a string - This output stream has already been closed   in my
jetty source code.

public void close() throws IOException {
if (closed) {
throw new IOException(This output stream has already been
closed);
}
[...]
}


I think, we must work with different versions of Jetty :)


-- 
View this message in context: 
http://www.nabble.com/Gzipping-of-pages-%28HTML-output%2C-not-only-resources%29-tp16849900p17048230.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Hoover, William
Is that the same case for UploadProgressBar ? 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Frank Bille
Sent: Sunday, May 04, 2008 11:52 AM
To: users@wicket.apache.org
Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1

It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
String)

Frank


On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
wrote:
 Is there a reason why StringResourceModel is not using  
 StringResourceModelT ?



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
 Of  Frank Bille
  Sent: Friday, May 02, 2008 4:09 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED];  
 users@wicket.apache.org; Apache Wicket Development
  Subject: [ANNOUNCE] Apache Wicket 1.4-M1

  The Apache Wicket team is proud to announce the availability of the  
 first milestone release of our first java 1.5 Wicket version: Apache  
 Wicket 1.4-m1.

  Eager people click here to download the distribution, others can read
  further:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1

  We thank you for your patience and support.

  The Wicket Team

  === Apache Wicket ===

  Apache Wicket is a component oriented Java web application framework.
  With proper mark-up/logic separation, a POJO data model, and a  
 refreshing lack of XML, Apache Wicket makes developing web-apps simple

 and enjoyable again. Swap the boilerplate, complex debugging and 
 brittle  code for powerful, reusable components written with plain
Java and HTML.

  You can find out more about Apache Wicket on our website:

  http://wicket.apache.org

  === This release ===

  The Apache Wicket team is proud to announce the availability of the  
 first milestone release of our first java 1.5 Wicket version: Apache  
 Wicket 1.4-m1. This is the first release with java 1.5 as a minimum.
  Not everything has been converted to java 1.5 yet but we are getting

 there.

  === Migrating from 1.3 ===

  If you are coming from Wicket 1.3, you really want to read our 
 migration  guide, found on the wiki:

  http://cwiki.apache.org/WICKET/migrate-14.html

  === Downloading the release ===

  You can download the release from the official Apache mirror system, 
 and  you can find it through the following link:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/

  For the Maven and Ivy fans out there: update your pom's to the  
 following, and everything will be downloaded automatically:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.4-m1/version
/dependency

  Substitute the artifact ID with the projects of your liking to get 
 the  other projects.

  Please note that we don't prescribe a Logging implementation for
SLF4J.
  You need to specify yourself which one you prefer. Read more about 
 SLF4J
  here: [http://slf4j.org]

  === Validating the release ===

  The release has been signed by Frank Bille, your release manager for

 today. The public key can be found in the KEYS file in the download  
 area. Download the KEYS file only from the Apache website.

  http://www.apache.org/dist/wicket/1.4-m1/KEYS

  Instructions on how to validate the release can be found here:

  http://www.apache.org/dev/release-signing.html#check-integrity

  === Reporting bugs ===

  In case you do encounter a bug, we would appreciate a report in our
  JIRA:

  http://issues.apache.org/jira/browse/WICKET

  === The distribution ===

  In the distribution you will find a README. The README contains  
 instructions on how to build from source yourself. You also find a
  CHANEGELOG-1.4 which contains a list of all things that have been 
 fixed,  added and/or removed since the first release in the 1.4
branch.

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



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



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



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



Re: How to lookup Page or Class from a URI path ?

2008-05-04 Thread Johan Compagner
why do you want to know it there?
you are to early there. Wicket only knows it much later when it generates a
RequestTarget from the url

johan


On Sun, May 4, 2008 at 6:09 PM, Chris Lintz [EMAIL PROTECTED]
wrote:


 Sorry I should be more clear. I know how to use mounts.  What I need to
 lookup the Class associated to a particular mount point.  Please see my
 code
 below:

return new WebRequestCycle(this, (WebRequest) request, response)
{
   @Override
   protected void onBeginRequest()
   {
 super.onBeginRequest();
 HttpServletRequest req=(HttpServletRequest)request;
 String path=req.getServletPath();
 // I need to lookup the Page or Class from this path
 ...
}
 }



 martin-g wrote:
 
  http://wicketstuff.org/wicket13/niceurl/the/homepage/path
 
  Browse the source code of NiceUrlApplication.java to see how to use
  mounts
 
  On Sat, 2008-05-03 at 18:35 +0200, Johan Compagner wrote:
  Use mounts
 
  On 5/2/08, Chris Lintz [EMAIL PROTECTED] wrote:
  
   Hi,
   Any one know how I can directly lookup a Page or the Page Class from
 a
  URI
   path?  For example, say I have /pic/convert .  How can I get the
   associated Page or Page class that path?
  
   thanks for any help
  
   chris
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17020708.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048153.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: How to lookup Page or Class from a URI path ?

2008-05-04 Thread Chris Lintz

Because I need the Class so i can check for the presence of an annotation
(@InternalPage).  If that annotation is present, only internal requests from
10.x.x.x are allowed.  Otherwise a 403 (Forbidden) will be generated.

Obviously i can control access with Apache, or a ServletFilter..heck for
that matter in the Page constructor itself.  I feel the better solution is
with my annotation and before the Page constructor is called.

Thanks for clearing that up for me. Where can I check for this annotation
within the Web Request Cycle before the Page constructor is called?
 

Johan Compagner wrote:
 
 why do you want to know it there?
 you are to early there. Wicket only knows it much later when it generates
 a
 RequestTarget from the url
 
 johan
 
 
 On Sun, May 4, 2008 at 6:09 PM, Chris Lintz [EMAIL PROTECTED]
 wrote:
 

 Sorry I should be more clear. I know how to use mounts.  What I need to
 lookup the Class associated to a particular mount point.  Please see my
 code
 below:

return new WebRequestCycle(this, (WebRequest) request, response)
{
   @Override
   protected void onBeginRequest()
   {
 super.onBeginRequest();
 HttpServletRequest req=(HttpServletRequest)request;
 String path=req.getServletPath();
 // I need to lookup the Page or Class from this path
 ...
}
 }



 martin-g wrote:
 
  http://wicketstuff.org/wicket13/niceurl/the/homepage/path
 
  Browse the source code of NiceUrlApplication.java to see how to use
  mounts
 
  On Sat, 2008-05-03 at 18:35 +0200, Johan Compagner wrote:
  Use mounts
 
  On 5/2/08, Chris Lintz [EMAIL PROTECTED] wrote:
  
   Hi,
   Any one know how I can directly lookup a Page or the Page Class from
 a
  URI
   path?  For example, say I have /pic/convert .  How can I get the
   associated Page or Page class that path?
  
   thanks for any help
  
   chris
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17020708.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048153.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048402.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Hoover, William
Also, looks like most of the models are not generic typed
(BoundCompoundPropertyModel, CompoundPropertyModel, etc.) are these
fixed in trunk as well? 

-Original Message-
From: Hoover, William [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 04, 2008 12:15 PM
To: users@wicket.apache.org
Subject: RE: [ANNOUNCE] Apache Wicket 1.4-M1

Is that the same case for UploadProgressBar ? 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Frank Bille
Sent: Sunday, May 04, 2008 11:52 AM
To: users@wicket.apache.org
Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1

It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
String)

Frank


On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
wrote:
 Is there a reason why StringResourceModel is not using 
 StringResourceModelT ?



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
 Of  Frank Bille
  Sent: Friday, May 02, 2008 4:09 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
 users@wicket.apache.org; Apache Wicket Development
  Subject: [ANNOUNCE] Apache Wicket 1.4-M1

  The Apache Wicket team is proud to announce the availability of the 
 first milestone release of our first java 1.5 Wicket version: Apache 
 Wicket 1.4-m1.

  Eager people click here to download the distribution, others can read
  further:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1

  We thank you for your patience and support.

  The Wicket Team

  === Apache Wicket ===

  Apache Wicket is a component oriented Java web application framework.
  With proper mark-up/logic separation, a POJO data model, and a 
 refreshing lack of XML, Apache Wicket makes developing web-apps simple

 and enjoyable again. Swap the boilerplate, complex debugging and 
 brittle  code for powerful, reusable components written with plain
Java and HTML.

  You can find out more about Apache Wicket on our website:

  http://wicket.apache.org

  === This release ===

  The Apache Wicket team is proud to announce the availability of the 
 first milestone release of our first java 1.5 Wicket version: Apache 
 Wicket 1.4-m1. This is the first release with java 1.5 as a minimum.
  Not everything has been converted to java 1.5 yet but we are getting

 there.

  === Migrating from 1.3 ===

  If you are coming from Wicket 1.3, you really want to read our 
 migration  guide, found on the wiki:

  http://cwiki.apache.org/WICKET/migrate-14.html

  === Downloading the release ===

  You can download the release from the official Apache mirror system, 
 and  you can find it through the following link:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/

  For the Maven and Ivy fans out there: update your pom's to the 
 following, and everything will be downloaded automatically:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.4-m1/version
/dependency

  Substitute the artifact ID with the projects of your liking to get 
 the  other projects.

  Please note that we don't prescribe a Logging implementation for
SLF4J.
  You need to specify yourself which one you prefer. Read more about 
 SLF4J
  here: [http://slf4j.org]

  === Validating the release ===

  The release has been signed by Frank Bille, your release manager for

 today. The public key can be found in the KEYS file in the download 
 area. Download the KEYS file only from the Apache website.

  http://www.apache.org/dist/wicket/1.4-m1/KEYS

  Instructions on how to validate the release can be found here:

  http://www.apache.org/dev/release-signing.html#check-integrity

  === Reporting bugs ===

  In case you do encounter a bug, we would appreciate a report in our
  JIRA:

  http://issues.apache.org/jira/browse/WICKET

  === The distribution ===

  In the distribution you will find a README. The README contains 
 instructions on how to build from source yourself. You also find a
  CHANEGELOG-1.4 which contains a list of all things that have been 
 fixed,  added and/or removed since the first release in the 1.4
branch.

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



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



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



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



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



Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Johan Compagner
not everything is done yet
its an ongoing thing

On Sun, May 4, 2008 at 6:29 PM, Hoover, William [EMAIL PROTECTED] wrote:

 Also, looks like most of the models are not generic typed
 (BoundCompoundPropertyModel, CompoundPropertyModel, etc.) are these
 fixed in trunk as well?

 -Original Message-
 From: Hoover, William [mailto:[EMAIL PROTECTED]
 Sent: Sunday, May 04, 2008 12:15 PM
 To: users@wicket.apache.org
 Subject: RE: [ANNOUNCE] Apache Wicket 1.4-M1

 Is that the same case for UploadProgressBar ?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
 Frank Bille
 Sent: Sunday, May 04, 2008 11:52 AM
 To: users@wicket.apache.org
 Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1

 It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
 String)

 Frank


 On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
 wrote:
  Is there a reason why StringResourceModel is not using
  StringResourceModelT ?
 
 
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
  Of  Frank Bille
   Sent: Friday, May 02, 2008 4:09 PM
   To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
  users@wicket.apache.org; Apache Wicket Development
   Subject: [ANNOUNCE] Apache Wicket 1.4-M1
 
   The Apache Wicket team is proud to announce the availability of the
  first milestone release of our first java 1.5 Wicket version: Apache
  Wicket 1.4-m1.
 
   Eager people click here to download the distribution, others can read
   further:
 
   http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1
 
   We thank you for your patience and support.
 
   The Wicket Team
 
   === Apache Wicket ===
 
   Apache Wicket is a component oriented Java web application framework.
   With proper mark-up/logic separation, a POJO data model, and a
  refreshing lack of XML, Apache Wicket makes developing web-apps simple

  and enjoyable again. Swap the boilerplate, complex debugging and
  brittle  code for powerful, reusable components written with plain
 Java and HTML.
 
   You can find out more about Apache Wicket on our website:
 
   http://wicket.apache.org
 
   === This release ===
 
   The Apache Wicket team is proud to announce the availability of the
  first milestone release of our first java 1.5 Wicket version: Apache
  Wicket 1.4-m1. This is the first release with java 1.5 as a minimum.
   Not everything has been converted to java 1.5 yet but we are getting

  there.
 
   === Migrating from 1.3 ===
 
   If you are coming from Wicket 1.3, you really want to read our
  migration  guide, found on the wiki:
 
   http://cwiki.apache.org/WICKET/migrate-14.html
 
   === Downloading the release ===
 
   You can download the release from the official Apache mirror system,
  and  you can find it through the following link:
 
   http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/
 
   For the Maven and Ivy fans out there: update your pom's to the
  following, and everything will be downloaded automatically:
 
 dependency
 groupIdorg.apache.wicket/groupId
 artifactIdwicket/artifactId
 version1.4-m1/version
 /dependency
 
   Substitute the artifact ID with the projects of your liking to get
  the  other projects.
 
   Please note that we don't prescribe a Logging implementation for
 SLF4J.
   You need to specify yourself which one you prefer. Read more about
  SLF4J
   here: [http://slf4j.org]
 
   === Validating the release ===
 
   The release has been signed by Frank Bille, your release manager for

  today. The public key can be found in the KEYS file in the download
  area. Download the KEYS file only from the Apache website.
 
   http://www.apache.org/dist/wicket/1.4-m1/KEYS
 
   Instructions on how to validate the release can be found here:
 
   http://www.apache.org/dev/release-signing.html#check-integrity
 
   === Reporting bugs ===
 
   In case you do encounter a bug, we would appreciate a report in our
   JIRA:
 
   http://issues.apache.org/jira/browse/WICKET
 
   === The distribution ===
 
   In the distribution you will find a README. The README contains
  instructions on how to build from source yourself. You also find a
   CHANEGELOG-1.4 which contains a list of all things that have been
  fixed,  added and/or removed since the first release in the 1.4
 branch.
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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

Re: How to avoid Lazy loading exception

2008-05-04 Thread Mathias P.W Nilsson

I have session in view filter but still gets LazyLoadingException even if I
use detached models! Ahhh... 

Solved it temporarily by using Eager fetch but this is going to end up bad
if everything is eager. 
-- 
View this message in context: 
http://www.nabble.com/How-to-avoid-Lazy-loading-exception-tp17040941p17048739.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Johan Compagner
BoundCompoundPropertyModel can be depricated i think
It doesnt have any added bonus over the normal CPM

johan


On Sun, May 4, 2008 at 6:29 PM, Hoover, William [EMAIL PROTECTED] wrote:

 Also, looks like most of the models are not generic typed
 (BoundCompoundPropertyModel, CompoundPropertyModel, etc.) are these
 fixed in trunk as well?

 -Original Message-
 From: Hoover, William [mailto:[EMAIL PROTECTED]
 Sent: Sunday, May 04, 2008 12:15 PM
 To: users@wicket.apache.org
 Subject: RE: [ANNOUNCE] Apache Wicket 1.4-M1

 Is that the same case for UploadProgressBar ?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
 Frank Bille
 Sent: Sunday, May 04, 2008 11:52 AM
 To: users@wicket.apache.org
 Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1

 It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
 String)

 Frank


 On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
 wrote:
  Is there a reason why StringResourceModel is not using
  StringResourceModelT ?
 
 
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
  Of  Frank Bille
   Sent: Friday, May 02, 2008 4:09 PM
   To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
  users@wicket.apache.org; Apache Wicket Development
   Subject: [ANNOUNCE] Apache Wicket 1.4-M1
 
   The Apache Wicket team is proud to announce the availability of the
  first milestone release of our first java 1.5 Wicket version: Apache
  Wicket 1.4-m1.
 
   Eager people click here to download the distribution, others can read
   further:
 
   http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1
 
   We thank you for your patience and support.
 
   The Wicket Team
 
   === Apache Wicket ===
 
   Apache Wicket is a component oriented Java web application framework.
   With proper mark-up/logic separation, a POJO data model, and a
  refreshing lack of XML, Apache Wicket makes developing web-apps simple

  and enjoyable again. Swap the boilerplate, complex debugging and
  brittle  code for powerful, reusable components written with plain
 Java and HTML.
 
   You can find out more about Apache Wicket on our website:
 
   http://wicket.apache.org
 
   === This release ===
 
   The Apache Wicket team is proud to announce the availability of the
  first milestone release of our first java 1.5 Wicket version: Apache
  Wicket 1.4-m1. This is the first release with java 1.5 as a minimum.
   Not everything has been converted to java 1.5 yet but we are getting

  there.
 
   === Migrating from 1.3 ===
 
   If you are coming from Wicket 1.3, you really want to read our
  migration  guide, found on the wiki:
 
   http://cwiki.apache.org/WICKET/migrate-14.html
 
   === Downloading the release ===
 
   You can download the release from the official Apache mirror system,
  and  you can find it through the following link:
 
   http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/
 
   For the Maven and Ivy fans out there: update your pom's to the
  following, and everything will be downloaded automatically:
 
 dependency
 groupIdorg.apache.wicket/groupId
 artifactIdwicket/artifactId
 version1.4-m1/version
 /dependency
 
   Substitute the artifact ID with the projects of your liking to get
  the  other projects.
 
   Please note that we don't prescribe a Logging implementation for
 SLF4J.
   You need to specify yourself which one you prefer. Read more about
  SLF4J
   here: [http://slf4j.org]
 
   === Validating the release ===
 
   The release has been signed by Frank Bille, your release manager for

  today. The public key can be found in the KEYS file in the download
  area. Download the KEYS file only from the Apache website.
 
   http://www.apache.org/dist/wicket/1.4-m1/KEYS
 
   Instructions on how to validate the release can be found here:
 
   http://www.apache.org/dev/release-signing.html#check-integrity
 
   === Reporting bugs ===
 
   In case you do encounter a bug, we would appreciate a report in our
   JIRA:
 
   http://issues.apache.org/jira/browse/WICKET
 
   === The distribution ===
 
   In the distribution you will find a README. The README contains
  instructions on how to build from source yourself. You also find a
   CHANEGELOG-1.4 which contains a list of all things that have been
  fixed,  added and/or removed since the first release in the 1.4
 branch.
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



 -
 To 

Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Igor Vaynberg
my version of bcpm doesnt have deprecations, where are those?

-igor


On Sun, May 4, 2008 at 10:14 AM, Johan Compagner [EMAIL PROTECTED] wrote:
 we already have

   * @deprecated See [EMAIL PROTECTED] CompoundPropertyModel#bind(String)}



  On Sun, May 4, 2008 at 7:12 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:



   it has the bind methods, we can move those into compound though
  
   -Igor
  
  
   On Sun, May 4, 2008 at 10:02 AM, Johan Compagner [EMAIL PROTECTED]
   wrote:
BoundCompoundPropertyModel can be depricated i think
 It doesnt have any added bonus over the normal CPM
   
 johan
   
   
   
   
 On Sun, May 4, 2008 at 6:29 PM, Hoover, William [EMAIL PROTECTED]
   wrote:
   
  Also, looks like most of the models are not generic typed
  (BoundCompoundPropertyModel, CompoundPropertyModel, etc.) are these
  fixed in trunk as well?
 
  -Original Message-
  From: Hoover, William [mailto:[EMAIL PROTECTED]
  Sent: Sunday, May 04, 2008 12:15 PM
  To: users@wicket.apache.org
  Subject: RE: [ANNOUNCE] Apache Wicket 1.4-M1
 
  Is that the same case for UploadProgressBar ?
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
   Of
  Frank Bille
  Sent: Sunday, May 04, 2008 11:52 AM
  To: users@wicket.apache.org
  Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1
 
  It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
  String)
 
  Frank
 
 
  On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
  wrote:
   Is there a reason why StringResourceModel is not using
   StringResourceModelT ?
  
  
  
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
   Behalf
   Of  Frank Bille
Sent: Friday, May 02, 2008 4:09 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
   users@wicket.apache.org; Apache Wicket Development
Subject: [ANNOUNCE] Apache Wicket 1.4-M1
  
The Apache Wicket team is proud to announce the availability of
   the
   first milestone release of our first java 1.5 Wicket version:
   Apache
   Wicket 1.4-m1.
  
Eager people click here to download the distribution, others can
   read
further:
  
http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1
  
We thank you for your patience and support.
  
The Wicket Team
  
=== Apache Wicket ===
  
Apache Wicket is a component oriented Java web application
   framework.
With proper mark-up/logic separation, a POJO data model, and a
   refreshing lack of XML, Apache Wicket makes developing web-apps
   simple
 
   and enjoyable again. Swap the boilerplate, complex debugging and
   brittle  code for powerful, reusable components written with plain
  Java and HTML.
  
You can find out more about Apache Wicket on our website:
  
http://wicket.apache.org
  
=== This release ===
  
The Apache Wicket team is proud to announce the availability of
   the
   first milestone release of our first java 1.5 Wicket version:
   Apache
   Wicket 1.4-m1. This is the first release with java 1.5 as a
   minimum.
Not everything has been converted to java 1.5 yet but we are
   getting
 
   there.
  
=== Migrating from 1.3 ===
  
If you are coming from Wicket 1.3, you really want to read our
   migration  guide, found on the wiki:
  
http://cwiki.apache.org/WICKET/migrate-14.html
  
=== Downloading the release ===
  
You can download the release from the official Apache mirror
   system,
   and  you can find it through the following link:
  
http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/
  
For the Maven and Ivy fans out there: update your pom's to the
   following, and everything will be downloaded automatically:
  
  dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4-m1/version
  /dependency
  
Substitute the artifact ID with the projects of your liking to get
   the  other projects.
  
Please note that we don't prescribe a Logging implementation for
  SLF4J.
You need to specify yourself which one you prefer. Read more about
   SLF4J
here: [http://slf4j.org]
  
=== Validating the release ===
  
The release has been signed by Frank Bille, your release manager
   for
 
   today. The public key can be found in the KEYS file in the download
   area. Download the KEYS file only from the Apache website.
  
http://www.apache.org/dist/wicket/1.4-m1/KEYS
  
Instructions on how to validate the release can be found 

Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Igor Vaynberg
ah, lol, i see that was your latest commit. fine, +1 to deprecate it.

-igor

On Sun, May 4, 2008 at 10:20 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 my version of bcpm doesnt have deprecations, where are those?

  -igor




  On Sun, May 4, 2008 at 10:14 AM, Johan Compagner [EMAIL PROTECTED] wrote:
   we already have
  
 * @deprecated See [EMAIL PROTECTED] CompoundPropertyModel#bind(String)}
  
  
  
On Sun, May 4, 2008 at 7:12 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:
  
  
  
 it has the bind methods, we can move those into compound though

 -Igor


 On Sun, May 4, 2008 at 10:02 AM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  BoundCompoundPropertyModel can be depricated i think
   It doesnt have any added bonus over the normal CPM
 
   johan
 
 
 
 
   On Sun, May 4, 2008 at 6:29 PM, Hoover, William [EMAIL PROTECTED]
 wrote:
 
Also, looks like most of the models are not generic typed
(BoundCompoundPropertyModel, CompoundPropertyModel, etc.) are these
fixed in trunk as well?
   
-Original Message-
From: Hoover, William [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 04, 2008 12:15 PM
To: users@wicket.apache.org
Subject: RE: [ANNOUNCE] Apache Wicket 1.4-M1
   
Is that the same case for UploadProgressBar ?
   
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of
Frank Bille
Sent: Sunday, May 04, 2008 11:52 AM
To: users@wicket.apache.org
Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1
   
It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
String)
   
Frank
   
   
On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
wrote:
 Is there a reason why StringResourceModel is not using
 StringResourceModelT ?



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf
 Of  Frank Bille
  Sent: Friday, May 02, 2008 4:09 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 users@wicket.apache.org; Apache Wicket Development
  Subject: [ANNOUNCE] Apache Wicket 1.4-M1

  The Apache Wicket team is proud to announce the availability of
 the
 first milestone release of our first java 1.5 Wicket version:
 Apache
 Wicket 1.4-m1.

  Eager people click here to download the distribution, others can
 read
  further:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1

  We thank you for your patience and support.

  The Wicket Team

  === Apache Wicket ===

  Apache Wicket is a component oriented Java web application
 framework.
  With proper mark-up/logic separation, a POJO data model, and a
 refreshing lack of XML, Apache Wicket makes developing web-apps
 simple
   
 and enjoyable again. Swap the boilerplate, complex debugging and
 brittle  code for powerful, reusable components written with 
 plain
Java and HTML.

  You can find out more about Apache Wicket on our website:

  http://wicket.apache.org

  === This release ===

  The Apache Wicket team is proud to announce the availability of
 the
 first milestone release of our first java 1.5 Wicket version:
 Apache
 Wicket 1.4-m1. This is the first release with java 1.5 as a
 minimum.
  Not everything has been converted to java 1.5 yet but we are
 getting
   
 there.

  === Migrating from 1.3 ===

  If you are coming from Wicket 1.3, you really want to read our
 migration  guide, found on the wiki:

  http://cwiki.apache.org/WICKET/migrate-14.html

  === Downloading the release ===

  You can download the release from the official Apache mirror
 system,
 and  you can find it through the following link:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/

  For the Maven and Ivy fans out there: update your pom's to the
 following, and everything will be downloaded automatically:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.4-m1/version
/dependency

  Substitute the artifact ID with the projects of your liking to 
 get
 the  other projects.

  Please note that we don't prescribe a Logging implementation for
SLF4J.
  You need to specify yourself which one you prefer. Read more 
 about
  

Re: why swarm not render link

2008-05-04 Thread Maurice Marrink
The log indicates all requested permissions are granted. In fact the
only thing that raises my eyebrow in the log is :
05-04 21:14:10.000[UserAccountServiceImpl.java:40 :ERROR]
org.springframework.orm.ObjectRetrievalFailureException: Object of
class [wm.model.UserAccount] with identifier [nhsoft]: not found
05-04 21:14:10.046[ LoggerListener.java:60 :WARN ] Authentication
event AuthenticationSuccessEvent: nhsoft; details: null
which might indicate a problem with acegi or your configuration.
So i don't think swarm is the problem here. I did notice however an if
statement in HeaderPanel
Authentication authentication =
SecurityContextHolder.getContext().getAuthentication();
if(authentication != null)
 .
else
 

In the else block you are hiding both links, which matches the
problems you are seeing.
Theoretically if you only use this panel on pages extending from
SecureBasePage, the Authentication should never be null. If it is,
this indicates a synchronization problem between swarm and acegi, both
keep separate records of who is logged in and what there
permissions/grantedAuthorities are.

Can you check which block is executed, the if or the else.

Maurice

On Sun, May 4, 2008 at 3:28 PM, 宁波新希望信息技术有限公司 -- 俞宏伟
[EMAIL PROTECTED] wrote:
 -Your hive file has permissions which continue over the next line, i assume
 this is caused by copy pasting the file here and that in the actual hive
 file each permission is on exactly 1 line.
 yes, my hive file for each permission is on exactly 1 line(nabble forum show
 correctly)


  -I assume all the page classes in the policy file extend this
 BaseSecurePage of yours
 yes


  -Can you turn on debug logging for BasicHive and PolicyFileHiveFactory, i
 would like to see if you get any messages about the user not having
 permissions for the links and messages about skipped policy file lines
  yes, i turn on debug for org.apache.wicket.security,but i can not found any
 skipped tips message. attachment file for detail log information


  -Are you using 1.3.0 or 1.3-SNAPSHOT?
  version is 1.3.0


  -According to the policy file these permissions are granted to any
 authenticated user, can you confirm you indeed have an authenticated user.
 yes


  -Can you show me your application, in particular the methods swarm requires
 you to implement
 my swarm implement is acegi+swarm from swarm acegi example. i attach source
 code (swarm.implement.src.zip)

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



Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Johan Compagner
we already have

 * @deprecated See [EMAIL PROTECTED] CompoundPropertyModel#bind(String)}



On Sun, May 4, 2008 at 7:12 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 it has the bind methods, we can move those into compound though

 -Igor


 On Sun, May 4, 2008 at 10:02 AM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  BoundCompoundPropertyModel can be depricated i think
   It doesnt have any added bonus over the normal CPM
 
   johan
 
 
 
 
   On Sun, May 4, 2008 at 6:29 PM, Hoover, William [EMAIL PROTECTED]
 wrote:
 
Also, looks like most of the models are not generic typed
(BoundCompoundPropertyModel, CompoundPropertyModel, etc.) are these
fixed in trunk as well?
   
-Original Message-
From: Hoover, William [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 04, 2008 12:15 PM
To: users@wicket.apache.org
Subject: RE: [ANNOUNCE] Apache Wicket 1.4-M1
   
Is that the same case for UploadProgressBar ?
   
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of
Frank Bille
Sent: Sunday, May 04, 2008 11:52 AM
To: users@wicket.apache.org
Subject: Re: [ANNOUNCE] Apache Wicket 1.4-M1
   
It wasn't done at the time of m1. It's fixed in trunk (hardcoded to
String)
   
Frank
   
   
On Sun, May 4, 2008 at 5:47 PM, Hoover, William [EMAIL PROTECTED]
wrote:
 Is there a reason why StringResourceModel is not using
 StringResourceModelT ?



  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf
 Of  Frank Bille
  Sent: Friday, May 02, 2008 4:09 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 users@wicket.apache.org; Apache Wicket Development
  Subject: [ANNOUNCE] Apache Wicket 1.4-M1

  The Apache Wicket team is proud to announce the availability of
 the
 first milestone release of our first java 1.5 Wicket version:
 Apache
 Wicket 1.4-m1.

  Eager people click here to download the distribution, others can
 read
  further:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1

  We thank you for your patience and support.

  The Wicket Team

  === Apache Wicket ===

  Apache Wicket is a component oriented Java web application
 framework.
  With proper mark-up/logic separation, a POJO data model, and a
 refreshing lack of XML, Apache Wicket makes developing web-apps
 simple
   
 and enjoyable again. Swap the boilerplate, complex debugging and
 brittle  code for powerful, reusable components written with plain
Java and HTML.

  You can find out more about Apache Wicket on our website:

  http://wicket.apache.org

  === This release ===

  The Apache Wicket team is proud to announce the availability of
 the
 first milestone release of our first java 1.5 Wicket version:
 Apache
 Wicket 1.4-m1. This is the first release with java 1.5 as a
 minimum.
  Not everything has been converted to java 1.5 yet but we are
 getting
   
 there.

  === Migrating from 1.3 ===

  If you are coming from Wicket 1.3, you really want to read our
 migration  guide, found on the wiki:

  http://cwiki.apache.org/WICKET/migrate-14.html

  === Downloading the release ===

  You can download the release from the official Apache mirror
 system,
 and  you can find it through the following link:

  http://www.apache.org/dyn/closer.cgi/wicket/1.4-m1/

  For the Maven and Ivy fans out there: update your pom's to the
 following, and everything will be downloaded automatically:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.4-m1/version
/dependency

  Substitute the artifact ID with the projects of your liking to get
 the  other projects.

  Please note that we don't prescribe a Logging implementation for
SLF4J.
  You need to specify yourself which one you prefer. Read more about
 SLF4J
  here: [http://slf4j.org]

  === Validating the release ===

  The release has been signed by Frank Bille, your release manager
 for
   
 today. The public key can be found in the KEYS file in the download
 area. Download the KEYS file only from the Apache website.

  http://www.apache.org/dist/wicket/1.4-m1/KEYS

  Instructions on how to validate the release can be found here:

  http://www.apache.org/dev/release-signing.html#check-integrity

  === Reporting bugs ===

  In case you do encounter a bug, we would appreciate a report in
 our
  JIRA:

  http://issues.apache.org/jira/browse/WICKET

  === The distribution ===

  In the distribution you will find a README. The README contains
 instructions on how to build from source yourself. You also find a
  

Re: South African Wicket Users?

2008-05-04 Thread Izak Wessels

Thanks for the advice Eelco, 

I have lived in the Englang for 5 years, love the weather and have no
problem with the small housing :)

I do a good knowledge of the Dutch language. I will have a look at the
companies that you provided, thanks for that. 

Am I correct in assuming that most of the jobs are in Amsterdam? and that
'de randstad' = amsterdam?


-- 
View this message in context: 
http://www.nabble.com/South-African-Wicket-Users--tp13857261p17049212.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: South African Wicket Users?

2008-05-04 Thread Johan Compagner
no randstad is not just amsterdam

its pretty much the 4 big city's and everything around that circle

Amsterdam , Den Haag, Rotterdam and Utrecht.

johan


On Sun, May 4, 2008 at 7:45 PM, Izak Wessels [EMAIL PROTECTED] wrote:


 Thanks for the advice Eelco,

 I have lived in the Englang for 5 years, love the weather and have no
 problem with the small housing :)

 I do a good knowledge of the Dutch language. I will have a look at the
 companies that you provided, thanks for that.

 Am I correct in assuming that most of the jobs are in Amsterdam? and that
 'de randstad' = amsterdam?


 --
 View this message in context:
 http://www.nabble.com/South-African-Wicket-Users--tp13857261p17049212.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread mfs

though my case is a bit different, but just tried out what u are doing and i
dont get any exception, whether i do invalidate or invalidateNow()..

not sure why u are getting it and how to avoid the same..


Eyal Golan wrote:
 
 Another question (mfs, if you don't mind).
 I did the invalidate on a link:
 Link logoutLink = new Link(logoutLink) {
 private static final long serialVersionUID = 1L;
 
 @Override
 public void onClick() {
  getSession().invalidateNow();
 setResponsePage(com.eurekify.web.Login.class);
 }
 };
 
 It works, but I get an IllegalState Exception:
 2008-05-04 11:49:06,625 ERROR [org.mortbay.log] - /eurekify/portal/:
 java.lang.IllegalStateException
 at
 org.mortbay.jetty.servlet.AbstractSessionManager$Session.setAttribute(AbstractSessionManager.java:916)
 at
 com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:41)
 at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
 at
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
 at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
 at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
 at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
 at
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:285)
 at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
 at
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
 at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
 at
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
 
 Is there a way to eliminate this?
 I tried to put a catch surrounding the invalidate, but it's no use.
 
 
 thanks,
 
 
 On Sun, May 4, 2008 at 10:00 AM, mfs [EMAIL PROTECTED] wrote:
 

 Looking for some follow up on this..

 1) Just wondering as to why isnt a constructor a good place to do the
 redirection to an external url , ?
 2) What should be the right place for it, given my use-case..


 Would writing a LogoutFilter be a good option..


 Thanks in advance..




 Johan Compagner wrote:
 
  I think this usecase should be supported but isnt the best way, you
  should throw an AbortException when you want to redirect in the
  constructor. Dont know from top of my head if we have one just for an
  url but that is easily made
 
  On 4/30/08, mfs [EMAIL PROTECTED] wrote:
 
  Guys,
 
  I have a LogoutPage which does the following in its constructor
 
  LogoutPage()
  {
  getSession().invalidate();
 
  // redirecting to the external app logout page
  RequestCycle.get().setRequestTarget(
  new RedirectRequestTarget(Host.getHttpsUrl()
  + xyz.getLogoutURL()));
 
  getRequestCycle().setRedirect(true);
  }
 
  Now, for some reasons the redirect to the specified external app page
  doesnt
  happen, infact i am taken to the session-expired page (which is
 because
  the
  request comes to wicket app, instead of redirection to this external
 app)
  .
  Let me add that i am using wiket-auth-roles for authorization...
 
  Also the reason i am doing this inside the Page itself (and not in the
  onClick or some other event as suggested in another other thread) is
  because
  i need to expose this LogoutPage to an external app as well, which
 will
  redirect to this page after invalidating the sessionThis part of
  Interoperability/SingleSignon Support.
 
  Thanks in advance.
 
  --
  View this message in context:
 
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17043421.html
 Sent from the Wicket - User mailing list 

Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Erik van Oosten

Hi,

I am correct in the assumption
-1- that the goal for 1.4 is to only introduce generics,
-2- and to keep the rest of the product stable,
-3- and it is therefore safe to use milestone 1 for development,
-4- and perhaps even for production usages?

Regards,
   Erik.



Frank Bille wrote:

The Apache Wicket team is proud to announce the availability of the
first milestone release of our first java 1.5 Wicket version: Apache
Wicket 1.4-m1.


  



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


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



Re: [ANNOUNCE] Apache Wicket 1.4-M1

2008-05-04 Thread Martijn Dashorst
On 5/4/08, Erik van Oosten [EMAIL PROTECTED] wrote:
  I am correct in the assumption
  -1- that the goal for 1.4 is to only introduce generics,
yes

  -2- and to keep the rest of the product stable,

Yes

  -3- and it is therefore safe to use milestone 1 for development,

Yes, but we expect to modify the API between milestones to get the
generics in a good shape. We definitely hope to get feedback from all
users to see if 1.4M1 is good, or needs work.

  -4- and perhaps even for production usages?

Not really, see #3

Martijn

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



Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread mfs

Also my major problem is that when i do an invalidate() in the constructor
(with or without any redirection) i am taken to the session-expiry page..I
wonder why is that happening...can you please explain that behavior please ?
..the reason as i explained earlier i had to do the same in the in the
LogoutPage Constructor is because i need to expose this page to an external
non-wicket app (which on logout) would be redirecting to this page (if a
wicket session exists)..so as to invalidate my wicket session app..



Johan Compagner wrote:
 
 In a constructor of another page is just fine, but use an
 RestartXxxException. Else you have 2 things that wants to be the
 response, the redirect and the page you are in.
 
 On 5/4/08, mfs [EMAIL PROTECTED] wrote:

 Looking for some follow up on this..

 1) Just wondering as to why isnt a constructor a good place to do the
 redirection to an external url , ?
 2) What should be the right place for it, given my use-case..

 Thanks in advance..

 Johan Compagner wrote:
 
  I think this usecase should be supported but isnt the best way, you
  should throw an AbortException when you want to redirect in the
  constructor. Dont know from top of my head if we have one just for an
  url but that is easily made
 
  On 4/30/08, mfs [EMAIL PROTECTED] wrote:
 
  Guys,
 
  I have a LogoutPage which does the following in its constructor
 
  LogoutPage()
  {
  getSession().invalidate();
 
  // redirecting to the external app logout page
  RequestCycle.get().setRequestTarget(
  new RedirectRequestTarget(Host.getHttpsUrl()
  + xyz.getLogoutURL()));
 
  getRequestCycle().setRedirect(true);
  }
 
  Now, for some reasons the redirect to the specified external app page
  doesnt
  happen, infact i am taken to the session-expired page (which is
 because
  the
  request comes to wicket app, instead of redirection to this external
 app)
  .
  Let me add that i am using wiket-auth-roles for authorization...
 
  Also the reason i am doing this inside the Page itself (and not in the
  onClick or some other event as suggested in another other thread) is
  because
  i need to expose this LogoutPage to an external app as well, which
 will
  redirect to this page after invalidating the sessionThis part of
  Interoperability/SingleSignon Support.
 
  Thanks in advance.
 
  --
  View this message in context:
 
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17042343.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17050703.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Refactoring Support For Wicket in Netbeans? Wonderful

2008-05-04 Thread Ayodeji Aladejebi
I grabbed the latest plugin for wicket from Netbeans plugin portal and to my
suprise, my HTML files are automatically refactored when a corresponding
wicket component class is refactored.

Just excited to see this

you could also give it a try


Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread Martijn Dashorst
I think we need a RedirectToExternalException extends
AbortRestartResponseException that sets the RedirectRequestTarget to
an external page. Isn't too hard to implement I suppose...

public class RedirectToExternalException extends
AbstractRestartResponseException
{
private static final long serialVersionUID = 1L;

public RedirectToExternalException(String url)
{

RequestCycle rc = RequestCycle.get();
if (rc == null)
{
throw new IllegalStateException(
This exception can only be thrown from 
within request processing cycle);
}
else
{
Response r = rc.getResponse();
if (!(r instanceof WebResponse))
{
throw new IllegalStateException(
This exception can only be 
thrown when wicket is processing an
http request);
}

// abort any further response processing
rc.setRequestTarget(new RedirectRequestTarget(url));
}
}
}


Martijn

On 5/4/08, mfs [EMAIL PROTECTED] wrote:

  Also my major problem is that when i do an invalidate() in the constructor
  (with or without any redirection) i am taken to the session-expiry page..I
  wonder why is that happening...can you please explain that behavior please ?
  ..the reason as i explained earlier i had to do the same in the in the
  LogoutPage Constructor is because i need to expose this page to an external
  non-wicket app (which on logout) would be redirecting to this page (if a
  wicket session exists)..so as to invalidate my wicket session app..




  Johan Compagner wrote:
  
   In a constructor of another page is just fine, but use an
   RestartXxxException. Else you have 2 things that wants to be the
   response, the redirect and the page you are in.
  
   On 5/4/08, mfs [EMAIL PROTECTED] wrote:
  
   Looking for some follow up on this..
  
   1) Just wondering as to why isnt a constructor a good place to do the
   redirection to an external url , ?
   2) What should be the right place for it, given my use-case..
  
   Thanks in advance..
  
   Johan Compagner wrote:
   
I think this usecase should be supported but isnt the best way, you
should throw an AbortException when you want to redirect in the
constructor. Dont know from top of my head if we have one just for an
url but that is easily made
   
On 4/30/08, mfs [EMAIL PROTECTED] wrote:
   
Guys,
   
I have a LogoutPage which does the following in its constructor
   
LogoutPage()
{
getSession().invalidate();
   
// redirecting to the external app logout page
RequestCycle.get().setRequestTarget(
new RedirectRequestTarget(Host.getHttpsUrl()
+ xyz.getLogoutURL()));
   
getRequestCycle().setRedirect(true);
}
   
Now, for some reasons the redirect to the specified external app page
doesnt
happen, infact i am taken to the session-expired page (which is
   because
the
request comes to wicket app, instead of redirection to this external
   app)
.
Let me add that i am using wiket-auth-roles for authorization...
   
Also the reason i am doing this inside the Page itself (and not in the
onClick or some other event as suggested in another other thread) is
because
i need to expose this LogoutPage to an external app as well, which
   will
redirect to this page after invalidating the sessionThis part of
Interoperability/SingleSignon Support.
   
Thanks in advance.
   
--
View this message in context:
   
   
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p16974119.html
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
  
   --
   View this message in context:
   
 http://www.nabble.com/LogoutPage---Responsible-for-invalidation-and-redirection-to-non-wicket-page-tp16974119p17042343.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 

Re: LogoutPage - Responsible for invalidation and redirection to non-wicket page

2008-05-04 Thread mfs

Thanks for the follow up Martijn, i will look into this...

though I just discovered something which i cant comprehend, but before that
below is what i do in my logout page..


   String identityToken = MySession.get().getIdentityToken();
  
   Cookie cookie = new Cookie(_JSESSIONID,);
   cookie.setPath(/xyz);
   ((WebResponse)RequestCycle.get().getResponse()).addCookie(cookie);

   // invalidating session
   getSession().invalidate();

   RequestCycle.get().setRequestTarget(
 new RedirectRequestTarget(Host.getHttpsUrl()
 + utils.getLogoutURL(identityToken)));


Now calling the above code on LogoutLink.onClick() { setResponse(new
LogoutPage()) } does invoke the page, does the session invalidation, but
instead of taking to the external logout url (as in the last line), it takes
me to the session-expiry page, BUT if i invoke the above page using lets say
ExternalLink(logoutLink,logout) (where the logout page is mounted as
/logout) the above code works like a charm and does take me to the external
logout page...Can you please explain as to why this is the case...

Also, If this works i can avoid creating/throwing the new exception, unless
there are any issues u see with it? I certainly dont have a problem using
ExternalLink since i already have to expose the logout page to an external
app...

Please comment..




Martijn Dashorst wrote:
 
 I think we need a RedirectToExternalException extends
 AbortRestartResponseException that sets the RedirectRequestTarget to
 an external page. Isn't too hard to implement I suppose...
 
 public class RedirectToExternalException extends
 AbstractRestartResponseException
 {
   private static final long serialVersionUID = 1L;
 
   public RedirectToExternalException(String url)
   {
 
   RequestCycle rc = RequestCycle.get();
   if (rc == null)
   {
   throw new IllegalStateException(
   This exception can only be thrown from 
 within request processing
 cycle);
   }
   else
   {
   Response r = rc.getResponse();
   if (!(r instanceof WebResponse))
   {
   throw new IllegalStateException(
   This exception can only be 
 thrown when wicket is processing an
 http request);
   }
 
   // abort any further response processing
   rc.setRequestTarget(new RedirectRequestTarget(url));
   }
   }
 }
 
 
 Martijn
 
 On 5/4/08, mfs [EMAIL PROTECTED] wrote:

  Also my major problem is that when i do an invalidate() in the
 constructor
  (with or without any redirection) i am taken to the session-expiry
 page..I
  wonder why is that happening...can you please explain that behavior
 please ?
  ..the reason as i explained earlier i had to do the same in the in the
  LogoutPage Constructor is because i need to expose this page to an
 external
  non-wicket app (which on logout) would be redirecting to this page (if a
  wicket session exists)..so as to invalidate my wicket session app..




  Johan Compagner wrote:
  
   In a constructor of another page is just fine, but use an
   RestartXxxException. Else you have 2 things that wants to be the
   response, the redirect and the page you are in.
  
   On 5/4/08, mfs [EMAIL PROTECTED] wrote:
  
   Looking for some follow up on this..
  
   1) Just wondering as to why isnt a constructor a good place to do the
   redirection to an external url , ?
   2) What should be the right place for it, given my use-case..
  
   Thanks in advance..
  
   Johan Compagner wrote:
   
I think this usecase should be supported but isnt the best way, you
should throw an AbortException when you want to redirect in the
constructor. Dont know from top of my head if we have one just for
 an
url but that is easily made
   
On 4/30/08, mfs [EMAIL PROTECTED] wrote:
   
Guys,
   
I have a LogoutPage which does the following in its constructor
   
LogoutPage()
{
getSession().invalidate();
   
// redirecting to the external app logout page
RequestCycle.get().setRequestTarget(
new RedirectRequestTarget(Host.getHttpsUrl()
+ xyz.getLogoutURL()));
   
getRequestCycle().setRedirect(true);
}
   
Now, for some reasons the redirect to the specified external app
 page
doesnt
happen, infact i am taken to the session-expired page (which is
   because
the
request comes to wicket app, instead of redirection to this
 external
   app)
.
Let me add that i am using wiket-auth-roles for authorization...
   
Also the reason i am doing this inside the Page itself (and not in
 the
onClick or some other event as suggested in another other thread)
 is
because
i need to expose this LogoutPage 

Wicket Training Class - Austin, TX (July) / San Francisco, CA (September)

2008-05-04 Thread Jeremy Thomerson
I am excited to announce that I will now be offering Wicket training classes
in the United States.  I have been teaching other courses for some time now,
but since I started using Wicket several years ago, I have been looking
forward to being able to offer these courses to other developers.

Here is the upcoming schedule.  If you know of others who may be interested
in getting started with or learning more about Wicket, please pass this
along to them.

*Austin, TX - July 26-27
*I am offering a discount for this first venue.  Also, there is an early
bird special, so be sure to book early!

*San Francisco, CA - September 13-14*
This one is still tentative - but please let me know if you are interested
in attending.

*Somewhere Else?  *Suggest a venue and a date, or contact me about
specialized on-site training for you and your team.

Every attendee will also receive a free copy of *Wicket in Action* (provided
I can get the printed copies by then).

Feel free to email me back, or use the contact form on the site to contact
me.
http://www.wickettraining.com/app/pages/Contact/

Best regards,

Jeremy Thomerson
http://www.wickettraining.com


Re: validation: Wicket does the right thing? Or right tool?

2008-05-04 Thread Eelco Hillenius
  1. It is too much coding. Anybody used Valang in
  Spring Module? By using Valang, the validation code is
  much clean and a lot fewer and you dont need to create
  a class simply for this simple validation.

The example you quoted is an example of a reusable validator that
checks the values of two components with each other. It's probably a
rare case to create a reusable validator for it, as you can achieve
the same thing with fewer lines of code by just performing the check
on your form's or button's submit method and then setting the error on
failure. But the choice is yours whether you want the validation to be
reusable (which also means it will be easier to move around in your
code) or whether you just implemented quick and dirty (like I often
do).

Btw, team members, this comment can be found in IFormValidator:
 * TODO post 1.3: remove validate(form) *make IFormValidator extends
IValidator where IValidatable's
 * value is form.modelobject and error reports on form - that way
IBehaviorProvider can extend
 * IValidator

  2. Valang covers both client AND server-side
  validation. Please note that client-side validation is
  equally important as server-side's. I feel it is a
  must for web apps in terms of user experience.

It is very important that the server-side validation is robust, since
the client-side can be messed with.

Whether client-side validation is important depends... I typically use
Ajax if I want checking on the fly. Very easy to implement using
Wicket.

But if you want client-side validation, you can create a combined
validator and behavior (that would contribute the JavaScript code to
the client), e.g. by letting your validator implement
IValidatorAddListener and adding the behavior (possibly itself) to the
component in the onAdded method.

Would be fun if someone would pick this up and extend some of the
simple validators we have with this.

  3. In Valang + Spring MVD, you have all the validation
  code for a form in one place in stark contrast to
  spreading it in controller code as in Wicket and
  mixing validation code with visual manipulation code.
  Valang's way is much easier to understand and
  management.

I don't know Valang, so I'm not sure what you mean. Anyway, you have
plenty of choices to hide validation code if it bothers you. Examples
are the automatic assignment of validators based on Hibernate
annotations like we're doing in the project I work on (done via
IComponentOnBeforeRenderListener), or custom components that assign
validators to self in their constructors.

Personally, I think Wicket's solution to validating components is
quite nice as long as the validation is related to one component. If
not (multiple components are non-related), it gets more messy, but I
can't imagine that would be much better in other frameworks.

  So in terms of elegance, productivity, management,
  ..., I am not sure Wicket's is right.

I think it is if you use your creativity and OO skills to make it fit
your style.

  Can Wicket provide a better solution?

  I would like to share my concern regarding the
  Wicket's WebPage, where you put a form's code for some
  visual aspects, validation, ajax, etc. in one place. A
  big object. I feel it is too ambitious and it looks
  like spaghetti code and mixes concerns/modules in one
  place. Comment?

Much to debate here, and there are plenty of discussions of the pros
and cons to be found on the internet.

You don't have to put everything in place; again use your OO skills to
make it more elegant. Furthermore, the fact that so much is statically
typed Java code that is also stateful makes that it is easy to
maintain/ refactor/ navigate/ explore/ debug compared to declarative
frameworks. Declarative frameworks often can result in less code, but
typically only for relatively simple things, and you won't get any of
the advantages of working with statically typed code. Also, a
declarative framework - a DSL in fact - can never be as flexible as a
general-purpose language. Wicket is very flexible because of that.
Whether limitations of declarative frameworks hit you of course
depends on what you're doing with it.

Good luck,

Eelco

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



Re: validation: Wicket does the right thing? Or right tool?

2008-05-04 Thread David Chang
Eelco,

Thanks so much for your input! I am still seriously
learning Wicket now and will see if I will change my
mind.

BTW, what is the best Wicket example website? I often
have many questions when reading tutorials with simple
examples. I wonder Wicket can do or how do more
callenging/complex situations that I can easily handle
with Spring MVC.

Regards,

David

--- Eelco Hillenius [EMAIL PROTECTED] wrote:

   1. It is too much coding. Anybody used Valang in
   Spring Module? By using Valang, the validation
 code is
   much clean and a lot fewer and you dont need to
 create
   a class simply for this simple validation.
 
 The example you quoted is an example of a reusable
 validator that
 checks the values of two components with each other.
 It's probably a
 rare case to create a reusable validator for it, as
 you can achieve
 the same thing with fewer lines of code by just
 performing the check
 on your form's or button's submit method and then
 setting the error on
 failure. But the choice is yours whether you want
 the validation to be
 reusable (which also means it will be easier to move
 around in your
 code) or whether you just implemented quick and
 dirty (like I often
 do).
 
 Btw, team members, this comment can be found in
 IFormValidator:
  * TODO post 1.3: remove validate(form) *make
 IFormValidator extends
 IValidator where IValidatable's
  * value is form.modelobject and error reports on
 form - that way
 IBehaviorProvider can extend
  * IValidator
 
   2. Valang covers both client AND server-side
   validation. Please note that client-side
 validation is
   equally important as server-side's. I feel it is
 a
   must for web apps in terms of user experience.
 
 It is very important that the server-side validation
 is robust, since
 the client-side can be messed with.
 
 Whether client-side validation is important
 depends... I typically use
 Ajax if I want checking on the fly. Very easy to
 implement using
 Wicket.
 
 But if you want client-side validation, you can
 create a combined
 validator and behavior (that would contribute the
 JavaScript code to
 the client), e.g. by letting your validator
 implement
 IValidatorAddListener and adding the behavior
 (possibly itself) to the
 component in the onAdded method.
 
 Would be fun if someone would pick this up and
 extend some of the
 simple validators we have with this.
 
   3. In Valang + Spring MVD, you have all the
 validation
   code for a form in one place in stark contrast to
   spreading it in controller code as in Wicket
 and
   mixing validation code with visual manipulation
 code.
   Valang's way is much easier to understand and
   management.
 
 I don't know Valang, so I'm not sure what you mean.
 Anyway, you have
 plenty of choices to hide validation code if it
 bothers you. Examples
 are the automatic assignment of validators based on
 Hibernate
 annotations like we're doing in the project I work
 on (done via
 IComponentOnBeforeRenderListener), or custom
 components that assign
 validators to self in their constructors.
 
 Personally, I think Wicket's solution to validating
 components is
 quite nice as long as the validation is related to
 one component. If
 not (multiple components are non-related), it gets
 more messy, but I
 can't imagine that would be much better in other
 frameworks.
 
   So in terms of elegance, productivity,
 management,
   ..., I am not sure Wicket's is right.
 
 I think it is if you use your creativity and OO
 skills to make it fit
 your style.
 
   Can Wicket provide a better solution?
 
   I would like to share my concern regarding the
   Wicket's WebPage, where you put a form's code for
 some
   visual aspects, validation, ajax, etc. in one
 place. A
   big object. I feel it is too ambitious and it
 looks
   like spaghetti code and mixes concerns/modules in
 one
   place. Comment?
 
 Much to debate here, and there are plenty of
 discussions of the pros
 and cons to be found on the internet.
 
 You don't have to put everything in place; again use
 your OO skills to
 make it more elegant. Furthermore, the fact that so
 much is statically
 typed Java code that is also stateful makes that it
 is easy to
 maintain/ refactor/ navigate/ explore/ debug
 compared to declarative
 frameworks. Declarative frameworks often can result
 in less code, but
 typically only for relatively simple things, and you
 won't get any of
 the advantages of working with statically typed
 code. Also, a
 declarative framework - a DSL in fact - can never be
 as flexible as a
 general-purpose language. Wicket is very flexible
 because of that.
 Whether limitations of declarative frameworks hit
 you of course
 depends on what you're doing with it.
 
 Good luck,
 
 Eelco
 

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



  

Re: validation: Wicket does the right thing? Or right tool?

2008-05-04 Thread Eelco Hillenius
  Thanks so much for your input! I am still seriously
  learning Wicket now and will see if I will change my
  mind.

  BTW, what is the best Wicket example website?

Best to download the Wicket examples distribution or check out from
our subversion repo, so that you can browse through the source. And
don't forget to search through this mailing list (archives) and look
at the WIKI if you're stuck with something.

 I often  have many questions when reading tutorials with simple
  examples. I wonder Wicket can do or how do more
  callenging/complex situations that I can easily handle
  with Spring MVC.

You bet! There may be cases where using Wicket is overkill, but it
certainly beats the hell out of competitors when it comes to handling
complex cases. :-)

You could download the first chapter of Wicket In Action
(http://www.manning.com/dashorst/) to get our take on what exactly
we're trying to solve (and what isn't solved by model 2 frameworks
like SpringMVC and Struts etc)

Cheers,

Eelco

Eelco

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



Re: why swarm not render link

2008-05-04 Thread 宁波新希望信息技术有限公司 -- 俞宏伟
*Can you check which block is executed, the if or the else.
*the else block code will never execute after login in

if i change BaseSecurePage class extends from WebPage(same as BasePage), the
link will be visible.

when turn on wicket debug  detail information show the link object is exist,
but not render.
Page

[Page class = wm.wicket.pages.ManageCenterPage, id = 25, version = 0]:
 # Path Size Type Model Object   1footer2.1K
wm.wicket.pages.FooterPanel2footer:About1.3K
org.apache.wicket.markup.html.link.PageLink3footer:ShopList
1.3Korg.apache.wicket.markup.html.link.PageLink4footer:Terms
1.3Korg.apache.wicket.markup.html.link.PageLink5
globalFeedback1.6Korg.apache.wicket.markup.html.panel.FeedbackPanel
6globalFeedback:feedbackul5K
org.apache.wicket.markup.html.WebMarkupContainer7
globalFeedback:feedbackul:messages5K
org.apache.wicket.markup.html.list.ListView[]8header3.7K
wm.wicket.pages.HeaderPanel9header:Comment1.4K
org.apache.wicket.markup.html.link.PageLink10header:Home1.4K
org.apache.wicket.markup.html.link.PageLink11
header:ManageCenter1.4Korg.apache.wicket.markup.html.link.PageLink
12header:ShareShop1.3K
org.apache.wicket.markup.html.link.PageLink13header:UserManual
1.3Korg.apache.wicket.markup.html.link.PageLink14
header:logoff5Korg.apache.wicket.markup.html.link.Link15
header:toCreateUserAccount2K
org.apache.wicket.security.components.markup.html.links.SecurePageLink
16header:username420 bytes
org.apache.wicket.markup.html.basic.Label- nhsoft











On Mon, May 5, 2008 at 1:27 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 The log indicates all requested permissions are granted. In fact the
 only thing that raises my eyebrow in the log is :
 05-04 21:14:10.000[UserAccountServiceImpl.java:40 :ERROR]
 org.springframework.orm.ObjectRetrievalFailureException: Object of
 class [wm.model.UserAccount] with identifier [nhsoft]: not found
 05-04 21:14:10.046[ LoggerListener.java:60 :WARN ] Authentication
 event AuthenticationSuccessEvent: nhsoft; details: null
 which might indicate a problem with acegi or your configuration.
 So i don't think swarm is the problem here. I did notice however an if
 statement in HeaderPanel
 Authentication authentication =
 SecurityContextHolder.getContext().getAuthentication();
 if(authentication != null)
  .
 else
  

 In the else block you are hiding both links, which matches the
 problems you are seeing.
 Theoretically if you only use this panel on pages extending from
 SecureBasePage, the Authentication should never be null. If it is,
 this indicates a synchronization problem between swarm and acegi, both
 keep separate records of who is logged in and what there
 permissions/grantedAuthorities are.

 Can you check which block is executed, the if or the else.

 Maurice

 On Sun, May 4, 2008 at 3:28 PM, 宁波新希望信息技术有限公司 -- 俞宏伟
 [EMAIL PROTECTED] wrote:
  -Your hive file has permissions which continue over the next line, i
 assume
  this is caused by copy pasting the file here and that in the actual hive
  file each permission is on exactly 1 line.
  yes, my hive file for each permission is on exactly 1 line(nabble forum
 show
  correctly)
 
 
   -I assume all the page classes in the policy file extend this
  BaseSecurePage of yours
  yes
 
 
   -Can you turn on debug logging for BasicHive and PolicyFileHiveFactory,
 i
  would like to see if you get any messages about the user not having
  permissions for the links and messages about skipped policy file lines
   yes, i turn on debug for org.apache.wicket.security,but i can not found
 any
  skipped tips message. attachment file for detail log information
 
 
   -Are you using 1.3.0 or 1.3-SNAPSHOT?
   version is 1.3.0
 
 
   -According to the policy file these permissions are granted to any
  authenticated user, can you confirm you indeed have an authenticated
 user.
  yes
 
 
   -Can you show me your application, in particular the methods swarm
 requires
  you to implement
  my swarm implement is acegi+swarm from swarm acegi example. i attach
 source
  code (swarm.implement.src.zip)
 
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 




-- 
新希望软件---俞宏伟
Addr:宁波海曙新高路47弄7号四楼
Site: http://www.nhsoft.cn
GTalk:[EMAIL PROTECTED] [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
Tel: 0574-87280538
Fax: 0574-56226219
Mobile:13780081921


Re: Is there a setGatherAbbreviatedBrowserInfo(true) as appose to setGatherExtendedBrowserInfo(true)?

2008-05-04 Thread Eelco Hillenius
On Fri, May 2, 2008 at 4:59 PM, Matthew Young [EMAIL PROTECTED] wrote:
 I only want to find out the user's timezone.
  setGatherExtendedBrowserInfo(true) redirect page take too long, sometimes
it
  stays on the screen many seconds.

You can often best do this in a custom way by either creating your own
variant of WebRequestCycle#newClientInfo or e.g. by integrating it in a
login form for instance (which of course only works for applications where
users have to be logged in before they get to the point where your browser
info matters).

That roughly works like this:

Java:

pubic LoginForm(String id) {
 super(id, new CompoundPropertyModel(new ClientPropertiesBean()));
 add(new HiddenField(navigatorAppName));
 add(new HiddenField(navigatorAppVersion));
 add(new HiddenField(navigatorAppCodeName));
 add(new HiddenField(navigatorCookieEnabled));
 add(new HiddenField(navigatorJavaEnabled));
 add(new HiddenField(navigatorLanguage));
 add(new HiddenField(navigatorPlatform));
 add(new HiddenField(navigatorUserAgent));
 add(new HiddenField(screenWidth));
 add(new HiddenField(screenHeight));
 add(new HiddenField(screenColorDepth));
 add(new HiddenField(utcOffset));
 ...

HTML template:

wicket:head!-- if in a panel --
 script language=javascript src=/html/static/js/rollover.js/script
/wicket:head
...
form name=login wicket:id=login style=margin: 0px; 
onsubmit=submitform(this)
 span style=display: hidden;
   input type=hidden name=navigatorAppName wicket:id=navigatorAppName
value=test /
   input type=hidden name=navigatorAppVersion
wicket:id=navigatorAppVersion value=test /
   input type=hidden name=navigatorAppCodeName
wicket:id=navigatorAppCodeName /
   input type=hidden name=navigatorCookieEnabled
wicket:id=navigatorCookieEnabled /
   input type=hidden name=navigatorJavaEnabled
wicket:id=navigatorJavaEnabled /
   input type=hidden name=navigatorLanguage
wicket:id=navigatorLanguage /
   input name=navigatorPlatform type=hidden
wicket:id=navigatorPlatform /
   input name=navigatorUserAgent  type=hidden
 wicket:id=navigatorUserAgent /
   input name=screenWidth type=hidden wicket:id=screenWidth /
   input name=screenHeight type=hidden wicket:id=screenHeight /
   input name=screenColorDepth type=hidden wicket:id=screenColorDepth
/
   input name=utcOffset type=hidden wicket:id=utcOffset /
 /span
 ...
/form
...

Login.js:

function submitform(form) {
 form.navigatorAppName.value = window.navigator.appName;
 form.navigatorAppVersion.value = window.navigator.appVersion;
 form.navigatorAppCodeName.value = window.navigator.appCodeName;
 var cookieEnabled = (window.navigator.cookieEnabled)? true : false;
 if (typeof window.navigator.cookieEnabled == undefined  !cookieEnabled)
{
   document.cookie = wickettestcookie;
   cookieEnabled = (document.cookie.indexOf(wickettestcookie)!=-1)? true :
false;
 }
 form.navigatorCookieEnabled.value = cookieEnabled;
 form.navigatorJavaEnabled.value =  window.navigator.javaEnabled();
 form.navigatorLanguage.value = window.navigator.language ?
window.navigator.language : window.navigator.userLanguage;
 form.navigatorPlatform.value = window.navigator.platform;
 form.navigatorUserAgent.value = window.navigator.userAgent;
 if (window.screen) {
 form.screenWidth.value = window.screen.width;
 form.screenHeight.value = window.screen.height;
 form.screenColorDepth.value = window.screen.colorDepth;
 }
 form.utcOffset.value = (new Date().getTimezoneOffset() / -60);
 return true;
}


That should give you an idea :-)

Eelco


Re: How to lookup Page or Class from a URI path ?

2008-05-04 Thread Eelco Hillenius
 Because I need the Class so i can check for the presence of an annotation
 (@InternalPage).  If that annotation is present, only internal requests from
 10.x.x.x are allowed.  Otherwise a 403 (Forbidden) will be generated.

 Obviously i can control access with Apache, or a ServletFilter..heck for
 that matter in the Page constructor itself.  I feel the better solution is
 with my annotation and before the Page constructor is called.

How about using an authorization strategy? If I understand you
correctly, that's written exactly for the stuff you're trying to do
here.

Eelco

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



Regarding Print page function?

2008-05-04 Thread Edi

Hello,

I have created one html link and during the onclick, I have called the
javascript print function,

window.print(), the entire page is printing nicely. But in all the corner
sides, I am getting some improper 

wicket codes also printing(FYI: My IE version is 6.0). But in firefox is
working fine. 

My print function looks,
 
 Print 

This code is written in wicket model window.

Please send your suggestions.

Thanking You.
Regards,
Edi
-- 
View this message in context: 
http://www.nabble.com/Regarding-Print-page-function--tp17053929p17053929.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: way to traverse / get all form validators

2008-05-04 Thread Eelco Hillenius
On Fri, May 2, 2008 at 11:56 AM, Gerolf Seitz [EMAIL PROTECTED] wrote:
 there is
  final ListIValidator getValidators() {...} on FormComponent

which you can use like this:

Use a visitor, like:

visitChildren(FormComponent.class, new IVisitor() {
  public Object component(final Component c) {
FormComponent fc = (FormComponent)c;
List validators = c.getValidators();
...
  }
}


Eelco

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



Re: Regarding Print page function?

2008-05-04 Thread Martin Makundi
Could you show the markup and the code?

2008/5/5 Edi [EMAIL PROTECTED]:

  Hello,

 I have created one html link and during the onclick, I have called the
  javascript print function,

  window.print(), the entire page is printing nicely. But in all the corner
  sides, I am getting some improper

  wicket codes also printing(FYI: My IE version is 6.0). But in firefox is
  working fine.

  My print function looks,

   Print

  This code is written in wicket model window.

  Please send your suggestions.

  Thanking You.
  Regards,
  Edi
  --
  View this message in context: 
 http://www.nabble.com/Regarding-Print-page-function--tp17053929p17053929.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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