Re: open view session examples for a page

2008-11-07 Thread James Carman
You mean using Spring's OpenSessionInViewFilter?  If so, I've got an
example application that has all the configuration you'll need:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk/

It has stuff set up for Spring Security (formerly Acegi) also.

On Fri, Nov 7, 2008 at 5:31 PM, miro <[EMAIL PROTECTED]> wrote:
>
> any examples for open view session in a  wicket page
> --
> View this message in context: 
> http://www.nabble.com/open-view-session-examples--for-a-page-tp20389719p20389719.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]



Refreshing the form inside the ModalWindow

2008-11-07 Thread WicketUser0208



richardwilko wrote:
> 
> It still seems as though the form is trying to submit in a non-ajax way,
> as this is the same as navigating to a different url, which is why your
> modal window is asking for confirmation.
> 
> You still need prototype for the wicket version, as that is just the js
> code wrapped up in a wicket behavior.
> 
> try something like this:
> $('formId').observe('submit', function(e){ Event.stop(e);}); in your modal
> window html, where formId is the dom id of the form causing the trouble.
> 
> That should stop any non-ajax submits from the form, however a possibility
> is that the wicket code detects the submit before the other code has a
> chance to stop it, so this method may not work.
> 
> I also found this which may help you 
> http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html
> http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html
>  
> 
> Richard 
> 
> 
> ulrik wrote:
>> 
>> Hmm, it did not work for me..
>> I tried the wicket version, but it still askes me if I want to navigate
>> away from the page when I hit enter in the TextField
>> 
>> 
>> 
> 
> 


I have similar problem. In my case, I have a modal window with form inside
the modal window. When I submit the form, the form refresh doesn't occur. In
the wicket debug, it says the "form#" is not found in the document. Can any
one help me with this.

-- 
View this message in context: 
http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20389932.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]



open view session examples for a page

2008-11-07 Thread miro

any examples for open view session in a  wicket page 
-- 
View this message in context: 
http://www.nabble.com/open-view-session-examples--for-a-page-tp20389719p20389719.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: Bugs in wicket

2008-11-07 Thread Bruno Borges
What would work on IE7 to do the same thing?

Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 3:38 PM, TahitianGabriel <[EMAIL PROTECTED]> wrote:

>
> Yes it seems to have a bug with datepicker in ModalWindows with IE7 (works
> with firefox 3).
>
> In file calendar-min.js line : this.oDomContainer.innerHTML=B.join("\n")
>
> I think that "innerHTML" property is readonly in IE7.
>
>
>
> jensiator wrote:
> >
> > Hi
> > I have noticied something in wicket-datetime that might be a bug.
> > (DatePicker in a ModalWindow with IE7)
> > Where can I registrate unknown Issues and check existing Issues in the
> > wicket framework?
> > Jens
> >
>
> --
> View this message in context:
> http://www.nabble.com/Bugs-in-wicket-tp20377171p20389365.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: WicketMockServlet-filestore question

2008-11-07 Thread jchappelle

The target and the target/work folder are still getting created but I can
live with that. If you know of a quick and easy way to stop that from
happening then that would be great. Otherwise don't spend any time on it.

Thanks for your help.

Josh


igor.vaynberg wrote:
> 
> then you have to subclass your application, override newsessionstore
> and return httpsessionstore for your tests.
> 
> -igor
> 
> On Fri, Nov 7, 2008 at 10:51 AM, jchappelle <[EMAIL PROTECTED]> wrote:
>>
>> I am using version 1.3.4.
>>
>> I am creating my WicketTester by handing it my custom Application object
>> in
>> the constructor. The code I posted below is extending a BaseWicketTest
>> class
>> that I have created that has a getWicketTester() method in it.
>>
>> Thanks
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> looks like dummywebapplication, which the tester uses by default, uses
>>> HttpSessionStore which should not cause any directories to be created.
>>> what wicket version are you using?
>>>
>>> -igor
>>>
>>> On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <[EMAIL PROTECTED]> wrote:

 I have started unit testing my wicket pages using the WicketTester
 class.
 For
 now most of my tests just consist of something like this:

WicketTester tester = getWicketTester();

tester.startPage(new AdminPage());
tester.assertRenderedPage(AdminPage.class);

 For some reason every time I run a test I get a new folder under this
 path:

 target/work/WicketMockServlet-filestore

 And for each test I have a folder named something like
 _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file
 called
 pm-null with what looks like serialized objects in it.

 Is there a way to turn this off or do I need to do some cleanup in my
 junit
 tearDown method?

 Thanks

 Josh


 --
 View this message in context:
 http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20386731.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20389450.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: Bugs in wicket

2008-11-07 Thread TahitianGabriel

Yes it seems to have a bug with datepicker in ModalWindows with IE7 (works
with firefox 3).

In file calendar-min.js line : this.oDomContainer.innerHTML=B.join("\n")

I think that "innerHTML" property is readonly in IE7.



jensiator wrote:
> 
> Hi
> I have noticied something in wicket-datetime that might be a bug.
> (DatePicker in a ModalWindow with IE7)
> Where can I registrate unknown Issues and check existing Issues in the
> wicket framework?
> Jens
> 

-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20389365.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 replace 2.0's reAttach

2008-11-07 Thread Stefan Lindner
Thanks Igor!

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 7. November 2008 22:14
An: users@wicket.apache.org
Betreff: Re: how to replace 2.0's reAttach

yes

-igor

On Fri, Nov 7, 2008 at 1:10 PM, Stefan Lindner <[EMAIL PROTECTED]> wrote:
> What is the perfect way to replace the reattach method of wicket 2.0 in
> Wicket 1.4? Is it correct to replace the 2.0 expressioin
>
>myComponent.reAttach()
>
> with
>
>addOrReplace(myComponent);
>
> 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: ajax request and hibernate lazy loading

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael

Yep that was also what I were thinking.

Martijn Dashorst wrote:

I would actually keep using OSIV.

To answer the question: probably you are using models wrong. If OSIV
works for your normal requests, it works for Ajax requests. There is
nothing different between these requests.

Martijn

On Fri, Nov 7, 2008 at 1:33 PM, Bruno Borges <[EMAIL PROTECTED]> wrote:
  

With Ajax request I would probably avoid that pattern.
That could lead to serious problems.

How about having a different method to load the object with the required
data for that specific ajax request?

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 1:27 PM, miro <[EMAIL PROTECTED]> wrote:



I am using hibernate and all my collections are lazy  , they get loaded
only
when called . I am also using ajax to get collection property on click ,
but
i am getting Lazy loading exception  for ajax  request where I load the
collection ,  I am using
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  ,Please
help mehow to use OpenSessionInViewFilterwith ajax calls ?
--
View this message in context:
http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


  




  


--
-Wicket for love

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


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



how to replace 2.0's reAttach

2008-11-07 Thread Stefan Lindner
What is the perfect way to replace the reattach method of wicket 2.0 in
Wicket 1.4? Is it correct to replace the 2.0 expressioin

myComponent.reAttach()

with

addOrReplace(myComponent);

Stefan

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



Re: how to replace 2.0's reAttach

2008-11-07 Thread Igor Vaynberg
yes

-igor

On Fri, Nov 7, 2008 at 1:10 PM, Stefan Lindner <[EMAIL PROTECTED]> wrote:
> What is the perfect way to replace the reattach method of wicket 2.0 in
> Wicket 1.4? Is it correct to replace the 2.0 expressioin
>
>myComponent.reAttach()
>
> with
>
>addOrReplace(myComponent);
>
> 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: WicketMockServlet-filestore question

2008-11-07 Thread Igor Vaynberg
then you have to subclass your application, override newsessionstore
and return httpsessionstore for your tests.

-igor

On Fri, Nov 7, 2008 at 10:51 AM, jchappelle <[EMAIL PROTECTED]> wrote:
>
> I am using version 1.3.4.
>
> I am creating my WicketTester by handing it my custom Application object in
> the constructor. The code I posted below is extending a BaseWicketTest class
> that I have created that has a getWicketTester() method in it.
>
> Thanks
>
>
>
> igor.vaynberg wrote:
>>
>> looks like dummywebapplication, which the tester uses by default, uses
>> HttpSessionStore which should not cause any directories to be created.
>> what wicket version are you using?
>>
>> -igor
>>
>> On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <[EMAIL PROTECTED]> wrote:
>>>
>>> I have started unit testing my wicket pages using the WicketTester class.
>>> For
>>> now most of my tests just consist of something like this:
>>>
>>>WicketTester tester = getWicketTester();
>>>
>>>tester.startPage(new AdminPage());
>>>tester.assertRenderedPage(AdminPage.class);
>>>
>>> For some reason every time I run a test I get a new folder under this
>>> path:
>>>
>>> target/work/WicketMockServlet-filestore
>>>
>>> And for each test I have a folder named something like
>>> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file
>>> called
>>> pm-null with what looks like serialized objects in it.
>>>
>>> Is there a way to turn this off or do I need to do some cleanup in my
>>> junit
>>> tearDown method?
>>>
>>> Thanks
>>>
>>> Josh
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20386731.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: Wicket - Ajax(Fallback)Button and Form - possible solution to problem

2008-11-07 Thread jpswain

Jeremy,

It was getValue() that I was looking for!  I guess I didn't realize the
difference between the Model object and the Component's value.  For some
reason I thought the Model was the necessary glue between the Component and
my Java code.

Thanks for the help man!
Jamie


Jeremy Thomerson-5 wrote:
> 
> Sorry, yes.  Since you are skipping default form processing, it is also
> skipping pushing things onto the models  So, you have a couple of
> options...
> 
> Option one - get the value directly from the text field, i.e.
> 
> System.*out*.println("USERNAME WAS: " + tfUsername.getValue());
> Option two - don't use setDefaultFormProcessing(false) - only put the
> logic
> for the username check in the checkAvail button, and put all other form
> logic in the main submit button.  Then make sure that the main submit
> button
> is the primary button.  This is probably the better option.
> 
> Hope this helps.
> 
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> On Fri, Nov 7, 2008 at 1:00 AM, jpswain <[EMAIL PROTECTED]> wrote:
> 
>>
>> Jeremy,
>>
>> Thanks for checking it out!
>> Everything you said is true, except you missed one thing, the button
>> won't
>> get anything out of the field except what was last (if yet) submitted by
>> the
>> entire form to update its model.  So, in this case
>> setDefaultFormProcessing(false) definitely does Not work.  Sorry, it's
>> really my fault for not putting a println in the right spot.
>>
>> To check it out with the "stock" components, then in your
>> checkAvailButton's
>> onSubmit() add this as the last line:
>> System.out.println(">>> username=" + username);
>>
>> You'll see that it's not getting the text out of the field.  Try playing
>> around with it while watching the output there, and it'll make sense what
>> I'm talking about, I hope.
>>
>> Thanks again :),
>> Jamie
>>
>> P.S.
>> I have updated the quickstart, at the same location:
>> http://cosmiao.com/jps/wicket-quickstart.zip
>>
>>
>> Jeremy Thomerson-5 wrote:
>> >
>> > I'm not sure I understand your problem.  I quickly got it working (I
>> > think)
>> > the way you wanted using Wicket's built in classes.  Maybe I
>> misunderstood
>> > you.  Here were the steps I took:
>> >
>> >1. Took your quickstart and got it in Eclipse
>> >2. Changed FormCustom to Form
>> >3. Changed AjaxFallbackButtonCustom to AjaxFallbackButton
>> >4. added .setDefaultFormProcessing(false) on the checkAvailButton
>> >5. PROFIT!
>> >
>> > Below, I have pasted the updated HomePage class.  Please let me know if
>> I
>> > didn't understand - but when I run it, it only calls the onSubmit of
>> the
>> > checkAvailButton.  Then, when I click the submitButton, it does both
>> > submit
>> > button and form onSubmit.
>> >
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> --
>> View this message in context:
>> http://www.nabble.com/Wicket---Ajax%28Fallback%29Button-and-Form---possible-solution-to-problem-tp20373644p20375622.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket---Ajax%28Fallback%29Button-and-Form---possible-solution-to-problem-tp20373644p20388569.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: ajax request and hibernate lazy loading

2008-11-07 Thread miro

You are right this is  not related to ajax  and more of hibernate .
here is my object hirearchy

 EaBatchInfo   has many EaBatchAuditInfo 


In the page constructor I load List of EaBatchInfo and render my page 
.By default I   pull the first index from list to display  EaBatchAuditInfo  
from EaBatchInfo.
now  when user wants to  see second   EaBatchInfo.EaBatchAuditInfo  he
clicks on  second EaBatchInfo  in  onclick method I try to get
EaBatchAuditInfo  for second EaBatchInfo  and here i get lazy loading  
exception becasue   the session was closed when rendering my page first time 
and the new session created dosent have  list of  EaBatchInfo so one
solution is to have OpenSeissionView  pattern  in my page construction and
desctruction ,  are there any example of open view session pattern for a
wicket page lifetime ?
 

Martijn Dashorst wrote:
> 
> I would actually keep using OSIV.
> 
> To answer the question: probably you are using models wrong. If OSIV
> works for your normal requests, it works for Ajax requests. There is
> nothing different between these requests.
> 
> Martijn
> 
> On Fri, Nov 7, 2008 at 1:33 PM, Bruno Borges <[EMAIL PROTECTED]>
> wrote:
>> With Ajax request I would probably avoid that pattern.
>> That could lead to serious problems.
>>
>> How about having a different method to load the object with the required
>> data for that specific ajax request?
>>
>> cheers,
>> Bruno Borges
>> blog.brunoborges.com.br
>> +55 21 76727099
>>
>> "The glory of great men should always be
>> measured by the means they have used to
>> acquire it."
>> - Francois de La Rochefoucauld
>>
>>
>> On Fri, Nov 7, 2008 at 1:27 PM, miro <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I am using hibernate and all my collections are lazy  , they get loaded
>>> only
>>> when called . I am also using ajax to get collection property on click ,
>>> but
>>> i am getting Lazy loading exception  for ajax  request where I load the
>>> collection ,  I am using
>>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter 
>>> ,Please
>>> help mehow to use OpenSessionInViewFilterwith ajax calls ?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.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]
>>>
>>>
>>
> 
> 
> 
> -- 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20388432.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: ajax request and hibernate lazy loading

2008-11-07 Thread Martijn Dashorst
I would actually keep using OSIV.

To answer the question: probably you are using models wrong. If OSIV
works for your normal requests, it works for Ajax requests. There is
nothing different between these requests.

Martijn

On Fri, Nov 7, 2008 at 1:33 PM, Bruno Borges <[EMAIL PROTECTED]> wrote:
> With Ajax request I would probably avoid that pattern.
> That could lead to serious problems.
>
> How about having a different method to load the object with the required
> data for that specific ajax request?
>
> cheers,
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
> On Fri, Nov 7, 2008 at 1:27 PM, miro <[EMAIL PROTECTED]> wrote:
>
>>
>> I am using hibernate and all my collections are lazy  , they get loaded
>> only
>> when called . I am also using ajax to get collection property on click ,
>> but
>> i am getting Lazy loading exception  for ajax  request where I load the
>> collection ,  I am using
>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  ,Please
>> help mehow to use OpenSessionInViewFilterwith ajax calls ?
>> --
>> View this message in context:
>> http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.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]
>>
>>
>



-- 
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: ajax request and hibernate lazy loading

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael

Should'nt he just use a detachable model?

Bruno Borges wrote:

With Ajax request I would probably avoid that pattern.
That could lead to serious problems.

How about having a different method to load the object with the required
data for that specific ajax request?

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 1:27 PM, miro <[EMAIL PROTECTED]> wrote:

  

I am using hibernate and all my collections are lazy  , they get loaded
only
when called . I am also using ajax to get collection property on click ,
but
i am getting Lazy loading exception  for ajax  request where I load the
collection ,  I am using
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  ,Please
help mehow to use OpenSessionInViewFilterwith ajax calls ?
--
View this message in context:
http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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





  


--
-Wicket for love

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


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



ajax request and hibernate lazy loading

2008-11-07 Thread miro

I am using hibernate and all my collections are lazy  , they get loaded only
when called . I am also using ajax to get collection property on click , but
i am getting Lazy loading exception  for ajax  request where I load the
collection ,  I am using
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  ,Please
help mehow to use OpenSessionInViewFilterwith ajax calls ?
-- 
View this message in context: 
http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.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: ajax request and hibernate lazy loading

2008-11-07 Thread Bruno Borges
With Ajax request I would probably avoid that pattern.
That could lead to serious problems.

How about having a different method to load the object with the required
data for that specific ajax request?

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 1:27 PM, miro <[EMAIL PROTECTED]> wrote:

>
> I am using hibernate and all my collections are lazy  , they get loaded
> only
> when called . I am also using ajax to get collection property on click ,
> but
> i am getting Lazy loading exception  for ajax  request where I load the
> collection ,  I am using
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  ,Please
> help mehow to use OpenSessionInViewFilterwith ajax calls ?
> --
> View this message in context:
> http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.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: Top-level classpath Resources

2008-11-07 Thread Adriano dos Santos Fernandes

Bruno Borges escreveu:

By the way, Adriano, there's a Wicket Portuguese community around there...
If you want to join us, please feel free. groups.google.com/wicket-ptbr
  

Yup. I'm there too. :-)


Adriano


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



Re: Top-level classpath Resources

2008-11-07 Thread Adriano dos Santos Fernandes

Jeremy Thomerson escreveu:

If I understand correctly, you want to basically include your resources
relative to the default package rather than in a subpackage.  If this is
true, you could create an empty no-op class like SomeClassNameThatMakesSense
in the default package.  Then you could do new
ResourceReference(SomeClassNameThatMakesSense.class,
"you/build/button/").  Of course, you would need to move the yui folder
to the default package as well.
Yes, but unfortunately Java doesn't like it: 
http://osdir.com/ml/windows.devel.java.advanced/2006-11/msg00035.html.



Adriano


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



Re: WicketMockServlet-filestore question

2008-11-07 Thread jchappelle

I am using version 1.3.4.

I am creating my WicketTester by handing it my custom Application object in
the constructor. The code I posted below is extending a BaseWicketTest class
that I have created that has a getWicketTester() method in it. 

Thanks



igor.vaynberg wrote:
> 
> looks like dummywebapplication, which the tester uses by default, uses
> HttpSessionStore which should not cause any directories to be created.
> what wicket version are you using?
> 
> -igor
> 
> On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <[EMAIL PROTECTED]> wrote:
>>
>> I have started unit testing my wicket pages using the WicketTester class.
>> For
>> now most of my tests just consist of something like this:
>>
>>WicketTester tester = getWicketTester();
>>
>>tester.startPage(new AdminPage());
>>tester.assertRenderedPage(AdminPage.class);
>>
>> For some reason every time I run a test I get a new folder under this
>> path:
>>
>> target/work/WicketMockServlet-filestore
>>
>> And for each test I have a folder named something like
>> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file
>> called
>> pm-null with what looks like serialized objects in it.
>>
>> Is there a way to turn this off or do I need to do some cleanup in my
>> junit
>> tearDown method?
>>
>> Thanks
>>
>> Josh
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20386731.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: WicketMockServlet-filestore question

2008-11-07 Thread Igor Vaynberg
looks like dummywebapplication, which the tester uses by default, uses
HttpSessionStore which should not cause any directories to be created.
what wicket version are you using?

-igor

On Fri, Nov 7, 2008 at 9:04 AM, jchappelle <[EMAIL PROTECTED]> wrote:
>
> I have started unit testing my wicket pages using the WicketTester class. For
> now most of my tests just consist of something like this:
>
>WicketTester tester = getWicketTester();
>
>tester.startPage(new AdminPage());
>tester.assertRenderedPage(AdminPage.class);
>
> For some reason every time I run a test I get a new folder under this path:
>
> target/work/WicketMockServlet-filestore
>
> And for each test I have a folder named something like
> _d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file called
> pm-null with what looks like serialized objects in it.
>
> Is there a way to turn this off or do I need to do some cleanup in my junit
> tearDown method?
>
> Thanks
>
> Josh
>
>
> --
> View this message in context: 
> http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.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: Top-level classpath Resources

2008-11-07 Thread Bruno Borges
Sorry, the correct address is:
http://groups.google.com/group/wicket-ptbr

Cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 12:41 PM, Bruno Borges <[EMAIL PROTECTED]>wrote:

> By the way, Adriano, there's a Wicket Portuguese community around there...
> If you want to join us, please feel free. groups.google.com/wicket-ptbr
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
>
> On Fri, Nov 7, 2008 at 12:34 PM, Jeremy Thomerson <
> [EMAIL PROTECTED]> wrote:
>
>> If I understand correctly, you want to basically include your resources
>> relative to the default package rather than in a subpackage.  If this is
>> true, you could create an empty no-op class like
>> SomeClassNameThatMakesSense
>> in the default package.  Then you could do new
>> ResourceReference(SomeClassNameThatMakesSense.class,
>> "you/build/button/").  Of course, you would need to move the yui
>> folder
>> to the default package as well.
>>
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>> On Fri, Nov 7, 2008 at 12:30 PM, Adriano dos Santos Fernandes <
>> [EMAIL PROTECTED]> wrote:
>>
>> > Hi!
>> >
>> > With this:
>> >   component.add(HeaderContributor.forCss(YuiButtonBehavior.class,
>> >   "yui/build/button/assets/skins/sam/button.css"));
>> >
>> > I need to put yui directory inside the directory of YuiButtonBehavior.
>> >
>> > How could I make yui a top directoy, i.e., just inside the resources (on
>> > the classpath)? I tried:
>> >   component.add(HeaderContributor.forCss(new ResourceReference(
>> >   "yui/build/button/assets/skins/sam/button.css")));
>> >
>> > But it don't work.
>> >
>> > Thanks,
>> >
>> >
>> > Adriano
>> >
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>
>


Re: Top-level classpath Resources

2008-11-07 Thread Bruno Borges
By the way, Adriano, there's a Wicket Portuguese community around there...
If you want to join us, please feel free. groups.google.com/wicket-ptbr
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 12:34 PM, Jeremy Thomerson <[EMAIL PROTECTED]
> wrote:

> If I understand correctly, you want to basically include your resources
> relative to the default package rather than in a subpackage.  If this is
> true, you could create an empty no-op class like
> SomeClassNameThatMakesSense
> in the default package.  Then you could do new
> ResourceReference(SomeClassNameThatMakesSense.class,
> "you/build/button/").  Of course, you would need to move the yui folder
> to the default package as well.
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
> On Fri, Nov 7, 2008 at 12:30 PM, Adriano dos Santos Fernandes <
> [EMAIL PROTECTED]> wrote:
>
> > Hi!
> >
> > With this:
> >   component.add(HeaderContributor.forCss(YuiButtonBehavior.class,
> >   "yui/build/button/assets/skins/sam/button.css"));
> >
> > I need to put yui directory inside the directory of YuiButtonBehavior.
> >
> > How could I make yui a top directoy, i.e., just inside the resources (on
> > the classpath)? I tried:
> >   component.add(HeaderContributor.forCss(new ResourceReference(
> >   "yui/build/button/assets/skins/sam/button.css")));
> >
> > But it don't work.
> >
> > Thanks,
> >
> >
> > Adriano
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: Are pages stored in session?

2008-11-07 Thread Bruno Borges
Ok, forget about it... Components are NOT Thread safe... :-)

Just make FAQPage a Stateless WebPage... ;-)

Cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 12:30 PM, Bruno Borges <[EMAIL PROTECTED]>wrote:

> Let say your FAQPage loads data from the database.
>
> You could put an instance of that page at your MyWicketApplication. Like
> this:
>
> MyApp extends WebApplication {
>
> private FAQPage faqPage;
> public FAQPage getFAQPage() {
>   return faqPage;
> }
>
> protected void init()  {
>   reloadFAQPage(); // creates an instance, etc...
> }
>
> public void reloadFAQPage() {
>... // reloads data from database after changing something at the
> FAQ DB Table, or something like that
> }
> }
>
> And then you just need to do a new Link referencing that instance. :)
>
> cheers,
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
>
> On Fri, Nov 7, 2008 at 12:26 PM, Jeremy Thomerson <
> [EMAIL PROTECTED]> wrote:
>
>> Is there dynamic content in this page?  If not, there's no real loss in
>> creating a new one for each request - this is very inexpensive.  If there
>> is, just cache it somewhere in your service layer or the application,
>> etc...
>> Components (including pages) should generally not be reused for multiple
>> users / sessions
>>
>> Also - you can save some code by using new
>> BookmarkablePageLink("faqPageLink", FAQPage.class)
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>> On Fri, Nov 7, 2008 at 12:18 PM, danelav <[EMAIL PROTECTED]>
>> wrote:
>>
>> >
>> > I have a very basic link to a FAQPage, as shown below. Every time that
>> link
>> > is clicked, the FAQPage constructor is called. This page is fairly
>> static,
>> > and there's no reason for it to be re-constructed on every request. Is
>> > there
>> > a way to create the link so that it will use an existing instance of
>> > FAQPage
>> > rather than re-constructing the whole page every time the link is
>> called?
>> >
>> > faqPageLink = new Link("faqPageLink") {
>> >  public void onClick() {
>> >setResponsePage(FAQPage.class);
>> >  }
>> > };
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Are-pages-stored-in-session--tp20386141p20386141.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: Top-level classpath Resources

2008-11-07 Thread Jeremy Thomerson
If I understand correctly, you want to basically include your resources
relative to the default package rather than in a subpackage.  If this is
true, you could create an empty no-op class like SomeClassNameThatMakesSense
in the default package.  Then you could do new
ResourceReference(SomeClassNameThatMakesSense.class,
"you/build/button/").  Of course, you would need to move the yui folder
to the default package as well.


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


On Fri, Nov 7, 2008 at 12:30 PM, Adriano dos Santos Fernandes <
[EMAIL PROTECTED]> wrote:

> Hi!
>
> With this:
>   component.add(HeaderContributor.forCss(YuiButtonBehavior.class,
>   "yui/build/button/assets/skins/sam/button.css"));
>
> I need to put yui directory inside the directory of YuiButtonBehavior.
>
> How could I make yui a top directoy, i.e., just inside the resources (on
> the classpath)? I tried:
>   component.add(HeaderContributor.forCss(new ResourceReference(
>   "yui/build/button/assets/skins/sam/button.css")));
>
> But it don't work.
>
> Thanks,
>
>
> Adriano
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Are pages stored in session?

2008-11-07 Thread Bruno Borges
Let say your FAQPage loads data from the database.

You could put an instance of that page at your MyWicketApplication. Like
this:

MyApp extends WebApplication {

private FAQPage faqPage;
public FAQPage getFAQPage() {
  return faqPage;
}

protected void init()  {
  reloadFAQPage(); // creates an instance, etc...
}

public void reloadFAQPage() {
   ... // reloads data from database after changing something at the FAQ
DB Table, or something like that
}
}

And then you just need to do a new Link referencing that instance. :)

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 12:26 PM, Jeremy Thomerson <[EMAIL PROTECTED]
> wrote:

> Is there dynamic content in this page?  If not, there's no real loss in
> creating a new one for each request - this is very inexpensive.  If there
> is, just cache it somewhere in your service layer or the application,
> etc...
> Components (including pages) should generally not be reused for multiple
> users / sessions
>
> Also - you can save some code by using new
> BookmarkablePageLink("faqPageLink", FAQPage.class)
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Fri, Nov 7, 2008 at 12:18 PM, danelav <[EMAIL PROTECTED]>
> wrote:
>
> >
> > I have a very basic link to a FAQPage, as shown below. Every time that
> link
> > is clicked, the FAQPage constructor is called. This page is fairly
> static,
> > and there's no reason for it to be re-constructed on every request. Is
> > there
> > a way to create the link so that it will use an existing instance of
> > FAQPage
> > rather than re-constructing the whole page every time the link is called?
> >
> > faqPageLink = new Link("faqPageLink") {
> >  public void onClick() {
> >setResponsePage(FAQPage.class);
> >  }
> > };
> > --
> > View this message in context:
> >
> http://www.nabble.com/Are-pages-stored-in-session--tp20386141p20386141.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]
> >
> >
>


Top-level classpath Resources

2008-11-07 Thread Adriano dos Santos Fernandes

Hi!

With this:
   component.add(HeaderContributor.forCss(YuiButtonBehavior.class,
   "yui/build/button/assets/skins/sam/button.css"));

I need to put yui directory inside the directory of YuiButtonBehavior.

How could I make yui a top directoy, i.e., just inside the resources (on 
the classpath)? I tried:

   component.add(HeaderContributor.forCss(new ResourceReference(
   "yui/build/button/assets/skins/sam/button.css")));

But it don't work.

Thanks,


Adriano


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



Re: Are pages stored in session?

2008-11-07 Thread Jeremy Thomerson
Is there dynamic content in this page?  If not, there's no real loss in
creating a new one for each request - this is very inexpensive.  If there
is, just cache it somewhere in your service layer or the application, etc...
Components (including pages) should generally not be reused for multiple
users / sessions

Also - you can save some code by using new
BookmarkablePageLink("faqPageLink", FAQPage.class)

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

On Fri, Nov 7, 2008 at 12:18 PM, danelav <[EMAIL PROTECTED]> wrote:

>
> I have a very basic link to a FAQPage, as shown below. Every time that link
> is clicked, the FAQPage constructor is called. This page is fairly static,
> and there's no reason for it to be re-constructed on every request. Is
> there
> a way to create the link so that it will use an existing instance of
> FAQPage
> rather than re-constructing the whole page every time the link is called?
>
> faqPageLink = new Link("faqPageLink") {
>  public void onClick() {
>setResponsePage(FAQPage.class);
>  }
> };
> --
> View this message in context:
> http://www.nabble.com/Are-pages-stored-in-session--tp20386141p20386141.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: cannot get ContextImage/Path to create the right path

2008-11-07 Thread Igor Vaynberg
this issue has already been fixed. you can either compile trunk or
wait for m4 to go official

-igor

On Fri, Nov 7, 2008 at 9:49 AM, Trent Larson <[EMAIL PROTECTED]> wrote:
> I am trying to access different static images that aren't Wicket resources,
> though their path is set programmatically by my Wicket pages; unfortunately
> I'm seeing strange behavior.
>
> My wicket app is installed under "/myContext/wicketStuff" (with wicketFilter
> url-pattern pointing to 'wicketStuff'), but my images are found at the top
> level under "/myContext/images", eg. "images/en_US/junk.gif".  I'm trying to
> point to different ones based on Locale (rather than use the nice classpath
> resources, at least for now), so I'm trying the following:
>
> String locale = "en_US";
> add(new ContextImage("currentJunk", "images/" + locale + "/junk.gif"));
>
> ... or:
>
> add(new Image("currentJunk").add(new ContextPathGenerator("images/" + locale
> + "/junk.gif")));
>
> My HTML is simple:
> 
>
> The output is strange: it puts my path argument at the front of the URL, and
> then it adds a "/../" at the end:
>
> 
>
> This seems like a bug; why would it put stuff at the end?  Manually
> configuring the context (eg. in web.xml) seems fraught with danger.  I could
> probably work with it if it would put that at the beginning or even not put
> anything at all, and I could specify the path.
>
> I'm using version 1.4-m3
>
> I appreciate any help or even other suggestions.  Thanks!
> Trent
>

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



Re: Basic print.css question

2008-11-07 Thread Jim Pinkham
Yep - and I flunked!  :)   I feel like a doofus for missing that # vs .
basic CSS thing, but thanks to all who responded.  It's the simple stuff
that trips me up - All the 'wicket-way' anonymous classes and such - Java is
no problem for me, but the web stuff I'm still learning.

Anyway, if anyone want to see (critique) my deployed app, I'm putting it up
today at www.firstuucolumbus.org/auction It's for a fundrasing service
auction where folks sign-in and offer dinners and such, then we have a big
event to sell items.
There's an admin login that makes the inmethod grid columns editable (for
proofreading) and does all the back-end sale entry and such.
Oh,and its deployed on a slow old server.
Thanks again!
-- Jim.

On Fri, Nov 7, 2008 at 8:37 AM, Pointbreak
<[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:

> Is this a quiz?
> Your #navlist is not inside a #footer and your #noprint is not an id but
> a class.
>
> On Thu, 6 Nov 2008 19:55:37 -0500, "Jim Pinkham" <[EMAIL PROTECTED]>
> said:
> > Sorry this isn't so wicket specific, but I think I'm doing this media
> > type
> > thing correctly - what am I missing?  Here's the view-source of my wicket
> > page:
> >
> > 
> >   First Unitarian Universalist Church of Columbus Auction
> >   2009
> >   
> >   
> > 
> > 
> >   
> > FirstUU Auction  > wicket:id="year2">2009
> >
> > 
> >   
> > Home Page
> >  >
> href="?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.CatalogPage">Auction
> > Catalog
> > Event Calendar
> >  >
> href="?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.StatementPage">My
> > Statement
> >   
> > 
> > Welcome Jim Pinkham
> >
> > yadda yadda yadda.
> >
> > For some reason, when I do print-preview, I'm still seeing the  > id="navlist"> element and the last line  > "Welcome
> > ..."
> >
> > app.css and print.css are in the same folder, and print.css starts with:
> >
> > div#footer ul#navlist, #noprint
> > {
> > display: none;
> > }
> >
> > All the app.css styles are applied properly, but the display:none doesn't
> > seem to be taking effect on the class="noprint" or the ul#navlist.
> >
> > Thanks,
> > -- Jim.
>
> -
> 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]



Are pages stored in session?

2008-11-07 Thread danelav

I have a very basic link to a FAQPage, as shown below. Every time that link
is clicked, the FAQPage constructor is called. This page is fairly static,
and there's no reason for it to be re-constructed on every request. Is there
a way to create the link so that it will use an existing instance of FAQPage
rather than re-constructing the whole page every time the link is called?

faqPageLink = new Link("faqPageLink") {
  public void onClick() {
setResponsePage(FAQPage.class);
  }
};
-- 
View this message in context: 
http://www.nabble.com/Are-pages-stored-in-session--tp20386141p20386141.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: Absolute URL problem with HeaderContributor (1.3.4)

2008-11-07 Thread Maarten Bosteels
see also http://wicket.apache.org/quickstart.html

Maarten

On Fri, Nov 7, 2008 at 8:43 AM, Martin Funk <[EMAIL PROTECTED]> wrote:
> 2008/11/7 Sean Brookes <[EMAIL PROTECTED]>
>
>>
>> Thank you for your quick response igor but I don't think I understand your
>> response.  We are currently using version 1.3.4, although we are assessing
>> the impact of moving to 1.3.5 and I will certainly test it there when we
>> do.
>>
>> I'm afraid I don't know what you mean when you suggest I 'create a
>> quckstart'
>
> create the smallest possible wicket-webapp that reprocuces your issue.
> As a starter you can use wicket-quickstart:
> http://svn.apache.org/repos/asf/wicket/releases/wicket-1.3.4/jdk-1.4/wicket-quickstart/
>
> So when you post the diff, people can reproduce your issue and analyze it.
>
> mf
>
>>
>>
>> While looking into this a little further I discovered that this seems to
>> work in a file that extends WebPage but the file I am working on extends
>> Panel. I don't know if this should affect how HeaderContributor generates
>> it's path value or not but thought I would mention it.
>>
>> Sean
>>
>>
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > can you make sure its still broken in 1.3.x branch and if it is create
>> > a quickstart.
>> >
>> > -igor
>> >
>> > On Thu, Nov 6, 2008 at 3:25 PM, Sean Brookes <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I know the recommeded approach is to use relative context URLs for CSS
>> >> and
>> >> Javascript but our application places static assets on a separate server
>> >> for
>> >> performance reasons so relative paths are not an option.  From what I
>> >> understand if my path starts with "http://"; or "https://"; wicket should
>> >> respect that but it doesn't seem to be working that way for me.
>> >>
>> >> My code:
>> >>
>> >>String fullyQualifiedPath = getAssetHost() +
>> >> "/tinymce-3-2/jscripts/tiny_mce/tiny_mce.js";
>> >>add(HeaderContributor.forJavaScript(fullyQualifiedPath));
>> >>
>> >> Where 'getAssetHost()'  returns "http:///assets"  so
>> >> fullyQalifiedPath = "http://> >> host>/assets/tinymce-3-2/jscripts/tiny_mce/tiny_mce.js"
>> >>
>> >> The problem is that Wicket seems to be prepending the application
>> context
>> >> to
>> >> that value so on the client I get:
>> >> "http:///web/app/http://> >> host>/assets/tinymce-3-2/jscripts/tiny_mce/tiny_mce.js"
>> >>
>> >> Can someone shed some light on this for me?
>> >>
>> >> cheers,
>> >> Sean
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Absolute-URL-problem-with-HeaderContributor-%281.3.4%29-tp20371914p20371914.html
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > -
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Absolute-URL-problem-with-HeaderContributor-%281.3.4%29-tp20371914p20372681.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: File Chooser dialog needed

2008-11-07 Thread Jeremy Thomerson
You simply can't do this in web apps.  You don't choose where to write
something to - you don't have access to write anything to the user's
computer.  All you can do is give the user a file to download, and the
browser will automatically ask them for what folder they want to save it
to.  For this, search Nabble or Google for "DownloadLink".

Give the user a link (DownloadLink) to a file.  They click it.  The browser
opens your dialog for you.


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

On Fri, Nov 7, 2008 at 11:48 AM, Shyam Narayanan <
[EMAIL PROTECTED]> wrote:

> Thanks for your reply.
>
> My main aim of this task is to download an item into the directory user
> selects.
>
> So need to open a file dialog to help user choose a directory and then from
> it get the path user chose, so as to proceed with my
> download.
>
> So as you can imagine for this, i have a browse kindoff button for user to
> chose a directory and as it closes, need to display the path selected in a
> text field.
> The button as well as textfield stand on a wicket page. Just the action of
> opening a file browser is what i want.
>
> I am very new to wicket. Could you pls explain more on what i would have to
> do to open such a dialog nd then get the path selected ?
>
> A code example would be appreciated.
>
> Thanks
> 
> From: Jeremy Thomerson [EMAIL PROTECTED]
> Sent: Friday, November 07, 2008 9:01 PM
> To: users@wicket.apache.org; [EMAIL PROTECTED]
> Subject: Re: File Chooser dialog needed
>
> Swing classes are not in the same heirarchy as Wicket's and the two are not
> made to work together.  What you need is to add an  /> and a FileUpload (Wicket class).  However, you can't have a user just
> select a directory from their browser - this is a limitation of web apps.
> Besides, what could you possibly do with that directory path once you had
> it?  You don't have access to their local computer
>
> Depending on what you're doing, if you really had to do something with a
> directory, you may have to  use an applet
> .
> Hope this helps.
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Fri, Nov 7, 2008 at 5:04 AM, 123shyam <[EMAIL PROTECTED]>
> wrote:
>
> >
> > Hello,
> >
> > I am working on wicket. I need to open a filechooser dialog or a file
> open
> > =
> > dialog (like we have in JFileChooser).
> >
> > I am currently unable to implement it from my wicket page. All I want is
> a
> > =
> > file chooser dialog showing only directories , user chooses nd I get back
> > t=
> > he path selected.
> >
> > I tried to call a JFielChosser (sinwg) thorught wicket but there seems to
> > b=
> > e some problem, the dialog cmes in a different location first time and in
> > t=
> > he center of the 2nd time onwards, I guess the modality is wrong. The
> > JFile=
> > Chooser needs a Component object type as its parent. But I am unable to
> > pas=
> > s it from thewicket class. It cannot be cast to a Component or Window.
> > Kindly help me out on this.
> >
> > Thanks,
> > Shyam
> > --
> > View this message in context:
> >
> http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.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]
> >
> >
>
> This message (including attachment if any) is confidential and may be
> privileged. If you have received this message by mistake please notify the
> sender by return e-mail and delete this message from your system. Any
> unauthorized use or dissemination of this message in whole or in part is
> strictly prohibited. E-mail may contain viruses. Before opening attachments
> please check them for viruses and defects. While MindTree Limited (MindTree)
> has put in place checks to minimize the risks, MindTree will not be
> responsible for any viruses or defects or any forwarded attachments
> emanating either from within MindTree or outside.
>
> Please note that e-mails are susceptible to change and MindTree shall not
> be liable for any improper, untimely or incomplete transmission.
>
> MindTree reserves the right to monitor and review the content of all
> messages sent to or from MindTree e-mail address. Messages sent to or from
> this e-mail address may be stored on the MindTree e-mail system or else
> where.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Is there a way to trigger the suggestion list of an AutoCompleteTextField by clicking another button

2008-11-07 Thread Stachow, Darius
Hi,

 

I'm using Wicket 1.3.4 and I have a question regarding the
AutoCompleteTextField. 

 

You can let the suggestion list pop up by pressing keys inside the text
field. 

That works fine but I need to trigger the suggestion list additionally
through another component that in my case would be an image (button).

The image button will be placed next to the text field and a click on it
should open the suggestion list of the autocomplete text field.

I already tried to find a way to realize that but I had no success so
far :-(

 

Is there a way to do this?

 

Many thanks in advance!

 

Best regards

Darius Stachow

 



cannot get ContextImage/Path to create the right path

2008-11-07 Thread Trent Larson
I am trying to access different static images that aren't Wicket resources,
though their path is set programmatically by my Wicket pages; unfortunately
I'm seeing strange behavior.

My wicket app is installed under "/myContext/wicketStuff" (with wicketFilter
url-pattern pointing to 'wicketStuff'), but my images are found at the top
level under "/myContext/images", eg. "images/en_US/junk.gif".  I'm trying to
point to different ones based on Locale (rather than use the nice classpath
resources, at least for now), so I'm trying the following:

String locale = "en_US";
add(new ContextImage("currentJunk", "images/" + locale + "/junk.gif"));

... or:

add(new Image("currentJunk").add(new ContextPathGenerator("images/" + locale
+ "/junk.gif")));

My HTML is simple:


The output is strange: it puts my path argument at the front of the URL, and
then it adds a "/../" at the end:



This seems like a bug; why would it put stuff at the end?  Manually
configuring the context (eg. in web.xml) seems fraught with danger.  I could
probably work with it if it would put that at the beginning or even not put
anything at all, and I could specify the path.

I'm using version 1.4-m3

I appreciate any help or even other suggestions.  Thanks!
Trent


RE: File Chooser dialog needed

2008-11-07 Thread Shyam Narayanan
Thanks for your reply.

My main aim of this task is to download an item into the directory user selects.

So need to open a file dialog to help user choose a directory and then from it 
get the path user chose, so as to proceed with my
download.

So as you can imagine for this, i have a browse kindoff button for user to 
chose a directory and as it closes, need to display the path selected in a text 
field.
The button as well as textfield stand on a wicket page. Just the action of 
opening a file browser is what i want.

I am very new to wicket. Could you pls explain more on what i would have to do 
to open such a dialog nd then get the path selected ?

A code example would be appreciated.

Thanks

From: Jeremy Thomerson [EMAIL PROTECTED]
Sent: Friday, November 07, 2008 9:01 PM
To: users@wicket.apache.org; [EMAIL PROTECTED]
Subject: Re: File Chooser dialog needed

Swing classes are not in the same heirarchy as Wicket's and the two are not
made to work together.  What you need is to add an  and a FileUpload (Wicket class).  However, you can't have a user just
select a directory from their browser - this is a limitation of web apps.
Besides, what could you possibly do with that directory path once you had
it?  You don't have access to their local computer

Depending on what you're doing, if you really had to do something with a
directory, you may have to  use an applet
.
Hope this helps.


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

On Fri, Nov 7, 2008 at 5:04 AM, 123shyam <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I am working on wicket. I need to open a filechooser dialog or a file open
> =
> dialog (like we have in JFileChooser).
>
> I am currently unable to implement it from my wicket page. All I want is a
> =
> file chooser dialog showing only directories , user chooses nd I get back
> t=
> he path selected.
>
> I tried to call a JFielChosser (sinwg) thorught wicket but there seems to
> b=
> e some problem, the dialog cmes in a different location first time and in
> t=
> he center of the 2nd time onwards, I guess the modality is wrong. The
> JFile=
> Chooser needs a Component object type as its parent. But I am unable to
> pas=
> s it from thewicket class. It cannot be cast to a Component or Window.
> Kindly help me out on this.
>
> Thanks,
> Shyam
> --
> View this message in context:
> http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.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]
>
>

This message (including attachment if any) is confidential and may be 
privileged. If you have received this message by mistake please notify the 
sender by return e-mail and delete this message from your system. Any 
unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited. E-mail may contain viruses. Before opening attachments 
please check them for viruses and defects. While MindTree Limited (MindTree) 
has put in place checks to minimize the risks, MindTree will not be responsible 
for any viruses or defects or any forwarded attachments emanating either from 
within MindTree or outside.

Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.

MindTree reserves the right to monitor and review the content of all messages 
sent to or from MindTree e-mail address. Messages sent to or from this e-mail 
address may be stored on the MindTree e-mail system or else where.

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



Re: File Chooser dialog needed

2008-11-07 Thread Bruno Borges
If you really want to do that, make sure you install your web application in
each user's computer... :-)
Just to make sure the JFileChooser will actually work. And if you warn the
user about something, don't use a javascript alert. JOptionPane is your
friend here too!

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 10:22 AM, Jeremy Thomerson <[EMAIL PROTECTED]
> wrote:

> I forgot the semi-colon, too!
>
> On Fri, Nov 7, 2008 at 10:01 AM, Charlie Dobbie <[EMAIL PROTECTED]>
> wrote:
>
> > 2008/11/7 Jeremy Thomerson <[EMAIL PROTECTED]>
> >
> > > Depending on what you're doing, if you really had to do something with
> a
> > > directory, you may have to  use an applet
> > > .
> > > Hope this helps.
> >
> >
> >
> > WicketMessage: Tag '' (line 2, column 27) has a
> > mismatched close tag at '' (line 3, column 1)
> >
> > ;-)
> >
>
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>


Re: RESTful Web Services with Wicket (and XStream)

2008-11-07 Thread Bruno Borges
Check this tutorial: http://xstream.codehaus.org/json-tutorial.html

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 4:50 AM, francisco treacy <[EMAIL PROTECTED]
> wrote:

> xstream supports json output
>
> * Alternative output format. The modular design allows other output
> formats. XStream ships currently with JSON support and morphing.
>
> francisco
>
> On Fri, Nov 7, 2008 at 11:34 AM, Steve Swinsburg
> <[EMAIL PROTECTED]> wrote:
> > Still slightly on topic, but do you know of a fast and efficient way to
> > output JSON (some library like XStream perhaps) in the same method,
> rather
> > than XML?
> >
> >
> > cheers,
> > Steve
> >
> >
> >
> >
> >
> >
> > On 7 Nov 2008, at 04:05, Ned Collyer wrote:
> >
> >>
> >> As you probably are aware - this is just outputting XML using XStream.
> >> This is a one way data feed.
> >>
> >> I'm using XStream - but chose a different tech for our REST components
> >> because wicket is not RESTy.
> >>
> >> I'd be interested if you can make this 2 way web service, and support
> >> POST,
> >> GET, PUT and DELETE.  Good luck :)
> >>
> >>
> >>
> >> Bruno Borges wrote:
> >>>
> >>> I've posted on my blog about how to create quickly and simple RESTful
> >>> WebServices with Apache Wicket, using XStream to marshall XML from java
> >>> Objects.
> >>>
> >>> Take a look!
> >>>
> >>>
> >>>
> http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/RESTful-Web-Services-with-Wicket-%28and-XStream%29-tp20370109p20374470.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]
>
>


WicketMockServlet-filestore question

2008-11-07 Thread jchappelle

I have started unit testing my wicket pages using the WicketTester class. For
now most of my tests just consist of something like this:

WicketTester tester = getWicketTester();

tester.startPage(new AdminPage());
tester.assertRenderedPage(AdminPage.class);

For some reason every time I run a test I get a new folder under this path:

target/work/WicketMockServlet-filestore

And for each test I have a folder named something like
_d29c5f4_11d77e4b4d2_7ffc and inside that folder there is a text file called
pm-null with what looks like serialized objects in it.

Is there a way to turn this off or do I need to do some cleanup in my junit
tearDown method? 

Thanks

Josh


-- 
View this message in context: 
http://www.nabble.com/WicketMockServlet-filestore-question-tp20384649p20384649.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: File Chooser dialog needed

2008-11-07 Thread Jeremy Thomerson
I forgot the semi-colon, too!

On Fri, Nov 7, 2008 at 10:01 AM, Charlie Dobbie <[EMAIL PROTECTED]> wrote:

> 2008/11/7 Jeremy Thomerson <[EMAIL PROTECTED]>
>
> > Depending on what you're doing, if you really had to do something with a
> > directory, you may have to  use an applet
> > .
> > Hope this helps.
>
>
>
> WicketMessage: Tag '' (line 2, column 27) has a
> mismatched close tag at '' (line 3, column 1)
>
> ;-)
>



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


Re: File Chooser dialog needed

2008-11-07 Thread Charlie Dobbie
2008/11/7 Jeremy Thomerson <[EMAIL PROTECTED]>

> Depending on what you're doing, if you really had to do something with a
> directory, you may have to  use an applet
> .
> Hope this helps.



WicketMessage: Tag '' (line 2, column 27) has a
mismatched close tag at '' (line 3, column 1)

;-)


Re: Custom Wicket request Intercept Filter

2008-11-07 Thread Jeremy Thomerson
This sounds almost like an authorization strategy, in which case you could
catch the component (page) creation and check it there.  (

IAuthorizationStrategy.isInstantiationAuthorized

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

On Fri, Nov 7, 2008 at 6:12 AM, Joel Halbert <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'd like to be able to write something akin to a request Filter, but for
> wicket requests, specifically I'd like it to be Page aware - i.e. it was
> aware of the wicket Page class that the request was being forwarded to.
> I'd like to do some custom validation in this class and based on the
> result either continue to allow the request to hit the Page, or
> otherwise redirect to another page.
>
> What is the best pattern for applying such logic? Can i intercept wicket
> requests before the Page is invoked?
>
> Thx
> Joel
>
>
> --
> SU3 Analytics Ltd
> The Print House
> 18 Ashwin Street
> E8 3DL
> London
>
> Tel: +44 (0) 20 3051 8637
> Fax: +44 (0) 20 8196 2215
> Mob: +44 (0) 79 7431 0685
> www.su3analytics.com
>
> SU3 Analytics Ltd is a company registered in England and Wales under
> company number 06639473 at registered address 61b Oxford Gardens, London
> W10 5UJ, United Kingdom.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Wicket - Ajax(Fallback)Button and Form - possible solution to problem

2008-11-07 Thread Jeremy Thomerson
Sorry, yes.  Since you are skipping default form processing, it is also
skipping pushing things onto the models  So, you have a couple of
options...

Option one - get the value directly from the text field, i.e.

System.*out*.println("USERNAME WAS: " + tfUsername.getValue());
Option two - don't use setDefaultFormProcessing(false) - only put the logic
for the username check in the checkAvail button, and put all other form
logic in the main submit button.  Then make sure that the main submit button
is the primary button.  This is probably the better option.

Hope this helps.


-- 
Jeremy Thomerson
http://www.wickettraining.com
On Fri, Nov 7, 2008 at 1:00 AM, jpswain <[EMAIL PROTECTED]> wrote:

>
> Jeremy,
>
> Thanks for checking it out!
> Everything you said is true, except you missed one thing, the button won't
> get anything out of the field except what was last (if yet) submitted by
> the
> entire form to update its model.  So, in this case
> setDefaultFormProcessing(false) definitely does Not work.  Sorry, it's
> really my fault for not putting a println in the right spot.
>
> To check it out with the "stock" components, then in your
> checkAvailButton's
> onSubmit() add this as the last line:
> System.out.println(">>> username=" + username);
>
> You'll see that it's not getting the text out of the field.  Try playing
> around with it while watching the output there, and it'll make sense what
> I'm talking about, I hope.
>
> Thanks again :),
> Jamie
>
> P.S.
> I have updated the quickstart, at the same location:
> http://cosmiao.com/jps/wicket-quickstart.zip
>
>
> Jeremy Thomerson-5 wrote:
> >
> > I'm not sure I understand your problem.  I quickly got it working (I
> > think)
> > the way you wanted using Wicket's built in classes.  Maybe I
> misunderstood
> > you.  Here were the steps I took:
> >
> >1. Took your quickstart and got it in Eclipse
> >2. Changed FormCustom to Form
> >3. Changed AjaxFallbackButtonCustom to AjaxFallbackButton
> >4. added .setDefaultFormProcessing(false) on the checkAvailButton
> >5. PROFIT!
> >
> > Below, I have pasted the updated HomePage class.  Please let me know if I
> > didn't understand - but when I run it, it only calls the onSubmit of the
> > checkAvailButton.  Then, when I click the submitButton, it does both
> > submit
> > button and form onSubmit.
> >
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> --
> View this message in context:
> http://www.nabble.com/Wicket---Ajax%28Fallback%29Button-and-Form---possible-solution-to-problem-tp20373644p20375622.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: File Chooser dialog needed

2008-11-07 Thread Jeremy Thomerson
Swing classes are not in the same heirarchy as Wicket's and the two are not
made to work together.  What you need is to add an  and a FileUpload (Wicket class).  However, you can't have a user just
select a directory from their browser - this is a limitation of web apps.
Besides, what could you possibly do with that directory path once you had
it?  You don't have access to their local computer

Depending on what you're doing, if you really had to do something with a
directory, you may have to  use an applet
.
Hope this helps.


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

On Fri, Nov 7, 2008 at 5:04 AM, 123shyam <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I am working on wicket. I need to open a filechooser dialog or a file open
> =
> dialog (like we have in JFileChooser).
>
> I am currently unable to implement it from my wicket page. All I want is a
> =
> file chooser dialog showing only directories , user chooses nd I get back
> t=
> he path selected.
>
> I tried to call a JFielChosser (sinwg) thorught wicket but there seems to
> b=
> e some problem, the dialog cmes in a different location first time and in
> t=
> he center of the 2nd time onwards, I guess the modality is wrong. The
> JFile=
> Chooser needs a Component object type as its parent. But I am unable to
> pas=
> s it from thewicket class. It cannot be cast to a Component or Window.
> Kindly help me out on this.
>
> Thanks,
> Shyam
> --
> View this message in context:
> http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.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: Default locale / resource language problem

2008-11-07 Thread Pointbreak
You can make your own subclass of Session, and make it call setLocale in
the contructor, then override getWebSessionClass in your application
class.

On Fri, 7 Nov 2008 14:45:57 +0100, "Rutger Jansen" <[EMAIL PROTECTED]>
said:
> You were just ahead of me as I saw that the given Locale in one of my
> custom validators was en_EN.
> 
> Is there a way to force the locale of the session globaly so I don't
> have to check the session's locale on each page?
> 
> On 11/7/08, Pointbreak <[EMAIL PROTECTED]> wrote:
> > You have to set an explicit locale for your session (call setLocale() in
> > the session) to force a language. Defaultlocale is just what it says it
> > is: a default. Your browser probably asks for englis pages (see your
> > browser settings).
> >
> > On Fri, 7 Nov 2008 14:06:46 +0100, "Rutger Jansen" <[EMAIL PROTECTED]>
> > said:
> >> Hi,
> >>
> >> I can't seem to get default error/validation messages in my own
> >> language (Dutch) even though my default Locale is correct
> >> (java.util.Locale.getDefault() = nl_NL). They keep showing up in
> >> English.
> >> Is there another place where the default converters get the
> >> localization of their messages, should I do more configuration? Can't
> >> seem to find it in the book (Wicket in action)
> >>
> >> I know how to override my own expected messages but want to be sure
> >> that any unforseen message is in the correct language as well.
> >>
> >> I tried wicket 1.3.4 and 1.3.5
> >>
> >> Rutger
> >>
> >> -
> >> 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: Default locale / resource language problem

2008-11-07 Thread Rutger Jansen
You were just ahead of me as I saw that the given Locale in one of my
custom validators was en_EN.

Is there a way to force the locale of the session globaly so I don't
have to check the session's locale on each page?

On 11/7/08, Pointbreak <[EMAIL PROTECTED]> wrote:
> You have to set an explicit locale for your session (call setLocale() in
> the session) to force a language. Defaultlocale is just what it says it
> is: a default. Your browser probably asks for englis pages (see your
> browser settings).
>
> On Fri, 7 Nov 2008 14:06:46 +0100, "Rutger Jansen" <[EMAIL PROTECTED]>
> said:
>> Hi,
>>
>> I can't seem to get default error/validation messages in my own
>> language (Dutch) even though my default Locale is correct
>> (java.util.Locale.getDefault() = nl_NL). They keep showing up in
>> English.
>> Is there another place where the default converters get the
>> localization of their messages, should I do more configuration? Can't
>> seem to find it in the book (Wicket in action)
>>
>> I know how to override my own expected messages but want to be sure
>> that any unforseen message is in the correct language as well.
>>
>> I tried wicket 1.3.4 and 1.3.5
>>
>> Rutger
>>
>> -
>> 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: Basic print.css question

2008-11-07 Thread Pointbreak
Is this a quiz?
Your #navlist is not inside a #footer and your #noprint is not an id but
a class.

On Thu, 6 Nov 2008 19:55:37 -0500, "Jim Pinkham" <[EMAIL PROTECTED]>
said:
> Sorry this isn't so wicket specific, but I think I'm doing this media
> type
> thing correctly - what am I missing?  Here's the view-source of my wicket
> page:
> 
> 
>   First Unitarian Universalist Church of Columbus Auction
>   2009
>   
>   
> 
> 
>   
> FirstUU Auction  wicket:id="year2">2009
> 
> 
>   
> Home Page
>  
> href="?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.CatalogPage">Auction
> Catalog
> Event Calendar
>  
> href="?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.StatementPage">My
> Statement
>   
> 
> Welcome Jim Pinkham
> 
> yadda yadda yadda.
> 
> For some reason, when I do print-preview, I'm still seeing the  id="navlist"> element and the last line  "Welcome
> ..."
> 
> app.css and print.css are in the same folder, and print.css starts with:
> 
> div#footer ul#navlist, #noprint
> {
> display: none;
> }
> 
> All the app.css styles are applied properly, but the display:none doesn't
> seem to be taking effect on the class="noprint" or the ul#navlist.
> 
> Thanks,
> -- Jim.

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



Re: Default locale / resource language problem

2008-11-07 Thread Pointbreak
You have to set an explicit locale for your session (call setLocale() in
the session) to force a language. Defaultlocale is just what it says it
is: a default. Your browser probably asks for englis pages (see your
browser settings).

On Fri, 7 Nov 2008 14:06:46 +0100, "Rutger Jansen" <[EMAIL PROTECTED]>
said:
> Hi,
> 
> I can't seem to get default error/validation messages in my own
> language (Dutch) even though my default Locale is correct
> (java.util.Locale.getDefault() = nl_NL). They keep showing up in
> English.
> Is there another place where the default converters get the
> localization of their messages, should I do more configuration? Can't
> seem to find it in the book (Wicket in action)
> 
> I know how to override my own expected messages but want to be sure
> that any unforseen message is in the correct language as well.
> 
> I tried wicket 1.3.4 and 1.3.5
> 
> Rutger
> 
> -
> 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]



Default locale / resource language problem

2008-11-07 Thread Rutger Jansen
Hi,

I can't seem to get default error/validation messages in my own
language (Dutch) even though my default Locale is correct
(java.util.Locale.getDefault() = nl_NL). They keep showing up in
English.
Is there another place where the default converters get the
localization of their messages, should I do more configuration? Can't
seem to find it in the book (Wicket in action)

I know how to override my own expected messages but want to be sure
that any unforseen message is in the correct language as well.

I tried wicket 1.3.4 and 1.3.5

Rutger

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



Re: LoadableDetachableModels with replicated data fed in through constructors.

2008-11-07 Thread Graeme Knight

Thanks Jeremy.

I have those conversations often - especially over silly things.

I need to go back and look at the ins and outs of serialization. I guess if
I have several private references to the same object in multiple
LoadableDetachableModels I guess the actual object itself only gets
serialized once (i.e. there are never multiple copies of it being stored
over time on disk)... Not to concerned. Just a mad moment :-) One of many
:-) More to come :-)

Cheers, Graeme. 


Jeremy Thomerson-5 wrote:
> 
> I hate to interrupt your conversation with yourself (I've had those days
> myself) :)
> 
> Basically, I would say you needn't worry so much about serializing a
> couple
> of Longs - that's the point of the LoadableDetachableModel - serializing a
> couple of Longs rather than dozens (or hundreds) of User / Customer /
> Article / WhateverYourDomainObject instances.
> 
> You can't make the private variables in your example transient - then they
> wouldn't get serialized, which means they wouldn't be available later when
> the page is deserialized and the model is supposed to reinflate itself.
> 
> Hope this helps put your mind at ease.  Get some rest.  :)
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> On Thu, Nov 6, 2008 at 9:58 PM, Graeme Knight <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> Oh - tired! Long hard days working with spaghetti in my day job and
>> lasagna
>> in my night time...
>>
>> I realized this may be a dumb question. Doesn't an object only get
>> serialized once no matter how many references would be made to it in a
>> LoadableDetatchableModel? I.e. you wouldn't get 10 userIds serialized,
>> just
>> 1... (which would be just peachy and fine).
>>
>> Thanks, Graeme. :-)
>>
>>
>> Graeme Knight wrote:
>> >
>> > Hi.
>> >
>> > I have a number of LoadableDetachableModels that are each designed to
>> > perform a task of getting data from a database. Each model is dependent
>> on
>> > a couple of pieces of information (1) an identifier about the current
>> user
>> > (2) a primary key of a parent data object. I'm trying to work out the
>> > mechanics and life cycle of the model object...
>> >
>> > So, my class might look like:
>> >
>> > public class GetAccountsModel extends LoadableDetachableModel
>> > {
>> > private Long userId;
>> > private Long parentPrimaryKey;
>> >
>> >public GetAccountsModel( Long userId, Long parentPrimaryKey )
>> >{
>> >   this.userId = userId;
>> >   this.parentPrimaryKey = parentPrimaryKey;
>> >}
>> >
>> >.. override load here .
>> > }
>> >
>> > Let's say I have ten similar LoadableDetachableModels all of which take
>> > the same parameters in the constructor, but all of which return
>> different
>> > data from the database.
>> >
>> > When I create a LoadableDetachableModel as above and call the super
>> > constructor of (for example) a ListView, the model is fed into the
>> > ListView and load is called (with the transient object being detached).
>> >
>> > The userId and primaryKey get serialized. So if I have ten similar
>> models
>> > which get different data, I am serializing the same (or very similar)
>> data
>> > 10 times, specifically the userid.
>> >
>> > If figured I could probably make the userID and primaryKey transient
>> then
>> > they would not serialize. I'm not sure if this would have a negative
>> > affect if I go to another page (i.e. current page is out of memory) and
>> > come back - what happens?
>> >
>> > Now my example above is not too bad resource wize - you may only be
>> > talking about a couple of Longs being serialized ten times (not a
>> massive
>> > hit), but what about if the objects in my LoadableDetachableModel are
>> > fairly big?
>> >
>> > Is there a way of destructing and reconstructing the model
>> automatically
>> > so I don't need to worry about this serialization of the model private
>> > data?
>> >
>> > Or... am I panicking about nothing? I may be completely
>> misunderstanding
>> > the whole concept here.
>> >
>> > Any explanation welcome - I appreciate your time reading this post.
>> >
>> > Thanks, Graeme.
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/LoadableDetachableModels-with-replicated-data-fed-in-through-constructors.-tp20374062p20374412.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/LoadableDetachableModels-with-replicated-data-fed-in-through-constructors.-tp20374062p20380030.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: TextField inside a ModalWindow problems

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael
As I can remember you have to turn the confirmation message off (the 
modal one) or something in order to make it work with ajax.


richardwilko wrote:

It still seems as though the form is trying to submit in a non-ajax way, as
this is the same as navigating to a different url, which is why your modal
window is asking for confirmation.

You still need prototype for the wicket version, as that is just the js code
wrapped up in a wicket behavior.

try something like this:
$('formId').observe('submit', function(e){ Event.stop(e);}); in your modal
window html, where formId is the dom id of the form causing the trouble.

That should stop any non-ajax submits from the form, however a possibility
is that the wicket code detects the submit before the other code has a
chance to stop it, so this method may not work.

I also found this which may help you 
http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html
http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html 

Richard 



ulrik wrote:
  

Hmm, it did not work for me..
I tried the wicket version, but it still askes me if I want to navigate
away from the page when I hit enter in the TextField







-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
  


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



Custom Wicket request Intercept Filter

2008-11-07 Thread Joel Halbert
Hi,

I'd like to be able to write something akin to a request Filter, but for
wicket requests, specifically I'd like it to be Page aware - i.e. it was
aware of the wicket Page class that the request was being forwarded to.
I'd like to do some custom validation in this class and based on the
result either continue to allow the request to hit the Page, or
otherwise redirect to another page.

What is the best pattern for applying such logic? Can i intercept wicket
requests before the Page is invoked?

Thx
Joel


-- 
SU3 Analytics Ltd 
The Print House 
18 Ashwin Street
E8 3DL 
London 

Tel: +44 (0) 20 3051 8637
Fax: +44 (0) 20 8196 2215
Mob: +44 (0) 79 7431 0685 
www.su3analytics.com 

SU3 Analytics Ltd is a company registered in England and Wales under
company number 06639473 at registered address 61b Oxford Gardens, London
W10 5UJ, United Kingdom.


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



Re: wicket terracotta integration is out

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael

Okay great, and thanks :)

richardwilko wrote:

Well the module also includes an terracotta xml config file so that
terracotta knows which internal wicket classes could be clustered, but apart
from that there is nothing else.

I don't have any example applications but an normal application can be
turned to a clustered one quite easily.  I will have a look at modifying one
of the wicket sample applications to use it as an example.

If you are unfamiliar with terracotta then i recommend reading up on it on
their website first, but its not that hard to get started.  If you are using
eclipse then they have a good eclipse plugin which can help you get started.

Richard



Nino.Martinez wrote:
  
Interesting, are it really that simple as using the terracotta page map? 
And are there any example web applications using it?


Are there any recommended settings for the tim-wicket with terracotta.. 
Im pretty unfamiliar with terracotta so im asking a bit in blind here.



regards nino

richardwilko wrote:


Hi,

Just a quick announcement that the long awaited updated wicket terracotta
integration module (tim) is out.

You can find it here: 
http://forge.terracotta.org/releases/projects/tim-wicket/

http://forge.terracotta.org/releases/projects/tim-wicket/  and further
instructions on my blog here: 
http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/

http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/
.

Feedback and bug reports would be appreciated, as i haven't had chance to
test the code on a large scale system for a while now.

Richard

-
http://www.richard-wilkinson.co.uk My blog:
http://www.richard-wilkinson.co.uk 
  
  

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







-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
  


--
-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: TextField inside a ModalWindow problems

2008-11-07 Thread richardwilko

It still seems as though the form is trying to submit in a non-ajax way, as
this is the same as navigating to a different url, which is why your modal
window is asking for confirmation.

You still need prototype for the wicket version, as that is just the js code
wrapped up in a wicket behavior.

try something like this:
$('formId').observe('submit', function(e){ Event.stop(e);}); in your modal
window html, where formId is the dom id of the form causing the trouble.

That should stop any non-ajax submits from the form, however a possibility
is that the wicket code detects the submit before the other code has a
chance to stop it, so this method may not work.

I also found this which may help you 
http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html
http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html
 

Richard 


ulrik wrote:
> 
> Hmm, it did not work for me..
> I tried the wicket version, but it still askes me if I want to navigate
> away from the page when I hit enter in the TextField
> 
> 
> 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/TextField-inside-a-ModalWindow-problems-tp20363183p20379158.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 terracotta integration is out

2008-11-07 Thread richardwilko

Well the module also includes an terracotta xml config file so that
terracotta knows which internal wicket classes could be clustered, but apart
from that there is nothing else.

I don't have any example applications but an normal application can be
turned to a clustered one quite easily.  I will have a look at modifying one
of the wicket sample applications to use it as an example.

If you are unfamiliar with terracotta then i recommend reading up on it on
their website first, but its not that hard to get started.  If you are using
eclipse then they have a good eclipse plugin which can help you get started.

Richard



Nino.Martinez wrote:
> 
> Interesting, are it really that simple as using the terracotta page map? 
> And are there any example web applications using it?
> 
> Are there any recommended settings for the tim-wicket with terracotta.. 
> Im pretty unfamiliar with terracotta so im asking a bit in blind here.
> 
> 
> regards nino
> 
> richardwilko wrote:
>> Hi,
>>
>> Just a quick announcement that the long awaited updated wicket terracotta
>> integration module (tim) is out.
>>
>> You can find it here: 
>> http://forge.terracotta.org/releases/projects/tim-wicket/
>> http://forge.terracotta.org/releases/projects/tim-wicket/  and further
>> instructions on my blog here: 
>> http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/
>> http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/
>> .
>>
>> Feedback and bug reports would be appreciated, as i haven't had chance to
>> test the code on a large scale system for a while now.
>>
>> Richard
>>
>> -
>> http://www.richard-wilkinson.co.uk My blog:
>> http://www.richard-wilkinson.co.uk 
>>   
> 
> -- 
> -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]
> 
> 
> 


-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
-- 
View this message in context: 
http://www.nabble.com/wicket-terracotta-integration-is-out-tp20362761p20378881.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: FileUpload always null

2008-11-07 Thread Steve Swinsburg
Ok this is sorted out now. Turned out the RequestFilter from Sakai was  
altering fileuploads, had to make a change there so get past it.



cheers,
Steve






On 6 Nov 2008, at 17:53, Steve Swinsburg wrote:

Ok I just thought that using the WicketServlet rather than the  
WicketFilter might have something to do with it, or the different  
filters being applied could be intercepting the form requests (not  
necessarily Sakai specific).


Setting breakpoints might be difficult as my code runs in an  
external Tomcat, rather than in anything Eclipse knows about - ie  
Eclipse doesn't do any building/deployment. And I'm not 100% down  
with the classloading of Sakai. But I'll give it a shot.


thanks





On 6 Nov 2008, at 17:38, Igor Vaynberg wrote:


im not familiar with sakai so i cant really help there. like i said,
set a breakpoint in getfileupload and see why it returns null. you  
can

also try setting a breakpoint in form.onformsubmitted() and tracing
how it is processing multipart.

-igor

On Thu, Nov 6, 2008 at 9:28 AM, Steve Swinsburg
<[EMAIL PROTECTED]> wrote:
Ok I generated a quickstart and added a form with a  
FileUploadField, it all

worked.

This made me think that it was some changes I made in the web.xml  
file for
the original webapp - I am not running it as a normal webapp, but  
rather
inside another web framework (Sakai). As such, I needed to make  
some changes
to the web.xml in order for it to register itself with Sakai. Once  
I did

this to the quickstart, uploads failed again.

Can you think of anything I have changed that would be affecting  
this? There
are other tools for Sakai written in Wicket which have fileuploads  
working,
and my web.xml is essentially the same. Could there be anything  
else that is

affecting it?

The web.xml for the quickstart is this:


http://java.sun.com/xml/ns/j2ee";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
  version="2.4">

 file-upload

 
 
 sakai.request

org.sakaiproject.util.RequestFilter
 
 
 sakai.request
 file.upload
 REQUEST
 FORWARD
 INCLUDE
 

 

 

 
 
 file.upload

org.apache.wicket.protocol.http.WicketServletservlet-class>


 
 applicationFactoryClassName

org.apache.wicket.spring.SpringWebApplicationFactoryparam-value>

 
 
 applicationBean
 uploadApplication
 
 

 
 
 file.upload
 /file-upload/*
 

 
 configuration
 development
 
 

 
 

org.sakaiproject.util.ToolListener
 
 

org.sakaiproject.util.ContextLoaderListenerlistener-class>

 



and the applicationContext.xml:



http://www.springframework.org/dtd/spring-beans.dtd";>



 
 class="com.steve.WicketApplication" />





thanks,
Steve


On 6 Nov 2008, at 16:03, Igor Vaynberg wrote:


code looks ok, interesting.

there are two things we can do: a) you can create a quickstart that
reproduces the problem
b) you can set a breakpoint in fileuploadfield#getfileupload()  
and see

why it returns null

a couple of other notes:

since you are getting fileupload yourself there is no need to  
give the

field a model
you are passing in userprofile directly into the panel, most  
likely it

needs to be a loadabledetachablemodel that can load it from the db.

-igor

On Thu, Nov 6, 2008 at 3:41 AM, Steve Swinsburg
<[EMAIL PROTECTED]> wrote:


Sure thing. Essentially, a POJO called UserProfile is a param of  
the
constructor for the form. One thing that is probably the issue  
is that I
wasn't sure how to assign an upload field to a corresponding  
attribute in

the POJO, is this even necessary?
Its so simple so at this stage its all in the constructor for  
the class:

public class ChangeProfilePicture extends Panel{



private FileUploadField uploadField;





public ChangeProfilePicture(String id, UserProfile userProfile) {
super(id);



//create model
CompoundPropertyModel userProfileModel = new
CompoundPropertyModel(userProfile);



//setup form
Form form = new Form("form", userProfileModel) {
public void onSubmit(){

//get the backing model
UserProfile userProfile = (UserProfile) this.getModelObject();

//get uploaded file, get the bytes and set into sakaiPerson.
if (uploadField != null) {
System.out.println("1 - uploadField not null");
FileUpload upload = uploadField.getFileUpload();
if(upload != null) {
System.out.println("2 - upload not null");
byte[] photoBytes = upload.getBytes();
}
}

}

};

form.setOutputMarkupId(true);
form.setMultiPart(true);



//text
Label textSelectImage = new Label("textSelectImage", new
ResourceModel("text.upload.image.file"));
form.add(textSelectImage);

//upload
uploadField = new FileUploadField("picture", new
PropertyMo

File Chooser dialog needed

2008-11-07 Thread 123shyam

Hello,

I am working on wicket. I need to open a filechooser dialog or a file open =
dialog (like we have in JFileChooser).

I am currently unable to implement it from my wicket page. All I want is a =
file chooser dialog showing only directories , user chooses nd I get back t=
he path selected.

I tried to call a JFielChosser (sinwg) thorught wicket but there seems to b=
e some problem, the dialog cmes in a different location first time and in t=
he center of the 2nd time onwards, I guess the modality is wrong. The JFile=
Chooser needs a Component object type as its parent. But I am unable to pas=
s it from thewicket class. It cannot be cast to a Component or Window.
Kindly help me out on this.

Thanks,
Shyam
-- 
View this message in context: 
http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.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: RESTful Web Services with Wicket (and XStream)

2008-11-07 Thread francisco treacy
xstream supports json output

* Alternative output format. The modular design allows other output
formats. XStream ships currently with JSON support and morphing.

francisco

On Fri, Nov 7, 2008 at 11:34 AM, Steve Swinsburg
<[EMAIL PROTECTED]> wrote:
> Still slightly on topic, but do you know of a fast and efficient way to
> output JSON (some library like XStream perhaps) in the same method, rather
> than XML?
>
>
> cheers,
> Steve
>
>
>
>
>
>
> On 7 Nov 2008, at 04:05, Ned Collyer wrote:
>
>>
>> As you probably are aware - this is just outputting XML using XStream.
>> This is a one way data feed.
>>
>> I'm using XStream - but chose a different tech for our REST components
>> because wicket is not RESTy.
>>
>> I'd be interested if you can make this 2 way web service, and support
>> POST,
>> GET, PUT and DELETE.  Good luck :)
>>
>>
>>
>> Bruno Borges wrote:
>>>
>>> I've posted on my blog about how to create quickly and simple RESTful
>>> WebServices with Apache Wicket, using XStream to marshall XML from java
>>> Objects.
>>>
>>> Take a look!
>>>
>>>
>>> http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/RESTful-Web-Services-with-Wicket-%28and-XStream%29-tp20370109p20374470.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: RESTful Web Services with Wicket (and XStream)

2008-11-07 Thread Steve Swinsburg
Still slightly on topic, but do you know of a fast and efficient way  
to output JSON (some library like XStream perhaps) in the same method,  
rather than XML?



cheers,
Steve






On 7 Nov 2008, at 04:05, Ned Collyer wrote:



As you probably are aware - this is just outputting XML using XStream.
This is a one way data feed.

I'm using XStream - but chose a different tech for our REST components
because wicket is not RESTy.

I'd be interested if you can make this 2 way web service, and  
support POST,

GET, PUT and DELETE.  Good luck :)



Bruno Borges wrote:


I've posted on my blog about how to create quickly and simple RESTful
WebServices with Apache Wicket, using XStream to marshall XML from  
java

Objects.

Take a look!

http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html



--
View this message in context: 
http://www.nabble.com/RESTful-Web-Services-with-Wicket-%28and-XStream%29-tp20370109p20374470.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]





smime.p7s
Description: S/MIME cryptographic signature


Re: XMLHttpRequest.open(...)

2008-11-07 Thread Martin Funk
Hi Wilhelmsen,

2008/11/7 Wilhelmsen Tor Iver <[EMAIL PROTECTED]>

> > that XMLHttpRequest.open(...) are disallowed if they target
> > for another domain, than the one the document is in?
> > Like disallowing cross-site calls?
>
> Yes, to avoid cross-site scripting attacks; remember Javascript has
> globally accessible objects so if cross-site scripting was allowed then
> an attacker could make a script which went through the browser's open
> documents looking for a particular library and modify that.
>
> Presumably a signed Javascript will be allowed to perform a cross-site
> connection.
>

thanks for the confirmation, this helps to understand an issue I have while
developing wicket-contrib-gmap2. It was noticed that a map can't be initally
added to a page within an ajax call. As I understand now this is because
wicket-ajax.js is evaluating the HeaderContributions needed for the GMap2
and tries to XMLHttpRequest.open(..) the google javascript file for the gmap
from google.com.
A solution is quite simpe, as we already did it. The HeaderContribution
needs to be added to the page that potentially might load a gmap using ajax
later on.

thnx,

Martin


SV: XMLHttpRequest.open(...)

2008-11-07 Thread Wilhelmsen Tor Iver
> that XMLHttpRequest.open(...) are disallowed if they target 
> for another domain, than the one the document is in?
> Like disallowing cross-site calls?

Yes, to avoid cross-site scripting attacks; remember Javascript has
globally accessible objects so if cross-site scripting was allowed then
an attacker could make a script which went through the browser's open
documents looking for a particular library and modify that.

Presumably a signed Javascript will be allowed to perform a cross-site
connection.

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



Re: Bugs in wicket

2008-11-07 Thread Michael Sparer

google for wicket jira

regards,
Michael

jensiator wrote:
> 
> Hi
> I have noticied something in wicket-datetime that might be a bug.
> (DatePicker in a ModalWindow with IE7)
> Where can I registrate unknown Issues and check existing Issues in the
> wicket framework?
> Jens
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20377250.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]



Bugs in wicket

2008-11-07 Thread jensiator

Hi
I have noticied something in wicket-datetime that might be a bug.
(DatePicker in a ModalWindow with IE7)
Where can I registrate unknown Issues and check existing Issues in the
wicket framework?
Jens
-- 
View this message in context: 
http://www.nabble.com/Bugs-in-wicket-tp20377171p20377171.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: Basic print.css question

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael
You should really install firebug and web developer on firefox. Both 
will help you figure out what wrong when you hit problems like this..


Jim Pinkham wrote:

Sorry this isn't so wicket specific, but I think I'm doing this media type
thing correctly - what am I missing?  Here's the view-source of my wicket
page:


  First Unitarian Universalist Church of Columbus Auction 2009
  
  


  
FirstUU Auction 2009


  
Home Page
Auction
Catalog
Event Calendar
My
Statement
  

Welcome Jim Pinkham

yadda yadda yadda.

For some reason, when I do print-preview, I'm still seeing the  element and the last line   


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