Re: isRequired: Use function instead of boolean

2009-04-15 Thread ChuckDeal

Ok, so I left out the detail that I have an AbstractPredicate in my
environment that implements Predicate and Serializable.

I honestly don't dare if it is Predicate or not, just that some Class is
able to execute the function.  I chose Predicate in my environment because I
use commons-collections, it was already written, and it already had a number
of useful, standard Predicates defined.  No need to re-invent the wheel.

Chuck


Johan Compagner wrote:
 
 is a Predicate  serializable?
 

-- 
View this message in context: 
http://www.nabble.com/isRequired%3A-Use-function-instead-of-boolean-tp23062017p23065139.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: session jumping?

2008-08-25 Thread ChuckDeal

We are not using any system like that.  We are using the wicket-auth package
with DataBinder.  The userId is stored in the Wicket Session, which is
thread-local.  Whenever the current user is requested, it always goes
through the Wicket Session object.

Now that you mention thread-local, and to add another twist, this problem
does not happen when our users stay in the strictly wicket part of our
application.  Instead, it appears to happen when crossing the wicket/legacy
bounds.  Even though the legacy pages are literally loaded inside of a
wicket page, I wonder if there is a problem with cleaning up the
thread/session...


jwcarman wrote:
 
 What are you using to login?  Is it Acegi/Spring Security?  Are you
 using the appropriate strategy (thread-local) for keeping track of
 the currently logged in user?
 
 On Fri, Aug 22, 2008 at 9:14 PM, rmorrisey [EMAIL PROTECTED] wrote:

 I'm working on the same project as Chuck, trying to help debug the
 session
 jumping. Here's a little more information:
 -Upgrading to 1.3.4 did not fix the issue
 -The session ID seems to be constant according to whichever PC initiated
 the
 request
 -A few example cases where we've seen the error:
 1)
 Server is started
 A logs in
 B logs in (while A is logging in/loading homepage)  B sees A's homepage

 2)
 Server is started
 A logs in
 B logs in
 A and B hit a couple different pages simultaneously
 B logs out (while A is loading a slow lazy-loading page)
 A clicks Logout   //logout link fires setResponsePage(Page, parameters)
 A gets a page expired error instead of logging out normally and returning
 to
 login screen

 It's not easy to reproduce the problem consistently, but it seems to
 happen
 relatively often with multiple concurrent users from different PCs.

 We will keep trying!
 Thanks,
 Russell


 Johan Compagner wrote:

 do you really see the same httpsession instance?
 or just the wicket session instance?

 Can you print out the session ids?

 But first upgrade to 1.3.4:

 The Apache Wicket team is proud to announce the availability of the
 fourth
 maintenance release: Apache Wicket 1.3.4. A lot of bugs have been
 squashed
 and
 several improvements implemented. Two noteworthy bugs have been
 squashed:

- cross session leakage due to a dangling thread local in exceptional
circumstances
- memory leak in localizer (WICKET-1667)

 johan



 On Fri, Aug 15, 2008 at 4:29 PM, ChuckDeal [EMAIL PROTECTED] wrote:


 Wicket 1.3.3

 I am going to attempt to describe what I have experienced in the hopes
 that
 a core dev can point me in the right direction.

 The background:  We previously had a complete JSP system in place.  We
 decided to use the Wicket framework, but could not convert the entire
 system
 at once, so the foundation is now wicket with a few of its pieces in
 Wicket,
 but much of the legacy system is accessed thorugh a technique the Al
 Maw
 posted whereby the legacy url is captured then redirected into a Wicket
 page
 hosting an IFrame, which then loads the original URL.  All of the pure
 Wicket pages are mounted using the HybridUrlCodingStrategy, except for
 the
 Wicket page that acts as the legacy interface, which is the standard
 BookmarkablePageRequestTargetUCS.  We use the wicket-auth module for
 authentication (with Databinder), so the user (user_id) is stored in
 the
 WebSession.

 The problem:  It seems that when two users enter the system, there is a
 scenario where the second user becomes the first user.  Both users
 login
 through a Wicket Page, which deposits them on a wicket page.  If user1
 go
 to
 a legacy URL, then the next wicket page that user2 visits changes to
 user1's
 session.  This can be observed because we display the logged in user on
 each
 page and the name changes.

 My working theory is that it has something to do with loading a
 serialized
 page from disk.  We are using JDK serialization and the std
 SecondLevelCache/DiskPageStore session store.  Can a dev verify that
 the
 Session is serialized with a Page?  How on earth is one user loading
 another's serialized Page from disk?  Has anyone experienced this?  How
 can
 I prevent this?  Obviously, this is a serious issue for us because this
 defeats user security.

 Chuck
 --
 View this message in context:
 http://www.nabble.com/session-%22jumping%22--tp18999615p18999615.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/session-%22jumping%22--tp18999615p19117723.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: session jumping?

2008-08-25 Thread ChuckDeal

I moved 1.3-SNAPSHOT and still the same problem.  I now see that it is the
WicketURLDecoder that is causing the problem.  It is prematurely decoding my
**parameter**

Here is the URL:  /jspfs/legacyUrl/peerReview%2Fpr_start.jsp
where 
jspfs is the Wicket mount
legacyUrl is the parm name
peerReview%2Fpr_start.jsp is the parm VALUE, it needs to stay encoded!

instead, it becomes /jspfs/legacyUrl/peerReview/pr_start.jsp which fails to
match the serveltPath on line 184 of ServletWebRequest.

I'm not sure how to proceed, should I open a JIRA for this?



Johan Compagner wrote:
 
 cant you patch wicket for that specific problem?
 
 Is maybe trunk of 1.3 better for you?
 
 
 On Fri, Aug 15, 2008 at 6:59 PM, ChuckDeal [EMAIL PROTECTED] wrote:
 

 OK, I upgraded to 1.3.4 and now I remember what was broken for me.  Some
 of
 my pages are having the wrong relative path prepended to them.  Upon
 further
 inspection, line 184 of ServletWebRequest is not matching due to an
 encoding
 issue where

 path = jspfs/legacyUrl/peerReview/pr_start.jsp
 serveltPath = /jspfs/legacyUrl/peerReview%2Fpr_start.jsp

 I read up on WICKET-1624 and WICKET-1627 because it was referenced in the
 code, but I am not sure where to go from here.


 Johan Compagner wrote:
 
  onBeginRequest of your RequestCycle or something like that
 
  but first try to upgrade
 
  On Fri, Aug 15, 2008 at 4:50 PM, ChuckDeal [EMAIL PROTECTED] wrote:
 
 
  Sorry, you had asked some questions too:
 
  I had not verified that it was the same httpsession. it just seemed to
 be
  the same wicket session.  Where would you recommend to print the
 session
  id
  (i'm guessing httpsession id?)?
 
 
  Johan Compagner wrote:
  
   do you really see the same httpsession instance?
   or just the wicket session instance?
  
   Can you print out the session ids?
  
   But first upgrade to 1.3.4:
  
   The Apache Wicket team is proud to announce the availability of the
  fourth
   maintenance release: Apache Wicket 1.3.4. A lot of bugs have been
  squashed
   and
   several improvements implemented. Two noteworthy bugs have been
  squashed:
  
  - cross session leakage due to a dangling thread local in
  exceptional
  circumstances
  - memory leak in localizer (WICKET-1667)
  
   johan
  
  
  
   On Fri, Aug 15, 2008 at 4:29 PM, ChuckDeal [EMAIL PROTECTED] wrote:
  
  
   Wicket 1.3.3
  
   I am going to attempt to describe what I have experienced in the
 hopes
   that
   a core dev can point me in the right direction.
  
   The background:  We previously had a complete JSP system in place.
  We
   decided to use the Wicket framework, but could not convert the
 entire
   system
   at once, so the foundation is now wicket with a few of its pieces
 in
   Wicket,
   but much of the legacy system is accessed thorugh a technique the
 Al
  Maw
   posted whereby the legacy url is captured then redirected into a
  Wicket
   page
   hosting an IFrame, which then loads the original URL.  All of the
 pure
   Wicket pages are mounted using the HybridUrlCodingStrategy, except
 for
   the
   Wicket page that acts as the legacy interface, which is the
 standard
   BookmarkablePageRequestTargetUCS.  We use the wicket-auth module
 for
   authentication (with Databinder), so the user (user_id) is stored
 in
  the
   WebSession.
  
   The problem:  It seems that when two users enter the system, there
 is
  a
   scenario where the second user becomes the first user.  Both
 users
   login
   through a Wicket Page, which deposits them on a wicket page.  If
 user1
  go
   to
   a legacy URL, then the next wicket page that user2 visits changes
 to
   user1's
   session.  This can be observed because we display the logged in
 user
  on
   each
   page and the name changes.
  
   My working theory is that it has something to do with loading a
   serialized
   page from disk.  We are using JDK serialization and the std
   SecondLevelCache/DiskPageStore session store.  Can a dev verify
 that
  the
   Session is serialized with a Page?  How on earth is one user
 loading
   another's serialized Page from disk?  Has anyone experienced this?
  How
   can
   I prevent this?  Obviously, this is a serious issue for us because
  this
   defeats user security.
  
   Chuck
   --
   View this message in context:
  
 http://www.nabble.com/session-%22jumping%22--tp18999615p18999615.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/session-%22jumping%22--tp18999615p1866.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

session jumping?

2008-08-15 Thread ChuckDeal

Wicket 1.3.3

I am going to attempt to describe what I have experienced in the hopes that
a core dev can point me in the right direction.

The background:  We previously had a complete JSP system in place.  We
decided to use the Wicket framework, but could not convert the entire system
at once, so the foundation is now wicket with a few of its pieces in Wicket,
but much of the legacy system is accessed thorugh a technique the Al Maw
posted whereby the legacy url is captured then redirected into a Wicket page
hosting an IFrame, which then loads the original URL.  All of the pure
Wicket pages are mounted using the HybridUrlCodingStrategy, except for the
Wicket page that acts as the legacy interface, which is the standard
BookmarkablePageRequestTargetUCS.  We use the wicket-auth module for
authentication (with Databinder), so the user (user_id) is stored in the
WebSession.

The problem:  It seems that when two users enter the system, there is a
scenario where the second user becomes the first user.  Both users login
through a Wicket Page, which deposits them on a wicket page.  If user1 go to
a legacy URL, then the next wicket page that user2 visits changes to user1's
session.  This can be observed because we display the logged in user on each
page and the name changes.  

My working theory is that it has something to do with loading a serialized
page from disk.  We are using JDK serialization and the std
SecondLevelCache/DiskPageStore session store.  Can a dev verify that the
Session is serialized with a Page?  How on earth is one user loading
another's serialized Page from disk?  Has anyone experienced this?  How can
I prevent this?  Obviously, this is a serious issue for us because this
defeats user security.

Chuck
-- 
View this message in context: 
http://www.nabble.com/session-%22jumping%22--tp18999615p18999615.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: session jumping?

2008-08-15 Thread ChuckDeal

I'll make another attempt at upgrading.  The last time I tried to upgrade to
1.3.4, I had problem with the relative path adjustments that Wicket was
making.  I had planned to hold off until our next release because we are at
the end of this cycle.  But this is a showstopper, so here we go...


Johan Compagner wrote:
 
 do you really see the same httpsession instance?
 or just the wicket session instance?
 
 Can you print out the session ids?
 
 But first upgrade to 1.3.4:
 
 The Apache Wicket team is proud to announce the availability of the fourth
 maintenance release: Apache Wicket 1.3.4. A lot of bugs have been squashed
 and
 several improvements implemented. Two noteworthy bugs have been squashed:
 
- cross session leakage due to a dangling thread local in exceptional
circumstances
- memory leak in localizer (WICKET-1667)
 
 johan
 
 
 
 On Fri, Aug 15, 2008 at 4:29 PM, ChuckDeal [EMAIL PROTECTED] wrote:
 

 Wicket 1.3.3

 I am going to attempt to describe what I have experienced in the hopes
 that
 a core dev can point me in the right direction.

 The background:  We previously had a complete JSP system in place.  We
 decided to use the Wicket framework, but could not convert the entire
 system
 at once, so the foundation is now wicket with a few of its pieces in
 Wicket,
 but much of the legacy system is accessed thorugh a technique the Al Maw
 posted whereby the legacy url is captured then redirected into a Wicket
 page
 hosting an IFrame, which then loads the original URL.  All of the pure
 Wicket pages are mounted using the HybridUrlCodingStrategy, except for
 the
 Wicket page that acts as the legacy interface, which is the standard
 BookmarkablePageRequestTargetUCS.  We use the wicket-auth module for
 authentication (with Databinder), so the user (user_id) is stored in the
 WebSession.

 The problem:  It seems that when two users enter the system, there is a
 scenario where the second user becomes the first user.  Both users
 login
 through a Wicket Page, which deposits them on a wicket page.  If user1 go
 to
 a legacy URL, then the next wicket page that user2 visits changes to
 user1's
 session.  This can be observed because we display the logged in user on
 each
 page and the name changes.

 My working theory is that it has something to do with loading a
 serialized
 page from disk.  We are using JDK serialization and the std
 SecondLevelCache/DiskPageStore session store.  Can a dev verify that the
 Session is serialized with a Page?  How on earth is one user loading
 another's serialized Page from disk?  Has anyone experienced this?  How
 can
 I prevent this?  Obviously, this is a serious issue for us because this
 defeats user security.

 Chuck
 --
 View this message in context:
 http://www.nabble.com/session-%22jumping%22--tp18999615p18999615.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/session-%22jumping%22--tp18999615p1814.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: session jumping?

2008-08-15 Thread ChuckDeal

Sorry, you had asked some questions too:

I had not verified that it was the same httpsession. it just seemed to be
the same wicket session.  Where would you recommend to print the session id
(i'm guessing httpsession id?)?


Johan Compagner wrote:
 
 do you really see the same httpsession instance?
 or just the wicket session instance?
 
 Can you print out the session ids?
 
 But first upgrade to 1.3.4:
 
 The Apache Wicket team is proud to announce the availability of the fourth
 maintenance release: Apache Wicket 1.3.4. A lot of bugs have been squashed
 and
 several improvements implemented. Two noteworthy bugs have been squashed:
 
- cross session leakage due to a dangling thread local in exceptional
circumstances
- memory leak in localizer (WICKET-1667)
 
 johan
 
 
 
 On Fri, Aug 15, 2008 at 4:29 PM, ChuckDeal [EMAIL PROTECTED] wrote:
 

 Wicket 1.3.3

 I am going to attempt to describe what I have experienced in the hopes
 that
 a core dev can point me in the right direction.

 The background:  We previously had a complete JSP system in place.  We
 decided to use the Wicket framework, but could not convert the entire
 system
 at once, so the foundation is now wicket with a few of its pieces in
 Wicket,
 but much of the legacy system is accessed thorugh a technique the Al Maw
 posted whereby the legacy url is captured then redirected into a Wicket
 page
 hosting an IFrame, which then loads the original URL.  All of the pure
 Wicket pages are mounted using the HybridUrlCodingStrategy, except for
 the
 Wicket page that acts as the legacy interface, which is the standard
 BookmarkablePageRequestTargetUCS.  We use the wicket-auth module for
 authentication (with Databinder), so the user (user_id) is stored in the
 WebSession.

 The problem:  It seems that when two users enter the system, there is a
 scenario where the second user becomes the first user.  Both users
 login
 through a Wicket Page, which deposits them on a wicket page.  If user1 go
 to
 a legacy URL, then the next wicket page that user2 visits changes to
 user1's
 session.  This can be observed because we display the logged in user on
 each
 page and the name changes.

 My working theory is that it has something to do with loading a
 serialized
 page from disk.  We are using JDK serialization and the std
 SecondLevelCache/DiskPageStore session store.  Can a dev verify that the
 Session is serialized with a Page?  How on earth is one user loading
 another's serialized Page from disk?  Has anyone experienced this?  How
 can
 I prevent this?  Obviously, this is a serious issue for us because this
 defeats user security.

 Chuck
 --
 View this message in context:
 http://www.nabble.com/session-%22jumping%22--tp18999615p18999615.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/session-%22jumping%22--tp18999615p1866.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: session jumping?

2008-08-15 Thread ChuckDeal

OK, I upgraded to 1.3.4 and now I remember what was broken for me.  Some of
my pages are having the wrong relative path prepended to them.  Upon further
inspection, line 184 of ServletWebRequest is not matching due to an encoding
issue where 

path = jspfs/legacyUrl/peerReview/pr_start.jsp
serveltPath = /jspfs/legacyUrl/peerReview%2Fpr_start.jsp

I read up on WICKET-1624 and WICKET-1627 because it was referenced in the
code, but I am not sure where to go from here.


Johan Compagner wrote:
 
 onBeginRequest of your RequestCycle or something like that
 
 but first try to upgrade
 
 On Fri, Aug 15, 2008 at 4:50 PM, ChuckDeal [EMAIL PROTECTED] wrote:
 

 Sorry, you had asked some questions too:

 I had not verified that it was the same httpsession. it just seemed to be
 the same wicket session.  Where would you recommend to print the session
 id
 (i'm guessing httpsession id?)?


 Johan Compagner wrote:
 
  do you really see the same httpsession instance?
  or just the wicket session instance?
 
  Can you print out the session ids?
 
  But first upgrade to 1.3.4:
 
  The Apache Wicket team is proud to announce the availability of the
 fourth
  maintenance release: Apache Wicket 1.3.4. A lot of bugs have been
 squashed
  and
  several improvements implemented. Two noteworthy bugs have been
 squashed:
 
 - cross session leakage due to a dangling thread local in
 exceptional
 circumstances
 - memory leak in localizer (WICKET-1667)
 
  johan
 
 
 
  On Fri, Aug 15, 2008 at 4:29 PM, ChuckDeal [EMAIL PROTECTED] wrote:
 
 
  Wicket 1.3.3
 
  I am going to attempt to describe what I have experienced in the hopes
  that
  a core dev can point me in the right direction.
 
  The background:  We previously had a complete JSP system in place.  We
  decided to use the Wicket framework, but could not convert the entire
  system
  at once, so the foundation is now wicket with a few of its pieces in
  Wicket,
  but much of the legacy system is accessed thorugh a technique the Al
 Maw
  posted whereby the legacy url is captured then redirected into a
 Wicket
  page
  hosting an IFrame, which then loads the original URL.  All of the pure
  Wicket pages are mounted using the HybridUrlCodingStrategy, except for
  the
  Wicket page that acts as the legacy interface, which is the standard
  BookmarkablePageRequestTargetUCS.  We use the wicket-auth module for
  authentication (with Databinder), so the user (user_id) is stored in
 the
  WebSession.
 
  The problem:  It seems that when two users enter the system, there is
 a
  scenario where the second user becomes the first user.  Both users
  login
  through a Wicket Page, which deposits them on a wicket page.  If user1
 go
  to
  a legacy URL, then the next wicket page that user2 visits changes to
  user1's
  session.  This can be observed because we display the logged in user
 on
  each
  page and the name changes.
 
  My working theory is that it has something to do with loading a
  serialized
  page from disk.  We are using JDK serialization and the std
  SecondLevelCache/DiskPageStore session store.  Can a dev verify that
 the
  Session is serialized with a Page?  How on earth is one user loading
  another's serialized Page from disk?  Has anyone experienced this? 
 How
  can
  I prevent this?  Obviously, this is a serious issue for us because
 this
  defeats user security.
 
  Chuck
  --
  View this message in context:
  http://www.nabble.com/session-%22jumping%22--tp18999615p18999615.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/session-%22jumping%22--tp18999615p1866.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/session-%22jumping%22--tp18999615p19002132.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: [inmethod-grid] javascript error closing modal window containing grid

2008-05-19 Thread ChuckDeal

Nope, that didn't help.  I did identify another use case.  When the grid is
hidden via javascript, the error is thrown as well.  I have attached another
quickstart with this additional scenario.  I believe that the modal window
is probably doing something similar when closing thus triggering this error
when making the grid hidden.  Therefore, this issue may have nothing to do
with modal dialogs, but with hiding the grid control via js.

http://www.nabble.com/file/p17324786/modal-grid.zip modal-grid.zip 

Chuck


Matej Knopp-2 wrote:
 
 Hi,
 
 I'll look at it as soon as I get some spare time. In the meanwhile,
 can you try putting the modal window in a wicket form and see if that
 helps?
 
 -Matej
 
 On Tue, May 13, 2008 at 5:23 PM, ChuckDeal [EMAIL PROTECTED] wrote:

  I am experiencing a javascript error when closing a ModalWindow that
  contains an inmethod-grid control.  I am having trouble tracking where
 the
  error originates.  Could anyone offer some advice on how to begin
  debugging an error with the ModalDialog?

  This is a quickstart that shows the problem.  On the home page, click
 the
  link to open the modal dialog.  Then simply click the close button of
 the
  dialog.  When the dialog disappears, the js error message will be
  available.

  http://www.nabble.com/file/p17211224/modal-grid.zip modal-grid.zip

  I am using IE 6 on WinXPProSP2

  Chuck
  --
  View this message in context:
 http://www.nabble.com/-inmethod-grid--javascript-error-closing-modal-window-containing-grid-tp17211224p17211224.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]
 
 
 
-- 
View this message in context: 
http://www.nabble.com/-inmethod-grid--javascript-error-closing-modal-window-containing-grid-tp17211224p17324786.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]



[inmethod-grid] javascript error closing modal window containing grid

2008-05-13 Thread ChuckDeal

I am experiencing a javascript error when closing a ModalWindow that 
contains an inmethod-grid control.  I am having trouble tracking where the 
error originates.  Could anyone offer some advice on how to begin 
debugging an error with the ModalDialog?

This is a quickstart that shows the problem.  On the home page, click the 
link to open the modal dialog.  Then simply click the close button of the 
dialog.  When the dialog disappears, the js error message will be 
available.

http://www.nabble.com/file/p17211224/modal-grid.zip modal-grid.zip 

I am using IE 6 on WinXPProSP2

Chuck
-- 
View this message in context: 
http://www.nabble.com/-inmethod-grid--javascript-error-closing-modal-window-containing-grid-tp17211224p17211224.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: Making entire row editable in a DataTable

2008-05-07 Thread ChuckDeal

If you have a handle to the Item instance represetning the cell, then you can
do something like

cell.findParent(Item.class)

which will get you the row's Item instance, on which you can call
row.getModel()

FWIW, the inmethod grid is excellent, but it does require pretty big changes
in order to replace an exisiting *complex* DataTable

Chuck


Sathish Gopal wrote:
 
 If i need to adopt to this API, then i need to rewrite the entire Page
 class. Is there any other solution.
 
 How do i get hold of the rowModel(org.apache.wicket.markup.repeater.Item)
 in the DataView when one of the columns is selected. There must be way to
 get the rowModel for some event trigger in a column...
 
 
 Jonathan Locke wrote:
 
 
 don't know the answer, but just thought you should know about this FYI:
 
 http://inmethod.com/
 
 
 Sathish Gopal wrote:
 
 Hi all,
 
 I've built a DataTable(AjaxFallbackDataTable) to display list of values.
 My requirement is that by clicking (Link) one of the coloumns in any
 given row should make the row (all the columns) editable.
 I've used AjaxEditlabel as cell renderer for all the columns. How to
 change the underlying editor of all the column in a specific row?
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Making-entire-row-editable-in-a-DataTable-tp17071597p17105576.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: [Inmethod-grid] column resize event?

2008-04-30 Thread ChuckDeal

Thanks, that's the right idea, but how can I use that to affect the client? 
It does not receive the target object from the event.  Also, it would be
nice if it included which columns changed.  

Or better yet, add a onColumnChanged method to AbstractColumn and then have
SubmitColumnStateBehavior call that method for each changed column (passing
a target object so that the client can be altered as a result of the
change).

Chuck


martin-g wrote:
 
 see com.inmethod.grid.common.AbstractGrid.onColumnStateChanged()
 
 On Tue, 2008-04-29 at 12:24 -0700, ChuckDeal wrote:
 Would it be possible to get a column resize event added?
 
 I am attempting to use a Dojo Combobox as the editable cell content.  The
 grid has a css style defined for edited cells that forces the combobox
 text
 element to 100% of the column width.  That has a cool effect when
 editting,
 but has the side effect of forcing the dropdown's button outside the
 viewport for the column.  I was hoping to hook onto the column resize
 event
 to execute a javascript function that would intelligently resize the
 combobox according to the size of the column.  
 
 Using percentages for the combobox width works, but at small and large
 column sizes, you can see the imperfection in that method.
 
 Is there another (non css expression) strategy I could use to apply a
 formula to the width attribute of the input element?
 
 Chuck
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-Inmethod-grid--column-resize-event--tp16968211p16980669.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]



[Inmethod-grid] column resize event?

2008-04-29 Thread ChuckDeal

Would it be possible to get a column resize event added?

I am attempting to use a Dojo Combobox as the editable cell content.  The
grid has a css style defined for edited cells that forces the combobox text
element to 100% of the column width.  That has a cool effect when editting,
but has the side effect of forcing the dropdown's button outside the
viewport for the column.  I was hoping to hook onto the column resize event
to execute a javascript function that would intelligently resize the
combobox according to the size of the column.  

Using percentages for the combobox width works, but at small and large
column sizes, you can see the imperfection in that method.

Is there another (non css expression) strategy I could use to apply a
formula to the width attribute of the input element?

Chuck
-- 
View this message in context: 
http://www.nabble.com/-Inmethod-grid--column-resize-event--tp16968211p16968211.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]



[wicketstuff-dojo] Dojo SuggestionList

2008-04-28 Thread ChuckDeal

I suppose this question is directed at Vincent Demay (the author listed int
he component)...

I am attempting to use a derivative of the DojoRequestSuggestionList.  As
part of it's contract with the DojoRequestSuggestionListHandler it needs to
implement 

public abstract SuggestionList getMatchingValues(String pattern)

I have this all working now, but my issue is that SuggestionList is a
HashMap, which does not preserve order.  So, I am creating an ordered list,
then transforming it to a SuggestionList per the contract, which is tossing
my order.

My question is:  Would it not be more appropriate to have the user return a
List and supply an IChoiceRenderer (like the Wicket AbstractChoice
components)?  Then in the respond() method of the Handler create the JSON
from those two items, forgoing the SuggestionList?

Since I already have my own Handler class (to overcome a problem I had using
the Dojo component within an inmethod.grid component) I will adjust my
respond() method accordingly.  I just wanted to toss out that problem with
SuggestionList so that it can be corrected in the library.

Chuck Deal
-- 
View this message in context: 
http://www.nabble.com/-wicketstuff-dojo--Dojo-SuggestionList-tp16944379p16944379.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]



Wicket's custom serialization

2007-11-14 Thread ChuckDeal

I have been using Wicket's custom serialization for quite some time now. 
I've noticed a few oddities, but I attributed them to my own mistakes.  Now,
that I have got most of my code ironed out, I have been following up on the
oddities.

The first scenario goes like this:  I have a custom authorization strategy
in place that reads a predicate from the Component's metadata.  If I leave
the page, then simply click the back button, the Component still has a
reference to the metadata item, but not it's content (in my case the
predicate object is missing).  I switched back to JDK serialization and it
works as expected (the predicates remain attached to the metadata object). 
I am preparing to build a quickstart to demonstrate this issue, but I wanted
to toss the issue out there in case this is something that you might already
be aware of.

The second scenario is a little less clear to me.  I have a Page that
includes an inner class that extends the AbstractFormValidator.  The Page
has references to TextField objects.  I received an error where the stack
trace implied that it was attempting to serialize the data in the model of
the page's TextField references.  (something like
formValidator-this$0-textField-data).  Shouldn't the models of the
textfields have been detached prior to serialization?  

Also, it seems that the joda DateTime object has problems serializing
(something to do with the iChronology class).  

I'll make sure I keep the stack traces the next time I get these errors, at
the moment, they are randomly occuring.

Thanks
Chuck
-- 
View this message in context: 
http://www.nabble.com/Wicket%27s-custom-serialization-tf4807039.html#a13753110
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: Component.wrap and IChainingModel

2007-11-12 Thread ChuckDeal


Dmitry   Kandalov wrote:
 
 On Thursday 08 November 2007 23:28:40 ChuckDeal wrote:
  Perhaps I didn't get the explanation but why can't you wrap models in
  this order?
 
  AppendingListModel(
      SortingModel(
          HibernateListModel()
      )
  )

 In that order the list would be sorting PRIOR to appending the item,
 which
 could result in an unsorted list.  In the order I specified, the item
 would
 get appeneded and then the sort would take place.
 
 You're right. But if you were not using List you could return SortedSet
 from 
 SortingModel and it would work :)
 

But then I'd be using a Set instead of a List.  DropDownChoice (via
AbstractChoice) expects the choices model to represent a List.

Chuck
-- 
View this message in context: 
http://www.nabble.com/Component.wrap-and-IChainingModel-tf4759201.html#a13710989
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: Component.wrap and IChainingModel

2007-11-08 Thread ChuckDeal


Dmitry   Kandalov wrote:
 
 On Wednesday 07 November 2007 01:18:32 ChuckDeal wrote:
 
 SortingModel (IChainingModel) - AppendingListModel
 (IComponentAssignmentModel) - HibernateListModel (database oriented
 model
 that returns a list of items from the db, unsorted).
 
 Perhaps I didn't get the explanation but why can't you wrap models in this 
 order?
 
 AppendingListModel(
 SortingModel(
 HibernateListModel()
 )
 )
 
In that order the list would be sorting PRIOR to appending the item, which
could result in an unsorted list.  In the order I specified, the item would
get appeneded and then the sort would take place.


Dmitry   Kandalov wrote:
 
 I was able to make a Model that implements IChainingModel,
 IComponentAssignmentModel, and IWrappedModel that follows the chain until
 it either encounters a IComponentAssignmentModel or exhausts the chain. 
 If
 it found a IComponentAssignmentModel, then it calls wrapOnAssignment and
 calls setChainedModel on the model containing the
 IComponentAssignmentModel
 to get it back into the hierarchy.

 It appears to be working for me now.  If you are interested, I can post
 the
 code.
 
 I'd like to.
 
 
 Dima
 

I don't have time right now to make a sample app, but this should be enough
source for you to see the impl.

http://www.nabble.com/file/p13654020/chained_model_source.zip
chained_model_source.zip 

Chuck
-- 
View this message in context: 
http://www.nabble.com/Component.wrap-and-IChainingModel-tf4759201.html#a13654020
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: Component.wrap and IChainingModel

2007-11-08 Thread ChuckDeal


Johan Compagner wrote:
 


 SortingModel (IChainingModel) - AppendingListModel
 (IComponentAssignmentModel) - HibernateListModel (database oriented
 model
 that returns a list of items from the db, unsorted).
 
 
 
 So the sorting model is the outside one that you give to the component
 
 But if we then go through that chained model and see the
 AppendingListModel
 and we say ok wrap. Aren't we then by by passing the sort?? Because
 if the component then ask its model the data. It doesn't go through the
 sorting model.
 
 johan
 
 

Not with my impl.  In the case of a chained model, the wrapped model is
inserted into the chain in the place of the model it is wrapping.  So that
sort will still occur, but it will get it's list from the wrapped model.

I posted some of the files on another message in this thread.

Chuck
-- 
View this message in context: 
http://www.nabble.com/Component.wrap-and-IChainingModel-tf4759201.html#a13654085
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: Component.wrap and IChainingModel

2007-11-06 Thread ChuckDeal


Johan Compagner wrote:
 
 But if it traverses and then call wrapOnAssignment on the first one it
 finds
 what do all the chained models do then? Why are they there? Because
 from that moment on those chained are completel gone. They could even be
 gc'ed
 So this only works if getObject from them are doing nothing more then
 calling getObject from chained.
 

Couldn't you then call setChainedModel on the parent of the
IComponentAssignedModel passing in the model returned from wrapOnAssignment? 
Or would that be to intrusive/destructive on the original model?


Johan Compagner wrote:
 
 What you could do is let all your chained models also implement
 IComponentAssignedModel
 

Are you proposing that I implement the interface and delegate to the first
IComponentAssignedModel in my chain?  What if I don't have an
IComponentAssignedModel in my chain?

I'll play with that idea and see what happens.  Does this seem like the
right approach to adding sorting capabilities to a model?

Chuck


johan

On 11/6/07, ChuckDeal [EMAIL PROTECTED] wrote:


 I have DropDownChoice objects where I want the choices model to be sorted.
 The choices come from a database (using a HibernateListModel from
 databinder) but I am unable to perform the sort on the database side, it
 must be done on the server after the results are returned (due to the
 nature
 of the sort function).  Previously, I had extended the HibernateListModel
 to
 make a SortableHibernateListModel, which worked very well.  However, That
 style of adding features gets cumbersome as you try to add new features
 in.
 For instance, next was a FilterableHibernateListModel (that also wanted to
 sort).

 So, I tried another approach whereby I would chain the operations
 together.
 So, I created a SortingModel that implements the IChainingModel interface
 and then stuck the HibernateListModel inside of it.  And that still
 worked.
 But, in another place, the model that I put into the SortingModel
 (IChainingModel) is an impl of IComponentAssignedModel.  The problem is
 that
 when assigning choices to a DropDownChoice, it calls Component.wrap which
 specifically looks for IComponentAssignedModel models, and if found, calls
 wrapOnAssignment().  However, in my case, wrap will see the SortingModel
 not
 the IComponentAssignedModel and therefore not operate as it did
 previosuly.

 I'm looking for some feedback here...
 Should wrap() be updated to traverse the IChainingModel chain until it
 finds
 an IComponentAssignedModel or exhausts the chain?

 Should I find a different method of adding sort capabilities on top of a
 Model?

 What other options do I have?

 Thanks,
 Chuck

-- 
View this message in context: 
http://www.nabble.com/Component.wrap-and-IChainingModel-tf4759201.html#a13610846
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: Component.wrap and IChainingModel

2007-11-06 Thread ChuckDeal


Johan Compagner wrote:
 
 I don't know the exact details of your model hierachy and where you use
 them
 in your components.
 But am i right that you do sorting in memory?
 So 1 model is loading the rows
 another model is sorting the rows?
 and another is doing X?
 
yes, that's it, roughly.


Johan Compagner wrote:
 
 But what do you give to the component then? And why must is wrap?
 
 johan
 

I don't know if you'll be able to see it from this description, but here is
a specific scenario.

SortingModel (IChainingModel) - AppendingListModel
(IComponentAssignmentModel) - HibernateListModel (database oriented model
that returns a list of items from the db, unsorted).

Let's say that the base List model returns a list of ACTIVE items from the
db, over time it is possible for an item to become inactive.  So, if you
were to view an old record, the DropdownChoice wouldn't have the (now
inactive) item in it's list of choices even though the model object for the
dropdownchoice would have the object.  So, the AppendingListModel ensures
that the object associated with a dropdownchoice is in the list, even if it
didn't come from the database.  In order to do that, the model needs to be
IComponentAssignmentModel so that it can get access to the component (and
therefore the component's modelobject).  Then the SortingModel, takes the
effective list and sorts it with a specified comparator.

I was able to make a Model that implements IChainingModel,
IComponentAssignmentModel, and IWrappedModel that follows the chain until it
either encounters a IComponentAssignmentModel or exhausts the chain.  If it
found a IComponentAssignmentModel, then it calls wrapOnAssignment and calls
setChainedModel on the model containing the IComponentAssignmentModel to get
it back into the hierarchy.

It appears to be working for me now.  If you are interested, I can post the
code.

Chuck

On 11/6/07, ChuckDeal [EMAIL PROTECTED] wrote:



 Johan Compagner wrote:
 
  But if it traverses and then call wrapOnAssignment on the first one it
  finds
  what do all the chained models do then? Why are they there? Because
  from that moment on those chained are completel gone. They could even be
  gc'ed
  So this only works if getObject from them are doing nothing more then
  calling getObject from chained.
 

 Couldn't you then call setChainedModel on the parent of the
 IComponentAssignedModel passing in the model returned from
 wrapOnAssignment?
 Or would that be to intrusive/destructive on the original model?


 Johan Compagner wrote:
 
  What you could do is let all your chained models also implement
  IComponentAssignedModel
 

 Are you proposing that I implement the interface and delegate to the first
 IComponentAssignedModel in my chain?  What if I don't have an
 IComponentAssignedModel in my chain?

 I'll play with that idea and see what happens.  Does this seem like the
 right approach to adding sorting capabilities to a model?

 Chuck


 johan

 On 11/6/07, ChuckDeal [EMAIL PROTECTED] wrote:
 
 
  I have DropDownChoice objects where I want the choices model to be
 sorted.
  The choices come from a database (using a HibernateListModel from
  databinder) but I am unable to perform the sort on the database side, it
  must be done on the server after the results are returned (due to the
  nature
  of the sort function).  Previously, I had extended the
 HibernateListModel
  to
  make a SortableHibernateListModel, which worked very well.  However,
 That
  style of adding features gets cumbersome as you try to add new features
  in.
  For instance, next was a FilterableHibernateListModel (that also wanted
 to
  sort).
 
  So, I tried another approach whereby I would chain the operations
  together.
  So, I created a SortingModel that implements the IChainingModel
 interface
  and then stuck the HibernateListModel inside of it.  And that still
  worked.
  But, in another place, the model that I put into the SortingModel
  (IChainingModel) is an impl of IComponentAssignedModel.  The problem is
  that
  when assigning choices to a DropDownChoice, it calls Component.wrapwhich
  specifically looks for IComponentAssignedModel models, and if found,
 calls
  wrapOnAssignment().  However, in my case, wrap will see the SortingModel
  not
  the IComponentAssignedModel and therefore not operate as it did
  previosuly.
 
  I'm looking for some feedback here...
  Should wrap() be updated to traverse the IChainingModel chain until it
  finds
  an IComponentAssignedModel or exhausts the chain?
 
  Should I find a different method of adding sort capabilities on top of a
  Model?
 
  What other options do I have?
 
  Thanks,
  Chuck


-- 
View this message in context: 
http://www.nabble.com/Component.wrap-and-IChainingModel-tf4759201.html#a13616079
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Re: how to remove 'choose one' from dropdownlist?

2007-10-31 Thread ChuckDeal

If it is just a matter of not wanting to see the phrase Choose One but that
you are ok with a empty value, you could use the null property value to
change the default text.  There is also a null.valid property that you can
define for the case where a null value is valid (used in conjuntion with
setNullValid(true) method).  

To use those properties, make a file can {you panel/page name}.properties
and add lines to it like:
null=Some default text
null.valid=Some other text

Chuck


raybristol wrote:
 
 Thanks everyone!
 
 
 
 igor.vaynberg wrote:
 
 put an option into your model, that way it will be selected... or
 override getdefaultchoice() and return 
 
 -igor
 
 
 On 10/30/07, raybristol [EMAIL PROTECTED] wrote:

 how to remove 'choose one' from dropdownlist? I can use the dropdownlist
 alright, populate data etc. but wicket always put a 'choose one' option
 on
 the top, I wonder if I can get rid of it?

 Many thanks!
 --
 View this message in context:
 http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13491271
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/how-to-remove-%27choose-one%27-from-dropdownlist--tf4719338.html#a13515621
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: RequestCycle?

2007-10-04 Thread ChuckDeal


Stanczak Group wrote:
 
 I'm not for sure what to use. I tried to override the newRequestCycle() 
 but I had trouble understanding it. I'm doing something like what 
 DataBinder does, but with 1.3. DataBinder seems to be 1.2. Either way 
 I'd rather use my own. Does anyone have an example of providing my own 
 request cycle, or is there an easier way?
 
 Sam Hough wrote:
 I think it is setup with ThreadLocal so you can get it easily with
 RequestCycle.get(). You can also provide your own version from
 Application.newRequestCycle which might be more what you need to hook in
 start/end events.



 Stanczak Group wrote:
   
 How can I access the request cycle so I can open and close a Hibernate 
 session on each request?

 -- 
 Justin Stanczak
 Stanczak Group
 812-735-3600
 

DataBinder (1.1-SNAPSHOT) definitely works with 1.3.  Databinder also does a
pretty good job of integrating Hibernate into the Wicket models.  Is there a
use case for which Databinder does not work for you?

Chuck
-- 
View this message in context: 
http://www.nabble.com/RequestCycle--tf4569125.html#a13046998
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: Adding a label when I add a FormComponent.

2007-10-04 Thread ChuckDeal

If you are going to have to add extra containers anyway, you could try it the
way we do it on my project.

In the html, we add both a label and input element with wicket ids.  to keep
it simple, the label's id is the same as the related component's id with
label appended to it.

Then, we have a createLabel method that takes the Component and it
automatically adds the label with the proper id.

TextField message = new TextField(message);
message.setLabel(new Model(Message));
add(message);
createFieldLabel(this, message);


protected FormComponentLabel createFieldLabel(final MarkupContainer
container, final FormComponent formComponent) {
FormComponentLabel label = new FieldLabel(formComponent.getId() + 
Label,
formComponent); 
container.add(label);
return label;
}

Chuck


igor.vaynberg wrote:
 
 put a container around your component and update that via ajax instead
 
 -igor
 
 
 On 10/4/07, Clay Lehman [EMAIL PROTECTED] wrote:
 I implemented a simple IComponentBorder, and anything I put in the
 beforeRender gets added again every time I try to update the component
 with AJAX.

 My IcomponentBorder has:
 public void renderBefore(Component component)
 {
 Response resp = component.getResponse();
 resp.write(Label);
 }

 To update the input box using AJAX I have a behavior:

 Input1.add(new AjaxFormComponentUpdatingBehavior(onchange)
 {
 protected void onUpdate(AjaxRequestTarget target)
 {
 theItem.name=new value;
 target.addComponent(input2)
  }
 });

 When I do target.addComponent(input2), the renderBefore adds Label
 again, so the HTML looks like:

 Label Label input wicket:id=input2/

 Am I using IComponentBorder wrong?

 Thanks for any help!
 -Clay


 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 04, 2007 11:13 AM
 To: users@wicket.apache.org
 Subject: Re: Adding a label when I add a FormComponent.

 see icomponentborder

 -igor


 On 10/4/07, Clay Lehman [EMAIL PROTECTED] wrote:
 
  Hey Everyone,
 
 
 
  I want to create a subclass of a Form Component (Let's use TextField
 for
  this example) which takes a String in the constructor, and
 automatically
  adds the HTML for a Label before the field.  I want to provide all the
  default functionality of a TextField (like adding behaviors, and
  validators), so I don't think a Panel will work for me.
 
 
 
 
 
  I found a post where it mentioned (as a hack)to override onRender to
 add
  HTML for the label directly, but this runs into problems when you
  include the Component in an AJAX page (whenever you re-add the
  component, it calls onRender, and you add the HTML for the label
  multiple times.
 
 
 
  Is there a way to do this using SimpleFormComponentLabel, or some
 other
  construct?
 
 
 
  Could I use  FormComponentPanel? Or is there some configuration and
  functionality in AbstractTextCompnent and TextField which I would lose
  by using a FormComponentPanel?
 
 
 
  Thanks for any advice!!
 
  -Clay Lehman
 
 

 -
 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/Adding-a-label-when-I-add-a-FormComponent.-tf4569428.html#a13047069
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: RequestCycle?

2007-10-04 Thread ChuckDeal

I don't know that 1.1 has a tar.  My project uses maven, so it was a snap to
add the Databinder bits to our pom.

Here is the page that gives the databinder snapshot repo info:
http://databinder.net/site/show/faq#updates

If you don't use maven, I could always send a 1.1-SNAPSHOT directly to
you...

FYI, The databinder site has some examples that help with learning how to
use and adapt the code to your own project.

Chuck


Stanczak Group wrote:
 
 Probably not. I'll probably use it when I get a chance. I just 
 downloaded the 1.0 tar and saw it's using 1.2 Wicket. Shot me the link 
 and I'll see if I can give it a shot tonight.
 
 ChuckDeal wrote:
 Stanczak Group wrote:
   
 I'm not for sure what to use. I tried to override the newRequestCycle() 
 but I had trouble understanding it. I'm doing something like what 
 DataBinder does, but with 1.3. DataBinder seems to be 1.2. Either way 
 I'd rather use my own. Does anyone have an example of providing my own 
 request cycle, or is there an easier way?

 Sam Hough wrote:
 
 I think it is setup with ThreadLocal so you can get it easily with
 RequestCycle.get(). You can also provide your own version from
 Application.newRequestCycle which might be more what you need to hook
 in
 start/end events.



 Stanczak Group wrote:
   
   
 How can I access the request cycle so I can open and close a Hibernate 
 session on each request?

 -- 
 Justin Stanczak
 Stanczak Group
 812-735-3600
 

 DataBinder (1.1-SNAPSHOT) definitely works with 1.3.  Databinder also
 does a
 pretty good job of integrating Hibernate into the Wicket models.  Is
 there a
 use case for which Databinder does not work for you?

 Chuck
   
 
 -- 
 Justin Stanczak
 Stanczak Group
 812-735-3600
 
 All that is necessary for the triumph of evil is that good men do
 nothing.
 Edmund Burke
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/RequestCycle--tf4569125.html#a13047854
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: hide/show components - role based

2007-10-02 Thread ChuckDeal


Juan Gabriel Arias wrote:
 
 The second one.
 Components should check some roles and enable or disable itself.
 
 Thanks for the answers!
 Juan
 
 On 10/2/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 On 10/1/07, Kent Tong [EMAIL PROTECTED] wrote:
 
 
  Juan Gabriel Arias wrote:
  
   Im trying to dinamically show or hide html components, like links,
   buttons,
   etc.
  

 What do you mean by 'dynamic'? Do you want to change authorization
 info for the components dynamically, or do you mean dynamic in that
 components should figure out what to do at runtime?

 Eelco
 

See this thread for a description of how I do context (or data) sensitive
roles. 
http://www.nabble.com/Best-Practices-for-accessing-repainting-sibling-cousin-components--tf3841514.html#a10895313

Chuck

-- 
View this message in context: 
http://www.nabble.com/hide-show-components---role-based-tf4550513.html#a13005139
Sent from the Wicket - User mailing list archive at Nabble.com.


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



JSP embedded in Wicket page, loaded in a popup window

2007-09-21 Thread ChuckDeal

I have successfully used Al Maw's technique for embedding legacy jsp content
into a wicket page.  When loading the page into the browser via address bar
or another link, it seems to work great.  However, if I attempt to load the
page in a popup window the relative paths get broken.  I can't seem to
figure out why there would be a difference; when tracing through
ServletWebRequest.getRelativePathPrefixToContextRoot() they seem to produce
the same value, however in the popup's case, the images aren't displayed.

I don't understand why using window.open to open a page vs using the address
bar of the main browser should be having this effect.  Would anyone care to
take a shot at solving my issue or even hypothesizing what the problem is?

Wicket 1.3.0-SNAPSHOT (revision 576365)
IE 6
Tomcat 5.5.17

Thanks
Chuck
-- 
View this message in context: 
http://www.nabble.com/JSP-embedded-in-Wicket-page%2C-loaded-in-a-popup-window-tf4496759.html#a12823571
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: Context-sensitive roles

2007-09-19 Thread ChuckDeal


Robert ... wrote:
 
 I'm making a forum project to learn about Wicket, Hibernate  Spring.
 It has been interesting, but now I am kinda stuck for a while on
 authentication/authorization.
 
 The difficulty I am having is that the roles a user can have is
 based on the forum he is on. Each forum is owned by a different user.
 So a user can be a forum administator on forum A, but be a
 registered user on forum B. All examples I see seem to determine
 the roles context-free.
 

See this thread for a description of how I do context (or data) sensitive
roles. 
http://www.nabble.com/Best-Practices-for-accessing-repainting-sibling-cousin-components--tf3841514.html#a10895313
-- 
View this message in context: 
http://www.nabble.com/Context-sensitive-roles-tf4479548.html#a12775716
Sent from the Wicket - User mailing list archive at Nabble.com.


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



DataTable header that spans multiple columns

2007-09-07 Thread ChuckDeal

When using the DataTable with HeadersToolbar you can display the Label
associated with the column as the column Header.  Has anyone had a case
where they wanted a label to span columns?  Specifically, something where
row one is a category that spans three columns and then row two contains
individual columns where the label represents a specific category.

Has anyone done this or does anyone have a good idea how to solve this in a
nice way?

Thanks
Chuck
-- 
View this message in context: 
http://www.nabble.com/DataTable-header-that-spans-multiple-columns-tf4401243.html#a12554956
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: Updating FeedbackPanel

2007-09-04 Thread ChuckDeal

Man, I came back from a long weekend and the updateFeedback() method was
gone!  It appears that my code still works just peachy without it, so thanks
to whoever took care of that!

Chuck


ChuckDeal wrote:
 
 I have a scenario where upon submitting the page, a feedback message is
 added, something like info(Last Saved: {datetime}).
 
 I now am working on a different feature that wants to add feedback in the
 onBeforeRender() method of the page.  At first, I was only seeing the
 original message (Last Saved...) and upon tracing it, I can see that the
 render process first updates all IFeedback objects and THEN processes the
 onBeforeRender.  This means that my new message wasn't getting set in time
 to catch where the IFeedback objects were getting init'ed.  
 
 So, I thought that I would simply call updateFeedback on my panel after I
 addedmy new message.  But this didn't work either.  So, upon digging into
 that, I found that the messages list is cached inside the
 FeedbackMessagesModel (the default model for the FeedbackPanel).  I'm OK
 with the idea of caching, but I would have expected that calling
 updateFeedback (cache or otherwise) would have caused my feedback panel to
 get the latest set of messages.  Here's what I did to overcome the
 problem:
 
 final FeedbackPanel feedback = new FeedbackPanel(feedback) {
   @Override
   public void updateFeedback() {
   get(feedbackul:messages).detach();
   super.updateFeedback();
   }
 };
 
 Is this acceptable/desirable?If this is acceptable, should the
 FeedbackPanel be updated with this fix?  If so, I can follow up with a
 JIRA.
 
 Or would the recommendation be to use a different FeedbackModel impl that
 doesn't cache?
 
 Chuck
 

-- 
View this message in context: 
http://www.nabble.com/Updating-FeedbackPanel-tf4355824.html#a12480679
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Updating FeedbackPanel

2007-08-30 Thread ChuckDeal

I have a scenario where upon submitting the page, a feedback message is
added, something like info(Last Saved: {datetime}).

I now am working on a different feature that wants to add feedback in the
onBeforeRender() method of the page.  At first, I was only seeing the
original message (Last Saved...) and upon tracing it, I can see that the
render process first updates all IFeedback objects and THEN processes the
onBeforeRender.  This means that my new message wasn't getting set in time
to catch where the IFeedback objects were getting init'ed.  

So, I thought that I would simply call updateFeedback on my panel after I
addedmy new message.  But this didn't work either.  So, upon digging into
that, I found that the messages list is cached inside the
FeedbackMessagesModel (the default model for the FeedbackPanel).  I'm OK
with the idea of caching, but I would have expected that calling
updateFeedback (cache or otherwise) would have caused my feedback panel to
get the latest set of messages.  Here's what I did to overcome the problem:

final FeedbackPanel feedback = new FeedbackPanel(feedback) {
@Override
public void updateFeedback() {
get(feedbackul:messages).detach();
super.updateFeedback();
}
};

Is this acceptable/desirable?If this is acceptable, should the
FeedbackPanel be updated with this fix?  If so, I can follow up with a JIRA.

Or would the recommendation be to use a different FeedbackModel impl that
doesn't cache?

Chuck
-- 
View this message in context: 
http://www.nabble.com/Updating-FeedbackPanel-tf4355824.html#a12412455
Sent from the Wicket - User mailing list archive at Nabble.com.


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