Re: [Wicket-user] alternatives to set locale without using session?

2007-05-04 Thread ywtsang

Sorry that I am new to Wicket and may not know what the greatest values of
wicket are supposed to be.

We are evaluating different web frameworks right now and Wicket is one of
them.

One good and attracting point of Wicket to us is that it can separate
html/design and logic at a good way.
The usage of Wicket is simple and efficient.

But when looking more details of Wicket, we find that session is created for
every request. 

This introduces another concern about the performance problem as our website
needs to serve a large volume of traffic.

As we find that it seems wicket 1.3 or 2.0+ are supporting no-session
pages, this fits our needs.

Since the handling of html/logic is attractive to us, we are trying to
seek possible solutions for session handling rather than just dumping out
wicket from our list just because of without session, can't get the most
benefit from wicket.

Or do you suggest we should look at wicket 1.3 or 2.0+ rather than wicket
1.2.6?

Regards,
Wing


igor.vaynberg wrote:
 
 tbh i see little value of using wicket in a completely stateless
 application. the big advantage of wicket is the programming model it
 offers,
 which you give up when using stateless only components.
 
 -igor
 
 
 On 5/3/07, ywtsang [EMAIL PROTECTED] wrote:


 One of the requirements of my project is not to use session, that's why
 my
 question is so :)

 Our website will have different language. Customers can choose for
 different
 languages by clicking links like:

 e.g.
 /en/... (show english content)
 /jp/... (show japanese content)
 /kr/... (show korean content)
 /zh/ (show chinese content)

 Therefore I can deduce the language from the request link, it would be
 nice if we can configure locale without the need of session creation.

 Regards,
 Wing


 Scott Swank wrote:
 
  Can I ask why you don't want to store the locale in the session?  It
  seems that the locale is unarguably session-specific.
 
  Cheers,
  Scott
 
  On 5/3/07, ywtsang [EMAIL PROTECTED] wrote:
 
  Dear all,
 
  I have read the wicket examples, wiki, mail lists, etc and it seems
 that
  if
  I need to expliclity change the locale, i need to write codes like:
 
  getSession().setLocale(my locale);
 
 
 
  Now, I can determine the explicity language/locale need to use from
 the
  incoming URL.
 
  I want to use wicket built in i18n support. My problem is, I
 cannot/will
  not
  use session for nearl all the pages.
 
  So, any means to set the locale without using session? Any
 help/guideline
  will be welcomed. Thanks.
 
 
  Regards,
  Wing
  --
  View this message in context:
 
 http://www.nabble.com/alternatives-to-set-locale-without-using-%22session%22--tf3690056.html#a10316471
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  --
  Scott Swank
  reformed mathematician
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/alternatives-to-set-locale-without-using-%22session%22--tf3690056.html#a10317292
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 

Re: [Wicket-user] alternatives to set locale without using session?

2007-05-04 Thread Igor Vaynberg

1.3 is what i would look at, the current trunk in our svn. we just had a
1.3.0-beta release in apache incubator. 1.2.x doesnt have stateless support.

there are numerous threads on this list that try to disprove the session is
evil myth. so i would search the list for those first, before i made the
decision that my app needs to be stateless. wicket-1.3 also has a
second-level-session store which stores old pages to disk, further reducing
the session size. just my 2c.

-igor


On 5/3/07, ywtsang [EMAIL PROTECTED] wrote:



Sorry that I am new to Wicket and may not know what the greatest values of
wicket are supposed to be.

We are evaluating different web frameworks right now and Wicket is one of
them.

One good and attracting point of Wicket to us is that it can separate
html/design and logic at a good way.
The usage of Wicket is simple and efficient.

But when looking more details of Wicket, we find that session is created
for
every request.

This introduces another concern about the performance problem as our
website
needs to serve a large volume of traffic.

As we find that it seems wicket 1.3 or 2.0+ are supporting no-session
pages, this fits our needs.

Since the handling of html/logic is attractive to us, we are trying to
seek possible solutions for session handling rather than just dumping
out
wicket from our list just because of without session, can't get the most
benefit from wicket.

Or do you suggest we should look at wicket 1.3 or 2.0+ rather than wicket
1.2.6?

Regards,
Wing


igor.vaynberg wrote:

 tbh i see little value of using wicket in a completely stateless
 application. the big advantage of wicket is the programming model it
 offers,
 which you give up when using stateless only components.

 -igor


 On 5/3/07, ywtsang [EMAIL PROTECTED] wrote:


 One of the requirements of my project is not to use session, that's why
 my
 question is so :)

 Our website will have different language. Customers can choose for
 different
 languages by clicking links like:

 e.g.
 /en/... (show english content)
 /jp/... (show japanese content)
 /kr/... (show korean content)
 /zh/ (show chinese content)

 Therefore I can deduce the language from the request link, it would
be
 nice if we can configure locale without the need of session creation.

 Regards,
 Wing


 Scott Swank wrote:
 
  Can I ask why you don't want to store the locale in the session?  It
  seems that the locale is unarguably session-specific.
 
  Cheers,
  Scott
 
  On 5/3/07, ywtsang [EMAIL PROTECTED] wrote:
 
  Dear all,
 
  I have read the wicket examples, wiki, mail lists, etc and it seems
 that
  if
  I need to expliclity change the locale, i need to write codes like:
 
  getSession().setLocale(my locale);
 
 
 
  Now, I can determine the explicity language/locale need to use from
 the
  incoming URL.
 
  I want to use wicket built in i18n support. My problem is, I
 cannot/will
  not
  use session for nearl all the pages.
 
  So, any means to set the locale without using session? Any
 help/guideline
  will be welcomed. Thanks.
 
 
  Regards,
  Wing
  --
  View this message in context:
 

http://www.nabble.com/alternatives-to-set-locale-without-using-%22session%22--tf3690056.html#a10316471
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  --
  Scott Swank
  reformed mathematician
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:

http://www.nabble.com/alternatives-to-set-locale-without-using-%22session%22--tf3690056.html#a10317292
 Sent from the Wicket - User mailing list archive at Nabble.com.



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




Re: [Wicket-user] alternatives to set locale without using session?

2007-05-04 Thread Johan Compagner

in 1.3 you still can use getSession() and set the locale
But then you need to set it everytime because the session is created
everytime
if the pages are all stateless. So then you still can work with the normal
Wicket session object
Creating a wicket session object doesn't mean you create a http session
object. That only happens
if there are pages that need to go into the session.

johan


On 5/4/07, Scott Swank [EMAIL PROTECTED] wrote:


Can I ask why you don't want to store the locale in the session?  It
seems that the locale is unarguably session-specific.

Cheers,
Scott

On 5/3/07, ywtsang [EMAIL PROTECTED] wrote:

 Dear all,

 I have read the wicket examples, wiki, mail lists, etc and it seems that
if
 I need to expliclity change the locale, i need to write codes like:

 getSession().setLocale(my locale);



 Now, I can determine the explicity language/locale need to use from the
 incoming URL.

 I want to use wicket built in i18n support. My problem is, I cannot/will
not
 use session for nearl all the pages.

 So, any means to set the locale without using session? Any
help/guideline
 will be welcomed. Thanks.


 Regards,
 Wing
 --
 View this message in context:
http://www.nabble.com/alternatives-to-set-locale-without-using-%22session%22--tf3690056.html#a10316471
 Sent from the Wicket - User mailing list archive at Nabble.com.



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Scott Swank
reformed mathematician

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Good Tutorial on core wicket

2007-05-04 Thread Timo Rantalaiho
Also remember to have the wicket source code attached to
your IDE (easy with e.g. mvn -Declipse.downloadSources=true
eclipse:eclipse or idea:idea), and to have wicket-examples
project open in another IDE window. With this + working on a
real live project and with a little help from my friends and
these mailing lists, I've been getting on pretty well.
Anyway learning to use any framework is more about solving
real problems by coding on it than reading stuff.

I also subscribe to the user, dev and commits mailing lists
and try to read the messages at least cursorily. The most
problematic things (such as working with models :)) come up
a lot and often with realistic examples.

-- 
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Good Tutorial on core wicket

2007-05-04 Thread Gwyn Evans
It's quite tricky as to know how to best do this, although there's
certainly scope for people to keep track of threads on the mailing
list and create articles or update for the Wiki from them.

Anyone should be able to edit most pages on the wiki, though a signup
is required.

/Gwyn

On Thursday, May 3, 2007, 11:29:05 PM, Francisco [EMAIL PROTECTED] wrote:

 Can we vote on this issue? can I call this an issue?

 Igor gracefully pointed me to the Model article in the wiki, but
 this article is mostly Object Structure, and How to Apply it...
 but lacks a little on how is model updated and passed throughout the
 framework. It surely taught me though.  

 Is it possible to ask understood community members to divide papers
 or small overview articles on different aspects like the ones listed below?

 And therefore we might have some good data to compile into a nice
 PDF regarding Wicket's inner workings and architecture. 

 With a good paper like that one, the goal would be to auto-answer questions 
 like this one:

 Is it possible to use setMarkupStream to assign html to a web
 page?  (posted a minute ago by Thomas R. Corbin)

 This is a question regarding inner workings, because the Answer is
 some IMarkupResourceStreamProvider, and where is this information a part from 
 articles on How-To's.

 Wicket is Awsome, this should be written on some paper showing
 architecture and core components behavior.

 regards to all,

 -f(t)

 On 5/3/07, Matthew Kwong [EMAIL PROTECTED]  wrote:

I'm not new to Wicket, I'm using it for about a year, but there still a lot
 aspects obscure to me like PageMap, page versioning, details of page request
 cycle and so on.

 me too, I also think some more core concept needs more documentation, pro
 wicket is nice and can get you going with tables, ajax, pages, tabbedpanel
 etc, but 300pages does not reach to the point of explaining tons of stuffs,
 especially with new 1.3 features.

 I was waiting Wicket in action, any news still after the constructor changes
 drop?

 Matthew


 Paolo Di Tommaso wrote:

 Anyway Francisco is right, I'm also thinking that Wicket is really missing
 a
 good tutorial about core concepts.

 I'm not new to Wicket, I'm using it for about a year, but there still a 
 lot
 aspects obscure to me like PageMap, page versioning, details of page
 request
 cycle and so on.

 Wicket is really a good framework that covers every details of the web
 application stack (and they are many and many not just web page rendering
 ..), but I'm thinking that a good tutorial about Wicket core concepts
 would
 be very useful to novice users as well as experts. 


 Thank you.

 - Paolo


 On 5/3/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:

 as far as models go 


 http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models
  

 -igor 


 On 5/3/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] 
 wrote:
 
  I will be glad to help out in any way. 
 
  Here are my thoughts to the community.
 
  If we could talk about core wiket ideas and implementations, for
  instance:
 
  Models (Concept, interfaces, implementations) 
  Session
  Application
  Pages
 
  Listeners
  Versioning
  Request and Response Cycles
 
  Page Life Cycle. 
 
 
  The thing is, it is not the same (AT ALL) to build a wicket application
  than it is to build a struts application (Other than struts sucks :P)
 which 
  are the concepts and design guidelines we should have?
 
  That is what I am trying to address.
 
  Because of my current infinite ignorance, I might not be the right 
  person to build this type of document.
 
  Although I could write some docs after I get an Idea from the Book
  Pro-Wicket or Wicket-Pro (don't remember just know) and migrate to 1.3,
  and do some other demos. I think I could start writing in about a month
 or
  so.
 
  Other than that any thing else I could do would be nice to help out. 
 
  Regards,
  f(t)
 
 
  On 5/3/07, Igor Vaynberg  [EMAIL PROTECTED] wrote: 
  
   i dont think we have something that is focused on the core
   architecture. if you have specific questions we will be happy to
 answer them
   and maybe you can compile them into a document. 
  
   it is hard to find time to work specifically on high level
   documentation because this list, coding, jira, javadoc, etc take up a
 lot of
   time. by the time someone gets to a point where they have enough 
 knowledge
   to write such docs they are usually buried in fixing bugs  
  
   -igor
  
  
   On 5/3/07, Francisco Diaz Trepat - gmail 
 [EMAIL PROTECTED]
   wrote:

H igor, thanks, but could you be more specific. I do think I 
 browsed
the wiki but couldn't find what I was looking for.
   
For instance:
   
http://cwiki.apache.org/WICKET/documentation-index.html

appears to list many referential How to's but not core framework 
architecture. I know there is a little bit in many of the reference
 samples.
   
But is there a paper on module architecture and core 

Re: [Wicket-user] alternatives to set locale without using session?

2007-05-04 Thread Eelco Hillenius
 in 1.3 you still can use getSession() and set the locale
 But then you need to set it everytime because the session is created
 everytime
 if the pages are all stateless. So then you still can work with the normal
 Wicket session object
 Creating a wicket session object doesn't mean you create a http session
 object. That only happens
 if there are pages that need to go into the session.

Yes. When a client is not bound to a *HttpSession*, Wicket creates a
temporary *Wicket Session* object for every request. This is not kept
in memory, so when the request is done, the objects are free to be
garbage collected.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] TinyMCE for wicket 1.3 not a panel???

2007-05-04 Thread Iulian Costan

yes, quite outdated, it references the old package structure, i'll take care
of it.

/syca

On 5/3/07, Apaar Trivedi [EMAIL PROTECTED] wrote:


 Hey all, I am trying to get a TinyMCEPanel jar for Wicket 1.3.  I've
gotten the tinymce contrib. from the wicketstuff trunk, and attempted to
compile and package it using the maven script.  It compiles just fine but
when I go to build the packages, I get this error in a few place:



c:\Eclipse_WS\wicketstuff\wicket-stuff_trunk\wicket-contrib-tinymce\src\test\wicket\contrib\tinymce\TinyMCEPanelTest.java:[63,39]
incompatible types

found   : wicket.contrib.tinymce.TinyMCEPanel

required: org.apache.wicket.markup.html.panel.Panel



and basically this is occurring everywhere the TinyMCEPanel object is
being returned.  This mcepanel is definitely a sub class of a wicket panel,
and I am confident the maven script is using wicket 1.3 incubator
snapshot.  When I remove the test classes I can build the package just
fine.  But when I attempt to use this mce jar in my wicket application, I
cannot add this TinyMCEPanel object to the markup container because it
thinks it is not a component.  Basically the same problem the test is
having.



Does anyone know what is going on with this, or is there a pre-built jar
against wicket 1.3 out there which works?



Any help is appreciated.  Thanks.



-Par



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Updating textfield model in ajax onchange

2007-05-04 Thread Tauren Mills
I have a text field called 'dateField' on a form that has an
associated DatePicker control.  When someone selects a date in the
picker, I want to do an ajax call to refresh another component on the
page.  I need the dateField model to be updated in the ajax call.

I originally assumed the model would be updated automatically to the
new value, but it doesn't seem to be.  Now I'm thinking that is
because the form hasn't actually been submitted yet, which makes
sense.

So, how do I get the current value of the dateField inside an
onEvent() handler?  What is the best way to update the dateField's
model with the current value?  I've tried the following, but the model
value remains the same:

dateField.add(new AjaxEventBehavior(onchange) {
  protected void onEvent(AjaxRequestTarget target) {
// Refresh the ListView
 Logger log = Logger.getLogger(getClass());
 log.debug(Date Changed -- refreshing report);
 setSelectedDate((Date)(getComponent().getModelObject()));
 ListReportRow availList = createReportList();
 AvailabilityReportPanel arp = new
AvailabilityReportPanel(availReport, availList);
 ReportForm.this.availReport.replaceWith(arp);
 ReportForm.this.availReport = arp;
 target.addComponent(ReportForm.this.availReport);
   }
});

Note that setSelectedDate() is the setter for the dateField's model.
Also, createReportList() uses getSelectedDate() in an HQL query to
build the List.

What is the proper way to deal with this? Is there a way to indicate
that the form should submit during ajax calls?

Thanks!
Tauren

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] query regarding AjaxSubmitLink

2007-05-04 Thread Anupama pullela

Hi,
In my wicket page I have a AjaxSubmitLink(which is a a link in html
template) beside the textfield in a form.
And when I press enter after entering data in textfield, the form is getting
submitted but the onSubmit() function of AjaxSubmitLink is not getting
callled.
when I debug  in to the source code of Form.java , the onFormSubmitted()
function is called and which inturn calls findSubmittingButton() which is
returning null.
Can you kindly provide me a solution for this.
Thanks  Regards
Anupama
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Updating textfield model in ajax onchange

2007-05-04 Thread Igor Vaynberg

see ajaxformcomponentupdatingbehavior, that will update the model for you

-igor


On 5/4/07, Tauren Mills [EMAIL PROTECTED] wrote:


I have a text field called 'dateField' on a form that has an
associated DatePicker control.  When someone selects a date in the
picker, I want to do an ajax call to refresh another component on the
page.  I need the dateField model to be updated in the ajax call.

I originally assumed the model would be updated automatically to the
new value, but it doesn't seem to be.  Now I'm thinking that is
because the form hasn't actually been submitted yet, which makes
sense.

So, how do I get the current value of the dateField inside an
onEvent() handler?  What is the best way to update the dateField's
model with the current value?  I've tried the following, but the model
value remains the same:

dateField.add(new AjaxEventBehavior(onchange) {
  protected void onEvent(AjaxRequestTarget target) {
// Refresh the ListView
 Logger log = Logger.getLogger(getClass());
 log.debug(Date Changed -- refreshing report);
 setSelectedDate((Date)(getComponent().getModelObject()));
 ListReportRow availList = createReportList();
 AvailabilityReportPanel arp = new
AvailabilityReportPanel(availReport, availList);
 ReportForm.this.availReport.replaceWith(arp);
 ReportForm.this.availReport = arp;
 target.addComponent(ReportForm.this.availReport);
   }
});

Note that setSelectedDate() is the setter for the dateField's model.
Also, createReportList() uses getSelectedDate() in an HQL query to
build the List.

What is the proper way to deal with this? Is there a way to indicate
that the form should submit during ajax calls?

Thanks!
Tauren

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] query regarding AjaxSubmitLink

2007-05-04 Thread Igor Vaynberg

this is a general html form thing. when you have a single textfield and you
press enter, the form is submitted. sometimes it happens even when you have
more then one textfield. to fix it you need to capture the enter keypress on
the field and return false so the event is discarded.

-igor


On 5/4/07, Anupama pullela [EMAIL PROTECTED] wrote:


Hi,
In my wicket page I have a AjaxSubmitLink(which is a a link in html
template) beside the textfield in a form.
And when I press enter after entering data in textfield, the form is
getting submitted but the onSubmit() function of AjaxSubmitLink is not
getting callled.
when I debug  in to the source code of Form.java , the onFormSubmitted()
function is called and which inturn calls findSubmittingButton() which is
returning null.
Can you kindly provide me a solution for this.
Thanks  Regards
Anupama

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DatePicker for a label

2007-05-04 Thread Dragos Bobes
Thanks Igor, I had already tried that route but I ran into problems 
finding a way to capture the select event.
But after you confirmed that this is the route to go, I discovered 
'appendToInit' in DatePicker that allowed me to insert my custom 
javascript.

Cheers,
Dragos

Igor Vaynberg wrote:
 you will have to create a panel that contains a hiddeninputfield to 
 capture the input, the label, and the datepicker. then create 
 javascript that wires all these together.

 -igor


 On 5/3/07, *Dragos Bobes* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Is there a way to use the DatePicker with a label component?
 I would like to be able to select a date from the DatePicker and
 change
 the value of the label and also to be able to capture the new value to
 persist it.
 Does anybody have any ideea on how can I do id?

 Thanks,
 Dragos

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MouseOver Effect on DataTable

2007-05-04 Thread JulianS

Note to future generations (that is, those who only care about FireFox and
IE7+): just add tr:hover to your CSS, for example: 

tr.even {
background-color: #d6ddee;
}
tr.even:hover {
background-color: #8fa4d1;
}

tr.odd {
}

tr.odd:hover {
background-color: #8fa4d1;
}

But beware that for IE7 you need to specify a strict doctype. See 
http://www.bernzilla.com/item.php?id=762
http://www.bernzilla.com/item.php?id=762 

-- 
View this message in context: 
http://www.nabble.com/MouseOver-Effect-on-DataTable-tf2226740.html#a10324964
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to remove a Behaviour?

2007-05-04 Thread Ivo van Dongen

Great, thanks!

Ivo

On 5/4/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


See https://issues.apache.org/jira/browse/WICKET-529

Fine by me too.

Eelco

On 5/3/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 fine by me

 -igor



 On 5/3/07, Johan Compagner [EMAIL PROTECTED] wrote:
  i think we should be thinking of a remove(IBehavior)
  It is pretty in line with the rest (think about Swing listeners)
  And it doesn't sit in the way as far as i can think of.
 
  johan
 
 
 
  On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
   you cannot remove a behavior currently. what you can do is call
stop()
 on the timerbehavior.
  
   -igor
  
  
  
  
   On 5/2/07, Ivo van Dongen  [EMAIL PROTECTED] wrote:
   
Hi,
   
We have a component with an AjaxSelfUpdatingTimerBehavior attached
to
 it. When a certain condition is reached we want to remove the behaviour
from
 its parent before updating it again, to prefent it from going on
forever. We
 couldn't find a way for this. Component has a remove() method, but
 IBehaviour does not. What is the preferred way to do this?
   
Thanks in advance,
Ivo van Dongen
   
--
Ivo van Dongen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500
   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
  

-
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 

-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
Ivo van Dongen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to remove a Behaviour?

2007-05-04 Thread Igor Vaynberg

notice there is also a new ibehavior.istemporary. read the javadoc, it might
be what you want.

-igor


On 5/4/07, Ivo van Dongen [EMAIL PROTECTED] wrote:


Great, thanks!

Ivo

On 5/4/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 See https://issues.apache.org/jira/browse/WICKET-529

 Fine by me too.

 Eelco

 On 5/3/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
  fine by me
 
  -igor
 
 
 
  On 5/3/07, Johan Compagner [EMAIL PROTECTED] wrote:
   i think we should be thinking of a remove(IBehavior)
   It is pretty in line with the rest (think about Swing listeners)
   And it doesn't sit in the way as far as i can think of.
  
   johan
  
  
  
   On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
you cannot remove a behavior currently. what you can do is call
 stop()
  on the timerbehavior.
   
-igor
   
   
   
   
On 5/2/07, Ivo van Dongen  [EMAIL PROTECTED] wrote:

 Hi,

 We have a component with an AjaxSelfUpdatingTimerBehavior
 attached to
  it. When a certain condition is reached we want to remove the
 behaviour from
  its parent before updating it again, to prefent it from going on
 forever. We
  couldn't find a way for this. Component has a remove() method, but
  IBehaviour does not. What is the preferred way to do this?

 Thanks in advance,
 Ivo van Dongen

 --
 Ivo van Dongen
 Func. Internet Integration
 W http://www.func.nl
 T +31 20 423
 F +31 20 4223500

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
 take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

  https://lists.sourceforge.net/lists/listinfo/wicket-user


   
   
   
 
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
  https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Ivo van Dongen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How may I access a Panel A from another Panel B (Ajax)?

2007-05-04 Thread Francisco Diaz Trepat - gmail

Hello, I have two panels, one that is mostly a form for login (user/pass
+button) and the other panel is just a link (onClick==logou).

Now I changed the button for the login form to an ajax button. Everythig
works fine.

The thing is that I had a code something like this in the logout panel.



@Override
public boolean isVisible(){
   return getMyWicketSession().isUserLoggedIn();
}

this code made every round trip evaluate whether the user was still logged
in and if so then render the appropriate option to logout.

how could I add to the target, the logout panel, do I need to pass it
through the constructor :


private final logoutPanel;
public LoginPanel(String id, LogoutPanel panel){
  logoutPanel = panel;

}

AjaxonSubmit(target...{
   target.add(logoutPanel)
}
??

Or could I just set in the constructor of the LogoutPanel
setOutputMarkupId(true) and then call on it from the onSubmit AJAX button?

I am a bit lost on this. Or could I just add a simple JavaScript 
document.getElementById('logoutPanel').style.visibility = visible;

f(t)
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How may I access a Panel A from another Panel B (Ajax)?

2007-05-04 Thread Igor Vaynberg

or just keep a field

class mypage extends webpage {
private panel a;
private panel b;

public mypage() {
 a=new MyLoginPanel(...) {
   protected void onLogout(AjaxRequestTarget target) {
target.add(b);
target.add(a);
}
 }
 b=new MyLogoutPanel(...);

}

-igor


On 5/4/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
wrote:


Hello, I have two panels, one that is mostly a form for login (user/pass
+button) and the other panel is just a link (onClick==logou).

Now I changed the button for the login form to an ajax button. Everythig
works fine.

The thing is that I had a code something like this in the logout panel.



@Override
public boolean isVisible(){
return getMyWicketSession().isUserLoggedIn();
}

this code made every round trip evaluate whether the user was still logged
in and if so then render the appropriate option to logout.

how could I add to the target, the logout panel, do I need to pass it
through the constructor :


private final logoutPanel;
public LoginPanel(String id, LogoutPanel panel){
   logoutPanel = panel;

}

AjaxonSubmit(target...{
target.add(logoutPanel)
}
??

Or could I just set in the constructor of the LogoutPanel
setOutputMarkupId(true) and then call on it from the onSubmit AJAX button?

I am a bit lost on this. Or could I just add a simple JavaScript 
document.getElementById('logoutPanel').style.visibility = visible;

f(t)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How may I access a Panel A from another Panel B (Ajax)?

2007-05-04 Thread Francisco Diaz Trepat - gmail

That looks about right, I'll tested right away.

On 5/4/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


or just keep a field

class mypage extends webpage {
private panel a;
private panel b;

public mypage() {
  a=new MyLoginPanel(...) {
protected void onLogout(AjaxRequestTarget target) {
 target.add(b);
 target.add(a);
 }
  }
  b=new MyLogoutPanel(...);

}

-igor


On 5/4/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
wrote:

 Hello, I have two panels, one that is mostly a form for login (user/pass
 +button) and the other panel is just a link (onClick==logou).

 Now I changed the button for the login form to an ajax button. Everythig
 works fine.

 The thing is that I had a code something like this in the logout panel.



 @Override
 public boolean isVisible(){
 return getMyWicketSession().isUserLoggedIn();
 }

 this code made every round trip evaluate whether the user was still
 logged in and if so then render the appropriate option to logout.

 how could I add to the target, the logout panel, do I need to pass it
 through the constructor :


 private final logoutPanel;
 public LoginPanel(String id, LogoutPanel panel){
logoutPanel = panel;

 }

 AjaxonSubmit(target...{
 target.add(logoutPanel)
 }
 ??

 Or could I just set in the constructor of the LogoutPanel
 setOutputMarkupId(true) and then call on it from the onSubmit AJAX button?

 I am a bit lost on this. Or could I just add a simple JavaScript 
 document.getElementById('logoutPanel').style.visibility = visible;

 f(t)


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Using AJAX wicketSubmitFormById like a method call

2007-05-04 Thread James Renfro
Igor,
I had a feeling that was the situation. I'll take a closer look at my 
code with that in mind and if I can come up with a clear follow up 
question, I'll post some relevant excerpts.

Thanks very much for your help,
James.

Igor Vaynberg wrote:
 the short answer is: you cant do that. javascript is asynchronous, so 
 the request will start _and_ your function will continue running. 
 usually what is done is that you create a request object, and then 
 register success and failure handlers that are executed after the 
 request is done.

 you can do that using iajaxcalldecorator, or what you tried...calling 
 ajaxtarget.appendjavascript() should work as well.

 if you show us some more code/try to describe your actual usecase we 
 can probably help you more, right now its all very abstract.

 -igor


 On 5/3/07, *James Renfro* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi,
 I'd like to do something slightly unusual and wrap the
 wicketSubmitFormById call in another javascript function -- I'm
 able to
 do this with no problem by overriding
 AjaxFormSubmitBehavor.onRenderHeadInitContribution and calling
 JavascriptUtils.writeJavascript on a wrapped getEventHandler. I
 can stop
 the normal attribute for 'onclick' or whatever from appearing
 inside the
 component tag by overriding onComponentTag. And by using text input
 boxes, I can pass 'arguments' to my method on the server inside using
 FormComponent.getConvertedInput. So far so good.

 The problem I have is that I'd like to actually 'return' a value back
 from the server in that Javascript function... so my function ends up
 looking just like a normal function call inside of my Javascript and
 returns the value that the server provides.

 I can see inside of wicket-ajax.js that there are three special tags:
 component, evaluate and header-contribution, each with their
 appropriate purpose -- I tried messing around with
 AjaxRequestTarget.prependJavascript so I could pass something through
 the 'evaluate' tag, but my javascript isn't sufficient to the
 task. Then
 I tried using AjaxRequestTarget.addComponent to modify another
 TextField
 and return the value through the DOM tree -- that works fine
 except for
 the fact that the order is wrong, so my method returns _before_ the
 component is updated.

 Then I noticed this interesting Wicket.Ajax.invokePostCallHandlers()
 call, which makes me wonder if there is already some nice clean
 mechanism in place for updating javascript variables thru wicket's
 java
 code.

 Apologies if this all makes no sense, but any advice or suggestions
 would be much appreciated. The basic requirement is just that I
 make a
 call in Javascript and get data back from the server as a 'returned'
 variable on the client.

 Thanks,
 James

 --
 James Renfro
 Programmer
 IET Mediaworks, UC Davis
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 W: 530-754-5097


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   

-- 
James Renfro
Programmer
IET Mediaworks, UC Davis
[EMAIL PROTECTED]
W: 530-754-5097


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How may I access a Panel A from another Panel B (Ajax)?

2007-05-04 Thread James McLaughlin

Passing it in the constructor works, but you would have to call
setOutputMarkupPlaceHolderTag(true) on the logout panel otherwise it won't
be in the dom before the user logs in, and therefore can't be updated. This
is also why toggling the css attribute with script client side won't work
with isVisible false on the wicket side. If you do it by toggling an inline
stylesheet, then leave isVisble true on the wicket side. This doesn't really
mesh with the wicket way, however.

Since these two components operate together I would enclose them in a panel
together, something like

class SessionPanel extends Panel {

public SessionPanel(String id) {
 add(new LogoutPanel(logout));
 LoginPanel lp = new LoginPanel(lp);
 add(lp);
 lp.add(new AjaxSubmitButton(sb) {
 onSubmit(target) {
 target.addComponent(SessionPanel.this);
}
 });
}

}


best,

jim


That way you don't need to worry about what is in the client dom. But there
are a million other ways to do it :)
On 5/4/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
wrote:


Hello, I have two panels, one that is mostly a form for login (user/pass
+button) and the other panel is just a link (onClick==logou).

Now I changed the button for the login form to an ajax button. Everythig
works fine.

The thing is that I had a code something like this in the logout panel.



@Override
public boolean isVisible(){
return getMyWicketSession().isUserLoggedIn();
}

this code made every round trip evaluate whether the user was still logged
in and if so then render the appropriate option to logout.

how could I add to the target, the logout panel, do I need to pass it
through the constructor :


private final logoutPanel;
public LoginPanel(String id, LogoutPanel panel){
   logoutPanel = panel;

}

AjaxonSubmit(target...{
target.add(logoutPanel)
}
??

Or could I just set in the constructor of the LogoutPanel
setOutputMarkupId(true) and then call on it from the onSubmit AJAX button?

I am a bit lost on this. Or could I just add a simple JavaScript 
document.getElementById('logoutPanel').style.visibility = visible;

f(t)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How may I access a Panel A from another Panel B (Ajax)?

2007-05-04 Thread Gerolf Seitz

since you probably don't want to show the login form after a successful
login,
you could replace the login panel with the logout panel (and vice versa)
this could look something like the following:

// constructor of class LoginPanel
public LoginPanel(final String id) {
   super(id);
   this.setOutputMarkupId(true);
   Form form = new Form(form);
   form.add(new AjaxSubmitButton(login, form) {
   protected void onSubmit(AjaxRequestTarget target, Form form) {
   Panel panel = new LogoutPanel(id);
   panel.setOutputMarkupId(true);
   LoginPanel.this.replaceWith(panel);
   target.addComponent(panel);
   }
   }.setOutputMarkupId(true));
   add(form);
   }

any comment on this approach?


On 5/4/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
wrote:


Hello, I have two panels, one that is mostly a form for login (user/pass
+button) and the other panel is just a link (onClick==logou).

Now I changed the button for the login form to an ajax button. Everythig
works fine.

The thing is that I had a code something like this in the logout panel.



@Override
public boolean isVisible(){
return getMyWicketSession().isUserLoggedIn();
}

this code made every round trip evaluate whether the user was still logged
in and if so then render the appropriate option to logout.

how could I add to the target, the logout panel, do I need to pass it
through the constructor :


private final logoutPanel;
public LoginPanel(String id, LogoutPanel panel){
   logoutPanel = panel;

}

AjaxonSubmit(target...{
target.add(logoutPanel)
}
??

Or could I just set in the constructor of the LogoutPanel
setOutputMarkupId(true) and then call on it from the onSubmit AJAX button?

I am a bit lost on this. Or could I just add a simple JavaScript 
document.getElementById('logoutPanel').style.visibility = visible;

f(t)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Using AJAX wicketSubmitFormById like a method call

2007-05-04 Thread James Renfro
So although clearly AJAX is supposed to be mostly asynchronous. it looks 
like the underlying XMLHttpRequest object _can_ be synchronous.

If I modify wicket-ajax.js and set 'Wicket.Ajax.Request.async' to 
*false* -- suddenly my code works... i.e. I can code an 
AjaxFormSubmitBehavor.onSubmit so it takes a value from one 
FormComponent (the argument to the function), modifies it (in this case 
toUppercase), and sends it back to another FormComponent, whose node I 
can grab from the DOM tree and return inside my function.

So I guess my question is -- am I going to break something fundamental 
by doing this? It seem to work fine in my test case.

Javascript_function

script type=text/javascript id=onTestMethod1!--/*--![CDATA[/*!--*/
TestMethod1 = function () { 
var wcall=wicketSubmitFormById('form', 
'/portal/tool/52480496-d4f6-4278-0002-e65fdefcc0ef/?wicket:interface=wicket-247:0:form:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true',
 null, function() { }, function() { }); 
return document.getElementById('form_result').value;;};
/*--]]*//script

/Javascript_function

AjaxFormSubmitBehavior.onSubmit
@Override
protected void onSubmit(AjaxRequestTarget target) {
FormComponent c = (FormComponent)form.get(argument);
String testValue = (String)c.getConvertedInput();

FormComponent r = (FormComponent)form.get(result);
bean.setResult(testValue.toUpperCase());
target.addComponent(r);
}
/AjaxFormSubmitBehavior.onSubmit

wicket-ajax.js
Wicket.Ajax.Request.prototype = {
initialize: function(url, loadedCallback, parseResponse, randomURL, 
failureHandler, channel) {
this.url = url;
this.loadedCallback = loadedCallback;
this.parseResponse = parseResponse != null ? parseResponse : true;
this.randomURL = randomURL != null ? randomURL : true;
this.failureHandler = failureHandler != null ? failureHandler : 
function() { };
this.async = *true;*
this.channel = channel;
this.suppressDone = false;
this.instance = Math.random();
this.debugContent = true;
},
/wicket-ajax.js

Thanks,
James


Igor Vaynberg wrote:
 the short answer is: you cant do that. javascript is asynchronous, so 
 the request will start _and_ your function will continue running. 
 usually what is done is that you create a request object, and then 
 register success and failure handlers that are executed after the 
 request is done.

 you can do that using iajaxcalldecorator, or what you tried...calling 
 ajaxtarget.appendjavascript() should work as well.

 if you show us some more code/try to describe your actual usecase we 
 can probably help you more, right now its all very abstract.

 -igor


 On 5/3/07, *James Renfro* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi,
 I'd like to do something slightly unusual and wrap the
 wicketSubmitFormById call in another javascript function -- I'm
 able to
 do this with no problem by overriding
 AjaxFormSubmitBehavor.onRenderHeadInitContribution and calling
 JavascriptUtils.writeJavascript on a wrapped getEventHandler. I
 can stop
 the normal attribute for 'onclick' or whatever from appearing
 inside the
 component tag by overriding onComponentTag. And by using text input
 boxes, I can pass 'arguments' to my method on the server inside using
 FormComponent.getConvertedInput. So far so good.

 The problem I have is that I'd like to actually 'return' a value back
 from the server in that Javascript function... so my function ends up
 looking just like a normal function call inside of my Javascript and
 returns the value that the server provides.

 I can see inside of wicket-ajax.js that there are three special tags:
 component, evaluate and header-contribution, each with their
 appropriate purpose -- I tried messing around with
 AjaxRequestTarget.prependJavascript so I could pass something through
 the 'evaluate' tag, but my javascript isn't sufficient to the
 task. Then
 I tried using AjaxRequestTarget.addComponent to modify another
 TextField
 and return the value through the DOM tree -- that works fine
 except for
 the fact that the order is wrong, so my method returns _before_ the
 component is updated.

 Then I noticed this interesting Wicket.Ajax.invokePostCallHandlers()
 call, which makes me wonder if there is already some nice clean
 mechanism in place for updating javascript variables thru wicket's
 java
 code.

 Apologies if this all makes no sense, but any advice or suggestions
 would be much appreciated. The basic requirement is just that I
 make a
 call in Javascript and get data back from the server as a 'returned'
 variable on the client.

 Thanks,
 James

 --
 James Renfro
 

Re: [Wicket-user] Using AJAX wicketSubmitFormById like a method call

2007-05-04 Thread Igor Vaynberg

if you change wicket-ajax.js in the way you showed below then all ajax
requests will become synchronous. while you wont break anything foundamental
you will make parallel ajax requests impossible. not a good thing imho. i
guess we need to add a parameter so that you can set the request to
synchronous just for that one call.

or do what i suggested and add a success handler that will execute the rest
of the function.

-igor


On 5/4/07, James Renfro [EMAIL PROTECTED] wrote:


So although clearly AJAX is supposed to be mostly asynchronous. it looks
like the underlying XMLHttpRequest object _can_ be synchronous.

If I modify wicket-ajax.js and set 'Wicket.Ajax.Request.async' to
*false* -- suddenly my code works... i.e. I can code an
AjaxFormSubmitBehavor.onSubmit so it takes a value from one
FormComponent (the argument to the function), modifies it (in this case
toUppercase), and sends it back to another FormComponent, whose node I
can grab from the DOM tree and return inside my function.

So I guess my question is -- am I going to break something fundamental
by doing this? It seem to work fine in my test case.

Javascript_function

script type=text/javascript
id=onTestMethod1!--/*--![CDATA[/*!--*/
TestMethod1 = function () {
var wcall=wicketSubmitFormById('form',
'/portal/tool/52480496-d4f6-4278-0002-e65fdefcc0ef/?wicket:interface=wicket-247:0:form:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true',
null, function() { }, function() { });
return document.getElementById('form_result').value;;};
/*--]]*//script

/Javascript_function

AjaxFormSubmitBehavior.onSubmit
@Override
protected void onSubmit(AjaxRequestTarget target) {
FormComponent c = (FormComponent)form.get(argument);
String testValue = (String)c.getConvertedInput();

FormComponent r = (FormComponent)form.get(result);
bean.setResult(testValue.toUpperCase());
target.addComponent(r);
}
/AjaxFormSubmitBehavior.onSubmit

wicket-ajax.js
Wicket.Ajax.Request.prototype = {
initialize: function(url, loadedCallback, parseResponse, randomURL,
failureHandler, channel) {
this.url = url;
this.loadedCallback = loadedCallback;
this.parseResponse = parseResponse != null ? parseResponse : true;
this.randomURL = randomURL != null ? randomURL : true;
this.failureHandler = failureHandler != null ? failureHandler :
function() { };
this.async = *true;*
this.channel = channel;
this.suppressDone = false;
this.instance = Math.random();
this.debugContent = true;
},
/wicket-ajax.js

Thanks,
James


Igor Vaynberg wrote:
 the short answer is: you cant do that. javascript is asynchronous, so
 the request will start _and_ your function will continue running.
 usually what is done is that you create a request object, and then
 register success and failure handlers that are executed after the
 request is done.

 you can do that using iajaxcalldecorator, or what you tried...calling
 ajaxtarget.appendjavascript() should work as well.

 if you show us some more code/try to describe your actual usecase we
 can probably help you more, right now its all very abstract.

 -igor


 On 5/3/07, *James Renfro* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Hi,
 I'd like to do something slightly unusual and wrap the
 wicketSubmitFormById call in another javascript function -- I'm
 able to
 do this with no problem by overriding
 AjaxFormSubmitBehavor.onRenderHeadInitContribution and calling
 JavascriptUtils.writeJavascript on a wrapped getEventHandler. I
 can stop
 the normal attribute for 'onclick' or whatever from appearing
 inside the
 component tag by overriding onComponentTag. And by using text input
 boxes, I can pass 'arguments' to my method on the server inside
using
 FormComponent.getConvertedInput. So far so good.

 The problem I have is that I'd like to actually 'return' a value
back
 from the server in that Javascript function... so my function ends
up
 looking just like a normal function call inside of my Javascript and
 returns the value that the server provides.

 I can see inside of wicket-ajax.js that there are three special
tags:
 component, evaluate and header-contribution, each with their
 appropriate purpose -- I tried messing around with
 AjaxRequestTarget.prependJavascript so I could pass something
through
 the 'evaluate' tag, but my javascript isn't sufficient to the
 task. Then
 I tried using AjaxRequestTarget.addComponent to modify another
 TextField
 and return the value through the DOM tree -- that works fine
 except for
 the fact that the order is wrong, so my method returns _before_ the
 component is updated.

 Then I noticed this interesting Wicket.Ajax.invokePostCallHandlers()
 call, which makes me wonder if 

Re: [Wicket-user] Using AJAX wicketSubmitFormById like a method call

2007-05-04 Thread James Renfro
Good point. What I'm planning on is to inject my own ResourceReference 
version with the async set to false, but only for the one page where I 
need it to be synchronous. Since I'm overriding 
onRenderHeadInitContribution, I can just choose not to call super and 
the default .js files won't get included. But it would be much cleaner 
to be able to just set it programmatically, so I'd be very happy to see 
that parameter get worked into a future release.

Unfortunately, the spec I'm trying to implement (SCORM) requires that I 
expose a bunch of javascript methods with synchronous behavior, 
otherwise I would definite go the success handler route in this case.

Thanks very much,
James.


Igor Vaynberg wrote:
 if you change wicket-ajax.js in the way you showed below then all ajax 
 requests will become synchronous. while you wont break anything 
 foundamental you will make parallel ajax requests impossible. not a 
 good thing imho. i guess we need to add a parameter so that you can 
 set the request to synchronous just for that one call.

 or do what i suggested and add a success handler that will execute the 
 rest of the function.

 -igor


 On 5/4/07, *James Renfro*  [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 So although clearly AJAX is supposed to be mostly asynchronous. it
 looks
 like the underlying XMLHttpRequest object _can_ be synchronous.

 If I modify wicket-ajax.js and set 'Wicket.Ajax.Request.async' to
 *false* -- suddenly my code works... i.e. I can code an
 AjaxFormSubmitBehavor.onSubmit so it takes a value from one
 FormComponent (the argument to the function), modifies it (in this
 case
 toUppercase), and sends it back to another FormComponent, whose node I
 can grab from the DOM tree and return inside my function.

 So I guess my question is -- am I going to break something fundamental
 by doing this? It seem to work fine in my test case.

 Javascript_function

 script type=text/javascript
 id=onTestMethod1!--/*--![CDATA[/*!--*/
 TestMethod1 = function () {
 var wcall=wicketSubmitFormById('form',
 
 '/portal/tool/52480496-d4f6-4278-0002-e65fdefcc0ef/?wicket:interface=wicket-247:0:form:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true',
 null, function() { }, function() { });
 return document.getElementById('form_result').value;;};
 /*--]]*//script

 /Javascript_function

 AjaxFormSubmitBehavior.onSubmit
 @Override
 protected void onSubmit(AjaxRequestTarget target) {
 FormComponent c = (FormComponent)form.get(argument);
 String testValue = (String)c.getConvertedInput();

 FormComponent r = (FormComponent)form.get(result);
 bean.setResult(testValue.toUpperCase());
 target.addComponent(r);
 }
 /AjaxFormSubmitBehavior.onSubmit

 wicket-ajax.js
 Wicket.Ajax.Request.prototype = {
 initialize: function(url, loadedCallback, parseResponse,
 randomURL,
 failureHandler, channel) {
 this.url = url;
 this.loadedCallback = loadedCallback;
 this.parseResponse = parseResponse != null ? parseResponse
 : true;
 this.randomURL = randomURL != null ? randomURL : true;
 this.failureHandler = failureHandler != null ?
 failureHandler :
 function() { };
 this.async = *true;*
 this.channel = channel;
 this.suppressDone = false;
 this.instance = Math.random();
 this.debugContent = true;
 },
 /wicket-ajax.js

 Thanks,
 James


 Igor Vaynberg wrote:
  the short answer is: you cant do that. javascript is
 asynchronous, so
  the request will start _and_ your function will continue running.
  usually what is done is that you create a request object, and then
  register success and failure handlers that are executed after the
  request is done.
 
  you can do that using iajaxcalldecorator, or what you
 tried...calling
  ajaxtarget.appendjavascript() should work as well.
 
  if you show us some more code/try to describe your actual
 usecase we
  can probably help you more, right now its all very abstract.
 
  -igor
 
 
  On 5/3/07, *James Renfro* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  Hi,
  I'd like to do something slightly unusual and wrap the
  wicketSubmitFormById call in another javascript function -- I'm
  able to
  do this with no problem by overriding
  AjaxFormSubmitBehavor.onRenderHeadInitContribution and calling
  JavascriptUtils.writeJavascript on a wrapped getEventHandler. I
  can stop
  the normal attribute for 'onclick' or 

Re: [Wicket-user] Using AJAX wicketSubmitFormById like a method call

2007-05-04 Thread Igor Vaynberg

feel free to add an rfe into our jira for the extra param.

-igor


On 5/4/07, James Renfro [EMAIL PROTECTED] wrote:


Good point. What I'm planning on is to inject my own ResourceReference
version with the async set to false, but only for the one page where I
need it to be synchronous. Since I'm overriding
onRenderHeadInitContribution, I can just choose not to call super and
the default .js files won't get included. But it would be much cleaner
to be able to just set it programmatically, so I'd be very happy to see
that parameter get worked into a future release.

Unfortunately, the spec I'm trying to implement (SCORM) requires that I
expose a bunch of javascript methods with synchronous behavior,
otherwise I would definite go the success handler route in this case.

Thanks very much,
James.


Igor Vaynberg wrote:
 if you change wicket-ajax.js in the way you showed below then all ajax
 requests will become synchronous. while you wont break anything
 foundamental you will make parallel ajax requests impossible. not a
 good thing imho. i guess we need to add a parameter so that you can
 set the request to synchronous just for that one call.

 or do what i suggested and add a success handler that will execute the
 rest of the function.

 -igor


 On 5/4/07, *James Renfro*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 So although clearly AJAX is supposed to be mostly asynchronous. it
 looks
 like the underlying XMLHttpRequest object _can_ be synchronous.

 If I modify wicket-ajax.js and set 'Wicket.Ajax.Request.async' to
 *false* -- suddenly my code works... i.e. I can code an
 AjaxFormSubmitBehavor.onSubmit so it takes a value from one
 FormComponent (the argument to the function), modifies it (in this
 case
 toUppercase), and sends it back to another FormComponent, whose node
I
 can grab from the DOM tree and return inside my function.

 So I guess my question is -- am I going to break something
fundamental
 by doing this? It seem to work fine in my test case.

 Javascript_function

 script type=text/javascript
 id=onTestMethod1!--/*--![CDATA[/*!--*/
 TestMethod1 = function () {
 var wcall=wicketSubmitFormById('form',

'/portal/tool/52480496-d4f6-4278-0002-e65fdefcc0ef/?wicket:interface=wicket-247:0:form:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true',
 null, function() { }, function() { });
 return document.getElementById('form_result').value;;};
 /*--]]*//script

 /Javascript_function

 AjaxFormSubmitBehavior.onSubmit
 @Override
 protected void onSubmit(AjaxRequestTarget target) {
 FormComponent c =
(FormComponent)form.get(argument);
 String testValue = (String)c.getConvertedInput();

 FormComponent r = (FormComponent)form.get(result);
 bean.setResult(testValue.toUpperCase());
 target.addComponent(r);
 }
 /AjaxFormSubmitBehavior.onSubmit

 wicket-ajax.js
 Wicket.Ajax.Request.prototype = {
 initialize: function(url, loadedCallback, parseResponse,
 randomURL,
 failureHandler, channel) {
 this.url = url;
 this.loadedCallback = loadedCallback;
 this.parseResponse = parseResponse != null ? parseResponse
 : true;
 this.randomURL = randomURL != null ? randomURL : true;
 this.failureHandler = failureHandler != null ?
 failureHandler :
 function() { };
 this.async = *true;*
 this.channel = channel;
 this.suppressDone = false;
 this.instance = Math.random();
 this.debugContent = true;
 },
 /wicket-ajax.js

 Thanks,
 James


 Igor Vaynberg wrote:
  the short answer is: you cant do that. javascript is
 asynchronous, so
  the request will start _and_ your function will continue running.
  usually what is done is that you create a request object, and then
  register success and failure handlers that are executed after the
  request is done.
 
  you can do that using iajaxcalldecorator, or what you
 tried...calling
  ajaxtarget.appendjavascript() should work as well.
 
  if you show us some more code/try to describe your actual
 usecase we
  can probably help you more, right now its all very abstract.
 
  -igor
 
 
  On 5/3/07, *James Renfro* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
 
  Hi,
  I'd like to do something slightly unusual and wrap the
  wicketSubmitFormById call in another javascript function --
I'm
  able to
  do this with no problem by overriding
  AjaxFormSubmitBehavor.onRenderHeadInitContribution and calling
  JavascriptUtils.writeJavascript on a 

Re: [Wicket-user] Good Tutorial on core wicket

2007-05-04 Thread Ayodeji Aladejebi

it does not even require core committers to participate, what core
committers can do is break wicket into pieces of headings in a linear manner
and have non-core who understand start to contribute. wiki is not enough,
there has to be a line of thought set by the creators of wicket. answering
specific questions still wont make it join everything together, i also vote
for the fact that we seriously need a free ebook in PDF form, i dont mind
contributing the little i know as well. the point is there has to be a point
offline reference that can help when the internet or the forum is not there.

sometimes picking up a framework without a good guide are for those brave
java jackie chan not afraid to dig thru any framework.

just my 2c too.



On 5/3/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


you can feel free to vote, but i would warn to expect very little help
from the core committer group. like i said, between doing everything else we
have no time to write a book. in fact eelco and martijn are working on
wicket in action and so definetely do not have time to write another. i dont
know if they are planning on having chapters that cover this stuff. you
might want to discuss that with them. maybe they are willing to add user
contributions to the book on this, maybe not, maybe they are already writing
about this.

what we are available for is to answer specific questions. the rest is up
to the users. we have the wiki, feel free to collaborate with others and ask
us for clarifications/reviews.

my 2c.

-igor


On 5/3/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
wrote:

 Can we vote on this issue? can I call this an issue?

 Igor gracefully pointed me to the Model article in the wiki, but this
 article is mostly Object Structure, and How to Apply it... but lacks a
 little on how is model updated and passed throughout the framework. It
 surely taught me though. :)

 Is it possible to ask understood community members to divide papers or
 small overview articles on different aspects like the ones listed below?

 And therefore we might have some good data to compile into a nice PDF
 regarding Wicket's inner workings and architecture.

 With a good paper like that one, the goal would be to auto-answer
 questions like this one:

 *Is it possible to use setMarkupStream to assign html to a web page?* 
 (posted a minute ago by Thomas R. Corbin)

 This is a question regarding inner workings, because the Answer is some
 IMarkupResourceStreamProvider, and where is this information a part from
 articles on How-To's.

 Wicket is Awsome, this should be written on some paper showing
 architecture and core components behavior.

 regards to all,

 -f(t)

 On 5/3/07, Matthew Kwong [EMAIL PROTECTED]  wrote:
 
 
  I'm not new to Wicket, I'm using it for about a year, but there still
  a lot
  aspects obscure to me like PageMap, page versioning, details of page
  request
  cycle and so on.
 
  me too, I also think some more core concept needs more documentation,
  pro
  wicket is nice and can get you going with tables, ajax, pages,
  tabbedpanel
  etc, but 300pages does not reach to the point of explaining tons of
  stuffs,
  especially with new 1.3 features.
 
  I was waiting Wicket in action, any news still after the constructor
  changes
  drop?
 
  Matthew
 
 
  Paolo Di Tommaso wrote:
  
   Anyway Francisco is right, I'm also thinking that Wicket is really
  missing
   a
   good tutorial about core concepts.
  
   I'm not new to Wicket, I'm using it for about a year, but there
  still a
   lot
   aspects obscure to me like PageMap, page versioning, details of page
   request
   cycle and so on.
  
   Wicket is really a good framework that covers every details of the
  web
   application stack (and they are many and many not just web page
  rendering
   ..), but I'm thinking that a good tutorial about Wicket core
  concepts
   would
   be very useful to novice users as well as experts.
  
  
   Thank you.
  
   - Paolo
  
  
   On 5/3/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:
  
   as far as models go
  
  
   
http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models
 
  
   -igor
  
  
   On 5/3/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED]
  
   wrote:
   
I will be glad to help out in any way.
   
Here are my thoughts to the community.
   
If we could talk about core wiket ideas and implementations, for
instance:
   
Models (Concept, interfaces, implementations)
Session
Application
Pages
   
Listeners
Versioning
Request and Response Cycles
   
Page Life Cycle.
   
   
The thing is, it is not the same (AT ALL) to build a wicket
  application
than it is to build a struts application (Other than struts sucks
  :P)
   which
are the concepts and design guidelines we should have?
   
That is what I am trying to address.
   
Because of my current infinite ignorance, I might not be the
  right
person to build this type of 

Re: [Wicket-user] Good Tutorial on core wicket

2007-05-04 Thread Eelco Hillenius
If someone takes it up to create a structure (project in wicket-stuff
maybe, or just the wiki?) I'll be glad to help out a bit, certainly
with the foundational stuff. However, I don't have time to do much
else than that, and I'm sure the other comitters have the same
problem.

Also note that I've tried to attract people for just documentation in
the past. With limited results except for Geertjan, who actually wrote
quite a lot, but had to combine it with his goal of writing for
Netbeans. Also, the tutorials on JavaLobby
(http://www.javalobby.org/java/forums/t60786.html) and various other
sources are quite good imo.

Anyway, all we (the current core team members) are saying is that we
like to help out, but we don't want to take the lead. We hope 'the
community' picks that up.

Eelco


On 5/4/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
 it does not even require core committers to participate, what core
 committers can do is break wicket into pieces of headings in a linear manner
 and have non-core who understand start to contribute. wiki is not enough,
 there has to be a line of thought set by the creators of wicket. answering
 specific questions still wont make it join everything together, i also vote
 for the fact that we seriously need a free ebook in PDF form, i dont mind
 contributing the little i know as well. the point is there has to be a point
 offline reference that can help when the internet or the forum is not there.

 sometimes picking up a framework without a good guide are for those brave
 java jackie chan not afraid to dig thru any framework.

 just my 2c too.




 On 5/3/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  you can feel free to vote, but i would warn to expect very little help
 from the core committer group. like i said, between doing everything else we
 have no time to write a book. in fact eelco and martijn are working on
 wicket in action and so definetely do not have time to write another. i dont
 know if they are planning on having chapters that cover this stuff. you
 might want to discuss that with them. maybe they are willing to add user
 contributions to the book on this, maybe not, maybe they are already writing
 about this.
 
  what we are available for is to answer specific questions. the rest is up
 to the users. we have the wiki, feel free to collaborate with others and ask
 us for clarifications/reviews.
 
  my 2c.
 
  -igor
 
 
 
 
  On 5/3/07, Francisco Diaz Trepat - gmail  [EMAIL PROTECTED]
 wrote:
  
   Can we vote on this issue? can I call this an issue?
  
   Igor gracefully pointed me to the Model article in the wiki, but this
 article is mostly Object Structure, and How to Apply it... but lacks a
 little on how is model updated and passed throughout the framework. It
 surely taught me though. :)
  
   Is it possible to ask understood community members to divide papers or
 small overview articles on different aspects like the ones listed below?
  
   And therefore we might have some good data to compile into a nice PDF
 regarding Wicket's inner workings and architecture.
  
   With a good paper like that one, the goal would be to auto-answer
 questions like this one:
  
   Is it possible to use setMarkupStream to assign html to a web page? 
 (posted a minute ago by Thomas R. Corbin)
  
   This is a question regarding inner workings, because the Answer is some
 IMarkupResourceStreamProvider, and where is this information a part from
 articles on How-To's.
  
   Wicket is Awsome, this should be written on some paper showing
 architecture and core components behavior.
  
   regards to all,
  
   -f(t)
  
  
  
   On 5/3/07, Matthew Kwong [EMAIL PROTECTED]  wrote:
   
I'm not new to Wicket, I'm using it for about a year, but there still
 a lot
aspects obscure to me like PageMap, page versioning, details of page
 request
cycle and so on.
   
me too, I also think some more core concept needs more documentation,
 pro
wicket is nice and can get you going with tables, ajax, pages,
 tabbedpanel
etc, but 300pages does not reach to the point of explaining tons of
 stuffs,
especially with new 1.3 features.
   
I was waiting Wicket in action, any news still after the constructor
 changes
drop?
   
Matthew
   
   
Paolo Di Tommaso wrote:

 Anyway Francisco is right, I'm also thinking that Wicket is really
 missing
 a
 good tutorial about core concepts.

 I'm not new to Wicket, I'm using it for about a year, but there
 still a
 lot
 aspects obscure to me like PageMap, page versioning, details of page
 request
 cycle and so on.

 Wicket is really a good framework that covers every details of the
 web
 application stack (and they are many and many not just web page
 rendering
 ..), but I'm thinking that a good tutorial about Wicket core
 concepts
 would
 be very useful to novice users as well as experts.


 Thank you.

 - Paolo


 On 

Re: [Wicket-user] Good Tutorial on core wicket

2007-05-04 Thread Ayodeji Aladejebi

another problem is the evolution speed of wicket. its just very fast and
with 1.3 coming, am not even so keen on reharsing with 1.2.x again. the
framework still needs to properly evolve from my thinking cuz yu might start
ebook process and before you know it so many stuffs are deprecated

yu know

On 5/4/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


If someone takes it up to create a structure (project in wicket-stuff
maybe, or just the wiki?) I'll be glad to help out a bit, certainly
with the foundational stuff. However, I don't have time to do much
else than that, and I'm sure the other comitters have the same
problem.

Also note that I've tried to attract people for just documentation in
the past. With limited results except for Geertjan, who actually wrote
quite a lot, but had to combine it with his goal of writing for
Netbeans. Also, the tutorials on JavaLobby
(http://www.javalobby.org/java/forums/t60786.html) and various other
sources are quite good imo.

Anyway, all we (the current core team members) are saying is that we
like to help out, but we don't want to take the lead. We hope 'the
community' picks that up.

Eelco


On 5/4/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
 it does not even require core committers to participate, what core
 committers can do is break wicket into pieces of headings in a linear
manner
 and have non-core who understand start to contribute. wiki is not
enough,
 there has to be a line of thought set by the creators of wicket.
answering
 specific questions still wont make it join everything together, i also
vote
 for the fact that we seriously need a free ebook in PDF form, i dont
mind
 contributing the little i know as well. the point is there has to be a
point
 offline reference that can help when the internet or the forum is not
there.

 sometimes picking up a framework without a good guide are for those
brave
 java jackie chan not afraid to dig thru any framework.

 just my 2c too.




 On 5/3/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  you can feel free to vote, but i would warn to expect very little help
 from the core committer group. like i said, between doing everything
else we
 have no time to write a book. in fact eelco and martijn are working on
 wicket in action and so definetely do not have time to write another. i
dont
 know if they are planning on having chapters that cover this stuff. you
 might want to discuss that with them. maybe they are willing to add user
 contributions to the book on this, maybe not, maybe they are already
writing
 about this.
 
  what we are available for is to answer specific questions. the rest is
up
 to the users. we have the wiki, feel free to collaborate with others and
ask
 us for clarifications/reviews.
 
  my 2c.
 
  -igor
 
 
 
 
  On 5/3/07, Francisco Diaz Trepat - gmail 
[EMAIL PROTECTED]
 wrote:
  
   Can we vote on this issue? can I call this an issue?
  
   Igor gracefully pointed me to the Model article in the wiki, but
this
 article is mostly Object Structure, and How to Apply it... but lacks
a
 little on how is model updated and passed throughout the framework. It
 surely taught me though. :)
  
   Is it possible to ask understood community members to divide papers
or
 small overview articles on different aspects like the ones listed below?
  
   And therefore we might have some good data to compile into a nice
PDF
 regarding Wicket's inner workings and architecture.
  
   With a good paper like that one, the goal would be to auto-answer
 questions like this one:
  
   Is it possible to use setMarkupStream to assign html to a web page?

 (posted a minute ago by Thomas R. Corbin)
  
   This is a question regarding inner workings, because the Answer is
some
 IMarkupResourceStreamProvider, and where is this information a part from
 articles on How-To's.
  
   Wicket is Awsome, this should be written on some paper showing
 architecture and core components behavior.
  
   regards to all,
  
   -f(t)
  
  
  
   On 5/3/07, Matthew Kwong [EMAIL PROTECTED]  wrote:
   
I'm not new to Wicket, I'm using it for about a year, but there
still
 a lot
aspects obscure to me like PageMap, page versioning, details of
page
 request
cycle and so on.
   
me too, I also think some more core concept needs more
documentation,
 pro
wicket is nice and can get you going with tables, ajax, pages,
 tabbedpanel
etc, but 300pages does not reach to the point of explaining tons
of
 stuffs,
especially with new 1.3 features.
   
I was waiting Wicket in action, any news still after the
constructor
 changes
drop?
   
Matthew
   
   
Paolo Di Tommaso wrote:

 Anyway Francisco is right, I'm also thinking that Wicket is
really
 missing
 a
 good tutorial about core concepts.

 I'm not new to Wicket, I'm using it for about a year, but there
 still a
 lot
 aspects obscure to me like PageMap, page versioning, details of
page
 request
 cycle and so on.

 Wicket 

[Wicket-user] 1.2 to 1.3 migration problems (javax.crypto.IllegalBlockSizeException

2007-05-04 Thread Herman Bovens

Hi,

I'm getting errors when deploying my application, which I have just migrated
from wicket 1.2 to 1.3.
The first one is this:

00:52:22,421 ERROR [PasswordTextField] Problem applying encryption; go on
without for now
org.apache.wicket.WicketRuntimeException: Unable to decrypt the text
'[EMAIL PROTECTED]'
at
org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:145)
at
org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:67)
at
org.apache.wicket.markup.html.form.PasswordTextField.setModelValue(PasswordTextField.java:133)
at
org.apache.wicket.markup.html.form.persistence.CookieValuePersister.load(CookieValuePersister.java:71)
at
org.apache.wicket.markup.html.form.Form$1.onFormComponent(Form.java:324)
at
org.apache.wicket.markup.html.form.FormComponent$AbstractVisitor.formComponent(FormComponent.java:106)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:1367)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:1354)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:1332)
at
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:539)
at
org.apache.wicket.markup.html.form.Form.loadPersistentFormComponentValues(Form.java:308)
at org.apache.wicket.Page$8.component(Page.java:1371)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:793)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:808)
at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:808)
at
org.apache.wicket.Page.setFormComponentValuesFromCookies(Page.java:1366)
at org.apache.wicket.Page.renderPage(Page.java:807)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:224)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:999)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1061)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1130)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.crypto.IllegalBlockSizeException: Input length must be
multiple of 8 when decrypting with padded cipher
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
at com.sun.crypto.provider.SunJCE_ae.b(DashoA12275)
at
com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(DashoA12275)
at javax.crypto.Cipher.doFinal(DashoA12275)
at
org.apache.wicket.util.crypt.SunJceCrypt.crypt(SunJceCrypt.java:102)
at

[Wicket-user] loading message for i18N from other sources

2007-05-04 Thread ywtsang

Wicket's i18n is nice and I can follow the example easily here:
http://cwiki.apache.org/WICKET/i18n-and-resource-bundles.html

Is it possible to have Wicket load i18n messages from sources like DB or
etc? As we want the messages to be dynamically updated for real time if
necessary.

I have looked into something like IResourceStream, but got no hint to go on. 

Thanks for your answer.

-Wing
-- 
View this message in context: 
http://www.nabble.com/loading-message-for-i18N-from-other-sources-tf3695158.html#a10333197
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to remove a Behaviour?

2007-05-04 Thread Jonathan Locke


remove is a good addition, but what about isEnabled()?  that might be a nice
way to conditionally apply a behavior instead of removing it.


Johan Compagner wrote:
 
 i think we should be thinking of a remove(IBehavior)
 It is pretty in line with the rest (think about Swing listeners)
 And it doesn't sit in the way as far as i can think of.
 
 johan
 
 
 On 5/2/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 you cannot remove a behavior currently. what you can do is call stop() on
 the timerbehavior.

 -igor


 On 5/2/07, Ivo van Dongen  [EMAIL PROTECTED] wrote:

  Hi,
 
  We have a component with an AjaxSelfUpdatingTimerBehavior attached to
  it. When a certain condition is reached we want to remove the behaviour
 from
  its parent before updating it again, to prefent it from going on
 forever. We
  couldn't find a way for this. Component has a remove() method, but
  IBehaviour does not. What is the preferred way to do this?
 
  Thanks in advance,
  Ivo van Dongen
 
  --
  Ivo van Dongen
  Func. Internet Integration
  W http://www.func.nl
  T +31 20 423
  F +31 20 4223500
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-remove-a-Behaviour--tf3681644.html#a10333457
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-04 Thread Jeremy Thomerson

Should I be concerned that the numbers in the following URLs jump so much?
This is on a page signed in as an admin, where I do have some callback links
that are stateful.

On one page view, here is an admin link:
http://www.texashuntfish.dev/thf/app?wicket:interface=:12492:list:posts:0:postSummary:delete::ILinkListener
I refresh (no other page views in between), and it changes to:
http://www.texashuntfish.dev/thf/app?wicket:interface=:13999:list:posts:0:postSummary:delete::ILinkListener

That's an increase of 1500 in a single page view... I am concerned that
somehow this means that I have 1500 components going into memory for a
single page?  Is that number changing so drastically something to be alarmed
about?

Thank you!
Jeremy

On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 Thanks to everyone for their help - I'm starting right away to convert
 everything to detachable models for all domain objects that are loaded
into
 components...

If you're only working with stateless pages, you don't detachable
models as those pages won't be stored to start with. But if you want
to reuse the models and components in stateful pages, it is better to
have that.

 Eelco, I am curious about your statement when you have no callbacks,
you're
 page will be stateless and not kept in memory...  Most of my pages have
no
 callbacks (by callback, I'm assuming that you mean a link that would
have
 reference to wicket components in the URL, meaning that it is storing
the
 state of that component so that it can further interact with it).

Yep. Normal Links, Forms, ajax requests etc.

 I have
 taken great care to control the URLs of the application, so almost every
 page has only components that have standard URLs, with no references to
any
 components, etc.  The forms will obviously have a call back, and certain
 links (particularly if you are signed in as an administrator - a lot of
 links appear to edit and delete content that are all direct callbacks
with
 obviously no direct URL encoding / decoding so that you can not use them
 outside of your session).

Not sure what you're getting at...

 So, how do I know if it's storing the pages in memory?  Is there
something I
 can do to tell it not to?

Yeah, you can give provide a HINT that they shouldn't be stored (that
they are stateless) by overriding getStatelessHint on the components
you put on the page. Note that if there is just one stateful component
on the page, that'll trigger the page to be marked as stateful UNLESS
you explicitly mark the page itself stateless (which is a bit cheaper
by the way, as it won't iterate over it's children to find out whether
it is stateless).

The method where this all happens is Page#isPageStateless.

Also, if you want to keep track of when user sessions are created,
create a custom session store by overriding newSessionStore on
Application and let your custom store extend HttpSessionStore or
SecondLevelCacheSessionStore and then override onBind which will be
called when (new) sessions are bound to the HttpSession.

Eelco


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] loading message for i18N from other sources

2007-05-04 Thread Igor Vaynberg

see IStringResourceLoader

and

IResourceSettings.addStringResourceLoader

-igor


On 5/4/07, ywtsang [EMAIL PROTECTED] wrote:



Wicket's i18n is nice and I can follow the example easily here:
http://cwiki.apache.org/WICKET/i18n-and-resource-bundles.html

Is it possible to have Wicket load i18n messages from sources like DB or
etc? As we want the messages to be dynamically updated for real time
if
necessary.

I have looked into something like IResourceStream, but got no hint to go
on.

Thanks for your answer.

-Wing
--
View this message in context:
http://www.nabble.com/loading-message-for-i18N-from-other-sources-tf3695158.html#a10333197
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-04 Thread Igor Vaynberg

that is actually the page id not component id. so either you create 1500
pages in between, or stateless pages generate random ids - which it didnt
look like from the code...

-igor


On 5/4/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:


Should I be concerned that the numbers in the following URLs jump so
much?  This is on a page signed in as an admin, where I do have some
callback links that are stateful.

On one page view, here is an admin link:
http://www.texashuntfish.dev/thf/app?wicket:interface=:12492:list:posts:0:postSummary:delete::ILinkListener
I refresh (no other page views in between), and it changes to:
http://www.texashuntfish.dev/thf/app?wicket:interface=:13999:list:posts:0:postSummary:delete::ILinkListener

That's an increase of 1500 in a single page view... I am concerned that
somehow this means that I have 1500 components going into memory for a
single page?  Is that number changing so drastically something to be alarmed
about?

Thank you!
Jeremy

On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

  Thanks to everyone for their help - I'm starting right away to convert
  everything to detachable models for all domain objects that are loaded
 into
  components...

 If you're only working with stateless pages, you don't detachable
 models as those pages won't be stored to start with. But if you want
 to reuse the models and components in stateful pages, it is better to
 have that.

  Eelco, I am curious about your statement when you have no callbacks,
 you're
  page will be stateless and not kept in memory...  Most of my pages
 have no
  callbacks (by callback, I'm assuming that you mean a link that would
 have
  reference to wicket components in the URL, meaning that it is storing
 the
  state of that component so that it can further interact with it).

 Yep. Normal Links, Forms, ajax requests etc.

  I have
  taken great care to control the URLs of the application, so almost
 every
  page has only components that have standard URLs, with no references
 to any
  components, etc.  The forms will obviously have a call back, and
 certain
  links (particularly if you are signed in as an administrator - a lot
 of
  links appear to edit and delete content that are all direct callbacks
 with
  obviously no direct URL encoding / decoding so that you can not use
 them
  outside of your session).

 Not sure what you're getting at...

  So, how do I know if it's storing the pages in memory?  Is there
 something I
  can do to tell it not to?

 Yeah, you can give provide a HINT that they shouldn't be stored (that
 they are stateless) by overriding getStatelessHint on the components
 you put on the page. Note that if there is just one stateful component
 on the page, that'll trigger the page to be marked as stateful UNLESS
 you explicitly mark the page itself stateless (which is a bit cheaper
 by the way, as it won't iterate over it's children to find out whether
 it is stateless).

 The method where this all happens is Page#isPageStateless.

 Also, if you want to keep track of when user sessions are created,
 create a custom session store by overriding newSessionStore on
 Application and let your custom store extend HttpSessionStore or
 SecondLevelCacheSessionStore and then override onBind which will be
 called when (new) sessions are bound to the HttpSession.

 Eelco



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user