Re: Serializing model. DetachedModel or not

2008-10-07 Thread jensiator

Thanks Igor
In my code I started with with a LDM initialized with the modelobject
itself. But it if the modelobject dont implement serializable I get
serialize exception for the modelobject(e.g. contact). My assumption is that
the modelobject is being serialized to the session. I thought that the LDM
is a model you use when you dont want to serialize the model to the
session(http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels).
 
But in the end,as jwcarman wrote, wicket handles the session with disc
writing so it probably no problem. But if its so that the LDM is serializing
the modelobject in session when you initialize the LDM with it, could I not
just use a basic Model instead?
Jens Alenius

-- 
View this message in context: 
http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19852478.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Serializing model. DetachedModel or not

2008-10-07 Thread Edmund Urbani
jensiator wrote:
 Thanks Igor
 In my code I started with with a LDM initialized with the modelobject
 itself. But it if the modelobject dont implement serializable I get
 serialize exception for the modelobject(e.g. contact). My assumption is that
 the modelobject is being serialized to the session. I thought that the LDM
 is a model you use when you dont want to serialize the model to the
 session(http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels).
  
 But in the end,as jwcarman wrote, wicket handles the session with disc
 writing so it probably no problem. But if its so that the LDM is serializing
 the modelobject in session when you initialize the LDM with it, could I not
 just use a basic Model instead?
 Jens Alenius
 
The modelobject should not be serialized with the model. In case you have
subclassed LDM and made it keep any references of your own to the object (which
BTW I do not recommend), make sure that they are declared transient to achieve
this. Transient attributes are ignored during serialization and set back to null
when deserialized. This causes the LDM to (re-)load the object the first time it
is requested after deserialization.

Cheers
 Edmund

-- 
Liland ...does IT better

Liland IT GmbH
Software Architekt
email: [EMAIL PROTECTED]

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288
http://www.Liland.at

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



Re: Having Wicket append #someanchor

2008-10-07 Thread kan
2008/10/7 Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]:
 :)
Huh? :)
Yes, not brilliant solution but works for some cases... ;)
Actually it's quite possible to make it for all strategies, but
requires  to change wicket code.

-- 
WBR, kan.

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



Re: Serializing model. DetachedModel or not

2008-10-07 Thread jensiator

Hello Edmund.
Nice to have someone in the same timezone!
Thanks for your reply. I'll try to set the modelobject member in the LDM to
transient and see if it solves the serializing exception(even if you don't
recommend it). Just want to try it out. 

If I understand you correctly you only keep a serialized identifier as a
member in the subclass of the LDM and then use the load method to populate
the modelobject. Have you been working with the SortableDataProvider?
Because I still have not figured out how one should combine the above
discussed LDM load method with the iterator method in the SDP. Do you call
the database in the LDM load method to get the data for the model. If so, do
you also call the database in the SDP.iterator method to get the data
collection for the current page? Because it seems to me that in that case
I'm getting the modelobject data twice from the database.

Jens Alenius
 

-- 
View this message in context: 
http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19853480.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Serializing model. DetachedModel or not

2008-10-07 Thread James Carman
Check out:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/LoadableDetachableEntityModel.java

and

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/repeater/PageableRepositoryDataProvider.java

for examples on how to do a SortableDataProvider along with a
LoadableDetachableModel for each item.

On Tue, Oct 7, 2008 at 4:22 AM, jensiator [EMAIL PROTECTED] wrote:

 Hello Edmund.
 Nice to have someone in the same timezone!
 Thanks for your reply. I'll try to set the modelobject member in the LDM to
 transient and see if it solves the serializing exception(even if you don't
 recommend it). Just want to try it out.

 If I understand you correctly you only keep a serialized identifier as a
 member in the subclass of the LDM and then use the load method to populate
 the modelobject. Have you been working with the SortableDataProvider?
 Because I still have not figured out how one should combine the above
 discussed LDM load method with the iterator method in the SDP. Do you call
 the database in the LDM load method to get the data for the model. If so, do
 you also call the database in the SDP.iterator method to get the data
 collection for the current page? Because it seems to me that in that case
 I'm getting the modelobject data twice from the database.

 Jens Alenius


 --
 View this message in context: 
 http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19853480.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: HTTPS and FileUpload

2008-10-07 Thread Uwe Schäfer

Igor Vaynberg schrieb:


hmm, create a jira issue. mabe if you override getmaxsize on the form
and return -1 or null -indicating you dont care, we should not error
out


done.
https://issues.apache.org/jira/browse/WICKET-1861

thx uwe

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



How to answer Request with 500 error

2008-10-07 Thread Stefan Lindner
I try to create a watchdog page for our site. My idea was to check the
neccessary resources and respond with a 500 error in case of failure.
So I placed


getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus
(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

in the page constructor and in onAfterRender but the page is displayed
correctly, no 500 error shown in browser.
Any idea?

Stefan

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



Re: RadioChoice with Ajax

2008-10-07 Thread radovan

it works, thank you very much!!


Michael Sparer wrote:
 
 just a guess:
 from the AjaxFormComopnentUpdatingBehavior's javadoc:
 NOTE: This behavior does not work on Choices or Groups use the
 AjaxFormChoiceComponentUpdatingBehavior for that. 
 
 regards,
 Michael
 
 
 radovan wrote:
 
 Hallo, I have this code:
 
 private static final ListString Orders = Arrays.asList(new String[]
 { asc, desc });
 private final IModelString model = new
 ModelString(Orders.get(0));
 
 RadioChoice radioChoice = new RadioChoice(orders, model,
 Orders);
 radioChoice.add(new AjaxFormComponentUpdatingBehavior(onchange)
 {
 private static final long serialVersionUID = 1L;
 
 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 System.out.println(model);
 }
 });
 
 I expected, that model contains selected choice, but this print null.
 How I can get value of selected choice? - with Ajax (no submit button)
 
 
 

-- 
View this message in context: 
http://www.nabble.com/RadioChoice-with-Ajax-tp19855494p19856526.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Create Contact Us Page

2008-10-07 Thread newbieabc

I put in a Properties File and that took care of everything.
Thanks all...

I have another related question...
I want to change one of  the Contact page form component's visibility
property based in a parameter I set in another page.

Is there a page onLoad function or something where I can check the parameter
value and then change visibility of the component? If yes.. then where is it
called? Or how? When ever I try to check the parameter value within the page
constructor, I get a NullPointerException, but when the parameter is used
for other things , like from a method called within the the Form onSubmit()
there doesn't seem to be any problems.

Thanks 


Nino.Martinez wrote:
 
 emailvalidator + required = no exceptions.. :)
 
 newbieabc wrote:
 Thank you. I was able to successfully use JavaMail API for the Contact
 page.
 I have another question related to the page, I'm not sure if I should ask
 it
 in this thread or not...

 I had done the rough page , and now that it works, started adding the
 validations, to make sure required data in entered.

 Some how the setRequired and EmailAddressValidators keep throwing errors
 if
 I leave those fields blank.
 I've put in a feedback panel, but instead of just showing a feedback
 message, the page shows the exceptionsI'm not sure why.
 If I don't use validators, the page runs fine, whether I enter data or
 not...
 Any ideas?

 Thanks


 jwcarman wrote:
   
 Take a look at form processing and perhaps the JavaMail API (or Apache
 Commons Email for a simpler API).

 On Wed, Sep 17, 2008 at 2:35 PM, newbieabc [EMAIL PROTECTED] wrote:
 
 I'd like to create a Contact Us (by email) page, that lets users send
 their
 inquiries directly from the web page to an email address, without using
 outlook.
 Could someone give me some direction on how to go about doing this in
 wicket?

 Thank you.
 --
 View this message in context:
 http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19538477.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



 

   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Create-%22Contact-Us%22-Page-tp19538477p19858740.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket on Tomcat?

2008-10-07 Thread Seven Corners

You can deploy with Tomcat but you can't use the standard Tomcat deployment
tree; that is, something like this won't work:

.../webapps
  -  mywebapp
 - WEB-INF
- classes
- html
- images
- styles
- scripts

You have to put the html for a given class in the same directory as the
class file.  The CSS, images and scripts can go in directories below that,
but they can't be above.  So when your warfile expands, the directory
structure should be something like this:
...
- classes
   - com/mycompany/myproject/
 - myapp.class
   myclass.class
   myclass.html
   - styles
 style.css
   - images
 myimage.jpg

Again, your classes could be in directories below your application class,
but any resources they need must be parallel or below.

It is possible to create an Eclipse project to work with this but I didn't
have good luck with WicketPanda.  I found it got in my way, put things in
places where I couldn't use them anyway, and burned up a lot of time, so I
just create the files I need by hand.  Our deployment creates its own tomcat
tree so the Eclipse Tomcat plugin is of no help to me (it would be a
different instance of Tomcat) so I debug by attaching to the running Tomcat
process.

To debug, you have to set JPDA_SUSPEND to y in catalina.sh and use the
command catalina.sh jpda start to start up Tomcat.  Then you fire up the
Eclipse debugger, then you open up a browser and point to your website.  

Good luck!



Vernon-13 wrote:
 
 I just dip into Wicket. I notice that Wicket setup exclusively with Jetty,
 for example, the quick start page
 http://wicket.apache.org/quickstart.html. Can I create an Eclipse project
 for TC instead of Jetty?  
 
 
 
   
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-on-Tomcat--tp19848408p19857232.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RadioChoice with Ajax

2008-10-07 Thread radovan

Hallo, I have this code:

private static final ListString Orders = Arrays.asList(new String[] {
asc, desc });
private final IModelString model = new ModelString(Orders.get(0));

RadioChoice radioChoice = new RadioChoice(orders, model, Orders);
radioChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
System.out.println(model);
}
});

I expected, that model contains selected choice, but this print null. How
I can get value of selected choice? - with Ajax (no submit button)
-- 
View this message in context: 
http://www.nabble.com/RadioChoice-with-Ajax-tp19855494p19855494.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Ard Schrijvers
Hello Igor and Timo,

Sorry for my really way to late response, I was caught up entirely by
some stressful tasks which needed to be finished. 

I currently do not have statistics, but I could have a cpu yourkit
snapshot. I have seen up to 75% cpu in the serialization and
deserialization. Recently I saw 25%.

People working with Linux do not experience this cpu bottleneck though,
so it might very well be an issue with how windows handles the
filesystem. I will sort out the suggestion by Timo, would be great if
that solved the issue. 

Thanks a lot, and again, sorry for my late response!

-Ard

 
 On Fri, 03 Oct 2008, Igor Vaynberg wrote:
  do you have some statistics for us? or some profiler timing 
 screenshots?
 
 While waiting for the reply from Ard... I remember hearing of 
 a case where the pagemaps were stored to a directory that the 
 virus scanner was monitoring, and the scanner hogged all cpu 
 during load testing :) I suppose that this kind of stuff 
 happens more easily on Windows than on unices.
 
 Best wishes,
 Timo
 
 -- 
 Timo Rantalaiho   
 Reaktor Innovations OyURL: http://www.ri.fi/ 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Ard Schrijvers
Thanks a lot Richard, 

I will take a look!

Regards Ard

 
 The wicket integration with terracotta uses an in-memory page map.
 
 The code is here, but will soon be part of the terracotta wicket-tim.
 
 http://www.nabble.com/file/p19826206/TerracottaPageStore.java
 TerracottaPageStore.java 
 
 
 
 Timo Rantalaiho wrote:
  
  On Fri, 03 Oct 2008, Igor Vaynberg wrote:
  do you have some statistics for us? or some profiler 
 timing screenshots?
  
  While waiting for the reply from Ard... I remember hearing 
 of a case 
  where the pagemaps were stored to a directory that the 
 virus scanner 
  was monitoring, and the scanner hogged all cpu during load 
 testing :) 
  I suppose that this kind of stuff happens more easily on 
 Windows than 
  on unices.
  
  Best wishes,
  Timo
  
  -- 
  Timo Rantalaiho   
  Reaktor Innovations OyURL: http://www.ri.fi/ 
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
 -
 http://www.richard-wilkinson.co.uk My blog:
 http://www.richard-wilkinson.co.uk
 --
 View this message in context: 
 http://www.nabble.com/AbstractPageStore-memory-implementation-
 instead-of-disk-tp19797628p19826206.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Ard Schrijvers
Hello Matej,

 I'd really be interested in how exactly did you come to 
 conclusion that DiskPageStore writing to disk is the 
 bottleneck. Unless your filesystem caching is broken :) 

Hmmm, don't think the filesystem cache is broken. I am working with
filesystem caches and lucene a lot and don't experience really bad
performance. Through when profiling our wicket application with yourkit,
I happened to see a lot of cpu being absorbed in the serialisation /
deserialisation to filesytem

Regards Ard

 Serialization takes a significant part of request processing, 
 but that is necessary.
 
 -Matej
 
 On Fri, Oct 3, 2008 at 3:21 PM, Ard Schrijvers 
 [EMAIL PROTECTED] wrote:
  Hello everybody,
 
  Did anybody perhaps ever implement a memory version of the 
  AbstractPageStore. Currently, I only see a DiskPageStore, which 
  happens to be quite a large cpu bottleneck for Windows users AFAICS.
 
  So, before starting to implement one, just wondering 
 whether somebody 
  has experience on a memory page store version,
 
  Thx for any pointers,
 
  Regards Ard
 
  [EMAIL PROTECTED] - [EMAIL PROTECTED] - www.onehippo.com
  -
  Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam 
 +31(0)20-5224466 
  San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
  94952-3329 +1 (707) 773-4646
  -
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Johan Compagner
but serialization and writing to disk are 2 different things.



On Tue, Oct 7, 2008 at 4:21 PM, Ard Schrijvers [EMAIL PROTECTED]wrote:

 Hello Igor and Timo,

 Sorry for my really way to late response, I was caught up entirely by
 some stressful tasks which needed to be finished.

 I currently do not have statistics, but I could have a cpu yourkit
 snapshot. I have seen up to 75% cpu in the serialization and
 deserialization. Recently I saw 25%.

 People working with Linux do not experience this cpu bottleneck though,
 so it might very well be an issue with how windows handles the
 filesystem. I will sort out the suggestion by Timo, would be great if
 that solved the issue.

 Thanks a lot, and again, sorry for my late response!

 -Ard

 
  On Fri, 03 Oct 2008, Igor Vaynberg wrote:
   do you have some statistics for us? or some profiler timing
  screenshots?
 
  While waiting for the reply from Ard... I remember hearing of
  a case where the pagemaps were stored to a directory that the
  virus scanner was monitoring, and the scanner hogged all cpu
  during load testing :) I suppose that this kind of stuff
  happens more easily on Windows than on unices.
 
  Best wishes,
  Timo
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




Re: Modeless Window (real or div)

2008-10-07 Thread Nino Saturnino Martinez Vazquez Wael

both modal and nonmodal?

Francisco Diaz Trepat - gmail wrote:

Seams that it is not possible to do this.
I need both modal and modeless.

f(t)

On Tue, Oct 7, 2008 at 7:57 AM, Francisco Diaz Trepat - gmail 
[EMAIL PROTECTED] wrote:

  

Hi nino, sounds good, I'll have to set the setCssClassName() if I don't
want to clash with other modal windows, that need to be modal, right?
f(t)


On Tue, Oct 7, 2008 at 2:36 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



Why not use wicket modal window, and just override css?


Francisco Diaz Trepat - gmail wrote:

  

Hi I need to build a pop-up modal window on my application.
I wanted to see if I could get some recomendations or comments.

Obviously I need not to re-enter username and password and work on the
same
session.

It could be a div element like the Wicket Dialog, or a real new window.

Thoughts?

thanks,
f(t)





--
-Wicket for love

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


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


  


  


--
-Wicket for love

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


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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread richardwilko

I should say that the terracotta page map also does the page serialisation,
but it does it all in memory.

You could probably write out the serialisation bit quite easily, but it is
required for terracotta.



Ard Schrijvers-3 wrote:
 
 Thanks a lot Richard, 
 
 I will take a look!
 
 Regards Ard
 
 
 The wicket integration with terracotta uses an in-memory page map.
 
 The code is here, but will soon be part of the terracotta wicket-tim.
 
 http://www.nabble.com/file/p19826206/TerracottaPageStore.java
 TerracottaPageStore.java 
 
 
 
 Timo Rantalaiho wrote:
  
  On Fri, 03 Oct 2008, Igor Vaynberg wrote:
  do you have some statistics for us? or some profiler 
 timing screenshots?
  
  While waiting for the reply from Ard... I remember hearing 
 of a case 
  where the pagemaps were stored to a directory that the 
 virus scanner 
  was monitoring, and the scanner hogged all cpu during load 
 testing :) 
  I suppose that this kind of stuff happens more easily on 
 Windows than 
  on unices.
  
  Best wishes,
  Timo
  
  -- 
  Timo Rantalaiho   
  Reaktor Innovations OyURL: http://www.ri.fi/ 
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
 -
 http://www.richard-wilkinson.co.uk My blog:
 http://www.richard-wilkinson.co.uk
 --
 View this message in context: 
 http://www.nabble.com/AbstractPageStore-memory-implementation-
 instead-of-disk-tp19797628p19826206.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
http://www.richard-wilkinson.co.uk My blog:
http://www.richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/AbstractPageStore-memory-implementation-instead-of-disk-tp19797628p19859483.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Ard Schrijvers

 but serialization and writing to disk are 2 different things.

Yes sorry for the confusion. I intertwine the serialization and disk
performance (hence asking whether a memory page store exists) because
AFAIU, it is the serialized pagemaps that are being written to
filesystem. Indeed, when using a memory page store, still serialization
to memory is needed, so you are indeed right to say that they are
different. I should talk about the cpu bottleneck of writing the
serialized pagemaps to disk and whether there is a pagestore using
memory. As indicated by Richard, this one seems to exist in Terracotta.
I will try and see whether this avoids my experienced cpu bottleneck.
Also the virus scanner option I will look into 

By the way, using 

protected ISessionStore newSessionStore()
{
 return new HttpSessionStore(this);
}

Instead of 

protected ISessionStore newSessionStore()
{
return new SecondLevelCacheSessionStore(this, new
DiskPageStore());
}

Also avoids the disk writing bottleneck. Now, I am not sure whether
HttpSessionStore can be used instead of SecondLevelCacheSessionStore. It
does not seem to write to diks.

Thanks for all the pointers and fast responses everybody

Regards Ard 

 
 
 
 On Tue, Oct 7, 2008 at 4:21 PM, Ard Schrijvers 
 [EMAIL PROTECTED]wrote:
 
  Hello Igor and Timo,
 
  Sorry for my really way to late response, I was caught up 
 entirely by 
  some stressful tasks which needed to be finished.
 
  I currently do not have statistics, but I could have a cpu yourkit 
  snapshot. I have seen up to 75% cpu in the serialization and 
  deserialization. Recently I saw 25%.
 
  People working with Linux do not experience this cpu bottleneck 
  though, so it might very well be an issue with how windows 
 handles the 
  filesystem. I will sort out the suggestion by Timo, would 
 be great if 
  that solved the issue.
 
  Thanks a lot, and again, sorry for my late response!
 
  -Ard
 
  
   On Fri, 03 Oct 2008, Igor Vaynberg wrote:
do you have some statistics for us? or some profiler timing
   screenshots?
  
   While waiting for the reply from Ard... I remember 
 hearing of a case 
   where the pagemaps were stored to a directory that the 
 virus scanner 
   was monitoring, and the scanner hogged all cpu during 
 load testing 
   :) I suppose that this kind of stuff happens more easily 
 on Windows 
   than on unices.
  
   Best wishes,
   Timo
  
   --
   Timo Rantalaiho
   Reaktor Innovations OyURL: http://www.ri.fi/ 
  
   
 
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread richardwilko

The HttpSessionStore is an in memory session store, so it has no disk writing
bottleneck.  It does however have some other problems, specifically with the
back button i think.

the terracotta page store works like this:

protected ISessionStore newSessionStore()
{
return new SecondLevelCacheSessionStore(this, new
TerracottaPageStore(100));
}

as it is just an implementation of the IPageStore interface as is the
DiskPageStore, but where the DiskPageStore writes to disk the
TerracottaPageStore writes to http session.

The 100 is number of pages to keep in history as far as i remember, check
the source to be sure.


Ard Schrijvers-3 wrote:
 
 
 but serialization and writing to disk are 2 different things.
 
 Yes sorry for the confusion. I intertwine the serialization and disk
 performance (hence asking whether a memory page store exists) because
 AFAIU, it is the serialized pagemaps that are being written to
 filesystem. Indeed, when using a memory page store, still serialization
 to memory is needed, so you are indeed right to say that they are
 different. I should talk about the cpu bottleneck of writing the
 serialized pagemaps to disk and whether there is a pagestore using
 memory. As indicated by Richard, this one seems to exist in Terracotta.
 I will try and see whether this avoids my experienced cpu bottleneck.
 Also the virus scanner option I will look into 
 
 By the way, using 
 
 protected ISessionStore newSessionStore()
 {
return new HttpSessionStore(this);
 }
 
 Instead of 
 
 protected ISessionStore newSessionStore()
   {
   return new SecondLevelCacheSessionStore(this, new
 DiskPageStore());
   }
 
 Also avoids the disk writing bottleneck. Now, I am not sure whether
 HttpSessionStore can be used instead of SecondLevelCacheSessionStore. It
 does not seem to write to diks.
 
 Thanks for all the pointers and fast responses everybody
 
 Regards Ard 
 
 
 
 
 On Tue, Oct 7, 2008 at 4:21 PM, Ard Schrijvers 
 [EMAIL PROTECTED]wrote:
 
  Hello Igor and Timo,
 
  Sorry for my really way to late response, I was caught up 
 entirely by 
  some stressful tasks which needed to be finished.
 
  I currently do not have statistics, but I could have a cpu yourkit 
  snapshot. I have seen up to 75% cpu in the serialization and 
  deserialization. Recently I saw 25%.
 
  People working with Linux do not experience this cpu bottleneck 
  though, so it might very well be an issue with how windows 
 handles the 
  filesystem. I will sort out the suggestion by Timo, would 
 be great if 
  that solved the issue.
 
  Thanks a lot, and again, sorry for my late response!
 
  -Ard
 
  
   On Fri, 03 Oct 2008, Igor Vaynberg wrote:
do you have some statistics for us? or some profiler timing
   screenshots?
  
   While waiting for the reply from Ard... I remember 
 hearing of a case 
   where the pagemaps were stored to a directory that the 
 virus scanner 
   was monitoring, and the scanner hogged all cpu during 
 load testing 
   :) I suppose that this kind of stuff happens more easily 
 on Windows 
   than on unices.
  
   Best wishes,
   Timo
  
   --
   Timo Rantalaiho
   Reaktor Innovations OyURL: http://www.ri.fi/ 
  
   
 
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
http://www.richard-wilkinson.co.uk My blog:
http://www.richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/AbstractPageStore-memory-implementation-instead-of-disk-tp19797628p19860012.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Serkan Camurcuoglu
Do you get this error in firefox? Can you try with IE? This looks like a 
problem I usually have with wicket ajax functionality in gecko based 
browsers..




Doug Leeper wrote:

I am trying to get the latest GMap2 in wicketstuff to work with Wicket 1.3.4
(can't upgrade to 1.4 just yet)

As the mvn repository only is applicable to 1.4, I downloaded the sources
and adjusted the two places that would not compile (both specifically
dealing with generics)

However, when I run my application, I am trying to pop up a Modal window
with a GMap2 instance in it. When I click the AjaxLink and show the window,
I get the following error in my console:

java.io.IOException: The filename, directory name, or volume label syntax is
incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:395)
at java.io.File.getCanonicalPath(File.java:531)
at org.mortbay.resource.FileResource.getAlias(FileResource.java:184)
at
org.mortbay.jetty.servlet.DefaultServlet.getResource(DefaultServlet.java:275)
at 
org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:375)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:246)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at
com.positiontech.hib.HibernateFilter$$M$1a2d7b4a.doFilter(HibernateFilter.java:67)
at 
com.positiontech.hib.HibernateFilter$$A$1a2d7b4a.doFilter(generated)
at com.positiontech.hib.HibernateFilter.doFilter(generated)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

When I view the Ajax Debug Console, it contains the following information:


INFO: focus set on 
INFO: focus removed from 
INFO: focus set on setTargets15

INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:4:contractForm:advertising:setTargets::IBehaviorListener:0:random=0.5156089011856273
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (4665 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution
encoding=wicket1 ![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript
src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
script type=text/javascript
src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script
script type=text/javascript
src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script
script type=text/javascript
id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
wicketAjaxDebugEnable=true;
/*--]^]^*//script

script type=text/javascript
src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js/script
link rel=stylesheet type=text/css
href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css
/
script type=text/javascript
src=http://www.google.com/jsapi?key=ABQIzaZpf6nHOd9w1PfLaM9u2xQRS2YPSd8S9D1NKPBvdB1fr18_CxR-svEYj6URCf5QDFq3i03mqrDlbA;/script
script type=text/javascript
id=wicket.contrib.gmap.GMapHeaderContributor_googleload!--/*--![CDATA[/*!--*/
google.load(maps, 2.x);
/*--]^]^*//script

script type=text/javascript
src=resources/wicket.contrib.gmap.GMap2/wicket-gmap.js/script
script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, onUnload, function() { google.maps.Unload();;});

Re: RadioChoice with Ajax

2008-10-07 Thread Michael Sparer

just a guess:
from the AjaxFormComopnentUpdatingBehavior's javadoc:
NOTE: This behavior does not work on Choices or Groups use the
AjaxFormChoiceComponentUpdatingBehavior for that. 

regards,
Michael


radovan wrote:
 
 Hallo, I have this code:
 
 private static final ListString Orders = Arrays.asList(new String[]
 { asc, desc });
 private final IModelString model = new ModelString(Orders.get(0));
 
 RadioChoice radioChoice = new RadioChoice(orders, model,
 Orders);
 radioChoice.add(new AjaxFormComponentUpdatingBehavior(onchange)
 {
 private static final long serialVersionUID = 1L;
 
 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 System.out.println(model);
 }
 });
 
 I expected, that model contains selected choice, but this print null.
 How I can get value of selected choice? - with Ajax (no submit button)
 


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


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



RE: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Ard Schrijvers
Great, I'll check out the code for the TerracottaPageStore, 

Thanks a lot Richard,

Regards Ard

 
 The HttpSessionStore is an in memory session store, so it has 
 no disk writing bottleneck.  It does however have some other 
 problems, specifically with the back button i think.
 
 the terracotta page store works like this:
 
 protected ISessionStore newSessionStore()
   {
   return new SecondLevelCacheSessionStore(this, 
 new TerracottaPageStore(100));
   }
 
 as it is just an implementation of the IPageStore interface 
 as is the DiskPageStore, but where the DiskPageStore writes 
 to disk the TerracottaPageStore writes to http session.
 
 The 100 is number of pages to keep in history as far as i 
 remember, check the source to be sure.
 
 
 Ard Schrijvers-3 wrote:
  
  
  but serialization and writing to disk are 2 different things.
  
  Yes sorry for the confusion. I intertwine the serialization 
 and disk 
  performance (hence asking whether a memory page store 
 exists) because 
  AFAIU, it is the serialized pagemaps that are being written to 
  filesystem. Indeed, when using a memory page store, still 
  serialization to memory is needed, so you are indeed right 
 to say that 
  they are different. I should talk about the cpu bottleneck 
 of writing 
  the serialized pagemaps to disk and whether there is a 
 pagestore using 
  memory. As indicated by Richard, this one seems to exist in 
 Terracotta.
  I will try and see whether this avoids my experienced cpu 
 bottleneck.
  Also the virus scanner option I will look into
  
  By the way, using
  
  protected ISessionStore newSessionStore()
  {
   return new HttpSessionStore(this);
  }
  
  Instead of
  
  protected ISessionStore newSessionStore()
  {
  return new SecondLevelCacheSessionStore(this, 
 new DiskPageStore());
  }
  
  Also avoids the disk writing bottleneck. Now, I am not sure whether 
  HttpSessionStore can be used instead of 
 SecondLevelCacheSessionStore. 
  It does not seem to write to diks.
  
  Thanks for all the pointers and fast responses everybody
  
  Regards Ard
  
  
  
  
  On Tue, Oct 7, 2008 at 4:21 PM, Ard Schrijvers
  [EMAIL PROTECTED]wrote:
  
   Hello Igor and Timo,
  
   Sorry for my really way to late response, I was caught up
  entirely by
   some stressful tasks which needed to be finished.
  
   I currently do not have statistics, but I could have a 
 cpu yourkit 
   snapshot. I have seen up to 75% cpu in the serialization and 
   deserialization. Recently I saw 25%.
  
   People working with Linux do not experience this cpu bottleneck 
   though, so it might very well be an issue with how windows
  handles the
   filesystem. I will sort out the suggestion by Timo, would
  be great if
   that solved the issue.
  
   Thanks a lot, and again, sorry for my late response!
  
   -Ard
  
   
On Fri, 03 Oct 2008, Igor Vaynberg wrote:
 do you have some statistics for us? or some profiler timing
screenshots?
   
While waiting for the reply from Ard... I remember
  hearing of a case
where the pagemaps were stored to a directory that the
  virus scanner
was monitoring, and the scanner hogged all cpu during
  load testing
:) I suppose that this kind of stuff happens more easily
  on Windows
than on unices.
   
Best wishes,
Timo
   
--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 
   

  
 
- To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
 -
 http://www.richard-wilkinson.co.uk My blog:
 http://www.richard-wilkinson.co.uk
 --
 View this message in context: 
 http://www.nabble.com/AbstractPageStore-memory-implementation-
 instead-of-disk-tp19797628p19860012.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: Serializing model. DetachedModel or not

2008-10-07 Thread Edmund Urbani
jensiator wrote:
 Hello Edmund.
 Nice to have someone in the same timezone!
 Thanks for your reply. I'll try to set the modelobject member in the LDM to
 transient and see if it solves the serializing exception(even if you don't
 recommend it). Just want to try it out. 
 
 If I understand you correctly you only keep a serialized identifier as a
 member in the subclass of the LDM and then use the load method to populate
 the modelobject. Have you been working with the SortableDataProvider?
 Because I still have not figured out how one should combine the above
 discussed LDM load method with the iterator method in the SDP. Do you call
 the database in the LDM load method to get the data for the model. If so, do
 you also call the database in the SDP.iterator method to get the data
 collection for the current page? Because it seems to me that in that case
 I'm getting the modelobject data twice from the database.
 
 Jens Alenius
  

There should be no need to load the object twice from the DB for one request.
You either fetch it using the SDP (and then construct a new LDM for each object)
or you use the LDM to retrieve a single object (or LDMs for several select
objects).

Either way, I don't know of a case where you would want to fetch the object both
ways for handling one and the same request. So, both the LDM load and the SDP
iterator methods commonly fetch the object(s) from the DB, but you should not
use both of them for handling any one given request (not for the same object, I
mean). You can call the getObject() method of a newly instantiated LDM as many
times as you like during one request without causing it to retrieve the object
from the database, IF you passed that object to its constructor.

Cheers
 Edmund

-- 
Liland ...does IT better

Liland IT GmbH
Software Architekt
email: [EMAIL PROTECTED]

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288
http://www.Liland.at

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



AW: How to answer Request with 500 error

2008-10-07 Thread Stefan Lindner
Ah! Thank you.

Stefan.

-Ursprüngliche Nachricht-
Von: Serkan Camurcuoglu [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 7. Oktober 2008 14:18
An: users@wicket.apache.org
Betreff: Re: How to answer Request with 500 error

The WIA book says:

Setting an HTTP status code:
If you want to set an HTTP status code for your page, such as 404 (not 
found), you
can do so by overriding the page's setHeaders method:

@Override
protected void setHeaders(WebResponse response) {
response.getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
super.setHeaders(response);
}

Alternatively, you can throw an AbortWithWebErrorCodeException and 
provide it
with the appropriate error code and an optional message.




Stefan Lindner wrote:
 I try to create a watchdog page for our site. My idea was to check the
 neccessary resources and respond with a 500 error in case of failure.
 So I placed

   
 getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus
 (HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

 in the page constructor and in onAfterRender but the page is displayed
 correctly, no 500 error shown in browser.
 Any idea?

 Stefan

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


   


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


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



Re: devoxx - javapolis

2008-10-07 Thread Martijn Dashorst
Not that I know of. JavaPolis is invitation only for speakers, and we
didn't get an invite this year. I'm too busy to drive there and do a
bof though.

Martijn

On Tue, Oct 7, 2008 at 10:41 AM, Maarten Bosteels
[EMAIL PROTECTED] wrote:
 Hello,

 Will there be a Wicket talk at devoxx, forimerly known as JavaPolis ?
 I think there should :-)

 http://www.devoxx.com/display/JV08/Home

 Maarten




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: Modeless Window (real or div)

2008-10-07 Thread Francisco Diaz Trepat - gmail
Seams that it is not possible to do this.
I need both modal and modeless.

f(t)

On Tue, Oct 7, 2008 at 7:57 AM, Francisco Diaz Trepat - gmail 
[EMAIL PROTECTED] wrote:

 Hi nino, sounds good, I'll have to set the setCssClassName() if I don't
 want to clash with other modal windows, that need to be modal, right?
 f(t)


 On Tue, Oct 7, 2008 at 2:36 AM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:

 Why not use wicket modal window, and just override css?


 Francisco Diaz Trepat - gmail wrote:

 Hi I need to build a pop-up modal window on my application.
 I wanted to see if I could get some recomendations or comments.

 Obviously I need not to re-enter username and password and work on the
 same
 session.

 It could be a div element like the Wicket Dialog, or a real new window.

 Thoughts?

 thanks,
 f(t)




 --
 -Wicket for love

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


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





Interfaces for component hierarchies (e.g. Buttons)?

2008-10-07 Thread Martin Dietze
Hi,

 I am currently running into the following: I extend the button
class by a snappy foo-feature. I build stuff which uses it.
Now I need a foo-ified AjaxButton within this infrastructure.

The obvious way to do this is to write an interface FooButton
which gives me this foo-feature. However FooButton is by
itself not a Button, nor can I make it one since the Button
class is an abstract class, not an interface.

Just wondering, whould it be a good idea to add such interfaces
to the Wicket-API? Or am I missing something?

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Was ist der Unterschied zwischen einer Bratsche und einer Waschmaschine?
Die Waschmaschine vibriert, kommt erst am Ende ins Schleudern, und was 
rauskommt, ist sauber.

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



Re: Modeless Window (real or div)

2008-10-07 Thread Francisco Diaz Trepat - gmail
right, the nonmodal window is basically a calculator (kind of) that helps
the user do some math. It needs to have access to lower (layer-wise)
fields.
If a modal window is displayed then it should cover the nonmodal window
(lets call it the calculator).

I can do this with some error like this:

new ModalWindow(calculator){ private static final long
serialVersionUID = 0L;

 @Override
 public void show(AjaxRequestTarget cTarget) {
super.show(cTarget);
cTarget.appendJavascript(if
(typeof(Wicket.Window.get())!=\undefined\) {
Wicket.Window.get().destroyMask(); });
 }

  };

This destroyMask works fine, but when I close the window, it throws an error
due to destroyMask is called again and inside executes the following code:

/**
 * Destroys the mask.
 */
destroyMask: function() {
this.mask.hide();
this.mask = null;
}

I am thinking in overriding this body with:

/**
 * Destroys the mask.
 */
destroyMask: function() {
if(this.mask) {
this.mask.hide();
this.mask = null;
}
}

Or something of the sort.

f(t)

On Tue, Oct 7, 2008 at 9:01 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 both modal and nonmodal?


 Francisco Diaz Trepat - gmail wrote:

 Seams that it is not possible to do this.
 I need both modal and modeless.

 f(t)

 On Tue, Oct 7, 2008 at 7:57 AM, Francisco Diaz Trepat - gmail 
 [EMAIL PROTECTED] wrote:



 Hi nino, sounds good, I'll have to set the setCssClassName() if I don't
 want to clash with other modal windows, that need to be modal, right?
 f(t)


 On Tue, Oct 7, 2008 at 2:36 AM, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED] wrote:



 Why not use wicket modal window, and just override css?


 Francisco Diaz Trepat - gmail wrote:



 Hi I need to build a pop-up modal window on my application.
 I wanted to see if I could get some recomendations or comments.

 Obviously I need not to re-enter username and password and work on the
 same
 session.

 It could be a div element like the Wicket Dialog, or a real new window.

 Thoughts?

 thanks,
 f(t)





 --
 -Wicket for love

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


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








 --
 -Wicket for love

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


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




Addition [Re: Interfaces for component hierarchies (e.g. Buttons)?]

2008-10-07 Thread Martin Dietze
On Tue, October 07, 2008, Martin Dietze wrote:

 Just wondering, whould it be a good idea to add such interfaces
 to the Wicket-API? Or am I missing something?

commenting on my comments:

(1) This would of course mean to interface-ify basically the whole
component type hierarchy, since in order to addOrReplace
such a beast it has to be an instance of a Component.

(2) Yes, I have heard of instanceof and type casts, but do we
really want to have to use them? I don't.

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
I am not in a hurry. I prefer to cross the town.

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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Doug Leeper

So I tried in IE 7 and this is what I get in the Ajax Debug Window.

Note: the modal window does show up...but IE indicates that it has
experienced an error and asks that I debug.

...

INFO: Initiating Ajax GET request on
http://www.google.com/jsapi?key=ABQIzaZpf6nHOd9w1PfLaM9u2xQRS2YPSd8S9D1NKPBvdB1fr18_CxR-svEYj6URCf5QDFq3i03mqrDlbA
INFO: Invoking pre-call handler(s)...
INFO: focus removed from setTargets15
INFO: focus set on setTargets15
INFO: Received ajax response (12326 characters)
INFO: Invoking post-call handler(s)...
INFO: 
INFO: Initiating Ajax GET request on
resources/wicket.contrib.gmap.GMap2/wicket-gmap.js
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (7079 characters)
INFO: focus removed from setTargets15
INFO: Invoking post-call handler(s)...
ERROR: Exception evaluating javascript: [object Error]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: focus set on setTargets15
INFO: focus removed from setTargets15
INFO: last focus id was not set
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
-- 
View this message in context: 
http://www.nabble.com/GMap2-or-Wicket-Ajax-issue--tp19859974p19860544.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to answer Request with 500 error

2008-10-07 Thread Serkan Camurcuoglu

The WIA book says:

Setting an HTTP status code:
If you want to set an HTTP status code for your page, such as 404 (not 
found), you

can do so by overriding the page’s setHeaders method:

@Override
protected void setHeaders(WebResponse response) {
response.getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
super.setHeaders(response);
}

Alternatively, you can throw an AbortWithWebErrorCodeException and 
provide it

with the appropriate error code and an optional message.




Stefan Lindner wrote:

I try to create a watchdog page for our site. My idea was to check the
neccessary resources and respond with a 500 error in case of failure.
So I placed


getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus
(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

in the page constructor and in onAfterRender but the page is displayed
correctly, no 500 error shown in browser.
Any idea?

Stefan

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


  



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



Re: How to answer Request with 500 error

2008-10-07 Thread Jeremy Thomerson
Also, see AbortWithHttpStatusException.


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

On Tue, Oct 7, 2008 at 7:41 AM, Stefan Lindner [EMAIL PROTECTED] wrote:

 Ah! Thank you.

 Stefan.

 -Ursprüngliche Nachricht-
 Von: Serkan Camurcuoglu [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 7. Oktober 2008 14:18
 An: users@wicket.apache.org
 Betreff: Re: How to answer Request with 500 error

 The WIA book says:

 Setting an HTTP status code:
 If you want to set an HTTP status code for your page, such as 404 (not
 found), you
 can do so by overriding the page's setHeaders method:

 @Override
 protected void setHeaders(WebResponse response) {
 response.getHttpServletResponse().setStatus(
 HttpServletResponse.SC_NOT_FOUND);
 super.setHeaders(response);
 }

 Alternatively, you can throw an AbortWithWebErrorCodeException and
 provide it
 with the appropriate error code and an optional message.




 Stefan Lindner wrote:
  I try to create a watchdog page for our site. My idea was to check the
  neccessary resources and respond with a 500 error in case of failure.
  So I placed
 
 
  getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus
  (HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 
  in the page constructor and in onAfterRender but the page is displayed
  correctly, no 500 error shown in browser.
  Any idea?
 
  Stefan
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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


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




devoxx - javapolis

2008-10-07 Thread Maarten Bosteels
Hello,

Will there be a Wicket talk at devoxx, forimerly known as JavaPolis ?
I think there should :-)

http://www.devoxx.com/display/JV08/Home

Maarten


Re: Serializing model. DetachedModel or not

2008-10-07 Thread Igor Vaynberg
if wicket tries to serialize the object you are trying to hold on to a
reference of it outside the ldm somewhere in your code. eg

object o=ldm.getobject();
add(new label(o, o));

-igor

On Tue, Oct 7, 2008 at 12:21 AM, jensiator [EMAIL PROTECTED] wrote:

 Thanks Igor
 In my code I started with with a LDM initialized with the modelobject
 itself. But it if the modelobject dont implement serializable I get
 serialize exception for the modelobject(e.g. contact). My assumption is that
 the modelobject is being serialized to the session. I thought that the LDM
 is a model you use when you dont want to serialize the model to the
 session(http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels).
 But in the end,as jwcarman wrote, wicket handles the session with disc
 writing so it probably no problem. But if its so that the LDM is serializing
 the modelobject in session when you initialize the LDM with it, could I not
 just use a basic Model instead?
 Jens Alenius

 --
 View this message in context: 
 http://www.nabble.com/Serializing-model.-DetachedModel-or-not-tp19833559p19852478.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Modeless Window (real or div)

2008-10-07 Thread Francisco Diaz Trepat - gmail
Hi nino, sounds good, I'll have to set the setCssClassName() if I don't want
to clash with other modal windows, that need to be modal, right?
f(t)

On Tue, Oct 7, 2008 at 2:36 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Why not use wicket modal window, and just override css?


 Francisco Diaz Trepat - gmail wrote:

 Hi I need to build a pop-up modal window on my application.
 I wanted to see if I could get some recomendations or comments.

 Obviously I need not to re-enter username and password and work on the
 same
 session.

 It could be a div element like the Wicket Dialog, or a real new window.

 Thoughts?

 thanks,
 f(t)




 --
 -Wicket for love

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


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




Closing ModalWindow using javascript:window.close()

2008-10-07 Thread nanotech

Hi,

In my project there is a modal window.In event of WicketRuntimeException it
goes to custom Internal Error page. That Page has a button which overrides
onComponetTag method and  attaches javascript:window.close() with
onclick event. So that user can close the modal window.(I don't want user
to use [X] button in right top corner so I have hidden that button through
CSS). The problem is this [javascript:window.close() ] does not close modal
window but it does work in regaular page.(i.e. if execption occurs on a
regualr page then after the request is forwarded to Custom Internal error
page then user is able to click on close button and the browser window
closes.)

Can some one please suggest me how to achieve this is modal window.

Thanks,
RG   
-- 
View this message in context: 
http://www.nabble.com/Closing-ModalWindow-using-javascript%3Awindow.close%28%29-tp19860774p19860774.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Serkan Camurcuoglu
well that's beyond me.. what I was talking about was an error similar to 
http://issues.apache.org/jira/browse/WICKET-1426 which causes http 404 
errors in gecko browsers and I have to patch wicket-ajax.js to 
workaround it.. but your error seems to be more subtle, maybe you should 
send this [object Error] you receive on IE to the list and someone with 
better javascript skills might help..




Doug Leeper wrote:

So I tried in IE 7 and this is what I get in the Ajax Debug Window.

Note: the modal window does show up...but IE indicates that it has
experienced an error and asks that I debug.

...

INFO: Initiating Ajax GET request on
http://www.google.com/jsapi?key=ABQIzaZpf6nHOd9w1PfLaM9u2xQRS2YPSd8S9D1NKPBvdB1fr18_CxR-svEYj6URCf5QDFq3i03mqrDlbA
INFO: Invoking pre-call handler(s)...
INFO: focus removed from setTargets15
INFO: focus set on setTargets15
INFO: Received ajax response (12326 characters)
INFO: Invoking post-call handler(s)...
INFO: 
INFO: Initiating Ajax GET request on

resources/wicket.contrib.gmap.GMap2/wicket-gmap.js
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (7079 characters)
INFO: focus removed from setTargets15
INFO: Invoking post-call handler(s)...
ERROR: Exception evaluating javascript: [object Error]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: focus set on setTargets15
INFO: focus removed from setTargets15
INFO: last focus id was not set
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
  



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



Re: force page reload

2008-10-07 Thread francisco treacy
as it is kind of a workflow and i had all the pages already prepared
by passing imodels along into constructors, i didn't want to have a
bookmarkablepage (whatever you pick: panels/pages/variations, you need
this one to call the page executing the code). but this was the
simpler solution, pass an id to the non wicket server through http
post, get it back and initialize the a detachablemodel again with the
id and the dao.

so i changed a bit my code to fit this no-arg constructor page, which
is responsible of checking the http post params.

imo it is a good idea to use variations. a panel could have also been,
of course, but i wanted to avoid boilerplate for just a thank you. i
finally redirected to the next page. in any case, this is such a small
case that the approach is not so important here.

thanks all!

francisco

On Tue, Oct 7, 2008 at 1:36 AM, Jeremy Thomerson
[EMAIL PROTECTED] wrote:
 I'd wholeheartedly agree with the panel solution.  Either one would work,
 but I think the panel is really good.



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

 On Mon, Oct 6, 2008 at 9:53 PM, John Krasnay [EMAIL PROTECTED] wrote:

 On Mon, Oct 06, 2008 at 07:36:03PM -0200, francisco treacy wrote:
  thanks for your help, serkan.
 
  cool, this works. as a workaround nevertheless:
 
  -i wouldn't want my app to check every single request the existence of
  a parameter which i am going to use in only *one* page anyway
  -what if i have this param passed to another page that doesn't expect
  it? this could easily introduce new bugs
 
  isn't there another easy way to force reloading / not caching a
  page? why isn't setHeaders having any effect? should be
  straightforward - what am i missing here?
 
  thanks again anyone for some pointers!
 
  francisco
 

 It seems to me a bit strange to use markup variant for this. You could
 have your callback page forward to the correct page like this:

 public CallbackPage(PageParameters params) {
if (params.getString(DATA).equals(good)) {
setResponsePage(PaymentGoodPage.class);
} else {
setResponsePage(TryAgainPage.class);
}
 }

 Alternatively, you could instantiate an appropriate panel in your page:

 public CallbackPage(PageParameters params) {
if (params.getString(DATA).equals(good)) {
add(new PaymentGoodPanel(responsePanel));
} else {
add(new TryAgainPanel(responsePanel));
}
 }


 jk

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




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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Doug Leeper

It could be related.  One way to find out...

I will apply the suggested patch and see what happens.

Which patch should I try?  There appears to be two suggestions.

Thanks
- Doug
-- 
View this message in context: 
http://www.nabble.com/GMap2-or-Wicket-Ajax-issue--tp19859974p19861512.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: force page reload

2008-10-07 Thread Ryan Gravener
Just throwing this out there:

http://wicketstuff.org/wicket13doc/org/apache/wicket/Page.html#setStatelessHint(boolean)

Perhaps that may work.


Ryan Gravener
http://twitter.com/ryangravener


On Tue, Oct 7, 2008 at 12:02 PM, francisco treacy 
[EMAIL PROTECTED] wrote:

 as it is kind of a workflow and i had all the pages already prepared
 by passing imodels along into constructors, i didn't want to have a
 bookmarkablepage (whatever you pick: panels/pages/variations, you need
 this one to call the page executing the code). but this was the
 simpler solution, pass an id to the non wicket server through http
 post, get it back and initialize the a detachablemodel again with the
 id and the dao.

 so i changed a bit my code to fit this no-arg constructor page, which
 is responsible of checking the http post params.

 imo it is a good idea to use variations. a panel could have also been,
 of course, but i wanted to avoid boilerplate for just a thank you. i
 finally redirected to the next page. in any case, this is such a small
 case that the approach is not so important here.

 thanks all!

 francisco

 On Tue, Oct 7, 2008 at 1:36 AM, Jeremy Thomerson
 [EMAIL PROTECTED] wrote:
  I'd wholeheartedly agree with the panel solution.  Either one would work,
  but I think the panel is really good.
 
 
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
  On Mon, Oct 6, 2008 at 9:53 PM, John Krasnay [EMAIL PROTECTED] wrote:
 
  On Mon, Oct 06, 2008 at 07:36:03PM -0200, francisco treacy wrote:
   thanks for your help, serkan.
  
   cool, this works. as a workaround nevertheless:
  
   -i wouldn't want my app to check every single request the existence of
   a parameter which i am going to use in only *one* page anyway
   -what if i have this param passed to another page that doesn't expect
   it? this could easily introduce new bugs
  
   isn't there another easy way to force reloading / not caching a
   page? why isn't setHeaders having any effect? should be
   straightforward - what am i missing here?
  
   thanks again anyone for some pointers!
  
   francisco
  
 
  It seems to me a bit strange to use markup variant for this. You could
  have your callback page forward to the correct page like this:
 
  public CallbackPage(PageParameters params) {
 if (params.getString(DATA).equals(good)) {
 setResponsePage(PaymentGoodPage.class);
 } else {
 setResponsePage(TryAgainPage.class);
 }
  }
 
  Alternatively, you could instantiate an appropriate panel in your page:
 
  public CallbackPage(PageParameters params) {
 if (params.getString(DATA).equals(good)) {
 add(new PaymentGoodPanel(responsePanel));
 } else {
 add(new TryAgainPanel(responsePanel));
 }
  }
 
 
  jk
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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




Prevent component markup regeneration in ajax call

2008-10-07 Thread Adriano dos Santos Fernandes

Hi!

I'd like to have extjs toolbar/menu working with Wicket ajax. What I 
want is, for example, in an ajax event show/hide menu items. I created 
the classes and the menu is rendered correctly.


My toolbar render everything from its renderHead (IHeaderContributor) 
method. All javascript code is dumped to the response to render the ext 
component to a div.


I looked at wicket-tools-extjs but still can't figure how to do what I 
need. If I re-render (ajax) the component it just hide. I tried 
different readerRead code when it's called by the second time, but the 
previously rendered component just hide too.


So my question is how I could prevent wicket from regenerate the div 
when updating a component added to an AjaxRequestTarget?



Adriano


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



Re: Interfaces for component hierarchies (e.g. Buttons)?

2008-10-07 Thread Jeremy Thomerson
Depending on what you are doing, you may want to try implementing the foo
feature code as a behavior.  Behaviors are like plugins for components, and
can be used on any component.  So, if it is possible to implement your
functionality as a behavior, then you could add it to the button or ajax
button, or a link, etc.


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


On Tue, Oct 7, 2008 at 10:12 AM, Martin Dietze [EMAIL PROTECTED] wrote:

 Hi,

  I am currently running into the following: I extend the button
 class by a snappy foo-feature. I build stuff which uses it.
 Now I need a foo-ified AjaxButton within this infrastructure.

 The obvious way to do this is to write an interface FooButton
 which gives me this foo-feature. However FooButton is by
 itself not a Button, nor can I make it one since the Button
 class is an abstract class, not an interface.

 Just wondering, whould it be a good idea to add such interfaces
 to the Wicket-API? Or am I missing something?

 Cheers,

 Martin

 --
 --- / http://herbert.the-little-red-haired-girl.org /
 -
 =+=
 Was ist der Unterschied zwischen einer Bratsche und einer Waschmaschine?
 Die Waschmaschine vibriert, kommt erst am Ende ins Schleudern, und was
 rauskommt, ist sauber.

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




Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Serkan Camurcuoglu

I apply my patch, to change this code on line 824

if (Wicket.Browser.isGecko()) {

to

if (Wicket.Browser.isGecko()  url.match(^http://;) == null) {

works for me, which ensures that the url is not an absolute url..




Doug Leeper wrote:

It could be related.  One way to find out...

I will apply the suggested patch and see what happens.

Which patch should I try?  There appears to be two suggestions.

Thanks
- Doug
  



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



Re: Patch for ModalWindow?

2008-10-07 Thread Timo Rantalaiho
On Mon, 06 Oct 2008, rmorrisey wrote:
 wicket 1.3.4
 I have a small addition to ModalWindow that I think would be useful as a
 patch. Please tell me what you think.

Hi, it sounds like a nice idea, though I don't know what 
exactly what it could be used for :) Displaying some 
notification after closing the window?

 http://www.nabble.com/file/p19849489/ModalWindow.java ModalWindow.java 

However, the contribution is better done as a patch against
Wicket trunk (and/or 1.3.x at the moment) attached to a Jira
issue. That way, it's also a lot easier to review your 
changes -- and those familiar with ModalWindow can comment on 
whether the addition is worthwhile or if there is already a 
way to achieve the same.

Best wishes,
Timo

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

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



Re: Create Contact Us Page

2008-10-07 Thread Timo Rantalaiho
On Tue, 07 Oct 2008, newbieabc wrote:
 I have another related question...

Often it's a good idea to start a new thread with a 
descriptive subject for new questions.

 I want to change one of  the Contact page form component's visibility
 property based in a parameter I set in another page.
 
 Is there a page onLoad function or something where I can check the parameter
 value and then change visibility of the component? If yes.. then where is it
 called? Or how? When ever I try to check the parameter value within the page
 constructor, I get a NullPointerException, but when the parameter is used
 for other things , like from a method called within the the Form onSubmit()
 there doesn't seem to be any problems.

Constructor is only called on construction, not rendering. 

You have at least a couple of options;

  FormComponent myComponentWithConditionalVisibility = new TextField(foo) { 
  @Override
  public boolean isVisible() {
  return fooFieldShouldBeBVisible();
  }
  }

or

  FormComponent myComponentWithConditionalVisibility = new TextField(foo) { 
  @Override
  public void onBeforeRender() {
  setVisible(fooFieldShouldBeVisible());
  }
  }


Best wishes,
Timo

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

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



Re: force page reload

2008-10-07 Thread francisco treacy
yes... the page must be bookmarkable - so i need it anyway.

another question that pops out with your suggestion: when called, are
bookmarkable pages always instantiated? under any circumstance?

just to make sure that calling
http://localhost:8080/myapp/bookmarkable will always trigger the code.
sorry if this is obvious, i just never paid attention :)

francisco

On Tue, Oct 7, 2008 at 2:07 PM, Ryan Gravener [EMAIL PROTECTED] wrote:
 Just throwing this out there:

 http://wicketstuff.org/wicket13doc/org/apache/wicket/Page.html#setStatelessHint(boolean)

 Perhaps that may work.


 Ryan Gravener
 http://twitter.com/ryangravener


 On Tue, Oct 7, 2008 at 12:02 PM, francisco treacy 
 [EMAIL PROTECTED] wrote:

 as it is kind of a workflow and i had all the pages already prepared
 by passing imodels along into constructors, i didn't want to have a
 bookmarkablepage (whatever you pick: panels/pages/variations, you need
 this one to call the page executing the code). but this was the
 simpler solution, pass an id to the non wicket server through http
 post, get it back and initialize the a detachablemodel again with the
 id and the dao.

 so i changed a bit my code to fit this no-arg constructor page, which
 is responsible of checking the http post params.

 imo it is a good idea to use variations. a panel could have also been,
 of course, but i wanted to avoid boilerplate for just a thank you. i
 finally redirected to the next page. in any case, this is such a small
 case that the approach is not so important here.

 thanks all!

 francisco

 On Tue, Oct 7, 2008 at 1:36 AM, Jeremy Thomerson
 [EMAIL PROTECTED] wrote:
  I'd wholeheartedly agree with the panel solution.  Either one would work,
  but I think the panel is really good.
 
 
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
  On Mon, Oct 6, 2008 at 9:53 PM, John Krasnay [EMAIL PROTECTED] wrote:
 
  On Mon, Oct 06, 2008 at 07:36:03PM -0200, francisco treacy wrote:
   thanks for your help, serkan.
  
   cool, this works. as a workaround nevertheless:
  
   -i wouldn't want my app to check every single request the existence of
   a parameter which i am going to use in only *one* page anyway
   -what if i have this param passed to another page that doesn't expect
   it? this could easily introduce new bugs
  
   isn't there another easy way to force reloading / not caching a
   page? why isn't setHeaders having any effect? should be
   straightforward - what am i missing here?
  
   thanks again anyone for some pointers!
  
   francisco
  
 
  It seems to me a bit strange to use markup variant for this. You could
  have your callback page forward to the correct page like this:
 
  public CallbackPage(PageParameters params) {
 if (params.getString(DATA).equals(good)) {
 setResponsePage(PaymentGoodPage.class);
 } else {
 setResponsePage(TryAgainPage.class);
 }
  }
 
  Alternatively, you could instantiate an appropriate panel in your page:
 
  public CallbackPage(PageParameters params) {
 if (params.getString(DATA).equals(good)) {
 add(new PaymentGoodPanel(responsePanel));
 } else {
 add(new TryAgainPanel(responsePanel));
 }
  }
 
 
  jk
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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




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



Re: Interfaces for component hierarchies (e.g. Buttons)?

2008-10-07 Thread Martin Dietze
On Tue, October 07, 2008, Jeremy Thomerson wrote:

 Depending on what you are doing, you may want to try implementing the foo
 feature code as a behavior.  Behaviors are like plugins for components, and
 can be used on any component.  So, if it is possible to implement your
 functionality as a behavior, then you could add it to the button or ajax
 button, or a link, etc.

I don't think this would help in my particular case. I extended the Button
class by additional properties which I render into the markup in another
component which implements IMarkupResourceStreamProvider. Thus the additional
property needs to be visible from the outside.

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Tower: Hoehe und Position?
Pilot: Ich bin 1.80m und sitze vorne links.

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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Doug Leeper

I applied that change locally and it did not change the behavior/error that I
was seeing.

Not sure what else to try.

I guess I will make it a Page rather than a ModalWindow for now to keep
moving along.

Thanks for the help.
- Doug
-- 
View this message in context: 
http://www.nabble.com/GMap2-or-Wicket-Ajax-issue--tp19859974p19862570.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Custom Text Field...

2008-10-07 Thread Steve Thompson
Hi,

I'm attempting to create a custom validator for social security number
strings.  I've got the following code for this:

static Pattern pattern = Pattern.compile((\\d{3})[ \\-]*(\\d{2})[
\\-]*(\\d{4}));

public final IConverterString getConverter(Class type)
{
return new IConverterString()
{

public String convertToObject(String value, Locale 
locale)
{
String result = ;
result = value.substring(0, 3) + - + 
value.substring(3, 5) + -
+ value.substring(5, 8);
return result;
}

public String convertToString(String value, Locale 
locale)
{
String result = ;
Matcher fit = pattern.matcher(value);
if(fit.find())
for(int index = 1; index = fit.groupCount(); index++)
result += fit.group(index);
return result;
}

};
}

When I use this with a text field, I can intercept the calls to
convertToString.  However, convertToObject never seems to be getting
called.  Is there something that I am doing wrong/not understanding?

Thanks and best regards,


Steve

--

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



Need some clarification on AjaxBehaviors

2008-10-07 Thread Steve Thompson
I was recently working on creating some Ajax functionality that, when
a record was added/updated/deleted in my form would display some
informational label that would gradually fade away.  While I can get
this to work, I would like to refactor this into some type of reusable
behavior.  Is this possible, and if so, how might it be done?

One approach that I've tried that did not work was adding a custom
AjaxBehavior to the submit (itself an AjaxButton).  I was expecting
that perhaps the behavior could be invoked after the buttons onSubmit
method, but I haven't figured out how to make this happen.  Am I on
the right track?

Any ideas would be greatly appreciated,


Steve

--

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



Re: AbstractPageStore memory implementation instead of disk

2008-10-07 Thread Matej Knopp
On Tue, Oct 7, 2008 at 4:24 PM, Ard Schrijvers
[EMAIL PROTECTED] wrote:
 Hello Matej,

 I'd really be interested in how exactly did you come to
 conclusion that DiskPageStore writing to disk is the
 bottleneck. Unless your filesystem caching is broken :)

 Hmmm, don't think the filesystem cache is broken. I am working with
 filesystem caches and lucene a lot and don't experience really bad
 performance. Through when profiling our wicket application with yourkit,
 I happened to see a lot of cpu being absorbed in the serialisation /
 deserialisation to filesytem


Again, serialization and writing to filesystem are two completely
different things.
Are you *really* sure that the writing (which is done in separate
thread btw) is really the bottleneck? I have profiled this a lot and
the serialization takes signifficantly more time than writing the
stuff to disk. But the serialization is necessary, plus the overhead
is there only until you run your application in clustered environment.

-Matej

 Regards Ard

 Serialization takes a significant part of request processing,
 but that is necessary.

 -Matej

 On Fri, Oct 3, 2008 at 3:21 PM, Ard Schrijvers
 [EMAIL PROTECTED] wrote:
  Hello everybody,
 
  Did anybody perhaps ever implement a memory version of the
  AbstractPageStore. Currently, I only see a DiskPageStore, which
  happens to be quite a large cpu bottleneck for Windows users AFAICS.
 
  So, before starting to implement one, just wondering
 whether somebody
  has experience on a memory page store version,
 
  Thx for any pointers,
 
  Regards Ard
 
  [EMAIL PROTECTED] - [EMAIL PROTECTED] - www.onehippo.com
  -
  Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam
 +31(0)20-5224466
  San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
  94952-3329 +1 (707) 773-4646
  -
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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



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



Re: right click popup context menu

2008-10-07 Thread mkamneng

Hello Doug,

I'm have some difficulties getting the contextMenu running. I checkout today
the wicket-contrib-yui project from the svn and install it using maven.

Trying after that using the  wicket-contrib-yui.jar and all dependencies to
create my context menu in the 
same way as in the ContextMenu2Page example page, I get some compilation
errors that I cannot explain:

It's not possible to add a yui component to a wicket component: 
eg

public class TestPage extends WebPage {
   ...
   public TestPage (final PageParameters parameters) {
   ...
   WebMarkupContainer treeContainer = new WebMarkupContainer(
treeContextMenu);
   ...
   cmBehavior = new YuiContextMenuBehavior(nodeMenu );
   treeContainer.add(cmBehavior);
   }
}

Error by treeContainer.add(cmBehavior):
The method add(Component...) in the type MarkupContainer is not applicable
for the arguments (YuiContextMenuBehavior)


Please, I will appreciate any help! 
Thanks,
mkamneng.



Doug Leeper wrote:
 
 Take a look at wicket-contrib-yui.  There is a context menu (built on top
 of YUI) contained in org.wicketstuff.yui.markup.html.menu2.contextMenu
 
 There are some examples in wicketstuff-yui-examples for the Context Menu
 (tree and list/data view)
 
 Note: these are SVN projects located at
 http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/
 
 Let me know if you have any questions as I am the author of this
 contribution.
 
 - Doug
 

-- 
View this message in context: 
http://www.nabble.com/right-click-popup-context-menu-tp15876468p19865344.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: right click popup context menu

2008-10-07 Thread Doug Leeper

what version of wicket are you using?

I have not tested/ported any of the menu2 with wicket 1.4.
-- 
View this message in context: 
http://www.nabble.com/right-click-popup-context-menu-tp15876468p19865384.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: right click popup context menu

2008-10-07 Thread mkamneng

I try it with apache-wicket-1.3.4 and apache-wicket-1.4-m3 and I'm getting
the same compilation errors!



Doug Leeper wrote:
 
 what version of wicket are you using?
 
 I have not tested/ported any of the menu2 with wicket 1.4.
 

-- 
View this message in context: 
http://www.nabble.com/right-click-popup-context-menu-tp15876468p19865616.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Custom Radio component with children?

2008-10-07 Thread Igor Vaynberg
we do not guarantee the order of updates for sibling components, we
only guarantee that the deepest components are visited first - so you
should not make an assumption about order of evaluation when writing
the code.

it is indeed weird that the FCP is not visited, as far as i can see
the visisitor visits all formcomponents of which FCP is a subclass.

-igor

On Tue, Oct 7, 2008 at 11:19 AM, dukehoops [EMAIL PROTECTED] wrote:

 I have run the page in Tomcat and narrowed down the problem to the following:
 - FCP's convertInput is NOT called only when radio tied to drop down is
 selected.

 I think the problem has something to do with both PublicLocationRadio and
 PublicLocationDropDownChoice sharing the same model (publicLocationModel).
 Here's what is happening (in actual order) during form submit:
 -FormComponent.convertInput() called on Radio Group. at end of method
 'convertedInput' is null (THIS IS BECAUSE SELECTED PublicLocationRadio's
 model object is null)
 -FormComponent.convertInput() called on PublicLocationDropDown. convertInput
 is corrrectly updated to new PublicEventLocation model object
 -FromComponent.convertInput() is NOT called at all. As the matter of fact,
 FCP is NOT visited with ValidationVisitor created inside
 Form.validateComponents()


 So, I clearly made a wrong assumption that DropDownChoice would be evaluated
 before PublicLocationRadio. I thought dropdown would update
 publicLocationModel to own selected value and when RadioGroup's convertValue
 calls publicLocationradio.getModelObject(), publicLocationModel would return
 newly updated model object.

 But I still do not understand why FCP's is not visited in
 Form.validateComponents() or its' convertInput method called.

 my RadioGroup is setRequired(true) and yet, because of the above problem,
 its' convertInput is set to null. Would that be the reason why FCP is not
 visited?

 thanks,


 -
 
 Nikita Tovstoles
 vside.com
 

 --
 View this message in context: 
 http://www.nabble.com/Custom-Radio-component-with-children--tp19804341p19864220.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Prevent component markup regeneration in ajax call

2008-10-07 Thread Adriano dos Santos Fernandes

Timo Rantalaiho escreveu:

On Tue, 07 Oct 2008, Adriano dos Santos Fernandes wrote:
  
So my question is how I could prevent wicket from regenerate the div 
when updating a component added to an AjaxRequestTarget?



Not sure if this helps, but you can always add smaller
parts inside your div to AjaxRequestTarget.

Thanks for your comment.

My problems was I has been generating javascript on the renderHead and 
the tag was being overwritten later. I solved it generating the 
javascript in onAfterRender for ajax calls.



Adriano


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



Re: Custom Text Field...

2008-10-07 Thread Steve Thompson
Timo -

Thanks for your response.

I did use a PatternValidator alone in my first approach, but while I
could verify that '123-45-6789' was a legitimate SSN, what I wanted to
additionally do was fill in my model object's string with '123456789'.
 Now, if the setSsn() in the model object needs to incorporate this
behavior, I can live with that, but I thought it would be cleaner to
convert to/from the model using a custom converter.

Here is the full text (sans imports) of the SsnTextField:

public class SsnTextFieldT extends TextFieldT
{
static Pattern pattern = Pattern.compile((\\d{3})[ \\-]*(\\d{2})[
\\-]*(\\d{4}));
public SsnTextField(String id)
{
this(id, null);
}

public SsnTextField(String id, IModelT object)
{
super(id, object);
add(new PatternValidator(pattern));
}

@Override
public final IConverterString getConverter(Class type)
{
return new IConverterString()
{

public String convertToObject(String value, Locale 
locale)
{
String result = ;
result = value.substring(0, 3) + - + 
value.substring(3, 5) + -
+ value.substring(5, 8);
return result;
}

public String convertToString(String value, Locale 
locale)
{
String result = ;
Matcher fit = pattern.matcher(value);
if(fit.find())
for(int index = 1; index = fit.groupCount(); index++)
result += fit.group(index);
return result;
}

};
}

}


On 10/7/08, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Tue, 07 Oct 2008, Steve Thompson wrote:
 I'm attempting to create a custom validator for social security number
 strings.  I've got the following code for this:
 ...
  public final IConverterString getConverter(Class type)

 Are you overriding getConverter?

 For custom validation, your better off using validators
 rather than converter for that. Check out the form
 validation examples.

 Basically your approach should work as well, it's just
 weird design to do validation in conversion, especially as
 your IConverter returns Strings and not ready-made
 SocialSecurityNumbers. But we'd need to see more code to be
 able to help debugging it. Make sure that your form
 component gets submitted.

 Best wishes,
 Timo


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



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



Call the server from a javascript function

2008-10-07 Thread Adriano dos Santos Fernandes
I need to call the server side from a javascript (generated by a 
component) function. Kind of Link/AjaxLink onClick, but instead of have 
it attached to a DOM event, I need to generate the javascript function 
that does the job.


Could you point me out how I could do it?


Adriano


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



Re: Custom Text Field...

2008-10-07 Thread Igor Vaynberg
converters are not used for string-string conversion because the
input is already a string.

-igor

On Tue, Oct 7, 2008 at 10:19 AM, Steve Thompson [EMAIL PROTECTED] wrote:
 Hi,

 I'm attempting to create a custom validator for social security number
 strings.  I've got the following code for this:

static Pattern pattern = Pattern.compile((\\d{3})[ \\-]*(\\d{2})[
 \\-]*(\\d{4}));

public final IConverterString getConverter(Class type)
{
return new IConverterString()
{

public String convertToObject(String value, Locale 
 locale)
{
String result = ;
result = value.substring(0, 3) + - + 
 value.substring(3, 5) + -
 + value.substring(5, 8);
return result;
}

public String convertToString(String value, Locale 
 locale)
{
String result = ;
Matcher fit = pattern.matcher(value);
if(fit.find())
for(int index = 1; index = fit.groupCount(); index++)
result += fit.group(index);
return result;
}

};
}

 When I use this with a text field, I can intercept the calls to
 convertToString.  However, convertToObject never seems to be getting
 called.  Is there something that I am doing wrong/not understanding?

 Thanks and best regards,


 Steve

 --

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



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



Re: onmouseover image

2008-10-07 Thread Jeremy Thomerson
This doesn't preload the images, but it is a simple way to do a Mouseover.
You could easily add a header contributor within the constructor of this
class that outputs some javascript to preload the images.

public class MouseoverImage extends Image {
 private static final long serialVersionUID = 1L;

 private final ResourceReference mImage;
 private final ResourceReference mMouseoverImage;

 public MouseoverImage(String id, ResourceReference image, ResourceReference
mouseoverImage) {
  super(id, image);
  mImage = image;
  mMouseoverImage = mouseoverImage;
  add(new AttributeModifier(onmouseover, null, true, new
LoadableDetachableModelString() {
   private static final long serialVersionUID = 1L;
   @Override
   protected String load() {
return this.src=' + urlFor(mMouseoverImage) + ';;
   }

  }));
  add(new AttributeModifier(onmouseout, null, true, new
LoadableDetachableModelString() {
   private static final long serialVersionUID = 1L;
   @Override
   protected String load() {
return this.src=' + urlFor(mImage) + ';;
   }

  }));
 }
}

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

On Wed, Sep 24, 2008 at 2:04 AM, Tim Squires [EMAIL PROTECTED] wrote:

 Thanks Alastair, that's a good idea. AjaxEventBehavior would give the
 effect but with a round trip to the server.  It would be nice to have a
 javascript only onmouseover where the images are pre-loaded.

 I'm currently using the wicketstuff-dojo onmouseover-highlight, which is
 good enough for now.


 http://wicketstuff.org/wicketdojo13/?wicket:bookmarkablePage=%3Aorg.wicketstuff.dojo.examples.lfx.DojoFXTestPage

 Thanks again,
 Tim

  Have a look at AjaxEventBehavior. You can either combine this with an
  Image
  component or add an AttributeModifier and manually tweak the img's src
  attribute.
 
  Alastair
 
  2008/9/19 Tim Squires [EMAIL PROTECTED]
 
  Hi All,
 
  Before I go and write my own component to change the src of an img
  onouseover, I just wanted to make sure that there is no standard
  component.  I don't want to re-invent the wheel.
 
  Is there a standard component for changing the Image or ImageButton
  image
  onmouseover?
 
  Thanks,
  Tim
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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




Way to handle a URL/GET without a Page?

2008-10-07 Thread metalotus

Hi,

Must a URL be handled by a Page object? Is there another option? 

For exmaple, I want to call a URL from browser-side javascript and then on
server-side go through the wicket request cycle, do some work, change some
state, and write to the response. But I am worried about using Page to
handle the URL since I don't want to mess up navigation forward/back, etc.

Is this related to the concept of a stateless page? I'm fuzzy on that.

Thanks, James
-- 
View this message in context: 
http://www.nabble.com/Way-to-handle-a-URL-GET-without-a-Page--tp19867286p19867286.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Way to handle a URL/GET without a Page?

2008-10-07 Thread Jeremy Thomerson
Typically this would be handled with Ajax behaviors.  They are written for
this purpose.


On Tue, Oct 7, 2008 at 4:06 PM, metalotus [EMAIL PROTECTED] wrote:


 Hi,

 Must a URL be handled by a Page object? Is there another option?

 For exmaple, I want to call a URL from browser-side javascript and then on
 server-side go through the wicket request cycle, do some work, change some
 state, and write to the response. But I am worried about using Page to
 handle the URL since I don't want to mess up navigation forward/back, etc.

 Is this related to the concept of a stateless page? I'm fuzzy on that.

 Thanks, James
 --
 View this message in context:
 http://www.nabble.com/Way-to-handle-a-URL-GET-without-a-Page--tp19867286p19867286.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




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


Submit a form automatically after N seconds

2008-10-07 Thread Edgar Merino
Hello, I've been trying to add this functionality to a component, after 
(say) 120 seconds I want to submit the form automatically (via ajax) in 
order to create a backup of the information hold at that time by the 
component. I've been looking at ajaxformsubmitbehavior but I don't see 
how to make this work with what I need. I think an 
abstractajaxtimerbehavior is what I need here but I need to know how to 
submit the form in the onTimer method.


Thanks in advance.
Edgar Merino

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



Re: Submit a form automatically after N seconds

2008-10-07 Thread Jeremy Thomerson
I have not tried this, and there are probably better ways, but you might be
able to:

- create a subclass of AbstractAjaxTimerBehavior
- override getCallbackScript and return the code that is generated by
AjaxFormSubmitBehavior#getEventHandler

This would involve copy-and-paste of some code out of
AjaxFormSubmitBehavior, but I'm not sure that's a big deal.

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

On Tue, Oct 7, 2008 at 4:58 PM, Edgar Merino [EMAIL PROTECTED] wrote:

 Hello, I've been trying to add this functionality to a component, after
 (say) 120 seconds I want to submit the form automatically (via ajax) in
 order to create a backup of the information hold at that time by the
 component. I've been looking at ajaxformsubmitbehavior but I don't see how
 to make this work with what I need. I think an abstractajaxtimerbehavior is
 what I need here but I need to know how to submit the form in the onTimer
 method.

 Thanks in advance.
 Edgar Merino

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




please review my CompoundPropertyModel use

2008-10-07 Thread dukehoops

The following code works (have unit tests) but I would appreciate a code
review from someone.

Legend
MyPojo - bean backing up form 
MyProperty - another POJO that is property of MyPojo (MyPojo has field
'myProperty' of type MyProperty)
MyFormComponent - custom form component that displays/manipulates MyProperty
(myProperty == myFormComponent.getModelObject())

In particular, I want to ensure that when MyComponent's modelObject is
updated, so is formBean's property (to be more precise, that the two
reference the same object)

//inside page:

IModel formModel = new CompoundPropertyModel(MyPojo);
Form form = new Form(form, formModel);
page.add(form);

MyFormComponent myComp = new MyFormComponent(myProperty, new
PropertyModel(formModel, myProperty));
form.add(myComp);

and constructor:
MyFormComponent(wicketId, model)
{
super(wicketId, model);
}

-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/please-review-my-CompoundPropertyModel-use-tp19868935p19868935.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: please review my CompoundPropertyModel use

2008-10-07 Thread Ned Collyer

You should be able to do

Form form = new Form(form, new CompoundPropertyModel(MyPojo));
page.add(form);

form.add(new MyFormComponent(myProperty));


See
http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels



dukehoops wrote:
 
 The following code works (have unit tests) but I would appreciate a code
 review from someone.
 
 Legend
 MyPojo - bean backing up form 
 MyProperty - another POJO that is property of MyPojo (MyPojo has field
 'myProperty' of type MyProperty)
 MyFormComponent - custom form component that displays/manipulates
 MyProperty (myProperty == myFormComponent.getModelObject())
 
 In particular, I want to ensure that when MyComponent's modelObject is
 updated, so is formBean's property (to be more precise, that the two
 reference the same object)
 
 //inside page:
 
 IModel formModel = new CompoundPropertyModel(MyPojo);
 Form form = new Form(form, formModel);
 page.add(form);
 
 MyFormComponent myComp = new MyFormComponent(myProperty, new
 PropertyModel(formModel, myProperty));
 form.add(myComp);
 
 and constructor:
 MyFormComponent(wicketId, model)
 {
 super(wicketId, model);
 }
 

-- 
View this message in context: 
http://www.nabble.com/please-review-my-CompoundPropertyModel-use-tp19868935p19870462.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: please review my CompoundPropertyModel use

2008-10-07 Thread dukehoops

I thought that as well, but turns out in that case
MyFormComponent.getModelObject() returns MyPojo, and NOT MyProperty. That
presents two problems:
-MyFormComponent does not really need to know of MyPojo to begin with (what
if MyProperty is obtained some other way)
-in MyFormComponent.convertInput, I need to eventually
setConvertedInput(MyProperty), and in onBeforeRender the corollary
getModelObject.  


Ned Collyer wrote:
 
 You should be able to do
 
 Form form = new Form(form, new CompoundPropertyModel(MyPojo));
 page.add(form);
 
 form.add(new MyFormComponent(myProperty));
 
 
 See
 http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels
 
 
 


-

Nikita Tovstoles
vside.com


-- 
View this message in context: 
http://www.nabble.com/please-review-my-CompoundPropertyModel-use-tp19868935p19870526.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wicket Training, London Dates + Voucher

2008-10-07 Thread jWeekend

Our next 4 scheduled  http://jweekend.com/dev/JW703/ intensive, 2 day Wicket
training courses  in London are on

Oct 16-17(Thu-Fri)   
Oct 18-19(Sat-Sun)   
Nov 1-2(Sat-Sun)   
Nov 13-14(Thu-Fri)

During October, users of this mailing-list should enter voucher code 
JW-Wicket-User_Fall_9!q 
into our cart for 5% discount.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 
-- 
View this message in context: 
http://www.nabble.com/Wicket-Training%2C-London-Dates-%2B-Voucher-tp19871084p19871084.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: please review my CompoundPropertyModel use

2008-10-07 Thread Ned Collyer

Perhaps I don't understand your use case.

I'm using CPM all over the shop, and letting auto CPM propagation take care
of itself.

If the property is obtained from some other way, then obviously you would
need to supply it to the form field - in the same way there are multi
constructors for most form fields.  Perhaps open the source of TextField
and piece together how that behaves.

Rgds

Ned


dukehoops wrote:
 
 I thought that as well, but turns out in that case
 MyFormComponent.getModelObject() returns MyPojo, and NOT MyProperty. That
 presents two problems:
 -MyFormComponent does not really need to know of MyPojo to begin with
 (what if MyProperty is obtained some other way)
 -in MyFormComponent.convertInput, I need to eventually
 setConvertedInput(MyProperty), and in onBeforeRender the corollary
 getModelObject.  
 

-- 
View this message in context: 
http://www.nabble.com/please-review-my-CompoundPropertyModel-use-tp19868935p19871374.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Call the server from a javascript function

2008-10-07 Thread Timo Rantalaiho
On Tue, 07 Oct 2008, Adriano dos Santos Fernandes wrote:
 I need to call the server side from a javascript (generated by a 
 component) function. Kind of Link/AjaxLink onClick, but instead of have 
 it attached to a DOM event, I need to generate the javascript function 
 that does the job.

E.g.

  myComponent.add(new AjaxEventBehavior(onblur) {
  @Override
  public void onEvent(AjaxRequestTarget target) {
  doStuff();
  }
  });

Read up on Wicket ajax, and check out the ajax examples in
wicket-examples.

Best wishes,
Timo

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

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



Re: Call the server from a javascript function

2008-10-07 Thread jWeekend

Adriano,

Create the AbstractAjaxBehaiour you want, call getCallbackUrk() on it and
use the returned URL as a parameter to wicketAjaxGet in the JavaScript
you're generating.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



asfernandes wrote:
 
 I need to call the server side from a javascript (generated by a 
 component) function. Kind of Link/AjaxLink onClick, but instead of have 
 it attached to a DOM event, I need to generate the javascript function 
 that does the job.
 
 Could you point me out how I could do it?
 
 
 Adriano
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Call-the-server-from-a-javascript-function-tp19865896p19871930.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How can I use the wicketdate-time stuff with DateTime on my model?

2008-10-07 Thread Ned Collyer

Its a requirement for me that my domain entities have DateTime.

I'd like to use wicket-datetime (as described here)
http://www.nabble.com/my-domain-model-and-Joda-Time-td15660961.html#a15660961

I can see its internals are all DateTimey which is AWESOME!!

What is the easiest / quickest way of getting this stuff to work with
DateTime in my domain model.

I'm running 1.4m1.

What I'm toying with is compiling the project and applying the patch from
http://issues.apache.org/jira/browse/WICKET-466

But I'd rather have a simpler way - eg, extend or reimplement a class.
-- 
View this message in context: 
http://www.nabble.com/How-can-I-use-the-wicketdate-time-stuff-with-DateTime-on-my-model--tp19872583p19872583.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mounting pages with trailing slash

2008-10-07 Thread Marat Radchenko
Anybody?

2008/8/29 Marat Radchenko [EMAIL PROTECTED]:
 Hi everyone!

 Is it supposed to be legal to use mount path with trailing slash?

 If yes, then I'll file a bugreport because it doesn't work [yup, I
 have a testcase]. If not, then that will be another story.


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