Re: [Wicket-user] Wicket and embeddable Ajax components

2007-04-20 Thread Igor Vaynberg

afaict there is no servlet.

what he does is have a bookmarkable page which he mounts. all this page does
is read some parameter off url and based on that parameter add the right
panel to itself. it then renders this panel, and wraps the output in
document.write() call.

well this is almost accurate. i think what he does is create a different
page for different widget and mount each onto a different url.

so

MyWidgetAPage extends ComponentAsWidgetContainerPage {
  protected Panel getContent(String id) { return new MyWidgetAPanel(id); }
}

MyWidgetBPage extends ComponentAsWidgetContainerPage {
  protected Panel getContent(String id) { return new MyWidgetBPanel(id); }
}
mountPage(/widgeta, MyWidgetAPage.class);
mountPage(/widgetb, MyWidgetBPage.class);

-igor


-igor


On 4/19/07, David Leangen [EMAIL PROTECTED] wrote:



Hi, Barrett,

Thank you for this. Very interesting.

So, allow me to rephrase to make sure I'm understanding you on this.

The requirement is:

- Continue to use Wicket as web framework
- Be able to reuse javascript widgets outside of wicket
- Reuse same javascript code for both usage patterns

IIUC, what you do below accomplishes that by using all javascript as
scripted widgets, even from Wicket. In other words, the javascript is
no longer served by Wicket, but by a servlet.


Is that correct?


If so, don't you find that a bit cumbersome to have to change the way
you write all your wicket apps? Or has it been relatively painless for
you?


Cheers,
Dave




On Thu, 2007-04-19 at 11:33 -0700, barrett wrote:
 Forgot to mention, to use this just create a page class that extends
 ComponentAsWidgetContainerPage and then implement the getComponent(id)
 method. This method should return the component(usually a panel) that
you
 wish to make into a widget, with the id set to the id passed in to the
 getComponent call.

 You then have a script tag whose src points at this page as seen in the
 javadoc comments.

 -Barrett


 barrett wrote:
 
  David,
  We recently had a requirement where we wanted to include a panel from
our
  new Wicket app on one of our non-wicket legacy applications. To do
this I
  created a behavior and container page which will spit out any
component
  between a javascript document.write method. Then on your non-wicket
page
  you include a script tag whose src attribute is the address of the
  container page. Below are the 3 files that make up the solution. If
the
  files don't show up properly let me know and I can find another way to
  post them.
 
 
  ComponentAsWidgetContainerPage.java:
 
  package com.company.ui.wicket.page;
 
  import wicket.Component;
 
  import
com.company.ui.wicket.behaviors.JavascriptDocumentWritingBehavior;
 
  /**
   * A page which widgetizes a component so it can be used on any page
  outside of
   * the containing wicket application.
   *
   * @see [EMAIL PROTECTED] JavascriptDocumentWritingBehavior}
   *
   */
  public abstract class ComponentAsWidgetContainerPage extends WebPage
  {
 
  private static final String WIDGET_ID = componentAsWidget;
 
  public ComponentAsWidgetContainerPage()
  {
  super();
  Component widget = getComponent(WIDGET_ID);
  if (widget.getId() != WIDGET_ID)
  {
  throw new IllegalArgumentException(ID for the
widget component should
  be set to 
  + WIDGET_ID);
  }
  widget.add(new JavascriptDocumentWritingBehavior());
  add(widget);
  }
 
  /**
   * Implementations should return the component that is to be
widgetized.
   *
   * @param id
   *  The id which should be set on the returned component.
   *
   * @see [EMAIL PROTECTED] JavascriptDocumentWritingBehavior}
   * @return
   */
  public abstract Component getComponent(String id);
 
  }
 
  JavascriptDocumentWritingBehavior.java:
 
  package com.company.ui.wicket.behaviors;
 
  import wicket.Component;
  import wicket.IRequestTarget;
  import wicket.MarkupContainer;
  import wicket.RequestCycle;
  import wicket.Response;
  import wicket.behavior.AbstractBehavior;
  import wicket.markup.ComponentTag;
  import wicket.markup.html.internal.HtmlHeaderContainer;
  import wicket.markup.parser.filter.HtmlHeaderSectionHandler;
  import wicket.protocol.http.servlet.ServletWebRequest;
  import wicket.request.target.component.ComponentRequestTarget;
  import wicket.response.StringResponse;
 
  import com.company.ui.wicket.page.ComponentAsWidgetContainerPage;
 
  /**
   * This behavior encapsulates any component in a
   * document.write('[renderedComponent]'); javascript line. The main
use
  of
   * this is to be able to widgetize any component to be used on any
page
   * outside of the containing application with a script tag in the form
  of:br/br/
   *
   * lt;script
   *
  src=/mywebapp/app?wicket:bookmarkablePage=:com.company.app.pages
.[ComponentContainerPage]
   * 

Re: [Wicket-user] Wicket and embeddable Ajax components

2007-04-20 Thread Igor Vaynberg

just to add

an important point is

this is completely transparent to the widget panel. it is just a panel. it
doesnt know it is being inlined via javascript into another page - this is
the job of ComponentAsWidgetContainerPage

one thing to consider is that you would need to rewrite urls so they point
back to the widget server.

-igor


On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


afaict there is no servlet.

what he does is have a bookmarkable page which he mounts. all this page
does is read some parameter off url and based on that parameter add the
right panel to itself. it then renders this panel, and wraps the output in
document.write() call.

well this is almost accurate. i think what he does is create a different
page for different widget and mount each onto a different url.

so

MyWidgetAPage extends ComponentAsWidgetContainerPage {
   protected Panel getContent(String id) { return new MyWidgetAPanel(id);
}
}

MyWidgetBPage extends ComponentAsWidgetContainerPage {
   protected Panel getContent(String id) { return new MyWidgetBPanel(id);
}
}
mountPage(/widgeta, MyWidgetAPage.class);
mountPage(/widgetb, MyWidgetBPage.class);

-igor


-igor


On 4/19/07, David Leangen [EMAIL PROTECTED] wrote:


 Hi, Barrett,

 Thank you for this. Very interesting.

 So, allow me to rephrase to make sure I'm understanding you on this.

 The requirement is:

 - Continue to use Wicket as web framework
 - Be able to reuse javascript widgets outside of wicket
 - Reuse same javascript code for both usage patterns

 IIUC, what you do below accomplishes that by using all javascript as
 scripted widgets, even from Wicket. In other words, the javascript is
 no longer served by Wicket, but by a servlet.


 Is that correct?


 If so, don't you find that a bit cumbersome to have to change the way
 you write all your wicket apps? Or has it been relatively painless for
 you?


 Cheers,
 Dave




 On Thu, 2007-04-19 at 11:33 -0700, barrett wrote:
  Forgot to mention, to use this just create a page class that extends
  ComponentAsWidgetContainerPage and then implement the getComponent(id)

  method. This method should return the component(usually a panel) that
 you
  wish to make into a widget, with the id set to the id passed in to the
  getComponent call.
 
  You then have a script tag whose src points at this page as seen in
 the
  javadoc comments.
 
  -Barrett
 
 
  barrett wrote:
  
   David,
   We recently had a requirement where we wanted to include a panel
 from our
   new Wicket app on one of our non-wicket legacy applications. To do
 this I
   created a behavior and container page which will spit out any
 component
   between a javascript document.write method. Then on your non-wicket
 page
   you include a script tag whose src attribute is the address of the
   container page. Below are the 3 files that make up the solution. If
 the
   files don't show up properly let me know and I can find another way
 to
   post them.
  
  
   ComponentAsWidgetContainerPage.java:
  
   package com.company.ui.wicket.page;
  
   import wicket.Component;
  
   import
 com.company.ui.wicket.behaviors.JavascriptDocumentWritingBehavior ;
  
   /**
* A page which widgetizes a component so it can be used on any page
   outside of
* the containing wicket application.
*
* @see [EMAIL PROTECTED] JavascriptDocumentWritingBehavior}
*
*/
   public abstract class ComponentAsWidgetContainerPage extends WebPage
   {
  
   private static final String WIDGET_ID = componentAsWidget;
  
   public ComponentAsWidgetContainerPage()
   {
   super();
   Component widget = getComponent(WIDGET_ID);
   if ( widget.getId() != WIDGET_ID)
   {
   throw new IllegalArgumentException(ID for the
 widget component should
   be set to 
   + WIDGET_ID);
   }
   widget.add(new JavascriptDocumentWritingBehavior());
   add(widget);
   }
  
   /**
* Implementations should return the component that is to be
 widgetized.
*
* @param id
*  The id which should be set on the returned
 component.
*
* @see [EMAIL PROTECTED] JavascriptDocumentWritingBehavior}
* @return
*/
   public abstract Component getComponent(String id);
  
   }
  
   JavascriptDocumentWritingBehavior.java:
  
   package com.company.ui.wicket.behaviors;
  
   import wicket.Component;
   import wicket.IRequestTarget;
   import wicket.MarkupContainer;
   import wicket.RequestCycle ;
   import wicket.Response;
   import wicket.behavior.AbstractBehavior;
   import wicket.markup.ComponentTag;
   import wicket.markup.html.internal.HtmlHeaderContainer;
   import wicket.markup.parser.filter.HtmlHeaderSectionHandler;
   import wicket.protocol.http.servlet.ServletWebRequest;
   import wicket.request.target.component.ComponentRequestTarget;
   import 

Re: [Wicket-user] Wicket and embeddable Ajax components

2007-04-20 Thread David Leangen

Ok, that's interesting.

So, you guys are suggesting that a reasonable approach to the problem
would be to find a lib that I like (such as scriptaculous), set them up
on a widget server, then access them either as standalone javascript
widgets or in wicket via ComponentAsWidgetContainer?

The only unfortunate thing about this approach is that we'd have to redo
all our existing wicket stuff... But hey, who said life was perfect? ;-)


Cheers,
Dave



On Thu, 2007-04-19 at 23:59 -0700, Igor Vaynberg wrote:
 just to add
 
 an important point is
 
 this is completely transparent to the widget panel. it is just a
 panel. it doesnt know it is being inlined via javascript into another
 page - this is the job of ComponentAsWidgetContainerPage 
 
 one thing to consider is that you would need to rewrite urls so they
 point back to the widget server.
 
 -igor
 
 
 On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 afaict there is no servlet. 
 
 what he does is have a bookmarkable page which he mounts. all
 this page does is read some parameter off url and based on
 that parameter add the right panel to itself. it then renders
 this panel, and wraps the output in document.write() call.
 
 well this is almost accurate. i think what he does is create a
 different page for different widget and mount each onto a
 different url.
 
 so
 
 MyWidgetAPage extends ComponentAsWidgetContainerPage { 
protected Panel getContent(String id) { return new
 MyWidgetAPanel(id); }
 }
 
 MyWidgetBPage extends ComponentAsWidgetContainerPage {
protected Panel getContent(String id) { return new
 MyWidgetBPanel(id); }
 }
 mountPage(/widgeta, MyWidgetAPage.class);
 mountPage(/widgetb, MyWidgetBPage.class);
 
 -igor
 
 
 -igor
 
 
 
 On 4/19/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Hi, Barrett,
 
 Thank you for this. Very interesting.
 
 So, allow me to rephrase to make sure I'm
 understanding you on this.
 
 The requirement is:
 
 - Continue to use Wicket as web framework
 - Be able to reuse javascript widgets outside of
 wicket
 - Reuse same javascript code for both usage patterns
 
 IIUC, what you do below accomplishes that by using all
 javascript as
 scripted widgets, even from Wicket. In other words,
 the javascript is 
 no longer served by Wicket, but by a servlet.
 
 
 Is that correct?
 
 
 If so, don't you find that a bit cumbersome to have to
 change the way
 you write all your wicket apps? Or has it been
 relatively painless for 
 you?
 
 
 Cheers,
 Dave
 
 
 
 
 On Thu, 2007-04-19 at 11:33 -0700, barrett wrote:
  Forgot to mention, to use this just create a page
 class that extends
  ComponentAsWidgetContainerPage and then implement
 the getComponent(id) 
  method. This method should return the
 component(usually a panel) that you
  wish to make into a widget, with the id set to the
 id passed in to the
  getComponent call.
 
  You then have a script tag whose src points at this
 page as seen in the 
  javadoc comments.
 
  -Barrett
 
 
  barrett wrote:
  
   David,
   We recently had a requirement where we wanted to
 include a panel from our
   new Wicket app on one of our non-wicket legacy
 applications. To do this I 
   created a behavior and container page which will
 spit out any component
   between a javascript document.write method. Then
 on your non-wicket page
   you include a script tag whose src attribute is
 the address of the 
   container page. Below are the 3 files that make up
 the solution. If the
   files don't show up properly let me know and I can
 find another way to
   post 

Re: [Wicket-user] Wicket and embeddable Ajax components

2007-04-20 Thread David Leangen

Ok, thanks for all this!

I'm new to Ajax, so I'll have to play around with this so I can better
appreciate the solution proposed below.


Cheers,
Dave



On Fri, 2007-04-20 at 00:26 -0700, Igor Vaynberg wrote:
 i dont really get what scriptaculous, etc has to do with it. and i
 dont get why you would have to redo anything? the solution is
 transparent.
 
 so if you have existing widgets that are panels, most likely they are,
 thats how you develop widgets in wicket, you just drop them into that
 container page and you are done 
 
 -igor
 
 
 On 4/20/07, David Leangen [EMAIL PROTECTED] wrote:
 
 Ok, that's interesting.
 
 So, you guys are suggesting that a reasonable approach to the
 problem
 would be to find a lib that I like (such as scriptaculous),
 set them up
 on a widget server, then access them either as standalone
 javascript 
 widgets or in wicket via ComponentAsWidgetContainer?
 
 The only unfortunate thing about this approach is that we'd
 have to redo
 all our existing wicket stuff... But hey, who said life was
 perfect? ;-)
 
 
 Cheers,
 Dave
 
 
 
 On Thu, 2007-04-19 at 23:59 -0700, Igor Vaynberg wrote:
  just to add
 
  an important point is
 
  this is completely transparent to the widget panel. it is
 just a 
  panel. it doesnt know it is being inlined via javascript
 into another
  page - this is the job of ComponentAsWidgetContainerPage
 
  one thing to consider is that you would need to rewrite urls
 so they 
  point back to the widget server.
 
  -igor
 
 
  On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  afaict there is no servlet. 
 
  what he does is have a bookmarkable page which he
 mounts. all
  this page does is read some parameter off url and
 based on
  that parameter add the right panel to itself. it
 then renders 
  this panel, and wraps the output in document.write()
 call.
 
  well this is almost accurate. i think what he does
 is create a
  different page for different widget and mount each
 onto a 
  different url.
 
  so
 
  MyWidgetAPage extends ComponentAsWidgetContainerPage
 {
 protected Panel getContent(String id) { return
 new
  MyWidgetAPanel(id); } 
  }
 
  MyWidgetBPage extends ComponentAsWidgetContainerPage
 {
 protected Panel getContent(String id) { return
 new
  MyWidgetBPanel(id); }
  } 
  mountPage(/widgeta, MyWidgetAPage.class);
  mountPage(/widgetb, MyWidgetBPage.class);
 
  -igor
 
 
  -igor
 
  
 
  On 4/19/07, David Leangen [EMAIL PROTECTED]
 wrote:
 
  Hi, Barrett,
 
  Thank you for this. Very interesting. 
 
  So, allow me to rephrase to make sure I'm
  understanding you on this.
 
  The requirement is:
 
  - Continue to use Wicket as web framework 
  - Be able to reuse javascript widgets
 outside of
  wicket
  - Reuse same javascript code for both usage
 patterns
 
  IIUC, what you do below accomplishes that by
 using all 
  javascript as
  scripted widgets, even from Wicket. In
 other words,
  the javascript is
  no longer served by Wicket, but by a
 servlet. 
 
 
  Is that correct?
 
 
  If so, don't you find that a bit cumbersome
 to have to
  change the way
  you write all your wicket apps? Or has it
 been 
  relatively painless for
  you?
 
 
  Cheers,
  Dave
 
 
 
 
  On Thu, 2007-04-19 at 11:33 -0700, barrett
 wrote: 
   Forgot to mention, to use this just create
 a page
  class that extends
 

[Wicket-user] AjaxLink, mass delete and javascript confirmation

2007-04-20 Thread Decebal Suiu
I have a UsersPanel that contains a UsersTablePanel
and a delete link (Ajax).
UsersTablePanel contains a DataTable (Ajax) with the
first column only for selection (checkboxes), and a
method getSelectedIds():ListLong.
The user flow is very simple: check (select) some rows
from table and click on delete link.
I want to popup a confirmation message like Remove X
users ? where X is number of selected rows on delete.
How can I do that?

I have tried something like this but without success:

public class UsersPanel extends Panel {

@SpringBean(name = userService)
private UserService userService;

private UsersTablePanel usersTablePanel;

public UsersPanel(String id) {
super(id);

// add users panel with the users table
add(usersTablePanel = new
UsersTablePanel(usersTablePanel));

// add delete link
add(new AjaxLink(deleteUsers) {

@Override
public void onClick(AjaxRequestTarget target) {
ListLong selectedIds =
usersTablePanel.getSelectedIds();
int size = selectedIds.size();
System.out.println( + size);
if (size  0) {
userService.deleteUsers(selectedIds);

target.addComponent(usersTablePanel.getDataTable());
}
}

@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new AjaxCallDecorator() {

@Override
public CharSequence 
decorateScript(CharSequence
script) {
ListLong selectedIds =
usersTablePanel.getSelectedIds();
int size = selectedIds.size();
System.out.println( + size);
if (size  0) {
return 
if(!confirm('Remove  + size +
 users ?')) 
return false; + script;
}

return script;
}

};
}

});
}

}

Thanks in advance,
Decebal


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [Wicket-user] AjaxLink, mass delete and javascript confirmation

2007-04-20 Thread Igor Vaynberg

the easiest way is to keep the count using javascript and popup the box
using alert

-igor


On 4/20/07, Decebal Suiu [EMAIL PROTECTED] wrote:


I have a UsersPanel that contains a UsersTablePanel
and a delete link (Ajax).
UsersTablePanel contains a DataTable (Ajax) with the
first column only for selection (checkboxes), and a
method getSelectedIds():ListLong.
The user flow is very simple: check (select) some rows
from table and click on delete link.
I want to popup a confirmation message like Remove X
users ? where X is number of selected rows on delete.
How can I do that?

I have tried something like this but without success:

public class UsersPanel extends Panel {

@SpringBean(name = userService)
private UserService userService;

private UsersTablePanel usersTablePanel;

public UsersPanel(String id) {
super(id);

// add users panel with the users table
add(usersTablePanel = new
UsersTablePanel(usersTablePanel));

// add delete link
add(new AjaxLink(deleteUsers) {

@Override
public void onClick(AjaxRequestTarget target) {
ListLong selectedIds =
usersTablePanel.getSelectedIds();
int size = selectedIds.size();
System.out.println( + size);
if (size  0) {
userService.deleteUsers
(selectedIds);

target.addComponent(usersTablePanel.getDataTable());
}
}

@Override
protected IAjaxCallDecorator
getAjaxCallDecorator()
{
return new AjaxCallDecorator() {

@Override
public CharSequence
decorateScript(CharSequence
script) {
ListLong selectedIds =
usersTablePanel.getSelectedIds();
int size =
selectedIds.size();
System.out.println( +
size);
if (size  0) {
return
if(!confirm('Remove  + size +
 users
?')) return false; + script;
}

return script;
}

};
}

});
}

}

Thanks in advance,
Decebal


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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

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


Re: [Wicket-user] JIRA issue? Buggy behaviour in PageMap.access(IPageMapEntry, int). Wicket1.2.4

2007-04-20 Thread Kadir Sener GUMUS

ok Eelco, i will.. i just wanted to learn your opinions and to be sure if it
is worth to open an Issue.
thanks,regards

Kadir Sener GÜMÜS


On 4/20/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


Could you please open up a JIRA issue for this so that it doesn't get
lost in the mail threads?

Eelco

On 4/19/07, Kadir Sener GUMUS [EMAIL PROTECTED] wrote:
 Hi all,
 in our application, we were experiencing PageExpired pages. When i
digged in
 wicket sources i found something causes my problem and now it is ok
after
 change the behaviour. I dont know if it was fixed in later releases, i
 wanted to share that you all.

 Plz enlighten me if i am wrong or that is an expected behaviour. Let me
 explain the case:
 Assume that we have a pageMap contains 3 page entry inside as ordered as
 pageA.version0, pageB.version0, pageB.version1  and we pressed the
back
 button from pageB.v1 to pageB.v0!  Before calling this
 access(IPageMapEntry,int) method in get(int,int) of PageMap,
 page.getVersion(versionNumber) method is called. In that method, if
the
 page goes back to initial version(0), versionManager is removed!
Therefore,
  topPage.getVersions() returns 1 as default. Consequently, else
block
 was running and removing whole page (pageB), and..Bomb!!
PageExpired
 :)

 Here it is the changed code:

 (PageMap.class)


 private final void access( final IPageMapEntry entry, final int
version){

 .


 if (top instanceof Page)

 {

 // If there's more than one version
 Page topPage = (Page)top;

 if (topPage.getVersions()  1)

 {

 // Remove version the top access version (-1)
 topPage.getVersion(topAccess.getVersion()-1);

 }

 //--- PLZ look at here!!  (K.GUMUS)
 //else
 else if (topPage.getNumericId() != access.id 
 topPage.getCurrentVersionNumber() != access. version)

 {


 // Remove whole page
 remove(topPage);

 }

 }
 


 regards,
 Kadir Sener GUMUS

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



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

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


Re: [Wicket-user] AjaxLink, mass delete and javascript confirmation

2007-04-20 Thread Decebal Suiu

Thanks Igor.
I'm not a javascript developer and I come from swing. It is nice to have in
wicket some methods that encapsulates javascript basic functions (alert,
confirm, ...). In my case, in onClick method I have the selected rows number
and I wish to call a confirm method (something like confirm(Remove X users
?):boolean) before delete the selected users.

-- 
View this message in context: 
http://www.nabble.com/AjaxLink%2C-mass-delete-and-javascript-confirmation-tf3611720.html#a10093103
Sent from the Wicket - User mailing list archive at Nabble.com.


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


[Wicket-user] Tree Node's Refresh Issue

2007-04-20 Thread Sridhar.N

Hi,
I have a user interface which is having 2 frames. In the left frame I have
the dynamic tree which is populated dynamically from database on click of a
node. I have links on the nodes which refreshes the right frame with
appropriate pages.My problem is, when ever a new item is added to the DB
from the page in the right frame I want to refresh the tree's node which is
there in the left frame with the newly inserted value without refreshing the
whole tree.

Thanks in advance.
Sridhar.N
-- 
View this message in context: 
http://www.nabble.com/Tree-Node%27s-Refresh-Issue-tf3612068.html#a10094062
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] Escaping of HTML by wicket:message - can this be disabled?

2007-04-20 Thread ZedroS Schwart
Hi

I finally found how to solve this issue : the wicket jar from
http://wicketstuff.org/maven/repository/org/apache/wicket/ seems to be
broken.

Indeed, when I download the source jar, unzip it and add it to my
project (with a few extra jar and minus the wicket one, as well as a
source path) it works properly.

Then, if I remove the source from wicket and put back the wicket
jar... it doesn't anymore !

So, as far as I can tell, my issue really comes from the wicket jar
(latest snapshot).

Whatever, this part now works properly, and I'm a happy man once again ;)

Thanks for your help all of you :)

ZedroS

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


Re: [Wicket-user] What is Component Versioning (isVersioned())

2007-04-20 Thread Erik van Oosten
Put in the wiki as a subpage of 
http://cwiki.apache.org/WICKET/component.html.

Can someone update the static pages again? The new page does not show up 
yet.

Regards,
 Erik.

Eelco Hillenius wrote:
 Basically, it says whether a component supports back button or not
 when component replacement is used (and less importantly, when
 setModel is used)
   


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


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


Re: [Wicket-user] Tree Node's Refresh Issue

2007-04-20 Thread Jean-Baptiste Quenot
* Sridhar.N:

 I have a user interface which is having 2 frames.

Frames are not really Web 2.0, I would use a SplitPane:

http://www.demay-fr.net:8080/WCD13/app/?wicket:bookmarkablePage=%3Awicket.contrib.dojo.examples.SplitContainerSample
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] What is Component Versioning (isVersioned())

2007-04-20 Thread Martijn Dashorst
That happens automatically (every 2 hours or so).

Martijn

On 4/20/07, Erik van Oosten [EMAIL PROTECTED] wrote:
 Put in the wiki as a subpage of
 http://cwiki.apache.org/WICKET/component.html.

 Can someone update the static pages again? The new page does not show up
 yet.

 Regards,
  Erik.

 Eelco Hillenius wrote:
  Basically, it says whether a component supports back button or not
  when component replacement is used (and less importantly, when
  setModel is used)
 
 

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


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



-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

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


Re: [Wicket-user] JIRA issue? Buggy behaviour in PageMap.access(IPageMapEntry, int). Wicket1.2.4

2007-04-20 Thread Jean-Baptiste Quenot
* Kadir Sener GUMUS:

 ok Eelco, i  will.. i just wanted to learn  your opinions and to
 be sure if it is worth to open an Issue.

You just files a new issue: WICKET-487

However the issue would gain more attention if you could provide a
patch as an attachment.  Use diff  -u or svn diff to create such
a patch file.

Thanks in advance,
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] How to get desired DataTable layout

2007-04-20 Thread Lec

I didn't repaint it. It's just the WebMarkupContainer component that I missed
putting in my Panel that caused the whole odd behaviour displaying
problemAnyway it's now working for me after putting the
WebMarkupContainer in the Panel. Thanks :) What Im confused about is, I
don't understand why do we need to put in another WebMarkupContainer since
Panel is already considered one?  I never knew I have to use another
WebMarkupContainer in the Panel to achieve the ajaxification of gridview in
the pagination. It's a slight difference way of implementation if you
compare it to the ajaxification of Pageable ListView in Panel, even though
we can still use the WebMarkupContainer to achieve the same behaviour in
Pageable ListView.

Having said that, it reminds of another question. The question is, how do I
use AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink in the
Panel? The reason I want to use these two paging components is to customize
the paging   thingy we find in AjaxPagingNavigator. And  I believe
AjaxPagingNavigator comes only with the default  1 2 3 ... n  paging
display right? If im not mistaken, to customize the paging display, I have
to use AjaxPagingNavigation and AjaxPagingNavigationBehavior as well
right??? I have been trying to use AjaxPagingNavigation + NavigationLink +
NavigationIncrementLink + NavigationBehavior to get this customization
working, but it seems like everything I have been doing so far is not
producing the behaviour I want it to be. Reason being is that when I click
on the paging number or even the [First/Next] once, it doesn't flip to
another page. It only does so when I clicked it twice, and if that's not
enough bad, I feel like the whole page had been refreshed when it was
flipped to another page after being clicked twice. 

Any idea on this? I think I must have missed out the association of
implementation among these 4 AjaxPagingNavigation + Link + IncrementLink +
Behaviour.  My instinct is telling me that I may have done it a wrong way
and not putting these association of 4 object correctly. All in all, I don't
know where to start to get these 4 Ajax paging object working together. To
guide me, it would be great if you can provide me a full skeleton code.
Thanks.


igor.vaynberg wrote:
 
 have you tried
 
 final WebMarkupContainer gridviewcontainer=new WebMarkupContainer();
 gridviewcontainer.setOutputMarkupId(true);
 gridviewcontainer.add(new gridview(...));
 gridviewcontainer.add(new ajaxpagingnavigator(...) {
   onAjaxEvent(target) { target.add(gridviewcontainer); }
 }
 
 this is a common practice with repeaters, you cannot repaint them
 directly,
 but rather have to repaint some container higher above.
 
 by default ajaxpagingnavigator repaints the ipageable, when that is a
 table tag (datatable) it works fine, when it isnt you have to do a bit
 more work.
 
 -igor
 
 
 
 
 On 4/19/07, Lec [EMAIL PROTECTED] wrote:


 Hie Igor,
 Just to provide more info on  theGridView doesn't work in
 AjaxPagingNavigator part  in case you don't get what I mean, when I said
 it's not working in AjaxPagingNavigator, I actually mean, the data manage
 to
 display onto the GridView, but when I try to click onto other page
 number,
 the displayed data still remain on the same page of the GridView. Any
 idea?


 Lec wrote:
 
  Hie Igor,
  I need to check with you. I noticed GridView only works in
  PagingNavigator but not in AjaxPagingNavigator, and to have it working
 in
  AjaxPagingNavigator, I tried implementing a IPageable interface into
  GridView but it wasn't fruitful. As far as I know and If im right about
  this, based on the javadoc I read, I came to know that GridView is not
  allowed be IPageable as GridView inherits
  wicket.extensions.markup.html.repeater.pageable.AbstractPageableView
  that have a final method of getPageCount, this is the method which we
 need
  to override if we were to implement a IPageable interface in GridView
  right? But this method is final and cannot be overriden. Am I missing
  anything here? Is there any workaround to this? It would be great if
 you
  can provide me a pointer as to how to get pageable behaviour in
  GridView. Thanks
 
 
  igor.vaynberg wrote:
 
  so what you want is an ajaxified gridview
 
  what you need is AjaxPagingNavigator which we already have, and
  AjaxFallbackOrderByBorder which we also already have.
 
  then you just need to create a panel that encapsulate and connects the
  gridview and the aforementioned two components - just like datatable
  does.
 
  -igor
 
 
  and your own version of orderbylink but
  On 1/16/07, Daniele Dellafiore [EMAIL PROTECTED] wrote:
 
  I want to provide different views of my data. Ajaxified table is good
  for multiple-columns view where columns are name title address
  and so on.
  The layout I have with the use of a GridView is such that each cell
  have all informations, so in cell 1,1 displays the entry number 1
 with
  the picture and below a label 

Re: [Wicket-user] NTLM Authentication

2007-04-20 Thread Zenrique Steckelberg

Ok, found out that this problem actually relates to Internet Explorer... one
more grief to my MS black list of sorrows! ;)
Fixed it by using JCIFS library, which implements a servlet filter in the
same way mine was doing, with just a little difference: their works! (Got to
remember to never reinvent the wheel too). Now I am able to get current user
this way inside my code:
HttpServletRequest request = ((WebRequest) RequestCycle.get()
.getRequest()).getHttpServletRequest();
username = request.getRemoteUser();

And everything is working nicely again. Now finally off to implement my apps
authentication and authorization, by adapting databinder library's
functionalities.

Regards,


Zenrique Steckelberg wrote:
 
 Hi all,
 
 I work in a windows mostly environment, thus decided to use NTLM
 authentication so I wouldn't need to store and check users passwords. On
 each WebRequest and WebResponse I check if the user is identified or not,
 and if not I go through NTLM's request/response procedure in order to get
 user's login from ie browser (and thus windows). What happens is that
 after changing newWebRequest and newWebResponse methods to get the
 authentication, my application stops working, and no image or submit
 button works anymore. If I comment out both newWeb Request/Response
 methods, everything works fine. I am using Databinder for some of the
 authorization features and other db stuff, but I think this relates
 particularly to wicket.
 
 Here's the code:
 
 public class ConfServApp extends AuthDataApplication {
 private String auth;
 
 private String remoteHost;
 
 private String domain;
 
 private String username;
 
 @Override
 protected WebRequest newWebRequest(HttpServletRequest servletRequest)
 {
 WebRequest request = (WebRequest)
 super.newWebRequest(servletRequest);
 
 
 auth = (String) request.getHttpServletRequest().getHeader(
 Authorization);
 
 return request;
 }
 
 @Override
 protected WebResponse newWebResponse(HttpServletResponse
 servletResponse) {
 WebResponse response = (WebResponse) super
 .newWebResponse(servletResponse);
 if (username == null) {
 if (auth == null) {
 response.setHeader(WWW-Authenticate, NTLM);
 try {
 response.getHttpServletResponse().sendError(
 HttpServletResponse.SC_UNAUTHORIZED);
 } catch (Exception e) {
 System.out.println(e.getMessage());
 e.printStackTrace();
 }
 } else if (auth.startsWith(NTLM )) {
 byte[] msg = null;
 try {
 msg = new sun.misc.BASE64Decoder().decodeBuffer(auth
 .substring(5));
 } catch (Exception e) {
 System.out.println(e.getMessage());
 e.printStackTrace();
 }
 int off = 0, length, offset;
 if (msg[8] == 1) {
 byte z = 0;
 byte[] msg1 = { (byte) 'N', (byte) 'T', (byte) 'L',
 (byte) 'M', (byte) 'S', (byte) 'S', (byte)
 'P', z,
 (byte) 2, z, z, z, z, z, z, z, (byte) 40, z,
 z, z,
 (byte) 2, (byte) 130, z, z, z, (byte) 2,
 (byte) 2,
 (byte) 2, z, z, z, z, z, z, z, z, z, z, z, z
 };
 response.setHeader(WWW-Authenticate, NTLM 
 + new
 sun.misc.BASE64Encoder().encodeBuffer(msg1)
 .trim());
 try {
 response.getHttpServletResponse().sendError(
 HttpServletResponse.SC_UNAUTHORIZED);
 } catch (Exception e) {
 System.out.println(e.getMessage());
 e.printStackTrace();
 }
 } else if (msg[8] == 3) {
 off = 30;
 
 length = msg[off + 17] * 256 + msg[off + 16];
 offset = msg[off + 19] * 256 + msg[off + 18];
 remoteHost = new String(msg, offset, length);
 
 length = msg[off + 1] * 256 + msg[off];
 offset = msg[off + 3] * 256 + msg[off + 2];
 domain = new String(msg, offset, length);
 
 length = msg[off + 9] * 256 + msg[off + 8];
 offset = msg[off + 11] * 256 + msg[off + 10];
 username = new String(msg, offset, length);
 
 System.out.println(Username: + username);
 System.out.println(RemoteHost: + remoteHost);
 System.out.println(Domain: + domain);
 }
 }
 }

[Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3

2007-04-20 Thread ZedroS Schwart
Hi all

I would like to fork the discussion Issue with redirection to intro
page after logout to discuss stateless and/ or bookmarkable pages in
Wicket 1.3.

Indeed,  Eelco said :
Off topic, I think it's good practice to make your login page a
stateless page (using a stateless form), so that users can have that
page in front of them for hours and then sign in without even being
bothered with a session expiry exception. In fact, it's probably good
practice to have the whole part of the site where you don't require
users to log in implemented as stateless and/ or bookmarkable pages.
My 2c.

However, the wiki (there
http://cwiki.apache.org/WICKET/stateless-pages.html#Statelesspages-Statelesspagesin2.0%2528andbackportedto1.3%2529
) says few and I would like to implement such pages so... I've some
questions ! As usual, I will update the wiki afterwards so it should
not be lost.

In the source, I've seen that stateless pages are mainly pages where
the developer has to ovverride getStatelessHint as following :
protected boolean getStatelessHint()
{
return true;
}

However, I've the following questions :
- how can I check my page is stateless ? Is calling getStatelessHint()
at the end of my page constructor enough ?
- do I just have to override the getStatelessHint for components
nested into others one ? For example, I would like to make my
LoginPage stateless. I'm using the SignInPanel from the examples, and
I've override the panel and form but the getStatelessHint()  of the
page still says false, so... Furthermore, on the page submit,
nothing happens anymore (the validation of the data isn't done as well
as the onSubmit). What did I miss ?

Regarding Bookmarkable page, I've the following situation : my Login
page has a public constructor with no argument. As such, it should be
a Bookmarkable page (if I've understood properly the concept there :
http://cwiki.apache.org/WICKET/bookmarkable-pages-and-links.html ).
However, when, on logout, I invalidate the session and sent back the
user to the login page, the first login attempt gives back a page
expired error... What should I do ?

Thanks in advance

Best regards
ZedroS

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


[Wicket-user] getting object from model using propertyExpression

2007-04-20 Thread Jan Kriesten

hi,

is there a way to use property expressions to get an object from a complex 
model?

my problem is, that i'm building the form dynamically based on a structure _and_
the model - the model contains the relevant data, the structure defines the form
 elements.

so, building the form depends first on the structure (which defines
binding/property expressions) and the concrete number of form entries depends on
the model - so i need to access the model during form building with the property
expression. since wicket does this already - i shouldn't need to implement this
manually... :D

best regards, --- jan.


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


Re: [Wicket-user] How to get desired DataTable layout

2007-04-20 Thread Igor Vaynberg

On 4/20/07, Lec [EMAIL PROTECTED] wrote:



I didn't repaint it. It's just the WebMarkupContainer component that I
missed
putting in my Panel that caused the whole odd behaviour displaying
problemAnyway it's now working for me after putting the
WebMarkupContainer in the Panel. Thanks :) What Im confused about is, I
don't understand why do we need to put in another WebMarkupContainer since
Panel is already considered one?  I never knew I have to use another
WebMarkupContainer in the Panel to achieve the ajaxification of gridview
in
the pagination. It's a slight difference way of implementation if you
compare it to the ajaxification of Pageable ListView in Panel, even though
we can still use the WebMarkupContainer to achieve the same behaviour in
Pageable ListView.



you dont need _another_ webmarkupcontainer, you just cant repaint the
listview itself directly, eg do ajaxtarget.addcomponent(listview). in fact
as of yesterday that will throw an exception. so you need to repaint its
closest ancestor that is not a listview.


Having said that, it reminds of another question. The question is, how do I

use AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink in the
Panel? The reason I want to use these two paging components is to
customize
the paging   thingy we find in AjaxPagingNavigator. And  I believe
AjaxPagingNavigator comes only with the default  1 2 3 ... n  paging
display right? If im not mistaken, to customize the paging display, I have
to use AjaxPagingNavigation and AjaxPagingNavigationBehavior as well
right??? I have been trying to use AjaxPagingNavigation + NavigationLink +
NavigationIncrementLink + NavigationBehavior to get this customization
working, but it seems like everything I have been doing so far is not
[...]



our pagingnavigator and its ajax counterpart are not very well coded to make
it easy to extend. the only thing i can tell you right now is that if you
want to customize it you have to roll your own for anything but the simplest
customizations. it was on our todolist to refactor, but we just havent found
the time.

-igor



igor.vaynberg wrote:


 have you tried

 final WebMarkupContainer gridviewcontainer=new WebMarkupContainer();
 gridviewcontainer.setOutputMarkupId(true);
 gridviewcontainer.add(new gridview(...));
 gridviewcontainer.add(new ajaxpagingnavigator(...) {
   onAjaxEvent(target) { target.add(gridviewcontainer); }
 }

 this is a common practice with repeaters, you cannot repaint them
 directly,
 but rather have to repaint some container higher above.

 by default ajaxpagingnavigator repaints the ipageable, when that is a
 table tag (datatable) it works fine, when it isnt you have to do a bit
 more work.

 -igor




 On 4/19/07, Lec [EMAIL PROTECTED] wrote:


 Hie Igor,
 Just to provide more info on  theGridView doesn't work in
 AjaxPagingNavigator part  in case you don't get what I mean, when I
said
 it's not working in AjaxPagingNavigator, I actually mean, the data
manage
 to
 display onto the GridView, but when I try to click onto other page
 number,
 the displayed data still remain on the same page of the GridView. Any
 idea?


 Lec wrote:
 
  Hie Igor,
  I need to check with you. I noticed GridView only works
in
  PagingNavigator but not in AjaxPagingNavigator, and to have it
working
 in
  AjaxPagingNavigator, I tried implementing a IPageable interface
into
  GridView but it wasn't fruitful. As far as I know and If im right
about
  this, based on the javadoc I read, I came to know that GridView is
not
  allowed be IPageable as GridView inherits
  wicket.extensions.markup.html.repeater.pageable.AbstractPageableView

  that have a final method of getPageCount, this is the method which we
 need
  to override if we were to implement a IPageable interface in
GridView
  right? But this method is final and cannot be overriden. Am I missing
  anything here? Is there any workaround to this? It would be great if
 you
  can provide me a pointer as to how to get pageable behaviour in
  GridView. Thanks
 
 
  igor.vaynberg wrote:
 
  so what you want is an ajaxified gridview
 
  what you need is AjaxPagingNavigator which we already have, and
  AjaxFallbackOrderByBorder which we also already have.
 
  then you just need to create a panel that encapsulate and connects
the
  gridview and the aforementioned two components - just like datatable
  does.
 
  -igor
 
 
  and your own version of orderbylink but
  On 1/16/07, Daniele Dellafiore [EMAIL PROTECTED] wrote:
 
  I want to provide different views of my data. Ajaxified table is
good
  for multiple-columns view where columns are name title
address
  and so on.
  The layout I have with the use of a GridView is such that each cell
  have all informations, so in cell 1,1 displays the entry number 1
 with
  the picture and below a label with name, title, address on
multiple
  lines. Cell 1,2 have the second entry and so on.
  In DataTable a single entry data are spaned over the row. What I
want

Re: [Wicket-user] stateless and/ or bookmarkable pages in Wicket 1.3

2007-04-20 Thread Igor Vaynberg

the shorter version is:

all bookmarkable pages start out stateless. when you add a non Stateless*
component to them, it makes them stateful.

-igor


On 4/20/07, Johan Compagner [EMAIL PROTECTED] wrote:


if you want stateless page then all the components on that page must be
stateless
So if you make a simple page with only 1 form (with some text fields)
and that Form is a StatelessForm (instead of a norma Form component)
then that page is stateless
You can't call or set any property on a page to let the page be stateless.
Because it all depends whats components or behaviors are on the page.
If you add an ajax behavior then the page is not stateless
if you add a normal link (instead of a StatelessLink) then it is not
stateless

The only thing the page can do is that it must have a default or page
parameters constructor.

johan


On 4/20/07, ZedroS Schwart [EMAIL PROTECTED] wrote:

 Hi all

 I would like to fork the discussion Issue with redirection to intro
 page after logout to discuss stateless and/ or bookmarkable pages in
 Wicket 1.3.

 Indeed,  Eelco said :
 Off topic, I think it's good practice to make your login page a
 stateless page (using a stateless form), so that users can have that
 page in front of them for hours and then sign in without even being
 bothered with a session expiry exception. In fact, it's probably good
 practice to have the whole part of the site where you don't require
 users to log in implemented as stateless and/ or bookmarkable pages.
 My 2c.

 However, the wiki (there

 
http://cwiki.apache.org/WICKET/stateless-pages.html#Statelesspages-Statelesspagesin2.0%2528andbackportedto1.3%2529
 ) says few and I would like to implement such pages so... I've some
 questions ! As usual, I will update the wiki afterwards so it should
 not be lost.

 In the source, I've seen that stateless pages are mainly pages where
 the developer has to ovverride getStatelessHint as following :
 protected boolean getStatelessHint()
 {
 return true;
 }

 However, I've the following questions :
 - how can I check my page is stateless ? Is calling getStatelessHint()
 at the end of my page constructor enough ?
 - do I just have to override the getStatelessHint for components
 nested into others one ? For example, I would like to make my
 LoginPage stateless. I'm using the SignInPanel from the examples, and
 I've override the panel and form but the getStatelessHint()  of the
 page still says false, so... Furthermore, on the page submit,
 nothing happens anymore (the validation of the data isn't done as well
 as the onSubmit). What did I miss ?

 Regarding Bookmarkable page, I've the following situation : my Login
 page has a public constructor with no argument. As such, it should be
 a Bookmarkable page (if I've understood properly the concept there :
 http://cwiki.apache.org/WICKET/bookmarkable-pages-and-links.html ).
 However, when, on logout, I invalidate the session and sent back the
 user to the login page, the first login attempt gives back a page
 expired error... What should I do ?

 Thanks in advance

 Best regards
 ZedroS


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



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


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


Re: [Wicket-user] How to get desired DataTable layout

2007-04-20 Thread Lec

Thanks for the answer. Hmmm but my last question wasn't clearly quite
answered :)
Actually I was asking for a sample code of AjaxPagingNavigationLink/
AjaxPagingNavigationIncrementLink with AjaxPagingNavigationBehaviour as I
had a difficult time in finding and understanding the correlations between
them. My goal is to move away the default  1 2 ..n  paging display in
AjaxPagingNavigator to a more customized paging display. This explains the
reason behind my attempt on the usage of AjaxPagingNavigationLink/
AjaxPagingNavigationIncrementLink with AjaxPagingNavigationBehaviour. But I
don't know where to begin and what I'm missing now. A sample skeleton code
will greatly help me to understand the correlation here. :) Any helps for me
on this?


igor.vaynberg wrote:
 
 On 4/20/07, Lec [EMAIL PROTECTED] wrote:


 I didn't repaint it. It's just the WebMarkupContainer component that I
 missed
 putting in my Panel that caused the whole odd behaviour displaying
 problemAnyway it's now working for me after putting the
 WebMarkupContainer in the Panel. Thanks :) What Im confused about is, I
 don't understand why do we need to put in another WebMarkupContainer
 since
 Panel is already considered one?  I never knew I have to use another
 WebMarkupContainer in the Panel to achieve the ajaxification of gridview
 in
 the pagination. It's a slight difference way of implementation if you
 compare it to the ajaxification of Pageable ListView in Panel, even
 though
 we can still use the WebMarkupContainer to achieve the same behaviour in
 Pageable ListView.
 
 
 you dont need _another_ webmarkupcontainer, you just cant repaint the
 listview itself directly, eg do ajaxtarget.addcomponent(listview). in fact
 as of yesterday that will throw an exception. so you need to repaint its
 closest ancestor that is not a listview.
 
 
 Having said that, it reminds of another question. The question is, how do
 I
 use AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink in the
 Panel? The reason I want to use these two paging components is to
 customize
 the paging   thingy we find in AjaxPagingNavigator. And  I believe
 AjaxPagingNavigator comes only with the default  1 2 3 ... n  paging
 display right? If im not mistaken, to customize the paging display, I
 have
 to use AjaxPagingNavigation and AjaxPagingNavigationBehavior as well
 right??? I have been trying to use AjaxPagingNavigation + NavigationLink
 +
 NavigationIncrementLink + NavigationBehavior to get this customization
 working, but it seems like everything I have been doing so far is not
 [...]
 
 
 our pagingnavigator and its ajax counterpart are not very well coded to
 make
 it easy to extend. the only thing i can tell you right now is that if you
 want to customize it you have to roll your own for anything but the
 simplest
 customizations. it was on our todolist to refactor, but we just havent
 found
 the time.
 
 -igor
 
 
 
 igor.vaynberg wrote:
 
  have you tried
 
  final WebMarkupContainer gridviewcontainer=new WebMarkupContainer();
  gridviewcontainer.setOutputMarkupId(true);
  gridviewcontainer.add(new gridview(...));
  gridviewcontainer.add(new ajaxpagingnavigator(...) {
onAjaxEvent(target) { target.add(gridviewcontainer); }
  }
 
  this is a common practice with repeaters, you cannot repaint them
  directly,
  but rather have to repaint some container higher above.
 
  by default ajaxpagingnavigator repaints the ipageable, when that is a
  table tag (datatable) it works fine, when it isnt you have to do a
 bit
  more work.
 
  -igor
 
 
 
 
  On 4/19/07, Lec [EMAIL PROTECTED] wrote:
 
 
  Hie Igor,
  Just to provide more info on  theGridView doesn't work in
  AjaxPagingNavigator part  in case you don't get what I mean, when I
 said
  it's not working in AjaxPagingNavigator, I actually mean, the data
 manage
  to
  display onto the GridView, but when I try to click onto other page
  number,
  the displayed data still remain on the same page of the GridView. Any
  idea?
 
 
  Lec wrote:
  
   Hie Igor,
   I need to check with you. I noticed GridView only works
 in
   PagingNavigator but not in AjaxPagingNavigator, and to have it
 working
  in
   AjaxPagingNavigator, I tried implementing a IPageable interface
 into
   GridView but it wasn't fruitful. As far as I know and If im right
 about
   this, based on the javadoc I read, I came to know that GridView is
 not
   allowed be IPageable as GridView inherits
  
 wicket.extensions.markup.html.repeater.pageable.AbstractPageableView
 
   that have a final method of getPageCount, this is the method which
 we
  need
   to override if we were to implement a IPageable interface in
 GridView
   right? But this method is final and cannot be overriden. Am I
 missing
   anything here? Is there any workaround to this? It would be great if
  you
   can provide me a pointer as to how to get pageable behaviour in
   GridView. Thanks
  
  
   igor.vaynberg wrote:
  
   so what you want is an 

Re: [Wicket-user] Issue with redirection to intro page after logout

2007-04-20 Thread Eelco Hillenius
 but then eelco takes me seriously! oh the horror!

I'm a very serious guy, about to inflict some serious damage to your ball.

Eelco

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


Re: [Wicket-user] Issue with redirection to intro page after logout

2007-04-20 Thread Igor Vaynberg

but then eelco takes me seriously! oh the horror!

-igor


On 4/20/07, Johan Compagner [EMAIL PROTECTED] wrote:


no thats not needed

On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 gah! i have to start wrapping my emais in

 sarcasm  /sarcasm

 -igor

 On 4/19/07, Eelco Hillenius  [EMAIL PROTECTED] wrote:
 
  Sure, if you don't have a common layout etc you use for you Wicket
  pages and you want to reuse in your login page, that's even more
  efficient. You'll have to make it a separate HTML file in a path that
  is not handled by Wicket though, so it's a bit more pain to achieve.
 
  Eelco
 
 
  On 4/19/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
   its even better not to have a wicket page at all
  
   a simple loginl.html with
  
   form action=/some/mounted/page method=post
   input name=uname/input name=pwd/input type=submit/
   /form
  
   then you just mount a page that processes the submitted values and
  throws a
   restartresponseexception to some other page.
  
   now as users hammer your login page and stare at it for hours it is
  only
   apache that suffers.
  
   taking it to the next level baby!
  
   -igor
  
  
  
   On 4/19/07, Eelco Hillenius  [EMAIL PROTECTED]  wrote:
   
 A last question : what does precisely the session.invalidatestuff ?
 Indeed, in my application, when checking if the user is logged
  in, I
 just check whether an user is in the current session. As such,
  to
 unlog my user, I just need to do something like
 session.setUser(null). So I wonder what does precisely the
  invalidate
 (and as such whether I really need to do it or not). I checked
  on the
 API already and there is just :Invalidates this session.
   
Invalidate 'unbinds' the session from the backing session store.
  In
practice, for default configurations, this means that the
  HttpSession
object that is maintained for the client is invalidated (see
HttpSession#invalidate) after the request is done, so that a
  client
starts with a clean slate.
   
Off topic, I think it's good practice to make your login page a
stateless page (using a stateless form), so that users can have
  that
page in front of them for hours and then sign in without even
  being
bothered with a session expiry exception. In fact, it's probably
  good
practice to have the whole part of the site where you don't
  require
users to log in implemented as stateless and/ or bookmarkable
  pages.
My 2c.
   
Eelco
   
   
  
  -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
  -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



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



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


-
This SF.net email is 

Re: [Wicket-user] How to get desired DataTable layout

2007-04-20 Thread Peter Thomas

Hi,

I tried to create a tabular listing with pagination completely from scratch
using only ListView-s and you can look at the code here:

http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/ItemListPanel.java?r=946

It's not Ajax, but may help as a reference.  The pagination code is lines 75
- 167

HTML code is here:

http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/ItemListPanel.html?r=962

Regards,

Peter.

On 4/20/07, Lec [EMAIL PROTECTED] wrote:



Thanks for the answer. Hmmm but my last question wasn't clearly quite
answered :)
Actually I was asking for a sample code of AjaxPagingNavigationLink/
AjaxPagingNavigationIncrementLink with AjaxPagingNavigationBehaviour as I
had a difficult time in finding and understanding the correlations between
them. My goal is to move away the default  1 2 ..n  paging display in
AjaxPagingNavigator to a more customized paging display. This explains the
reason behind my attempt on the usage of AjaxPagingNavigationLink/
AjaxPagingNavigationIncrementLink with AjaxPagingNavigationBehaviour. But
I
don't know where to begin and what I'm missing now. A sample skeleton code
will greatly help me to understand the correlation here. :) Any helps for
me
on this?


igor.vaynberg wrote:

 On 4/20/07, Lec [EMAIL PROTECTED] wrote:


 I didn't repaint it. It's just the WebMarkupContainer component that I
 missed
 putting in my Panel that caused the whole odd behaviour displaying
 problemAnyway it's now working for me after putting the
 WebMarkupContainer in the Panel. Thanks :) What Im confused about is, I
 don't understand why do we need to put in another WebMarkupContainer
 since
 Panel is already considered one?  I never knew I have to use another
 WebMarkupContainer in the Panel to achieve the ajaxification of
gridview
 in
 the pagination. It's a slight difference way of implementation if you
 compare it to the ajaxification of Pageable ListView in Panel, even
 though
 we can still use the WebMarkupContainer to achieve the same behaviour
in
 Pageable ListView.


 you dont need _another_ webmarkupcontainer, you just cant repaint the
 listview itself directly, eg do ajaxtarget.addcomponent(listview). in
fact
 as of yesterday that will throw an exception. so you need to repaint its
 closest ancestor that is not a listview.


 Having said that, it reminds of another question. The question is, how
do
 I
 use AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink in
the
 Panel? The reason I want to use these two paging components is to
 customize
 the paging   thingy we find in AjaxPagingNavigator. And  I believe
 AjaxPagingNavigator comes only with the default  1 2 3 ... n 
paging
 display right? If im not mistaken, to customize the paging display, I
 have
 to use AjaxPagingNavigation and AjaxPagingNavigationBehavior as well
 right??? I have been trying to use AjaxPagingNavigation +
NavigationLink
 +
 NavigationIncrementLink + NavigationBehavior to get this customization
 working, but it seems like everything I have been doing so far is not
 [...]


 our pagingnavigator and its ajax counterpart are not very well coded to
 make
 it easy to extend. the only thing i can tell you right now is that if
you
 want to customize it you have to roll your own for anything but the
 simplest
 customizations. it was on our todolist to refactor, but we just havent
 found
 the time.

 -igor



 igor.vaynberg wrote:
 
  have you tried
 
  final WebMarkupContainer gridviewcontainer=new WebMarkupContainer();
  gridviewcontainer.setOutputMarkupId(true);
  gridviewcontainer.add(new gridview(...));
  gridviewcontainer.add(new ajaxpagingnavigator(...) {
onAjaxEvent(target) { target.add(gridviewcontainer); }
  }
 
  this is a common practice with repeaters, you cannot repaint them
  directly,
  but rather have to repaint some container higher above.
 
  by default ajaxpagingnavigator repaints the ipageable, when that is a
  table tag (datatable) it works fine, when it isnt you have to do a
 bit
  more work.
 
  -igor
 
 
 
 
  On 4/19/07, Lec [EMAIL PROTECTED] wrote:
 
 
  Hie Igor,
  Just to provide more info on  theGridView doesn't work
in
  AjaxPagingNavigator part  in case you don't get what I mean, when I
 said
  it's not working in AjaxPagingNavigator, I actually mean, the data
 manage
  to
  display onto the GridView, but when I try to click onto other page
  number,
  the displayed data still remain on the same page of the GridView.
Any
  idea?
 
 
  Lec wrote:
  
   Hie Igor,
   I need to check with you. I noticed GridView only
works
 in
   PagingNavigator but not in AjaxPagingNavigator, and to have it
 working
  in
   AjaxPagingNavigator, I tried implementing a IPageable interface
 into
   GridView but it wasn't fruitful. As far as I know and If im right
 about
   this, based on the javadoc I read, I came to know that GridView is
 not
   allowed be IPageable as GridView inherits
  
 

Re: [Wicket-user] getting object from model using propertyExpression

2007-04-20 Thread Eelco Hillenius
Not sure whether I understand your question. But right after you added
your component, you can use getModelObject on it to get the value.
Also, keep in mind that CompoundPropertyModel is for convenience, but
you can e.g. use PropertyModel directly for more control. In that
case, you can get the model value right after constructing the
component or just directly from the model itself.

Eelco


On 4/20/07, Jan Kriesten [EMAIL PROTECTED] wrote:

 hi,

 is there a way to use property expressions to get an object from a complex 
 model?

 my problem is, that i'm building the form dynamically based on a structure 
 _and_
 the model - the model contains the relevant data, the structure defines the 
 form
  elements.

 so, building the form depends first on the structure (which defines
 binding/property expressions) and the concrete number of form entries depends 
 on
 the model - so i need to access the model during form building with the 
 property
 expression. since wicket does this already - i shouldn't need to implement 
 this
 manually... :D

 best regards, --- jan.


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


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


Re: [Wicket-user] Can templates have an extension other than .html?

2007-04-20 Thread Ludovic Orban

In the same subject, is there a reason why
wicket.markup.html.WebPage.getMarkupType() isn't final but
wicket.markup.html.WebMarkupContainer.getMarkupType() is ?

I want my templates to have the .xml extension but that is only possible for
pages and not panels because of that method being marked final.

Is there a good reason to have the method marked final in WebMarkupContainer
or is that also an historical artifact ?

Thanks,
Ludovic


Eelco Hillenius wrote:
 
 I'm a little concerned by the Note int he javadocs for this method:

  Note: The markup type must be equal to the extension of the markup file.
 In
 the case of WebPages, it must always be html.

 Does that mean that the string html has some meaning beyond just
 telling
 the framework what file extension to retrieve?
 
 That comment was incorrect. Thanks for noting it, I just removed it.
 
 We have one example of a different extension (xml):
 wicket.examples.compref.XmlPage.
 
 You should be able to pick any extension you like. Please report here
 if you encounter any problems regarding this.
 
 Eelco
 

-- 
View this message in context: 
http://www.nabble.com/Can-templates-have-an-extension-other-than-.html--tf3309848.html#a10108984
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] getting object from model using propertyExpression

2007-04-20 Thread Jan Kriesten

hi eelco,

no, you misunderstood me - i need to access the model /before/ my components are
created (cause the number of components to be created depends on the model).

i found the helper class myself:

Object property = PropertyResolver.getValue( binding, model.getObject() );


but thanks for your efforts!

best regards, --- jan.



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


[Wicket-user] html lang=en -- change lang?

2007-04-20 Thread Jan Kriesten

hi,

is it possible to change the attributes of the html-tag, too?

best regards, --- jan.



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


[Wicket-user] Strange Popup Behavior After Logout/Session.invalidate()

2007-04-20 Thread fattymelt

So... someone comes to my app and logs in. The get a page which includes a
popup link to AppPage. The link is constructed like so
In StartPage.java:

 PopupSettings popupSettings = new
PopupSettings(PageMap.forName(popuppagemap));
 add(new BookmarkablePageLink(app-page,
AppPage.class).setPopupSettings(popupSettings));


The AppPage class is a page which is also behind authentication. Normally,
if you go to its bookmarked URL without having logged in, you get my login
page, login, and then are redirected to the AppPage. This is all handled by
the built-in wicket authentication scheme. I'm not doing anything fancy.

In the scenario described above, when the popup opens, you aren't asked to
login because you already logged in on the parent page. So far so good.

The parent page also contains a link to logout. Clicking this link gets you
the SignOutPage which does this:

In SignOutPage.java:

protected void onEndRequest() {
AuthenticatedWebSession awSession = (AuthenticatedWebSession)
getSession();
awSession.invalidate();
try { 
   
getWebRequestCycle().getWebResponse().getHttpServletResponse().sendRedirect(app);
} catch (Exception e) {
e.printStackTrace();
}
}


You are logged out and brought back to the home page (this is all in the
parent window). Still Ok.

Here is the bad part...

If I reload/refresh the pop-up window (which is still open, and still
showing the AppPage - we haven't done anything in this window), I correctly
get the login page (because I have logged out), but when I submit the login
form I am brought the home page, not the AppPage! The reload/refresh makes
the identical request as if I tried to go straight to the AppPage (which
normally lets me login and present the AppPage) - but in this scenario ,
with the pop-up, and after a log out from the parent, it does not work.

I am at my wits end, so any help or advice, or suggestions would be much
appreciated. Please let me know if I can provide more code to help.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Strange-Popup-Behavior-After-Logout-Session.invalidate%28%29-tf3620694.html#a10110484
Sent from the Wicket - User mailing list archive at Nabble.com.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Strange Popup Behavior After Logout/Session.invalidate()

2007-04-20 Thread fattymelt

This doesn't really help me, but it might help someone to help me

When I logout in the parent window, and end up on the login screen, the URL
I am at ends with
/app?wicket:bookmarkablePage=:com.it.ediscovery.client.authentication.AdminSignInPage
while the URL I end up with in the pop-up once I refresh is
/app?wicket:bookmarkablePage=wicket-0:com.it.ediscovery.client.authentication.AdminSignInPage
(notice the pagemap addition)


Perhaps this has something to do with it?



fattymelt wrote:
 
 
So... someone comes to my app and logs in. The get a page which includes a
popup link to AppPage. The link is constructed like so:

 
In StartPage.java:

 

  PopupSettings popupSettings = new
 PopupSettings(PageMap.forName(popuppagemap));
  add(new BookmarkablePageLink(app-page,
 AppPage.class).setPopupSettings(popupSettings));
 

 
 
The AppPage class is a page which is also behind authentication. Normally,
if you go to its bookmarked URL without having logged in, you get my login
page, login, and then are redirected to the AppPage. This is all handled by
the built-in wicket authentication scheme. I'm not doing anything fancy.

 
 
In the scenario described above, when the popup opens, you aren't asked to
login because you already logged in on the parent page. So far so good.

 
 
The parent page also contains a link to logout. Clicking this link gets you
the SignOutPage which does this:

 
 
In SignOutPage.java:
 

 protected void onEndRequest() {
 AuthenticatedWebSession awSession = (AuthenticatedWebSession)
 getSession();
 awSession.invalidate();
 try { 

 getWebRequestCycle().getWebResponse().getHttpServletResponse().sendRedirect(app);
 } catch (Exception e) {
 e.printStackTrace();
 }
 }
 

 
 
You are logged out and brought back to the home page (this is all in the
parent window). Still Ok.

 
 
Here is the bad part...

 
 
If I reload/refresh the pop-up window (which is still open, and still
showing the AppPage - we haven't done anything in this window), I correctly
get the login page (because I have logged out), but when I submit the login
form I am brought the home page, not the AppPage! The reload/refresh makes
the identical request as if I tried to go straight to the AppPage (which
normally lets me login and present the AppPage) - but in this scenario ,
with the pop-up, and after a log out from the parent, it does not work.

 
 
I am at my wits end, so any help or advice, or suggestions would be much
appreciated. Please let me know if I can provide more code to help.

 
 Thanks

 

-- 
View this message in context: 
http://www.nabble.com/Strange-Popup-Behavior-After-Logout-Session.invalidate%28%29-tf3620694.html#a10110733
Sent from the Wicket - User mailing list archive at Nabble.com.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user