Re: Popup parent comunication

2007-11-08 Thread Johan Compagner
yeah there is already a call happening to the server. But maybe this is a
bug in the wicket javascript code, that it still thinks that the channel is
busy
what version do you use of wicket?

johan



On Nov 8, 2007 9:24 AM, serban.balamaci [EMAIL PROTECTED] wrote:


 I forgot to look in the ajax console. Here is what it says:
 INFO: Initiating Ajax GET request on

 /crm/app/?wicket:interface=:1:myForm:tabs:0:customTablePanel:rows:2:cells:3:cell:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=
 0.5604639175790322
 INFO: Invoking pre-call handler(s)...
 INFO: Chanel busy - postponing...
 INFO: Chanel busy - postponing...

 I guess that Channel busy must be the culprit.


 Mr Mean wrote:
 
  Not entirely sure about this, but i think this is because wicket is
  smart enough to figure out it has already sent the header, so it won't
  send it again. If you want to invoke that script again you should
  trigger it from your ajax call with target.appendJavaScript().
 
  Maurice
 
  On Nov 7, 2007 6:11 PM, serban.balamaci [EMAIL PROTECTED] wrote:
 
  Yes, you must be right, another issue against the modal window is that
  the
  datepicker does not work inside it, and I pretty much decided to stick
 to
  normal popups.
 
  Well it seems that i may have something here:
 
  In the parent page:
  add(new AbstractDefaultAjaxBehavior() {
  protected void respond(AjaxRequestTarget ajaxRequestTarget)
 {
  System.out.println(Ajax Method invoked);
  }
 
  protected void onRenderHeadContribution(final Response
  response)
  {
  super.onRenderHeadContribution(response);
  StringHeaderContributor header =
  new StringHeaderContributor(script
  language=\javascript\  +
  function call() { +
  getCallbackScript(false, true) + }; +
  /script);
  ((WebPage)getComponent().getPage()).add(header);
  }
  });
 
  In the popup window we have the link:
 
  Link link = new Link(addLink) {
  public void onClick() {
   System.out.println(Ajax Method invoked);
  }
 
  protected CharSequence getOnClickScript(CharSequence
  charSequence) {
  CharSequence click =
  super.getOnClickScript(charSequence);
  if(click == null) {
  return self.opener.call();;
  }
  return click + self.opener.call();;
  }
 
  };
 
 
  Current problem is that the method sometimes gets invoked sometimes it
  does
  not(the text Ajax Method invoked apears on the screen). Actually only
  the
  first time in most cases. The problem must be with the ajax call cause
 i
  added in the call function a debug message in javascript that gets
 always
  called(the call function).
 
  Anybody has any ideas why this is?
 
 
 
  Mr Mean wrote:
  
   if your modal dialog contains ajax tabs it should work, but all your
   user interaction from withing the dialog must be ajax.
  
   Maurice
  
   On Nov 7, 2007 1:50 PM, serban.balamaci [EMAIL PROTECTED]
 wrote:
  
   I cannot use the modal windows.
   They are plain popups. I do not know if there is a difference
 beetween
   modal
   windows that have a content a panel or a page, but i need to have
  tabbed
   pannels(which are links) inside the popup and by using a modal page
  with
   a
   panel content when i press on another tab(a link), i get the message
  that
   This action requires to navigate away from this page and the modal
   window
   will close and after pressing it does close the modal window.
  
   I am currently trying the 3rd option, i think i can write the
  javascript
   for
   the ajax request.
   I will post the solution if i get it working.
  
  
  
   Mr Mean wrote:
   
Are you using the ModalWindow? in that case you need to set the
PageCreator to return your page, don't use panels. Second you need
  to
set a callbackhandler for the windowclose event. There you must
  update
your combo.
   
Maurice
   
On Nov 7, 2007 12:09 PM, serban.balamaci [EMAIL PROTECTED]
  wrote:
   
Hello!
I have the following problem. I have a parent page, that opens a
  popup
through a PageLink.
The popup window is a window in which new records can be added,
 but
  i
need a
combo in the parent page to reflect and contain also the new
 choice
   added
in
the popup.
   
1. Reloading the whole parent page at popup close link pressed i
  would
take
as the last resolve because the user may have introduced data in
  the
controls that would get lost in the reloading process. I could
 get
   around
this by adding a submit behaviour to the link and save in session
  the
values
inserted till that moment and 

Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Johan Compagner
Yes that is the solution that also gets my vote for 1.4 if we can implement
it
nicely and if it is backwards compartible and straightforward to use.

johan



On Nov 8, 2007 10:37 AM, Jan Kriesten [EMAIL PROTECTED] wrote:


 hi everyone,

 actually, i wonder what is wrong with al's suggestion to add id's to
 wicket:child and wicket:extend?

 regards, --- jan.


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




RE: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Chris Colman
  The advantage of having this separate project
  is that such inheritance would be available for people who like it,
  and hey, maybe in the longer term you have something that works so
  good that you can convince people based on something that works.
  Executable code works much better than simply words when it comes to
  that ;-)

Having it as a separate project is better than no project at all. I'd be
glad to use that if a separate project is the only option on offer. 

As it's a separate project we'll need different tag names. I'm not sure
if you caught my 11th hour submission on your final summary post:

Suggested minor modification to the design:

Call tags default and override instead of abstract and
implements - it's less *techie* plus it allows us to define a default
markup section in a base page that can be optionally overridden in any
derived pages. That's even more OO and allows even greater simplicity
through reusability.

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



Re: wicketstuff push and sharing an IChannelService

2007-11-08 Thread Xavier Hanin
On 11/6/07, Michael Sparer [EMAIL PROTECTED] wrote:


 Salut Xavier,


Hallo Michael,

I was wondering if I could/should commit the changes I made to wicketstuff
 push to the svn. In brief, this is what I did:

 1. Extended the CometdDefaultBehaviorTemplate.js with the following if
 clause
 var doRoundTrip = true;
 if(prop == script) {
 doRoundTrip = false;
 eval(message.data[prop]);
 } else {
 addToUrl = addToUrl +  + prop + = + message.data[prop]; // this
 line was there before
 }
 if (doRoundTrip) {
 var wcall=wicketAjaxGet('${url}' + addToUrl, function() { },
 function()
 { });
 }

 This makes it possible to send javascript code as String to the client
 without doing a roundtrip to the server to retrieve the wicket-components.
 The JS just checks if the property is named script and then executes the
 javascript. This is meant for cases when you just want to make minor
 changes
 to the DOM and/or reduce traffic.

 2. Created a new ChannelEvent and a new ChannelListener for the mentioned
 javascript only channel events

 Please tell me what you think about it.


This sounds like an interesting change, go ahead, commit your changes, I'm
pretty sure Vincent won't object (and svn revert is always here in case of
problem). Are you already a committer on wicket stuff?

Xavier

regards


 Xavier Hanin wrote:
 
  On 10/25/07, Michael Sparer [EMAIL PROTECTED] wrote:
 
 
  Hi Xavier,
 
  thanks for your effort but please don't take too much time
 investigating
  my
  issues :-)
 
  I'm using wicket 1.3.0-beta3 and wicketstuff push... well since it
  doesn't
  show the svn version numbers the version of monday this week.
 
 
  This is very similar to what I use (with a new version of
 wicketstuff-push
  I
  pushed on tuesday I think, which fixes a problem with backward button).
  But
  if you use the dojo based implementation, I can't speak much about it
  since
  Vincent did all the job.
 
  Yesterday I
  had a more thorough look into what's exactly happening i.e. how the
 push
  project interacts with the wicketstuff dojo project and integrates
  cometd.
  There I found out that in order to communicate with wicket there's an
  extra
  round trip to the server taking place. So the channel sends a message
 to
  the
  client-javascript (including the data to be shown on page) which then
  makes
  an ajax call back to the server where the data gets rendered into xml
 and
  is
  then shown on the page. I wondered if that was intentional and if yes,
  what
  purpose it serves.
 
 
  From my understanding (but I didn't develop this) the problem is that
 it's
  not straightforward to render a wicket component outside a web request,
 so
  the additional cycle is there to call the rendering in a normal web
  request: comet is only used to detect there is something to refresh,
 then
  the refresh is done with a usual wicket ajax call. But I may be wrong...
 
  For my project I've changed the java-script function which starts the
 AJAX
  call sothat it renderes the message to proper javascript and directly
  inserts it in the document's DOM without making an additional call.
 This
  however, makes the server site less flexible as only a javascript
 string
  can
  be processed on client site - but that's ok for my app.
 
 
  Indeed if you don't need component rendering reducing the cycles is
  better.
  I had plan to work on a comet based implementation of IPushService some
  time
  ago, but I've never found the time... If I do one day I'll try to reduce
  the
  cycles to as less as possible, and I may also have to review some
  component
  refresing concepts, like refreshing a RepeatingView when only one line
 has
  been added. The only easy way to do this for the moment is to add the
  component to the target request, but then the whole component is
 rendered
  and sent to the client. Having something finer would be nice. But that's
  only ideas, and I'm really lacking of time.
 
  Xavier
 
  Xavier Hanin wrote:
  
   Michael,
  
   As I said I don't use the ChannelService myself, but I used to have
   similar
   troubles with the PushService, which I think I finally fixed, but it
   wasn't
   easy. Since the fix is in TimerChannelBehavior (which is used by both
  the
   push and channel timer based implementation, it should work for both,
  but
   I
   haven't tested. Can I ask which version of wicket and
 wicketstuff-push
   you're using, and also which implementation of IChannelService? If
 you
   want
   to investigate in the code, the core of the fix relies on the
 redirect
  and
   setRedirectId in TimerChannelBehavior.
  
   Xavier
  
   On 10/24/07, Michael Sparer [EMAIL PROTECTED] wrote:
  
  
   Hi Xavier,
  
   first of all thank you for the effort you've done for the
  push-project.
   Up
   to now it really provided the features I need for my app. But now
 I'm
   kind
   of stuck. My problem is: I have two panels on one page. Both panel
   subscribe
   themselves as ChannelListener for the 

Re: Popup parent comunication

2007-11-08 Thread serban.balamaci

Wel i use wicket 1.2.6
Sadly it seems to be a browser compatibility issue. Default I use firefox
but tried it now in IE 6 and IE7 and in firefox there is the problem and in
IE it works as expected.

Hmm...


Johan Compagner wrote:
 
 yeah there is already a call happening to the server. But maybe this is a
 bug in the wicket javascript code, that it still thinks that the channel
 is
 busy
 what version do you use of wicket?
 
 johan
 
 
 
 On Nov 8, 2007 9:24 AM, serban.balamaci [EMAIL PROTECTED] wrote:
 

 I forgot to look in the ajax console. Here is what it says:
 INFO: Initiating Ajax GET request on

 /crm/app/?wicket:interface=:1:myForm:tabs:0:customTablePanel:rows:2:cells:3:cell:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=
 0.5604639175790322
 INFO: Invoking pre-call handler(s)...
 INFO: Chanel busy - postponing...
 INFO: Chanel busy - postponing...

 I guess that Channel busy must be the culprit.


 Mr Mean wrote:
 
  Not entirely sure about this, but i think this is because wicket is
  smart enough to figure out it has already sent the header, so it won't
  send it again. If you want to invoke that script again you should
  trigger it from your ajax call with target.appendJavaScript().
 
  Maurice
 
  On Nov 7, 2007 6:11 PM, serban.balamaci [EMAIL PROTECTED] wrote:
 
  Yes, you must be right, another issue against the modal window is that
  the
  datepicker does not work inside it, and I pretty much decided to stick
 to
  normal popups.
 
  Well it seems that i may have something here:
 
  In the parent page:
  add(new AbstractDefaultAjaxBehavior() {
  protected void respond(AjaxRequestTarget
 ajaxRequestTarget)
 {
  System.out.println(Ajax Method invoked);
  }
 
  protected void onRenderHeadContribution(final Response
  response)
  {
  super.onRenderHeadContribution(response);
  StringHeaderContributor header =
  new StringHeaderContributor(script
  language=\javascript\  +
  function call() { +
  getCallbackScript(false, true) + }; +
  /script);
  ((WebPage)getComponent().getPage()).add(header);
  }
  });
 
  In the popup window we have the link:
 
  Link link = new Link(addLink) {
  public void onClick() {
   System.out.println(Ajax Method invoked);
  }
 
  protected CharSequence getOnClickScript(CharSequence
  charSequence) {
  CharSequence click =
  super.getOnClickScript(charSequence);
  if(click == null) {
  return self.opener.call();;
  }
  return click + self.opener.call();;
  }
 
  };
 
 
  Current problem is that the method sometimes gets invoked sometimes it
  does
  not(the text Ajax Method invoked apears on the screen). Actually
 only
  the
  first time in most cases. The problem must be with the ajax call cause
 i
  added in the call function a debug message in javascript that gets
 always
  called(the call function).
 
  Anybody has any ideas why this is?
 
 
 
  Mr Mean wrote:
  
   if your modal dialog contains ajax tabs it should work, but all your
   user interaction from withing the dialog must be ajax.
  
   Maurice
  
   On Nov 7, 2007 1:50 PM, serban.balamaci [EMAIL PROTECTED]
 wrote:
  
   I cannot use the modal windows.
   They are plain popups. I do not know if there is a difference
 beetween
   modal
   windows that have a content a panel or a page, but i need to have
  tabbed
   pannels(which are links) inside the popup and by using a modal page
  with
   a
   panel content when i press on another tab(a link), i get the
 message
  that
   This action requires to navigate away from this page and the modal
   window
   will close and after pressing it does close the modal window.
  
   I am currently trying the 3rd option, i think i can write the
  javascript
   for
   the ajax request.
   I will post the solution if i get it working.
  
  
  
   Mr Mean wrote:
   
Are you using the ModalWindow? in that case you need to set the
PageCreator to return your page, don't use panels. Second you
 need
  to
set a callbackhandler for the windowclose event. There you must
  update
your combo.
   
Maurice
   
On Nov 7, 2007 12:09 PM, serban.balamaci [EMAIL PROTECTED]
  wrote:
   
Hello!
I have the following problem. I have a parent page, that opens a
  popup
through a PageLink.
The popup window is a window in which new records can be added,
 but
  i
need a
combo in the parent page to reflect and contain also the new
 choice
   added
in
the popup.
   
1. Reloading the whole parent page at popup close link pressed i
  would
take
as the last resolve 

Re: gmap2 and map creation

2007-11-08 Thread Jan Stette
On 07/11/2007, Martin Funk [EMAIL PROTECTED] wrote:

 
 sorry I was just to tired yesterday look into that any deeper.


No problem, of course!  :-)


I just committed a patch. Could you check if it suits your needs?


The patch adds checks for isAttached() in some operations, but not all.
So I was still getting some similar errors, for example in GMap2.addControl
().

I've worked around this so far by applying a patch in GMap2, adding the
middle line:

map = new WebMarkupContainer(map);
map.setMarkupId(gmapInternalMarkupId); // Work around problem of
non-attached component
map.setOutputMarkupId(true);

While this is a bit of a hack, could the problem be better fixed in a
similar way?  That would avoid having to remember to do the check for every
operation in GMap2.

Also could you check if the codechange in the ManyPanel is asking for
 the same as your code?


Looks like it yes, but as discussed above, it only calls setZoom() and not
all the other operations that may be called on the component before it's
added into the page hierarchy.

Regards,
Jan


{wicket 1.3beta4} Testing unselecting check?

2007-11-08 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Is it possible to unselect at check with the tester? We have a page 
where all checks are selected by default and I need to write a test were 
I unselect one of them..


-Nino

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


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



Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Sebastiaan van Erk

Eelco wrote:


The thing is though, even though it is 100% backwards compatible, it
is something we'll have to support. It adds complexity to the
implementation, and we'll have to answer questions about it on the
list. That would be fine if everyone would have been wildly
enthusiastic about it, but that is not the case - whether you think
that is justified or not.

So, like I propose in the main thread, the best way to go is to
implement this as a separate project, using separate tags. We'll be
happy to support any internal API changes if that is needed to make
the implementation work. The advantage of having this separate project
is that such inheritance would be available for people who like it,
and hey, maybe in the longer term you have something that works so
good that you can convince people based on something that works.
Executable code works much better than simply words when it comes to
that ;-)


Some small questions on doing this as a separate project:

1) If API changes are necessary, is it not adding more complexity that 
needs to be supported than the change itself? The change is relatively 
minor change (heck, even mark it experimental/use at own risk/may be 
removed in a future release). Can the same be said for other API changes 
yet to be thought of...


2) If other tags are going to have to be used, are tags in the wicket 
namespace allowed? Would that not be a potential source of future naming 
conflicts? What is the policy here?


Regards,
Sebastiaan


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Multiple wicket:child / tags on a single base page?

2007-11-08 Thread Stefan Fußenegger

hi eelco,

Assume the tag wouldn't be renamed. Then it would only be a new and optional
(!) attribute for the child/extend tags. So isn't it unnecessary to
explicitly turn on/off a feature that you could implicitly turn on as soon
as this attribute is used?

The naming - is abstract/implement better than child/extend - is another
topic I really didn't want to argue about.

This is just an idea. I know that supporting it as wicket core feature
(docs, mailing list, code, ...) is a totally different question.

regards, stefan

100th reply - is it a Good Thing (tm) ;)




Eelco Hillenius wrote:
 
 On Nov 7, 2007 11:19 AM, Scott Swank [EMAIL PROTECTED] wrote:
 I can see how wicket:abstract and wicket:implements tags could be
 a nice enhancement to the current wicket:extend and wicket:child
 tags.  Do you have a working, or mostly working, patch?
 
 What I think we should do with this is make it an option. It would be
 turned off by default, requiring users to an extra one or two lines of
 configuration to turn this on (we've done this before), and let it
 prove itself. Sounds to me like everyone would be happy.
 
 WDYT?
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13643104
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Several localized buttons in a form

2007-11-08 Thread Pills

Hello,

I would like to put 2 buttons on a form (submit/cancel). This 2 buttons need
to be localized. I tried to override the form's onSubmit, and add one new
Button (submit) and a new subclass of Button (cancel).

My code looks like this:

[CODE]
Form form = new Form(formaddeditcurrency) {
  @Override
  protected void onSubmit() {
// do submit (insert into db)
  }  
};

...
form.add(new Button(submitaddedit, new StringResourceModel(submit, this,
null)));
form.add(new Button(canceladdedit, new StringResourceModel(cancel, this,
null)) {
  @Override
  public void onSubmit() {
  // do cancel
  }
});
[/CODE]

My problem is that when a user click Cancel, the form still tried to be
submitted (and since some fields are invalid, it writes some garbage to the
Feedbackpanel). However, in markup, my cancel button is not a submit, but
a simple button.

How can I put several buttons on a form?

Thank you for your help ;)
-- 
View this message in context: 
http://www.nabble.com/Several-localized-buttons-in-a-form-tf4770293.html#a13645019
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Several localized buttons in a form

2007-11-08 Thread Pills


Sebastiaan van Erk wrote:
 
   /**
* Sets the defaultFormProcessing property. When false (default is 
 true),
* all validation and form updating is bypassed and the onSubmit method
 of
* that button is called directly, and the onSubmit method of the parent
* form is not called. A common use for this is to create a cancel
 button.
*
* @param defaultFormProcessing
*defaultFormProcessing
* @return This
*/
   public final Button setDefaultFormProcessing(boolean
 defaultFormProcessing)
 
 :)
 
It works fine ;)

Thank you for your help. It was trivial 
-- 
View this message in context: 
http://www.nabble.com/Several-localized-buttons-in-a-form-tf4770293.html#a13645905
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Problem closing a ModalWindow when used through an IFrame

2007-11-08 Thread Ville Paasimaa
I found a possible fix to this problem. If you leave the
window.parent.setTimeout statement off and just call directly
win.current.close the modal window will be closed.
You can test this by changing getCloseJavacript method of the
ModalWindow.java to return this:

   {
return var win;\n //
+ try {\n
+  win = window.parent.Wicket.Window;\n
+ } catch (ignore) {\n
+ }\n
+ if (typeof(win) == \undefined\ ||
typeof(win.current) == \undefined\) {\n
+   try {\n
+  win = window.Wicket.Window;\n
+   } catch (ignore) {\n
+   }\n
+ }\n
+ if (typeof(win) != \undefined\ 
typeof(win.current) != \undefined\) {\n
+  win.current.close();\n
+ };
}

Matej, what is the purpose of the window.parent.setTimeout in the
original code? Why couldn't the closing be done just simply by calling
win.current.close?

Ville

On Nov 7, 2007 3:00 PM, Ville Paasimaa [EMAIL PROTECTED] wrote:
 Have you noticed that if you try to close the example window from OK or
 CANCEL button it closes even when used through an iframe?

 By using firebug, you can place breakpoints to modal.js and see that this
 code is executed when the window is closed from OK button:

 org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js

 On line 699:
 if (this.isIframe() == true) {
 var current =
 this.content.contentWindow.Wicket.Window.current ;

 On line 715
 close: function(force) {
 ... etc

 But the above code is not executed when the modal window is closed from the
 X button on upper right corner of the window.

 Could it solve the problem if the same close function would be executed from
 the X-button too?




  On Nov 1, 2007 12:14 PM, Deepak Mahavishnu [EMAIL PROTECTED] wrote:
  Hello!
 
  I'm doing some POC testing to find out how a wicket application could be
  used through an IFrame and noticed that closing of a ModalWindow fails.
 
  My setup:
 
  Application A:
  -a dummy html page that has an IFrame
  -the contents of the IFrame is requested from Application B
  iframe src=http://localhost:8080/mywicketapp/app/; width=100%
  height=500/iframe
 
  Application B:
  -a Wicket application that uses a ModalWindow
  -deployed to tomcat:  http://localhost:8080/mywicketapp/
 
 
  Problem:
  The ModalWindow is not closed when OK ( or Cancel ) button is clicked when
  Application B is used throug IFrame of Application A.
  OK button performs the actual action (in my case deletes an item from a
  list) but is not closed after the execution of the action.
 
  Closing of the ModalWindow works normally when Application B is not used
  through an IFrame.
 
  Any suggestions how this could be solved?  Or is the usage through an
 IFrame
  a bad idea from start?
 
  Any help is appreciated!
 
  Mahavishnu
 



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



Re: Several localized buttons in a form

2007-11-08 Thread Sebastiaan van Erk
You could use Button.setDefaultFormProcessing(false) to turn of form 
validation.


From the javadoc:

/**
 * Sets the defaultFormProcessing property. When false (default is 
true),
 * all validation and form updating is bypassed and the onSubmit method 
of
 * that button is called directly, and the onSubmit method of the parent
 * form is not called. A common use for this is to create a cancel 
button.
 *
 * @param defaultFormProcessing
 *defaultFormProcessing
 * @return This
 */
public final Button setDefaultFormProcessing(boolean 
defaultFormProcessing)

:)

Regards,
Sebastiaan

Pills wrote:

Hello,

I would like to put 2 buttons on a form (submit/cancel). This 2 buttons need
to be localized. I tried to override the form's onSubmit, and add one new
Button (submit) and a new subclass of Button (cancel).

My code looks like this:

[CODE]
Form form = new Form(formaddeditcurrency) {
  @Override
  protected void onSubmit() {
// do submit (insert into db)
  }  
};


...
form.add(new Button(submitaddedit, new StringResourceModel(submit, this,
null)));
form.add(new Button(canceladdedit, new StringResourceModel(cancel, this,
null)) {
  @Override
  public void onSubmit() {
  // do cancel
  }
});
[/CODE]

My problem is that when a user click Cancel, the form still tried to be
submitted (and since some fields are invalid, it writes some garbage to the
Feedbackpanel). However, in markup, my cancel button is not a submit, but
a simple button.

How can I put several buttons on a form?

Thank you for your help ;)


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Several localized buttons in a form

2007-11-08 Thread Al Maw

Pills wrote:

How can I put several buttons on a form?


If you look at the code you've written, you've nearly answered your own 
question. ;-)


Don't use the Form's onSubmit().
Just use the Buttons' onSubmit()s instead.

If you want to allow a Button#onSubmit() without the Form validating, 
then you'll need to call setDefaultFormProcessing(false) on it like 
Sebastiaan said.


Regards,

Al

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



DataView question, please help, thanks!

2007-11-08 Thread raybristol

I am using DataView to show a list, in my html page, I got: 
table border='1' class=ms-prof-main
tr
th 
class=ms-prof-topBox ID/th
th 
class=ms-prof-topClient name/th
th 
class=ms-prof-topJob profile/th
th 
class=ms-prof-topBox status/th
th 
class=ms-prof-topStore Location/th
th 
class=ms-prof-topTime in prep/th
th 
class=ms-prof-topTime in scan/th
th 
class=ms-prof-topDelete/th
/tr
tr wicket:id=boxList
td wicket:id 
=boxID class=ms-prof-evenboxID/td
td wicket:id 
=clientName class=ms-prof-evenclientName/td
td wicket:id 
=JobProfileName
class=ms-prof-evenJobProfileName/td
td wicket:id 
=BoxStatus class=ms-prof-evenBoxStatus/td
td wicket:id 
=StoreLocation
class=ms-prof-evenStoreLocation/td
td wicket:id 
=PreppedTime class=ms-prof-evenPreppedTime/td
td wicket:id 
=ScannedTime class=ms-prof-evenScannedTime/td
td 
class=ms-prof-even Delete /td
/tr
/table 

then in code behind I use protected void populateItem(Item item) to
specified each table cell's data, because I can put any String in td tag so
I can easily put any javascript function call, however, I want to do that
for each row as well, so the tr tag, such as when use click on a row,
something happen, but I can't find where I can put this ability from the
code behind?

Many thanks for your help!
-- 
View this message in context: 
http://www.nabble.com/DataView-question%2C-please-help%2C-thanks%21-tf4770079.html#a13644400
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Multiple wicket:child / tags on a single base page?

2007-11-08 Thread Eelco Hillenius
On Nov 7, 2007 5:53 PM, Chris Colman [EMAIL PROTECTED] wrote:
  heh, wellyou can be against this, but i think if we take a vote
  right now most core-devs with binding votes will vote this down

 I still can't see the reason for the negativity of some of the
 core-devs: this is an existing feature.

People just have different opinions. And the opinions tend to be
strong around here. :-)

 If the feature sucks so bad why did people have the inspiration to add
 it in the first place in the beginning of wicket's life?

You can blame me for that actually... back then only Juergen cursed as
he was the one who was going to implement it :-)

Anyway, that was pre 1.0. Almost three years ago which is about a life
time in IT terms.

 We're just proposing to enhance an existing feature - evolution not
 revolution.

I think that regardless who is right or wrong here, we should just do
this as a separate project, with separate tags. The advantage for the
people who like this is then that they can implement it however they
feel it should be done, and won't need to have crazy long threads to
decide on things. And the core team doesn't have to support something
they don't fully agree with.

If we do that, I think everyone should be happy, and we can close the
case, right?

Cheers,

Eelco

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



Re: Popup parent comunication

2007-11-08 Thread serban.balamaci

I forgot to look in the ajax console. Here is what it says:
INFO: Initiating Ajax GET request on
/crm/app/?wicket:interface=:1:myForm:tabs:0:customTablePanel:rows:2:cells:3:cell:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=0.5604639175790322
INFO: Invoking pre-call handler(s)...
INFO: Chanel busy - postponing...
INFO: Chanel busy - postponing...

I guess that Channel busy must be the culprit.


Mr Mean wrote:
 
 Not entirely sure about this, but i think this is because wicket is
 smart enough to figure out it has already sent the header, so it won't
 send it again. If you want to invoke that script again you should
 trigger it from your ajax call with target.appendJavaScript().
 
 Maurice
 
 On Nov 7, 2007 6:11 PM, serban.balamaci [EMAIL PROTECTED] wrote:

 Yes, you must be right, another issue against the modal window is that
 the
 datepicker does not work inside it, and I pretty much decided to stick to
 normal popups.

 Well it seems that i may have something here:

 In the parent page:
 add(new AbstractDefaultAjaxBehavior() {
 protected void respond(AjaxRequestTarget ajaxRequestTarget) {
 System.out.println(Ajax Method invoked);
 }

 protected void onRenderHeadContribution(final Response
 response)
 {
 super.onRenderHeadContribution(response);
 StringHeaderContributor header =
 new StringHeaderContributor(script
 language=\javascript\  +
 function call() { +
 getCallbackScript(false, true) + }; +
 /script);
 ((WebPage)getComponent().getPage()).add(header);
 }
 });

 In the popup window we have the link:

 Link link = new Link(addLink) {
 public void onClick() {
  System.out.println(Ajax Method invoked);
 }

 protected CharSequence getOnClickScript(CharSequence
 charSequence) {
 CharSequence click =
 super.getOnClickScript(charSequence);
 if(click == null) {
 return self.opener.call();;
 }
 return click + self.opener.call();;
 }

 };


 Current problem is that the method sometimes gets invoked sometimes it
 does
 not(the text Ajax Method invoked apears on the screen). Actually only
 the
 first time in most cases. The problem must be with the ajax call cause i
 added in the call function a debug message in javascript that gets always
 called(the call function).

 Anybody has any ideas why this is?



 Mr Mean wrote:
 
  if your modal dialog contains ajax tabs it should work, but all your
  user interaction from withing the dialog must be ajax.
 
  Maurice
 
  On Nov 7, 2007 1:50 PM, serban.balamaci [EMAIL PROTECTED] wrote:
 
  I cannot use the modal windows.
  They are plain popups. I do not know if there is a difference beetween
  modal
  windows that have a content a panel or a page, but i need to have
 tabbed
  pannels(which are links) inside the popup and by using a modal page
 with
  a
  panel content when i press on another tab(a link), i get the message
 that
  This action requires to navigate away from this page and the modal
  window
  will close and after pressing it does close the modal window.
 
  I am currently trying the 3rd option, i think i can write the
 javascript
  for
  the ajax request.
  I will post the solution if i get it working.
 
 
 
  Mr Mean wrote:
  
   Are you using the ModalWindow? in that case you need to set the
   PageCreator to return your page, don't use panels. Second you need
 to
   set a callbackhandler for the windowclose event. There you must
 update
   your combo.
  
   Maurice
  
   On Nov 7, 2007 12:09 PM, serban.balamaci [EMAIL PROTECTED]
 wrote:
  
   Hello!
   I have the following problem. I have a parent page, that opens a
 popup
   through a PageLink.
   The popup window is a window in which new records can be added, but
 i
   need a
   combo in the parent page to reflect and contain also the new choice
  added
   in
   the popup.
  
   1. Reloading the whole parent page at popup close link pressed i
 would
   take
   as the last resolve because the user may have introduced data in
 the
   controls that would get lost in the reloading process. I could get
  around
   this by adding a submit behaviour to the link and save in session
 the
   values
   inserted till that moment and rehidrate the model with values from
 the
   session instead of the database, and so obtain the state that the
 page
   was
   in before the popup was opened, but i'm wondering if there is not a
   cleaner
   solution for this.
  
   2. I also tried(didn't think this would work:) but had to try) to
 pass
   the
   combo to the popup page and tried to update through the pressing of
 an
   ajaxlink the combo. It said it 

Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Eelco Hillenius
 In conclusion, the proposed change:
 - is useful
 - does not have to be used if you don't like it
 - is 100% backwards compatible
 - it introduces no new tags (if using child/extends)

The thing is though, even though it is 100% backwards compatible, it
is something we'll have to support. It adds complexity to the
implementation, and we'll have to answer questions about it on the
list. That would be fine if everyone would have been wildly
enthusiastic about it, but that is not the case - whether you think
that is justified or not.

So, like I propose in the main thread, the best way to go is to
implement this as a separate project, using separate tags. We'll be
happy to support any internal API changes if that is needed to make
the implementation work. The advantage of having this separate project
is that such inheritance would be available for people who like it,
and hey, maybe in the longer term you have something that works so
good that you can convince people based on something that works.
Executable code works much better than simply words when it comes to
that ;-)

Do people want to work on this?

Regards,

Eelco

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



Re: Multiple wicket:child / tags on a single base page?

2007-11-08 Thread Sebastiaan van Erk

Eelco Hillenius wrote:

On Nov 7, 2007 5:53 PM, Chris Colman [EMAIL PROTECTED] wrote:

heh, wellyou can be against this, but i think if we take a vote
right now most core-devs with binding votes will vote this down

I still can't see the reason for the negativity of some of the
core-devs: this is an existing feature.


People just have different opinions. And the opinions tend to be
strong around here. :-)


Well, we obviously can't complain too much about your opinions, because 
Wicket is a really good framework and very well thought out. :-)


Still I'd like to know *why* you don't like it, though I can imagine 
you're getting tired of this thread.



We're just proposing to enhance an existing feature - evolution not
revolution.


I think that regardless who is right or wrong here, we should just do
this as a separate project, with separate tags. The advantage for the
people who like this is then that they can implement it however they
feel it should be done, and won't need to have crazy long threads to
decide on things. And the core team doesn't have to support something
they don't fully agree with.

If we do that, I think everyone should be happy, and we can close the
case, right?


Unfortunately, that is not really the case.

- I would prefer the same tag (it is 100% backwards compatible, and it 
is the same feature it is now, but with the restriction n=1 dropped).


- I would prefer to have it in core Wicket because otherwise it's 
another dependency with extra configuration to activate it.


That said, if there's no other way, a separate project is the 
next-best-thing. Maybe it's a better way to go about it: prove the 
concept, get it stable, and try get it in core later. ;-)


Regards,
Sebastiaan


Cheers,

Eelco

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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Popup parent comunication

2007-11-08 Thread Maurice Marrink
Ok, this is where i have to step aside and let the real wicket folks
take over :)
I have absolutely no clue as to what is going on here.

Maurice

On Nov 8, 2007 9:24 AM, serban.balamaci [EMAIL PROTECTED] wrote:

 I forgot to look in the ajax console. Here is what it says:
 INFO: Initiating Ajax GET request on
 /crm/app/?wicket:interface=:1:myForm:tabs:0:customTablePanel:rows:2:cells:3:cell:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=truerandom=0.5604639175790322
 INFO: Invoking pre-call handler(s)...
 INFO: Chanel busy - postponing...
 INFO: Chanel busy - postponing...

 I guess that Channel busy must be the culprit.



 Mr Mean wrote:
 
  Not entirely sure about this, but i think this is because wicket is
  smart enough to figure out it has already sent the header, so it won't
  send it again. If you want to invoke that script again you should
  trigger it from your ajax call with target.appendJavaScript().
 
  Maurice
 
  On Nov 7, 2007 6:11 PM, serban.balamaci [EMAIL PROTECTED] wrote:
 
  Yes, you must be right, another issue against the modal window is that
  the
  datepicker does not work inside it, and I pretty much decided to stick to
  normal popups.
 
  Well it seems that i may have something here:
 
  In the parent page:
  add(new AbstractDefaultAjaxBehavior() {
  protected void respond(AjaxRequestTarget ajaxRequestTarget) {
  System.out.println(Ajax Method invoked);
  }
 
  protected void onRenderHeadContribution(final Response
  response)
  {
  super.onRenderHeadContribution(response);
  StringHeaderContributor header =
  new StringHeaderContributor(script
  language=\javascript\  +
  function call() { +
  getCallbackScript(false, true) + }; +
  /script);
  ((WebPage)getComponent().getPage()).add(header);
  }
  });
 
  In the popup window we have the link:
 
  Link link = new Link(addLink) {
  public void onClick() {
   System.out.println(Ajax Method invoked);
  }
 
  protected CharSequence getOnClickScript(CharSequence
  charSequence) {
  CharSequence click =
  super.getOnClickScript(charSequence);
  if(click == null) {
  return self.opener.call();;
  }
  return click + self.opener.call();;
  }
 
  };
 
 
  Current problem is that the method sometimes gets invoked sometimes it
  does
  not(the text Ajax Method invoked apears on the screen). Actually only
  the
  first time in most cases. The problem must be with the ajax call cause i
  added in the call function a debug message in javascript that gets always
  called(the call function).
 
  Anybody has any ideas why this is?
 
 
 
  Mr Mean wrote:
  
   if your modal dialog contains ajax tabs it should work, but all your
   user interaction from withing the dialog must be ajax.
  
   Maurice
  
   On Nov 7, 2007 1:50 PM, serban.balamaci [EMAIL PROTECTED] wrote:
  
   I cannot use the modal windows.
   They are plain popups. I do not know if there is a difference beetween
   modal
   windows that have a content a panel or a page, but i need to have
  tabbed
   pannels(which are links) inside the popup and by using a modal page
  with
   a
   panel content when i press on another tab(a link), i get the message
  that
   This action requires to navigate away from this page and the modal
   window
   will close and after pressing it does close the modal window.
  
   I am currently trying the 3rd option, i think i can write the
  javascript
   for
   the ajax request.
   I will post the solution if i get it working.
  
  
  
   Mr Mean wrote:
   
Are you using the ModalWindow? in that case you need to set the
PageCreator to return your page, don't use panels. Second you need
  to
set a callbackhandler for the windowclose event. There you must
  update
your combo.
   
Maurice
   
On Nov 7, 2007 12:09 PM, serban.balamaci [EMAIL PROTECTED]
  wrote:
   
Hello!
I have the following problem. I have a parent page, that opens a
  popup
through a PageLink.
The popup window is a window in which new records can be added, but
  i
need a
combo in the parent page to reflect and contain also the new choice
   added
in
the popup.
   
1. Reloading the whole parent page at popup close link pressed i
  would
take
as the last resolve because the user may have introduced data in
  the
controls that would get lost in the reloading process. I could get
   around
this by adding a submit behaviour to the link and save in session
  the
values
inserted till that moment and rehidrate the model with values from
  the
session instead of 

Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Stefan Fußenegger

Hi eelco.

Did you see what I changed in order to make this working? There is nearly no
extra complexity. So I think complexity isn't an argument here.

best regards

-- stefan




Eelco Hillenius wrote:
 
 In conclusion, the proposed change:
 - is useful
 - does not have to be used if you don't like it
 - is 100% backwards compatible
 - it introduces no new tags (if using child/extends)
 
 The thing is though, even though it is 100% backwards compatible, it
 is something we'll have to support. It adds complexity to the
 implementation, and we'll have to answer questions about it on the
 list. That would be fine if everyone would have been wildly
 enthusiastic about it, but that is not the case - whether you think
 that is justified or not.
 
 So, like I propose in the main thread, the best way to go is to
 implement this as a separate project, using separate tags. We'll be
 happy to support any internal API changes if that is needed to make
 the implementation work. The advantage of having this separate project
 is that such inheritance would be available for people who like it,
 and hey, maybe in the longer term you have something that works so
 good that you can convince people based on something that works.
 Executable code works much better than simply words when it comes to
 that ;-)
 
 Do people want to work on this?
 
 Regards,
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/Attempted-summary-of-multiple-%3Cwicket%3Achild--%3E-thread-tf4767718.html#a13643264
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Form values from Panel

2007-11-08 Thread Marco Aurélio Silva
Hi all

I have a Panel that is open with a ModalWindow, and when it is closed the
main page is updated. The problem is that I can't get the values from
dropDowns of panel, they are coming always null. Is there something I'm
doing wrong? Is possible to use Form on Panel?

Thanks in advance!
Marco


Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Sebastiaan van Erk

Hi,

Eelco Hillenius wrote:

In conclusion, the proposed change:
- is useful
- does not have to be used if you don't like it
- is 100% backwards compatible
- it introduces no new tags (if using child/extends)


The thing is though, even though it is 100% backwards compatible, it
is something we'll have to support. It adds complexity to the
implementation, and we'll have to answer questions about it on the
list. That would be fine if everyone would have been wildly
enthusiastic about it, but that is not the case - whether you think
that is justified or not.


The fact that you guys would have to support it and answer questions is 
fair enough.



So, like I propose in the main thread, the best way to go is to
implement this as a separate project, using separate tags. We'll be
happy to support any internal API changes if that is needed to make
the implementation work. The advantage of having this separate project
is that such inheritance would be available for people who like it,
and hey, maybe in the longer term you have something that works so
good that you can convince people based on something that works.
Executable code works much better than simply words when it comes to
that ;-)

Do people want to work on this?


Sure, I would like to work on this. It would eliminate my need for 
wicket:fragment and would allow me to do everything I need 
consistently with 1 tag pair, as well as eliminate some java code.


Regards,
Sebastiaan


Regards,

Eelco

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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Jan Kriesten

hi everyone,

actually, i wonder what is wrong with al's suggestion to add id's to
wicket:child and wicket:extend?

regards, --- jan.


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



Re: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Sebastiaan van Erk

Jan Kriesten wrote:

hi everyone,

actually, i wonder what is wrong with al's suggestion to add id's to
wicket:child and wicket:extend?

regards, --- jan.


That is what I'd suggest as well, since it involves the least amount of 
change. As an added bonus, if no id's are added and 2 wicket:child 
sections are used, it could throw an exception (which it currently does 
not do, it just silently ignores the second wicket:child).


Regards,
Sebastiaan


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Disabling serialization/storage of pages in session?

2007-11-08 Thread Johan Compagner
like eelco said if you don't want to serialize and store on disk, create a
filestore that does nothing
(or holds a few pages for per session in mem for backbutton)

But what do you mean with disable the storage of pages in a session?
You don't want to store a statefull page at all in the pagemap (and thats
then in the session)?
Because thats really no use at all then because the page in the browser is
useless
If you don't want pages in the session and on disk. Then make them fully
stateless (see stateless link and form)

johan




On Nov 8, 2007 12:08 AM, mfs [EMAIL PROTECTED] wrote:


 Guys,

 If need be, can we disable altogether the storage of pages (in the form of
 a
 pageMap) in session, similarly on the disk ?

 Thanks and Regards,

 Farhan.
 --
 View this message in context:
 http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13638150
 Sent from the Wicket - User mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


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




Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Johan Compagner
But 50 is nothing (at least i think it is nothing) and linux should be able
to handle that just fine
Can somebody peak how many handles we take on those session files? Maybe we
leak somewhere
or do take more then we think.

johan



On Nov 8, 2007 2:04 AM, Matej Knopp [EMAIL PROTECTED] wrote:

 There is a constructor parameter in DiskPageStore constructor (the
 last int parameter) that says how many handles DiskPageStore will keep
 opened.

 But the default number of file handles is 50. If this is causing your
 server file handle problems than you should consider changing the
 configuration. Are you sure there are no other file handles leaking?
 What are the files opened?

 -Matej

 On 11/8/07, Brandon Harper [EMAIL PROTECTED] wrote:
  Hello All,
 
  Long story short, we're in the process of load testing an application
  built against Wicket 1.3 snapshot.  Unfortunately we've seen some
  server issues with sessions/page maps in the file store during
  testing, and I was wondering how I'd go about programatically changing
  the default page map size in DiskPageStore just to see if changing
  this value affects what we're seeing.
 
  FWIW, right now it looks like we're having issues under load with
  Wicket creating too many open file handles on a fairly default install
  of RHEL 5 which results in exceptions like this:
 
  java.lang.RuntimeException: java.io.FileNotFoundException:
  /usr/local/jboss-
 4.2.1.GA/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
  (No such file or directory)
   at
  org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
 (FileChannelPool.java:104)
   at
  org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel
 (FileChannelPool.java:171)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
 (DiskPageStore.java:224)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
 (DiskPageStore.java:788)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
 (DiskPageStore.java:851)
   at java.lang.Thread.run(Thread.java:619)
  Caused by: java.io.FileNotFoundException:
  /usr/local/jboss-
 4.2.1.GA/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
  (No such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:212)
   at
  org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
 (FileChannelPool.java:99)
 
  Thanks,
 
  - Brandon
 
  --
  http://bharper.com
  http://devnulled.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: DataView question, please help, thanks!

2007-11-08 Thread Dmitry Kandalov
On Thursday 08 November 2007 14:13:22 raybristol wrote:
 /table 

 then in code behind I use protected void populateItem(Item item) to
 specified each table cell's data, because I can put any String in td tag so
 I can easily put any javascript function call, however, I want to do that
 for each row as well, so the tr tag, such as when use click on a row,
 something happen, but I can't find where I can put this ability from the
 code behind?

You can add javascript file to the page header like this:
add(HeaderContributor.forJavaScript(MyPage.class, myscript.js));

And javascript calls like this:
add(new DataView(boxList, dataProvider)){
protected void populateItem(Item item) {
item.add(new SimpleAttributeModifier(onclick,row_clicked()));
item.add(new Label(boxID).add(new 
SimpleAttributeModifier(onclick,boxID_clicked()));
...
}
});


Dima

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



Re: Regarding the use of AjaxFallbackDefaultDataTable

2007-11-08 Thread John Krasnay
On Wed, Nov 07, 2007 at 07:20:01PM -0800, Jeremy Lee wrote:
 
 Hi,
 
 I have a Search Form along with a AjaxFallbackDefaultDataTable on a page
 that I am trying to create. How it is supposed to work is as follows:
 
 1. User accesses page (only search form is visible)
 2. User enters search parameters and submits request
 3. The page returns search results.  The page at this point should still
 show the search form, and also now the results through the
 AjaxFallbackDefaultDataTable.
 
 The problem that I am having is as follows:
 
 In the page constructor I add both the form and the
 AjaxFallbackDefaultDataTable and then set the table to not be visible. 
 However I am finding that the table makes the call to the data provider when
 it is initially instantiated.  I only want it to make the call to the data
 provider when the search request is made.
 
 The following is the code that I am using in the constructor to add the
 table.
 
 SortableDataProvider dp = new ReconcileReportProvider(new
 ReconcileReportManagerImpl());
 reportTable = new AjaxFallbackDefaultDataTable(searchResults, columns, dp,
 rows);
 reportTable.setVisible(false);
 add(reportTable);
 
 I am not too sure if this is even the right way to go about it.  Any
 guidance would be appreciated.
 
 Cheers.

Hi Jeremy,

You can try this: in your constructor, instead of the DataTable, create
an EmptyPanel with the same ID. In the onSubmit for your search form,
create the DataTable and use replace() to replace the EmptyPanel.

Hope this helps.

jk

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



RE: Link text

2007-11-08 Thread Clay Lehman
You might want to look at IComponentBorder

-Clay

-Original Message-
From: Sam Hough [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 07, 2007 5:47 AM
To: users@wicket.apache.org
Subject: Re: Link text


Anything similar for spitting something out _after_ the tag that the
component is mapped to? e.g. Sending out some text/html after a
checkbox?

Presumably onComponentTagBody doesn't get called because it is not a
Container and the input tag is send after anything I do in
onComponentTag :(


Al Maw wrote:
 
 Sam Hough wrote:
 Lots of the time I just want a link with text as the body of the  ...
...
 
 The Link class takes an IModel so presumably uses that for something
but
 I
 can't see it in the source or get it to appear...
 
 Sorry I'm being thick and I did search honest!
 
 You'd typically use the model so you have something to get at in the 
 onClick().
 
 Of course, if you don't care about how much state is in your session, 
 you can just make whatever it is final so you can use it in there
anyway.
 
 If you want to use the model for the text of the link instead, then
you 
 could write a class like this:
 
 
 public abstract class TextLink extends Link {
  public TextLink(String id, IModel model) {
  super(id, model);
  }
 
  protected void onComponentTagBody(final MarkupStream
markupStream,
  final ComponentTag openTag)
  {
  replaceComponentTagBody(
  markupStream, openTag, getModelObjectAsString()
  );
  }
 
 }
 
 
 If you want enabled/disabled to work properly, you'll need to copy the

 relevant bits out of AbstractLink#onComponentTagBody(...)
 
 
 Regards,
 
 Al
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context:
http://www.nabble.com/Link-text-tf4751114.html#a13624806
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



Re: Question about localization

2007-11-08 Thread Pills



igor.vaynberg wrote:
 
 application.init() {
  getresourcesettings().setlocalizer(...);
 }
 
 you dont have to use the default resource model, just write your own
 if you dont like the default one.
 
 -igor
 

Thank you, it works fine ;)

But I have another problem. I sometimes use wicket:message key=foo as
a shortcut for inserting text. Is it possible to automatically append some
text to the key value? (I need to transform it to style1.foo)

Thank you 

-- 
View this message in context: 
http://www.nabble.com/Question-about-localization-tf4756837.html#a13648232
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Question regarding navigation with the browser's back button

2007-11-08 Thread Christian Alejandro Marquez Grabia
Well...after trying on different things, what I did was override the
onAttach method, and there I regenerate the tree.

Don't know if this is the better way, but it's working so far.

Thanks for your help,
Chris

On Nov 5, 2007 4:35 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:

 maybe your tree model caches more then it should, not sure. if you
 want regen the page then its url has to be bookmarkable, but the tree
 doesnt work with that really without some extra work...

 -igor


 On 11/5/07, Christian Alejandro Marquez Grabia [EMAIL PROTECTED] wrote:
  Thanks Igor.
 
  Indeed, the browser now reloads the page, but the Internal Error occurs
 now,
  instead of watching the cached page. It seems that the Java page is
  somewhere cached, and the tree is attempted to be reloaded, and since
 some
  of the methods use the objects in the tree, it brings up the internal
 error.
 
  Is there anyway to make the Java web page to be regenerated, instead of
  using the previous one? So that the tree is re-drawn without the item. (
 in
  the address bar the url ends with :4::. after deleting it becomes :5::,
 but
  when I press the back button, the :4:: appears, and so does the internal
  error.
 
  any ideas on how to make it re-draw the tree, using real data?
 
  Chris
 
  On 11/5/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
   override webpage#setheaders() and instead of no-cache set a no-store
   header. that should force the browser to reload the page on
   backbutton...
  
   -igor
  
  
   On 11/5/07, Christian Alejandro Marquez Grabia [EMAIL PROTECTED]
 wrote:
I am using Wicket version 1.2.6
   
I have been looking for this or related issues in the list, but
 couldn't
find any to solve my problem.
   
I have a page that show a Tree with many items. These items can be
   deleted
using a link. When the item is deleted the page is reloaded using
SetResponsePage(). Then if I click the browser's back button, I go
 to
   the
previous page in which this item was not deleted, causing an
   inconsistence
between the tree and the real thing, that will eventually cause an
   internal
error leading the user to the internal error page.
   
Is there a way to tell wicket that if the back button is pressed, to
   reload
the page fully, i.e. rebuild it, not using cache?
   
Thanks in advanced,
Chris
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

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




Repeater View Examples are broken

2007-11-08 Thread James Perry
I have noticed that there is an internal server error with the
Repeater examples: http://wicketstuff.org/wicket13/repeater/

Cheers,
James.

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



Re: ResourceReference with locale and style, for CSSs

2007-11-08 Thread Johan Compagner
they locale and style are used to search for it yes
they are not forced.. What do you mean with that?
If the file with that style and locale isn't there it will fallback

johan


On Nov 7, 2007 10:50 PM, German Morales [EMAIL PROTECTED] wrote:

 Hi all,

 I'm having trouble with localized and styled CSSs.

 Everything works alright with HTML. For example, wicket finds
 MyPage_mystyle.html instead of MyPage.html if i've called
 session.setStyle(mystyle). But for CSS i can't get it working.

 i've tried different approaches like:

   // inside the page constructor
   add(HeaderContributor.forCss(new ResourceReference(MyPage.class,
 style.css)));


   // inside renderHead
   cResponse.getHeaderResponse().renderCSSReference(new
 ResourceReference(MyPage.class, style.css));


 None of this worked for me. However, it works if I call the full
 constructor of ResourceReference:

 new ResourceReference(MyPage.class, style.css, getLocale(), getStyle())

 But i'm not supposed to do that, because then the Locale and Style are
 forced, and i want this only if the file is present. I know some
 ResourceStreamLocator should be involved in the process, but i don't know
 how. I see in the ResourceReference javadoc that the framework should be
 calling the setStyle() method, but i debugged it and it doesn't happen.

 What am i doing wrong?

 Thanks in advance,

 German



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




RE: Rendering a fieldset class attribute

2007-11-08 Thread William Hoover
I hear you... read the docs... addAttributeIfNotPresent :)

It seems odd that the AttributeModifier is under the org.apache.wicket package, 
but the SimpleAttributeModifier is under the org.apache.wicket.behavior 
package? They both extend AbstractBehavior.

I would have to agree with you... it does seem too broad. One of the aspects of 
Wicket that makes it enjoyable to program in is that they have kept its usage 
very simple!



-Original Message-
From: Al Maw [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 07, 2007 8:10 PM
To: users@wicket.apache.org
Subject: Re: Rendering a fieldset class attribute


William Hoover wrote:
 Is it better to use AbstractBehavior and override onComponentTag? 
 
 I assume that the AttributeModifier is only for cases when the attribute 
 already exists in the markup, correct?

Well, given the javadoc I told you to read for the second parameter 
there, no. ;-)

It doesn't make much difference which you use.

AbstractBehavior is more direct and concise.

AttributeModifier is named such that people will find it.

I tend to use the former for what you're doing, and the latter if I 
already have a model kicking around.

There's also a SimpleAttributeModifier if you have a simple String, and 
an AttributeAppender if you wish to mess with what's currently there.

IMO, the API here is far too broad - we should just give people 
AbstractBehavior and tell them to get on with it, but hey ho.

Regards,

Al

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



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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Chris Lintz

Guys I am on the same project so I can speak a bit more.  The real issue is
that on Redhat the default max directories is something like 32K.  We ran
out of file descriptors.  Basically for every unique session there is a
directory created for the second level cache. 

I think the real issue for us is that when a session expires the
corresponding second level cache is not removed from disk.  This seems like
a serious bug to me.  I have yet to see a second level cache be removed
unless a forced session invalidate() occurs. 

Any ideas on how we can get these page store files to be removed when a
session times out?   I have looked at tuning the DiskPageStore, but the
constuctor args dont appear as if they will help the issue:

DiskPageStore(java.io.File fileStoreFolder, int maxSizePerPagemap, int
maxSizePerSession, int fileChannelPoolCapacity) 



Johan Compagner wrote:
 
 But 50 is nothing (at least i think it is nothing) and linux should be
 able
 to handle that just fine
 Can somebody peak how many handles we take on those session files? Maybe
 we
 leak somewhere
 or do take more then we think.
 
 johan
 
 
 
 On Nov 8, 2007 2:04 AM, Matej Knopp [EMAIL PROTECTED] wrote:
 
 There is a constructor parameter in DiskPageStore constructor (the
 last int parameter) that says how many handles DiskPageStore will keep
 opened.

 But the default number of file handles is 50. If this is causing your
 server file handle problems than you should consider changing the
 configuration. Are you sure there are no other file handles leaking?
 What are the files opened?

 -Matej

 On 11/8/07, Brandon Harper [EMAIL PROTECTED] wrote:
  Hello All,
 
  Long story short, we're in the process of load testing an application
  built against Wicket 1.3 snapshot.  Unfortunately we've seen some
  server issues with sessions/page maps in the file store during
  testing, and I was wondering how I'd go about programatically changing
  the default page map size in DiskPageStore just to see if changing
  this value affects what we're seeing.
 
  FWIW, right now it looks like we're having issues under load with
  Wicket creating too many open file handles on a fairly default install
  of RHEL 5 which results in exceptions like this:
 
  java.lang.RuntimeException: java.io.FileNotFoundException:
  /usr/local/jboss-
 4.2.1.GA/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
  (No such file or directory)
   at
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
 (FileChannelPool.java:104)
   at
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel
 (FileChannelPool.java:171)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
 (DiskPageStore.java:224)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
 (DiskPageStore.java:788)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
 (DiskPageStore.java:851)
   at java.lang.Thread.run(Thread.java:619)
  Caused by: java.io.FileNotFoundException:
  /usr/local/jboss-
 4.2.1.GA/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
  (No such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:212)
   at
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
 (FileChannelPool.java:99)
 
  Thanks,
 
  - Brandon
 
  --
  http://bharper.com
  http://devnulled.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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


 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13651858
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket Servlet Filters

2007-11-08 Thread Igor Vaynberg
wicket is a UI framework, handling servlet filters is a bit outside its scope :)

-igor


On 11/8/07, William Hoover [EMAIL PROTECTED] wrote:
 Is there a wicket way to handle servlet filters internally in the API or is 
 the recomended method just to use typical servlet filters?


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



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



packaging images/css in a jar?

2007-11-08 Thread mfs

Guys,

Wondering as to where would i be packaging my images/css in case of a jar ?

Farhan.
-- 
View this message in context: 
http://www.nabble.com/packaging-images-css-in-a-jar--tf4772567.html#a13652419
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Matej Knopp
On Nov 8, 2007 6:43 PM, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Guys I am on the same project so I can speak a bit more.  The real issue is
  that on Redhat the default max directories is something like 32K.  We ran
  out of file descriptors.  Basically for every unique session there is a
  directory created for the second level cache.

 But the file handles are pooled as far as I know? Matej, do we
 actually still need separate directories now that we use a page file?

Yeah, we do. We are using one file per pagemap. I believe that the
number of files can be limited as well as the number of directories.
So if you have one directory per session you'll have less entries than
one file per pagemap in one common directory.

-Matej


  I think the real issue for us is that when a session expires the
  corresponding second level cache is not removed from disk.  This seems like
  a serious bug to me.  I have yet to see a second level cache be removed
  unless a forced session invalidate() occurs.

 As far as I know, we do our best to delete those old sessions.
 AbstractHttpSessionStore puts a HttpSessionBindingListener in the
 user's http session when it starts so that the gets notified when
 DiskPageStore#unbind gets called by the second level cache session
 store and that should then take care of removing the files for that
 session.

 Can you debug why this isn't happening in your case?

 Eelco


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



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



Re: packaging images/css in a jar?

2007-11-08 Thread mfs

src/main/resources?..lets say if its a maven structure..

mfs wrote:
 
 Guys,
 
 Wondering as to where would i be packaging my images/css in case of a jar
 ?
 
 Farhan.
 

-- 
View this message in context: 
http://www.nabble.com/packaging-images-css-in-a-jar--tf4772567.html#a13652470
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: packaging images/css in a jar?

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 10:02 AM, mfs [EMAIL PROTECTED] wrote:

 Guys,

 Wondering as to where would i be packaging my images/css in case of a jar ?

Typically relative to where you use it.

Eelco

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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Eelco Hillenius
 Guys I am on the same project so I can speak a bit more.  The real issue is
 that on Redhat the default max directories is something like 32K.  We ran
 out of file descriptors.  Basically for every unique session there is a
 directory created for the second level cache.

But the file handles are pooled as far as I know? Matej, do we
actually still need separate directories now that we use a page file?

 I think the real issue for us is that when a session expires the
 corresponding second level cache is not removed from disk.  This seems like
 a serious bug to me.  I have yet to see a second level cache be removed
 unless a forced session invalidate() occurs.

As far as I know, we do our best to delete those old sessions.
AbstractHttpSessionStore puts a HttpSessionBindingListener in the
user's http session when it starts so that the gets notified when
DiskPageStore#unbind gets called by the second level cache session
store and that should then take care of removing the files for that
session.

Can you debug why this isn't happening in your case?

Eelco

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



RE: Wicket Servlet Filters

2007-11-08 Thread William Hoover
Well, I was thinking more in lines of a request listener (similar to a JSF 
phase listener). As Wicket enters internal phases of execution a listener can 
be added to perform some operations on the event. Just thought it would be 
convenient to do something like this in the Wicket world :)

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 11:51 AM
To: users@wicket.apache.org
Subject: Re: Wicket  Servlet Filters


wicket is a UI framework, handling servlet filters is a bit outside its scope :)

-igor


On 11/8/07, William Hoover [EMAIL PROTECTED] wrote:
 Is there a wicket way to handle servlet filters internally in the API or is 
 the recomended method just to use typical servlet filters?


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



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



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



Re: ResourceReference with locale and style, for CSSs

2007-11-08 Thread German Morales
Hi johan,

The problem is that the file is there... just that it doesn't seem to be
looking for it.

If i force the full constructor:

new ResourceReference(MyPage.class, style.css, getLocale(), getStyle())

all works, so the file is correcly found and the name is correct.

The problem is when i don't set the locale and style explicitely (as it is
supposed to be done):

new ResourceReference(MyPage.class, style.css)

then it doesn't find the file. Actually i think it doesn't even try to
find it, since as i mention i put a breakpoint in
ResourceReference#setStyle() and nobody is calling it. So later internal
code to load the resource uses style and locale with null values.

I'm not sure if there's something i'm missing, or how it is supposed to be
done.

Thanks,

German


It seems that Johan Compagner wrote:
 they locale and style are used to search for it yes
 they are not forced.. What do you mean with that?
 If the file with that style and locale isn't there it will fallback

 johan


 On Nov 7, 2007 10:50 PM, German Morales [EMAIL PROTECTED]
 wrote:

 Hi all,

 I'm having trouble with localized and styled CSSs.

 Everything works alright with HTML. For example, wicket finds
 MyPage_mystyle.html instead of MyPage.html if i've called
 session.setStyle(mystyle). But for CSS i can't get it working.

 i've tried different approaches like:

   // inside the page constructor
   add(HeaderContributor.forCss(new ResourceReference(MyPage.class,
 style.css)));


   // inside renderHead
   cResponse.getHeaderResponse().renderCSSReference(new
 ResourceReference(MyPage.class, style.css));


 None of this worked for me. However, it works if I call the full
 constructor of ResourceReference:

 new ResourceReference(MyPage.class, style.css, getLocale(),
 getStyle())

 But i'm not supposed to do that, because then the Locale and Style are
 forced, and i want this only if the file is present. I know some
 ResourceStreamLocator should be involved in the process, but i don't
 know
 how. I see in the ResourceReference javadoc that the framework should be
 calling the setStyle() method, but i debugged it and it doesn't happen.

 What am i doing wrong?

 Thanks in advance,

 German



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






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



Re: Wicket Servlet Filters

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 8:55 AM, William Hoover [EMAIL PROTECTED] wrote:
 Well, I was thinking more in lines of a request listener (similar to a JSF 
 phase listener). As Wicket enters internal phases of execution a listener can 
 be added to perform some operations on the event. Just thought it would be 
 convenient to do something like this in the Wicket world :)

That probably wouldn't be very object oriented. Like Igor said, we
have various special global listener constructs, and you can also work
with a custom request cycle to react on the start and ending of a
request.

Do you have a specific use case in mind?

Eelco

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



Wicket Servlet Filters

2007-11-08 Thread William Hoover
Is there a wicket way to handle servlet filters internally in the API or is the 
recomended method just to use typical servlet filters?


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



Re: Several localized buttons in a form

2007-11-08 Thread Igor Vaynberg
i would make the cancel button a Link, but thats just me...

-igor


On 11/8/07, Pills [EMAIL PROTECTED] wrote:


 Sebastiaan van Erk wrote:
 
/**
 * Sets the defaultFormProcessing property. When false (default is 
  true),
 * all validation and form updating is bypassed and the onSubmit 
  method
  of
 * that button is called directly, and the onSubmit method of the 
  parent
 * form is not called. A common use for this is to create a cancel
  button.
 *
 * @param defaultFormProcessing
 *defaultFormProcessing
 * @return This
 */
public final Button setDefaultFormProcessing(boolean
  defaultFormProcessing)
 
  :)
 
 It works fine ;)

 Thank you for your help. It was trivial
 --
 View this message in context: 
 http://www.nabble.com/Several-localized-buttons-in-a-form-tf4770293.html#a13645905
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Question about localization

2007-11-08 Thread Igor Vaynberg
write your own wicket:message like tag?

-igor


On 11/8/07, Pills [EMAIL PROTECTED] wrote:



 igor.vaynberg wrote:
 
  application.init() {
   getresourcesettings().setlocalizer(...);
  }
 
  you dont have to use the default resource model, just write your own
  if you dont like the default one.
 
  -igor
 

 Thank you, it works fine ;)

 But I have another problem. I sometimes use wicket:message key=foo as
 a shortcut for inserting text. Is it possible to automatically append some
 text to the key value? (I need to transform it to style1.foo)

 Thank you

 --
 View this message in context: 
 http://www.nabble.com/Question-about-localization-tf4756837.html#a13648232
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Matej Knopp
I see. That would be a serious bug indeed. Can you please file a high
priority JIRA issue? We'll look at it as soon as possible.

-Matej

On Nov 8, 2007 6:35 PM, Chris Lintz [EMAIL PROTECTED] wrote:

 Guys I am on the same project so I can speak a bit more.  The real issue is
 that on Redhat the default max directories is something like 32K.  We ran
 out of file descriptors.  Basically for every unique session there is a
 directory created for the second level cache.

 I think the real issue for us is that when a session expires the
 corresponding second level cache is not removed from disk.  This seems like
 a serious bug to me.  I have yet to see a second level cache be removed
 unless a forced session invalidate() occurs.

 Any ideas on how we can get these page store files to be removed when a
 session times out?   I have looked at tuning the DiskPageStore, but the
 constuctor args dont appear as if they will help the issue:

 DiskPageStore(java.io.File fileStoreFolder, int maxSizePerPagemap, int
 maxSizePerSession, int fileChannelPoolCapacity)




 Johan Compagner wrote:
 
  But 50 is nothing (at least i think it is nothing) and linux should be
  able
  to handle that just fine
  Can somebody peak how many handles we take on those session files? Maybe
  we
  leak somewhere
  or do take more then we think.
 
  johan
 
 
 
  On Nov 8, 2007 2:04 AM, Matej Knopp [EMAIL PROTECTED] wrote:
 
  There is a constructor parameter in DiskPageStore constructor (the
  last int parameter) that says how many handles DiskPageStore will keep
  opened.
 
  But the default number of file handles is 50. If this is causing your
  server file handle problems than you should consider changing the
  configuration. Are you sure there are no other file handles leaking?
  What are the files opened?
 
  -Matej
 
  On 11/8/07, Brandon Harper [EMAIL PROTECTED] wrote:
   Hello All,
  
   Long story short, we're in the process of load testing an application
   built against Wicket 1.3 snapshot.  Unfortunately we've seen some
   server issues with sessions/page maps in the file store during
   testing, and I was wondering how I'd go about programatically changing
   the default page map size in DiskPageStore just to see if changing
   this value affects what we're seeing.
  
   FWIW, right now it looks like we're having issues under load with
   Wicket creating too many open file handles on a fairly default install
   of RHEL 5 which results in exceptions like this:
  
   java.lang.RuntimeException: java.io.FileNotFoundException:
   /usr/local/jboss-
  4.2.1.GA/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
   (No such file or directory)
at
  
  org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
  (FileChannelPool.java:104)
at
  
  org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel
  (FileChannelPool.java:171)
at
  
  org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
  (DiskPageStore.java:224)
at
  
  org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
  (DiskPageStore.java:788)
at
  
  org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
  (DiskPageStore.java:851)
at java.lang.Thread.run(Thread.java:619)
   Caused by: java.io.FileNotFoundException:
   /usr/local/jboss-
  4.2.1.GA/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
   (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:212)
at
  
  org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
  (FileChannelPool.java:99)
  
   Thanks,
  
   - Brandon
  
   --
   http://bharper.com
   http://devnulled.com
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13651858
 Sent from the Wicket - User mailing list archive at Nabble.com.



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



-
To 

Re: packaging images/css in a jar?

2007-11-08 Thread mfs

but i am wondering as to how would i make it work wicket such that image gets
fetched from the classpath and not relative to the application root..
So basically here is my scenario, i have jar bundled with the page
components and in them i want to refer to the images (bundled within the jar
only).

This jar will eventually be bundled within a war application which will be
using these components.

Farhan.





Eelco Hillenius wrote:
 
 On Nov 8, 2007 10:02 AM, mfs [EMAIL PROTECTED] wrote:

 Guys,

 Wondering as to where would i be packaging my images/css in case of a jar
 ?
 
 Typically relative to where you use it.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/packaging-images-css-in-a-jar--tf4772567.html#a13652829
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: Wicket Servlet Filters

2007-11-08 Thread William Hoover
So in theory it can be accomplished, but is not recommended to do so... What is 
the common practice when dealing with wicket related data in a servlet filter? 
Say you have a simple task of checking for a parameter and/or session object 
and redirecting to specified Wicket pages, accordingly? It doesn't seem natural 
to handle this type of logic outside the scope of the Wicket API. I guess this 
is what I'm attempting to avoid :)

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 12:00 PM
To: users@wicket.apache.org
Subject: Re: Wicket  Servlet Filters


in the wicket world components have overridable listeners for
different phases, so you would override it just for components that
need different handling. we are not huge fans of these
global/all-penetrating listeners. although in some cases we have done
so, we have a component instantiation listener and a global before
render listener. but so far that is all iirc.

-igor


On 11/8/07, William Hoover [EMAIL PROTECTED] wrote:
 Well, I was thinking more in lines of a request listener (similar to a JSF 
 phase listener). As Wicket enters internal phases of execution a listener can 
 be added to perform some operations on the event. Just thought it would be 
 convenient to do something like this in the Wicket world :)

 -Original Message-
 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 08, 2007 11:51 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket  Servlet Filters


 wicket is a UI framework, handling servlet filters is a bit outside its scope 
 :)

 -igor


 On 11/8/07, William Hoover [EMAIL PROTECTED] wrote:
  Is there a wicket way to handle servlet filters internally in the API or is 
  the recomended method just to use typical servlet filters?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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



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



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



Re: packaging images/css in a jar?

2007-11-08 Thread Eelco Hillenius
 src/main/resources?..lets say if its a maven structure..

No, just in the classpath. Look at wicket-examples/ images example for instance.

Eelco

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



Re: Disabling serialization/storage of pages in session?

2007-11-08 Thread mfs

Basically we are still researching wicket and figuring out if that would be
the desired framework for us (so far it does look promising)..and in that
context we are exploring all the different
scenarios/use-cases/possibilities...

Now there would be certain use-cases/pages in our application which would
have alot of data in it (lets say in mbs), and in that scenario storing the
entire model-data/components would probably bring in too much of a load on
the system (in my opinion...given high volume of users..) so with that may
be we would not want to store the pages in pageMap at all (which in turn is
stored in the session)..i do understand the back button scenario where we
might think that yeah we need to have that previous state
..but lets say what if we dont have that back button as a link (offcouse we
cant avoid the browser-back button where he would be loaded with catch-ed
page)
So its in the above context i had asked about disabling of page/pageMap
storage in session altogether (not just the serialization of old pages)



Johan Compagner wrote:
 
 like eelco said if you don't want to serialize and store on disk, create a
 filestore that does nothing
 (or holds a few pages for per session in mem for backbutton)
 
 But what do you mean with disable the storage of pages in a session?
 You don't want to store a statefull page at all in the pagemap (and thats
 then in the session)?
 Because thats really no use at all then because the page in the browser is
 useless
 If you don't want pages in the session and on disk. Then make them fully
 stateless (see stateless link and form)
 
 johan
 
 
 
 
 On Nov 8, 2007 12:08 AM, mfs [EMAIL PROTECTED] wrote:
 

 Guys,

 If need be, can we disable altogether the storage of pages (in the form
 of
 a
 pageMap) in session, similarly on the disk ?

 Thanks and Regards,

 Farhan.
 --
 View this message in context:
 http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13638150
 Sent from the Wicket - User mailing list archive at
 Nabble.comhttp://nabble.com/
 .


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13653100
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Disabling serialization/storage of pages in session?

2007-11-08 Thread Eelco Hillenius
 Now there would be certain use-cases/pages in our application which would
 have alot of data in it (lets say in mbs), and in that scenario storing the
 entire model-data/components would probably bring in too much of a load on
 the system (in my opinion...given high volume of users..) so with that may
 be we would not want to store the pages in pageMap at all (which in turn is
 stored in the session).

But I hope you're not storing MBs of data in your pages?! Users will
also get pages served that are MBs large? Note that you don't have to
keep anything in memory if you work with detachable models.

Eelco

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



Re: Mystery problem w/ Wicket + Glassfish v2?

2007-11-08 Thread Paolo Di Tommaso
Has Wicket 1.2.7 been released? I'm unable to find on 1.2.x download page ..


Thanks, Paolo

On Nov 5, 2007 10:17 PM, Johan Compagner [EMAIL PROTECTED] wrote:

 please upgrade to at least the latest version of 1.2 (1.2.7) because if i
 look at getContentType of an innerclass of DynamicWebResource
 then that is now a abstract method. So there are changes in that area.

 johan



 On 11/5/07, V. Jenks [EMAIL PROTECTED] wrote:
 
 
  OOps!  Sorry, in the Glassfish log-viewer they separate the top line of
  the
  stack from the rest, for some reason.  Here it is:
 
  null java.lang.NullPointerException at
  wicket.markup.html.DynamicWebResource$1.getContentType(
  DynamicWebResource.java
 
 
 
  Johan Compagner wrote:
  
   you miss the most importand part of the error:  the top!
  
  
   On 11/5/07, V. Jenks [EMAIL PROTECTED] wrote:
  
  
   Occasionally, my application will just start doing this - throwing
  this
   error.  I am using Wicket 1.2.4 because my application is stuck at
  that
   version for the time being.  I do not have the time to make the
 changes
   to
   upgrade to the latest version, right now.
  
   Rebooting the app server (Glassfish v2) usually fixes it but when
 it
   does
   happen, it prevents orders from going through and frustrates
   customers.  Not
   a good thing...
  
   I have no idea what causes this and don't know the internals of
  Glassfish
   to
   even begin to try and troubleshoot.  All I know for sure is; this
 NEVER
   happened on JBoss 4.0.x with Wicket.  I figured it was safe to assume
   this
   had nothing to do with my code - nowhere in the stack does it point
 to
   anything in my application (or any application running on it, for
 that
   matter.)
  
   I realize this is vague so hopefully someone else is experiencing
 this
   and
   can help troubleshoot.
  
   Here's the error:
  
   ***
  
   156) at wicket.Resource.onResourceRequested(Resource.java:119) at
   wicket.request.target.resource.SharedResourceRequestTarget.respond(
   SharedResourceRequestTarget.java:192)
   at
   wicket.request.compound.DefaultResponseStrategy.respond(
   DefaultResponseStrategy.java:49)
   at
   wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond
 (
   AbstractCompoundRequestCycleProcessor.java:66)
   at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java
 :902)
   at
   wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:934) at
   wicket.RequestCycle.step(RequestCycle.java:1010) at
   wicket.RequestCycle.steps(RequestCycle.java:1084) at
   wicket.RequestCycle.request(RequestCycle.java:454) at
   wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at
   org.apache.catalina.core.ApplicationFilterChain.servletService(
   ApplicationFilterChain.java:411)
   at
   org.apache.catalina.core.StandardWrapperValve.invoke(
   StandardWrapperValve.java:290)
   at
   org.apache.catalina.core.StandardContextValve.invokeInternal(
   StandardContextValve.java:271)
   at
   org.apache.catalina.core.StandardContextValve.invoke(
   StandardContextValve.java:202)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :632)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :577)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at
   org.apache.catalina.core.StandardHostValve.invoke(
  StandardHostValve.java
   :206)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :632)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :577)
   at
   org.apache.catalina.core.StandardPipeline.invoke(
 StandardPipeline.java
   :571)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
  :1080)
   at
   org.apache.catalina.core.StandardEngineValve.invoke(
   StandardEngineValve.java:150)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :632)
   at
   org.apache.catalina.core.StandardPipeline.doInvoke(
  StandardPipeline.java
   :577)
   at
   org.apache.catalina.core.StandardPipeline.invoke(
 StandardPipeline.java
   :571)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
  :1080)
   at
   org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java
 :270)
   at
  
  
 
 com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
   (DefaultProcessorTask.java:637)
   at
  
 com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess
  (
   DefaultProcessorTask.java:568)
   at
   com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process
 (
   DefaultProcessorTask.java:813)
   at
  
  
 
 com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
   

Re: packaging images/css in a jar?

2007-11-08 Thread Eelco Hillenius
 but i am wondering as to how would i make it work wicket such that image gets
 fetched from the classpath and not relative to the application root..
 So basically here is my scenario, i have jar bundled with the page
 components and in them i want to refer to the images (bundled within the jar
 only).

 This jar will eventually be bundled within a war application which will be
 using these components.

Wicket reads packaged resources from the classpath, including
individual jars. For instance, look at the date picker in
wicket-datetime. That has a whole bunch of CSS/ JavaScript and even
image dependencies that all get served from the jar.

Eelco

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



Re: Wicket portlet newbie questions

2007-11-08 Thread Thijs

Yeah I know
Read
http://www.liferay.com/web/guest/community/forums/message_boards/message/249501
Then there also is:
https://issues.apache.org/jira/browse/WICKET-1132
So your not out of the woods jet...

Thijs


justment wrote:
 
 Ok now I already add wicket portlet page to liferay.But i have new problem
 :-)
 when i click in some wicket example i have error.
 
 02:42:45,572 ERROR [jsp:52]
 java.lang.NullPointerException
 at
 org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:35
 5)
 at
 org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWeb
 Response.java:74)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:
 330)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.ja
 va:169)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
 icationFilterChain.java:215)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
 ilterChain.java:188)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
 atcher.java:691)
 at
 org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
 ispatcher.java:594)
  
 Can you pls help me.
 Thk you.
 
 
 Thijs wrote:
 
 Just download the source from SVN and build it. You'll have to change the
 portlet.xml anyway
 
 
 justment wrote:
 
 Hi Thijs,Please tell me about version of portlet wicket-exemples.war
 I can't find it on wicket site .Thank you
 
 
 Thijs wrote:
 
 Check out http://www.nabble.com/Portlet-howto-tf4587073.html#a13093514
 
 justment wrote:
 I want to implements wicket portlet on liferay
 but I can't get any demo,documents from google :p
 Thanks in advance for any pointers and explanations

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

-- 
View this message in context: 
http://www.nabble.com/Wicket-portlet-newbie-questions-tf4751827.html#a13653300
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Doing something on Shift+Click

2007-11-08 Thread vr . sundar
Hi,

I have to activate a hidden option when a user shift+clicks something.
 How do I go about doing this? From reading the docs, the idea I
currently have is this: Add a new behavior that extends
AjaxEventBehavior for the onClick event.This behavior should
contribute some javascript that is used on the onClick event. Add this
new js function to the event processing using the IAjaxCallDecorator
interface. This js function will check if event.shiftKey is true. If
so, do the usual wicketAjaxGet otherwise do nothing.

Is this doable? Am I on the right track or is there some simpler way.
Any suggestions greatly appreciated. My other option is to have a
hidden link with an accessKey that I can use to get the job done. But
from what i read accessKey seems to work differently on diff browsers
and OS.

thanks
sundar

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



Re: Is it possible to get AjaxLink stateless?

2007-11-08 Thread Johan Compagner
no because the ajax behaviors are also not stateless.
So even if you make the link stateless then the behaviors it has make them
statefull again.

Sometimes ajax things can be stateless but i still think it is a bit strange
for 90% or more of the cases
Why is the link an ajax link?. Because in my eyes if you use ajax you still
use the old page
and the ajax call just updates parts of the page. But if you do that. Then
ajax can't be that easy
stateless because how are you going to make exactly the same state as the
client sees in the browser
for the next click?

And ajax clicks should be lean and mean in my eyes because they should be
fast and could happen frequently
and creating constantly a page for that is pretty heavy.

johan



On Nov 8, 2007 11:50 PM, Chris Lintz [EMAIL PROTECTED] wrote:


 Hi.  So i have tried setting the stateless hint and my AjaxLink is still
 statefull.  I read some where where even Ajax components can be stateless.
 What am I missing?

 AjaxLink addFriend = new AjaxLink(addFriend)
{
@Override
protected boolean getStatelessHint()
{
return true;
}

private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget request)
{
makeFriends(sessionUserName,
 profileUserName);
}
 }
 --
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13657606
 Sent from the Wicket - User mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


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




Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 3:31 PM, Chris Lintz [EMAIL PROTECTED] wrote:

 We get dangling cache files.  I have the sessions set to expire in 1 hour.  I
 check one of my servers and i see cache files from over a week old.  This
 could of only have occurred because of the multiple restarts.  Maybe its a
 bad timing where the HttpSessionBindingListener does not receive a
 notification.

We (Teachscape) had a couple of occasions where it seems we didn't get
notifications of expired sessions (using Jetty btw). So it may very
well be a bug. Unfortunately one that is hard to trace.

 I figured the DiskPageStore probably kept a map of cache files.  I those
 references were kept in memory, there be a separate thread that runs and
 grabs all file cache names in the file store (basically the JSESSIONIDs) and
 compare that to the references in the map to see what is a valid cache file.
 I suppose my assumptions are wrong.

The way to go then would be to work with a proper HttpSessionListener
and HttpSessionActivationListener. That should cover both expiries and
passivate/ activates.

Eelco

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



Re: WicketNotSerializableException withi FileUpload

2007-11-08 Thread Johan Compagner
Ok the problem is that somehow you are holding on to a FileUpload in your
page
And those are not meant to be kept over requests.

it seems that you keep it if i read it right in a normal Model:

[class=org.apache.wicket.model.Model]
   private java.io.Serializable
org.apache.wicket.model.Model.object
[class=org.apache.wicket.markup.html.form.upload.FileUpload]

How do you create the FileUploadField?

I guess with a normal new Model()?

I think we need to fix that somehow in the detach of the FUF because if the
model is set
we should look into the model and if it is a FileUpload get rid of it or
something.

johan
On Nov 8, 2007 3:26 PM, James Perry [EMAIL PROTECTED] wrote:

 Hello Johan,

 Thanks for the repsonse. :-)

 All I have done is follow the code within theSingleFileUpload example
 in wicketstuff.com. Is this a bug or am I doing something wrong? I am
 using Wicket 1.3.0-beta4 and here is the stack of the exception:

 ERROR - Objects- Error serializing object class
 com.wicketcart.pages.admin.AddProductPage [object=[Page class =
 com.wicketcart.pages.admin.AddProductPage, id = 2, version = 0]]

 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class:
 org.apache.wicket.util.io.DeferredFileOutputStream
 Field hierarchy is:
  2 [class=com.wicketcart.pages.admin.AddProductPage, path=2]
private java.lang.Object
 org.apache.wicket.MarkupContainer.children
 [class=com.wicketcart.components.MenuBorder, path=2:libBorder]
  private java.lang.Object
 org.apache.wicket.MarkupContainer.children
 [class=[Lorg.apache.wicket.Component;]
private
 org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper

 org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelper
 [7]
 [class=com.wicketcart.pages.admin.AddProductPage$AddProductForm,
 path=2:libBorder:productForm]
  private java.lang.Object
 org.apache.wicket.MarkupContainer.children
 [class=[Lorg.apache.wicket.Component;]
private final java.lang.String
 org.apache.wicket.markup.html.form.ChoiceRenderer.idExpression[7]
 [class=org.apache.wicket.markup.html.form.upload.FileUploadField,
 path=2:libBorder:productForm:fileInput]
  org.apache.wicket.model.IModel
 org.apache.wicket.Component.model
 [class=org.apache.wicket.model.Model]
private java.io.Serializable
 org.apache.wicket.model.Model.object
 [class=org.apache.wicket.markup.html.form.upload.FileUpload]
  private final org.apache.wicket.util.upload.FileItem
 org.apache.wicket.markup.html.form.upload.FileUpload.item
 [class=org.apache.wicket.util.upload.DiskFileItem]
private
 org.apache.wicket.util.io.DeferredFileOutputStream
 org.apache.wicket.util.upload.DiskFileItem.dfos
 [class=org.apache.wicket.util.io.DeferredFileOutputStream] -
 field that is not serializable
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:347)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:393)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:393)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
 SerializableChecker.java:615)
at org.apache.wicket.util.io.SerializableChecker.check(
 SerializableChecker.java:538)
at
 org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
 SerializableChecker.java:683)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java
 :298)
at
 org.apache.wicket.util.io.IObjectStreamFactory$1.writeObjectOverride(
 IObjectStreamFactory.java:74)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java
 :298)
at 

Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Martijn Dashorst
No, as sometimes you actually want to resume those sessions.

I guess this is more  shell type of thing rather than somethign Wicket
can take care off. At least, as long as there is no bug in cleaning
the stuff up when sessions expire.

Martijn


On 11/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 On Nov 8, 2007 3:09 PM, Johan Compagner [EMAIL PROTECTED] wrote:
  
  
   1)  Shall we file a Jira for a enhancement to the DiskPageStore which
   would
   be a cleanup of any dangling cache files not part of the current
   DiskPageStore instance?
 
 
  and which are dangling??
  How do you know that? If i stop tomcat (even in development mode)
  and i restart again nothing is dangling!! All the session are still there
  and are still
  using the page store.
 
  And from top of my head there is no api to get all the current session id's
  from
  an instance when the instance does start up..

 But we could ditch ALL the directories it can find in the temp
 directory the page store uses when starting up, right?

 Eelco

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




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

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



Re: Form: onSubmit not called

2007-11-08 Thread Brill Pappin

Thats pretty much it.

I had a date member of my bean and was using a text field to set it on
post... of course since it didn't know the format I expected, it failed and
because I didn't have a feedback panel, I couldn't see it (and nothing was
coming out in the log).

Although it was my own fault hands down (silly me didn't write a test first)
I'm thinking that I could have saved hours with some sort of indication...
now that its happened once the lesson is pretty clear, but a lot of people
are going to stumble over stuff like that when they first get into Wicket.

- Brill


Gwyn wrote:
 
 Validation errors but no feedback panel to see them?
 

-- 
View this message in context: 
http://www.nabble.com/Form%3A-onSubmit-not-called-tf4763217.html#a13659495
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: facebook support

2007-11-08 Thread Chris Lintz

I am curious what type of Wicket components/functionality you are hoping for?

Just on a side note, we are using Octazen - http://www.octazen.com/ for
social network slurping of contacts, etc.  Of course there is a small
license fee for the product, so it would be ideal to have a free library to
work with.  

 

Matt Jensen-2 wrote:
 
 
 I am working on this, though I'm trying to leave the door open to also 
 supporting MySpace in the future.  I have not done much yet--and nothing 
 Wicket-specific--but I do plan to include a Wicket module.
 
 Jonathan Locke wrote:
 I'd like to get facebook support into Wicket.  If anyone out there has
 interest and would like to cooperate(particularly anyone with Facebook
 experience), please get in touch with me.  Thanks.
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/facebook-support-tf4773546.html#a13658830
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Chris Lintz

How can we limit the number of files and/or directories?  I only see the
option to limit the size of the session or the size of the pagemap for the
DiskPageStore ( DiskPageStore(java.io.File fileStoreFolder, int
maxSizePerPagemap, int maxSizePerSession, int fileChannelPoolCapacity) 



Matej Knopp-2 wrote:
 
 On Nov 8, 2007 6:43 PM, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Guys I am on the same project so I can speak a bit more.  The real
 issue is
  that on Redhat the default max directories is something like 32K.  We
 ran
  out of file descriptors.  Basically for every unique session there is a
  directory created for the second level cache.

 But the file handles are pooled as far as I know? Matej, do we
 actually still need separate directories now that we use a page file?
 
 Yeah, we do. We are using one file per pagemap. I believe that the
 number of files can be limited as well as the number of directories.
 So if you have one directory per session you'll have less entries than
 one file per pagemap in one common directory.
 
 -Matej
 

  I think the real issue for us is that when a session expires the
  corresponding second level cache is not removed from disk.  This seems
 like
  a serious bug to me.  I have yet to see a second level cache be removed
  unless a forced session invalidate() occurs.

 As far as I know, we do our best to delete those old sessions.
 AbstractHttpSessionStore puts a HttpSessionBindingListener in the
 user's http session when it starts so that the gets notified when
 DiskPageStore#unbind gets called by the second level cache session
 store and that should then take care of removing the files for that
 session.

 Can you debug why this isn't happening in your case?

 Eelco


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


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

-- 
View this message in context: 
http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13657063
Sent from the Wicket - User mailing list archive at Nabble.com.


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



facebook support

2007-11-08 Thread Jonathan Locke

I'd like to get facebook support into Wicket.  If anyone out there has
interest and would like to cooperate(particularly anyone with Facebook
experience), please get in touch with me.  Thanks.
-- 
View this message in context: 
http://www.nabble.com/facebook-support-tf4773546.html#a13655578
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: packaging images/css in a jar?

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 11:16 AM, mfs [EMAIL PROTECTED] wrote:

 Actually it does work when the image is in the same directory as that of the
 page (same with the example u pointed out)..how would i refer to an image
 which is altogether is a different structure...

 lets say my page is at org.xyz.util [page.html] and from within it i want to
 refer to an image which is in the images directory...

 using

 add(new Image(taxCientLogo, new Model(images/company-logo.jpg)));
 add(new Image(taxCientLogo, new Model(/images/company-logo.jpg)));

For images residing in your web app directory, you would use for
instance new ContextImage(img, new
Model(images/company-logo.jpg)); or simply img
src=images/company-logo.jpg /

Eelco

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



RE: Wicket Servlet Filters

2007-11-08 Thread William Hoover
It's not for authorization... It's for running reports. I realize that the 
Wicket stratagy is to work with components, but in this instance its not a 
practical option. The business requirement dictates that from any page in the 
application a parameter can be added to the url (by means of external systems) 
that will route the application (Wicket) to the appropriate page for 
processing. I'm over simplifying the scenario, but that is the jist of it.

I hope to convert this process to a webservice to be consumed by the internal 
Wicket application in the near future, but there are some dependencies with 
some of the external applications that prevent us from doing so at this time.

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 1:38 PM
To: users@wicket.apache.org
Subject: Re: Wicket  Servlet Filters


On Nov 8, 2007 10:26 AM, William Hoover [EMAIL PROTECTED] wrote:
 So in theory it can be accomplished, but is not recommended to do so... What 
 is the common practice when dealing with wicket related data in a servlet 
 filter?

Try to forget how other frameworks do things and look for solutions on
a case by case basis.

 Say you have a simple task of checking for a parameter and/or session object 
 and redirecting to specified Wicket pages, accordingly?

For what purpose? If it is for authorization, we have authorization
strategies: see wicket-auth for an example project. Furthermore, you
would not be checking for a parameter since the idea with using Wicket
is that you work with components/ objects, not request parameters.

Eelco

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



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



Re: ResourceReference with locale and style, for CSSs

2007-11-08 Thread German Morales
Hi,

I use it inside a page.

I've tried...

   // inside the page constructor
   add(HeaderContributor.forCss(new ResourceReference(MyPage.class,
style.css)));

and

   // inside renderHead
   cResponse.getHeaderResponse().renderCSSReference(new
ResourceReference(MyPage.class, style.css));


And I don't want to set the style and locale explicitely. What i want is
to deliver the application to a customer, and, if he wants, he adds the
customized page for a locale or style by itself (he could set the style
with a parameter or whatever). And as far as i understand the wicket
approach, that's how it should work automatically. In fact it works
perfecly when i do it for the html of the same page. The difference is
that the html is handled in other way (the framework does it) and when i
try to do it for the CSS of the page i do it (and it doesn't work). So
there must be something i'm not doing properly.

Or, how should be the way to provide styled CSSs, there is another aproach?

thanks and bye,

German

It seems that Eelco Hillenius wrote:
 The problem is that the file is there... just that it doesn't seem to be
 looking for it.

 If i force the full constructor:

 new ResourceReference(MyPage.class, style.css, getLocale(),
 getStyle())

 all works, so the file is correcly found and the name is correct.

 The problem is when i don't set the locale and style explicitely (as it
 is
 supposed to be done):

 new ResourceReference(MyPage.class, style.css)

 then it doesn't find the file. Actually i think it doesn't even try to
 find it, since as i mention i put a breakpoint in
 ResourceReference#setStyle() and nobody is calling it. So later internal
 code to load the resource uses style and locale with null values.

 How do you use the resource reference? I think the class was designed
 in such a way that the components that use it (Image for instance) are
 responsible for setting the appropriate locale/ style 'just in time',
 so that switching locales etc works.

 Eelco

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





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



Re: Wicket Servlet Filters

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 10:26 AM, William Hoover [EMAIL PROTECTED] wrote:
 So in theory it can be accomplished, but is not recommended to do so... What 
 is the common practice when dealing with wicket related data in a servlet 
 filter?

Try to forget how other frameworks do things and look for solutions on
a case by case basis.

 Say you have a simple task of checking for a parameter and/or session object 
 and redirecting to specified Wicket pages, accordingly?

For what purpose? If it is for authorization, we have authorization
strategies: see wicket-auth for an example project. Furthermore, you
would not be checking for a parameter since the idea with using Wicket
is that you work with components/ objects, not request parameters.

Eelco

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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Matej Knopp
Yeah, something like this could be done, but then we would probably
have to user separate folder for each pagestore / application, just to
make sure that one page store doesn't touch other pagestore files.

Still, the question is whether we should do this at all. If you kill
your container (don't bring it down the regular way), shouldn't you be
also responsible for cleaning the temp folder?

-Matej

On Nov 9, 2007 12:31 AM, Chris Lintz [EMAIL PROTECTED] wrote:

 We get dangling cache files.  I have the sessions set to expire in 1 hour.  I
 check one of my servers and i see cache files from over a week old.  This
 could of only have occurred because of the multiple restarts.  Maybe its a
 bad timing where the HttpSessionBindingListener does not receive a
 notification.

 I figured the DiskPageStore probably kept a map of cache files.  I those
 references were kept in memory, there be a separate thread that runs and
 grabs all file cache names in the file store (basically the JSESSIONIDs) and
 compare that to the references in the map to see what is a valid cache file.
 I suppose my assumptions are wrong.




 Johan Compagner wrote:
 
 
 
  1)  Shall we file a Jira for a enhancement to the DiskPageStore which
  would
  be a cleanup of any dangling cache files not part of the current
  DiskPageStore instance?
 
 
  and which are dangling??
  How do you know that? If i stop tomcat (even in development mode)
  and i restart again nothing is dangling!! All the session are still there
  and are still
  using the page store.
 
  And from top of my head there is no api to get all the current session
  id's
  from
  an instance when the instance does start up..
 
  So as long as we can't do that, we can't delete files because we have no
  idea if the sessions are really gone or not.
  I guess a seperate cron job can clean up the files in that dir if they are
  really old?
 
  johan
 
 

 --
 View this message in context: 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13658369

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


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



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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Eelco Hillenius
 No we can't do that, If you as you should terminate your web container
 gracefully
 then the web container will save all the sessions to disk. Then if you
 restart it again
 all the sessions are loaded again. And yes the application works just as
 it was never
 restarted. But if we throw away all the page stores. Then we loose all the
 data
 of sessions that are currently active.

 The only thing i can think of is having some check that only deletes things
 that are not touched for X hours or days.

We could read the session timeout from web.xml and delete what is older.

Not a high priority thing for me tbh, but I think it can be done.

Eelco

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



Is it possible to get AjaxLink stateless?

2007-11-08 Thread Chris Lintz

Hi.  So i have tried setting the stateless hint and my AjaxLink is still
statefull.  I read some where where even Ajax components can be stateless. 
What am I missing?

AjaxLink addFriend = new AjaxLink(addFriend)
{
@Override
protected boolean getStatelessHint() 
{
return true;
}

private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget request)
{
makeFriends(sessionUserName, profileUserName);
}
}
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13657606
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: facebook support

2007-11-08 Thread Matt Jensen


I am working on this, though I'm trying to leave the door open to also 
supporting MySpace in the future.  I have not done much yet--and nothing 
Wicket-specific--but I do plan to include a Wicket module.


Jonathan Locke wrote:

I'd like to get facebook support into Wicket.  If anyone out there has
interest and would like to cooperate(particularly anyone with Facebook
experience), please get in touch with me.  Thanks.
  



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



Re: Component.wrap and IChainingModel

2007-11-08 Thread ChuckDeal


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


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

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

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

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

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


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



Re: Disabling serialization/storage of pages in session?

2007-11-08 Thread mfs

Well that was just hypothetically speaking..what i meant was it would have
loads of data loaded in it..so it was that scenario where i was wondering
that we shouldnt store the state of each page.
Yes as you pointed out using detachable models can certainly be one to way
to go..but at the same time since i am sort of presenting my company with
all the features, i want to be prepared with answers and would want to know
as much as i can..

So with what i understand the page serialization can be disabled by
providing a dummy page-store but the storage of pages in the pageMap and
hence in the current active session is something which is implicit and not
something we can avoid..



Eelco Hillenius wrote:
 
 Now there would be certain use-cases/pages in our application which would
 have alot of data in it (lets say in mbs), and in that scenario storing
 the
 entire model-data/components would probably bring in too much of a load
 on
 the system (in my opinion...given high volume of users..) so with that
 may
 be we would not want to store the pages in pageMap at all (which in turn
 is
 stored in the session).
 
 But I hope you're not storing MBs of data in your pages?! Users will
 also get pages served that are MBs large? Note that you don't have to
 keep anything in memory if you work with detachable models.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Disabling-serialization-storage-of-pages-in-session--tf4768006.html#a13653854
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket Servlet Filters

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 11:14 AM, William Hoover [EMAIL PROTECTED] wrote:
 It's not for authorization... It's for running reports. I realize that the 
 Wicket stratagy is to work with components, but in this instance its not a 
 practical option. The business requirement dictates that from any page in the 
 application a parameter can be added to the url (by means of external 
 systems) that will route the application (Wicket) to the appropriate page for 
 processing. I'm over simplifying the scenario, but that is the jist of it.

 I hope to convert this process to a webservice to be consumed by the internal 
 Wicket application in the near future, but there are some dependencies with 
 some of the external applications that prevent us from doing so at this time.

You could use Wicket resources for this. But you don't have to use
Wicket for everything you do either; if it is simpler to use a plain
servlet for this, that's fine.

Eelco

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



Re: Component.wrap and IChainingModel

2007-11-08 Thread Dmitry Kandalov
On Wednesday 07 November 2007 01:18:32 ChuckDeal wrote:

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

Perhaps I didn't get the explanation but why can't you wrap models in this 
order?

AppendingListModel(
SortingModel(
HibernateListModel()
)
)

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

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

I'd like to.


Dima

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



Re: packaging images/css in a jar?

2007-11-08 Thread mfs

Actually it does work when the image is in the same directory as that of the
page (same with the example u pointed out)..how would i refer to an image
which is altogether is a different structure...

lets say my page is at org.xyz.util [page.html] and from within it i want to
refer to an image which is in the images directory...

using 

add(new Image(taxCientLogo, new Model(images/company-logo.jpg)));
add(new Image(taxCientLogo, new Model(/images/company-logo.jpg)));

makes it look inside util and appends the above path..





Eelco Hillenius wrote:
 
 but i am wondering as to how would i make it work wicket such that image
 gets
 fetched from the classpath and not relative to the application root..
 So basically here is my scenario, i have jar bundled with the page
 components and in them i want to refer to the images (bundled within the
 jar
 only).

 This jar will eventually be bundled within a war application which will
 be
 using these components.
 
 Wicket reads packaged resources from the classpath, including
 individual jars. For instance, look at the date picker in
 wicket-datetime. That has a whole bunch of CSS/ JavaScript and even
 image dependencies that all get served from the jar.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/packaging-images-css-in-a-jar--tf4772567.html#a13653772
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Component.wrap and IChainingModel

2007-11-08 Thread ChuckDeal


Johan Compagner wrote:
 


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

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

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

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


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



Re: packaging images/css in a jar?

2007-11-08 Thread Eelco Hillenius
 Anyways actually i dont have a webapp directory and dont want to have that
 in my jar project...just want the .class files and the images (and may be
 css)..both residing it a different folders structure...
 basically below is the resulting jar structure i have and would want to keep

 my-custom-component
 - [package/classes] : org/xyz/utils (contains the page components and other
 classes)
 - [images/css] : images/myimage.jpg, css/style.css

The only way to do that is to create an images package, put some dummy
class in there, and use that as the reference when you these
resources.

Eelco

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



Re: Form: onSubmit not called

2007-11-08 Thread Eelco Hillenius
 Although it was my own fault hands down (silly me didn't write a test first)
 I'm thinking that I could have saved hours with some sort of indication...
 now that its happened once the lesson is pretty clear, but a lot of people
 are going to stumble over stuff like that when they first get into Wicket.

Yeah. If you can open up a JIRA issue for it, we can think/ discuss
what we could do here.

Eelco

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



RE: Attempted summary of multiple wicket:child / thread

2007-11-08 Thread Chris Colman
 That is what I'd suggest as well, since it involves the least amount
of
 change. As an added bonus, if no id's are added and 2 wicket:child
 sections are used, it could throw an exception (which it currently
does
 not do, it just silently ignores the second wicket:child).

That would be magic!

While we're at this epic moment after spending days thrashing this out
could we spend just 3 extra minutes to investigate implementing standard
Java method like behavior for this feature?
Ie., In the case that no override extend is provided in a derived
page, simply use the markup in the child tag in the base page.

Then it would work like methods work in Java - and it's probably how
most Java developers would naturally expect an OO framework like wicket
to work anyway.

Intuitively it seems like an easy to implement option in the framework:
the child/extend feature is already merging code from the base page
anyway - if there is no override extend tag in a derived page then it
simply pulls the markup from the base page's child tag.

 
 Regards,
 Sebastiaan

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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Chris Lintz

Ok here is a bit more clarity after digging further.  Timed out sessions do
trigger a removal of the of the PageStore file.  However if Tomcat is
restarted there is no cleanup of the PageStore files on disk.  In other
words the Page Store will leak those cache files and never clean them up.   
From these results, here are my questions now on all of this:

1)  Shall we file a Jira for a enhancement to the DiskPageStore which would
be a cleanup of any dangling cache files not part of the current
DiskPageStore instance? 

2)  I am stlll trying to figure out how to limit the max number of
directories and or files created by the DiskPageStore.  I am less concerned
about max sizes of sessions and page map and more concerned about the numer
of directories/files - any ideas?

thanks all for your quick responses and insight.



Matej Knopp-2 wrote:
 
 I see. That would be a serious bug indeed. Can you please file a high
 priority JIRA issue? We'll look at it as soon as possible.
 
 -Matej
 
 On Nov 8, 2007 6:35 PM, Chris Lintz [EMAIL PROTECTED] wrote:

 Guys I am on the same project so I can speak a bit more.  The real issue
 is
 that on Redhat the default max directories is something like 32K.  We ran
 out of file descriptors.  Basically for every unique session there is a
 directory created for the second level cache.

 I think the real issue for us is that when a session expires the
 corresponding second level cache is not removed from disk.  This seems
 like
 a serious bug to me.  I have yet to see a second level cache be removed
 unless a forced session invalidate() occurs.

 Any ideas on how we can get these page store files to be removed when a
 session times out?   I have looked at tuning the DiskPageStore, but the
 constuctor args dont appear as if they will help the issue:

 DiskPageStore(java.io.File fileStoreFolder, int maxSizePerPagemap, int
 maxSizePerSession, int fileChannelPoolCapacity)




 Johan Compagner wrote:
 
  But 50 is nothing (at least i think it is nothing) and linux should be
  able
  to handle that just fine
  Can somebody peak how many handles we take on those session files?
 Maybe
  we
  leak somewhere
  or do take more then we think.
 
  johan
 
 
 
  On Nov 8, 2007 2:04 AM, Matej Knopp [EMAIL PROTECTED] wrote:
 
  There is a constructor parameter in DiskPageStore constructor (the
  last int parameter) that says how many handles DiskPageStore will keep
  opened.
 
  But the default number of file handles is 50. If this is causing your
  server file handle problems than you should consider changing the
  configuration. Are you sure there are no other file handles leaking?
  What are the files opened?
 
  -Matej
 
  On 11/8/07, Brandon Harper [EMAIL PROTECTED] wrote:
   Hello All,
  
   Long story short, we're in the process of load testing an
 application
   built against Wicket 1.3 snapshot.  Unfortunately we've seen some
   server issues with sessions/page maps in the file store during
   testing, and I was wondering how I'd go about programatically
 changing
   the default page map size in DiskPageStore just to see if changing
   this value affects what we're seeing.
  
   FWIW, right now it looks like we're having issues under load with
   Wicket creating too many open file handles on a fairly default
 install
   of RHEL 5 which results in exceptions like this:
  
   java.lang.RuntimeException: java.io.FileNotFoundException:
   /usr/local/jboss-
 
 4.2.1.GA/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
   (No such file or directory)
at
  
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
  (FileChannelPool.java:104)
at
  
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel
  (FileChannelPool.java:171)
at
  
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
  (DiskPageStore.java:224)
at
  
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
  (DiskPageStore.java:788)
at
  
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
  (DiskPageStore.java:851)
at java.lang.Thread.run(Thread.java:619)
   Caused by: java.io.FileNotFoundException:
   /usr/local/jboss-
 
 4.2.1.GA/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
   (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at
 java.io.RandomAccessFile.init(RandomAccessFile.java:212)
at
  
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
  (FileChannelPool.java:99)
  
   Thanks,
  

Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Eelco Hillenius
 Ok here is a bit more clarity after digging further.  Timed out sessions do
 trigger a removal of the of the PageStore file.  However if Tomcat is
 restarted there is no cleanup of the PageStore files on disk.  In other
 words the Page Store will leak those cache files and never clean them up.
 From these results, here are my questions now on all of this:

 1)  Shall we file a Jira for a enhancement to the DiskPageStore which would
 be a cleanup of any dangling cache files not part of the current
 DiskPageStore instance?

Sure.

 2)  I am stlll trying to figure out how to limit the max number of
 directories and or files created by the DiskPageStore.  I am less concerned
 about max sizes of sessions and page map and more concerned about the numer
 of directories/files - any ideas?

Well, think about the implication of that limit: you basically limit
the number of concurrent sessions you can handle. Your servlet
container/ load balancer would be a better place to impose things like
that.

Do you really have a limit on how many files can be created? You
typically want to limit the number of active file handles at any given
time, and I think that is already part of the package. To limit the
number of files/ directories strikes me as on odd thing to want.

Eelco

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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Johan Compagner


 1)  Shall we file a Jira for a enhancement to the DiskPageStore which
 would
 be a cleanup of any dangling cache files not part of the current
 DiskPageStore instance?


and which are dangling??
How do you know that? If i stop tomcat (even in development mode)
and i restart again nothing is dangling!! All the session are still there
and are still
using the page store.

And from top of my head there is no api to get all the current session id's
from
an instance when the instance does start up..

So as long as we can't do that, we can't delete files because we have no
idea if the sessions are really gone or not.
I guess a seperate cron job can clean up the files in that dir if they are
really old?

johan


Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 3:09 PM, Johan Compagner [EMAIL PROTECTED] wrote:
 
 
  1)  Shall we file a Jira for a enhancement to the DiskPageStore which
  would
  be a cleanup of any dangling cache files not part of the current
  DiskPageStore instance?


 and which are dangling??
 How do you know that? If i stop tomcat (even in development mode)
 and i restart again nothing is dangling!! All the session are still there
 and are still
 using the page store.

 And from top of my head there is no api to get all the current session id's
 from
 an instance when the instance does start up..

But we could ditch ALL the directories it can find in the temp
directory the page store uses when starting up, right?

Eelco

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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Johan Compagner

  And from top of my head there is no api to get all the current session
 id's
  from
  an instance when the instance does start up..

 But we could ditch ALL the directories it can find in the temp
 directory the page store uses when starting up, right?


No we can't do that, If you as you should terminate your web container
gracefully
then the web container will save all the sessions to disk. Then if you
restart it again
all the sessions are loaded again. And yes the application works just as
it was never
restarted. But if we throw away all the page stores. Then we loose all the
data
of sessions that are currently active.

The only thing i can think of is having some check that only deletes things
that are not touched for X hours or days.

johan


Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Matej Knopp
 We could read the session timeout from web.xml and delete what is older.

But should we really do that? When session timeouts, the data is
deleted anyway. These dangling files seem to be a caused by
something else.

-Matej


 Not a high priority thing for me tbh, but I think it can be done.


 Eelco

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



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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Eelco Hillenius
On Nov 8, 2007 3:29 PM, Matej Knopp [EMAIL PROTECTED] wrote:
  We could read the session timeout from web.xml and delete what is older.

 But should we really do that? When session timeouts, the data is
 deleted anyway. These dangling files seem to be a caused by
 something else.

If the sessions are picked up again after a restart, I agree we
wouldn't need that.

Eelco

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



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Johan Compagner
except if you hard kill the servlet container or if the container crashes..

Then with a restart everything is completely new and all the old onces will
stick for ever..

johan



On Nov 9, 2007 12:32 AM, Eelco Hillenius [EMAIL PROTECTED] wrote:

 On Nov 8, 2007 3:29 PM, Matej Knopp [EMAIL PROTECTED] wrote:
   We could read the session timeout from web.xml and delete what is
 older.
 
  But should we really do that? When session timeouts, the data is
  deleted anyway. These dangling files seem to be a caused by
  something else.

 If the sessions are picked up again after a restart, I agree we
 wouldn't need that.

 Eelco

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




Re: Is it possible to get AjaxLink stateless?

2007-11-08 Thread Chris Lintz

Ok that makes sense.  To me i can chalk this up as one thing in the framework
that would be a real joy to fix - that being having AjaxLink or other
related Ajax components stateless.  I think its a real down fall that
sessions are created (and hence Page store cache files) for an Ajax link. 

On a really high traffic site that uses clustered session replication, there
are affects on the back end from generating all of these sessions just for a
link.  Part of my current tasks are trying to minimize session creation.





Johan Compagner wrote:
 
 no because the ajax behaviors are also not stateless.
 So even if you make the link stateless then the behaviors it has make them
 statefull again.
 
 Sometimes ajax things can be stateless but i still think it is a bit
 strange
 for 90% or more of the cases
 Why is the link an ajax link?. Because in my eyes if you use ajax you
 still
 use the old page
 and the ajax call just updates parts of the page. But if you do that. Then
 ajax can't be that easy
 stateless because how are you going to make exactly the same state as the
 client sees in the browser
 for the next click?
 
 And ajax clicks should be lean and mean in my eyes because they should be
 fast and could happen frequently
 and creating constantly a page for that is pretty heavy.
 
 johan
 
 
 
 On Nov 8, 2007 11:50 PM, Chris Lintz [EMAIL PROTECTED] wrote:
 

 Hi.  So i have tried setting the stateless hint and my AjaxLink is still
 statefull.  I read some where where even Ajax components can be
 stateless.
 What am I missing?

 AjaxLink addFriend = new AjaxLink(addFriend)
{
@Override
protected boolean getStatelessHint()
{
return true;
}

private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget request)
{
makeFriends(sessionUserName,
 profileUserName);
}
 }
 --
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13657606
 Sent from the Wicket - User mailing list archive at
 Nabble.comhttp://nabble.com/
 .


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13658887
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: facebook support

2007-11-08 Thread Kent Tong


Matt Jensen-2 wrote:
 
 I am working on this, though I'm trying to leave the door open to also 
 supporting MySpace in the future.  I have not done much yet--and nothing 
 Wicket-specific--but I do plan to include a Wicket module.
 

Have you considered Google's OpenSocial API?

-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
-- 
View this message in context: 
http://www.nabble.com/facebook-support-tf4773546.html#a13660095
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: facebook support

2007-11-08 Thread Matt Jensen


Wasn't aware of its existence.  If it is relatively feature rich and 
integrates well with Java...it's possible that it could save me a lot of 
work.  Always a good thing!


I'll check it out.

--Matt

Kent Tong wrote:

Matt Jensen-2 wrote:
  
I am working on this, though I'm trying to leave the door open to also 
supporting MySpace in the future.  I have not done much yet--and nothing 
Wicket-specific--but I do plan to include a Wicket module.





Have you considered Google's OpenSocial API?

-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
  




Re: Form: onSubmit not called

2007-11-08 Thread Brill Pappin

Done:
https://issues.apache.org/jira/browse/WICKET-1138

- Brill 


Eelco Hillenius wrote:
 
 Yeah. If you can open up a JIRA issue for it, we can think/ discuss
 what we could do here.
 

-- 
View this message in context: 
http://www.nabble.com/Form%3A-onSubmit-not-called-tf4763217.html#a13660734
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Can wicket handle events generated from javascript created?

2007-11-08 Thread dd du
Hi, all,
I am new to wicket, I have a question about calling javascript from wicket,
suppose I create a page from wicket, from this page I click a button, which
wicket will call a javascript function, this function will create a dialog
window with fancy GUI controls, from these controls, if I click one of them,
an event handler from that javascript file will be called, inside this
handler, I need to call back to a wicket java method to handle business
logic, now how can I do that? I know if wicket creates all the GUI controls,
wicket can handle the events easily, but I want javascript to create them
since it deals with fancy style sheets.

Is there a way wicket can handle events generated from javascript created
buttons? or a way calling back to wicket java code from javascript code?

Thanks

David


Page Expired issue

2007-11-08 Thread Joshua Jackson
Dear all,

What is the workaround so my request is not expired?
I got this exception when clicking the Link component not long after
the application is loaded:
--

Page Expired

The page you requested has expired.

Return to home page
---

This apps is deployed on IBM WAS 5.1 and I already set my appserver so
the session would not expired. It would be ridicuolus if my page is
expired not long before my apps is loaded.

Can anyone give me a direction regarding this?

Thanks in advance

-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

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



Re: Can wicket handle events generated from javascript created?

2007-11-08 Thread Igor Vaynberg
there is no magic here. look at how Link#getURL() works - it generates
a url that invokes onLinkClicked on that Link component. you can use
much the same mechanism and pass that url to your javascript.

-igor


On Nov 8, 2007 8:22 PM, dd du [EMAIL PROTECTED] wrote:
 Hi, all,
 I am new to wicket, I have a question about calling javascript from wicket,
 suppose I create a page from wicket, from this page I click a button, which
 wicket will call a javascript function, this function will create a dialog
 window with fancy GUI controls, from these controls, if I click one of them,
 an event handler from that javascript file will be called, inside this
 handler, I need to call back to a wicket java method to handle business
 logic, now how can I do that? I know if wicket creates all the GUI controls,
 wicket can handle the events easily, but I want javascript to create them
 since it deals with fancy style sheets.

 Is there a way wicket can handle events generated from javascript created
 buttons? or a way calling back to wicket java code from javascript code?

 Thanks

 David


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



Re: Page Expired issue

2007-11-08 Thread Igor Vaynberg
extend your webapp's session timeout?

-igor


On Nov 8, 2007 9:23 PM, Joshua Jackson [EMAIL PROTECTED] wrote:
 Dear all,

 What is the workaround so my request is not expired?
 I got this exception when clicking the Link component not long after
 the application is loaded:
 --

 Page Expired

 The page you requested has expired.

 Return to home page
 ---

 This apps is deployed on IBM WAS 5.1 and I already set my appserver so
 the session would not expired. It would be ridicuolus if my page is
 expired not long before my apps is loaded.

 Can anyone give me a direction regarding this?

 Thanks in advance

 --
 What you want today, may not exist tommorrow

 Blog: http://joshuajava.wordpress.com/

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



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



How Wicket Ajax?

2007-11-08 Thread Pen

We are using the Wicket as our MVC framework. I have read wicket has a very
good Ajax support . I am newbie. Does anybody know how to use it with jquery
and json with wicket.
Here is an example Jquery grid example and json, but the server side code is
in PHP, how to do it in wicket

http://trirand.com/jqgrid/jqgrid.html

Any sample example will be greatly appreciated.

~Pen
-- 
View this message in context: 
http://www.nabble.com/How-Wicket-Ajax--tf4776029.html#a13661957
Sent from the Wicket - User mailing list archive at Nabble.com.


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



  1   2   >