Re: How to Create a link in a treeview

2008-04-09 Thread ouss


No one can help me ?
-- 
View this message in context: 
http://www.nabble.com/How-to-Create-a-link-in-a-treeview-tp16557773p16580102.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]



ListView with images and getting absolut path

2008-04-09 Thread unka_hahrry

I want that all image files in a given directory are shown on my site so that
the admin can simply add/delete image files by editing the directory. So I
do this with ListView:

ImgListView imgListView = new ImgListView(listImageData, new
LoadableDetachableModel()
{
protected Object load()
{
Folder folder = new
Folder(D:/wicketex/Kunsthaus/context/WEB-INF/classes/ueberuns/images1);
return Arrays.asList(folder.listFiles());
}
});
add(imgListView);

So my first problem is: how can I get the absolut path for my Folder?

The images are added in the following way:

public ImgListView(String name, final IModel files)
{
super(name, files);
}
protected void populateItem(ListItem listItem)
{
final File file = (File)listItem.getModelObject();
Resource resource = new WebResource() {

public IResourceStream getResourceStream() {
IResourceStream stream = new FileResourceStream(file);
return stream;
}
};
Image image = new Image(imageFile, resource);
image.add(new SimpleAttributeModifier(class, bildlinks));
listItem.add(image);
}
}

Is there a better way of adding the src to my image component?

Thank you for your help!
-- 
View this message in context: 
http://www.nabble.com/ListView-with-images-and-getting-absolut-path-tp16580373p16580373.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: WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-09 Thread Daniel Stoch
I've created JIRA issue for this (with quickstart-app):
WICKET-1500: https://issues.apache.org/jira/browse/WICKET-1500

--
Daniel

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



[announce] Wicket 1.3 has been branched, trunk is now 1.4

2008-04-09 Thread Martijn Dashorst
If you are depending on trunk and build your own Wicket versions,
please note that trunk is now Wicket 1.4 and will be used for the next
Wicket version.

If you wish to continue building 1.3 jars then switch your local checkout to:

svn switch https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x

Martijn

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



Re: ListView with images and getting absolut path

2008-04-09 Thread Igor Vaynberg
there are RequestUtils that can convert a wicket relative url to an
absolute one, if thats what you are asking.

there is no better way for you to get the src because direct access to
WEB-INF is not allowed, so you do have to stream it using a middleman
such as Image component instead of having the container stream it
directly.

-igor


On Tue, Apr 8, 2008 at 11:24 PM, unka_hahrry [EMAIL PROTECTED] wrote:

  I want that all image files in a given directory are shown on my site so that
  the admin can simply add/delete image files by editing the directory. So I
  do this with ListView:

  ImgListView imgListView = new ImgListView(listImageData, new
  LoadableDetachableModel()
 {
 protected Object load()
 {
 Folder folder = new
  Folder(D:/wicketex/Kunsthaus/context/WEB-INF/classes/ueberuns/images1);
 return Arrays.asList(folder.listFiles());
 }
 });
 add(imgListView);

  So my first problem is: how can I get the absolut path for my Folder?

  The images are added in the following way:

 public ImgListView(String name, final IModel files)
 {
 super(name, files);
 }
 protected void populateItem(ListItem listItem)
 {
 final File file = (File)listItem.getModelObject();
 Resource resource = new WebResource() {

 public IResourceStream getResourceStream() {
 IResourceStream stream = new FileResourceStream(file);
 return stream;
 }
 };
 Image image = new Image(imageFile, resource);
 image.add(new SimpleAttributeModifier(class, bildlinks));
 listItem.add(image);
 }
 }

  Is there a better way of adding the src to my image component?

  Thank you for your help!
  --
  View this message in context: 
 http://www.nabble.com/ListView-with-images-and-getting-absolut-path-tp16580373p16580373.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Submit a form and ignore nested forms

2008-04-09 Thread Johan Compagner
That sounds like a bug can you open an issue in jira?

On 4/9/08, AshleyAbraham [EMAIL PROTECTED] wrote:

 Hi everyone,
 I have a question regarding IFormVisitorParticpant, I implement
 IFormVisitorParticpant in a panel where my nested form resides,  the form
 has formcomponents which are set to required. When the processChildren() is
 set to return false everything works as normall, none of the formcomponents
 are visited. But, when I add a IFormValidator to my nested form, the root
 form somehow validates the validator which I add to the nested/sub form. Is
 this how its suppose to work? how can I make the root form not to validate
 the sub form's validator? I really appreciate your response... thanks

 Ashley



 AshleyAbraham wrote:
 
  Igor,
  Thank u for your fast response...
 
  Thanks again,
  Ashley
 
 
 
  Pills wrote:
 
  Hi everybody,
 
  I'm using nested forms in my web app to provide to the user a simple way
  for editting a product and its stock state at the same time (PRODUCTS and
  STOCKS are bound with a relation 1-n in my database). So I've defined a
  form for each of my tables.
 
  When I submit a nested form (in this case, the form STOCK), Wicket
  doesn't care about the master form (PRODUCTS) and that's fine. But when I
  submit the master form, Wicket does the validation of all the nested
  forms, and obviously it failed because the nested forms aren't filled...
 
  How can I tell to Wicket to ignore the nested forms when submitting
  theire parent? I won't use the setDefaultFormProcessing(false), because
  it forces me to handle the validity of fields and the feedback
  messages...
 
  Is there a way to do what I need?
 
  Thank you for your help ;)
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p16575383.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Question on component hierarchy

2008-04-09 Thread John Patterson

You would also need to setVisible(false) on the WMC or wicket would throw an
exception at the missing child components.  I use a simple class
InvisibleComponent for this.


Eric Rotick wrote:
 
 One more thing that was suggested in class.
 
 Is it possible to define a Panel which had all suitable and appropriate
 sub
 components and then to no-op the ones that were not needed?
 
 So in the earlier example there could be a panel
 
 wicket:panel
 
 
  
  
 /wicket:panel
 
 and if the image was not needed it could be no-op'ed out by defining a
 WebMarkupContainer but with no children.
 
 On Tue, Apr 8, 2008 at 6:53 PM, Eric Rotick [EMAIL PROTECTED] wrote:
 
 Many thanks for the clarification.

 As I am about to start teaching the rudiments of Wicket to a project team
 I guess the teacher should know what they are talking about.


 On Tue, Apr 8, 2008 at 6:50 PM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:

  you dont need a panel for the repeater itself. as for variable
  component hierarchy inside the repeater itself, you are correct: you
  have to either use a panel or a fragment.
 
  -igor
 
 
  On Tue, Apr 8, 2008 at 9:37 AM, Eric Rotick [EMAIL PROTECTED]
  wrote:
   I thought I understood the component hierarchy but then I started to
  tell
the guys about it and now I'm not so sure.
  
If the markup defines a hierarchy as A contains B contains C, in
  effect,
this means that C is added to B which is added to A. If we expand B
  to be
more complex we can use maybe a Panel which we identify as B but
  inside it
is BA , BB and so on. So, all the time there is a direct
 relationship
between the wicket identified tags in the markup and the components
  in the
code.
  
Now we introduce a repeater of some kind and it appears that the
  component
hierarchy is broken but it's not. So if C was a repeater and it had
 4
children then the hierarchy is still A to B to C but within C there
  is C to
C1, C to C2 and so on.
  
Now, if we need to have a runtime variable amount of markup which is
variable, not in terms of the same markup repeated but completely
  different
markup based on some logic then we might define a Panel which
 handles
  the
variation. This is fine but what if the contents of the Panel is
 also
variable. In this case further Panels are needed until the variable
requirements are covered.
  
Now the rub; although there are components, such as
  WebMarkupContainer which
can be used to group components, the use of any component which is
  not
'transparent' must have the related wicket:id in some markup
  somewhere.
  
So, lets take an example where we have a list of items which can be
  just
text or a link which has an optional image. It seems that I have to
  define
panels for :-
  
  - wrapper panel for the list
  - a link with it's text
  - a link with it's text and image
  
So we have markup such as
  
wicket:panel
ul
li wicket:id=items/
/ul
/wicket:panel
  
wicket:panel



/wicket:panel
  
wicket:panel


 
 
/wicket:panel
  
Have I got this correct or have I gone astray somewhere?
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 
 

-- 
View this message in context: 
http://www.nabble.com/Question-on-component-hierarchy-tp16567888p16580692.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: New wicketstuff progress bar component / project

2008-04-09 Thread Christopher Hlubek
Hi Lucio,

I looked at the pom.xml and fixed a wrong dependency. Currently I
cannot commit to the SVN, but I think it will be fixed soon.

2008/3/27, luciolrv [EMAIL PROTECTED]:

  I downloaded svn from the link below,
  but running maven2 on any of the 3 project gives the error:
  Missing
  com.resoap.wicket:wicket-progressbar:jar:0.1-SNAPSHOT

  Is this a repository problem?

  Lucio Rodriguez



  Christopher Hlubek wrote:
  
   I always wondered why there was no progress bar component for wicket.
   The UploadProgressBar is cool but only for file uploads and not
   designed for background tasks or long taking actions.
  
   So some time ago I wrote a progress bar component to have an easy to
   use a component for progress display of some task with AJAX updates. I
   recently published this as the wicketstuff-progressbar project.
  

  Just see the wiki
   
 (http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar)
   for a short description and the examples module for some example code.
  
   Since this is still work in progress I appreciate your comments or
   contribution!
  
   Thanks,
  
   Christopher Hlubek
  

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


  --
  View this message in context: 
 http://www.nabble.com/New-wicketstuff-progress-bar-component---project-tp15392340p16321414.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Fail to close ModalWindow on top of ModalWindow

2008-04-09 Thread Nili Adoram

Hi all,
I have a ModalWindow A containing a page  i.e. opened as an iframe.
This modal opens another ModalWindow B containing a panel.
Window B contains a simple AjaxLink that should close B.

add(new AjaxLink(cancel) {

   @Override
   public void onClick(AjaxRequestTarget target) {

   ModalWindow.closeCurrent(target);
   }

   });

However, when I click this AjaxLink in order to close B the following 
message is displayed:
'You can\'t close this modal window. Close the top-level modal window 
first.'


This message is displayed since isIframe() returns true, which is 
problematic since B is not an iframe but a div.


Is there a workaround for this issue ?

--
Best,
Nili 


===
Nili Adoram
GRM Team, RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6236636




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



Re: Feature request: using @SpringBean outside Wicket request

2008-04-09 Thread Erik van Oosten

Igor Vaynberg wrote:

can you not roll your own simple filter? you can pull the webapp from
the servletcontext

-igor
  


Thanks for the suggestion. It works perfectly.

Here is the code for those that are interested.

import org.apache.wicket.Application;
import org.apache.wicket.protocol.http.WebApplication;

import javax.servlet.*;
import java.io.IOException;

/**
* Filter that sets the wicket application, just like [EMAIL PROTECTED] 
org.apache.wicket.protocol.http.WicketFilter}

* would do.
*
* pThis implementation assumes that it is placed in a filter chain, 
iafter/i WicketFilter,

* for URLs that are not handled by the WicketFilter.
*
* pThe filter name of the wicket filter is retrieved from the init 
parameter wicketFilterName.

*
* @author Erik van Oosten
*/
public class WicketApplicationFilter implements Filter {

   private WebApplication webApplication;

   public void init(FilterConfig filterConfig) throws ServletException {
   // Get instance of the Wicket application, it is set by the 
Wicket filter.
   String contextKey = wicket: + 
filterConfig.getInitParameter(wicketFilterName);
   webApplication = (WebApplication) 
filterConfig.getServletContext().getAttribute(contextKey);


   if (webApplication == null) {
   throw new ServletException(Could not find the Wicket 
application, please make  +
   sure filter WicketApplicationFilter is embedded in 
Wicket's filter);

   }
   }

   public void doFilter(ServletRequest request, ServletResponse 
response, FilterChain chain) throws IOException, ServletException {

   try {
   // Set the webapplication for this thread
   Application.set(webApplication);

   chain.doFilter(request, response);

   } finally {
   // always unset the application thread local
   Application.unset();
   }
   }

   public void destroy() {
   webApplication = null;
   }
}


Regards,
   Erik.


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


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



StringResourceModel parameter substitutions question

2008-04-09 Thread TonyVegas

Hi!

When setting a string via StringResourceModel and using parameters, the
default operation in Wicket for retreiving the parameters' strings is to
call PropertyVariableInterpolator.getValue(final String variableName) within
the localizer.
This operation retreives the string by simply calling the toString-method of
the parameter.

Our object's string representation is retreived by another operation though.
So we need to call this operation rather than the toString.
Is there any method to achieve this other than overwriting the localizer?

Greetings,
Tony
-- 
View this message in context: 
http://www.nabble.com/StringResourceModel-parameter-substitutions-question-tp16582995p16582995.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to Create a link in a treeview

2008-04-09 Thread Thomas Kappler
Hi,

you should base your tree on BaseTree, as it implements a lot of
things for you.  Then, you implement newNodeComponent(), where you can
create any component (e.g. a link) to represent a tree node.  The
component you create there is not tree-specific.

Cheers,
Thomas


On Wed, Apr 9, 2008 at 7:59 AM, ouss [EMAIL PROTECTED] wrote:


  No one can help me ?
  --
  View this message in context: 
 http://www.nabble.com/How-to-Create-a-link-in-a-treeview-tp16557773p16580102.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Question on component hierarchy

2008-04-09 Thread Eric Rotick
Good, this suggests that having a Panel as a boilerplate and then turning
off the parts that are not required is a recognised pattern. Otherwise I
could foresee the proliferation of home made components reaching a point
where it became a burden to know which one to use.

On Wed, Apr 9, 2008 at 7:57 AM, John Patterson [EMAIL PROTECTED] wrote:


 You would also need to setVisible(false) on the WMC or wicket would throw
 an
 exception at the missing child components.  I use a simple class
 InvisibleComponent for this.


 Eric Rotick wrote:
 
  One more thing that was suggested in class.
 
  Is it possible to define a Panel which had all suitable and appropriate
  sub
  components and then to no-op the ones that were not needed?
 
  So in the earlier example there could be a panel
 
  wicket:panel
 
 
 
 
  /wicket:panel
 
  and if the image was not needed it could be no-op'ed out by defining a
  WebMarkupContainer but with no children.
 
  On Tue, Apr 8, 2008 at 6:53 PM, Eric Rotick [EMAIL PROTECTED]
 wrote:
 
  Many thanks for the clarification.
 
  As I am about to start teaching the rudiments of Wicket to a project
 team
  I guess the teacher should know what they are talking about.
 
 
  On Tue, Apr 8, 2008 at 6:50 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:
 
   you dont need a panel for the repeater itself. as for variable
   component hierarchy inside the repeater itself, you are correct: you
   have to either use a panel or a fragment.
  
   -igor
  
  
   On Tue, Apr 8, 2008 at 9:37 AM, Eric Rotick [EMAIL PROTECTED]
   wrote:
I thought I understood the component hierarchy but then I started
 to
   tell
 the guys about it and now I'm not so sure.
   
 If the markup defines a hierarchy as A contains B contains C, in
   effect,
 this means that C is added to B which is added to A. If we expand
 B
   to be
 more complex we can use maybe a Panel which we identify as B but
   inside it
 is BA , BB and so on. So, all the time there is a direct
  relationship
 between the wicket identified tags in the markup and the
 components
   in the
 code.
   
 Now we introduce a repeater of some kind and it appears that the
   component
 hierarchy is broken but it's not. So if C was a repeater and it
 had
  4
 children then the hierarchy is still A to B to C but within C
 there
   is C to
 C1, C to C2 and so on.
   
 Now, if we need to have a runtime variable amount of markup which
 is
 variable, not in terms of the same markup repeated but completely
   different
 markup based on some logic then we might define a Panel which
  handles
   the
 variation. This is fine but what if the contents of the Panel is
  also
 variable. In this case further Panels are needed until the
 variable
 requirements are covered.
   
 Now the rub; although there are components, such as
   WebMarkupContainer which
 can be used to group components, the use of any component which is
   not
 'transparent' must have the related wicket:id in some markup
   somewhere.
   
 So, lets take an example where we have a list of items which can
 be
   just
 text or a link which has an optional image. It seems that I have
 to
   define
 panels for :-
   
   - wrapper panel for the list
   - a link with it's text
   - a link with it's text and image
   
 So we have markup such as
   
 wicket:panel
 ul
 li wicket:id=items/
 /ul
 /wicket:panel
   
 wicket:panel
   
   
   
 /wicket:panel
   
 wicket:panel
   
   
   
   
 /wicket:panel
   
 Have I got this correct or have I gone astray somewhere?
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Question-on-component-hierarchy-tp16567888p16580692.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: I have an error when try to test submit using FormTester

2008-04-09 Thread Tomasz Prus
Can You give mi more details how remove the
UrlCompressingWebRequestProcessor because i don't have any idea?




Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Johan Compagner
this can happen at some level..

for example if you have somewhere in the code that an error code is set as a
response
and that error code is mounted to a error page in the app server
then there are 2 request at the same time for the same thread to wicket..

I worked around that last weekend. But in this case the request
cycle/session can still be there or must be there.

johan


On Wed, Apr 9, 2008 at 12:22 PM, Niels Bo [EMAIL PROTECTED] wrote:


 We have kind of the same problem.
 It looks like Application and Session are not always cleared from the
 request thread, and to test this I have just deployed a subclassed
 WicketServlet with these checks (and also as a workaround):

protected void service(HttpServletRequest req, HttpServletResponse
 resp)
 throws ServletException, IOException {
if(Application.exists()) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 Application on Thread);
Application.unset();
}
if(Session.exists()) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 Session on Thread);
Session.unset();
}
if(RequestCycle.get() != null) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 RequestCycle on Thread);
RequestCycle.get().detach();
}

super.service(req, resp); // call WicketServlet
}

 Our logs show that it actually happens that both Application and Session
 are
 already attached to the thread before the request is processed.
 I have only seen it once or twice in our development environment, but it
 happens a few times every hour on the production server.

 Niels
 --
 View this message in context:
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16583880.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: AjaxSubmitLink accessing model object non-existent property

2008-04-09 Thread Tim Squires
OK.  It's clicked.  I was hoping to have a simple ajaxed submit link
without having to create a fake property on the model object.  No problem,
I can see what I missed.

Thanks for your help Igor.

Tim

 you said it yourself:

 Insure that the component identifier names match
 the appropriate property names.

 what that says is that the model you get is the property of the model
 object that is in the cpm with the name of component id.

 so since your links id is foo it will try to pull out the model
 object from the cpm and call getfoo() on it, the result of which is
 the model object of the link

 -igor


 On Tue, Apr 8, 2008 at 12:52 PM, Tim Squires [EMAIL PROTECTED] wrote:
 I have read it - a few times over the last 3 years of using Wicket and
  even bought the book ;)

  It says

  To use a CompoundPropertyModel, simply set one as the model for a
  container, such as a Form or a Page. Create the contained components
 with
  no model of their own. Insure that the component identifier names match
  the appropriate property names.

  The AjaxSubmitLink is picking-up the parent forms compound property
 model
  but only checking to see if the mylink property exists when onSubmit
  calls getModelObject().

  I would like to get the Forms model via getModelObject but because it
  errors when called, I have to either set a false model on the
  AjaxSubmitLink or get the model object outside of the onSubmit, assign
 it
  to a final property and then use it in the onSubmit.

  I'm happy to admit that I'm doing something wrong but I cannot see what
 it
  is???

  Thanks again,
  Tim



   no, components do not randomly pick up models from their parents. i
   would suggest reading the models wiki page.
  
   -igor
  
  
   On Mon, Apr 7, 2008 at 3:11 PM, Tim [EMAIL PROTECTED] wrote:
   Thanks Igor but should it not pick-up the model from the Form?
 There's
   no
constructor that takes a model.  Should the AjaxSubmitLink(id,
 form)
constructor be used with the Form that it's being added to?  e..g
  
MyForm extends Form {
public MyForm(){

add( new AjaxSubmitLink(mylink,this){

});
}}
  
If it's already bound to a Form, should it not pick-up the model
 used
   by
the form?
  
Am I looking at the problem/solution the wrong way???
  
Thanks again,
Tim
  
  
  
 you forgot to give ajaxsubmitlink a model, so getmodelobject()
 will
 either return null or a compound model.confirm - neither of which
 i
 think you want.

 -igor


 On Mon, Apr 7, 2008 at 1:00 PM, Tim Squires [EMAIL PROTECTED]
 wrote:
 Hi,

  When adding an AjaxSubmitLink, the onSubmit method tries to
 access
   a
  property of the model object that does not exists:

  ---
 final AjaxSubmitLink confirmLink = new
  AjaxSubmitLink(confirm) {
 @Override
 public void onSubmit(final AjaxRequestTarget
 target,
 final Form form) {
 if (((Will) getModelObject()).getExecutor()
 !=
   null)
 {
 willModalWindow.show(target);
 } else {
 warn(Please choose an executor.);
 target.addComponent(feedback);
 }
 }

 @Override
 public void onError(final AjaxRequestTarget
 target,
 final Form form) {
 target.addComponent(feedback);
 }
 };

 add(confirmLink);
  ---

  It tries to access the confirm property of the Model, in this
   case a
  Will object.

  ---
  org.apache.wicket.WicketRuntimeException: No get method defined
 for
 class:
  class crystalmark.willfinder.model.Will expression: confirm
  at
  
 org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433)
  at
  
 org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
  at
  
 org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
  at
  
 org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
  at
   org.apache.wicket.Component.getModelObject(Component.java:1551)
  at
  
 crystalmark.willfinder.page.components.EditWillPanel$EditWillForm$5.onSubmit(EditWillPanel.java:183)
  at
  
 org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94)
  at
  
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128)
  ---

  It's only when using the getModelObject method.  If I get the
 Will
 object
  

Re: I have an error when try to test submit using FormTester

2008-04-09 Thread lars vonk
Hi,

This is a bug in WicketTester. See
http://issues.apache.org/jira/browse/WICKET-861.

There was a similar thread on the user-group recently:
http://www.nabble.com/Re%3A-Best-method-of-testing-behaviors.-p1639.html

As I understand it the workaround is to remove the
UrlCompressingWebRequestProcessor from your WebApplication, but maybe there
is a better solution.

Hopes this helps,

Lars

On Wed, Apr 9, 2008 at 12:37 PM, Tomasz Prus [EMAIL PROTECTED] wrote:

 I have test and formTester.submit(); throws an error:

 java.lang.NumberFormatException: For input string: p:form
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at

 org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:122)
at

 org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:79)
at

 org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
at

 org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at

 org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:401)
at org.apache.wicket.util.tester.FormTester.submit(FormTester.java:617)
at

 pl.mainseek.forum.wicket.components.AddQuestionPanelTest.testSubmit(AddQuestionPanelTest.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at

 org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at

 org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at
 org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at

 org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at

 org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at

 org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
 org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at
 org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at

 org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at

 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at

 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at

 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at

 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at

 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at

 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 Sources:

 public class AddQuestionPanelTest extends AbstractWebPageContext {

private static final String FORM_PATH =
 DummyPageWithAddQuestionPanel.PANEL_NAME + : +
 AddQuestionPanel.FORM_NAME;
private FakeForumService forumService;

@Before public void setUp() throws Exception {
super.setUp();
forumService = MockFactory.makeMock(FakeForumService.class);
getMockContext().putBean(forumService, forumService);
}

@Test public void testCreate() {
getTester().startPage(DummyPageWithAddQuestionPanel.class);

  getTester().assertRenderedPage(DummyPageWithAddQuestionPanel.class);
getTester().assertNoErrorMessage();


 getTester().assertComponent(DummyPageWithAddQuestionPanel.PANEL_NAME,
 Panel.class);
getTester().assertComponent(FORM_PATH, Form.class);
getTester().assertComponent(FORM_PATH + : +
 AddQuestionPanel.SUBJECT, RequiredTextField.class);
getTester().assertComponent(FORM_PATH + : +
 AddQuestionPanel.BODY,
 TextArea.class);
}

@Test public void testSubmit() {
getTester().startPage(DummyPageWithAddQuestionPanel.class);

FormTester formTester = getTester().newFormTester(FORM_PATH);
formTester.setValue(AddQuestionPanel.SUBJECT, s);
formTester.setValue(AddQuestionPanel.BODY, b);

I have an error when try to test submit using FormTester

2008-04-09 Thread Tomasz Prus
I have test and formTester.submit(); throws an error:

java.lang.NumberFormatException: For input string: p:form
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at
org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:122)
at
org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:79)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:401)
at org.apache.wicket.util.tester.FormTester.submit(FormTester.java:617)
at
pl.mainseek.forum.wicket.components.AddQuestionPanelTest.testSubmit(AddQuestionPanelTest.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at
org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Sources:

public class AddQuestionPanelTest extends AbstractWebPageContext {

private static final String FORM_PATH =
DummyPageWithAddQuestionPanel.PANEL_NAME + : + AddQuestionPanel.FORM_NAME;
private FakeForumService forumService;

@Before public void setUp() throws Exception {
super.setUp();
forumService = MockFactory.makeMock(FakeForumService.class);
getMockContext().putBean(forumService, forumService);
}

@Test public void testCreate() {
getTester().startPage(DummyPageWithAddQuestionPanel.class);
getTester().assertRenderedPage(DummyPageWithAddQuestionPanel.class);
getTester().assertNoErrorMessage();


getTester().assertComponent(DummyPageWithAddQuestionPanel.PANEL_NAME,
Panel.class);
getTester().assertComponent(FORM_PATH, Form.class);
getTester().assertComponent(FORM_PATH + : +
AddQuestionPanel.SUBJECT, RequiredTextField.class);
getTester().assertComponent(FORM_PATH + : + AddQuestionPanel.BODY,
TextArea.class);
}

@Test public void testSubmit() {
getTester().startPage(DummyPageWithAddQuestionPanel.class);

FormTester formTester = getTester().newFormTester(FORM_PATH);
formTester.setValue(AddQuestionPanel.SUBJECT, s);
formTester.setValue(AddQuestionPanel.BODY, b);
getTester().debugComponentTrees();
formTester.submit();
}

}

public class AddQuestionPanel extends Panel {

public static final String ADD_QUESTION_BUTTON = addQuestionButton;
public static final String SUBJECT = subject;
public static final String BODY = body;
public static final String FORM_NAME = form;

private Message message;

public AddQuestionPanel(String id, final User user, final MessageService
forumService) {
super(id);
message = new Message(, , user);
Form form = new 

Re: I have an error when try to test submit using FormTester

2008-04-09 Thread lars vonk
According to that Thread I was referring it was probably caused by the fact
the newRequestCycleProcessor method in the WebApplication class was
overridden to return the UrlCompressingWebRequestProcessor. Did you override
that method as well?


On Wed, Apr 9, 2008 at 1:25 PM, Tomasz Prus [EMAIL PROTECTED] wrote:

 Can You give mi more details how remove the
 UrlCompressingWebRequestProcessor because i don't have any idea?

 



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Nino Saturnino Martinez Vazquez Wael

Do you synchronize those final blocks?

Johan Compagner wrote:

could you change that method that it checks this after the fact?
and then see if there is an error for that thread before? for example also
log the url call so that we can see
what kind of request did let one thread local be there?

Which one is it by the way?
is it app, session or request cycle?

i just checked our code and we have finally blocks pretty much every where
in WicketFilter.doGet
and in RequestCycle.steps

And i have no idea how those can be jumped over.

johan


On Wed, Apr 9, 2008 at 12:22 PM, Niels Bo [EMAIL PROTECTED] wrote:

  

We have kind of the same problem.
It looks like Application and Session are not always cleared from the
request thread, and to test this I have just deployed a subclassed
WicketServlet with these checks (and also as a workaround):

   protected void service(HttpServletRequest req, HttpServletResponse
resp)
throws ServletException, IOException {
   if(Application.exists()) {
   LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
Application on Thread);
   Application.unset();
   }
   if(Session.exists()) {
   LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
Session on Thread);
   Session.unset();
   }
   if(RequestCycle.get() != null) {
   LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
RequestCycle on Thread);
   RequestCycle.get().detach();
   }

   super.service(req, resp); // call WicketServlet
   }

Our logs show that it actually happens that both Application and Session
are
already attached to the thread before the request is processed.
I have only seen it once or twice in our development environment, but it
happens a few times every hour on the production server.

Niels
--
View this message in context:
http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16583880.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 for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Is there a Wicket spinner component?

2008-04-09 Thread Martijn Lindhout
Something like this:  http://www.eclipse.org/swt/R3_1/spinner.png

-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Is there a Wicket spinner component?

2008-04-09 Thread Gerolf Seitz
the spinner in wicketstuff-minis should do the trick.

  Gerolf

On Wed, Apr 9, 2008 at 2:00 PM, Martijn Lindhout [EMAIL PROTECTED]
wrote:

 Something like this:  http://www.eclipse.org/swt/R3_1/spinner.png

 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Niels Bo

Yes, I can do that.

It is both Application and Session at the same time.
RequestCycle I have never seen it happen for.

Niels


Johan Compagner wrote:
 
 could you change that method that it checks this after the fact?
 and then see if there is an error for that thread before? for example also
 log the url call so that we can see
 what kind of request did let one thread local be there?
 
 Which one is it by the way?
 is it app, session or request cycle?
 
 i just checked our code and we have finally blocks pretty much every where
 in WicketFilter.doGet
 and in RequestCycle.steps
 
 And i have no idea how those can be jumped over.
 
 johan
 
 
 On Wed, Apr 9, 2008 at 12:22 PM, Niels Bo [EMAIL PROTECTED]
 wrote:
 

 We have kind of the same problem.
 It looks like Application and Session are not always cleared from the
 request thread, and to test this I have just deployed a subclassed
 WicketServlet with these checks (and also as a workaround):

protected void service(HttpServletRequest req, HttpServletResponse
 resp)
 throws ServletException, IOException {
if(Application.exists()) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 Application on Thread);
Application.unset();
}
if(Session.exists()) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 Session on Thread);
Session.unset();
}
if(RequestCycle.get() != null) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 RequestCycle on Thread);
RequestCycle.get().detach();
}

super.service(req, resp); // call WicketServlet
}

 Our logs show that it actually happens that both Application and Session
 are
 already attached to the thread before the request is processed.
 I have only seen it once or twice in our development environment, but it
 happens a few times every hour on the production server.

 Niels
 --
 View this message in context:
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16583880.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/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585336.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: warning with enclosure

2008-04-09 Thread Eyal Golan
strange,
was your other inner tag also a Wicket or a simple HTML ?
It keeps on going ...

On Tue, Apr 8, 2008 at 3:21 PM, Michael Sparer [EMAIL PROTECTED]
wrote:


 I tried, but I can't reproduce this warning using your code ...



 Eyal Golan wrote:
 
  anyone ??
 
  On Mon, Apr 7, 2008 at 9:52 AM, Eyal Golan [EMAIL PROTECTED] wrote:
 
  hello all,
  I have an enclosure tag with two inner ones.
  wicket:enclosure child=allChecked
  input type=checkbox wicket:id=allChecked /
  label wicket:id=allSelectedLabel/label
  /wicket:enclosure
 
  Whenever I go to the page with the panel that has this enclosure, I get
 a
  warning message:
  2008-04-06 18:35:49,670 WARN [org.apache.wicket.Page] - Component
  [Component id = allSelectedLabel, page =
  comweb.entitybrowserBrowserPage, path =
  5:tabs:browserTabbedPanel:panel:allSelectedLabel.Label, isVisible =
 true,
  isVersioned = false] wasn't rendered but most likely it has a
 transparent
  parent: [MarkupContainer [Component id = enclosure-165, page =
  com..web.entitybrowserBrowserPage, path =
  5:tabs:browserTabbedPanel:panel:enclosure-165.Enclosure, isVisible =
  false,
  isVersioned = false]]
 
  I know it's no problem, but it's a bit annoying.
  Is there a way removing this warning?
 
  Thanks
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 
 
 
 
  --
  Eyal Golan
  [EMAIL PROTECTED]
 
  Visit: http://jvdrums.sourceforge.net/
 
 


 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 --
 View this message in context:
 http://www.nabble.com/warning-with-enclosure-tp16534709p16557837.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Eyal Golan
[EMAIL PROTECTED]

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


Bug in wicket-ajax.js introduced in Wicket 1.3.2?

2008-04-09 Thread Meetesh Karia

Hi all,

We recently upgraded to Wicket 1.3.2 from Wicket 1.3.1 and we're seeing 
a bug with ajax behavior in Firefox (2.0.0.13 on Windows Vista).  
Basically, the following header is returned from an ajax call:


?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 
![CDATA[head xmlns:wicket=http://wicket.apache.org;
   script src=/templates/mediaplayer/swfobject.js language=javascript/script
script type=text/javascript src=../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script 

script type=text/javascript src=../../resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script 

script type=text/javascript src=../../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script 


script type=text/javascript 
id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
wicketAjaxDebugEnable=true;
/*--]^]^*//script

/head]]/header-contribution

The page this is called from has a URL that looks like this 
http://host/2008/foo/bar


In Wicket 1.3.1, the script /templates/mediaplayer/swfobject.js gets 
correctly loaded from


http://host/templates/mediaplayer/swfobject.js

However, in Wicket 1.3.2, it is incorrectly loaded from

http://host/2008/foo//templates/mediaplayer/swfobject.js

This appears to be related to one of these two changes:

http://fisheye6.cenqua.com/browse/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?r1=614229r2=619539
http://fisheye6.cenqua.com/browse/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?r1=627225r2=628015

I haven't narrowed it down but replacing wicket-ajax.js with the version 
from 1.3.1 makes it work again.


Should I file a bug for this?  Or is this going to be the new behavior 
going forward for Firefox?  Also, I'm guessing that the safest way to 
work around this problem is to remove those two changes and temporarily 
use a local build of wicket, right?


Thanks,
Meetesh


Re: Bug in wicket-ajax.js introduced in Wicket 1.3.2?

2008-04-09 Thread Thijs

See

https://issues.apache.org/jira/browse/WICKET-1426



Meetesh Karia schreef:

Hi all,

We recently upgraded to Wicket 1.3.2 from Wicket 1.3.1 and we're 
seeing a bug with ajax behavior in Firefox (2.0.0.13 on Windows 
Vista).  Basically, the following header is returned from an ajax call:


?xml version=1.0 
encoding=UTF-8?ajax-responseheader-contribution 
encoding=wicket1 ![CDATA[head 
xmlns:wicket=http://wicket.apache.org;
   script src=/templates/mediaplayer/swfobject.js 
language=javascript/scriptscript type=text/javascript 
src=../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script 

script type=text/javascript 
src=../../resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script 

script type=text/javascript 
src=../../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script 

script type=text/javascript 
id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/

wicketAjaxDebugEnable=true;
/*--]^]^*//script

/head]]/header-contribution

The page this is called from has a URL that looks like this 
http://host/2008/foo/bar


In Wicket 1.3.1, the script /templates/mediaplayer/swfobject.js gets 
correctly loaded from


http://host/templates/mediaplayer/swfobject.js

However, in Wicket 1.3.2, it is incorrectly loaded from

http://host/2008/foo//templates/mediaplayer/swfobject.js

This appears to be related to one of these two changes:

http://fisheye6.cenqua.com/browse/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?r1=614229r2=619539 

http://fisheye6.cenqua.com/browse/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?r1=627225r2=628015 



I haven't narrowed it down but replacing wicket-ajax.js with the 
version from 1.3.1 makes it work again.


Should I file a bug for this?  Or is this going to be the new behavior 
going forward for Firefox?  Also, I'm guessing that the safest way to 
work around this problem is to remove those two changes and 
temporarily use a local build of wicket, right?


Thanks,
Meetesh




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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Johan Compagner
why would that help?

the first finally block is on the RequestCycle that only lives in 1 thread
and has all the state in one thread.

the second (in wicket filter) does only reset thread locals which are single
threaded by nature.

I did see one thing that could go wrong
we also call Response.close() and if that one some how fails, this could
happen i think in maybe certain situations
then the thread locals are not reset

I fixed that with an extra try catch block

johan


On Wed, Apr 9, 2008 at 1:53 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Do you synchronize those final blocks?


 Johan Compagner wrote:

  could you change that method that it checks this after the fact?
  and then see if there is an error for that thread before? for example
  also
  log the url call so that we can see
  what kind of request did let one thread local be there?
 
  Which one is it by the way?
  is it app, session or request cycle?
 
  i just checked our code and we have finally blocks pretty much every
  where
  in WicketFilter.doGet
  and in RequestCycle.steps
 
  And i have no idea how those can be jumped over.
 
  johan
 
 
  On Wed, Apr 9, 2008 at 12:22 PM, Niels Bo [EMAIL PROTECTED]
  wrote:
 
 
 
   We have kind of the same problem.
   It looks like Application and Session are not always cleared from the
   request thread, and to test this I have just deployed a subclassed
   WicketServlet with these checks (and also as a workaround):
  
 protected void service(HttpServletRequest req, HttpServletResponse
   resp)
   throws ServletException, IOException {
 if(Application.exists()) {
 LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
   Application on Thread);
 Application.unset();
 }
 if(Session.exists()) {
 LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
   Session on Thread);
 Session.unset();
 }
 if(RequestCycle.get() != null) {
 LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
   RequestCycle on Thread);
 RequestCycle.get().detach();
 }
  
 super.service(req, resp); // call WicketServlet
 }
  
   Our logs show that it actually happens that both Application and
   Session
   are
   already attached to the thread before the request is processed.
   I have only seen it once or twice in our development environment, but
   it
   happens a few times every hour on the production server.
  
   Niels
   --
   View this message in context:
  
   http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16583880.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 for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684



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




Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Wolfgang Gehner

I am sorry to report that we see the same problem. We run a page in IE, enter
some values, ajax-submit, open the same page in Firefox, and the values are
already there. 

Does the serialization ignore the user session? We store values in
CompoundPropertyModel.

As for the other posters, this is critical for us.

We are using the april 6 snapshot from
http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/

We need that snapshot because it has the StreamCorrupted fix. We can't use
1.3.3 final because it doesn't have that fix.

Please advise.

Wolfgang Gehner


Niels Bo wrote:
 
 Yes, I can do that.
 
 It is both Application and Session at the same time.
 RequestCycle I have never seen it happen for.
 
 Niels
 
 
 Johan Compagner wrote:
 
 could you change that method that it checks this after the fact?
 and then see if there is an error for that thread before? for example
 also
 log the url call so that we can see
 what kind of request did let one thread local be there?
 
 Which one is it by the way?
 is it app, session or request cycle?
 
 i just checked our code and we have finally blocks pretty much every
 where
 in WicketFilter.doGet
 and in RequestCycle.steps
 
 And i have no idea how those can be jumped over.
 
 johan
 
 
 On Wed, Apr 9, 2008 at 12:22 PM, Niels Bo [EMAIL PROTECTED]
 wrote:
 

 We have kind of the same problem.
 It looks like Application and Session are not always cleared from the
 request thread, and to test this I have just deployed a subclassed
 WicketServlet with these checks (and also as a workaround):

protected void service(HttpServletRequest req, HttpServletResponse
 resp)
 throws ServletException, IOException {
if(Application.exists()) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 Application on Thread);
Application.unset();
}
if(Session.exists()) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 Session on Thread);
Session.unset();
}
if(RequestCycle.get() != null) {
LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
 RequestCycle on Thread);
RequestCycle.get().detach();
}

super.service(req, resp); // call WicketServlet
}

 Our logs show that it actually happens that both Application and Session
 are
 already attached to the thread before the request is processed.
 I have only seen it once or twice in our development environment, but it
 happens a few times every hour on the production server.

 Niels
 --
 View this message in context:
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16583880.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/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585349.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: I have an error when try to test submit using FormTester

2008-04-09 Thread Tomasz Prus
Thank You very many  :)

I overide method newRequestCycleProcessor in my MockApplication and submit
works now for me:



@Override
protected IRequestCycleProcessor newRequestCycleProcessor() {
IRequestCycleProcessor newRequestCycleProcessor =
super.newRequestCycleProcessor();

return new UrlCompressingWebRequestProcessor() {

@Override
protected IRequestTarget resolveListenerInterfaceTarget(final
RequestCycle requestCycle,
final Page page, final String componentPath, String
interfaceName,
final RequestParameters requestParameters)
{
String pageRelativeComponentPath =
Strings.afterFirstPathComponent(componentPath,
Component.PATH_SEPARATOR);
Component component = null;
if (page instanceof WebPage 
!IResourceListener.equals(interfaceName))
{
//ComponentAndInterface cai =
((WebPage)page).getUrlCompressor().getComponentAndInterfaceForUID(pageRelativeComponentPath);
UrlCompressor.ComponentAndInterface cai = null;
if (cai != null)
{
interfaceName = cai.getInterfaceName();
component = cai.getComponent();
}
}

requestParameters.setInterfaceName(interfaceName);

if
(interfaceName.equals(IRedirectListener.INTERFACE.getName()))
{
return new RedirectPageRequestTarget(page);
}
else if
(interfaceName.equals(INewBrowserWindowListener.INTERFACE.getName()))
{
return
INewBrowserWindowListener.INTERFACE.newRequestTarget(page, page,
INewBrowserWindowListener.INTERFACE,
requestParameters);
}
else
{
// Get the listener interface we need to call
final RequestListenerInterface listener =
RequestListenerInterface
.forName(interfaceName);
if (listener == null)
{
throw new WicketRuntimeException(
Attempt to access unknown request listener
interface  + interfaceName);
}

// Get component
if (component == null)
{
if (Strings.isEmpty(pageRelativeComponentPath))
{
component = page;
}
else
{
component = page.get(pageRelativeComponentPath);
}
}

if (component == null)
{
// still null? that's not right
throw new WicketRuntimeException(cannot resolve
component with path ' +
pageRelativeComponentPath + ', listener  +
listener +  on page  + page);
}

if (!component.isEnableAllowed())
{
throw new UnauthorizedActionException(component,
Component.ENABLE);
}

// Ask the request listener interface object to create a
request
// target
return listener.newRequestTarget(page, component,
listener, requestParameters);
}
}
};
}


Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread kman

have you tried with a different servlet container for instance tomcat?
i've experienced the same session problems with a custom webapp deployed on
jetty some time ago.
the sessionid was used to track the session and we had the same problem as
you describe in a single instance of jetty.
-- 
View this message in context: 
http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585502.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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Johan Compagner
where are the values stored?
do you really see the same page ?

For example place in a private field of the page the session.getId()
when you create the page
then when you do your test is the id in both sides the same??

johan


On Wed, Apr 9, 2008 at 2:56 PM, Wolfgang Gehner [EMAIL PROTECTED] wrote:


 I am sorry to report that we see the same problem. We run a page in IE,
 enter
 some values, ajax-submit, open the same page in Firefox, and the values
 are
 already there.

 Does the serialization ignore the user session? We store values in
 CompoundPropertyModel.

 As for the other posters, this is critical for us.

 We are using the april 6 snapshot from

 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.3-SNAPSHOT/

 We need that snapshot because it has the StreamCorrupted fix. We can't use
 1.3.3 final because it doesn't have that fix.

 Please advise.

 Wolfgang Gehner


 Niels Bo wrote:
 
  Yes, I can do that.
 
  It is both Application and Session at the same time.
  RequestCycle I have never seen it happen for.
 
  Niels
 
 
  Johan Compagner wrote:
 
  could you change that method that it checks this after the fact?
  and then see if there is an error for that thread before? for example
  also
  log the url call so that we can see
  what kind of request did let one thread local be there?
 
  Which one is it by the way?
  is it app, session or request cycle?
 
  i just checked our code and we have finally blocks pretty much every
  where
  in WicketFilter.doGet
  and in RequestCycle.steps
 
  And i have no idea how those can be jumped over.
 
  johan
 
 
  On Wed, Apr 9, 2008 at 12:22 PM, Niels Bo [EMAIL PROTECTED]
  wrote:
 
 
  We have kind of the same problem.
  It looks like Application and Session are not always cleared from the
  request thread, and to test this I have just deployed a subclassed
  WicketServlet with these checks (and also as a workaround):
 
 protected void service(HttpServletRequest req, HttpServletResponse
  resp)
  throws ServletException, IOException {
 if(Application.exists()) {
 LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
  Application on Thread);
 Application.unset();
 }
 if(Session.exists()) {
 LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
  Session on Thread);
 Session.unset();
 }
 if(RequestCycle.get() != null) {
 LogHelper.applicationLog(ILogEvents.LOGEVENT_UNEXPECTED,
  RequestCycle on Thread);
 RequestCycle.get().detach();
 }
 
 super.service(req, resp); // call WicketServlet
 }
 
  Our logs show that it actually happens that both Application and
 Session
  are
  already attached to the thread before the request is processed.
  I have only seen it once or twice in our development environment, but
 it
  happens a few times every hour on the production server.
 
  Niels
  --
  View this message in context:
 
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16583880.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/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585349.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: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Niels Bo

Hi
How can I check/log if there are error for that thread?
Niels


Johan Compagner wrote:
 
 could you change that method that it checks this after the fact?
 and then see if there is an error for that thread before? for example also
 log the url call so that we can see
 what kind of request did let one thread local be there?
 
 Which one is it by the way?
 is it app, session or request cycle?
 
 i just checked our code and we have finally blocks pretty much every where
 in WicketFilter.doGet
 and in RequestCycle.steps
 
 And i have no idea how those can be jumped over.
 
 johan
 

-- 
View this message in context: 
http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585768.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: a transparent conversion of a CheckBoxMultipleChoice value

2008-04-09 Thread John Krasnay
On Tue, Apr 08, 2008 at 11:03:52PM +0200, Vitaly Tsaplin wrote:
Yep. It looks simple and efficient. But it's quite a repetitive
 task. As I already mentioned I am going to create a component. And a
 data conversion should be its direct responsibility. The model wrapper
 cannot be provided from outside. It would be conceptually wrong in
 this case. I think this question is a bit wider then just a particular
 case with choices to bits conversion. I am getting running into this
 problem again and again. Wicket was created with a component driven
 design in mind and for, wasn't it?
 

That's fine too. Create a panel, or subclass CheckBoxMultipleChoice, and
have your panel|subclass apply the BitMapModel wrapper.

Converters are primarily for use with TextFields. They can only convert
to/from Strings.

jk

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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Johan Compagner
if there was an error before that
that should then be logged just before you log that there is a wrong state

The way you do it now is in reverse

the wrong state was already set in X number of request back
so when you log it, You can;'t really tie it to a a specific request that
did go wrong.

If you log it later after the service method. Then you know that it did
happen for that request
And most likely there should be some error before that.. Because i dont see
another way
how it would be possible when the normal flow without exceptions would
happen.

johan


On Wed, Apr 9, 2008 at 3:28 PM, Niels Bo [EMAIL PROTECTED] wrote:


 Hi
 How can I check/log if there are error for that thread?
 Niels


 Johan Compagner wrote:
 
  could you change that method that it checks this after the fact?
  and then see if there is an error for that thread before? for example
 also
  log the url call so that we can see
  what kind of request did let one thread local be there?
 
  Which one is it by the way?
  is it app, session or request cycle?
 
  i just checked our code and we have finally blocks pretty much every
 where
  in WicketFilter.doGet
  and in RequestCycle.steps
 
  And i have no idea how those can be jumped over.
 
  johan
 

 --
 View this message in context:
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585768.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: Is there a Wicket spinner component?

2008-04-09 Thread Martijn Lindhout
I guess you mean the cvs/svn repo, because there's nothing on the
http://cwiki.apache.org/WICKET/wicket-stuff.html site?

wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis doesn't seem
to work

2008/4/9, Gerolf Seitz [EMAIL PROTECTED]:

 the spinner in wicketstuff-minis should do the trick.

   Gerolf

 On Wed, Apr 9, 2008 at 2:00 PM, Martijn Lindhout [EMAIL PROTECTED]
 
 wrote:


  Something like this:  http://www.eclipse.org/swt/R3_1/spinner.png
 
  --
  Martijn Lindhout
  JointEffort IT Services
  http://www.jointeffort.nl
  [EMAIL PROTECTED]
  +31 (0)6 18 47 25 29
 




-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Problems with cookie

2008-04-09 Thread Fabien D.

It's working, thank you for your help

igor.vaynberg wrote:
 
 like i said change your code to
 ((WebResponse)RequestCycle.get().getResponse()).addCookie(...
 
 -igor
 
 On Tue, Apr 8, 2008 at 12:48 AM, Fabien D. [EMAIL PROTECTED]
 wrote:

  Thank you for your response...

  But it's possible to explain me a little more???
  I have tried :

   ((WebResponse)getRequestCycle().getResponse()).addCookie(cookieUser);
   
 ((WebResponse)getRequestCycle().getResponse()).addCookie(cookiePassword);

  But i Think the problem comes from the method in my WebApplication
 object

  public Session newSession (Request request, Response response){
  return new GestionSession(request);
  }




 igor.vaynberg wrote:
  
   you really should use an IDE
  
   other then that you can do requestcycle.get() instead
  
   -igor
  
   On Mon, Apr 7, 2008 at 7:56 AM, Fabien D. [EMAIL PROTECTED]
   wrote:
  
Hi
  
I have a problem to set and use cookie !!
  
I have followed the example found in wickets example :
  
Cookie cookieUser = new Cookie(cookieUser, email);
Cookie cookiePassword = new Cookie(cookiePassword, mdp);
cookieUser.setMaxAge(3600);
cookiePassword.setMaxAge(3600);
   
 ((WebResponse)getRequestCycle().getResponse()).addCookie(cookieUser);
  
  
 ((WebResponse)getRequestCycle().getResponse()).addCookie(cookiePassword);
  
There is a problem during compilation :
 cannot find symbol method getRequestCycle()...
  
I have a WebSession objet where i stock the user for right acces
  
In my WebApplication objet I have declared this :
   public Session newSession (Request request, Response
 response){
   return new GestionSession(request);
   }
  
Thank you in advance for your help
--
View this message in context:
   http://www.nabble.com/Problems-with-cookie-tp16537484p16537484.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Problems-with-cookie-tp16537484p16548307.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Problems-with-cookie-tp16537484p16585977.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: Question on component hierarchy

2008-04-09 Thread Jonathan Locke


yes.  

at the root, remember it's all just java so most patterns of composition are
applicable.  the trouble is finding the right one for your application.  you
can do some very fancy things with wicket components and design patterns.

also, see wicket:enclosure to reduce your webmarkupcontainers when hiding
things.


Eric Rotick wrote:
 
 Good, this suggests that having a Panel as a boilerplate and then turning
 off the parts that are not required is a recognised pattern. Otherwise I
 could foresee the proliferation of home made components reaching a point
 where it became a burden to know which one to use.
 
 On Wed, Apr 9, 2008 at 7:57 AM, John Patterson [EMAIL PROTECTED] wrote:
 

 You would also need to setVisible(false) on the WMC or wicket would throw
 an
 exception at the missing child components.  I use a simple class
 InvisibleComponent for this.


 Eric Rotick wrote:
 
  One more thing that was suggested in class.
 
  Is it possible to define a Panel which had all suitable and appropriate
  sub
  components and then to no-op the ones that were not needed?
 
  So in the earlier example there could be a panel
 
  wicket:panel
 
 
 
 
  /wicket:panel
 
  and if the image was not needed it could be no-op'ed out by defining a
  WebMarkupContainer but with no children.
 
  On Tue, Apr 8, 2008 at 6:53 PM, Eric Rotick [EMAIL PROTECTED]
 wrote:
 
  Many thanks for the clarification.
 
  As I am about to start teaching the rudiments of Wicket to a project
 team
  I guess the teacher should know what they are talking about.
 
 
  On Tue, Apr 8, 2008 at 6:50 PM, Igor Vaynberg
 [EMAIL PROTECTED]
  wrote:
 
   you dont need a panel for the repeater itself. as for variable
   component hierarchy inside the repeater itself, you are correct: you
   have to either use a panel or a fragment.
  
   -igor
  
  
   On Tue, Apr 8, 2008 at 9:37 AM, Eric Rotick [EMAIL PROTECTED]
   wrote:
I thought I understood the component hierarchy but then I started
 to
   tell
 the guys about it and now I'm not so sure.
   
 If the markup defines a hierarchy as A contains B contains C, in
   effect,
 this means that C is added to B which is added to A. If we expand
 B
   to be
 more complex we can use maybe a Panel which we identify as B but
   inside it
 is BA , BB and so on. So, all the time there is a direct
  relationship
 between the wicket identified tags in the markup and the
 components
   in the
 code.
   
 Now we introduce a repeater of some kind and it appears that the
   component
 hierarchy is broken but it's not. So if C was a repeater and it
 had
  4
 children then the hierarchy is still A to B to C but within C
 there
   is C to
 C1, C to C2 and so on.
   
 Now, if we need to have a runtime variable amount of markup which
 is
 variable, not in terms of the same markup repeated but completely
   different
 markup based on some logic then we might define a Panel which
  handles
   the
 variation. This is fine but what if the contents of the Panel is
  also
 variable. In this case further Panels are needed until the
 variable
 requirements are covered.
   
 Now the rub; although there are components, such as
   WebMarkupContainer which
 can be used to group components, the use of any component which
 is
   not
 'transparent' must have the related wicket:id in some markup
   somewhere.
   
 So, lets take an example where we have a list of items which can
 be
   just
 text or a link which has an optional image. It seems that I have
 to
   define
 panels for :-
   
   - wrapper panel for the list
   - a link with it's text
   - a link with it's text and image
   
 So we have markup such as
   
 wicket:panel
 ul
 li wicket:id=items/
 /ul
 /wicket:panel
   
 wicket:panel
   
   
   
 /wicket:panel
   
 wicket:panel
   
   
   
   
 /wicket:panel
   
 Have I got this correct or have I gone astray somewhere?
   
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Question-on-component-hierarchy-tp16567888p16580692.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/Question-on-component-hierarchy-tp16567888p16585990.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: Is there a Wicket spinner component?

2008-04-09 Thread Gerolf Seitz
On Wed, Apr 9, 2008 at 3:43 PM, Martijn Lindhout [EMAIL PROTECTED]
wrote:

 I guess you mean the cvs/svn repo, because there's nothing on the
 http://cwiki.apache.org/WICKET/wicket-stuff.html site?


this site is really old and should be updated (or removed?)




 wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis doesn't
 seem
 to work


yes, right now it doesn't work. browse the wicketstuff SVN repository (url
available on sf.net)
and look inside the wicketstuff-minis project.

  Gerolf



 2008/4/9, Gerolf Seitz [EMAIL PROTECTED]:
 
  the spinner in wicketstuff-minis should do the trick.
 
Gerolf
 
  On Wed, Apr 9, 2008 at 2:00 PM, Martijn Lindhout 
 [EMAIL PROTECTED]
  
  wrote:
 
 
   Something like this:  http://www.eclipse.org/swt/R3_1/spinner.png
  
   --
   Martijn Lindhout
   JointEffort IT Services
   http://www.jointeffort.nl
   [EMAIL PROTECTED]
   +31 (0)6 18 47 25 29
  
 



 --
 Martijn Lindhout
 JointEffort IT Services
 http://www.jointeffort.nl
 [EMAIL PROTECTED]
 +31 (0)6 18 47 25 29



Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4

2008-04-09 Thread Anders Peterson

How far away is wicket with generics? /Anders

Martijn Dashorst wrote:

If you are depending on trunk and build your own Wicket versions,
please note that trunk is now Wicket 1.4 and will be used for the next
Wicket version.

If you wish to continue building 1.3 jars then switch your local checkout to:

svn switch https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x

Martijn

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



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



Re: a transparent conversion of a CheckBoxMultipleChoice value

2008-04-09 Thread Vitaly Tsaplin
   What is going to happen if I call getModel on such a component? The
model should be properly unwrapped I suspect. It's a logical behavior.
Is it possible to achieve?

On Wed, Apr 9, 2008 at 3:03 PM, John Krasnay [EMAIL PROTECTED] wrote:
 On Tue, Apr 08, 2008 at 11:03:52PM +0200, Vitaly Tsaplin wrote:
  Yep. It looks simple and efficient. But it's quite a repetitive
   task. As I already mentioned I am going to create a component. And a
   data conversion should be its direct responsibility. The model wrapper
   cannot be provided from outside. It would be conceptually wrong in
   this case. I think this question is a bit wider then just a particular
   case with choices to bits conversion. I am getting running into this
   problem again and again. Wicket was created with a component driven
   design in mind and for, wasn't it?
  

  That's fine too. Create a panel, or subclass CheckBoxMultipleChoice, and
  have your panel|subclass apply the BitMapModel wrapper.

  Converters are primarily for use with TextFields. They can only convert
  to/from Strings.



  jk

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



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



Re: a transparent conversion of a CheckBoxMultipleChoice value

2008-04-09 Thread John Krasnay
On Wed, Apr 09, 2008 at 05:09:03PM +0200, Vitaly Tsaplin wrote:
What is going to happen if I call getModel on such a component? The
 model should be properly unwrapped I suspect. It's a logical behavior.
 Is it possible to achieve?

If you extend CheckBoxMultipleChoice, getModel() must return a
Collection. That's the contract that CheckBoxMultipleChoice offers, as
you will see when Wicket becomes generified in 1.4. If you create a
panel, then your model can be whatever you want, as long as you provide
an appropriate model to the CheckBoxMultipleChoice when you create it.

Wicket does no unwrapping of models; the fact that a model delegates a
portion of its operation to another model is purely an implementation
detail of that model.

jk

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



Re: AjaxSubmitLink accessing model object non-existent property

2008-04-09 Thread Igor Vaynberg
you can, just give the cpm reference to link as the model.

-igor


On Wed, Apr 9, 2008 at 1:31 AM, Tim Squires [EMAIL PROTECTED] wrote:
 OK.  It's clicked.  I was hoping to have a simple ajaxed submit link
  without having to create a fake property on the model object.  No problem,
  I can see what I missed.

  Thanks for your help Igor.

  Tim



   you said it yourself:
  
   Insure that the component identifier names match
   the appropriate property names.
  
   what that says is that the model you get is the property of the model
   object that is in the cpm with the name of component id.
  
   so since your links id is foo it will try to pull out the model
   object from the cpm and call getfoo() on it, the result of which is
   the model object of the link
  
   -igor
  
  
   On Tue, Apr 8, 2008 at 12:52 PM, Tim Squires [EMAIL PROTECTED] wrote:
   I have read it - a few times over the last 3 years of using Wicket and
even bought the book ;)
  
It says
  
To use a CompoundPropertyModel, simply set one as the model for a
container, such as a Form or a Page. Create the contained components
   with
no model of their own. Insure that the component identifier names match
the appropriate property names.
  
The AjaxSubmitLink is picking-up the parent forms compound property
   model
but only checking to see if the mylink property exists when onSubmit
calls getModelObject().
  
I would like to get the Forms model via getModelObject but because it
errors when called, I have to either set a false model on the
AjaxSubmitLink or get the model object outside of the onSubmit, assign
   it
to a final property and then use it in the onSubmit.
  
I'm happy to admit that I'm doing something wrong but I cannot see what
   it
is???
  
Thanks again,
Tim
  
  
  
 no, components do not randomly pick up models from their parents. i
 would suggest reading the models wiki page.

 -igor


 On Mon, Apr 7, 2008 at 3:11 PM, Tim [EMAIL PROTECTED] wrote:
 Thanks Igor but should it not pick-up the model from the Form?
   There's
 no
  constructor that takes a model.  Should the AjaxSubmitLink(id,
   form)
  constructor be used with the Form that it's being added to?  e..g

  MyForm extends Form {
  public MyForm(){
  
  add( new AjaxSubmitLink(mylink,this){
  
  });
  }}

  If it's already bound to a Form, should it not pick-up the model
   used
 by
  the form?

  Am I looking at the problem/solution the wrong way???

  Thanks again,
  Tim



   you forgot to give ajaxsubmitlink a model, so getmodelobject()
   will
   either return null or a compound model.confirm - neither of which
   i
   think you want.
  
   -igor
  
  
   On Mon, Apr 7, 2008 at 1:00 PM, Tim Squires [EMAIL PROTECTED]
   wrote:
   Hi,
  
When adding an AjaxSubmitLink, the onSubmit method tries to
   access
 a
property of the model object that does not exists:
  
---
   final AjaxSubmitLink confirmLink = new
AjaxSubmitLink(confirm) {
   @Override
   public void onSubmit(final AjaxRequestTarget
   target,
   final Form form) {
   if (((Will) getModelObject()).getExecutor()
   !=
 null)
   {
   willModalWindow.show(target);
   } else {
   warn(Please choose an executor.);
   target.addComponent(feedback);
   }
   }
  
   @Override
   public void onError(final AjaxRequestTarget
   target,
   final Form form) {
   target.addComponent(feedback);
   }
   };
  
   add(confirmLink);
---
  
It tries to access the confirm property of the Model, in this
 case a
Will object.
  
---
org.apache.wicket.WicketRuntimeException: No get method defined
   for
   class:
class crystalmark.willfinder.model.Will expression: confirm
at

 org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433)
at

 org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275)
at

 org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84)
at

 org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113)
at
 org.apache.wicket.Component.getModelObject(Component.java:1551)
at

 

Re: em tag in Link

2008-04-09 Thread Gerolf Seitz
in Application.init():
getMarkupSettings().setDefaultBeforeDisabledLink();
getMarkupSettings().setDefaultAfterDisabledLink();

  Gerolf

On Wed, Apr 9, 2008 at 5:32 PM, Beyonder Unknown [EMAIL PROTECTED]
wrote:


 Hi All,

 I was wondering if there's a way to get rid of the
 added em tag every time I disable the Link
 component?

 Thanks,
 Wen Tong

 --
 The only constant in life is change.

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

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




Re: a transparent conversion of a CheckBoxMultipleChoice value

2008-04-09 Thread Vitaly Tsaplin
   The method getModel will always return a wrapper and that fact
breaks an encapsulation. So we can say that any wrapping can be done
only from outside which is not good. A conversion is an essential
part of an internal component's functionality and it's normally
shoudn't be exposed. I am not so strict as you can think but since
wicket people are struggling for every final keyword in the API I am
trying to be conceptual as well :)

On Wed, Apr 9, 2008 at 5:30 PM, John Krasnay [EMAIL PROTECTED] wrote:
 On Wed, Apr 09, 2008 at 05:09:03PM +0200, Vitaly Tsaplin wrote:
  What is going to happen if I call getModel on such a component? The
   model should be properly unwrapped I suspect. It's a logical behavior.
   Is it possible to achieve?

  If you extend CheckBoxMultipleChoice, getModel() must return a
  Collection. That's the contract that CheckBoxMultipleChoice offers, as
  you will see when Wicket becomes generified in 1.4. If you create a
  panel, then your model can be whatever you want, as long as you provide
  an appropriate model to the CheckBoxMultipleChoice when you create it.

  Wicket does no unwrapping of models; the fact that a model delegates a
  portion of its operation to another model is purely an implementation
  detail of that model.



  jk

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



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



Re: em tag in Link

2008-04-09 Thread Beyonder Unknown

Thanks Gerolf! I appreciate it.

--- Gerolf Seitz [EMAIL PROTECTED] wrote:

 in Application.init():

getMarkupSettings().setDefaultBeforeDisabledLink();
 getMarkupSettings().setDefaultAfterDisabledLink();
 
   Gerolf
 
 On Wed, Apr 9, 2008 at 5:32 PM, Beyonder Unknown
 [EMAIL PROTECTED]
 wrote:
 
 
  Hi All,
 
  I was wondering if there's a way to get rid of the
  added em tag every time I disable the Link
  component?
 
  Thanks,
  Wen Tong
 
  --
  The only constant in life is change.
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 

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


--
The only constant in life is change.

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

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



Re: Bug in wicket-ajax.js introduced in Wicket 1.3.2?

2008-04-09 Thread Meetesh Karia
Unfortunately that patch doesn't solve the problem.  I've added a 
comment to the issue with a different patch which addresses our problem 
and the problem mentioned in the issue (I hope :) ).


Thanks,
Meetesh

Thijs wrote:

See

https://issues.apache.org/jira/browse/WICKET-1426



Meetesh Karia schreef:

Hi all,

We recently upgraded to Wicket 1.3.2 from Wicket 1.3.1 and we're 
seeing a bug with ajax behavior in Firefox (2.0.0.13 on Windows 
Vista).  Basically, the following header is returned from an ajax call:


?xml version=1.0 
encoding=UTF-8?ajax-responseheader-contribution 
encoding=wicket1 ![CDATA[head 
xmlns:wicket=http://wicket.apache.org;
   script src=/templates/mediaplayer/swfobject.js 
language=javascript/scriptscript type=text/javascript 
src=../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script 

script type=text/javascript 
src=../../resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script 

script type=text/javascript 
src=../../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script 

script type=text/javascript 
id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/

wicketAjaxDebugEnable=true;
/*--]^]^*//script

/head]]/header-contribution

The page this is called from has a URL that looks like this 
http://host/2008/foo/bar


In Wicket 1.3.1, the script /templates/mediaplayer/swfobject.js gets 
correctly loaded from


http://host/templates/mediaplayer/swfobject.js

However, in Wicket 1.3.2, it is incorrectly loaded from

http://host/2008/foo//templates/mediaplayer/swfobject.js

This appears to be related to one of these two changes:

http://fisheye6.cenqua.com/browse/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?r1=614229r2=619539 

http://fisheye6.cenqua.com/browse/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?r1=627225r2=628015 



I haven't narrowed it down but replacing wicket-ajax.js with the 
version from 1.3.1 makes it work again.


Should I file a bug for this?  Or is this going to be the new 
behavior going forward for Firefox?  Also, I'm guessing that the 
safest way to work around this problem is to remove those two changes 
and temporarily use a local build of wicket, right?


Thanks,
Meetesh




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



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-04-09 Thread Niels Bo

ok, I can put a try-catch(Throwable t) around the service() and log that
together with the request-url.
But since it is a production server, I am not able to get it deployed until
tomorrow evening, and right now we are doing ok with the workaround.

Niels
 

Johan Compagner wrote:
 
 if there was an error before that
 that should then be logged just before you log that there is a wrong state
 
 The way you do it now is in reverse
 
 the wrong state was already set in X number of request back
 so when you log it, You can;'t really tie it to a a specific request that
 did go wrong.
 
 If you log it later after the service method. Then you know that it did
 happen for that request
 And most likely there should be some error before that.. Because i dont
 see
 another way
 how it would be possible when the normal flow without exceptions would
 happen.
 
 johan
 
 
 On Wed, Apr 9, 2008 at 3:28 PM, Niels Bo [EMAIL PROTECTED] wrote:
 

 Hi
 How can I check/log if there are error for that thread?
 Niels


 Johan Compagner wrote:
 
  could you change that method that it checks this after the fact?
  and then see if there is an error for that thread before? for example
 also
  log the url call so that we can see
  what kind of request did let one thread local be there?
 
  Which one is it by the way?
  is it app, session or request cycle?
 
  i just checked our code and we have finally blocks pretty much every
 where
  in WicketFilter.doGet
  and in RequestCycle.steps
 
  And i have no idea how those can be jumped over.
 
  johan
 

 --
 View this message in context:
 http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16585768.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/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p16590574.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 Extensions

2008-04-09 Thread Andrew Broderick
Hi,

Is Wicket Extensions 1.2.7 compatible with Wicket 1.3? I downloaded it, but I 
can't find any mention of Wicket versions in the documentation

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Application Context

2008-04-09 Thread Pinger

So I am using wicket annot.

So I have classes elsewhere in my app that are using JMS and other services
in a web service. The issue I am having is I need the ApplicationContext in
non-wicket files. 

When I Do public static ApplicationContext spring = new
ClassPathXmlApplicationContext(applicationContext.xml);

this causes issues cause things are created 2 times..


Thanks
-- 
View this message in context: 
http://www.nabble.com/Application-Context-tp16592544p16592544.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]



MarkupCache change in 1.3.2 breaks style/variation/locale markup support

2008-04-09 Thread Meetesh Karia
We're running into a problem with the change made for this issue: 
http://issues.apache.org/jira/browse/WICKET-1370


Basically, if you have a situation like this where the Login page 
extends DefaultPage and uses wicket:extend:


Login.html
DefaultPage.html
DefaultPage_style1.html
DefaultPage_style2.html

The markup for DefaultPage will always be based on the first style the 
site is hit with.  This is because the location string (Login.html) 
hasn't changed with the style change.


Can anyone think of a simple way to work around this or a simple patch 
we can apply for now?


I've entered this issue for this as well: 
https://issues.apache.org/jira/browse/WICKET-1507


Thanks,
Meetesh


Re: Application Context

2008-04-09 Thread James McLaughlin
Have a look at Springs
WebApplicationContextUtils.getWebApplicationContext(...).  This in
conjunction with org.springframework.web.context.ContextLoaderListener
should give you what you need.

best,
jim

On Wed, Apr 9, 2008 at 12:41 PM, Pinger [EMAIL PROTECTED] wrote:

  So I am using wicket annot.

  So I have classes elsewhere in my app that are using JMS and other services
  in a web service. The issue I am having is I need the ApplicationContext in
  non-wicket files.

  When I Do public static ApplicationContext spring = new
  ClassPathXmlApplicationContext(applicationContext.xml);

  this causes issues cause things are created 2 times..


  Thanks
  --
  View this message in context: 
 http://www.nabble.com/Application-Context-tp16592544p16592544.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: MarkupCache change in 1.3.2 breaks style/variation/locale markup support

2008-04-09 Thread Johan Compagner
hmm this is now a tricky one..
i need to figure out how it should work now..


On Wed, Apr 9, 2008 at 8:04 PM, Meetesh Karia [EMAIL PROTECTED]
wrote:

 We're running into a problem with the change made for this issue:
 http://issues.apache.org/jira/browse/WICKET-1370

 Basically, if you have a situation like this where the Login page extends
 DefaultPage and uses wicket:extend:

 Login.html
 DefaultPage.html
 DefaultPage_style1.html
 DefaultPage_style2.html

 The markup for DefaultPage will always be based on the first style the
 site is hit with.  This is because the location string (Login.html) hasn't
 changed with the style change.

 Can anyone think of a simple way to work around this or a simple patch we
 can apply for now?

 I've entered this issue for this as well:
 https://issues.apache.org/jira/browse/WICKET-1507

 Thanks,
 Meetesh



Re: Application Context

2008-04-09 Thread Pinger

All the examples I see do something like


WebApplicationContext ctx = 
WebApplicationContextUtils.getRequiredWebApplicationContext(
this.getServletContext());

how do I do the this.getServletContext() when I am not in the wicket file? 

James McLaughlin-3 wrote:
 
 Have a look at Springs
 WebApplicationContextUtils.getWebApplicationContext(...).  This in
 conjunction with org.springframework.web.context.ContextLoaderListener
 should give you what you need.
 
 best,
 jim
 
 On Wed, Apr 9, 2008 at 12:41 PM, Pinger [EMAIL PROTECTED] wrote:

  So I am using wicket annot.

  So I have classes elsewhere in my app that are using JMS and other
 services
  in a web service. The issue I am having is I need the ApplicationContext
 in
  non-wicket files.

  When I Do public static ApplicationContext spring = new
  ClassPathXmlApplicationContext(applicationContext.xml);

  this causes issues cause things are created 2 times..


  Thanks
  --
  View this message in context:
 http://www.nabble.com/Application-Context-tp16592544p16592544.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Application-Context-tp16592544p16593219.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: MarkupCache change in 1.3.2 breaks style/variation/locale markup support

2008-04-09 Thread Johan Compagner
but then we are back at the original problem that we have many same
resources in the cache
that will be a real memory hog.

johan


On Wed, Apr 9, 2008 at 8:21 PM, Meetesh Karia [EMAIL PROTECTED]
wrote:

  What about adding the style and variation into the location string when
 it's used as a cache key.  That will prevent the problem with the locales,
 but will address the issue below too ...


 Johan Compagner wrote:

 hmm this is now a tricky one..
 i need to figure out how it should work now..


 On Wed, Apr 9, 2008 at 8:04 PM, Meetesh Karia [EMAIL PROTECTED]
 wrote:

  We're running into a problem with the change made for this issue:
  http://issues.apache.org/jira/browse/WICKET-1370
 
  Basically, if you have a situation like this where the Login page
  extends DefaultPage and uses wicket:extend:
 
  Login.html
  DefaultPage.html
  DefaultPage_style1.html
  DefaultPage_style2.html
 
  The markup for DefaultPage will always be based on the first style the
  site is hit with.  This is because the location string (Login.html) hasn't
  changed with the style change.
 
  Can anyone think of a simple way to work around this or a simple patch
  we can apply for now?
 
  I've entered this issue for this as well:
  https://issues.apache.org/jira/browse/WICKET-1507
 
  Thanks,
  Meetesh
 




Re: MarkupCache change in 1.3.2 breaks style/variation/locale markup support

2008-04-09 Thread Meetesh Karia
What about adding the style and variation into the location string when 
it's used as a cache key.  That will prevent the problem with the 
locales, but will address the issue below too ...


Johan Compagner wrote:

hmm this is now a tricky one..
i need to figure out how it should work now..


On Wed, Apr 9, 2008 at 8:04 PM, Meetesh Karia [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


We're running into a problem with the change made for this issue:
http://issues.apache.org/jira/browse/WICKET-1370

Basically, if you have a situation like this where the Login page
extends DefaultPage and uses wicket:extend:

Login.html
DefaultPage.html
DefaultPage_style1.html
DefaultPage_style2.html

The markup for DefaultPage will always be based on the first style
the site is hit with.  This is because the location string
(Login.html) hasn't changed with the style change.

Can anyone think of a simple way to work around this or a simple
patch we can apply for now?

I've entered this issue for this as well:
https://issues.apache.org/jira/browse/WICKET-1507

Thanks,
Meetesh




Re: MarkupCache change in 1.3.2 breaks style/variation/locale markup support

2008-04-09 Thread Igor Vaynberg
what if the cache knew the actual resource path of the resource also

then we can cache login.html, default.html, default_style1.html,
default_style2.html independently of what they actually map to...

-igor


On Wed, Apr 9, 2008 at 11:41 AM, Johan Compagner [EMAIL PROTECTED] wrote:
 but then we are back at the original problem that we have many same
  resources in the cache
  that will be a real memory hog.

  johan


  On Wed, Apr 9, 2008 at 8:21 PM, Meetesh Karia [EMAIL PROTECTED]
  wrote:


What about adding the style and variation into the location string when
   it's used as a cache key.  That will prevent the problem with the locales,
   but will address the issue below too ...
  
  
   Johan Compagner wrote:
  
   hmm this is now a tricky one..
   i need to figure out how it should work now..
  
  
   On Wed, Apr 9, 2008 at 8:04 PM, Meetesh Karia [EMAIL PROTECTED]


  wrote:
  
We're running into a problem with the change made for this issue:
http://issues.apache.org/jira/browse/WICKET-1370
   
Basically, if you have a situation like this where the Login page
extends DefaultPage and uses wicket:extend:
   
Login.html
DefaultPage.html
DefaultPage_style1.html
DefaultPage_style2.html
   
The markup for DefaultPage will always be based on the first style the
site is hit with.  This is because the location string (Login.html) 
 hasn't
changed with the style change.
   
Can anyone think of a simple way to work around this or a simple patch
we can apply for now?
   
I've entered this issue for this as well:
https://issues.apache.org/jira/browse/WICKET-1507
   
Thanks,
Meetesh
   
  
  


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



Re: Application Context

2008-04-09 Thread Edvin Syse

Pinger wrote:

All the examples I see do something like


WebApplicationContext ctx = 
	WebApplicationContextUtils.getRequiredWebApplicationContext(

this.getServletContext());

how do I do the this.getServletContext() when I am not in the wicket file? 


Maybe you could implement ServletContextAware?

-- Edvin

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



Re: Wicket Extensions

2008-04-09 Thread Martijn Dashorst
No. You need all versions to be equal for all projects. We release all
projects concurrently under the same version number. Why did you
download wicket extensions when it is in the distribution? Or why
didn't you just add it to your pom?

Martijn

On 4/9/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  Is Wicket Extensions 1.2.7 compatible with Wicket 1.3? I downloaded it, but 
 I can't find any mention of Wicket versions in the documentation

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214



-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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



Re: Application Context

2008-04-09 Thread Edvin Syse

.. or just implement ApplicationContextAware ofcourse :)

-- Edvin

Edvin Syse skrev:

Pinger wrote:

All the examples I see do something like


WebApplicationContext ctx = 
WebApplicationContextUtils.getRequiredWebApplicationContext(

this.getServletContext());

how do I do the this.getServletContext() when I am not in the wicket 
file? 


Maybe you could implement ServletContextAware?

-- Edvin

-
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]



Integrating Wicket and Jersey

2008-04-09 Thread Michael Laccetti

Is there any way to integrate Wicket and Jersey (REST framework) in the same
webapp without requiring each to have a unique mapping (Wicket filter set to
/web/* and Jersey filter set somewhere else)?  I looked into the web.xml to
see if there was a way to put exclusions in a filter mapping, but no go.

Mike

-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/Integrating-Wicket-and-Jersey-tp16595984p16595984.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: Wicket Extensions

2008-04-09 Thread Andrew Broderick
Oops! Didn't realize it was in the distribution blush

Thanks

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 09, 2008 2:17 PM
To: users@wicket.apache.org
Subject: Re: Wicket Extensions

No. You need all versions to be equal for all projects. We release all
projects concurrently under the same version number. Why did you
download wicket extensions when it is in the distribution? Or why
didn't you just add it to your pom?

Martijn

On 4/9/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  Is Wicket Extensions 1.2.7 compatible with Wicket 1.3? I downloaded it, but 
 I can't find any mention of Wicket versions in the documentation

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214



--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
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]



customize SignInPanel look and feel

2008-04-09 Thread Andrew Broderick
Hi,

How do I customize the markup for the stock SignInPanel?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Re: customize SignInPanel look and feel

2008-04-09 Thread James Carman
extend it

On Wed, Apr 9, 2008 at 4:46 PM, Andrew Broderick
[EMAIL PROTECTED] wrote:
 Hi,

  How do I customize the markup for the stock SignInPanel?

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214


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



Re: Integrating Wicket and Jersey

2008-04-09 Thread Igor Vaynberg
you can make both to /*

wicket is a filter, so if it thinks it cant handle the url it will let
it fall through at which point jersey will have a try

-igor


On Wed, Apr 9, 2008 at 1:31 PM, Michael Laccetti [EMAIL PROTECTED] wrote:

  Is there any way to integrate Wicket and Jersey (REST framework) in the same
  webapp without requiring each to have a unique mapping (Wicket filter set to
  /web/* and Jersey filter set somewhere else)?  I looked into the web.xml to
  see if there was a way to put exclusions in a filter mapping, but no go.

  Mike

  -
  --
  Michael Laccetti (416)558-9718
  S2G Limited   http://www.s2g.ca/
  --
  View this message in context: 
 http://www.nabble.com/Integrating-Wicket-and-Jersey-tp16595984p16595984.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Integrating Wicket and Jersey

2008-04-09 Thread Michael Laccetti

Ah, that's good news.  Appreciate the info.

Mike

igor.vaynberg wrote:
 
 you can make both to /*
 
 wicket is a filter, so if it thinks it cant handle the url it will let
 it fall through at which point jersey will have a try
 
 -igor
 


-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/Integrating-Wicket-and-Jersey-tp16595984p16597161.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: A few Wicket Questions

2008-04-09 Thread Maurice Marrink
  not out of the box. ISecurityStrategy does provide a central point to
  intercept lifecycle event, so you can easily do something like

  new isecuritystrategy() { boolean isactionallowed(component caction a) {
   if (pastLoadThreshold()component.render.equals(a)c instanceof
  degradable) {
  return false;
   } else { return true; }
  }

I think Igor means IAuthorizationStrategy. :)

Maurice

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



Re: ListView with images and getting absolut path

2008-04-09 Thread Maurice Marrink
URL url = getServletContext().getResource(/WEB-INF/templates/); will
give you a url instead of a file path if that is of any help.
You can use getServletContext from within your application.
Using tomcat i find this is usually a jndi url.

Maurice

On Wed, Apr 9, 2008 at 8:49 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 there are RequestUtils that can convert a wicket relative url to an
  absolute one, if thats what you are asking.

  there is no better way for you to get the src because direct access to
  WEB-INF is not allowed, so you do have to stream it using a middleman
  such as Image component instead of having the container stream it
  directly.

  -igor




  On Tue, Apr 8, 2008 at 11:24 PM, unka_hahrry [EMAIL PROTECTED] wrote:
  
I want that all image files in a given directory are shown on my site so 
 that
the admin can simply add/delete image files by editing the directory. So I
do this with ListView:
  
ImgListView imgListView = new ImgListView(listImageData, new
LoadableDetachableModel()
   {
   protected Object load()
   {
   Folder folder = new
Folder(D:/wicketex/Kunsthaus/context/WEB-INF/classes/ueberuns/images1);
   return Arrays.asList(folder.listFiles());
   }
   });
   add(imgListView);
  
So my first problem is: how can I get the absolut path for my Folder?
  
The images are added in the following way:
  
   public ImgListView(String name, final IModel files)
   {
   super(name, files);
   }
   protected void populateItem(ListItem listItem)
   {
   final File file = (File)listItem.getModelObject();
   Resource resource = new WebResource() {
  
   public IResourceStream getResourceStream() {
   IResourceStream stream = new FileResourceStream(file);
   return stream;
   }
   };
   Image image = new Image(imageFile, resource);
   image.add(new SimpleAttributeModifier(class, bildlinks));
   listItem.add(image);
   }
   }
  
Is there a better way of adding the src to my image component?
  
Thank you for your help!
--
View this message in context: 
 http://www.nabble.com/ListView-with-images-and-getting-absolut-path-tp16580373p16580373.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  

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



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



Re: Fail to close ModalWindow on top of ModalWindow

2008-04-09 Thread Maurice Marrink
Could you open up an issue for this?

Maurice

On Wed, Apr 9, 2008 at 10:16 AM, Nili Adoram [EMAIL PROTECTED] wrote:
 Hi all,
  I have a ModalWindow A containing a page  i.e. opened as an iframe.
  This modal opens another ModalWindow B containing a panel.
  Window B contains a simple AjaxLink that should close B.

  add(new AjaxLink(cancel) {

@Override
public void onClick(AjaxRequestTarget target) {

ModalWindow.closeCurrent(target);
}

});

  However, when I click this AjaxLink in order to close B the following
 message is displayed:
  'You can\'t close this modal window. Close the top-level modal window
 first.'

  This message is displayed since isIframe() returns true, which is
 problematic since B is not an iframe but a div.

  Is there a workaround for this issue ?

  --
  Best,
  Nili
  ===
  Nili Adoram
  GRM Team, RD, Qlusters Inc.
  [EMAIL PROTECTED]
  +972-3-6236636




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



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



Re: StringResourceModel parameter substitutions question

2008-04-09 Thread Maurice Marrink
Have you considered wrapping your parameters in models? In the
model.getObject you can then use your own toString function.

Maurice

On Wed, Apr 9, 2008 at 11:27 AM, TonyVegas [EMAIL PROTECTED] wrote:

  Hi!

  When setting a string via StringResourceModel and using parameters, the
  default operation in Wicket for retreiving the parameters' strings is to
  call PropertyVariableInterpolator.getValue(final String variableName) within
  the localizer.
  This operation retreives the string by simply calling the toString-method of
  the parameter.

  Our object's string representation is retreived by another operation though.
  So we need to call this operation rather than the toString.
  Is there any method to achieve this other than overwriting the localizer?

  Greetings,
  Tony
  --
  View this message in context: 
 http://www.nabble.com/StringResourceModel-parameter-substitutions-question-tp16582995p16582995.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: customize SignInPanel look and feel

2008-04-09 Thread Gerolf Seitz
or, you can really use roll your own.
last time i used it (for a small project for my studies),
it felt like it wasn't actually made with customization in mind.
and iirc, it's in the wicket-auth-roles project, so it's basically an
example
on how to do it.

  Gerolf

On Wed, Apr 9, 2008 at 10:48 PM, James Carman [EMAIL PROTECTED]
wrote:

 extend it

 On Wed, Apr 9, 2008 at 4:46 PM, Andrew Broderick
 [EMAIL PROTECTED] wrote:
  Hi,
 
   How do I customize the markup for the stock SignInPanel?
 
   Thanks
 
   ___
 
   The  information in this email or in any file attached
   hereto is intended only for the personal and confiden-
   tial  use  of  the individual or entity to which it is
   addressed and may contain information that is  propri-
   etary  and  confidential.  If you are not the intended
   recipient of this message you are hereby notified that
   any  review, dissemination, distribution or copying of
   this message is strictly prohibited.  This  communica-
   tion  is  for information purposes only and should not
   be regarded as an offer to sell or as  a  solicitation
   of an offer to buy any financial product. Email trans-
   mission cannot be guaranteed to be  secure  or  error-
   free. P6070214
 

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




Re: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-09 Thread Jeremy Thomerson
I finally am able to get a good analysis of it.  It dumped two memory dumps
when it died in the past couple days (it's still dying about once or twice a
day).  Using this GREAT tool:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Java/Java+Memory+AnalysisI
am able to see deep memory views that tell me what is taking up the
memory.

Each time it dies, it is usually during heavy web crawler traffic from
Google / Ask.com / etc.  The memory tool shows me having:
4585 instances of org.apache.catalina.session.StandardSession, totaling
984,160,016 bytes of memory (I give Tomcat 1GB).
4595 instances of com.texashuntfish.web.wicket.WebSession, totaling
530,524,680 bytes of memory.

I have had the session expiration turned down to 90 minutes in Tomcat for a
very long time.  So, this means that 4,585 sessions are created in 90
minutes, right?  It seems like I shouldn't have this many sessions, right?
Are the search engines crawlers creating a new session for every page they
hit?  I'm going to put some logging output in my subclass of WebSession that
tells me when it's being created, and by what IP so that I can take a look
at this.

Does anyone have any ideas?  I don't know what my session counts were in
1.2.6, but I never ran into this problem or ran out of memory, excecpt for
about a year and a half ago when I had session lengths turned up to a couple
days long.

Thank you,
Jeremy Thomerson


On Fri, Apr 4, 2008 at 12:03 AM, Jeremy Thomerson 
[EMAIL PROTECTED] wrote:

 Nope - one page never holds on to another.  I never even pass pages into
 another page or link or something as a reference.

 Interestingly, I DECREASED the memory the JVM could have from 1.5 GB to
 1.0 GB today, and it has been stable all day (after also releasing a version
 using Wicket 1.3.3).  That's not a definite sign - it was stable for several
 days after upgrading to 1.3.2 from 1.2.6 before freaking out.  But I'll
 watch it closely.  The memory creeped slowly up to the max, and has stayed
 there, but without the site crashing, and without any degradation of
 performance.  Does that give anyone any ideas?  I'm so exhausted, I think
 that I'm starting to lose my ability to think freshly about it.

 Thank you,
 Jeremy


 On Thu, Apr 3, 2008 at 5:44 PM, Matej Knopp [EMAIL PROTECTED] wrote:

  This is really weird. Do you have any inter-page references in your
  application?
 
  -Matej
 
  On Thu, Apr 3, 2008 at 9:35 PM, Jeremy Thomerson
  [EMAIL PROTECTED] wrote:
   The oddness is what baffles me: Tomcat has no output anywhere.  I have
grepped and tailed the entire Tomcat logs directory, stdout*,
  stderr*,
localhost*, etc.  Nothing in eventvwr.
  
It must be memory related, though.  There is a steadily increasing
  memory
footprint - it was increasing so fast yesterday because we were
  getting
pounded by tons of traffic and Google's crawler and Ask's crawler all
simultaneously.  Of course, the traffic was still no higher than it
  has been
in the past - this is definitely a new problem.
  
I redeployed today with the pending 1.3.3 release built by Frank to
  see if
my leak could be the same as Martijn's below, but the memory
  continues to
increase.  It will die soon.  I have added the parameter to tell it
  to dump
on OOM - hopefully I got the right parameter and it will work.
  
Anyone here know how to (or if you can) use jstat / jmap with
  tomcat5.exe,
running as Windows service?  All my development is on Linux machines,
  and I
can easily use those tools, but on the Windows prod environment
  (ughh), jps
doesn't give me a VMID for Tomcat.
  
Thank you for your help!
Jeremy
  
  
  
On Thu, Apr 3, 2008 at 2:27 PM, Al Maw [EMAIL PROTECTED] wrote:
  
 You can use as many anonymous inner classes as you like. I have
  them
 coming
 out of my ears, personally.

 It's very odd for tomcat to die with no output. There will be
  output
 somewhere. Check logs/catalina.out and also logs/localhost*. If the
  JVM
 dies, it will hotspot or even segfault and log that, at least. If
  you have
 gradually increasing memory footprint then this should be pretty
  easy to
 track down with a profiler.

 Make sure you run Tomcat with a sensible amount of permanent
  generation
 space (128M+).

 Regards,

 Alastair



 On Thu, Apr 3, 2008 at 6:43 AM, Martijn Dashorst 
 [EMAIL PROTECTED]
 wrote:

  There are commandline options for the jvm to dump on OOM.
 
  Anyway, doesn't the log file give any insight into what is
  happening
  in your application? Did you (or your sysadmin) disable logging
  for
  Wicket?
 
  You can also run external tools to see what is happening inside
  your
  JVM without blocking the app. e.g. use jmap -histo to see how
  many
  objects are alive at a particular moment. The top 10 is always
  interesting. In my case I found a memory 

Re: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-09 Thread Johan Compagner
4585 tomcat sessions?

thats quite large if may say that..
and even more 10 wicket sessions that tomcat sessions
Do you have multiply apps deployed on that server?

if a search engine doesnt send a cookie back then the urls should be encoded
with jsessionid
and we get the session from that..

johan



On Thu, Apr 10, 2008 at 12:22 AM, Jeremy Thomerson 
[EMAIL PROTECTED] wrote:

 I finally am able to get a good analysis of it.  It dumped two memory
 dumps
 when it died in the past couple days (it's still dying about once or twice
 a
 day).  Using this GREAT tool:

 https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Java/Java+Memory+AnalysisI
 am able to see deep memory views that tell me what is taking up the
 memory.

 Each time it dies, it is usually during heavy web crawler traffic from
 Google / Ask.com / etc.  The memory tool shows me having:
 4585 instances of org.apache.catalina.session.StandardSession, totaling
 984,160,016 bytes of memory (I give Tomcat 1GB).
 4595 instances of com.texashuntfish.web.wicket.WebSession, totaling
 530,524,680 bytes of memory.

 I have had the session expiration turned down to 90 minutes in Tomcat for
 a
 very long time.  So, this means that 4,585 sessions are created in 90
 minutes, right?  It seems like I shouldn't have this many sessions, right?
 Are the search engines crawlers creating a new session for every page they
 hit?  I'm going to put some logging output in my subclass of WebSession
 that
 tells me when it's being created, and by what IP so that I can take a look
 at this.

 Does anyone have any ideas?  I don't know what my session counts were in
 1.2.6, but I never ran into this problem or ran out of memory, excecpt for
 about a year and a half ago when I had session lengths turned up to a
 couple
 days long.

 Thank you,
 Jeremy Thomerson


 On Fri, Apr 4, 2008 at 12:03 AM, Jeremy Thomerson 
 [EMAIL PROTECTED] wrote:

  Nope - one page never holds on to another.  I never even pass pages into
  another page or link or something as a reference.
 
  Interestingly, I DECREASED the memory the JVM could have from 1.5 GB to
  1.0 GB today, and it has been stable all day (after also releasing a
 version
  using Wicket 1.3.3).  That's not a definite sign - it was stable for
 several
  days after upgrading to 1.3.2 from 1.2.6 before freaking out.  But I'll
  watch it closely.  The memory creeped slowly up to the max, and has
 stayed
  there, but without the site crashing, and without any degradation of
  performance.  Does that give anyone any ideas?  I'm so exhausted, I
 think
  that I'm starting to lose my ability to think freshly about it.
 
  Thank you,
  Jeremy
 
 
  On Thu, Apr 3, 2008 at 5:44 PM, Matej Knopp [EMAIL PROTECTED]
 wrote:
 
   This is really weird. Do you have any inter-page references in your
   application?
  
   -Matej
  
   On Thu, Apr 3, 2008 at 9:35 PM, Jeremy Thomerson
   [EMAIL PROTECTED] wrote:
The oddness is what baffles me: Tomcat has no output anywhere.  I
 have
 grepped and tailed the entire Tomcat logs directory, stdout*,
   stderr*,
 localhost*, etc.  Nothing in eventvwr.
   
 It must be memory related, though.  There is a steadily increasing
   memory
 footprint - it was increasing so fast yesterday because we were
   getting
 pounded by tons of traffic and Google's crawler and Ask's crawler
 all
 simultaneously.  Of course, the traffic was still no higher than it
   has been
 in the past - this is definitely a new problem.
   
 I redeployed today with the pending 1.3.3 release built by Frank to
   see if
 my leak could be the same as Martijn's below, but the memory
   continues to
 increase.  It will die soon.  I have added the parameter to tell it
   to dump
 on OOM - hopefully I got the right parameter and it will work.
   
 Anyone here know how to (or if you can) use jstat / jmap with
   tomcat5.exe,
 running as Windows service?  All my development is on Linux
 machines,
   and I
 can easily use those tools, but on the Windows prod environment
   (ughh), jps
 doesn't give me a VMID for Tomcat.
   
 Thank you for your help!
 Jeremy
   
   
   
 On Thu, Apr 3, 2008 at 2:27 PM, Al Maw [EMAIL PROTECTED] wrote:
   
  You can use as many anonymous inner classes as you like. I have
   them
  coming
  out of my ears, personally.
 
  It's very odd for tomcat to die with no output. There will be
   output
  somewhere. Check logs/catalina.out and also logs/localhost*. If
 the
   JVM
  dies, it will hotspot or even segfault and log that, at least. If
   you have
  gradually increasing memory footprint then this should be pretty
   easy to
  track down with a profiler.
 
  Make sure you run Tomcat with a sensible amount of permanent
   generation
  space (128M+).
 
  Regards,
 
  Alastair
 
 
 
  On Thu, Apr 3, 2008 at 6:43 AM, Martijn Dashorst 
  [EMAIL PROTECTED]
  wrote:

Re: Tomcat dying with Wicket 1.3.2 (Windows / JDK 1.5.0_10)

2008-04-09 Thread Jeremy Thomerson
Yes - quite large.  I'm hoping someone has an idea to overcome this.  There
were definitely not 4500+ unique users on the site at the time.

There were two copies of the same app deployed on that server at the time -
one was a staging environment, not being indexed, which is probably where
the extra ten wicket sessions came from.

Any ideas?

Jeremy


On 4/9/08, Johan Compagner [EMAIL PROTECTED] wrote:

 4585 tomcat sessions?

 thats quite large if may say that..
 and even more 10 wicket sessions that tomcat sessions
 Do you have multiply apps deployed on that server?

 if a search engine doesnt send a cookie back then the urls should be
 encoded with jsessionid
 and we get the session from that..

 johan



 On Thu, Apr 10, 2008 at 12:22 AM, Jeremy Thomerson 
 [EMAIL PROTECTED] wrote:

  I finally am able to get a good analysis of it.  It dumped two memory
  dumps
  when it died in the past couple days (it's still dying about once or
  twice a
  day).  Using this GREAT tool:
 
  https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Java/Java+Memory+AnalysisI
  am able to see deep memory views that tell me what is taking up the
  memory.
 
  Each time it dies, it is usually during heavy web crawler traffic from
  Google / Ask.com / etc.  The memory tool shows me having:
  4585 instances of org.apache.catalina.session.StandardSession, totaling
  984,160,016 bytes of memory (I give Tomcat 1GB).
  4595 instances of com.texashuntfish.web.wicket.WebSession, totaling
  530,524,680 bytes of memory.
 
  I have had the session expiration turned down to 90 minutes in Tomcat
  for a
  very long time.  So, this means that 4,585 sessions are created in 90
  minutes, right?  It seems like I shouldn't have this many sessions,
  right?
  Are the search engines crawlers creating a new session for every page
  they
  hit?  I'm going to put some logging output in my subclass of WebSession
  that
  tells me when it's being created, and by what IP so that I can take a
  look
  at this.
 
  Does anyone have any ideas?  I don't know what my session counts were in
  1.2.6, but I never ran into this problem or ran out of memory, excecpt
  for
  about a year and a half ago when I had session lengths turned up to a
  couple
  days long.
 
  Thank you,
  Jeremy Thomerson
 
 
  On Fri, Apr 4, 2008 at 12:03 AM, Jeremy Thomerson 
   [EMAIL PROTECTED] wrote:
 
   Nope - one page never holds on to another.  I never even pass pages
  into
   another page or link or something as a reference.
  
   Interestingly, I DECREASED the memory the JVM could have from 1.5 GB
  to
   1.0 GB today, and it has been stable all day (after also releasing a
  version
   using Wicket 1.3.3).  That's not a definite sign - it was stable for
  several
   days after upgrading to 1.3.2 from 1.2.6 before freaking out.  But
  I'll
   watch it closely.  The memory creeped slowly up to the max, and has
  stayed
   there, but without the site crashing, and without any degradation of
   performance.  Does that give anyone any ideas?  I'm so exhausted, I
  think
   that I'm starting to lose my ability to think freshly about it.
  
   Thank you,
   Jeremy
  
  
   On Thu, Apr 3, 2008 at 5:44 PM, Matej Knopp [EMAIL PROTECTED]
  wrote:
  
This is really weird. Do you have any inter-page references in your
application?
   
-Matej
   
On Thu, Apr 3, 2008 at 9:35 PM, Jeremy Thomerson
[EMAIL PROTECTED] wrote:
 The oddness is what baffles me: Tomcat has no output anywhere.  I
  have
  grepped and tailed the entire Tomcat logs directory, stdout*,
stderr*,
  localhost*, etc.  Nothing in eventvwr.

  It must be memory related, though.  There is a steadily
  increasing
memory
  footprint - it was increasing so fast yesterday because we were
getting
  pounded by tons of traffic and Google's crawler and Ask's crawler
  all
  simultaneously.  Of course, the traffic was still no higher than
  it
has been
  in the past - this is definitely a new problem.

  I redeployed today with the pending 1.3.3 release built by Frank
  to
see if
  my leak could be the same as Martijn's below, but the memory
continues to
  increase.  It will die soon.  I have added the parameter to tell
  it
to dump
  on OOM - hopefully I got the right parameter and it will work.

  Anyone here know how to (or if you can) use jstat / jmap with
tomcat5.exe,
  running as Windows service?  All my development is on Linux
  machines,
and I
  can easily use those tools, but on the Windows prod environment
(ughh), jps
  doesn't give me a VMID for Tomcat.

  Thank you for your help!
  Jeremy



  On Thu, Apr 3, 2008 at 2:27 PM, Al Maw [EMAIL PROTECTED] wrote:

   You can use as many anonymous inner classes as you like. I have
them
   coming
   out of my ears, personally.
  
   It's very odd for tomcat to die with no output. There will be
 

Failed to handle wicket:container

2008-04-09 Thread Jonathan Locke


I am currently trying to debug a markup handling problem where Wicket is
complaining that it Failed to handle: wicket:container wicket:id=xyz

I suspect that the problem is mine as I am mucking around with content types
to deal with mobile devices.  Any ideas on what might be wrong or what might
be a good approach for debugging this? Also, I've changed markup loading a
bit so it switches back and forth between .wml and .html files (falling back
on the .html if the .wml does not exist). Would this cause any havoc with
resolving this wicket:container tag?

Thanks,

Jon



-- 
View this message in context: 
http://www.nabble.com/Failed-to-handle-wicket%3Acontainer-tp16598980p16598980.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]



Navigation etc. URLs for DefaultDataTable - multiple issues

2008-04-09 Thread Ritz123

Hi,

I am trying to use DefaultDataTable - out of the box, the URLs generated for
the header (sorting) and navigation look really weird. I have setup
URLStrategy for the application and would like these DefaultDataTable URLs
to follow that stragegy. I have tried to enclose table inside
wicket:link but that didnt work. Any ideas?

Also, the header and navigation links (default ones) dont seem to be
working, I get Null pointer exception from my Data Access layer indicating
some ids for the entities (used in loadabledetachable) missing - either from
the url or from the component model somewhere. Any idea on how to debug
this?
-- 
View this message in context: 
http://www.nabble.com/Navigation-etc.-URLs-for-DefaultDataTable---multiple-issues-tp16599293p16599293.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]



BookmarkablePageLink Parameter order

2008-04-09 Thread Takeshi Matsuba
Hi all

Can I control parameter order?
I have been creating Blog software and using it.
I noticed parameter order changed. (sorry I don't know what change is trigger)

At Application class ,WebPage class is mounted.

mountBookmarkablePage(/page, Hoo.class);

At WebPage class, BookmarkablePageLink created.

PageParameters param = new PageParameters();
param.put(param1, string1);
param.put(param2, string2);
BookmarkablePageLink link = new BookmarkablePageLink(link, Hoo.class, param);

I expect that URL like this.
/page/param1/string1/param2/string2

But actual like this.
/page/param2/string2/param1/string1

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



Re: Navigation etc. URLs for DefaultDataTable - multiple issues

2008-04-09 Thread Igor Vaynberg
On Wed, Apr 9, 2008 at 5:05 PM, Ritz123 [EMAIL PROTECTED] wrote:

  Hi,

  I am trying to use DefaultDataTable - out of the box, the URLs generated for
  the header (sorting) and navigation look really weird. I have setup
  URLStrategy for the application and would like these DefaultDataTable URLs
  to follow that stragegy. I have tried to enclose table inside
  wicket:link but that didnt work. Any ideas?

sorting headers use stateful links, so they look like standard wicket
stateful links ?wicket:interface=foo:bar. if you want you can roll
your own headers toolbar that uses bookmarkable links.

  Also, the header and navigation links (default ones) dont seem to be
  working, I get Null pointer exception from my Data Access layer indicating
  some ids for the entities (used in loadabledetachable) missing - either from
  the url or from the component model somewhere. Any idea on how to debug
  this?

i doubt its wicket. the headers work just fine here [1] so it is
probably something in your code. if you want paste it here and we
might be able to help you

[1] 
http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.DataTablePage

-igor



  --
  View this message in context: 
 http://www.nabble.com/Navigation-etc.-URLs-for-DefaultDataTable---multiple-issues-tp16599293p16599293.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: BookmarkablePageLink Parameter order

2008-04-09 Thread Ryan Gravener
indexedparamurlcodingstrategy

On 4/9/08, Takeshi Matsuba [EMAIL PROTECTED] wrote:
 Hi all

 Can I control parameter order?
 I have been creating Blog software and using it.
 I noticed parameter order changed. (sorry I don't know what change is
 trigger)

 At Application class ,WebPage class is mounted.

 mountBookmarkablePage(/page, Hoo.class);

 At WebPage class, BookmarkablePageLink created.

 PageParameters param = new PageParameters();
 param.put(param1, string1);
 param.put(param2, string2);
 BookmarkablePageLink link = new BookmarkablePageLink(link, Hoo.class,
 param);

 I expect that URL like this.
 /page/param1/string1/param2/string2

 But actual like this.
 /page/param2/string2/param1/string1

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




-- 
Ryan Gravener
http://ryangravener.com

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



Re: A few Wicket Questions

2008-04-09 Thread Sam Stainsby
On Tue, 08 Apr 2008 17:29:16 -0700, Michael Mehrle wrote:

 In general, Wicket does a great job of giving your trace output of your
 template when something goes awry, including the component inheritance
 and suggestions as to what could be wrong.

And for that I am *very* thankful. I've only just started using wicket, 
for some new experimental work (combined with YUI and DB4O). Those error 
traces that simply tell you what is wrong and precisely where have saved 
me many of those painful hours that you normally experience when adapting 
to a new framework. Thanks Wicket developers, this and other aspects of 
Wicket (and DB4O too!) have converted me back to using Java.



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