Re: [Wicket-user] Re: Servlet forward to a JSP

2005-11-14 Thread Juergen Donnerstag
Shouldn't we add such functionality to core? Or at least extension. I
understand that the way it is implemented is because he didn't want to
patch core, but I assume it can be put into core and made available to
users more easily: no specific request and response wrapper etc.

Juergen

On 11/14/05, Robert McClay [EMAIL PROTECTED] wrote:
 Here's a starting point if anyone wants to include a servlet / jsp in
 their page via RequestDispatcher.

 public class IncludeServlet extends WebComponent {
   private static final long serialVersionUID = 1L;

   public IncludeServlet(String id) {
 super(id);
   }

   public IncludeServlet(String id, IModel model) {
 super(id, model);
   }

   protected void onComponentTagBody(MarkupStream markupStream,
 ComponentTag openTag) {
 ServletWebRequest   servletWebRequest =
 (ServletWebRequest) getRequest();
 HttpServletRequest  request =
 servletWebRequest.getHttpServletRequest();
 WebResponse webResponse = (WebResponse)
 getRequestCycle().getOriginalResponse();
 HttpServletResponse response =
 webResponse.getHttpServletResponse();
 RequestDispatcher   dispatcher = ((ServletWebRequest)
 getRequest()).getHttpServletRequest().getRequestDispatcher(getModelObjectAsString());


GenericServletResponseWrapper   wrappedResponse = new
 GenericServletResponseWrapper(response);

 try {
   dispatcher.include(request, wrappedResponse);
 } catch (ServletException e) {
   throw new RuntimeException(e);
 } catch (IOException e) {
   throw new RuntimeException(e);
 }
 replaceComponentTagBody(markupStream, openTag, new
 String(wrappedResponse.getData()));
   }
 }

 class GenericServletOutputStream extends ServletOutputStream {
   private OutputStream out;

   public GenericServletOutputStream(OutputStream out) {
 this.out = out;
   }

   public void write(int b) throws IOException {
 out.write(b);
   }

   public void write(byte[] b) throws IOException {
 out.write(b);
   }

   public void write(byte[] b, int off, int len) throws IOException {
 out.write(b, off, len);
   }
 }

 class GenericServletResponseWrapper extends HttpServletResponseWrapper {
   private ByteArrayOutputStream output;

   public GenericServletResponseWrapper(HttpServletResponse response) {
 super(response);
 output = new ByteArrayOutputStream();
   }

   public byte[] getData() {
 return output.toByteArray();
   }

   public ServletOutputStream getOutputStream() {
 return new GenericServletOutputStream(output);
   }

   public PrintWriter getWriter() {
 return new PrintWriter(getOutputStream(), true);
   }
 }

 On 2005-11-06 16:27:44 -0700, Eelco Hillenius [EMAIL PROTECTED] said:

  Ah, yes. True. It used to resolve local includes using
  javax.servlet.RequestDispatcher, i which case including request
  attributes would work. However, that proved to be quite problametic
  and we changed it to always use the absolute requests.
 
  What you need shouldn't be too hard however. But it is not something
  Wicket supports out-of-the-box (and I'm not sure whether that would be
  in Wicket's scope either).
 
  You don't need Wicket to tell stopping any processing, as that is
  already part of the idea of component orientation. What you need (to
  build) is a component that gets the content you want to include during
  it's rendering process. E.g. by letting your component extend from
  WebComponent and overriding method onComponentTagBody to do the work.
  In this method, you'll probably want to use the request processor:
 
RequestDispatcher dispatcher
  ((ServletWebRequest)getRequest()).getHttpServletRequest()
.getRequestDispatcher(*path-to-jsp*);
 
  For the including.
 
  Eelco




 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Keeping images outside of WEB-INF

2005-11-14 Thread Johan Compagner
Of course you save youre files to a server you have to know the folder where you have write access.
Then you can load them from that location just as fine as reading them from a database.
On 11/12/05, yongbl [EMAIL PROTECTED] wrote:
Hi all,

I wanted to display images that has been uploaded to a folder in the
server.Is this possible? In the examples that I have seen, the
images are stored next to the classes. 

Regards,
James Yong
		Do you Yahoo!? 
New and Improved Yahoo! Mail - 1GB free storage!



Re: [Wicket-user] Preserve form state

2005-11-14 Thread Johan Compagner
I will take this mail into account when i start workign on the Form Aware things 
(for example the selection change handler from a DropDown must also use the form)

johan
On 11/13/05, Matej Knopp [EMAIL PROTECTED] wrote:
Hi.I know this has been discussed already, but still I'm opening it oncemore. I think there should be a way to preserve form state withoutvalidation and model updating.The use case is following.
I have a (complex) form with some fields, that can not be entereddirectly, i.e. they have to be selected on other page. So I need to movebetween pages, but I don't want to lose any information entered on theprevious page. If I use Button, the form gets processed, validated, etc
and the action won't execute unless all entered data is valid. If I turndefaultProcessing off, the action executes, but the data (not written tomodel yet) is lost.What I'm using now is little hacky, but it works. I have my own class
derived from Form, my own SubmitButton, ImmediateButton andFeedbackPanel. ImmediateButton acts like classic Button withdefaultFormProcessing turned off, but unlike it, ImmediateButton storesthe state in each component (in the string reserved for invalid data).
So there's my own Feedback panel (Although filter would be probablyenough) that detects that ImmediateButton was clicked and hidesvalidation messages (there's a lot of them, because ImmediateButtonmarks every component as invalid).
This approach works pretty well, but doesn't feel quite right. I thinkthere definitely should be a way to preserve form state (withoutvalidation and updating model) directly supported by wicket.Not to mention that (if I recall correctly) the string field in
FormComponent used for storing invalid data is transient.Btw. I've managed to persuade people from my company to use wicket forone of our projects. Since I do most of the current development, it'snot a big deal, because I've personally been using wicket for some time
now. But I can say they are really impressed with the productivity andsimplicity of certain actions (like moving between complex pages forthand back ;) - that are sometimes quite difficult and cumbersome in struts.
Not to mention excellent DataView and DatePicker components, markupinheritance and compoents in general.Kudos wicket team, you're doing excelent work!Sorry for really long mail,-Matej
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] [Wicket-user] New to question on Wicket Application concept ?

2005-11-14 Thread Alexandru Popescu

#: Johan Compagner changed the world a bit at a time by saying on  11/14/2005 
12:04 PM :#

it is recommended but not really a requirement
(it works for the examples project just fine to have multiply Applications
in one WebApplication)



Is there anything else than what I mentioned when deciding which way to go?

./alex
--
.w( the_mindstorm )p.



On 11/13/05, Alexandru Popescu [EMAIL PROTECTED] wrote:


#: Martijn Dashorst changed the world a bit at a time by saying on
8/17/2005 9:41 PM :#
 Huy Do wrote:

 Perfect sense. Thanks Igor and Gili for your help.

 It was just a bit confusing looking at all the examples (cdapp etc)
 and seeing the way things are structured.

 Yeah, I can see that it is confusing. The examples are in fact different
 applications put into one war. Normally you'd only have one Application
 object for your WAR.

 Martijn


Sorry for reviving this quite old thread, but it was the only reference I
could find on Wicket
application concept and still I cannot find a good explanation for this
:-S.

It looks to me that the decission upon how you organize the web
application from the pov of
WebApplications must take into account:

i/ the ApplicationSettings you are using (and probably the most important
is the rendering strategy)
ii/ defining some kind of namespaces (f.e. context/users for user
management, context/roles for
roles management, etc.).

Does this make sense or it is mandatory/required/recommended to always use
a single WebApplication
for the whole web application?

./alex
--
.w( the_mindstorm )p.





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] [Wicket-user] New to question on Wicket Application concept ?

2005-11-14 Thread Johan Compagner
1 thats easy. Just make sure you say: RequestCycle.setRedirect(false) on the pages you don't want a redirect to.

If you use multiply webapplications then you must have X WicketServlets that all run under different (dir) context of course.

On 11/14/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
#: Johan Compagner changed the world a bit at a time by saying on11/14/2005 12:28 PM :# why would you use more then one application object inside 1 web application? Examples is just the strange one that woudn't happen normally
I have given the reasons in my first mail:1/ able to configure different render strategies for parts of the application (f.e. you can havesome read-only access in which case I don't see why not to use theONE_PASS_RENDER)
2/ to be able to handle some kind of namespaces.Still my question is valid, needing to better understand the reasons behind 1 application vsmultiple applications :-)../alex--.w( the_mindstorm )p.
 On 11/14/05, Alexandru Popescu [EMAIL PROTECTED] wrote: #: Johan Compagner changed the world a bit at a time by saying on
 11/14/2005 12:04 PM :#  it is recommended but not really a requirement  (it works for the examples project just fine to have multiply Applications  in one WebApplication)
  Is there anything else than what I mentioned when deciding which way to go? ./alex -- .w( the_mindstorm )p.
   On 11/13/05, Alexandru Popescu [EMAIL PROTECTED] wrote:   #: Martijn Dashorst changed the world a bit at a time by saying on
  8/17/2005 9:41 PM :#   Huy Do wrote: Perfect sense. Thanks Igor and Gili for your help.  
   It was just a bit confusing looking at all the examples (cdapp etc)   and seeing the way things are structured. Yeah, I can see that it is confusing. The examples are in fact
 different   applications put into one war. Normally you'd only have one Application   object for your WAR. Martijn
 Sorry for reviving this quite old thread, but it was the only reference I  could find on Wicket  application concept and still I cannot find a good explanation for this
  :-S.   It looks to me that the decission upon how you organize the web  application from the pov of  WebApplications must take into account:
   i/ the ApplicationSettings you are using (and probably the most important  is the rendering strategy)  ii/ defining some kind of namespaces (
f.e. context/users for user  management, context/roles for  roles management, etc.).   Does this make sense or it is mandatory/required/recommended to always
 use  a single WebApplication  for the whole web application?   ./alex  --  .w( the_mindstorm )p.
  ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Alexandru Popescu

#: Gili changed the world a bit at a time by saying on  11/14/2005 6:33 AM :#
	Ok, I've submitted 
http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety


Gili



According to Igor, the 3 bullet item is not valid, or at least this is my understanding. Considering 
that a request is guaranteed to be served by only one thread and the synchronization done, it looks 
like a page will be accessed by 1 and only 1 thread per request.


./alex
--
.w( the_mindstorm )p.


Igor Vaynberg wrote:

you hit a url with the page name you want and then click edit.
for example if you wanted to create this under a page called Session

go to url

http://www.wicket-wiki.org.uk/wiki/index.php/Session

and click the edit tab

-Igor


On 11/13/05, *Gili* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



I had no idea how to create a new Wiki page so I added this
instead:
http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc

How does one move this into a formal entry?

Gili

Igor Vaynberg wrote:
  dont know, if its not would you mind putting it in?
 
  -Igor
 
 
  On 11/13/05, *Gili*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
 
  Wow, this is very useful to know. Is it in Wiki
somewhere?
 
  Gili
 
  Igor Vaynberg wrote:
- Each user has a session associated with it. We
identify a
  user's
session using jsessionid.
   
   
The servlet container does the binding of session to user,
we ask the
container for the user session.
   
- Each session has a tree of pages associated with it.
This means
that a Page instance is not shared amongst users.
   
   
Yes, but the pages are not in a tree, they are in a PageMap.
   
   
- Each page may be accessed by at most one thread at a
time,
  but there
is no guarantee it'll be the same thread. That is, a
page is
  owned by a
single user but the thread being used might change
over time.
   
   
Yes.
   
The page is owned by a pagemap, and the pagemap is owned by a
  session.
When beginning request processing one of the first things
wicket
  does is
synchronize on the user's session so that only one request
thread can
process a request belonging to the same session user session.
   
-Igor
   
 
  --
  http://www.desktopbeautifier.com/
 
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Matej Knopp

Hi.

In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if the 
model is CompoundPropertyModel. Why do we have ICompoundModel then?


Shouldn't it only check if the model implements ICompoundModel?

-Matej


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Johan Compagner
No because components can have a ICompoundModel but not be the root because
they got there model from the root. (see initModel())

johan

On 11/14/05, Matej Knopp [EMAIL PROTECTED] wrote:
Hi.In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if themodel is CompoundPropertyModel. Why do we have ICompoundModel then?Shouldn't it only check if the model implements ICompoundModel?
-Matej---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] alternative for onrender() for extended Panel?

2005-11-14 Thread Marco van de Haar
We built a custom Tooltip which extends panel. In order to make ik IE 
compatible we need to render a simple IFRAME with some static content 
after we render our component. We want to make our Tooltip easy to 
extend, so I can not put it in HTML.


Normally you could put something like 
getResponse().write(IFRAME.../IFRAME) in the onRender() method. 
But for Panel this is final, so I can not overwrite it. Is there a 
way to solve this for a myPanel in my Java code?


desired output is something like:

span wicket:id=feedbacktooltip style=visibility:hidden; z-index:1; 
position:absolute id=id_fbi

wicket:panel
   .think lot's of code here
/wicket:panel
/span
IFRAME..some content here/IFRAME





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Matej Knopp

Sorry, I still don't understand.
What shoud I do if I want to have my own compound model, that is not 
derived from CompoundPropertyModel? Why is in Component#setModel a 
check, whether the model is instance of CompoundPropertyModel instand of 
ICompoundModel?


-Matej

Johan Compagner wrote:

No because components can have a ICompoundModel but not be the root because
they got there model from the root. (see initModel())

johan



On 11/14/05, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Hi.

In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if the
model is CompoundPropertyModel. Why do we have ICompoundModel then?

Shouldn't it only check if the model implements ICompoundModel?

-Matej


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] alternative for onrender() for extended Panel?

2005-11-14 Thread Juergen Donnerstag
why not add it inside the panel?

Juergen

On 11/14/05, Marco van de Haar [EMAIL PROTECTED] wrote:
 We built a custom Tooltip which extends panel. In order to make ik IE
 compatible we need to render a simple IFRAME with some static content
 after we render our component. We want to make our Tooltip easy to
 extend, so I can not put it in HTML.

 Normally you could put something like
 getResponse().write(IFRAME.../IFRAME) in the onRender() method.
 But for Panel this is final, so I can not overwrite it. Is there a
 way to solve this for a myPanel in my Java code?

 desired output is something like:

 span wicket:id=feedbacktooltip style=visibility:hidden; z-index:1;
 position:absolute id=id_fbi
  wicket:panel
.think lot's of code here
  /wicket:panel
 /span
 IFRAME..some content here/IFRAME





 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Keeping images outside of WEB-INF

2005-11-14 Thread James Yong
Johan Compagner jcompagner at gmail.com writes:

 
 
 Of course you save youre files to a server you have to know the folder where 
you have write access.
 Then you can load them from that location just as fine as reading them from a 
database.
 
Hi,

I used a label to generate the img tag. It works for me. But I am not sure if 
there is a more correct way to do. Any comments?

listItem.add(new Label(file_img, img src=' + childfolder + / + 
file.getName() +  ' /).setEscapeModelStrings(false).setRenderBodyOnly(true));

Regards,
james




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Keeping images outside of WEB-INF

2005-11-14 Thread Juergen Donnerstag
Another option could be to use Image and override onComponentTag

Juergen

On 11/14/05, James Yong [EMAIL PROTECTED] wrote:
 Johan Compagner jcompagner at gmail.com writes:

 
 
  Of course you save youre files to a server you have to know the folder where
 you have write access.
  Then you can load them from that location just as fine as reading them from 
  a
 database.
 
 Hi,

 I used a label to generate the img tag. It works for me. But I am not sure if
 there is a more correct way to do. Any comments?

 listItem.add(new Label(file_img, img src=' + childfolder + / +
 file.getName() +  ' 
 /).setEscapeModelStrings(false).setRenderBodyOnly(true));

 Regards,
 james




 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Using the same PagingNavigator on the same page yields OutOfMemoryError

2005-11-14 Thread Andrew Berman
Ok, when using Wicket 1.1, I was able to do this:

div wicket:id=pagingNavigator/div

div wicket:id=pagingNavigator/div

This allowed me to have the paging navigator at the top and bottom of the data. 

However, when using HEAD, I get java.lang.OutOfMemoryError: Java heap space.
It works if I just have one PagingNavigator. Is it illegal to
have an element with the same wicket:id on one page now? If so,
why? 

Thanks,

Andrew


[Wicket-user] Re: Using the same PagingNavigator on the same page yields OutOfMemoryError

2005-11-14 Thread Andrew Berman
I just did another test and did this:


div wicket:id=pagingNavigator/div

div wicket:id=pagingNavigator/div


I put them right after each other. Now the page infinitely builds
PagingNavigators and the screen just keeps going. It just keeps
going and going.

--Andrew
On 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote:
Ok, when using Wicket 1.1, I was able to do this:

div wicket:id=pagingNavigator/div

div wicket:id=pagingNavigator/div

This allowed me to have the paging navigator at the top and bottom of the data. 

However, when using HEAD, I get java.lang.OutOfMemoryError: Java heap space.
It works if I just have one PagingNavigator. Is it illegal to
have an element with the same wicket:id on one page now? If so,
why? 

Thanks,

Andrew




Re: [Wicket-user] Re: Using the same PagingNavigator on the same page yields OutOfMemoryError

2005-11-14 Thread Juergen Donnerstag
Yes it is illegal. It was in the past as well, but we didn't check it.
In order to support per-component re-render there has to be a 1:1
match.

Juergen

On 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote:
 I just did another test and did this:

 div wicket:id=pagingNavigator/div
 div wicket:id=pagingNavigator/div
 

 I put them right after each other.  Now the page infinitely builds
 PagingNavigators and the screen just keeps going.  It just keeps going and
 going.

 --Andrew



 On 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote:
  Ok, when using Wicket 1.1, I was able to do this:
 
  div wicket:id=pagingNavigator/div
  
  div wicket:id=pagingNavigator/div
 
  This allowed me to have the paging navigator at the top and bottom of the
 data.
 
  However, when using HEAD, I get java.lang.OutOfMemoryError: Java heap
 space.  It works if I just have one PagingNavigator.  Is it illegal to have
 an element with the same wicket:id on one page now?  If so, why?
 
  Thanks,
 
  Andrew
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Johan Compagner
Form form = new Form();
form.setModel(new MyCompoundModel); // set a compound model so it is the root!
TextField tf = new TextField(); // no model!

then tf.initModel() will get the forms model and use it as its own BUT it is not the root.

johan

On 11/14/05, Matej Knopp [EMAIL PROTECTED] wrote:
Sorry, I still don't understand.What shoud I do if I want to have my own compound model, that is notderived from CompoundPropertyModel? Why is in Component#setModel acheck, whether the model is instance of CompoundPropertyModel instand of
ICompoundModel?-MatejJohan Compagner wrote: No because components can have a ICompoundModel but not be the root because they got there model from the root. (see initModel())
 johan On 11/14/05, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi.
 In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if the model is CompoundPropertyModel. Why do we have ICompoundModel then? Shouldn't it only check if the model implements ICompoundModel?
 -Matej --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.
 Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Security / Page Access / Page Construction / IAuthorizationStrategy

2005-11-14 Thread Igor Vaynberg
if you are only working with bookmarkable pages, then yes, a
pagefactory can handle the security. If, however, you want to extend
this to non-bookmarkable pages you have two options: use the HEAD
version and implement the IAuthorizationPolicy, or if you need a more
stable code base to work off, do what the policy impl does and create a
base page with the default constructor that checks the security and
throws an error.

-Igor
On 11/13/05, Robert McClay [EMAIL PROTECTED] wrote:
I would like to enable page level security in my application. I don'twant my page to be constructed unless a certain security requirement ismet as at present I do a lot of data loading / etc in page constructors
(as featured in the wicket examples).It seems a new security policy is in the works to handle this --IAuthorizationStrategy. In the meantime, what would be a good way toprevent a bookmarkable page from being constructed? Should I provide a
new IPageFactory implementation that checks the session forauthorization prior to returning a new page, and perhaps swap the pageto a denied access or login page if access isn't available? Or should
I check out the latest CVS sources and try IAuthorization strategy ifit is implemented? Thanks.---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Igor Vaynberg
yes, a page instance is only accessed by 1 thread per request per user.

-Igor
On 11/14/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
#: Gili changed the world a bit at a time by saying on11/14/2005 6:33 AM :# Ok, I've submitted http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
 GiliAccording to Igor, the 3 bullet item is not valid, or at least this is my understanding. Consideringthat a request is guaranteed to be served by only one thread and the synchronization done, it looks
like a page will be accessed by 1 and only 1 thread per request../alex--.w( the_mindstorm )p. Igor Vaynberg wrote: you hit a url with the page name you want and then click edit.
 for example if you wanted to create this under a page called Session go to url http://www.wicket-wiki.org.uk/wiki/index.php/Session
 and click the edit tab -Igor On 11/13/05, *Gili* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote:
I had no idea how to create a new Wiki page so I added this instead: http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 How does one move this into a formal entry? Gili Igor Vaynberg wrote: dont know, if its not would you mind putting it in?
 -Igor On 11/13/05, *Gili*  [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote:
Wow, this is very useful to know. Is it in Wiki somewhere? Gili Igor Vaynberg wrote:
- Each user has a session associated with it. We identify a user's
session using jsessionid.
The servlet container does the binding of session to user, we ask the container for the user session.
- Each session has a tree of pages associated with it. This means
that a Page instance is not shared amongst users.
Yes, but the pages are not in a tree, they are in a PageMap.
- Each page may be accessed by at most one thread at a time, but there
is no guarantee it'll be the same thread. That is, a page is owned by a
single user but the thread being used might change over time. Yes.
The page is owned by a pagemap, and the pagemap is owned by a session.
When beginning request processing one of the first things wicket does is
synchronize on the user's session so that only one request thread can
process a request belonging to the same session user session. -Igor -- 
http://www.desktopbeautifier.com/---SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Johan Compagner
at the same time.On 11/14/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
yes, a page instance is only accessed by 1 thread per request per user.

-Igor
On 11/14/05, Alexandru Popescu 
[EMAIL PROTECTED] wrote:
#: Gili changed the world a bit at a time by saying on11/14/2005 6:33 AM :# Ok, I've submitted 
http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
 GiliAccording to Igor, the 3 bullet item is not valid, or at least this is my understanding. Consideringthat a request is guaranteed to be served by only one thread and the synchronization done, it looks
like a page will be accessed by 1 and only 1 thread per request../alex--.w( the_mindstorm )p. Igor Vaynberg wrote: you hit a url with the page name you want and then click edit.
 for example if you wanted to create this under a page called Session go to url 
http://www.wicket-wiki.org.uk/wiki/index.php/Session
 and click the edit tab -Igor On 11/13/05, *Gili* 
[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote:
I had no idea how to create a new Wiki page so I added this instead: 
http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 How does one move this into a formal entry? Gili Igor Vaynberg wrote: dont know, if its not would you mind putting it in?
 -Igor On 11/13/05, *Gili*  
[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote:
Wow, this is very useful to know. Is it in Wiki somewhere? Gili Igor Vaynberg wrote:
- Each user has a session associated with it. We identify a user's
session using jsessionid.
The servlet container does the binding of session to user, we ask the container for the user session.
- Each session has a tree of pages associated with it. This means
that a Page instance is not shared amongst users.
Yes, but the pages are not in a tree, they are in a PageMap.
- Each page may be accessed by at most one thread at a time, but there
is no guarantee it'll be the same thread. That is, a page is owned by a
single user but the thread being used might change over time. Yes.
The page is owned by a pagemap, and the pagemap is owned by a session.
When beginning request processing one of the first things wicket does is
synchronize on the user's session so that only one request thread can
process a request belonging to the same session user session. -Igor -- 
http://www.desktopbeautifier.com/---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 

http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




Re: [Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Matej Knopp

Still, this is not what I'm asking for.

class Component {
...
public Component setModel(final IModel model)
{
... 
// If a compound model is explicitly set on this component
if (model instanceof CompoundPropertyModel)
{
// we need to remember this for getModelObject()
setFlag(FLAG_HAS_ROOT_MODEL, true);
}
... }
}

I don't understand, why in setModel function, the FLAG_HAS_ROOT_MODEL is 
set only if model is instanceof CompoundPropertyModel.


Should it be
if (model instanceof ICompoundModel)
{
// we need to remember this for getModelObject()
setFlag(FLAG_HAS_ROOT_MODEL, true);
}
?

Because in your example, the form won't have this flag set unless the 
MyCompoundModel is derived from CompoundPropertyModel (just implementing 
ICompoundModel is not enough)


So initModel of the text field won't succeed, because Form has no root 
model, if MyCompoundModel isn't derived from CompoundPropertyModel.


-Matej

Johan Compagner wrote:

Form form = new Form();
form.setModel(new MyCompoundModel);  // set a compound model so it is 
the root!

TextField tf = new TextField(); // no model!

then tf.initModel()  will get the forms model and use it as its own BUT 
it is not the root.


johan



On 11/14/05, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Sorry, I still don't understand.
What shoud I do if I want to have my own compound model, that is not
derived from CompoundPropertyModel? Why is in Component#setModel a
check, whether the model is instance of CompoundPropertyModel
instand of
ICompoundModel?

-Matej

Johan Compagner wrote:
  No because components can have a ICompoundModel but not be the
root because
  they got there model from the root. (see initModel())
 
  johan
 
 
 
  On 11/14/05, *Matej Knopp* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
  Hi.
 
  In Component class, the flag FLAG_HAS_ROOT_MODEL is set only
if the
  model is CompoundPropertyModel. Why do we have ICompoundModel
then?
 
  Shouldn't it only check if the model implements ICompoundModel?
 
  -Matej
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App
Server.
  Download
  it for free - -and be entered to win a 42 plasma tv or your
very own
  Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  mailto: Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Using the same PagingNavigator on the same page yields OutOfMemoryError

2005-11-14 Thread Andrew Berman
Since it is illegal, I think Wicket should be throwing an Exception instead of yielding an OutOfMemoryError

--AndrewOn 11/14/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
Yes it is illegal. It was in the past as well, but we didn't check it.In order to support per-component re-render there has to be a 1:1match.JuergenOn 11/14/05, Andrew Berman 
[EMAIL PROTECTED] wrote: I just did another test and did this: div wicket:id=pagingNavigator/div div wicket:id=pagingNavigator/div
  I put them right after each other.Now the page infinitely builds PagingNavigators and the screen just keeps going.It just keeps going and going. --Andrew
 On 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote:  Ok, when using Wicket 1.1, I was able to do this:   div wicket:id=pagingNavigator/div
    div wicket:id=pagingNavigator/div   This allowed me to have the paging navigator at the top and bottom of the data. 
  However, when using HEAD, I get java.lang.OutOfMemoryError: Java heap space.It works if I just have one PagingNavigator.Is it illegal to have an element with the same wicket:id on one page now?If so, why?
   Thanks,   Andrew ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Alexandru Popescu

#: Johan Compagner changed the world a bit at a time by saying on  11/14/2005 
6:18 PM :#

at the same time.



What do you mean?

per request there is only 1 thread. or are you saying that during a request multiple threads are 
used? (this is contradicting with the servlet spec in fact, so I guess I am not reading correctly).


./alex
--
.w( the_mindstorm )p.


On 11/14/05, Igor Vaynberg [EMAIL PROTECTED] wrote:


yes, a page instance is only accessed by 1 thread per request per user.

-Igor


On 11/14/05, Alexandru Popescu [EMAIL PROTECTED]
wrote:

 #: Gili changed the world a bit at a time by saying on 11/14/2005 6:33
 AM :#
  Ok, I've submitted
  http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
 
  Gili
 

 According to Igor, the 3 bullet item is not valid, or at least this is
 my understanding. Considering
 that a request is guaranteed to be served by only one thread and the
 synchronization done, it looks
 like a page will be accessed by 1 and only 1 thread per request.

 ./alex
 --
 .w( the_mindstorm )p.

  Igor Vaynberg wrote:
  you hit a url with the page name you want and then click edit.
  for example if you wanted to create this under a page called Session
 
  go to url
 
  http://www.wicket-wiki.org.uk/wiki/index.php/Session
 
  and click the edit tab
 
  -Igor
 
 
  On 11/13/05, *Gili* [EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] wrote:
 
 
  I had no idea how to create a new Wiki page so I added this
  instead:
  http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 
  How does one move this into a formal entry?
 
  Gili
 
  Igor Vaynberg wrote:
   dont know, if its not would you mind putting it in?
  
   -Igor
  
  
   On 11/13/05, *Gili*  [EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] wrote:
  
  
   Wow, this is very useful to know. Is it in Wiki
  somewhere?
  
   Gili
  
   Igor Vaynberg wrote:
- Each user has a session associated with it. We
  identify a
   user's
session using jsessionid.
   
   
The servlet container does the binding of session to user,
  we ask the
container for the user session.
   
- Each session has a tree of pages associated with it.
  This means
that a Page instance is not shared amongst users.
   
   
Yes, but the pages are not in a tree, they are in a PageMap.
   
   
- Each page may be accessed by at most one thread at a
  time,
   but there
is no guarantee it'll be the same thread. That is, a
  page is
   owned by a
single user but the thread being used might change
  over time.
   
   
Yes.
   
The page is owned by a pagemap, and the pagemap is owned by a
   session.
When beginning request processing one of the first things
  wicket
   does is
synchronize on the user's session so that only one request
  thread can
process a request belonging to the same session user session.
   
-Igor
   
  
   --
   http://www.desktopbeautifier.com/
  
  



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server.
 Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user









---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wait Screen

2005-11-14 Thread Dipu



Hi,

In my project, one of the paths through the flow 
involves a step that may take as long as a minute or two. 
I would like to show a wait screen during this 
time. When the back-ground process is complete, I would like the wait screen to 
forward to the next page.Any suggestions as to how best accomplish this 
with Wicket?
Any help, examples, or suggestions would be appreciated.


Thanks 
Dipu


Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Matej Knopp
I assume he meant that multiple (different) threads can access the 
page/session during page lifecycle. But not during one request.


-Matej

Alexandru Popescu wrote:
#: Johan Compagner changed the world a bit at a time by saying on  
11/14/2005 6:18 PM :#



at the same time.



What do you mean?

per request there is only 1 thread. or are you saying that during a 
request multiple threads are used? (this is contradicting with the 
servlet spec in fact, so I guess I am not reading correctly).


./alex
--
.w( the_mindstorm )p.


On 11/14/05, Igor Vaynberg [EMAIL PROTECTED] wrote:



yes, a page instance is only accessed by 1 thread per request per user.

-Igor


On 11/14/05, Alexandru Popescu [EMAIL PROTECTED]
wrote:

 #: Gili changed the world a bit at a time by saying on 11/14/2005 6:33
 AM :#
  Ok, I've submitted
  http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
 
  Gili
 

 According to Igor, the 3 bullet item is not valid, or at least this is
 my understanding. Considering
 that a request is guaranteed to be served by only one thread and the
 synchronization done, it looks
 like a page will be accessed by 1 and only 1 thread per request.

 ./alex
 --
 .w( the_mindstorm )p.

  Igor Vaynberg wrote:
  you hit a url with the page name you want and then click edit.
  for example if you wanted to create this under a page called 
Session

 
  go to url
 
  http://www.wicket-wiki.org.uk/wiki/index.php/Session
 
  and click the edit tab
 
  -Igor
 
 
  On 11/13/05, *Gili* [EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] wrote:
 
 
  I had no idea how to create a new Wiki page so I added this
  instead:
  http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 
  How does one move this into a formal entry?
 
  Gili
 
  Igor Vaynberg wrote:
   dont know, if its not would you mind putting it in?
  
   -Igor
  
  
   On 11/13/05, *Gili*  [EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] wrote:
  
  
   Wow, this is very useful to know. Is it in Wiki
  somewhere?
  
   Gili
  
   Igor Vaynberg wrote:
- Each user has a session associated with it. We
  identify a
   user's
session using jsessionid.
   
   
The servlet container does the binding of session to user,
  we ask the
container for the user session.
   
- Each session has a tree of pages associated with it.
  This means
that a Page instance is not shared amongst users.
   
   
Yes, but the pages are not in a tree, they are in a PageMap.
   
   
- Each page may be accessed by at most one thread at a
  time,
   but there
is no guarantee it'll be the same thread. That is, a
  page is
   owned by a
single user but the thread being used might change
  over time.
   
   
Yes.
   
The page is owned by a pagemap, and the pagemap is owned by a
   session.
When beginning request processing one of the first things
  wicket
   does is
synchronize on the user's session so that only one request
  thread can
process a request belonging to the same session user session.
   
-Igor
   
  
   --
   http://www.desktopbeautifier.com/
  
  



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server.
 Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user









---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download

it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

__ NOD32 1.1284 (2005) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com







---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Using the same PagingNavigator on the same page yields OutOfMemoryError

2005-11-14 Thread Juergen Donnerstag
Agreed. Would you please of a bug for it. Thanks

Juergen

On 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote:
 Since it is illegal, I think Wicket should be throwing an Exception instead
 of yielding an OutOfMemoryError

 --Andrew


 On 11/14/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 
  Yes it is illegal. It was in the past as well, but we didn't check it.
  In order to support per-component re-render there has to be a 1:1
  match.
 
  Juergen
 
  On 11/14/05, Andrew Berman  [EMAIL PROTECTED] wrote:
   I just did another test and did this:
  
   div wicket:id=pagingNavigator/div
   div wicket:id=pagingNavigator/div
   
  
   I put them right after each other.  Now the page infinitely builds
   PagingNavigators and the screen just keeps going.  It just keeps going
 and
   going.
  
   --Andrew
  
  
  
   On 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote:
Ok, when using Wicket 1.1, I was able to do this:
   
div wicket:id=pagingNavigator/div

div wicket:id=pagingNavigator/div
   
This allowed me to have the paging navigator at the top and bottom of
 the
   data.
   
However, when using HEAD, I get java.lang.OutOfMemoryError: Java heap
   space.  It works if I just have one PagingNavigator.  Is it illegal to
 have
   an element with the same wicket:id on one page now?  If so, why?
   
Thanks,
   
Andrew
   
  
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Igor Vaynberg
we are talking about within the context of processing a request no?

we sync on the session so only one request-processing thread can be
inside a page instance during the processing of the request, so that
the page code does not need to be threadsafe.

whats the problem here?

-Igor
On 11/14/05, Matej Knopp [EMAIL PROTECTED] wrote:
I assume he meant that multiple (different) threads can access thepage/session during page lifecycle. But not during one request.-MatejAlexandru Popescu wrote: #: Johan Compagner changed the world a bit at a time by saying on
 11/14/2005 6:18 PM :# at the same time. What do you mean? per request there is only 1 thread. or are you saying that during a request multiple threads are used? (this is contradicting with the
 servlet spec in fact, so I guess I am not reading correctly). ./alex -- .w( the_mindstorm )p. On 11/14/05, Igor Vaynberg 
[EMAIL PROTECTED] wrote: yes, a page instance is only accessed by 1 thread per request per user. -Igor
 On 11/14/05, Alexandru Popescu [EMAIL PROTECTED] wrote:   #: Gili changed the world a bit at a time by saying on 11/14/2005 6:33
  AM :#   Ok, I've submitted   http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
 Gili According to Igor, the 3 bullet item is not valid, or at least this is  my understanding. Considering
  that a request is guaranteed to be served by only one thread and the  synchronization done, it looks  like a page will be accessed by 1 and only 1 thread per request.
   ./alex  --  .w( the_mindstorm )p.Igor Vaynberg wrote:   you hit a url with the page name you want and then click edit.
   for example if you wanted to create this under a page called Session go to url 
http://www.wicket-wiki.org.uk/wiki/index.php/Session and click the edit tab  
   -Igor   On 11/13/05, *Gili* [EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED] wrote:   I had no idea how to create a new Wiki page so I added this
   instead:   http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc  
   How does one move this into a formal entry? Gili Igor Vaynberg wrote:
dont know, if its not would you mind putting it in?   -Igor  
On 11/13/05, *Gili*  [EMAIL PROTECTED]   mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]   mailto: [EMAIL PROTECTED]
 wrote:  Wow, this is very useful to know. Is it in Wiki   somewhere?
   Gili   Igor Vaynberg wrote: - Each user has a session associated with it. We
   identify auser's session using jsessionid.
 The servlet container does the binding of session to user,   we ask the container for the user session.
 - Each session has a tree of pages associated with it.   This means that a Page instance is not shared amongst users.
 Yes, but the pages are not in a tree, they are in a PageMap.
 - Each page may be accessed by at most one thread at a   time,but there is no guarantee it'll be the same thread. That is, a
   page isowned by a single user but the thread being used might change   over time.
 Yes. The page is owned by a pagemap, and the pagemap is owned by a
session. When beginning request processing one of the first things   wicketdoes is
 synchronize on the user's session so that only one request   thread can process a request belonging to the same session user session.
 -Igor   --
http://www.desktopbeautifier.com/   ---
  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.  Download  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php  ___  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user
  --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server.
 Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user __ NOD32 1.1284 (2005) Information __ This message was checked by NOD32 antivirus system. 
http://www.eset.com---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing 

Re: [Wicket-user] Re: Using the same PagingNavigator on the same page yields OutOfMemoryError

2005-11-14 Thread Andrew Berman
https://sourceforge.net/tracker/index.php?func=detailaid=1356696group_id=119783atid=684975
On 11/14/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
Agreed. Would you please of a bug for it. ThanksJuergenOn 11/14/05, Andrew Berman [EMAIL PROTECTED] wrote: Since it is illegal, I think Wicket should be throwing an Exception instead
 of yielding an OutOfMemoryError --Andrew On 11/14/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
   Yes it is illegal. It was in the past as well, but we didn't check it.  In order to support per-component re-render there has to be a 1:1  match.   Juergen
   On 11/14/05, Andrew Berman  [EMAIL PROTECTED] wrote:   I just did another test and did this: div wicket:id=pagingNavigator/div
   div wicket:id=pagingNavigator/div    I put them right after each other.Now the page infinitely builds   PagingNavigators and the screen just keeps going.It just keeps going
 and   going. --Andrew On 11/14/05, Andrew Berman 
[EMAIL PROTECTED] wrote:Ok, when using Wicket 1.1, I was able to do this:   div wicket:id=pagingNavigator/div
div wicket:id=pagingNavigator/div   This allowed me to have the paging navigator at the top and bottom of the   data.
   However, when using HEAD, I get java.lang.OutOfMemoryError: Java heap   space.It works if I just have one PagingNavigator.Is it illegal to have
   an element with the same wicket:id on one page now?If so, why?   Thanks,   Andrew 
  ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Johan Compagner
ahh 
i read youre first message wrong because how it was written :)
Why do we have ICompoundModel then?

fixed it.

johan
On 11/14/05, Matej Knopp [EMAIL PROTECTED] wrote:
Still, this is not what I'm asking for.class Component {...public Component setModel(final IModel model){...//
If a compound model is explicitly set on this componentif
(model instanceof CompoundPropertyModel){//
we need to remember this for getModelObject()setFlag(FLAG_HAS_ROOT_MODEL,
true);}... }}I don't understand, why in setModel function, the FLAG_HAS_ROOT_MODEL isset only if model is instanceof CompoundPropertyModel.Should it beif
(model instanceof ICompoundModel){//
we need to remember this for getModelObject()setFlag(FLAG_HAS_ROOT_MODEL,
true);}?Because in your example, the form won't have this flag set unless theMyCompoundModel is derived from CompoundPropertyModel (just implementingICompoundModel is not enough)
So initModel of the text field won't succeed, because Form has no rootmodel, if MyCompoundModel isn't derived from CompoundPropertyModel.-MatejJohan Compagner wrote: Form form = new Form();
 form.setModel(new MyCompoundModel);// set a compound model so it is the root! TextField tf = new TextField(); // no model! then tf.initModel()will get the forms model and use it as its own BUT
 it is not the root. johan On 11/14/05, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote: Sorry, I still don't understand. What shoud I do if I want to have my own compound model, that is not derived from CompoundPropertyModel? Why is in Component#setModel a
 check, whether the model is instance of CompoundPropertyModel instand of ICompoundModel? -Matej Johan Compagner wrote: No because components can have a ICompoundModel but not be the
 root because they got there model from the root. (see initModel()) johan On 11/14/05, *Matej Knopp* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote: Hi.
In Component class, the flag FLAG_HAS_ROOT_MODEL is set only if the
model is CompoundPropertyModel. Why do we have ICompoundModel then?
Shouldn't it only check if the model implements ICompoundModel? -Matej ---
 SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
 http://sourceforge.net/geronimo.php ___ Wicket-user mailing list
 Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net
 mailto: Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user 
https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Component and FLAG_HAS_ROOT_MODEL

2005-11-14 Thread Matej Knopp


Okay, I should have written it in a different way. I just wasn't sure if 
it was a bug or an intention :)


-Matej

Johan Compagner wrote:

ahh
i read youre first message wrong because how it was written :)
Why do we have ICompoundModel then?

fixed it.

johan


On 11/14/05, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Still, this is not what I'm asking for.

class Component {
...
public Component setModel(final IModel model)
{
...
// If a compound model is explicitly set on this
component
if (model instanceof CompoundPropertyModel)
{
// we need to remember this for getModelObject()
setFlag(FLAG_HAS_ROOT_MODEL, true);
}
... }
}

I don't understand, why in setModel function, the FLAG_HAS_ROOT_MODEL is
set only if model is instanceof CompoundPropertyModel.

Should it be
if (model instanceof ICompoundModel)
{
// we need to remember this for getModelObject()
setFlag(FLAG_HAS_ROOT_MODEL, true);
}
?

Because in your example, the form won't have this flag set unless the
MyCompoundModel is derived from CompoundPropertyModel (just implementing
ICompoundModel is not enough)

So initModel of the text field won't succeed, because Form has no root
model, if MyCompoundModel isn't derived from CompoundPropertyModel.

-Matej

Johan Compagner wrote:
  Form form = new Form();
  form.setModel(new MyCompoundModel);  // set a compound model so it is
  the root!
  TextField tf = new TextField(); // no model!
 
  then tf.initModel()  will get the forms model and use it as its
own BUT
  it is not the root.
 
  johan
 
 
 
  On 11/14/05, *Matej Knopp* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
  Sorry, I still don't understand.
  What shoud I do if I want to have my own compound model, that
is not
  derived from CompoundPropertyModel? Why is in
Component#setModel a
  check, whether the model is instance of CompoundPropertyModel
  instand of
  ICompoundModel?
 
  -Matej
 
  Johan Compagner wrote:
No because components can have a ICompoundModel but not be
the
  root because
they got there model from the root. (see initModel())
   
johan
   
   
   
On 11/14/05, *Matej Knopp*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
   
Hi.
   
In Component class, the flag FLAG_HAS_ROOT_MODEL is
set only
  if the
model is CompoundPropertyModel. Why do we have
ICompoundModel
  then?
   
Shouldn't it only check if the model implements
ICompoundModel?
   
-Matej
   
   
---
SF.Net email is sponsored by:
Tame your development challenges with Apache's
Geronimo App
  Server.
Download
it for free - -and be entered to win a 42 plasma tv
or your
  very own
Sony(tm)PSP.  Click here to play:
  http://sourceforge.net/geronimo.php
http://sourceforge.net/geronimo.php
  http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net 
mailto: Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
 
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App
Server.
  Download
  it for free - -and be entered to win a 42 plasma tv or your
very own
  Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
  

Re: [Spam] [Wicket-user] New to question on Wicket Application concept ?

2005-11-14 Thread Alexandru Popescu

#: Johan Compagner changed the world a bit at a time by saying on  11/14/2005 
1:00 PM :#

1 thats easy. Just make sure you say: RequestCycle.setRedirect(false) on
the pages you don't want a redirect to.



I wasn't aware that this is the same as setting the ONE_PASS_RENDER strategy. 
Thanks.


If you use multiply webapplications then you must have X WicketServlets that
all run under different (dir) context of course.



Definitely (and I think there is no real problem doing this). Is there a way to emulate the 
`namespaces´ other than through multiple webapps?


./alex
--
.w( the_mindstorm )p.




On 11/14/05, Alexandru Popescu [EMAIL PROTECTED] wrote:


#: Johan Compagner changed the world a bit at a time by saying on
11/14/2005 12:28 PM :#
 why would you use more then one application object inside 1 web
application?
 Examples is just the strange one that woudn't happen normally


I have given the reasons in my first mail:

1/ able to configure different render strategies for parts of the
application (f.e. you can have
some read-only access in which case I don't see why not to use the
ONE_PASS_RENDER)
2/ to be able to handle some kind of namespaces.

Still my question is valid, needing to better understand the reasons
behind 1 application vs
multiple applications :-).

./alex
--
.w( the_mindstorm )p.


 On 11/14/05, Alexandru Popescu [EMAIL PROTECTED]
wrote:

 #: Johan Compagner changed the world a bit at a time by saying on
 11/14/2005 12:04 PM :#
  it is recommended but not really a requirement
  (it works for the examples project just fine to have multiply
 Applications
  in one WebApplication)
 

 Is there anything else than what I mentioned when deciding which way to
 go?

 ./alex
 --
 .w( the_mindstorm )p.

 
  On 11/13/05, Alexandru Popescu [EMAIL PROTECTED]
 wrote:
 
  #: Martijn Dashorst changed the world a bit at a time by saying on
  8/17/2005 9:41 PM :#
   Huy Do wrote:
  
   Perfect sense. Thanks Igor and Gili for your help.
  
   It was just a bit confusing looking at all the examples (cdapp
etc)
   and seeing the way things are structured.
  
   Yeah, I can see that it is confusing. The examples are in fact
 different
   applications put into one war. Normally you'd only have one
 Application
   object for your WAR.
  
   Martijn
  
 
  Sorry for reviving this quite old thread, but it was the only
reference
 I
  could find on Wicket
  application concept and still I cannot find a good explanation for
this
  :-S.
 
  It looks to me that the decission upon how you organize the web
  application from the pov of
  WebApplications must take into account:
 
  i/ the ApplicationSettings you are using (and probably the most
 important
  is the rendering strategy)
  ii/ defining some kind of namespaces (f.e. context/users for user
  management, context/roles for
  roles management, etc.).
 
  Does this make sense or it is mandatory/required/recommended to
always
 use
  a single WebApplication
  for the whole web application?
 
  ./alex
  --
  .w( the_mindstorm )p.
 
 



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] [Wicket-user] New to question on Wicket Application concept ?

2005-11-14 Thread Johan Compagner
it is recommended but not really a requirement 
(it works for the examples project just fine to have multiply Applications in one WebApplication)

On 11/13/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
#: Martijn Dashorst changed the world a bit at a time by saying on8/17/2005 9:41 PM :# Huy Do wrote: Perfect sense. Thanks Igor and Gili for your help. It was just a bit confusing looking at all the examples (cdapp etc)
 and seeing the way things are structured. Yeah, I can see that it is confusing. The examples are in fact different applications put into one war. Normally you'd only have one Application
 object for your WAR. MartijnSorry for reviving this quite old thread, but it was the only reference I could find on Wicketapplication concept and still I cannot find a good explanation for this :-S.
It looks to me that the decission upon how you organize the web application from the pov ofWebApplications must take into account:i/ the ApplicationSettings you are using (and probably the most important is the rendering strategy)
ii/ defining some kind of namespaces (f.e. context/users for user management, context/roles forroles management, etc.).Does this make sense or it is mandatory/required/recommended to always use a single WebApplication
for the whole web application?./alex--.w( the_mindstorm )p.---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Alexandru Popescu

#: Igor Vaynberg changed the world a bit at a time by saying on  11/14/2005 
6:49 PM :#

we are talking about within the context of processing a request no?

we sync on the session so only one request-processing thread can be inside a
page instance during the processing of the request, so that the page code
does not need to be threadsafe.

whats the problem here?

-Igor




From my side none :-). Just that the initial wiki was not clear enough and I coulnd't understand 
Johan's intervention.


./alex
--
.w( the_mindstorm )p.


On 11/14/05, Matej Knopp [EMAIL PROTECTED] wrote:


I assume he meant that multiple (different) threads can access the
page/session during page lifecycle. But not during one request.

-Matej

Alexandru Popescu wrote:
 #: Johan Compagner changed the world a bit at a time by saying on
 11/14/2005 6:18 PM :#

 at the same time.


 What do you mean?

 per request there is only 1 thread. or are you saying that during a
 request multiple threads are used? (this is contradicting with the
 servlet spec in fact, so I guess I am not reading correctly).

 ./alex
 --
 .w( the_mindstorm )p.

 On 11/14/05, Igor Vaynberg [EMAIL PROTECTED] wrote:


 yes, a page instance is only accessed by 1 thread per request per
user.

 -Igor


 On 11/14/05, Alexandru Popescu [EMAIL PROTECTED]
 wrote:
 
  #: Gili changed the world a bit at a time by saying on 11/14/2005
6:33
  AM :#
   Ok, I've submitted
   http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
  
   Gili
  
 
  According to Igor, the 3 bullet item is not valid, or at least this
is
  my understanding. Considering
  that a request is guaranteed to be served by only one thread and the
  synchronization done, it looks
  like a page will be accessed by 1 and only 1 thread per request.
 
  ./alex
  --
  .w( the_mindstorm )p.
 
   Igor Vaynberg wrote:
   you hit a url with the page name you want and then click edit.
   for example if you wanted to create this under a page called
 Session
  
   go to url
  
   http://www.wicket-wiki.org.uk/wiki/index.php/Session
  
   and click the edit tab
  
   -Igor
  
  
   On 11/13/05, *Gili* [EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED] wrote:
  
  
   I had no idea how to create a new Wiki page so I added this
   instead:
   http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
  
   How does one move this into a formal entry?
  
   Gili
  
   Igor Vaynberg wrote:
dont know, if its not would you mind putting it in?
   
-Igor
   
   
On 11/13/05, *Gili*  [EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
   mailto: [EMAIL PROTECTED] wrote:
   
   
Wow, this is very useful to know. Is it in Wiki
   somewhere?
   
Gili
   
Igor Vaynberg wrote:
 - Each user has a session associated with it. We
   identify a
user's
 session using jsessionid.


 The servlet container does the binding of session to user,
   we ask the
 container for the user session.

 - Each session has a tree of pages associated with it.
   This means
 that a Page instance is not shared amongst users.


 Yes, but the pages are not in a tree, they are in a PageMap.


 - Each page may be accessed by at most one thread at a
   time,
but there
 is no guarantee it'll be the same thread. That is, a
   page is
owned by a
 single user but the thread being used might change
   over time.


 Yes.

 The page is owned by a pagemap, and the pagemap is owned by a
session.
 When beginning request processing one of the first things
   wicket
does is
 synchronize on the user's session so that only one request
   thread can
 process a request belonging to the same session user session..

 -Igor

   
--
http://www.desktopbeautifier.com/
   
   
 
 
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Gili


	The point is still valid. Within the scope of a single request, only 
one thread will access it at a time, but there is no guarantee the next 
request to that page will use the same thread.


Gili

Igor Vaynberg wrote:

yes, a page instance is only accessed by 1 thread per request per user.

-Igor


On 11/14/05, *Alexandru Popescu* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


#: Gili changed the world a bit at a time by saying on  11/14/2005
6:33 AM :#
Ok, I've submitted
  http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety
 
  Gili
 

According to Igor, the 3 bullet item is not valid, or at least this
is my understanding. Considering
that a request is guaranteed to be served by only one thread and the
synchronization done, it looks
like a page will be accessed by 1 and only 1 thread per request.

./alex
--
.w( the_mindstorm )p.

  Igor Vaynberg wrote:
  you hit a url with the page name you want and then click edit.
  for example if you wanted to create this under a page called Session
 
  go to url
 
  http://www.wicket-wiki.org.uk/wiki/index.php/Session
http://www.wicket-wiki.org.uk/wiki/index.php/Session
 
  and click the edit tab
 
  -Igor
 
 
  On 11/13/05, *Gili* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
 
  I had no idea how to create a new Wiki page so I
added this
  instead:
 
http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc

http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 
  How does one move this into a formal entry?
 
  Gili
 
  Igor Vaynberg wrote:
dont know, if its not would you mind putting it in?
   
-Igor
   
   
On 11/13/05, *Gili*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   
   
Wow, this is very useful to know. Is it in Wiki
  somewhere?
   
Gili
   
Igor Vaynberg wrote:
  - Each user has a session associated with it. We
  identify a
user's
  session using jsessionid.
 
 
  The servlet container does the binding of session
to user,
  we ask the
  container for the user session.
 
  - Each session has a tree of pages associated
with it.
  This means
  that a Page instance is not shared amongst users.
 
 
  Yes, but the pages are not in a tree, they are in
a PageMap.
 
 
  - Each page may be accessed by at most one
thread at a
  time,
but there
  is no guarantee it'll be the same thread. That
is, a
  page is
owned by a
  single user but the thread being used might change
  over time.
 
 
  Yes.
 
  The page is owned by a pagemap, and the pagemap is
owned by a
session.
  When beginning request processing one of the first
things
  wicket
does is
  synchronize on the user's session so that only one
request
  thread can
  process a request belonging to the same session
user session.
 
  -Igor
 
   
--
http://www.desktopbeautifier.com/
   
   



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
http://www.desktopbeautifier.com/


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 

Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Igor Vaynberg
but that is a basic fact of servlet containers. they pool threads, how else can they work?

-Igor
On 11/14/05, Gili [EMAIL PROTECTED] wrote:
The point is still valid. Within the scope of a single request, onlyone thread will access it at a time, but there is no guarantee the nextrequest to that page will use the same thread.Gili
Igor Vaynberg wrote: yes, a page instance is only accessed by 1 thread per request per user. -Igor On 11/14/05, *Alexandru Popescu* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: #: Gili changed the world a bit at a time by saying on11/14/2005
 6:33 AM :# Ok, I've submitted http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety 
http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety Gili According to Igor, the 3 bullet item is not valid, or at least this
 is my understanding. Considering that a request is guaranteed to be served by only one thread and the synchronization done, it looks like a page will be accessed by 1 and only 1 thread per request.
 ./alex -- .w( the_mindstorm )p. Igor Vaynberg wrote: you hit a url with the page name you want and then click edit. for example if you wanted to create this under a page called Session
 go to url http://www.wicket-wiki.org.uk/wiki/index.php/Session
 http://www.wicket-wiki.org.uk/wiki/index.php/Session and click the edit tab
 -Igor On 11/13/05, *Gili* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote:
I had no idea how to create a new Wiki page so I added this instead: http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
How does one move this into a formal entry? Gili Igor Vaynberg wrote:
dont know, if its not would you mind putting it in? -Igor
On 11/13/05, *Gili*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
Wow, this is very useful to know. Is it in Wiki somewhere? Gili
Igor Vaynberg wrote:
- Each user has a session associated with it. We identify a user's
session using jsessionid.
The servlet container does the binding of session to user, we ask the
container for the user session.
- Each session has a tree of pages associated with it. This means
that a Page instance is not shared amongst users.
Yes, but the pages are not in a tree, they are in a PageMap.
- Each page may be accessed by at most one thread at a time, but there
is no guarantee it'll be the same thread. That is, a page is owned by a
single user but the thread being used might change over time.
Yes.
The page is owned by a pagemap, and the pagemap is owned by a session.
When beginning request processing one of the first things wicket does is
synchronize on the user's session so that only one request thread can
process a request belonging to the same session user session.
-Igor --
http://www.desktopbeautifier.com/ ---
 SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list
 Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user--http://www.desktopbeautifier.com/
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Locale problems

2005-11-14 Thread Gili

Hi,

	I wanted to add a Dutch version of my website so I created a file 
Page_nl_NL.html like the one in wicket-examples then changed my locale 
in FireFox to dutch (which it labeled solely as nl).


	This didn't work (the Dutch version of the page wouldn't display when I 
hit it). I then renamed the filename from _nl_NL to _nl and it fixed it. 
Any idea why? Will _nl.html act as a catch-all for all nl locales 
unless a style-specific file exists? That is, if I have page_nl.html and 
page_nl_NL.html will the former catch all nl locales except nl.nl?


Thank you,
Gili
--
http://www.desktopbeautifier.com/


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Locale problems

2005-11-14 Thread Gili


	Restarting the browser was somehow responsible. That is, if you don't 
restart the browser between locale changes they don't get picked up. 
nl_NL works fine.


	Question: is this caching caused by the browser or Wicket? I seem to 
remember the Wicket code assumes the locale doesn't change during the 
session. Is that true?


Gili

Gili wrote:

Hi,

I wanted to add a Dutch version of my website so I created a file 
Page_nl_NL.html like the one in wicket-examples then changed my locale 
in FireFox to dutch (which it labeled solely as nl).


This didn't work (the Dutch version of the page wouldn't display 
when I hit it). I then renamed the filename from _nl_NL to _nl and it 
fixed it. Any idea why? Will _nl.html act as a catch-all for all nl 
locales unless a style-specific file exists? That is, if I have 
page_nl.html and page_nl_NL.html will the former catch all nl locales 
except nl.nl?


Thank you,
Gili


--
http://www.desktopbeautifier.com/


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: FormFeedbackIndicator

2005-11-14 Thread Phil Kulak
Are you adding the text field?

On 11/10/05, Marco van de Haar [EMAIL PROTECTED] wrote:
 Typo, sorry, ofcourse I meant FormComponentFeedbackIndicator

  We're trying to test a TextField wit a FormFeedbackIndicator. but
  we keep getting a 'the following Components failed to render' error on
  testform.indicator.FormFeedbackIndicator when we submit the form with
  errors.
 
  java:
  ...
  testfield = new RequiredTextField(text, new
  PropertyModel(ValidatePage.this, textValue));
  testfield.add(LengthValidator.max(5));
  FormComponentFeedbackIndicator i = new
  FormComponentFeedbackIndicator(indicator);
  i.setIndicatorFor(testfield);
  form.add(i);
  ...
 
  html:
  input type=text wicket:id=text/div wicked:id=indicator/div
 
  What are we doing wrong?
 
  Marco  Ruud
 



 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Locale problems

2005-11-14 Thread Juergen Donnerstag
No. Wicket uses the locale information provided by the browser (http
header). And only if none is provided, it'll use the remembered one.

nl - is the standard dutch language
Some languages have dialects (not sure this is the right word.).
Think about like US english, UK english, NZ english etc. It's all
english, and it is not. The example is not the best one, but kind of.
Locale javadoc actually describes it fairly well.

Juergen

On 11/14/05, Gili [EMAIL PROTECTED] wrote:

 Restarting the browser was somehow responsible. That is, if you don't
 restart the browser between locale changes they don't get picked up.
 nl_NL works fine.

 Question: is this caching caused by the browser or Wicket? I seem to
 remember the Wicket code assumes the locale doesn't change during the
 session. Is that true?

 Gili

 Gili wrote:
  Hi,
 
  I wanted to add a Dutch version of my website so I created a file
  Page_nl_NL.html like the one in wicket-examples then changed my locale
  in FireFox to dutch (which it labeled solely as nl).
 
  This didn't work (the Dutch version of the page wouldn't display
  when I hit it). I then renamed the filename from _nl_NL to _nl and it
  fixed it. Any idea why? Will _nl.html act as a catch-all for all nl
  locales unless a style-specific file exists? That is, if I have
  page_nl.html and page_nl_NL.html will the former catch all nl locales
  except nl.nl?
 
  Thank you,
  Gili

 --
 http://www.desktopbeautifier.com/


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Hooks again

2005-11-14 Thread Sven Meier

I would like to repeat my request for additional hooks in Wicket, preferrably 
allowing WebRequestCycle#invokeInterface() to be overriden.
I've written before that I don't like the current hooks 
WebPage#beforeCallComponent() and WebPage#afterCallComponent() in scope of 
dependecy injection, but I digress.

I'm looking for a generic solution to display validation errors that have
their origin outside of Wicket (e.g. an EJB call on a remote server):

public interface SearchService
{
 public List search(Object example) throws ServiceValidationException;
}

add(button = new Button(saveButton)
{
 protected void onSubmit() {
   try
   {
 result = service.search(example);
   }
   catch (ServiceValidationException ex)
   {
 // TODO indicate validation
   }
 }
});

How the exception is indicated on Wicket components is *not* subject of this 
mail - I'm currently experimenting with something.

What I want to get rid of is the try-catch block surrounding all my button and 
link listeners, so I'd prefer something like:

add(button = new Button(saveButton)
{
 protected void onSubmit()
 {
   result = service.search(example);
 }
});

(Of course this requires ServiceValidationException to be a RuntimeException, 
but that's no problem for me.)
What I would need for this to work is a hook in Wicket. Once again the method 
invokeInterface() in WebRequestCycle would fit my needs, but regretfully it is 
private:

@override
protected void invokeInterface(final Component component, final Method method, 
final Page page)
{
 try
 {
   super.invokeInterface(component, method, page);
 } catch (ValidationException ex) {
   // TODO indicate validation
 }
}

Note that WebPage#beforeCallComponent() and WebPage#afterCallComponent() do not 
help me as they are not able to catch exceptions.

So here are my questions:
- Could the visibility of invokeInterface() be changed to protected? If not, 
why is invokeInterface() such a secret that this shouldn't be done.
- Is there already a hook in Wicket that I've missed? I know that I could write 
subclasses of Button and Link containing this try-catch block, but I'd rather 
have this in one central place outside of my pages.
- Are Wicket users utilizing other solution for this scenario?

Please note that I don't want to propose a general solution to be included in 
Wicket (or its sub-projects).
I just need (more) hooks to extend Wicket the way I need to - regretfully my 
previous plea for a protected invokeInterface() were not approved by this list.

Thanks

Sven



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Hooks again

2005-11-14 Thread Igor Vaynberg
see

protected Page onRuntimeException(final Page page, final RuntimeException e)

in the Application class

-Igor
On 11/14/05, Sven Meier [EMAIL PROTECTED] wrote:
I would like to repeat my request for additional hooks in Wicket, preferrably allowing WebRequestCycle#invokeInterface() to be overriden.I've
written before that I don't like the current hooks
WebPage#beforeCallComponent() and WebPage#afterCallComponent() in scope
of dependecy injection, but I digress.I'm looking for a generic solution to display validation errors that havetheir origin outside of Wicket (e.g. an EJB call on a remote server):public interface SearchService
{public List search(Object example) throws ServiceValidationException;}add(button = new Button(saveButton){protected void onSubmit() {try{result = service.search
(example);}catch (ServiceValidationException ex){// TODO indicate validation}}});How the exception is indicated on Wicket components is *not* subject of this mail - I'm currently experimenting with something.
What I want to get rid of is the try-catch block surrounding all my button and link listeners, so I'd prefer something like:add(button = new Button(saveButton){protected void onSubmit()
{result = service.search(example);}});(Of course this requires ServiceValidationException to be a RuntimeException, but that's no problem for me.)What
I would need for this to work is a hook in Wicket. Once again the
method invokeInterface() in WebRequestCycle would fit my needs, but
regretfully it is private:@overrideprotected void invokeInterface(final Component component, final Method method, final Page page){try{super.invokeInterface(component, method, page);
} catch (ValidationException ex) {// TODO indicate validation}}Note
that WebPage#beforeCallComponent() and WebPage#afterCallComponent() do
not help me as they are not able to catch exceptions.So here are my questions:-
Could the visibility of invokeInterface() be changed to protected? If
not, why is invokeInterface() such a secret that this shouldn't be done.-
Is there already a hook in Wicket that I've missed? I know that I could
write subclasses of Button and Link containing this try-catch block,
but I'd rather have this in one central place outside of my pages.- Are Wicket users utilizing other solution for this scenario?Please note that I don't want to propose a general solution to be included in Wicket (or its sub-projects).
I
just need (more) hooks to extend Wicket the way I need to - regretfully
my previous plea for a protected invokeInterface() were not approved by
this list.ThanksSven---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Spam] Re: [Wicket-user] Wicket thread safety

2005-11-14 Thread Johan Compagner
i just wanted to do an addition on igors line:
yes, a page instance is only accessed by 1 thread per request per user.

so that it is completely clear: (in my eyes)

yes, a page instance is only accessed by 1 thread per request per user at the same time.

because you could have more then 1 request for the user that will normally be handled by more then one thread (at the same time)
But we sync on the session so that this doesn't happen there can stil be 2 request that are handled by 2 threads 
but the handling of those threads in wicket is serialized so that the page is only access with one thread at the same time..


johan
On 11/14/05, Alexandru Popescu [EMAIL PROTECTED] wrote:
#: Johan Compagner changed the world a bit at a time by saying on11/14/2005 6:18 PM :# at the same time.What do you mean?per request there is only 1 thread. or are you saying that during a request multiple threads are
used? (this is contradicting with the servlet spec in fact, so I guess I am not reading correctly)../alex--.w( the_mindstorm )p. On 11/14/05, Igor Vaynberg 
[EMAIL PROTECTED] wrote: yes, a page instance is only accessed by 1 thread per request per user. -Igor On 11/14/05, Alexandru Popescu 
[EMAIL PROTECTED] wrote:   #: Gili changed the world a bit at a time by saying on 11/14/2005 6:33
  AM :#   Ok, I've submitted   http://www.wicket-wiki.org.uk/wiki/index.php/Thread_Safety  
   Gili According to Igor, the 3 bullet item is not valid, or at least this is  my understanding. Considering  that a request is guaranteed to be served by only one thread and the
  synchronization done, it looks  like a page will be accessed by 1 and only 1 thread per request.   ./alex  --  .w( the_mindstorm )p.
Igor Vaynberg wrote:   you hit a url with the page name you want and then click edit.   for example if you wanted to create this under a page called Session
 go to url http://www.wicket-wiki.org.uk/wiki/index.php/Session
 and click the edit tab -Igor   On 11/13/05, *Gili* 
[EMAIL PROTECTED]   mailto: [EMAIL PROTECTED] wrote:
   I had no idea how to create a new Wiki page so I added this   instead:   http://www.wicket-wiki.org.uk/wiki/index.php/User_talk:Cowwoc
 How does one move this into a formal entry? Gili Igor Vaynberg wrote:
dont know, if its not would you mind putting it in?   -Igor  On 11/13/05, *Gili*  
[EMAIL PROTECTED]   mailto: [EMAIL PROTECTED]mailto:
[EMAIL PROTECTED]   mailto: [EMAIL PROTECTED] wrote:   
   Wow, this is very useful to know. Is it in Wiki   somewhere?   Gili   
Igor Vaynberg wrote: - Each user has a session associated with it. We   identify auser's session using jsessionid.
 The servlet container does the binding of session to user,   we ask the container for the user session.
 - Each session has a tree of pages associated with it.   This means that a Page instance is not shared amongst users.
 Yes, but the pages are not in a tree, they are in a PageMap.
 - Each page may be accessed by at most one thread at a   time,but there is no guarantee it'll be the same thread. That is, a
   page isowned by a single user but the thread being used might change   over time.
 Yes. The page is owned by a pagemap, and the pagemap is owned by asession.
 When beginning request processing one of the first things   wicketdoes is synchronize on the user's session so that only one request
   thread can process a request belonging to the same session user session. -Igor
   --http://www.desktopbeautifier.com/  
 ---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
  Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user ---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Re: Re: My take on Spring integration

2005-11-14 Thread Maik Dobryn

Hi Igor,

I'm very new to Wicket. The last days I tried to figure out how the 
Spring integration in Wicket works.


There is a lot of confusion about the most recent practice. 
Unforturnatly, no documentation does exist which covers this important 
technique.


So would You please provide a small (code) example of setting up a 
Spring application context and injecting a bean at page level?


Thank You in advance,

Maik


on 2005-11-11 00:50 Igor Vaynberg wrote:
more refactoring/tests and some new things:

SpringWebApplicationFactory - which will pull the webapplication 
subclass out of spring application context


SpringInjector/SpringWebApplica tion - make it very simple to inject 
objects using @SpringBean annotation with lazy-init proxies


SpringWebPage - autoinitailizes its subclasses using the SpringInjector

I also deprecated all the old stuff and moved it into
wicket.contrib.spring.old package. The new stuff is the
official/supported/standard/whateveryouwanttocallit way to do spring
integration.

currently we only provide an easy way to inject objects using jdk5
annotations. it is possible to create a jdk1.4 object locator 
factories, but there are many options as to how to store metadata/do 
the lookup. if someone is interested in this please let me know and we 
can discuss some ways of doing this.


As always, any feedback is greatly appreciated.



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wait Screen

2005-11-14 Thread Johan Compagner
if you could you can use ajax for this.
But in a non ajax way i just use one page that has a meta refresh tag that checks every x seconds if the process is finished.
No - redirect to that wait page with the meta refresh
Yes - redirect to the result page.

johan
On 11/14/05, Dipu [EMAIL PROTECTED] wrote:







Hi,

In my project, one of the paths through the flow 
involves a step that may take as long as a minute or two. 
I would like to show a wait screen during this 
time. When the back-ground process is complete, I would like the wait screen to 
forward to the next page.Any suggestions as to how best accomplish this 
with Wicket?
Any help, examples, or suggestions would be appreciated.


Thanks 
Dipu




Re: [Wicket-user] Wait Screen

2005-11-14 Thread Nick Heudecker
The META Refresh method is pretty standard for all web app frameworks I've looked at.On 11/14/05, Johan Compagner 
[EMAIL PROTECTED] wrote:if you could you can use ajax for this.
But in a non ajax way i just use one page that has a meta refresh tag that checks every x seconds if the process is finished.
No - redirect to that wait page with the meta refresh
Yes - redirect to the result page.

johan
On 11/14/05, Dipu [EMAIL PROTECTED]
 wrote:







Hi,

In my project, one of the paths through the flow 
involves a step that may take as long as a minute or two. 
I would like to show a wait screen during this 
time. When the back-ground process is complete, I would like the wait screen to 
forward to the next page.Any suggestions as to how best accomplish this 
with Wicket?
Any help, examples, or suggestions would be appreciated.


Thanks 
Dipu






Re: [Wicket-user] Re: Keeping images outside of WEB-INF

2005-11-14 Thread Eelco Hillenius
Or use

public class SimpleImage extends WebComponent {

public SimpleImage(String id, String imgSrc) {
super(id, new Model(imgSrc));
}

public SimpleImage(String id, IModel imgSrcModel) {
super(id, imgSrcModel);
}

protected void onComponentTag(ComponentTag tag) {
tag.getAttributes().put(src, getModelObjectAsString());
}
}

Eelco


On 11/14/05, Johan Compagner [EMAIL PROTECTED] wrote:
 ok you do write in the webapplication directory..
  You do have always complete control over it where youre webapp will be
 installed on? And what kind of application server is used?
  Because you do know that writeable access isn't guarenteed? Or that it is
 even a directory at all?
  Application servers could just use the war directly without extracting it.

  If you can do that then i would just have the img tag directly in the
 html
  With a wicket id and then you use a label componet which only has a
 attribute modifier to set the src attribute.
  That looks to me as the cleanest method.




 On 11/14/05, James Yong [EMAIL PROTECTED] wrote:
  Johan Compagner jcompagner at gmail.com writes:
 
  
  
   Of course you save youre files to a server you have to know the folder
 where
  you have write access.
   Then you can load them from that location just as fine as reading them
 from a
  database.
  
  Hi,
 
  I used a label to generate the img tag. It works for me. But I am not sure
 if
  there is a more correct way to do. Any comments?
 
  listItem.add(new Label(file_img, img src=' + childfolder + / +
  file.getName() +  '
 /).setEscapeModelStrings(false).setRenderBodyOnly(true));
 
  Regards,
  james
 
 
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wait Screen

2005-11-14 Thread Phil Kulak
Meta refresh works and is a nice backup, but with AJAX you don't have
to have the user looking at a flickering screen and you can put images
and fancy things on the page. Here's how I do it.


RedirectHandler.java
Description: Binary data


Re: [Wicket-user] Re: Re: Re: My take on Spring integration

2005-11-14 Thread Phil Kulak
It's best to keep your app context beans in the Wicket application.
See the wicket-phonebook example in wicket-stuff cvs.

On 11/14/05, Maik Dobryn [EMAIL PROTECTED] wrote:
 Hi Igor,

 I'm very new to Wicket. The last days I tried to figure out how the
 Spring integration in Wicket works.

 There is a lot of confusion about the most recent practice.
 Unforturnatly, no documentation does exist which covers this important
 technique.

 So would You please provide a small (code) example of setting up a
 Spring application context and injecting a bean at page level?

 Thank You in advance,

 Maik


 on 2005-11-11 00:50 Igor Vaynberg wrote:
  more refactoring/tests and some new things:
  
  SpringWebApplicationFactory - which will pull the webapplication
  subclass out of spring application context
  
  SpringInjector/SpringWebApplica tion - make it very simple to inject
  objects using @SpringBean annotation with lazy-init proxies
  
  SpringWebPage - autoinitailizes its subclasses using the SpringInjector
  
  I also deprecated all the old stuff and moved it into
  wicket.contrib.spring.old package. The new stuff is the
  official/supported/standard/whateveryouwanttocallit way to do spring
  integration.
  
  currently we only provide an easy way to inject objects using jdk5
  annotations. it is possible to create a jdk1.4 object locator
  factories, but there are many options as to how to store metadata/do
  the lookup. if someone is interested in this please let me know and we
  can discuss some ways of doing this.
  
  As always, any feedback is greatly appreciated.
  


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Locale problems

2005-11-14 Thread pepone pepone
I have the same problem with firefox and Spanish but i think the
problem is that firefox only provide languajge code and no country
code, with Konkeror it runs fine for me


On 11/15/05, Johan Compagner [EMAIL PROTECTED] wrote:
 this is basic resource bundle lookup.

  if you have a Locale nl then the search starts from there so only
  Page_nl.html and Page.html are trying to be loaded.

  if you have a locale nl_NL

  then first Page_nl_NL. is tried then Page_nl. then Page.

  i don't think wicket uses the variant part of the locale so
 Page_nl_NL_variant.html is currently not possible.

  johan



 On 11/14/05, Gili [EMAIL PROTECTED] wrote:
 
  Ok, so now I'm confused.
 
  What happens if the browser provides locale nl and
 Page_nl_NL.html
  exists? I assume Wicket does not see this as a match and it returns the
  en-us version instead.
 
  What happens if locale nl_NL is provided by Wicket only finds
  Page_nl.html? Will it use it or use the en-us one?
 
  Thanks,
  Gili
 
  Juergen Donnerstag wrote:
   No. Wicket uses the locale information provided by the browser (http
   header). And only if none is provided, it'll use the remembered one.
  
   nl - is the standard dutch language
   Some languages have dialects (not sure this is the right word.).
   Think about like US english, UK english, NZ english etc. It's all
   english, and it is not. The example is not the best one, but kind of.
   Locale javadoc actually describes it fairly well.
  
   Juergen
  
   On 11/14/05, Gili [EMAIL PROTECTED] wrote:
  
  Restarting the browser was somehow responsible. That is, if you
 don't
  restart the browser between locale changes they don't get picked up.
  nl_NL works fine.
  
  Question: is this caching caused by the browser or Wicket? I
 seem to
  remember the Wicket code assumes the locale doesn't change during the
  session. Is that true?
  
  Gili
  
  Gili wrote:
  
  Hi,
  
  I wanted to add a Dutch version of my website so I created a file
  Page_nl_NL.html like the one in wicket-examples then changed my locale
  in FireFox to dutch (which it labeled solely as nl).
  
  This didn't work (the Dutch version of the page wouldn't display
  when I hit it). I then renamed the filename from _nl_NL to _nl and it
  fixed it. Any idea why? Will _nl.html act as a catch-all for all nl
  locales unless a style-specific file exists? That is, if I have
  page_nl.html and page_nl_NL.html will the former catch all nl locales
  except nl.nl?
  
  Thank you,
  Gili
  
  --
  http://www.desktopbeautifier.com/
  
  
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
 Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
  --
  http://www.desktopbeautifier.com/
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




--
play tetris http://pepone.on-rez.com/tetris


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Re: Re: My take on Spring integration

2005-11-14 Thread Igor Vaynberg
While I agree with Phil, a lot of other people do not. the spring
integration package is still very much a work in progress and thats why
ive spent very little time on the documentation. That said, all the
major pieces of it have javadoc and unit tests. What it lacks is an
overview, so here it is:

http://www.wicket-wiki.org.uk/wiki/index.php/Spring
I only had time for one pass, so its prob got some mistakes in it, feel free to add/fix/cleanup whatever you think it needs.

I am also attaching a patch for the wicket-phonebook project which
takes advantage of the new wicket-contrib-spring lazy init proxies.

-Igor

On 11/14/05, Phil Kulak [EMAIL PROTECTED] wrote:
It's best to keep your app context beans in the Wicket application.See the wicket-phonebook example in wicket-stuff cvs.On 11/14/05, Maik Dobryn [EMAIL PROTECTED] wrote:
 Hi Igor, I'm very new to Wicket. The last days I tried to figure out how the Spring integration in Wicket works. There is a lot of confusion about the most recent practice.
 Unforturnatly, no documentation does exist which covers this important technique. So would You please provide a small (code) example of setting up a Spring application context and injecting a bean at page level?
 Thank You in advance, Maik on 2005-11-11 00:50 Igor Vaynberg wrote:more refactoring/tests and some new things:SpringWebApplicationFactory - which will pull the webapplication
subclass out of spring application contextSpringInjector/SpringWebApplica tion - make it very simple to injectobjects using @SpringBean annotation with lazy-init proxies
SpringWebPage - autoinitailizes its subclasses using the SpringInjectorI also deprecated all the old stuff and moved it intowicket.contrib.spring.old package. The new stuff is the
official/supported/standard/whateveryouwanttocallit way to do springintegration.currently we only provide an easy way to inject objects using jdk5annotations. it is possible to create a 
jdk1.4 object locatorfactories, but there are many options as to how to store metadata/dothe lookup. if someone is interested in this please let me know and wecan discuss some ways of doing this.
As always, any feedback is greatly appreciated. --- This SF.Net email is sponsored by the JBoss Inc.Get Certified Today
 Register for a JBoss Training Course.Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: 
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user---This 
SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
Index: src/webapp/WEB-INF/web.xml
===
RCS file: /cvsroot/wicket-stuff/wicket-phonebook/src/webapp/WEB-INF/web.xml,v
retrieving revision 1.1
diff -u -r1.1 web.xml
--- src/webapp/WEB-INF/web.xml  8 Oct 2005 07:16:47 -   1.1
+++ src/webapp/WEB-INF/web.xml  15 Nov 2005 01:15:58 -
@@ -32,7 +32,7 @@
 servlet-classwicket.protocol.http.WicketServlet/servlet-class
 init-param
 param-nameapplicationFactoryClassName/param-name
-
param-valuewicket.contrib.phonebook.web.SpringApplicationFactory/param-value
+
param-valuewicket.contrib.spring.SpringWebApplicationFactory/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
Index: src/java/wicket/contrib/phonebook/web/page/BasePage.java
===
RCS file: 
/cvsroot/wicket-stuff/wicket-phonebook/src/java/wicket/contrib/phonebook/web/page/BasePage.java,v
retrieving revision 1.2
diff -u -r1.2 BasePage.java
--- src/java/wicket/contrib/phonebook/web/page/BasePage.java13 Oct 2005 
08:21:29 -  1.2
+++ src/java/wicket/contrib/phonebook/web/page/BasePage.java15 Nov 2005 
01:15:58 -
@@ -19,21 +19,33 @@
 package wicket.contrib.phonebook.web.page;
 
 import wicket.contrib.phonebook.ContactDao;
-import wicket.contrib.phonebook.web.PhonebookApplication;
+import wicket.contrib.spring.SpringWebPage;
+import wicket.contrib.spring.injection.SpringBean;
 import wicket.markup.html.WebPage;
 
 /**
  * Extends [EMAIL PROTECTED] WebPage} in order to provide the [EMAIL 
PROTECTED] #getContactDao}
  * method.
- *
+ * 
  * @author igor
  */
-public class BasePage extends WebPage {
+public class BasePage extends SpringWebPage {
+
+   /**
+* Here we specify that contactDao is a bean we wish