Re: Component parent null after replace

2009-10-23 Thread wicketnewuser

Hi I have similiar situation but i'm using autonomous  inner class
final AjaxFallbackDefaultDataTable datatable = new
AjaxFallbackDefaultDataTable(trafficreportlistdatatable, columns, new
ReportListProvider(Traffic, include), 8);
add(datatable);
final WebMarkupContainer showMineSpan = new
WebMarkupContainer(showMineSpan);
final WebMarkupContainer showAllSpan = new
WebMarkupContainer(showAllSpan);
  final Link showAllLink = new
AjaxFallbackLink(trafficreportlistshowall) { 
public void onClick(AjaxRequestTarget target) {
AjaxFallbackDefaultDataTable 
replacement = new
AjaxFallbackDefaultDataTable(trafficreportlistdatatable, columns, new
ReportListProvider(Traffic, all), 8);
//this.replaceWith(replacement);
replacement.setOutputMarkupId(true);

datatable.replaceWith(replacement);

I can't do datatable = replacement as datatable has to be final in my case
as i'm using it in the anonymous  inner class. Do you know if there is any
solution to this. Would appreciate your help



igor.vaynberg wrote:
 
 heh, seems a lot of people run into it. the short is that you have to do
 this:
 
 lets say you have a ref to the panel: private Panel panel;
 
 what you do is this:
 panel.replaceWith(new Panel());
 
 and then later again
 panel.replaceWith(new Panel());
 
 ^ the second time will fail beause you have removed panel from hierarchy
 already - you replaced it with another panel.
 
 the proper way to do it is to keep the reference up to date, so
 Panel temp=new Panel();
 panel.replaceWith(temp);
 panel=temp;
 
 that way when it happens the second time it will properly act on the new
 panel that is inside the hierarchy now.
 
 -igor
 
 
 
 
 On 9/9/07, Anthony Schexnaildre apsch...@gmail.com wrote:

 I am trying to create a link that will replace one panel with another
 on the page. This seems as though it should be an easy task but after
 many attempts and searching the net for examples I have yet to get it
 working so the replacement can happen more than one without the
 component becoming orphaned. On the second replace attempt i get the
 following exception. Anyone have the solution?

 Thank you,

 Anthony


 java.lang.IllegalStateException: This method can only be called on a
 component that has already been added to its parent.
   at org.apache.wicket.Component.replaceWith(Component.java:2266)
   at com.pinwise.pinbase.web.components.links.SecurePanelLink
 $4.onClick(SecurePanelLink.java:142)
   at org.apache.wicket.markup.html.link.Link.onLinkClicked
 (Link.java:222)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.wicket.RequestListenerInterface.invoke
 (RequestListenerInterface.java:186)


 =

 =

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


 UserFormPanel userFormPanel = new
 UserFormPanel(userFormPanel);
 add( userFormPanel );

 ListIColumn columns = new ArrayListIColumn();
 final Model m = new Model(userFormPanel);
  columns.add(new PropertyColumn(new Model(Actions), id)
  {
 public void populateItem(Item cellItem, String
 componentId, final
 IModel model)
  {
 EditActionPanel panel = new
 EditActionPanel(componentId, model);
 panel.add(
 SecurePanelLink.createSecurePanelLink( edit, m,
 UserFormPanel.class, model ) );
cellItem.add( panel );
  }
  });

  columns.add(new PropertyColumn(new Model(Username),
 username, username));
  columns.add(new PropertyColumn(new Model(First Name),
 firstName, firstName));
  columns.add(new PropertyColumn(new Model(Last Name),
 lastName, lastName));

  add(new DefaultDataTable(table, columns, new
 SortableUserDataProvider(), 10));
 }


 
 SecurePanelLink
 
 public class SecurePanelLink extends Link implements ISecureComponent {

 /**
  *
  */
 private static final long serialVersionUID = 1L;

 protected IPanelLink panelLink;

 /**
  * @param id
  * @param c
  */
 public SecurePanelLink(String id, final Class c)
 {
 super(id);
 // Ensure that c is a subclass of Panel
 if (!Panel.class.isAssignableFrom(c))
 {
 throw new IllegalArgumentException(Class  + c +
  is not a
 subclass of Panel);
 }

 this.panelLink = 

Re: Behind proxy

2009-10-23 Thread Anton Veretennikov
Yes, I see, Jeremy. You are lucky! :)

Okey, I run my local Tomcat 6.0.18:

I remove all localhost cookies from my browser, close it, open it
again and enter:
http://localhost:8084/FivePinSite-1.0-SNAPSHOT/

I see JSESSIONID cookie set to localhost and path is
/FivePinSite-1.0-SNAPSHOT. Is it right?

-- Tony


On Fri, Oct 23, 2009 at 1:27 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 You WILL see jsessionid on that server because the cookie path is not the
 path that the server is serving on.  Notice that the URL is
 wickettraining.com/app but when you first view a page on the site, it will
 set a cookie with the jsessionid that is on patch /wickettraining (should be
 /app).

 That's what I was trying to explain earlier.

 Now, look at http://www.texashuntfish.com - after the first page, you will
 not see the jsessionid in the URL any more - because if you notice, the URL
 is /app and the cookie is set on /app.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Fri, Oct 23, 2009 at 12:19 AM, Anton Veretennikov 
 anton.veretenni...@gmail.com wrote:

 Jeremy, thank you,

 For experiment, guys,
 Open, please, http://www.wickettraining.com and click in sequence these
 links:

 Contact Me and then
 Class Information (format, content, etc)

 If you see jsessionid appended to URL, please, answer:

 [  ] YES
 [  ] NO

 -- Tony


 On Thu, Oct 22, 2009 at 10:09 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  The problem that makes jsessionid appear is nearly always related to
 cookies
  and cookie paths.  the servlet container will try to set a cookie with
 the
  jsessionid.  If that doesn't work, it will continue adding jsessionid to
 the
  urls.  So, use HttpFox (or similar) to see when the servlet container
 sets a
  cookie with the jsessionid, and pay attention to what path it sets it on.
  Then see if your browser is sending the jsessionid back to the container
 on
  the next request.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Wed, Oct 21, 2009 at 9:44 AM, Anton Veretennikov 
  anton.veretenni...@gmail.com wrote:
 
  1. I checked it with Tomcat 5.5. Problem remained. All my bookmarkable
  links to Home page with parameters contained jsessionid.
 
  2. I got 1.5-SNAPSHOT, compiled, tried, problem remained.
 
  3. I removed lines in WebResponse::encodeURL and
  ServletWebResponse::encodeURL with logic about bug in apache tomcat
  5.5:
 
        �...@override
         public String encodeURL(String url)
         {
                 if (url != null)
                 {
                                 return
  httpServletResponse.encodeURL(url.toString());
                 }
                 return httpServletResponse.encodeURL(url);
          }
 
  and  miracle. jsessionid disappeared!
 
  I don't know may be this workaround for 5.5 is not correct?
 
  -- Tony
 
 
  On Wed, Oct 21, 2009 at 10:02 PM, nino martinez wael
  nino.martinez.w...@gmail.com wrote:
   Strange I have tomcat 5.5 here, it does not have that problem.. Could
 it
  be
   that it's tomcat related?
  
   2009/10/21 Anton Veretennikov anton.veretenni...@gmail.com
  
   Additional info to jsessionid problem:
  
   This is seen on Tomcat 6.0.18 WITHOUT any proxy on bookmarkable
 links.
   Glassfish 2.1 seems not appending jsessionid to url even on first
 call
   (I have default settings) so there is no such behaviour.
  
   -- Tony
  
   On Wed, Oct 21, 2009 at 6:20 PM, Anton Veretennikov
   anton.veretenni...@gmail.com wrote:
Thank you, Nino, I'll repeat then,
   
The problem is that all Bookmarkable links continue to have
;jsessionid=... string even after first call. The same time, Ajax
links work (jsessionid is removed) as desired but only if they
 are
not called after any bookmarkable link.
   
Hope somebody have such a problem and solved it. May be this have
nothing to do with proxy.
   
-- Tony.
   
On Wed, Oct 21, 2009 at 5:32 PM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
Hmm Anton im not sure, but dont think so.. BookmarkablePageLinks
 are
   just
that, and if session ID were appended they would'nt work..
   
One of my sites are running a beta 1.4 i'll try to upgrade and see
 if
  I
   can
replicate the error. But it might take some time..
   
Im taking this issue back to the wicket list as it may speed up
   responses to
it. So please respond to it there.
   
2009/10/20 Anton Veretennikov anton.veretenni...@gmail.com
   
Nino, seems to me that it has something with
 BookmarkablePageLinks.
  I
use them everywhere except expanding tree links where Ajax is
 used.
Look, when you press on +/- signes of tree, jsessionid
disappears after first click (only in this tree Ajaxed block).
 After
that you can press on bookmarkable links and everything will be
  okey.
   
I tried to remove everything about cookies even Google Analytics
  code,
this changes nothing.
So, may be there is 

Re: Behind proxy

2009-10-23 Thread Jeremy Thomerson
Looks like it's right.

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Oct 23, 2009 at 1:38 AM, Anton Veretennikov 
anton.veretenni...@gmail.com wrote:

 Yes, I see, Jeremy. You are lucky! :)

 Okey, I run my local Tomcat 6.0.18:

 I remove all localhost cookies from my browser, close it, open it
 again and enter:
 http://localhost:8084/FivePinSite-1.0-SNAPSHOT/

 I see JSESSIONID cookie set to localhost and path is
 /FivePinSite-1.0-SNAPSHOT. Is it right?

 -- Tony


 On Fri, Oct 23, 2009 at 1:27 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  You WILL see jsessionid on that server because the cookie path is not the
  path that the server is serving on.  Notice that the URL is
  wickettraining.com/app but when you first view a page on the site, it
 will
  set a cookie with the jsessionid that is on patch /wickettraining (should
 be
  /app).
 
  That's what I was trying to explain earlier.
 
  Now, look at http://www.texashuntfish.com - after the first page, you
 will
  not see the jsessionid in the URL any more - because if you notice, the
 URL
  is /app and the cookie is set on /app.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Fri, Oct 23, 2009 at 12:19 AM, Anton Veretennikov 
  anton.veretenni...@gmail.com wrote:
 
  Jeremy, thank you,
 
  For experiment, guys,
  Open, please, http://www.wickettraining.com and click in sequence these
  links:
 
  Contact Me and then
  Class Information (format, content, etc)
 
  If you see jsessionid appended to URL, please, answer:
 
  [  ] YES
  [  ] NO
 
  -- Tony
 
 
  On Thu, Oct 22, 2009 at 10:09 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   The problem that makes jsessionid appear is nearly always related to
  cookies
   and cookie paths.  the servlet container will try to set a cookie with
  the
   jsessionid.  If that doesn't work, it will continue adding jsessionid
 to
  the
   urls.  So, use HttpFox (or similar) to see when the servlet container
  sets a
   cookie with the jsessionid, and pay attention to what path it sets it
 on.
   Then see if your browser is sending the jsessionid back to the
 container
  on
   the next request.
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
   On Wed, Oct 21, 2009 at 9:44 AM, Anton Veretennikov 
   anton.veretenni...@gmail.com wrote:
  
   1. I checked it with Tomcat 5.5. Problem remained. All my
 bookmarkable
   links to Home page with parameters contained jsessionid.
  
   2. I got 1.5-SNAPSHOT, compiled, tried, problem remained.
  
   3. I removed lines in WebResponse::encodeURL and
   ServletWebResponse::encodeURL with logic about bug in apache tomcat
   5.5:
  
  @Override
  public String encodeURL(String url)
  {
  if (url != null)
  {
  return
   httpServletResponse.encodeURL(url.toString());
  }
  return httpServletResponse.encodeURL(url);
   }
  
   and  miracle. jsessionid disappeared!
  
   I don't know may be this workaround for 5.5 is not correct?
  
   -- Tony
  
  
   On Wed, Oct 21, 2009 at 10:02 PM, nino martinez wael
   nino.martinez.w...@gmail.com wrote:
Strange I have tomcat 5.5 here, it does not have that problem..
 Could
  it
   be
that it's tomcat related?
   
2009/10/21 Anton Veretennikov anton.veretenni...@gmail.com
   
Additional info to jsessionid problem:
   
This is seen on Tomcat 6.0.18 WITHOUT any proxy on bookmarkable
  links.
Glassfish 2.1 seems not appending jsessionid to url even on first
  call
(I have default settings) so there is no such behaviour.
   
-- Tony
   
On Wed, Oct 21, 2009 at 6:20 PM, Anton Veretennikov
anton.veretenni...@gmail.com wrote:
 Thank you, Nino, I'll repeat then,

 The problem is that all Bookmarkable links continue to have
 ;jsessionid=... string even after first call. The same time,
 Ajax
 links work (jsessionid is removed) as desired but only if
 they
  are
 not called after any bookmarkable link.

 Hope somebody have such a problem and solved it. May be this
 have
 nothing to do with proxy.

 -- Tony.

 On Wed, Oct 21, 2009 at 5:32 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Hmm Anton im not sure, but dont think so..
 BookmarkablePageLinks
  are
just
 that, and if session ID were appended they would'nt work..

 One of my sites are running a beta 1.4 i'll try to upgrade and
 see
  if
   I
can
 replicate the error. But it might take some time..

 Im taking this issue back to the wicket list as it may speed up
responses to
 it. So please respond to it there.

 2009/10/20 Anton Veretennikov anton.veretenni...@gmail.com

 Nino, seems to me that it has something with
  BookmarkablePageLinks.
   I
 use them everywhere except expanding tree links where Ajax is
  used.
 

Re: Behind proxy

2009-10-23 Thread Anton Veretennikov
Why in this localhost case I see jsessionid after I press any
*bookmarkable* link?
Why when I *first* press *non-bookmarable* link, jsessionid disappears?
Why when I press *bookmarkable* link and then non-bookmarkable, I see
jsessionid remains and never removes whatever link I press?
Is it okey, that urlFor for home page returns ./?
Why when I remove workaround from encodeURL everything starts working?

-- Tony

On Fri, Oct 23, 2009 at 2:45 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 Looks like it's right.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Fri, Oct 23, 2009 at 1:38 AM, Anton Veretennikov 
 anton.veretenni...@gmail.com wrote:

 Yes, I see, Jeremy. You are lucky! :)

 Okey, I run my local Tomcat 6.0.18:

 I remove all localhost cookies from my browser, close it, open it
 again and enter:
 http://localhost:8084/FivePinSite-1.0-SNAPSHOT/

 I see JSESSIONID cookie set to localhost and path is
 /FivePinSite-1.0-SNAPSHOT. Is it right?

 -- Tony


 On Fri, Oct 23, 2009 at 1:27 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  You WILL see jsessionid on that server because the cookie path is not the
  path that the server is serving on.  Notice that the URL is
  wickettraining.com/app but when you first view a page on the site, it
 will
  set a cookie with the jsessionid that is on patch /wickettraining (should
 be
  /app).
 
  That's what I was trying to explain earlier.
 
  Now, look at http://www.texashuntfish.com - after the first page, you
 will
  not see the jsessionid in the URL any more - because if you notice, the
 URL
  is /app and the cookie is set on /app.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Fri, Oct 23, 2009 at 12:19 AM, Anton Veretennikov 
  anton.veretenni...@gmail.com wrote:
 
  Jeremy, thank you,
 
  For experiment, guys,
  Open, please, http://www.wickettraining.com and click in sequence these
  links:
 
  Contact Me and then
  Class Information (format, content, etc)
 
  If you see jsessionid appended to URL, please, answer:
 
  [  ] YES
  [  ] NO
 
  -- Tony
 
 
  On Thu, Oct 22, 2009 at 10:09 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   The problem that makes jsessionid appear is nearly always related to
  cookies
   and cookie paths.  the servlet container will try to set a cookie with
  the
   jsessionid.  If that doesn't work, it will continue adding jsessionid
 to
  the
   urls.  So, use HttpFox (or similar) to see when the servlet container
  sets a
   cookie with the jsessionid, and pay attention to what path it sets it
 on.
   Then see if your browser is sending the jsessionid back to the
 container
  on
   the next request.
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
   On Wed, Oct 21, 2009 at 9:44 AM, Anton Veretennikov 
   anton.veretenni...@gmail.com wrote:
  
   1. I checked it with Tomcat 5.5. Problem remained. All my
 bookmarkable
   links to Home page with parameters contained jsessionid.
  
   2. I got 1.5-SNAPSHOT, compiled, tried, problem remained.
  
   3. I removed lines in WebResponse::encodeURL and
   ServletWebResponse::encodeURL with logic about bug in apache tomcat
   5.5:
  
         �...@override
          public String encodeURL(String url)
          {
                  if (url != null)
                  {
                                  return
   httpServletResponse.encodeURL(url.toString());
                  }
                  return httpServletResponse.encodeURL(url);
           }
  
   and  miracle. jsessionid disappeared!
  
   I don't know may be this workaround for 5.5 is not correct?
  
   -- Tony
  
  
   On Wed, Oct 21, 2009 at 10:02 PM, nino martinez wael
   nino.martinez.w...@gmail.com wrote:
Strange I have tomcat 5.5 here, it does not have that problem..
 Could
  it
   be
that it's tomcat related?
   
2009/10/21 Anton Veretennikov anton.veretenni...@gmail.com
   
Additional info to jsessionid problem:
   
This is seen on Tomcat 6.0.18 WITHOUT any proxy on bookmarkable
  links.
Glassfish 2.1 seems not appending jsessionid to url even on first
  call
(I have default settings) so there is no such behaviour.
   
-- Tony
   
On Wed, Oct 21, 2009 at 6:20 PM, Anton Veretennikov
anton.veretenni...@gmail.com wrote:
 Thank you, Nino, I'll repeat then,

 The problem is that all Bookmarkable links continue to have
 ;jsessionid=... string even after first call. The same time,
 Ajax
 links work (jsessionid is removed) as desired but only if
 they
  are
 not called after any bookmarkable link.

 Hope somebody have such a problem and solved it. May be this
 have
 nothing to do with proxy.

 -- Tony.

 On Wed, Oct 21, 2009 at 5:32 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Hmm Anton im not sure, but dont think so..
 BookmarkablePageLinks
  are
just
 that, and if session ID were appended they would'nt work..

 

Re: Behind proxy

2009-10-23 Thread Jeremy Thomerson
my guess - stateless pages - like I believe was originally mentioned in the
original thread.  your bookmarkable pages must also be stateless, which
means that the session is only temporary

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Oct 23, 2009 at 1:57 AM, Anton Veretennikov 
anton.veretenni...@gmail.com wrote:

 Why in this localhost case I see jsessionid after I press any
 *bookmarkable* link?
 Why when I *first* press *non-bookmarable* link, jsessionid disappears?
 Why when I press *bookmarkable* link and then non-bookmarkable, I see
 jsessionid remains and never removes whatever link I press?
 Is it okey, that urlFor for home page returns ./?
 Why when I remove workaround from encodeURL everything starts working?

 -- Tony

 On Fri, Oct 23, 2009 at 2:45 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  Looks like it's right.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Fri, Oct 23, 2009 at 1:38 AM, Anton Veretennikov 
  anton.veretenni...@gmail.com wrote:
 
  Yes, I see, Jeremy. You are lucky! :)
 
  Okey, I run my local Tomcat 6.0.18:
 
  I remove all localhost cookies from my browser, close it, open it
  again and enter:
  http://localhost:8084/FivePinSite-1.0-SNAPSHOT/
 
  I see JSESSIONID cookie set to localhost and path is
  /FivePinSite-1.0-SNAPSHOT. Is it right?
 
  -- Tony
 
 
  On Fri, Oct 23, 2009 at 1:27 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   You WILL see jsessionid on that server because the cookie path is not
 the
   path that the server is serving on.  Notice that the URL is
   wickettraining.com/app but when you first view a page on the site, it
  will
   set a cookie with the jsessionid that is on patch /wickettraining
 (should
  be
   /app).
  
   That's what I was trying to explain earlier.
  
   Now, look at http://www.texashuntfish.com - after the first page, you
  will
   not see the jsessionid in the URL any more - because if you notice,
 the
  URL
   is /app and the cookie is set on /app.
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
   On Fri, Oct 23, 2009 at 12:19 AM, Anton Veretennikov 
   anton.veretenni...@gmail.com wrote:
  
   Jeremy, thank you,
  
   For experiment, guys,
   Open, please, http://www.wickettraining.com and click in sequence
 these
   links:
  
   Contact Me and then
   Class Information (format, content, etc)
  
   If you see jsessionid appended to URL, please, answer:
  
   [  ] YES
   [  ] NO
  
   -- Tony
  
  
   On Thu, Oct 22, 2009 at 10:09 PM, Jeremy Thomerson
   jer...@wickettraining.com wrote:
The problem that makes jsessionid appear is nearly always related
 to
   cookies
and cookie paths.  the servlet container will try to set a cookie
 with
   the
jsessionid.  If that doesn't work, it will continue adding
 jsessionid
  to
   the
urls.  So, use HttpFox (or similar) to see when the servlet
 container
   sets a
cookie with the jsessionid, and pay attention to what path it sets
 it
  on.
Then see if your browser is sending the jsessionid back to the
  container
   on
the next request.
   
--
Jeremy Thomerson
http://www.wickettraining.com
   
   
   
On Wed, Oct 21, 2009 at 9:44 AM, Anton Veretennikov 
anton.veretenni...@gmail.com wrote:
   
1. I checked it with Tomcat 5.5. Problem remained. All my
  bookmarkable
links to Home page with parameters contained jsessionid.
   
2. I got 1.5-SNAPSHOT, compiled, tried, problem remained.
   
3. I removed lines in WebResponse::encodeURL and
ServletWebResponse::encodeURL with logic about bug in apache
 tomcat
5.5:
   
   @Override
   public String encodeURL(String url)
   {
   if (url != null)
   {
   return
httpServletResponse.encodeURL(url.toString());
   }
   return httpServletResponse.encodeURL(url);
}
   
and  miracle. jsessionid disappeared!
   
I don't know may be this workaround for 5.5 is not correct?
   
-- Tony
   
   
On Wed, Oct 21, 2009 at 10:02 PM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Strange I have tomcat 5.5 here, it does not have that problem..
  Could
   it
be
 that it's tomcat related?

 2009/10/21 Anton Veretennikov anton.veretenni...@gmail.com

 Additional info to jsessionid problem:

 This is seen on Tomcat 6.0.18 WITHOUT any proxy on bookmarkable
   links.
 Glassfish 2.1 seems not appending jsessionid to url even on
 first
   call
 (I have default settings) so there is no such behaviour.

 -- Tony

 On Wed, Oct 21, 2009 at 6:20 PM, Anton Veretennikov
 anton.veretenni...@gmail.com wrote:
  Thank you, Nino, I'll repeat then,
 
  The problem is that all Bookmarkable links continue to have
  ;jsessionid=... string even after first call. The same
 time,
  Ajax
  links 

Re: wicket:enclosure ( setting visible when hidden on render )

2009-10-23 Thread Swanthe Lindgren
Try setOutputMarkupPlaceholderTag(true) on the component withing the 
enclosure.


//Swanthe

Douglas Ferguson wrote:

I have a component that is wrapped with a wicket enclosure.

When the page is rendered I set the component visible(false) which  
make the entire wicket enclosure hidden.


Then I set visible(true) during runtime and at the component to the  
AjaxTarget.


The component is not rendered.

Is there a way to get this to work? Or do I have to explicitly add a  
markup container if i want to start with it hidden and then display  
later?


D/

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


  




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



Re: Behind proxy

2009-10-23 Thread Anton Veretennikov
I added

  @Override
  protected void onBeforeRender() {
super.onBeforeRender();
logger.info(stateless={},isStateless());
  }

to my IndexPage and it returns

INFO  - IndexPage  - stateless=false

-- Tony


On Fri, Oct 23, 2009 at 3:01 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 my guess - stateless pages - like I believe was originally mentioned in the
 original thread.  your bookmarkable pages must also be stateless, which
 means that the session is only temporary

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Fri, Oct 23, 2009 at 1:57 AM, Anton Veretennikov 
 anton.veretenni...@gmail.com wrote:

 Why in this localhost case I see jsessionid after I press any
 *bookmarkable* link?
 Why when I *first* press *non-bookmarable* link, jsessionid disappears?
 Why when I press *bookmarkable* link and then non-bookmarkable, I see
 jsessionid remains and never removes whatever link I press?
 Is it okey, that urlFor for home page returns ./?
 Why when I remove workaround from encodeURL everything starts working?

 -- Tony

 On Fri, Oct 23, 2009 at 2:45 PM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
  Looks like it's right.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Fri, Oct 23, 2009 at 1:38 AM, Anton Veretennikov 
  anton.veretenni...@gmail.com wrote:
 
  Yes, I see, Jeremy. You are lucky! :)
 
  Okey, I run my local Tomcat 6.0.18:
 
  I remove all localhost cookies from my browser, close it, open it
  again and enter:
  http://localhost:8084/FivePinSite-1.0-SNAPSHOT/
 
  I see JSESSIONID cookie set to localhost and path is
  /FivePinSite-1.0-SNAPSHOT. Is it right?
 
  -- Tony
 
 
  On Fri, Oct 23, 2009 at 1:27 PM, Jeremy Thomerson
  jer...@wickettraining.com wrote:
   You WILL see jsessionid on that server because the cookie path is not
 the
   path that the server is serving on.  Notice that the URL is
   wickettraining.com/app but when you first view a page on the site, it
  will
   set a cookie with the jsessionid that is on patch /wickettraining
 (should
  be
   /app).
  
   That's what I was trying to explain earlier.
  
   Now, look at http://www.texashuntfish.com - after the first page, you
  will
   not see the jsessionid in the URL any more - because if you notice,
 the
  URL
   is /app and the cookie is set on /app.
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
  
  
   On Fri, Oct 23, 2009 at 12:19 AM, Anton Veretennikov 
   anton.veretenni...@gmail.com wrote:
  
   Jeremy, thank you,
  
   For experiment, guys,
   Open, please, http://www.wickettraining.com and click in sequence
 these
   links:
  
   Contact Me and then
   Class Information (format, content, etc)
  
   If you see jsessionid appended to URL, please, answer:
  
   [  ] YES
   [  ] NO
  
   -- Tony
  
  
   On Thu, Oct 22, 2009 at 10:09 PM, Jeremy Thomerson
   jer...@wickettraining.com wrote:
The problem that makes jsessionid appear is nearly always related
 to
   cookies
and cookie paths.  the servlet container will try to set a cookie
 with
   the
jsessionid.  If that doesn't work, it will continue adding
 jsessionid
  to
   the
urls.  So, use HttpFox (or similar) to see when the servlet
 container
   sets a
cookie with the jsessionid, and pay attention to what path it sets
 it
  on.
Then see if your browser is sending the jsessionid back to the
  container
   on
the next request.
   
--
Jeremy Thomerson
http://www.wickettraining.com
   
   
   
On Wed, Oct 21, 2009 at 9:44 AM, Anton Veretennikov 
anton.veretenni...@gmail.com wrote:
   
1. I checked it with Tomcat 5.5. Problem remained. All my
  bookmarkable
links to Home page with parameters contained jsessionid.
   
2. I got 1.5-SNAPSHOT, compiled, tried, problem remained.
   
3. I removed lines in WebResponse::encodeURL and
ServletWebResponse::encodeURL with logic about bug in apache
 tomcat
5.5:
   
      �...@override
       public String encodeURL(String url)
       {
               if (url != null)
               {
                               return
httpServletResponse.encodeURL(url.toString());
               }
               return httpServletResponse.encodeURL(url);
        }
   
and  miracle. jsessionid disappeared!
   
I don't know may be this workaround for 5.5 is not correct?
   
-- Tony
   
   
On Wed, Oct 21, 2009 at 10:02 PM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Strange I have tomcat 5.5 here, it does not have that problem..
  Could
   it
be
 that it's tomcat related?

 2009/10/21 Anton Veretennikov anton.veretenni...@gmail.com

 Additional info to jsessionid problem:

 This is seen on Tomcat 6.0.18 WITHOUT any proxy on bookmarkable
   links.
 Glassfish 2.1 seems not appending jsessionid to url even on
 first
   call
 (I have default settings) so there is no such 

Re: wicket:enclosure ( setting visible when hidden on render )

2009-10-23 Thread Michael Mosmann
Am Freitag, den 23.10.2009, 09:25 +0200 schrieb Swanthe Lindgren:
 Try setOutputMarkupPlaceholderTag(true) on the component withing the 
 enclosure.

i think, that's not enough.. 
maybe i am wrong, but yes, you should use a markup container for this
kind of stuff.. 

 //Swanthe
 
 Douglas Ferguson wrote:
  I have a component that is wrapped with a wicket enclosure.
 
  When the page is rendered I set the component visible(false) which  
  make the entire wicket enclosure hidden.
 
  Then I set visible(true) during runtime and at the component to the  
  AjaxTarget.
 
  The component is not rendered.
 
  Is there a way to get this to work? Or do I have to explicitly add a  
  markup container if i want to start with it hidden and then display  
  later?
 
  D/
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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


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



Adding wicket components to a fixed container

2009-10-23 Thread ping ping

 

Is that possible for me to define a span container inside wicket html markup, 
such that i can add different component to that container based on different 
situation?

 

Regards
  
_
Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop

Re: Adding wicket components to a fixed container

2009-10-23 Thread Linda van der Pal
Well it should be possible (if I understand correctly what you want). 
For example I have a screen with a panel where I want to show several 
different kinds of information. I've named the panel viewdetails and 
fill it with either a panel where you can edit the details or with a 
panel where you can merely view them. If this is the kind of effect you 
are talking about, I'd be happy to mail you my code.


Regards,
Linda

ping ping wrote:
 


Is that possible for me to define a span container inside wicket html markup, 
such that i can add different component to that container based on different 
situation?

 


Regards
 		 	   		  
_

Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop
  




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.423 / Virus Database: 270.14.27/2452 - Release Date: 10/22/09 18:44:00


  



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



Re: Adding wicket components to a fixed container

2009-10-23 Thread Martijn Dashorst
see Panel or Fragment

Martijn

On Fri, Oct 23, 2009 at 10:13 AM, ping ping sping_p...@hotmail.com wrote:



 Is that possible for me to define a span container inside wicket html markup, 
 such that i can add different component to that container based on different 
 situation?



 Regards

 _
 Windows 7: Simplify what you do everyday. Find the right PC for you.
 http://windows.microsoft.com/shop



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Newbie questions regarding wicket and presentation

2009-10-23 Thread Lester Chua

Hi,

I've read the preliminary materials on the site and I'm also reading 
Manning's Wicket in Action. I like Wicket's programming model a lot and 
is considering my next project using wicket. But before that I am doing 
an evaluation project to convert an part of an existing application 
using wicket.


Question1:
Applications that I work with typically feature girds. My past approach 
had been to use ExtJS+JSON Servlets and more recently JQuery+DWR. 
Although we are quite productive, my main gripe was that there are too 
much work done wiring HTML and Server Side (which is why I much prefer 
Wicket's approach).


Is there a robust implementation on Wicket that I can use that offers 
similar functionality to things like Ext's grids or JqGrid? Or must I 
create my own grid component from scratch in Wicket? I can't seem to 
find it?


Question 2:
In my environment, security is the most important issue. In fact a proxy 
server sits between users and the servers, it changes requests ips and 
make it look like all requests originate from some ip addresses (this 
hits the web layer). Will this interfere with Wicket's state management? 
Sorry I'm very new to Wicket and may be asking a silly question, 
apologies if this has been answered on the wiki.


Question  3:
DWR prevent XSS on Ajax exploits by implementing secret-key mechanism. 
Is there a similar implementation in Wicket? Is there any best practice 
or techniques that we should use to avoid inadvertently exposing our 
ajax code to hijacking?


Thanks in advance.

Lester








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



Re: Wicket in JBoss cluster

2009-10-23 Thread Jan Grathwohl
Thanks guys, I think I understand now what's going on.

Does anyone know which configuration settings are needed for JBoss 4.2 to
make things work?



2009/10/23 Randy S. randypo...@gmail.com

 Oh I see. Thanks for the explanation.

 I can't comment on JBoss's session replication. I'm familiar with websphere
 with a DB-backed session which does not deserialize until it has to re-load
 from the DB, either because you bounced nodes or had the session expunged
 from memory due to the limit of in-memory sessions.

 On Oct 22, 2009 5:41 PM, Matej Knopp matej.kn...@gmail.com wrote:

 Not quite. On every request when page is changed and the session with
 page is replicated on cluster the receiving nodes should store the
 page to diskpagestore. This way every state of page should be saved.
 But this will only work if the container deserializes sessions
 immediately after replication.

 -Matej

 On Fri, Oct 23, 2009 at 12:00 AM, Randy S. randypo...@gmail.com wrote: 
 Are you saying that beca...

 - To
 unsubscribe, e-mail: users-...



where download inmethod datagrid

2009-10-23 Thread Roman Ilin
Hi *,

I saw some screen shots  of inmethod datagrid components.
I see some messages in this mailing list as well writing people are using them.
But I can't find it following the link to http://www.inmethod.com/ on
wicket site.

Can someone tell me how can I start using it? Docs, maven repo?

Regards

Roman

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



Re: where download inmethod datagrid

2009-10-23 Thread Linda van der Pal
It's part of wicketstuff now: 
http://wicketstuff.org/confluence/display/STUFFWEB/Home


Regards,
Linda

Roman Ilin wrote:

Hi *,

I saw some screen shots  of inmethod datagrid components.
I see some messages in this mailing list as well writing people are using them.
But I can't find it following the link to http://www.inmethod.com/ on
wicket site.

Can someone tell me how can I start using it? Docs, maven repo?

Regards

Roman

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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.423 / Virus Database: 270.14.27/2453 - Release Date: 10/23/09 06:56:00


  



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



Re: where download inmethod datagrid

2009-10-23 Thread Roman Ilin
thank you

On Fri, Oct 23, 2009 at 1:36 PM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
 It's part of wicketstuff now:
 http://wicketstuff.org/confluence/display/STUFFWEB/Home

 Regards,
 Linda

 Roman Ilin wrote:

 Hi *,

 I saw some screen shots  of inmethod datagrid components.
 I see some messages in this mailing list as well writing people are using
 them.
 But I can't find it following the link to http://www.inmethod.com/ on
 wicket site.

 Can someone tell me how can I start using it? Docs, maven repo?

 Regards

 Roman

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


 No virus found in this incoming message.
 Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database:
 270.14.27/2453 - Release Date: 10/23/09 06:56:00




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



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



When NOT to use models ?

2009-10-23 Thread Joseph Pachod

Hi

Recently, on the mailing list, I read quite some people saying basically 
than using models all over the place was a bad idea. Can someone explain 
it a bit more ?


Indeed, I was kind of agreeing until recently, when I had an issue with 
a (self made) Behavior taking a string.


I needed this string to be refresh on each page display... So what to do 
then ? Introduce a model to be able to use LoadableDetachableModel if 
needed (and maybe still providing a convenience method from string to 
modelString).


So, since, I'm kind of thinking that as soon that you do a reusable 
component, you should use models if data is needed. The only proper 
use case I could think of for not using a model is through a convenience 
method or for a local only component. And even that is doubtful, I've 
already rewritten some locally used component then to a Model (instead 
of the initial string)...


As such, in the end, using a model looks like a warranty against future 
changes.


Do I miss some use cases ?

thanks in advance
joseph

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



Is it possible to setup a Wicket project without Maven?

2009-10-23 Thread Lester Chua

Hi,

Is it possible to have just an ANT build.xml for a Wicket project?

Lester

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



Problem with wicket:extend / wicket:child and ListView on not visible component

2009-10-23 Thread Ann Baert
I have a problem with inheritance from panels with listview on a not 
visible component.
I think it's a bug, so I've made a jira issue for it with more explanation 
and an example:
https://issues.apache.org/jira/browse/WICKET-2537

Ann
 DISCLAIMER 
A HREF=http://www.tvh.be/newen/pages/emaildisclaimer.html;
http://www.tvh.be/newen/pages/emaildisclaimer.html /A

This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message.


Re: When NOT to use models ?

2009-10-23 Thread Martin Makundi
Hi!

I have said that you might need to cache your model values, in some
performance situations. If you do not use models, you do not need same
kind of caching (because the value is fixed). Nevetheless, using
models results in cleaner code, but I am dreaming of a centralized
caching mechanism such that each model value would be evaluated only
one time per render / model change.

t. Martin

2009/10/23 Joseph Pachod j...@thomas-daily.de:
 Hi

 Recently, on the mailing list, I read quite some people saying basically
 than using models all over the place was a bad idea. Can someone explain it
 a bit more ?

 Indeed, I was kind of agreeing until recently, when I had an issue with a
 (self made) Behavior taking a string.

 I needed this string to be refresh on each page display... So what to do
 then ? Introduce a model to be able to use LoadableDetachableModel if needed
 (and maybe still providing a convenience method from string to
 modelString).

 So, since, I'm kind of thinking that as soon that you do a reusable
 component, you should use models if data is needed. The only proper use
 case I could think of for not using a model is through a convenience method
 or for a local only component. And even that is doubtful, I've already
 rewritten some locally used component then to a Model (instead of the
 initial string)...

 As such, in the end, using a model looks like a warranty against future
 changes.

 Do I miss some use cases ?

 thanks in advance
 joseph

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



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



Re: Is it possible to setup a Wicket project without Maven?

2009-10-23 Thread Martijn Dashorst
See the free chapter 15 from Wicket in Action:
http://wicketinaction.com/downloads

Martijn

On Fri, Oct 23, 2009 at 12:57 PM, Lester Chua cicob...@gmail.com wrote:
 Hi,

 Is it possible to have just an ANT build.xml for a Wicket project?

 Lester

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: Is it possible to setup a Wicket project without Maven?

2009-10-23 Thread Lester Chua
Thanks! That was exactly what I was looking for.

On Fri, Oct 23, 2009 at 8:07 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 See the free chapter 15 from Wicket in Action:
 http://wicketinaction.com/downloads

 Martijn

 On Fri, Oct 23, 2009 at 12:57 PM, Lester Chua cicob...@gmail.com wrote:
  Hi,
 
  Is it possible to have just an ANT build.xml for a Wicket project?
 
  Lester
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.4 increases type safety for web applications
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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




Multiple AttributeModifier-s on a single tag

2009-10-23 Thread zabian

Hi there,
I'm trying to add two AttributeModifiers on WebMarkupContainer and it 
doesn't work.

Only one of them is working, the last added one.
Could anybody show me how to do it properly?

Regards,
Wojtek

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



Which assertions are possible for wicket:message?

2009-10-23 Thread Per Newgro
Hi,

i would like to test availability of components added in markup by usage of 
wicket:message attribute. assertLabel is unusable. What else can i do? I 
didn't found a hint after searching list and google.

Thanks
Per
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

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



Re: wicket:enclosure ( setting visible when hidden on render )

2009-10-23 Thread James McLaughlin
.


 Then I set visible(true) during runtime and at the component to the
 AjaxTarget.

 The component is not rendered.

 Is there a way to get this to work?



Add the parent component that contains the wicket:enclosure markup to the
AjaxRequestTarget.


Re: When NOT to use models ?

2009-10-23 Thread Michael Mosmann
Am Freitag, den 23.10.2009, 15:06 +0300 schrieb Martin Makundi:
 Hi!
 
 I have said that you might need to cache your model values, in some
 performance situations. If you do not use models, you do not need same
 kind of caching (because the value is fixed). Nevetheless, using
 models results in cleaner code, but I am dreaming of a centralized
 caching mechanism such that each model value would be evaluated only
 one time per render / model change.

evaluated only one time per render can be done with
LoadableDetachedModel .. 

or do i miss some point?

can you explain it a littly bit (a link to your original message?)

mm:)



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



Re: Multiple AttributeModifier-s on a single tag

2009-10-23 Thread Michael Mosmann
Hi,

 I'm trying to add two AttributeModifiers on WebMarkupContainer and it 
 doesn't work.
 Only one of them is working, the last added one.
 Could anybody show me how to do it properly?

maybe you should use AttributeAppender, not AttributeModifier

mm:)



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



Re: Which assertions are possible for wicket:message?

2009-10-23 Thread richardwilko

Hi,

You could use tester.getServletResponse().getDocument() (where tester is
your wicket tester instance)

which returns the html of the processed page as a string.  Then you could
test if this string contains the required text.

Hope that helps,

Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com



Newgro wrote:
 
 Hi,
 
 i would like to test availability of components added in markup by usage
 of wicket:message attribute. assertLabel is unusable. What else can i
 do? I didn't found a hint after searching list and google.
 
 Thanks
 Per
 -- 
 GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
 Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/Which-assertions-are-possible-for-wicket%3Amessage--tp26026074p26026854.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: Multiple AttributeModifier-s on a single tag

2009-10-23 Thread Michael O'Cleirigh

Hi Wojtek,

Use the SimpleAttributeAppender  from wicketstuff-misc:
org.wicketstuff.misc.behaviors.SimpleAttributeAppender

Here is the maven dependency detail:

  dependency
   groupIdorg.wicketstuff/groupId
   artifactIdmisc/artifactId
   version1.4-SNAPSHOT/version
   /dependency

Regards,

Mike


I'm trying to add two AttributeModifiers on WebMarkupContainer and it 
doesn't work.

Only one of them is working, the last added one.
Could anybody show me how to do it properly?

Regards,
Wojtek

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




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



Date Validation - message formatting

2009-10-23 Thread Jeffrey Schneller
I looked around and saw various discussions on how to format the date
for the error message in the DateValidator.  Was there a fix for this?

 

I am using DateValidator.minimum and I would like the date that is the
minimum to be formatted with just MMM-dd- or dd-MMM- based on
the locale.  Is there a way to do this with the DateValidator.minimum as
it is today [1.4.1]

 

Thanks.

 



Re: AjaxFallbackLink problem on Internet Explorer 6

2009-10-23 Thread Dane Laverty
Yeah, now that I look at it again, that would throw an error. Instead of
showAllLink.setOutputMarkupId(true), it needs
showAllSpan.setOutputMarkupId(true) and
showMineSpan.setOutputMarkupId(true).

When you make display changes in an Ajax method, Wicket updates the Java
objects' attributes, but the HTML on the page doesn't know that it needs to
change. In order to tell the HTML components to change, they need to be
added to the target (as you've done here). However, Wicket can only identify
the correct HTML components if their ID attributes are set, which we
accomplish through setOutputMarkupId(true).

For those same reasons, I doubt that calling
replacement.setOutputMarkupId(true) will do anything for you inside of the
Ajax call, since the Wicket can't set its ID value unless it already knows
its ID value (kind of a circular problem). That's why you need to call
setOutputMarkupId(true) for any Ajax-updatable objects in the initial page
rendering (say, in the constructor).

Dane

On Thu, Oct 22, 2009 at 10:03 PM, Swarnim Ranjitkar swarn...@hotmail.comwrote:


 Thank you for you suggestion. It didn't really work. Looks like the
 setvisible inside  onclick doesn't work . Here is the code that I have
  //this.replaceWith(replacement);
replacement.setOutputMarkupId(true);
datatable.replaceWith(replacement);
showMineSpan.setVisible(true);
showAllSpan.setVisible(false);
 showMineSpan.setOutputMarkupId(true);
showAllSpan.setOutputMarkupId(true);
 target.addComponent(showMineSpan);
target.addComponent(showAllSpan);
 target.addComponent(replacement);

}
};
showAllLink.setOutputMarkupId(true);



  Date: Thu, 22 Oct 2009 18:05:46 -0700
  Subject: Re: AjaxFallbackLink problem on Internet Explorer 6
  From: danelave...@gmail.com
  To: users@wicket.apache.org
 
  You need to add the spans to the target in onClick, and the links need to
  have their outputMarkupId set to true, as follows (I've added the ***
  lines):
 
  final Link showMineLink =new AjaxFallbackLink(trafficreportlistmine) {
public void onClick(AjaxRequestTarget target) {
   AjaxFallbackDefaultDataTable replacement = new
  AjaxFallbackDefaultDataTable(trafficreportlistdatatable, columns, new
  ReportListProvider(Traffic, mine), 8);
  //this.replaceWith(replacement);
  replacement.setOutputMarkupId(true);
  datatable.replaceWith(replacement);
  showMineSpan.setVisible(true);
  showAllSpan.setVisible(false);
  target.addComponent(replacement);
  ***target.addComponent(showMineSpan);
  ***target.addComponent(showAllSpan);
}
  };
  *** showMineLink.setOutputMarkupId(true);
 
  Then do the same with the other link.
 
  Dane
 
 
  On Thu, Oct 22, 2009 at 4:42 PM, wicketnewuser swarn...@hotmail.com
 wrote:
 
  
   It's suppose to hide Show All and show Show Mine when I click on Show
 All
   but
   that doesn't happen. on the onclick of showmine it is supposed to be
  showMineSpan.setVisible(false);
  showAllSpan.setVisible(true);
   instead of  what I listed earlier as
   showMineSpan.setVisible(true);
  showAllSpan.setVisible(false);
  
  
   wicketnewuser wrote:
   
Hi tried to follow this and having problem with it . Could someone
 please
let me know what I'm doing wrong
Here is the code
package com.swishmark.tugboat;
   
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
   
import org.apache.wicket.PageParameters;
import org.apache.wicket.Session;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
import
   
  
 org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
import
   
  
 org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import
org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import
   
  
 org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
   
import com.swishmark.tugboat.util.DateTimePropertyColumn;
import com.swishmark.tugboat.util.LinkPropertyColumn;
import com.swishmark.tugboat.util.ReportListProvider;
import com.swishmark.tugboat.util.TugboatReport;
   
//
 

Re: Multiple AttributeModifier-s on a single tag

2009-10-23 Thread zabian

Sorry for the mess, my fault of course.
It was working from the beginning, just my css was not in the scope and 
I couldn't see any results.


Sorry once again and thanks for commitment.

Regards,
Wojtek

Michael O'Cleirigh pisze:

Hi Wojtek,

Use the SimpleAttributeAppender  from wicketstuff-misc:
org.wicketstuff.misc.behaviors.SimpleAttributeAppender

Here is the maven dependency detail:

  dependency
   groupIdorg.wicketstuff/groupId
   artifactIdmisc/artifactId
   version1.4-SNAPSHOT/version
   /dependency

Regards,

Mike


I'm trying to add two AttributeModifiers on WebMarkupContainer and it 
doesn't work.

Only one of them is working, the last added one.
Could anybody show me how to do it properly?

Regards,
Wojtek

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




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




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



Re: Date Validation - message formatting

2009-10-23 Thread Igor Vaynberg
no, there isnt. not that i can see anyways. you will have to roll your
own validator and convert the date into a string however you see fit.
also, please add an rfe to have this fixed.

-igor

On Fri, Oct 23, 2009 at 7:09 AM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 I looked around and saw various discussions on how to format the date
 for the error message in the DateValidator.  Was there a fix for this?



 I am using DateValidator.minimum and I would like the date that is the
 minimum to be formatted with just MMM-dd- or dd-MMM- based on
 the locale.  Is there a way to do this with the DateValidator.minimum as
 it is today [1.4.1]



 Thanks.





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



Exceptions in MyApplication.init()

2009-10-23 Thread Tomás Rossi

Hey people,

I've noted that if an exception occurs during the execution of init 
method of MyApplication (which extends WebApplication), a SERVICE 
UNAVAILABLE (error 503) page shows. We'd like to have our own error page 
for this case and figured out a workaround which includes catching and 
saving the exception in the init method, setting some state and then 
handling it later...

But, what is the Wicket way of doing this?

Thanks in advance,
--
Tom;



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



Re: Exceptions in MyApplication.init()

2009-10-23 Thread Josh Glassman
There is a wiki page with information on creating custom error pages.

http://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html

Hopefully that is what you are looking for!

Josh

On Fri, Oct 23, 2009 at 12:34 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
 Hey people,

 I've noted that if an exception occurs during the execution of init method
 of MyApplication (which extends WebApplication), a SERVICE UNAVAILABLE
 (error 503) page shows. We'd like to have our own error page for this case
 and figured out a workaround which includes catching and saving the
 exception in the init method, setting some state and then handling it
 later...
 But, what is the Wicket way of doing this?

 Thanks in advance,
 --
 Tom;



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



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



Re: Exceptions in MyApplication.init()

2009-10-23 Thread Pedro Santos
The init method is called by the wicket servlet filter. If it throw an
exception the web container will not place the filter into service, than the
request will not be handled by wicket.

On Fri, Oct 23, 2009 at 3:26 PM, Josh Glassman josh...@gmail.com wrote:

 There is a wiki page with information on creating custom error pages.

 http://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html

 Hopefully that is what you are looking for!

 Josh

 On Fri, Oct 23, 2009 at 12:34 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
  Hey people,
 
  I've noted that if an exception occurs during the execution of init
 method
  of MyApplication (which extends WebApplication), a SERVICE UNAVAILABLE
  (error 503) page shows. We'd like to have our own error page for this
 case
  and figured out a workaround which includes catching and saving the
  exception in the init method, setting some state and then handling it
  later...
  But, what is the Wicket way of doing this?
 
  Thanks in advance,
  --
  Tom;
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




-- 
Pedro Henrique Oliveira dos Santos


Re: Exceptions in MyApplication.init()

2009-10-23 Thread Tomás Rossi

That's what we suspected. So we stick with our workaround.

Thanks

Pedro Santos escribió:

The init method is called by the wicket servlet filter. If it throw an
exception the web container will not place the filter into service, than the
request will not be handled by wicket.

On Fri, Oct 23, 2009 at 3:26 PM, Josh Glassman josh...@gmail.com wrote:

  

There is a wiki page with information on creating custom error pages.

http://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html

Hopefully that is what you are looking for!

Josh

On Fri, Oct 23, 2009 at 12:34 PM, Tomás Rossi tro...@mecon.gov.ar wrote:


Hey people,

I've noted that if an exception occurs during the execution of init
  

method


of MyApplication (which extends WebApplication), a SERVICE UNAVAILABLE
(error 503) page shows. We'd like to have our own error page for this
  

case


and figured out a workaround which includes catching and saving the
exception in the init method, setting some state and then handling it
later...
But, what is the Wicket way of doing this?

Thanks in advance,
--
Tom;



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


  

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






  



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



Re: Component parent null after replace

2009-10-23 Thread Pedro Santos
referenceToDatabaseParentComponent.replace(replacement)
you has an reference to referenceToDatabaseParentComponent, right?

On Fri, Oct 23, 2009 at 4:05 AM, wicketnewuser swarn...@hotmail.com wrote:


 Hi I have similiar situation but i'm using autonomous  inner class
final AjaxFallbackDefaultDataTable datatable = new
 AjaxFallbackDefaultDataTable(trafficreportlistdatatable, columns, new
 ReportListProvider(Traffic, include), 8);
add(datatable);
final WebMarkupContainer showMineSpan = new
 WebMarkupContainer(showMineSpan);
final WebMarkupContainer showAllSpan = new
 WebMarkupContainer(showAllSpan);
  final Link showAllLink = new
 AjaxFallbackLink(trafficreportlistshowall) {
public void onClick(AjaxRequestTarget
 target) {
AjaxFallbackDefaultDataTable
 replacement = new
 AjaxFallbackDefaultDataTable(trafficreportlistdatatable, columns, new
 ReportListProvider(Traffic, all), 8);
//this.replaceWith(replacement);
replacement.setOutputMarkupId(true);

datatable.replaceWith(replacement);

 I can't do datatable = replacement as datatable has to be final in my case
 as i'm using it in the anonymous  inner class. Do you know if there is any
 solution to this. Would appreciate your help



 igor.vaynberg wrote:
 
  heh, seems a lot of people run into it. the short is that you have to do
  this:
 
  lets say you have a ref to the panel: private Panel panel;
 
  what you do is this:
  panel.replaceWith(new Panel());
 
  and then later again
  panel.replaceWith(new Panel());
 
  ^ the second time will fail beause you have removed panel from hierarchy
  already - you replaced it with another panel.
 
  the proper way to do it is to keep the reference up to date, so
  Panel temp=new Panel();
  panel.replaceWith(temp);
  panel=temp;
 
  that way when it happens the second time it will properly act on the new
  panel that is inside the hierarchy now.
 
  -igor
 
 
 
 
  On 9/9/07, Anthony Schexnaildre apsch...@gmail.com wrote:
 
  I am trying to create a link that will replace one panel with another
  on the page. This seems as though it should be an easy task but after
  many attempts and searching the net for examples I have yet to get it
  working so the replacement can happen more than one without the
  component becoming orphaned. On the second replace attempt i get the
  following exception. Anyone have the solution?
 
  Thank you,
 
  Anthony
 
 
  java.lang.IllegalStateException: This method can only be called on a
  component that has already been added to its parent.
at org.apache.wicket.Component.replaceWith(Component.java:2266)
at com.pinwise.pinbase.web.components.links.SecurePanelLink
  $4.onClick(SecurePanelLink.java:142)
at org.apache.wicket.markup.html.link.Link.onLinkClicked
  (Link.java:222)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.wicket.RequestListenerInterface.invoke
  (RequestListenerInterface.java:186)
 
 
  =
 
  =
 
  public UserPanel(String id) {
  super(id);
 
 
  UserFormPanel userFormPanel = new
  UserFormPanel(userFormPanel);
  add( userFormPanel );
 
  ListIColumn columns = new ArrayListIColumn();
  final Model m = new Model(userFormPanel);
   columns.add(new PropertyColumn(new Model(Actions), id)
   {
  public void populateItem(Item cellItem, String
  componentId, final
  IModel model)
   {
  EditActionPanel panel = new
  EditActionPanel(componentId, model);
  panel.add(
  SecurePanelLink.createSecurePanelLink( edit, m,
  UserFormPanel.class, model ) );
 cellItem.add( panel );
   }
   });
 
   columns.add(new PropertyColumn(new Model(Username),
  username, username));
   columns.add(new PropertyColumn(new Model(First Name),
  firstName, firstName));
   columns.add(new PropertyColumn(new Model(Last Name),
  lastName, lastName));
 
   add(new DefaultDataTable(table, columns, new
  SortableUserDataProvider(), 10));
  }
 
 
  
  SecurePanelLink
  
  public class SecurePanelLink extends Link implements ISecureComponent {
 
  /**
   *
   */
  private static final long serialVersionUID = 1L;
 
  protected IPanelLink panelLink;
 
  /**
   * @param id
   * @param c
   */
  public SecurePanelLink(String id, final Class c)
  {
  super(id);
  // 

refreshing AjaxFallbackDefaultDataTable

2009-10-23 Thread Swarnim Ranjitkar

If I attach AjaxSelfUpdatingTimerBehavior to  AjaxFallbackDefaultDataTable 
should it refresh   AjaxFallbackDefaultDataTable at the set interval. Is it 
possible to refresh datatable every 10 sec using this. Looks like it refreshes 
the datatable but it doesn't call ReportListProvider to refresh the data before 
it refreshes the datatable. could you please let me know what is the best way 
to do this.


 final AjaxFallbackDefaultDataTable datatable = new 
AjaxFallbackDefaultDataTable(listdatatable, columns, new 
ReportListProvider(ABC, true), 8);

datatable.add(new 
AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget 
target) {
 System.out.println(called);
}
}); 
thank you
 
  

Re: refreshing AjaxFallbackDefaultDataTable

2009-10-23 Thread Pedro Santos
protected void onPostProcessTarget(AjaxRequestTarget target) {
  referenceToReportListProvider.updateIt(conditions);
}


On Fri, Oct 23, 2009 at 4:53 PM, Swarnim Ranjitkar swarn...@hotmail.comwrote:


 If I attach AjaxSelfUpdatingTimerBehavior to  AjaxFallbackDefaultDataTable
 should it refresh   AjaxFallbackDefaultDataTable at the set interval. Is it
 possible to refresh datatable every 10 sec using this. Looks like it
 refreshes the datatable but it doesn't call ReportListProvider to refresh
 the data before it refreshes the datatable. could you please let me know
 what is the best way to do this.


  final AjaxFallbackDefaultDataTable datatable = new
 AjaxFallbackDefaultDataTable(listdatatable, columns, new
 ReportListProvider(ABC, true), 8);

datatable.add(new
 AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget
 target) {
 System.out.println(called);
}
});
 thank you






-- 
Pedro Henrique Oliveira dos Santos


Nested panel and Exception Attempted to set property value on a null object

2009-10-23 Thread Tomás Rossi

Hi again,

I get the following error message:

Attempted to set property value on a null object. Property expression: 
aspectoRapidez Value: 4


I have a page with a nested stateless form, which has some fields and a 
couple of instances of a panel (with radio groups inside, each).
I submit the form the first time, everything's ok. Then I hit the back 
button, submit it again and get the error message above.


I searched google and found some guy with a similar problem with a 
nested panel. He did the following inside the panel:


public void updateModel() {} // Override the deafult updateModel for the 
panel


I did the same in my own nested panel and the problem was solved. But I 
can't live if a don't know what the hell is happening :(


Here is the relevant code:

The panel to which I had to override updateModel:
http://pastebin.com/m6668ffa6

The page code with the nested form which includes the panel above:
http://pastebin.com/m2a86846b

The object models:
http://pastebin.com/m21e25e8



Thanks in advance,
Tom;


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



Wicket at Devoxx!

2009-10-23 Thread Martijn Dashorst
If you wish to learn more about Wicket, and happen to be living near
Antwerp, Belgium, or wanting to attend a kick ass conference, you'll
be happy to know that I've been invited to do a university talk (3
hours of Wicket in action) [1] and a general session [2] at Devoxx
2009.

The university talk is scheduled on Tuesday November 17th, and the
general session on Thursday November 19th.

You can find out more abou the conference at http://devoxx.com

I will also have a book signing session after both talks at the booth
of the Bookstore. Get your copy of Wicket in Action signed!

See you there!

Martijn

[1] http://devoxx.com/display/DV09/Introducing+Apache+Wicket
[2] http://devoxx.com/display/DV09/Wicket+in+Action

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



Wicket 1.4.3 Released!

2009-10-23 Thread Igor Vaynberg
release tag: https://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.3

download: http://www.apache.org/dyn/closer.cgi/wicket/1.4.3

changelog: https://issues.apache.org/jira/browse/WICKET/fixforversion/12314250
( full release notes below )

maven:

dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4.3/version
/dependency

thank you.

-igor

ps. our website has not yet been updated with the release
announcement, something is broken with the confluence publishing
plugin.

---

Release Notes - Wicket - Version 1.4.3

** Bug
   * [WICKET-2348] - always insert encoding in http response header
   * [WICKET-2436] - invalid DataTable markup breaks table layout
   * [WICKET-2497] - AutoComplete textfield ignores visible
property within hierarchy.
   * [WICKET-2501] - BaseWicketTester clickLink calls onBeginRequest two times.
   * [WICKET-2505] - Button.onSubmit javadoc is misleading
   * [WICKET-2506] - Regression: Could not find child with id: ID
in the wicket:enclosure for non-component tag
   * [WICKET-2507] - Inconsistent resource path using wicket:link
and HeaderContributor after second request
   * [WICKET-2508] - NullPointerException in
BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:96)
   * [WICKET-2513] - wicket:enclosure does not work if child is a
container and not a component (regression from 1.4.1)
   * [WICKET-2516] - Javadoc for Component.getMarkupId is incorrect
   * [WICKET-2518] - Application_bg.properties property file is
incorrectly encoded
   * [WICKET-2520] - Use of Object instead of generic T in
StringAutoCompleteRenderer
   * [WICKET-2522] - Easy fix suggestion: In BaseWicketTester
'IFormSubmitting' component should be the submitting component, not
just a 'Button'
   * [WICKET-2525] - DatePicker consume too much memory
   * [WICKET-2527] - wicket:enclosure child attribute search path has changed
   * [WICKET-2528] - CheckBoxMultipleChoice ignores isDisabled() checks
   * [WICKET-2530] - Class not found when using OSGI class loader

** Improvement
   * [WICKET-2344] - Performance improvement: more efficient
AnnotProxyFieldValueFactory cache
   * [WICKET-2459] - Add new German Wicket Book
   * [WICKET-2511] - Upgrade to SLF4J version 1.5.8
   * [WICKET-2524] - Configurable Throttle delay for AutoCompleteBehavior

** Wish
   * [WICKET-2468] - AjaxLazyLoadPanel do not respect especific
projects components configuration
   * [WICKET-2515] - ModalWindow javadoc improvent

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



using wicket ajax to add components containing javascript

2009-10-23 Thread Jason Novotny


Hi,

   I'm using AjaxLinks all over the place to refresh a container that 
contains custom components that themselves also use javascript. So what 
happens is  when I do target.add(myCustomComponent) that the javascript 
is not really in the page, its in the rendered markup so it often just 
doesn't work. Has anyone else had this problem or knows of a way to deal 
with it? Maybe I should put all the components javascript  as an include 
at the top, but I was hoping to keep it self-contained with the 
component itself for maximum reusability.


   Thanks, Jason

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



Re: Newbie questions regarding wicket and presentation

2009-10-23 Thread Lester Chua

Thanks!

Regards,

Lester

Jeremy Thomerson wrote:

Answers inline.

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Oct 23, 2009 at 3:48 AM, Lester Chua cicowic...@gmail.com wrote:

  

Hi,

I've read the preliminary materials on the site and I'm also reading

Manning's Wicket in Action. I like Wicket's programming model a lot and is
considering my next project using wicket. But before that I am doing an
evaluation project to convert an part of an existing application using
wicket.

Question1:
Applications that I work with typically feature girds. My past approach had
been to use ExtJS+JSON Servlets and more recently JQuery+DWR. Although we
are quite productive, my main gripe was that there are too much work done
wiring HTML and Server Side (which is why I much prefer Wicket's approach).

Is there a robust implementation on Wicket that I can use that offers
similar functionality to things like Ext's grids or JqGrid? Or must I create
my own grid component from scratch in Wicket? I can't seem to find it?

I think the Inmethod Grid is the most robust grid implementation available


for Wicket.  Check it out.


  

Question 2:
In my environment, security is the most important issue. In fact a proxy
server sits between users and the servers, it changes requests ips and make
it look like all requests originate from some ip addresses (this hits the
web layer). Will this interfere with Wicket's state management? Sorry I'm
very new to Wicket and may be asking a silly question, apologies if this has
been answered on the wiki.




Wicket relies on the servlet container for sessions - the servlet container
uses jsessionid cookies just like any other servlet.  So, no, IPs will not
effect Wicket sessions.


  

Question  3:
DWR prevent XSS on Ajax exploits by implementing secret-key mechanism. Is
there a similar implementation in Wicket? Is there any best practice or
techniques that we should use to avoid inadvertently exposing our ajax code
to hijacking?

It's very hard to hijack Wicket URLs at all (ajax or not) because they are


all session relative.  Especially ajax URLs are not action oriented (i.e.
/posts/delete?id=foo) but are session path oriented.


  

Thanks in advance.

Lester








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





  



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



Re: using wicket ajax to add components containing javascript

2009-10-23 Thread Pedro Santos
I think it is related:

http://markmail.org/search/?q=list%3Aorg.apache.wicket.users+from%3A%22Pedro+Santos%22+ajaxrequesttarget+date%3A200909+#query:list%3Aorg.apache.wicket.users%20from%3A%22Pedro%20Santos%22%20ajaxrequesttarget%20date%3A200909%20+page:1+mid:vuen2437dyh6a5tw+state:results

On Fri, Oct 23, 2009 at 8:45 PM, Jason Novotny jason.novo...@gmail.comwrote:


 Hi,

   I'm using AjaxLinks all over the place to refresh a container that
 contains custom components that themselves also use javascript. So what
 happens is  when I do target.add(myCustomComponent) that the javascript is
 not really in the page, its in the rendered markup so it often just doesn't
 work. Has anyone else had this problem or knows of a way to deal with it?
 Maybe I should put all the components javascript  as an include at the top,
 but I was hoping to keep it self-contained with the component itself for
 maximum reusability.

   Thanks, Jason

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




-- 
Pedro Henrique Oliveira dos Santos


Wicket Wizard Functionality (Extensions)

2009-10-23 Thread Corbin, James
I am writing a two step wizard using wicket's wizard implementation and
having some issues.

 

I am using Wicket 1.4.1.

 

My first wizard step contains a RadioChoice with 3 options. 

 

I would like the Finish Button to be enabled on Wizard Step 1 if either
the first or second radio choice is selected.  Also, if the first or
second radio is selected, then the next button should not be enabled.

 

If the 3rd Radio Choice is selected, then I want the Finish Button to be
DISABLED, and the next button to be enabled so the user can go to the
final step.

 

My question

 

I'm not sure how to set this up in wicket's wizard implementation.  I
tried specifying an ICondition on step two, to only make that step
available if the selected type is Radio Choice Option 3 from step one,
but Wicket's implementation seems to only evaluate the condition at step
creation and not when I'm changing the state of my radios.

 

I'm hoping I can do this without implementing my own IWizardListener.

 

NOTE: I noticed the Wicket Wizard Examples that are online do not
function properly.  I went through the whole NewUserWizard and the
Finish button was never enabled.

 

Ideas?

_

IQNavigator has relocated to new offices. Our telephone numbers remain
the same. Our new address is:

IQNavigator

6465 Greenwood Plaza Blvd Suite 800

Centennial, CO 80111

303-563-1500

 



Re: When NOT to use models ?

2009-10-23 Thread Martin Makundi
 evaluated only one time per render can be done with
 LoadableDetachedModel ..

I do not mean LOADED once per render. I mean EVALUATED once per
render. In my understanding LoadableDetachableModel does not guarantee
reset in any particular stage.

 can you explain it a littly bit (a link to your original message?)

I mean for rexample I have many models like this:

new AbstractReadOnlyModelString() {
   public String getObject() {
  // evaluate message with some logic
  return message;
   }
}

Furthermore, I have several components that, say, depend on this
value. This getObject() will be called many times durung render and
the logic will be evaluated many times.

If I make it detachable it will yes be detached but I am not sure that
the detaching is guaranteed at some specific point in request cycle?

To make my use case more clear I will give an example: say I have a
wicket page with a panel that contains a table with columns rows and y
rows. Furthermore, let's assume it is a spreadsheet emulator: you can
write formulas into the cells that depend on the other cells which
means that the value of each cell is recursively evaluated dependent
on the other cell's values.

Requirements:
1. During render time each cell's model value should be cached once it
has been evaluated (we do not want to recurse many times to fetch the
same value).
2. If the value of any cell changes, all the dependent cells should be
(for example) ajax refreshed and re-evaluated. For simplicity, we
could re-set the cache of all models when change occurs. And
redraw-all.
3. We want to reset cache ONLY if change occurs.

In my understanding requirement 3 cannot be directly reached with
detachable models.

**
Martin


 mm:)



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



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



Proposal: Fake implementation of AjaxRequestTarget instead of null

2009-10-23 Thread Vladimir Kovalyuk
I believe all those null-checks of request target can be omited in user code
if fallback components would provide fake implementation of
AjaxRequestTarget instead of passing null.

Does it make sense?