Re: InMethod data grid data source query question

2009-09-16 Thread Matej Knopp
I'm afraid that is not possible. The grid gives you notification
immediately when selection status changes and for that it needs to
load the items.

-Matej

On Thu, Sep 17, 2009 at 1:24 AM, Bryce Bell  wrote:
> How do you keep a data grid from querying it's data source when you check
> the check box in the header that auto checks all the rows on the page? I
> just need all the check boxes on the page checked, I do not need the data
> source queried again.
>
> Bryce
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: bookmarkable pages from scala

2009-09-16 Thread Haim Ashkenazi
OK, I think I've found it. :)

getResponsePage(Class) first links to a regular wicket url and only then
redirects to a bookmarkable one. This is why it didn't work when
invalidating the session :)

Bye

On Wed, Sep 16, 2009 at 11:10 PM, Haim Ashkenazi
wrote:

> Hi again,
>
> Now I'm really confused ...
>
> I've followed my code in the debugger and It does follow the correct path.
> so now I'm really confused. Did I misunderstood the book? what is the
> difference between setResponsePage(new HomePage()) and
> setResponsePage(HomePage.class)?
>
> Bye
>
>
> On Wed, Sep 16, 2009 at 10:18 PM, Haim Ashkenazi  > wrote:
>
>> Hi MIcheal,
>>
>> On Wed, Sep 16, 2009 at 6:52 PM, Michael Mosmann wrote:
>>
>>> Hi,
>>>
>>> After Session.invalidate everything is cleaned up..
>>> change your code from
>>>
>>> add (new SLink("gohome", {setResponsePage(classOf[HomePage])}))
>>>
>>> to
>>>
>>> add(new BookmarkablePageLing("gohome", classOf[HomePage]));
>>>
>>> and it will work..
>>>
>> Yup this indeed solve the problem :)
>>
>> I have a question though (as you can see I'm  a scala and wicket noob).
>> From reading wicket-in-action, I understood that the difference between
>> setResponsePage(new HomePage()) and setResponsePage(HomePage.class) is  that
>> the second one causes a redirect to a link like  like
>> http://localhost:8080/?wicket:bookmarkablePage=:com... instead of the
>> regular wicket url. This should also solve the "page expires" problem, isn't
>> it?
>> The session.invalidate should indeed invalidate the regular session but it
>> should accept the "bookmarkable..." link.
>>
>> BTW, following the wicket source setResponsePage(Class) is routed to
>> BookmarkablePageRequestTarget...
>>
>> Am I missing something? I still don't get why setResponsePage(new
>> HomePage()) and setResponsePage(classOf[HomePage]) gets the same result.
>>
>> Thanks for your answer. It dd solve the problem :)
>> --
>> Haim
>>
>
>
>
> --
> Haim
>



-- 
Haim


Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
No.. the field name is "rawInput":

rawInputField = FormComponent.class.getDeclaredField("rawInput");

**
Martin

2009/9/17 Sam Zilverberg :
> I'd rather use some other method than mine, because with mine the validation
> of input is done twice when uploading.
> first on the uploaded file, and then another time on the textarea when
> pressing the wizard's next button.
>
> I tried replacing my "fixup" with this one but got a big fat
> java.lang.NoSuchFieldException
> on getDeclaredField( name) line in the code.
> I got this a couple of times using different names such as
> TextArea.class.getSimpleName() and "serials" (the wicket id for the
> textarea).
>
> Any ideas on what name I should be using?
>
> heres some code and the markup for the wizard page with the upload
> form/textarea :
>
> 
>    
>        
>            
>              
>              
>                File
>                
>                 wicket:id="uploadLabel">upload
>              
>              
>            
>            
>                info
> message  
>                
>            
>        
>    
>
> i'm using  in the markup instead of  type="submit"> as per the example
> because pressing the latter button causes the whole wizard page to validate,
> including the text area which is usualy empty
> in the case of file upload.
>
> Button uploadButton = new Button("uploadButton") {
>                   �...@override
>                    public void onSubmit() {
>                        final FileUpload upload =
> fileUploadField.getFileUpload();
>                        if (upload != null) {
>                            String uploadedContent = new
> String(upload.getBytes());
>                            try {
>                                Field f =
> FormComponent.class.getDeclaredField(TextArea.class.getSimpleName());
>                                f.setAccessible(true);
>                                f.set(textArea, uploadedContent);
>                            } catch (Exception e) {
>                                e.printStackTrace();
>                            }
>                        }
>                    }
> }
>
> On Thu, Sep 17, 2009 at 12:29 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Ah.. forgot that crucial part, the reflection:
>>
>>  public static > void fakeRawInput(T
>> formComponent, String value) {
>>    try {
>>      rawInputField.set(formComponent, value);
>>     } catch (Exception e) {
>>      Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
>> access failed.", e);
>>    }
>>  }
>>
>> where
>>      rawInputField = FormComponent.class.getDeclaredField("rawInput");
>>      rawInputField.setAccessible(true);
>>
>>
>> 2009/9/17 Martin Makundi :
>> > Hi!
>> >
>> >> I currently solved this problem by "filtering" the input from the
>> uploaded
>> >> file and creating a correct object model (Set)  out of it,
>> >> then setting the modelObject of the textarea to be this filtered one.
>> >
>> > Good, so you got the upload part working.
>> >
>> > By reflection I mean that instead of setting model object you could do
>> > this, if necessary:
>> >
>> >  public static > void fakeRawInput(T
>> > formComponent, T existingComponent) {
>> >    try {
>> >      String rawInput = (String) rawInputField.get(existingComponent);
>> >      fakeRawInput(formComponent, rawInput);
>> >    } catch (Exception e) {
>> >      Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
>> > access failed.", e);
>> >    }
>> >  }
>> >
>> > In this way your modelObject state does not change as compared to:
>> >
>> >> simply using setModelObject( (Set) uploadedContent) ?
>> >
>> > But if you can change the model that's definitely cleaner.
>> >
>> > **
>> > Martin
>> >
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: same data set shows for all users

2009-09-16 Thread McIlwee, Craig
You do realize that there is a single instance of the Application, not one per 
user, right?  Your application holds an OrderDatabase and whenever a user 
enters a new date range they are altering the contents of the Map in that 
OrderDatabase.  So user A sets a date range and fetch is called, updating the 
single OrderDatabase.  User B logs in and his OrderDataProvider pulls items 
from the same OrderDatabase instance.  You need to have an instance of this per 
user in the session instead of a single instance in the application.  Or better 
would probably be to put it in the HomePage or somewhere else.

Craig
Open Roads Consulting, Inc.
757-546-3401
http://www.openroadsconsulting.com
  _  

From: jcinit [mailto:ran...@goodsmillwork.com]
To: users@wicket.apache.org
Sent: Wed, 16 Sep 2009 15:46:59 -0400
Subject: Re: same data set shows for all users


  Okay.  I'm reading about models, but no progress yet.  Abridged code
  attached.  http://www.nabble.com/file/p25479235/CodeSample.java
  CodeSample.java  
  
  
  
  jthomerson wrote:
  > 
  > You're not using models properly, but there's no way we can help without
  > seeing code.
  > 
  > --
  > Jeremy Thomerson
  > http://www.wickettraining.com
  > 
  > 
  > 
  > On Wed, Sep 9, 2009 at 4:18 PM, Randy  wrote:
  > 
  >>
  >> I have my first wicket application running which allows the user to
  >> specify
  >> a date range and see a list of items from a database.  The problem is
  >> that
  >> all users see the same set of items for the same date range.  User A
  >> enters
  >> Tuesday through Friday, and user B runs the app and sees the same data
  >> set.
  >> User B changes the range and user A sees it as well.  The app is based on
  >> the wicket repeater examples, and there are JDBC calls in the equivalent
  >> of
  >> ContactsDatabase.java.  Looking for suggestions on what to look into to
  >> give
  >> each user their own data set.(using Tomcat 6; Derby DB; Wicket 1.4; a
  >> little Wicket Stuff)
  >>
  >>
  >>
  >>
  >> -
  >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  >> For additional commands, e-mail: users-h...@wicket.apache.org
  >>
  > 
  > 
  
  -- 
  View this message in context: 
http://www.nabble.com/same-data-set-shows-for-all-users-tp25373324p25479235.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  


InMethod data grid data source query question

2009-09-16 Thread Bryce Bell
How do you keep a data grid from querying it's data source when you 
check the check box in the header that auto checks all the rows on the 
page? I just need all the check boxes on the page checked, I do not need 
the data source queried again.


Bryce

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Sam Zilverberg
I'd rather use some other method than mine, because with mine the validation
of input is done twice when uploading.
first on the uploaded file, and then another time on the textarea when
pressing the wizard's next button.

I tried replacing my "fixup" with this one but got a big fat
java.lang.NoSuchFieldException
on getDeclaredField( name) line in the code.
I got this a couple of times using different names such as
TextArea.class.getSimpleName() and "serials" (the wicket id for the
textarea).

Any ideas on what name I should be using?

heres some code and the markup for the wizard page with the upload
form/textarea :





  
  
File

upload
  
  


info
message  





i'm using  in the markup instead of  as per the example
because pressing the latter button causes the whole wizard page to validate,
including the text area which is usualy empty
in the case of file upload.

Button uploadButton = new Button("uploadButton") {
@Override
public void onSubmit() {
final FileUpload upload =
fileUploadField.getFileUpload();
if (upload != null) {
String uploadedContent = new
String(upload.getBytes());
try {
Field f =
FormComponent.class.getDeclaredField(TextArea.class.getSimpleName());
f.setAccessible(true);
f.set(textArea, uploadedContent);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}

On Thu, Sep 17, 2009 at 12:29 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Ah.. forgot that crucial part, the reflection:
>
>  public static > void fakeRawInput(T
> formComponent, String value) {
>try {
>  rawInputField.set(formComponent, value);
> } catch (Exception e) {
>  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
> access failed.", e);
>}
>  }
>
> where
>  rawInputField = FormComponent.class.getDeclaredField("rawInput");
>  rawInputField.setAccessible(true);
>
>
> 2009/9/17 Martin Makundi :
> > Hi!
> >
> >> I currently solved this problem by "filtering" the input from the
> uploaded
> >> file and creating a correct object model (Set)  out of it,
> >> then setting the modelObject of the textarea to be this filtered one.
> >
> > Good, so you got the upload part working.
> >
> > By reflection I mean that instead of setting model object you could do
> > this, if necessary:
> >
> >  public static > void fakeRawInput(T
> > formComponent, T existingComponent) {
> >try {
> >  String rawInput = (String) rawInputField.get(existingComponent);
> >  fakeRawInput(formComponent, rawInput);
> >} catch (Exception e) {
> >  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
> > access failed.", e);
> >}
> >  }
> >
> > In this way your modelObject state does not change as compared to:
> >
> >> simply using setModelObject( (Set) uploadedContent) ?
> >
> > But if you can change the model that's definitely cleaner.
> >
> > **
> > Martin
> >
>


[OT] More "Java's generic type parameters are not reified"...

2009-09-16 Thread jWeekend

Since you can NOT do

class S{S(){T t = new T();}} // broken

how would you create an object of type T somewhere in S? Think about this 
before you read on ...

At the risk of reigniting the world-famous generics debates of yesteryear, just as our noble core-developers regroup to start work on making 1.5 even better than what is already the best Java web framework, I thought I'd share the idea I suggested to one of our developers who was having a bad day with generics (for several good reasons [1][2]) a couple of months ago, in case you can make use of it somewhere, or, find an even more convoluted solution - notice the innocent looking abstract modifier! 


// not real code
// don't try this at home without adult supervision!
public abstract class FunnyFactory {
 private T instance = null;
 public T getInstance() {
   if (instance == null) {
 try {
   final ParameterizedType gsc =
 (ParameterizedType)getClass().getGenericSuperclass();
   final Class typeT = 
 (Class) gsc.getActualTypeArguments()[0];

   instance = typeT.newInstance();
 } catch (InstantiationException e) {
   e.printStackTrace();
 } catch (IllegalAccessException e) {
   e.printStackTrace();
 }
   }
   return instance; 
 }

}

...

public class CreateInstanceOfTypeParameter {
   @Test
   public void testCreateInstanceOfTypeParameter() {
   FunnyFactory factory = new FunnyFactory() {};
 factory .getInstance().x = 22;
 factory .getInstance().y = 47;
 assertEquals(new Point(22, 47), factory.getInstance());
   }
}

Regards - Cemal 
jWeekend 
OO & Java Technologies, Wicket Training and Development 
http://jWeekend.com


[1] http://gafter.blogspot.com/2006/11/reified-generics-for-java.html
[2] http://weblogs.java.net/blog/arnold/archive/2005/06/generics_consid_1.html


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
Ah.. forgot that crucial part, the reflection:

  public static > void fakeRawInput(T
formComponent, String value) {
try {
  rawInputField.set(formComponent, value);
} catch (Exception e) {
  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
access failed.", e);
}
  }

where
  rawInputField = FormComponent.class.getDeclaredField("rawInput");
  rawInputField.setAccessible(true);


2009/9/17 Martin Makundi :
> Hi!
>
>> I currently solved this problem by "filtering" the input from the uploaded
>> file and creating a correct object model (Set)  out of it,
>> then setting the modelObject of the textarea to be this filtered one.
>
> Good, so you got the upload part working.
>
> By reflection I mean that instead of setting model object you could do
> this, if necessary:
>
>  public static > void fakeRawInput(T
> formComponent, T existingComponent) {
>    try {
>      String rawInput = (String) rawInputField.get(existingComponent);
>      fakeRawInput(formComponent, rawInput);
>    } catch (Exception e) {
>      Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
> access failed.", e);
>    }
>  }
>
> In this way your modelObject state does not change as compared to:
>
>> simply using setModelObject( (Set) uploadedContent) ?
>
> But if you can change the model that's definitely cleaner.
>
> **
> Martin
>
>>
>> On Wed, Sep 16, 2009 at 11:32 PM, Martin Makundi <
>> martin.maku...@koodaripalvelut.com> wrote:
>>
>>> 1. You know how to upload file?
>>> http://www.wicket-library.com/wicket-examples/upload/single
>>> -> or ajax upload
>>>
>>> http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
>>>
>>> 2. Just put the file contents into textarea with jafa reflection.
>>>
>>> 3. AJax update the textarea:
>>> http://www.wicket-library.com/wicket-examples/ajax/clock.2
>>> -> This is timed update..but similarly just add the textarea into ajax
>>> target.
>>>
>>> **
>>> Martin
>>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
Hi!

> I currently solved this problem by "filtering" the input from the uploaded
> file and creating a correct object model (Set)  out of it,
> then setting the modelObject of the textarea to be this filtered one.

Good, so you got the upload part working.

By reflection I mean that instead of setting model object you could do
this, if necessary:

  public static > void fakeRawInput(T
formComponent, T existingComponent) {
try {
  String rawInput = (String) rawInputField.get(existingComponent);
  fakeRawInput(formComponent, rawInput);
} catch (Exception e) {
  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
access failed.", e);
}
  }

In this way your modelObject state does not change as compared to:

> simply using setModelObject( (Set) uploadedContent) ?

But if you can change the model that's definitely cleaner.

**
Martin

>
> On Wed, Sep 16, 2009 at 11:32 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> 1. You know how to upload file?
>> http://www.wicket-library.com/wicket-examples/upload/single
>> -> or ajax upload
>>
>> http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
>>
>> 2. Just put the file contents into textarea with jafa reflection.
>>
>> 3. AJax update the textarea:
>> http://www.wicket-library.com/wicket-examples/ajax/clock.2
>> -> This is timed update..but similarly just add the textarea into ajax
>> target.
>>
>> **
>> Martin
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Sam Zilverberg
thanks a lot for the help and the links!
I checked them all out, the second one (upload panel) was too complicated
for me atm.
Maybe I'l come back to it when I'l have more experience with wicket.

I liked the timed ajax behaviour example, but couldn't figure out  exactly
how it works so i could use it in my project.
??how does the behaviour know how to update the clock??

I currently solved this problem by "filtering" the input from the uploaded
file and creating a correct object model (Set)  out of it,
then setting the modelObject of the textarea to be this filtered one.

I also didn't understand what you meant by simply using reflection to put
the content of the file into the textarea,
did you mean simply using setModelObject( (Set) uploadedContent) ?

thanks again for all the help so far

On Wed, Sep 16, 2009 at 11:32 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> 1. You know how to upload file?
> http://www.wicket-library.com/wicket-examples/upload/single
> -> or ajax upload
>
> http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
>
> 2. Just put the file contents into textarea with jafa reflection.
>
> 3. AJax update the textarea:
> http://www.wicket-library.com/wicket-examples/ajax/clock.2
> -> This is timed update..but similarly just add the textarea into ajax
> target.
>
> **
> Martin
>


Re: HybridUrlCodingStrategy and CryptedUrlWebRequestCodingStrategy

2009-09-16 Thread jpswain

All you have to do is not put sensitive forms on bookmarkable pages.  The
bookmarkable pages containing forms should be things like searches, that
aren't really meaningful targets for attack.  The sensitive forms for things
like account info, transactions, etc, should be on session-relative URLs
which of course will work with CryptedUrlWebRequestCodingStrategy.

Hope this helps,
Jamie


mfs wrote:
> 
> Yet another question on the usage CryptedUrlWebRequestCodingStrategy. So
> lets say we have implemented the CryptedUrlWebRequestCodingStrategy, now
> even in that case wouldn't the following statement be true.
> 
> "All pages which are mounted through any of the
> bookmarkable-url-encoding-strategies for NICE urls would STILL be
> vulnerable to CSRF attacks? "
> 
> Though the statement wouldn't be true for forms/links or any wicket
> event/action on that page (correct me if i am wrong here).  To prevent
> that we should ensure that  :
> 
> - No such critical actions are performed in the constructor of the
> page. In other words all such actions (ideally) should be invoked via some
> events on the page itself.
> 
> Thanks in advance,
> 
> Farhan.
>  
> 

-- 
View this message in context: 
http://www.nabble.com/HybridUrlCodingStrategy-and-CryptedUrlWebRequestCodingStrategy-tp23960469p25480921.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
1. You know how to upload file?
http://www.wicket-library.com/wicket-examples/upload/single
-> or ajax upload
http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket

2. Just put the file contents into textarea with jafa reflection.

3. AJax update the textarea:
http://www.wicket-library.com/wicket-examples/ajax/clock.2
-> This is timed update..but similarly just add the textarea into ajax target.

**
Martin

2009/9/16 Sam Zilverberg :
> sounds good, but how do I do this? :)
>
>
> On Wed, Sep 16, 2009 at 9:45 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> You could ajax update the textarea after upload, with the content that
>> you want? If you do not want to set the model object then you will
>> have to fake raw input (reflection).
>>
>> **
>> Martin
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: bookmarkable pages from scala

2009-09-16 Thread Haim Ashkenazi
Hi again,

Now I'm really confused ...

I've followed my code in the debugger and It does follow the correct path.
so now I'm really confused. Did I misunderstood the book? what is the
difference between setResponsePage(new HomePage()) and
setResponsePage(HomePage.class)?

Bye

On Wed, Sep 16, 2009 at 10:18 PM, Haim Ashkenazi
wrote:

> Hi MIcheal,
>
> On Wed, Sep 16, 2009 at 6:52 PM, Michael Mosmann wrote:
>
>> Hi,
>>
>> After Session.invalidate everything is cleaned up..
>> change your code from
>>
>> add (new SLink("gohome", {setResponsePage(classOf[HomePage])}))
>>
>> to
>>
>> add(new BookmarkablePageLing("gohome", classOf[HomePage]));
>>
>> and it will work..
>>
> Yup this indeed solve the problem :)
>
> I have a question though (as you can see I'm  a scala and wicket noob).
> From reading wicket-in-action, I understood that the difference between
> setResponsePage(new HomePage()) and setResponsePage(HomePage.class) is  that
> the second one causes a redirect to a link like  like
> http://localhost:8080/?wicket:bookmarkablePage=:com... instead of the
> regular wicket url. This should also solve the "page expires" problem, isn't
> it?
> The session.invalidate should indeed invalidate the regular session but it
> should accept the "bookmarkable..." link.
>
> BTW, following the wicket source setResponsePage(Class) is routed to
> BookmarkablePageRequestTarget...
>
> Am I missing something? I still don't get why setResponsePage(new
> HomePage()) and setResponsePage(classOf[HomePage]) gets the same result.
>
> Thanks for your answer. It dd solve the problem :)
> --
> Haim
>



-- 
Haim


Re: GMap2 GOverlay.getJSConstructor() change request

2009-09-16 Thread nino martinez wael
Yeah such things should be added to the gmap2 js namespace as
functions or such.. should be possible and more clean..


2009/9/16 Martin Funk :
> 2009/9/16 Martin Funk 
>
>> Hi Doug,
>>
>> the change of getJSconstructor() from protected to public is fine by me.
>> Go ahead an commit that change.
>>
>
> argh... I withdraw and claim the opposite.
> or at least rethink it really hard.
> If the map you are reffering to already has a JavaSript-counterpart-instance
> on the client your ar most likely better of doing al that in a JavaScript on
> the client side.
>
> mf
>
>
>
>>
>> The client code you posted, I haven't analyzed in depth, but seeing all
>> that JavaScript genereated on the Server using so many String literals would
>> make me start to think if that code could somehow be moved into a custom
>> JavaScript file.
>> So instead of shoving all that JavaScript code from the server to the
>> client things could me reduced to calling a custom JavaScript function. It
>> might be mind bending, but I think its always worth a thought.
>>
>> mf
>>
>> 2009/9/16 Doug Leeper 
>>
>> I recently moved from 1.3.6 to 1.4.1 and came across a compile error.  I
>>> believe I had a local copy of GMap2 (1.3.x) and made modifications to make
>>> the following work.
>>>
>>> Now I would like to propose a change but not sure who I need to talk.
>>>  Specifically, I would like to request to change GOverlay.getJSConstructor()
>>> from protected to public (and all subsequent derived classes)
>>>
>>> I am need to send javascript back to the browser which basically rebounds
>>> the a GMap2...the following is my code snippet:
>>>
>>> 
>>>    private String getJSRebound() {
>>>        StringBuffer buf = new StringBuffer();
>>>        buf.append("var bounds = new GLatLngBounds();\n");
>>>        buf.append("var map = " + map.getJSinvoke("map"));
>>>        buf.append("bounds.extend( map.getCenter() ); \n");
>>>
>>>        int idx = 0;
>>>
>>>        for (GOverlay overlay : map.getOverlays()) {
>>>            if (overlay instanceof GMarker) {
>>>                GMarker marker = (GMarker) overlay;
>>>                GLatLng point = marker.getLatLng();
>>>                buf.append("bounds.extend( " + point.getJSconstructor()
>>>                        + " );\n");
>>>            }
>>>
>>>            if (overlay instanceof GGeoXml) {
>>>                GGeoXml xml = (GGeoXml) overlay;
>>>
>>>                String var = "xml" + idx++;
>>>
>>>                // this is broken with 1.4.1
>>>                // getJSconstructor has been made protected
>>>
>>>                buf.append("var " + var + " = " + xml.getJSconstructor()
>>>                        + "; \n");
>>>
>>>                buf.append("GEvent.addListener(" + var
>>>                        + ", 'load', function(){ \n");
>>>                buf.append("    bounds.extend( " + var
>>>                        + ".getDefaultBounds().getSouthWest() ); \n");
>>>                buf.append("    bounds.extend( " + var
>>>                        + ".getDefaultBounds().getNorthEast() ); \n");
>>>                buf.append("map.setZoom( map.getBoundsZoomLevel(bounds)
>>> );\n");
>>>                buf.append("}); \n");
>>>            }
>>>        }
>>>
>>>        if (idx == 0) {
>>>            GLatLng point = new GLatLng(location.getCentralLatitude(),
>>> location
>>>                    .getCentralLongitude(), false);
>>>            buf.append("bounds.extend( " + point.getJSconstructor() + "
>>> );\n");
>>>            buf
>>>                    .append("map.setZoom(
>>> Math.min(map.getBoundsZoomLevel(bounds),8) );\n");
>>>        } else {
>>>            buf.append("map.setZoom( map.getBoundsZoomLevel(bounds) );\n");
>>>        }
>>>        buf.append("map.setCenter( bounds.getCenter() );\n");
>>>        return buf.toString();
>>>    }
>>> 
>>>
>>> This method is called in my constructor:
>>>
>>> 
>>>    map.add(new HeaderContributor(new IHeaderContributor() {
>>>            private static final long serialVersionUID = 1L;
>>>
>>>            public void renderHead(IHeaderResponse response) {
>>>                response.renderOnDomReadyJavascript(getJSRebound());
>>>            }
>>>        }));
>>> 
>>>
>>>
>>> Without the ability to generated the JS object and keep a reference, I
>>> don't believe I can accomplish what I need to do...rebound the map within
>>> the points I have stored.  If someone has a better idea, I am all ears.  If
>>> not, the accessibliity change would greatly be appreciated.
>>>
>>> Thanks
>>> - Doug
>>
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-16 Thread nino martinez wael
You've been added..

2009/9/16 Johannes Schneider :
> Hmm. you are right. That is an important information. Sorry for missing
> that.
>
> SF.net User:
> shake234
>
>
> Johannes
>
> nino martinez wael wrote:
>>  Great Jeremy, I were about to ask the same, so Johannes please give
>> us the sf account and we will add you to the project. And thanks for
>> these updates.. :)
>>
>> regards Nino
>>
>> 2009/9/15 Jeremy Thomerson :
>>> Have you asked for commit access?  I don't see your sf.net username on the
>>> thread.  Nobody is stingy with wicketstuff commit access.  Just send your
>>> username.
>>>
>>> --
>>> Jeremy Thomerson
>>> http://www.wickettraining.com
>>>
>>>
>>>
>>> On Tue, Sep 15, 2009 at 8:12 AM, Johannes Schneider
>>> wrote:
>>>
 Come on guys. Please help me. Since there is an invalid repository
 definition no one out there will be able to use a project using
 "input-events"...
 I have the necessary patches sitting right here. I have created a Jira
 entry and I am willing to commit them if anybody gives me commit access.

 Please don't force me to release my own version. That would be just
 duplicate work done.


 Sincerly

 Johannes

 Johannes Schneider wrote:
> I have created some patches that help me a bit.
> Can be found here (found no better place).
>
> http://wicketstuff.org/jira/browse/WSMINIS-10
>
> Those are created using git. I hope the patch format is ok
>
>
> Sincerly,
>
> Johannes
>
> Johannes Schneider wrote:
>> Well, who is the One?
>>
>> Igor Vaynberg wrote:
>>> or you can request commit access and eat your own donuts :)
>>>
>>> -igor
>>>
>>> On Fri, Sep 4, 2009 at 10:43 AM, Johannes
>>> Schneider wrote:
 Hi,

 I really love the work that has been put into WicketStuff. The world
 is
 much better *with* WicketStuff.
 But unfortunately several files are outdated and many releases are
 missing.
 So at first I want to say thank you to everybody who has put work into
 that project. Then I want to motivate those with commit rights to
 update
 the projects and release some of the modules...
 I am offering some donuts ;-)


 Thanks,

 Johannes

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Sam Zilverberg
sounds good, but how do I do this? :)


On Wed, Sep 16, 2009 at 9:45 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> You could ajax update the textarea after upload, with the content that
> you want? If you do not want to set the model object then you will
> have to fake raw input (reflection).
>
> **
> Martin
>
>


Re: Update Tree Model on Ajax timer. What's wrong ?

2009-09-16 Thread Sven Meier

Hi Eric,

if Wicket's Swing tree model usage gives you a headache ...


... you should definitely take a look at 
http://code.google.com/p/wicket-tree .



Regards

Sven

Eric Bouer wrote:

Hello.
Preface: Wicket Tree is very confusing since it's some kind of hybrid between 
swing Tree model and wicket tree so please forgive me for any 
stupid/irrelevant questions.


I created a tree with a model based on database schema.I'm trying to refresh  
the tree so that it will change node names after some DB update.
I added AJAX timer to self update the tree , the ajax stuff work but it doesn't 
even try to update the model.

To create my tree I have this on my page:
tree = new TreeTable("treeTable", createTreeModel(), columns);
tree.getTreeState().setAllowSelectMultiple(true); 
tree.setOutputMarkupId(true);

add(tree);
tree.add(new AjaxSelfUpdatingTimerBehavior(Duration.ONE_SECOND) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
super.onPostProcessTarget(target);
Vector p = new Vector();
//To keep it simple. I'm only trying to update the root.
p.add(tree.getModel().getObject().getRoot()); 
TreeModelEvent event = new TreeModelEvent(tree,p.toArray());

tree.treeNodesChanged(event);
});
}
Nothing get updates.
I tried adding customized TreeModelListener however it doesn't get called at 
all.

Any idea or reference to documentation that explain this?
Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

  



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Select + SelectOptions question

2009-09-16 Thread Troy Cauble
Thanks, but that wasn't my question!  -troy

On Wed, Sep 16, 2009 at 3:20 PM, Pedro Santos  wrote:
> With Select  you have more control over the markup between the  tag
> and its children  tags
>
> From Select javadoc: Component that represents a  box. Elements are
> provided by one or more SelectChoice or SelectOptions components in the
> hierarchy below the Select component. Advantages to the standard choice
> components is that the user has a lot more control over the markup between
> the  tag and its children  tags: allowing for such things as
>  tags.
>
> On Wed, Sep 16, 2009 at 4:14 PM, Troy Cauble  wrote:
>
>> I'm having some trouble changing a DropDownChoice
>> to a Select + SelectOptions.  Do these look equivalent?
>>
>> Thanks,
>> -troy
>>
>>               // new DropDownChoice(id, rackListModel,
>>                //                              new ChoiceRenderer("name"));
>>
>>                Select select = new Select(id);
>>                IOptionRenderer rend = new IOptionRenderer() {
>>                        public String getDisplayValue(Object o)
>>                        {
>>                                return ((Rack)o).getName();
>>                        }
>>                        public IModel getModel(Object value)
>>                        {
>>                                return new Model((Serializable)value);
>>                        }
>>                };
>>                SelectOptions options = new SelectOptions("options",
>>                                                rackListModel,
>>                                                rend);
>>                select.add(options);
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: same data set shows for all users

2009-09-16 Thread jcinit

Okay.  I'm reading about models, but no progress yet.  Abridged code
attached.  http://www.nabble.com/file/p25479235/CodeSample.java
CodeSample.java  



jthomerson wrote:
> 
> You're not using models properly, but there's no way we can help without
> seeing code.
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Wed, Sep 9, 2009 at 4:18 PM, Randy  wrote:
> 
>>
>> I have my first wicket application running which allows the user to
>> specify
>> a date range and see a list of items from a database.  The problem is
>> that
>> all users see the same set of items for the same date range.  User A
>> enters
>> Tuesday through Friday, and user B runs the app and sees the same data
>> set.
>> User B changes the range and user A sees it as well.  The app is based on
>> the wicket repeater examples, and there are JDBC calls in the equivalent
>> of
>> ContactsDatabase.java.  Looking for suggestions on what to look into to
>> give
>> each user their own data set.(using Tomcat 6; Derby DB; Wicket 1.4; a
>> little Wicket Stuff)
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/same-data-set-shows-for-all-users-tp25373324p25479235.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Select + SelectOptions question

2009-09-16 Thread Pedro Santos
With Select  you have more control over the markup between the  tag
and its children  tags

>From Select javadoc: Component that represents a  box. Elements are
provided by one or more SelectChoice or SelectOptions components in the
hierarchy below the Select component. Advantages to the standard choice
components is that the user has a lot more control over the markup between
the  tag and its children  tags: allowing for such things as
 tags.

On Wed, Sep 16, 2009 at 4:14 PM, Troy Cauble  wrote:

> I'm having some trouble changing a DropDownChoice
> to a Select + SelectOptions.  Do these look equivalent?
>
> Thanks,
> -troy
>
>   // new DropDownChoice(id, rackListModel,
>//  new ChoiceRenderer("name"));
>
>Select select = new Select(id);
>IOptionRenderer rend = new IOptionRenderer() {
>public String getDisplayValue(Object o)
>{
>return ((Rack)o).getName();
>}
>public IModel getModel(Object value)
>{
>return new Model((Serializable)value);
>}
>};
>SelectOptions options = new SelectOptions("options",
>rackListModel,
>rend);
>select.add(options);
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: bookmarkable pages from scala

2009-09-16 Thread Haim Ashkenazi
Hi MIcheal,

On Wed, Sep 16, 2009 at 6:52 PM, Michael Mosmann  wrote:

> Hi,
>
> After Session.invalidate everything is cleaned up..
> change your code from
>
> add (new SLink("gohome", {setResponsePage(classOf[HomePage])}))
>
> to
>
> add(new BookmarkablePageLing("gohome", classOf[HomePage]));
>
> and it will work..
>
Yup this indeed solve the problem :)

I have a question though (as you can see I'm  a scala and wicket noob). From
reading wicket-in-action, I understood that the difference between
setResponsePage(new HomePage()) and setResponsePage(HomePage.class) is  that
the second one causes a redirect to a link like  like
http://localhost:8080/?wicket:bookmarkablePage=:com... instead of the
regular wicket url. This should also solve the "page expires" problem, isn't
it?
The session.invalidate should indeed invalidate the regular session but it
should accept the "bookmarkable..." link.

BTW, following the wicket source setResponsePage(Class) is routed to
BookmarkablePageRequestTarget...

Am I missing something? I still don't get why setResponsePage(new
HomePage()) and setResponsePage(classOf[HomePage]) gets the same result.

Thanks for your answer. It dd solve the problem :)
-- 
Haim


Select + SelectOptions question

2009-09-16 Thread Troy Cauble
I'm having some trouble changing a DropDownChoice
to a Select + SelectOptions.  Do these look equivalent?

Thanks,
-troy

   // new DropDownChoice(id, rackListModel,
//  new ChoiceRenderer("name"));

Select select = new Select(id);
IOptionRenderer rend = new IOptionRenderer() {
public String getDisplayValue(Object o)
{
return ((Rack)o).getName();
}
public IModel getModel(Object value)
{
return new Model((Serializable)value);
}
};
SelectOptions options = new SelectOptions("options",
rackListModel,
rend);
select.add(options);

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-16 Thread Johannes Schneider
tnx

Uwe Schäfer wrote:
> Pierre Goupil schrieb:
>> +1 for CI since it would give confidence on health status of the various
>> projects as well.
> 
> http://wicketstuff.org/teamcity
> 
> cu uwe
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
You could ajax update the textarea after upload, with the content that
you want? If you do not want to set the model object then you will
have to fake raw input (reflection).

**
Martin

2009/9/16 Sam Zilverberg :
> In one of my wizard's steps I have a upload form and a textarea.
>
> The textarea is used to enter serial numbers(seperated by newline) and is
> connected to a object property of type Set using a propertymodel.
> I've written a custom converter to turn the entered input to a Set
> and from a Set back to simple string.
>
> When pressing the wizard's next the input is validated and if valid the
> backing model will have Set of serials.
>
> I want the upload form to be used to upload a file containing serial
> numbers.
> I would like that the content of the uploaded file will be placed into the
> textarea, so that when Next is pressed again it is validated.
>
> Is this possible?
> Can I put the file's content into the text area by pressing upload without
> ruining the property model the textarea uses?
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



upload file content to textarea

2009-09-16 Thread Sam Zilverberg
In one of my wizard's steps I have a upload form and a textarea.

The textarea is used to enter serial numbers(seperated by newline) and is
connected to a object property of type Set using a propertymodel.
I've written a custom converter to turn the entered input to a Set
and from a Set back to simple string.

When pressing the wizard's next the input is validated and if valid the
backing model will have Set of serials.

I want the upload form to be used to upload a file containing serial
numbers.
I would like that the content of the uploaded file will be placed into the
textarea, so that when Next is pressed again it is validated.

Is this possible?
Can I put the file's content into the text area by pressing upload without
ruining the property model the textarea uses?


Re: Wicketstuff really needs some updates

2009-09-16 Thread Uwe Schäfer

Pierre Goupil schrieb:

+1 for CI since it would give confidence on health status of the various
projects as well.


http://wicketstuff.org/teamcity

cu uwe


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-16 Thread Pierre Goupil
+1 for CI since it would give confidence on health status of the various
projects as well.

On Wed, Sep 16, 2009 at 7:44 PM, Johannes Schneider
wrote:

> By the way: What about a CI server? That will detect such errors very fast.
>
>
> Johannes
>
> nino martinez wael wrote:
> >  Great Jeremy, I were about to ask the same, so Johannes please give
> > us the sf account and we will add you to the project. And thanks for
> > these updates.. :)
> >
> > regards Nino
> >
> > 2009/9/15 Jeremy Thomerson :
> >> Have you asked for commit access?  I don't see your sf.net username on
> the
> >> thread.  Nobody is stingy with wicketstuff commit access.  Just send
> your
> >> username.
> >>
> >> --
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >>
> >>
> >>
> >> On Tue, Sep 15, 2009 at 8:12 AM, Johannes Schneider
> >> wrote:
> >>
> >>> Come on guys. Please help me. Since there is an invalid repository
> >>> definition no one out there will be able to use a project using
> >>> "input-events"...
> >>> I have the necessary patches sitting right here. I have created a Jira
> >>> entry and I am willing to commit them if anybody gives me commit
> access.
> >>>
> >>> Please don't force me to release my own version. That would be just
> >>> duplicate work done.
> >>>
> >>>
> >>> Sincerly
> >>>
> >>> Johannes
> >>>
> >>> Johannes Schneider wrote:
>  I have created some patches that help me a bit.
>  Can be found here (found no better place).
> 
>  http://wicketstuff.org/jira/browse/WSMINIS-10
> 
>  Those are created using git. I hope the patch format is ok
> 
> 
>  Sincerly,
> 
>  Johannes
> 
>  Johannes Schneider wrote:
> > Well, who is the One?
> >
> > Igor Vaynberg wrote:
> >> or you can request commit access and eat your own donuts :)
> >>
> >> -igor
> >>
> >> On Fri, Sep 4, 2009 at 10:43 AM, Johannes
> >> Schneider wrote:
> >>> Hi,
> >>>
> >>> I really love the work that has been put into WicketStuff. The
> world
> >>> is
> >>> much better *with* WicketStuff.
> >>> But unfortunately several files are outdated and many releases are
> >>> missing.
> >>> So at first I want to say thank you to everybody who has put work
> into
> >>> that project. Then I want to motivate those with commit rights to
> >>> update
> >>> the projects and release some of the modules...
> >>> I am offering some donuts ;-)
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Johannes
> >>>
> >>>
> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>  -
>  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>  For additional commands, e-mail: users-h...@wicket.apache.org
> 
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Sans amis était le grand maître des mondes,
Eprouvait manque, ce pour quoi il créa les esprits,
Miroirs bienveillants de sa béatitude.
Mais au vrai, il ne trouva aucun égal,
Du calice du royaume total des âmes
Ecume jusqu'à lui l'infinité.

(Schiller, "l'amitié")


Re: Wicketstuff really needs some updates

2009-09-16 Thread Johannes Schneider
By the way: What about a CI server? That will detect such errors very fast.


Johannes

nino martinez wael wrote:
>  Great Jeremy, I were about to ask the same, so Johannes please give
> us the sf account and we will add you to the project. And thanks for
> these updates.. :)
> 
> regards Nino
> 
> 2009/9/15 Jeremy Thomerson :
>> Have you asked for commit access?  I don't see your sf.net username on the
>> thread.  Nobody is stingy with wicketstuff commit access.  Just send your
>> username.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Tue, Sep 15, 2009 at 8:12 AM, Johannes Schneider
>> wrote:
>>
>>> Come on guys. Please help me. Since there is an invalid repository
>>> definition no one out there will be able to use a project using
>>> "input-events"...
>>> I have the necessary patches sitting right here. I have created a Jira
>>> entry and I am willing to commit them if anybody gives me commit access.
>>>
>>> Please don't force me to release my own version. That would be just
>>> duplicate work done.
>>>
>>>
>>> Sincerly
>>>
>>> Johannes
>>>
>>> Johannes Schneider wrote:
 I have created some patches that help me a bit.
 Can be found here (found no better place).

 http://wicketstuff.org/jira/browse/WSMINIS-10

 Those are created using git. I hope the patch format is ok


 Sincerly,

 Johannes

 Johannes Schneider wrote:
> Well, who is the One?
>
> Igor Vaynberg wrote:
>> or you can request commit access and eat your own donuts :)
>>
>> -igor
>>
>> On Fri, Sep 4, 2009 at 10:43 AM, Johannes
>> Schneider wrote:
>>> Hi,
>>>
>>> I really love the work that has been put into WicketStuff. The world
>>> is
>>> much better *with* WicketStuff.
>>> But unfortunately several files are outdated and many releases are
>>> missing.
>>> So at first I want to say thank you to everybody who has put work into
>>> that project. Then I want to motivate those with commit rights to
>>> update
>>> the projects and release some of the modules...
>>> I am offering some donuts ;-)
>>>
>>>
>>> Thanks,
>>>
>>> Johannes
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org

>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Displaying column totals for a DefaultDataTable

2009-09-16 Thread saahuja

Sorry, never mind my previous post. I figured it out. I just need to use the
iterator() on the dataProvider to get the values.
Thanks.
-- 
View this message in context: 
http://www.nabble.com/Displaying-column-totals-for-a-DefaultDataTable-tp25402522p25477218.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-16 Thread Johannes Schneider
Hmm. you are right. That is an important information. Sorry for missing
that.

SF.net User:
shake234


Johannes

nino martinez wael wrote:
>  Great Jeremy, I were about to ask the same, so Johannes please give
> us the sf account and we will add you to the project. And thanks for
> these updates.. :)
> 
> regards Nino
> 
> 2009/9/15 Jeremy Thomerson :
>> Have you asked for commit access?  I don't see your sf.net username on the
>> thread.  Nobody is stingy with wicketstuff commit access.  Just send your
>> username.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Tue, Sep 15, 2009 at 8:12 AM, Johannes Schneider
>> wrote:
>>
>>> Come on guys. Please help me. Since there is an invalid repository
>>> definition no one out there will be able to use a project using
>>> "input-events"...
>>> I have the necessary patches sitting right here. I have created a Jira
>>> entry and I am willing to commit them if anybody gives me commit access.
>>>
>>> Please don't force me to release my own version. That would be just
>>> duplicate work done.
>>>
>>>
>>> Sincerly
>>>
>>> Johannes
>>>
>>> Johannes Schneider wrote:
 I have created some patches that help me a bit.
 Can be found here (found no better place).

 http://wicketstuff.org/jira/browse/WSMINIS-10

 Those are created using git. I hope the patch format is ok


 Sincerly,

 Johannes

 Johannes Schneider wrote:
> Well, who is the One?
>
> Igor Vaynberg wrote:
>> or you can request commit access and eat your own donuts :)
>>
>> -igor
>>
>> On Fri, Sep 4, 2009 at 10:43 AM, Johannes
>> Schneider wrote:
>>> Hi,
>>>
>>> I really love the work that has been put into WicketStuff. The world
>>> is
>>> much better *with* WicketStuff.
>>> But unfortunately several files are outdated and many releases are
>>> missing.
>>> So at first I want to say thank you to everybody who has put work into
>>> that project. Then I want to motivate those with commit rights to
>>> update
>>> the projects and release some of the modules...
>>> I am offering some donuts ;-)
>>>
>>>
>>> Thanks,
>>>
>>> Johannes
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org

>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



filter a datatable using some range (like a date range)

2009-09-16 Thread Sam Zilverberg
Hi,

I've recently had a bad experience adding this kind of filter in my project.
I had filter/clear buttons and the filtering would work great until I'd
press clear.
on pressing clear the fields would not clear and the filter would stop
working as it should.
I finally solved this by ignoring the originalState object returned from the
GoAndClearFilter and just nullify all my current filter fields.
but there must be a better way to do this..
so..

If the contact object from the phonebook project had another date property
or price (int) property, and this property was displayed in the datatable,
how should one add a range filter on that property?


Re: Displaying column totals for a DefaultDataTable

2009-09-16 Thread saahuja

Ok, here is my code for the TotalsToolbar that I am adding as a
BottomTooolbar to my table.

public class TotalsToolbar extends AbstractToolbar
{

public TotalsToolbar(final DataTable table, final IDataProvider
dataProvider)
{
super(table);

RepeatingView totals = new RepeatingView("totals");
add(totals);

final IColumn[] columns = table.getColumns();
for (int i = 0; i < columns.length; i++)
{
final IColumn column = columns[i];

WebMarkupContainer item = new
WebMarkupContainer(totals.newChildId());
totals.add(item);

WebMarkupContainer total = new WebMarkupContainer("total");

item.add(total);
item.setRenderBodyOnly(true);
if (i == 0)
total.add(new Label("value", "Grand Total"));
else
total.add(new Label("value", "$0.00"));

}
}

As you can see I am passing in a dataProvider into the constructor, but I do
not know how to use it. How do I replace the hardcoded "$0.00" value (look
towards the end of the code) with a value coming from the dataProvider?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Displaying-column-totals-for-a-DefaultDataTable-tp25402522p25475784.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: add/remove convenience functions instead of get/set

2009-09-16 Thread Troy Cauble
I don't see an advantage to putting it in the model rather than the class
behind the model.  It's still a get/set(list) interface and walking the lists
for changes to do add/remove.

-troy

On Wed, Sep 16, 2009 at 11:03 AM, Igor Vaynberg  wrote:
> you can always create a model that uses your own add/remove methods.
>
> -igor
>
> On Wed, Sep 16, 2009 at 8:00 AM, Troy Cauble  wrote:
>> I have classes with convenience functions that manage
>> bidirectional associations
>>
>>  public void addFoo(Foo f) {
>>    foos.add(f);
>>    f.addBar(this);
>>  }
>>
>> At one point I thought Wicket was using my add/remove convenience
>> functions (since I'd provided no get/set), but I now realize that it's using
>> reflection to get to the (private) list.
>>
>> I could write get(list) & set(list) convenience functions.  It seems a little
>> tedious, though.  Are there any utilities that would help?
>>
>> Will clearing and adding everything on my list generate unnecessary DB
>> operations?  Must I walk the lists for changes?
>>
>> I haven't run into any real issues yet based on my add/remove routines
>> not being used.  Does lazy loading cover for that in some cases?
>>
>> Thanks,
>> -troy
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: dropdownchoice selection problem after pressing the wizard previous button

2009-09-16 Thread Sam Zilverberg
I have another DDC in the wizard that works properly, it shows the correct
value when using the wizard previous button.
It's connected to the "deviceType" property of Device and gets its choices
from an enumeration I have.

add(new DropDownChoice("deviceType",
Arrays.asList(DeviceType.values(;

The only difference I can find between this DDC and the one that doesn't
work is where the choices come from.
The DDC that doesn't work gets its choices from the db (through a
LoadableDetachableModel).

On pressing previous I see (with the help of prints) that the DDC holds the
correct model value, that is the one i chose before, but it just wont disply
it!!

any ideas?


Re: bookmarkable pages from scala

2009-09-16 Thread Michael Mosmann
Hi,

After Session.invalidate everything is cleaned up.. 
change your code from

add (new SLink("gohome", {setResponsePage(classOf[HomePage])}))

to 

add(new BookmarkablePageLing("gohome", classOf[HomePage]));

and it will work..

mm:)

p.s.: the javacode for SLink.. is

add(new Link("gohome")
{
  onClick()
  {
setResponsePage(HomePage.class);
  }
}

.. so Url for this Link is not bookmarkable.. 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: dropdownchoice selection problem after pressing the wizard previous button

2009-09-16 Thread Sam Zilverberg
deviceCreation is defined only once in the wizard class.

all of the wizard steps are inner classes and, if needed, refer to
deviceCreation of their outer class which is the main wizard class.

so it should be the same instance.

On Wed, Sep 16, 2009 at 6:26 PM, Pedro Santos  wrote:

> The device on wizard model need to be the same instance that was passed to
> the DropDownChoice?
> See if at some point you are working with 2 intances of Device.
>
> new PropertyModel(devicesCreation, "distributor"),
>  private Device deviceCreation;
>
> devicesCreation != deviceCreation
>
>
>


Re: dropdownchoice selection problem after pressing the wizard previous button

2009-09-16 Thread Pedro Santos
The device on wizard model need to be the same instance that was passed to
the DropDownChoice?
See if at some point you are working with 2 intances of Device.

new PropertyModel(devicesCreation, "distributor"),
 private Device deviceCreation;

devicesCreation != deviceCreation


On Wed, Sep 16, 2009 at 11:33 AM, Sam Zilverberg wrote:

> I'm using a wizard with a CompoundPropertyModel of some object called
> Device.
> The Device object has a distributor and company properties (and some other
> too...)
>
> In the first step of the wizard, the user has to choose a distributor or
> company(both allowed too) for this device.
>
> For the device's distributer selection I have a DropDownChoice that uses a
> PropertyModel.
> I've also setNullValid to true and provided a properties key for the null
> value.
>
> The problem is that after I choose a distributor, go to the next step, and
> then return, the distributor I chose before is not automaticaly chosen in
> the DDC, instead the
> first value in the choices list is chosen (null value in this case).
>
> I've overridden afterRender and onModelChange for debug purposes.
> I've added a simple console print that prints out the Device.distributor
> value and the DDC defultObjectModel value.
>
> From these prints, I've gathered that after pressing previous, the DDC
> holds
> the correct chosen value for distributor but it doesnt display it.
>
> some more info:
> The DDC is in an inner form along with a custom panel for choosing a
> company.
> I didn't define a model for this form.
> I use this form to hold both the distributor and company selection so that
> i
> can validate that either (or both) was chosen.
>
> some relevant code:
>
> the wizard class has
>private Device deviceCreation;
>
> and in its constructor
>setDefaultModel(new CompoundPropertyModel(deviceCreation));
>
> the inner InfoStep class (the first step in the wizard):
>
> private final class InfoStep extends WizardStep {
>
> public InfoStep() {
>
>add(new DropDownChoice("devicesType",
> Arrays.asList(DeviceType.values(;   this is another DDC for
> another property that does work properly!!
>
>final DropDownChoice distribChoice =
>new DropDownChoice("distributor",
>
> new PropertyModel(devicesCreation, "distributor"),
>
> new DistributorModel(distributorDao)) {
>@Override
>protected boolean wantOnSelectionChangedNotifications() {
>return true;
>}
>};
>
>distribChoice.setNullValid(true);
>
>final CompanyChooser compChoose = new CompanyChooser("company");
>
>Form form = new Form("distribOrCompanyForm") {
>
>// perform custom validation
>// check that either a distributer or a company was chosen
> (or
>// both)
>@Override
>protected void onValidate() {
>super.onValidate();
>if (distribChoice.getModelObject() == null  &&
> !compChoose.isValid()) {
>this.error("distributer or company selection is
> required");
>}
>}
>
>};
>add(form);
>form.add(distribChoice);
>form.add(compChoose);
>}
>}
>


Re: add/remove convenience functions instead of get/set

2009-09-16 Thread Igor Vaynberg
you can always create a model that uses your own add/remove methods.

-igor

On Wed, Sep 16, 2009 at 8:00 AM, Troy Cauble  wrote:
> I have classes with convenience functions that manage
> bidirectional associations
>
>  public void addFoo(Foo f) {
>    foos.add(f);
>    f.addBar(this);
>  }
>
> At one point I thought Wicket was using my add/remove convenience
> functions (since I'd provided no get/set), but I now realize that it's using
> reflection to get to the (private) list.
>
> I could write get(list) & set(list) convenience functions.  It seems a little
> tedious, though.  Are there any utilities that would help?
>
> Will clearing and adding everything on my list generate unnecessary DB
> operations?  Must I walk the lists for changes?
>
> I haven't run into any real issues yet based on my add/remove routines
> not being used.  Does lazy loading cover for that in some cases?
>
> Thanks,
> -troy
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



add/remove convenience functions instead of get/set

2009-09-16 Thread Troy Cauble
I have classes with convenience functions that manage
bidirectional associations

  public void addFoo(Foo f) {
foos.add(f);
f.addBar(this);
  }

At one point I thought Wicket was using my add/remove convenience
functions (since I'd provided no get/set), but I now realize that it's using
reflection to get to the (private) list.

I could write get(list) & set(list) convenience functions.  It seems a little
tedious, though.  Are there any utilities that would help?

Will clearing and adding everything on my list generate unnecessary DB
operations?  Must I walk the lists for changes?

I haven't run into any real issues yet based on my add/remove routines
not being used.  Does lazy loading cover for that in some cases?

Thanks,
-troy

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



dropdownchoice selection problem after pressing the wizard previous button

2009-09-16 Thread Sam Zilverberg
I'm using a wizard with a CompoundPropertyModel of some object called
Device.
The Device object has a distributor and company properties (and some other
too...)

In the first step of the wizard, the user has to choose a distributor or
company(both allowed too) for this device.

For the device's distributer selection I have a DropDownChoice that uses a
PropertyModel.
I've also setNullValid to true and provided a properties key for the null
value.

The problem is that after I choose a distributor, go to the next step, and
then return, the distributor I chose before is not automaticaly chosen in
the DDC, instead the
first value in the choices list is chosen (null value in this case).

I've overridden afterRender and onModelChange for debug purposes.
I've added a simple console print that prints out the Device.distributor
value and the DDC defultObjectModel value.

>From these prints, I've gathered that after pressing previous, the DDC holds
the correct chosen value for distributor but it doesnt display it.

some more info:
The DDC is in an inner form along with a custom panel for choosing a
company.
I didn't define a model for this form.
I use this form to hold both the distributor and company selection so that i
can validate that either (or both) was chosen.

some relevant code:

the wizard class has
private Device deviceCreation;

and in its constructor
setDefaultModel(new CompoundPropertyModel(deviceCreation));

the inner InfoStep class (the first step in the wizard):

private final class InfoStep extends WizardStep {

public InfoStep() {

add(new DropDownChoice("devicesType",
Arrays.asList(DeviceType.values(;   this is another DDC for
another property that does work properly!!

final DropDownChoice distribChoice =
new DropDownChoice("distributor",

new PropertyModel(devicesCreation, "distributor"),

new DistributorModel(distributorDao)) {
@Override
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
};

distribChoice.setNullValid(true);

final CompanyChooser compChoose = new CompanyChooser("company");

Form form = new Form("distribOrCompanyForm") {

// perform custom validation
// check that either a distributer or a company was chosen
(or
// both)
@Override
protected void onValidate() {
super.onValidate();
if (distribChoice.getModelObject() == null  &&
!compChoose.isValid()) {
this.error("distributer or company selection is
required");
}
}

};
add(form);
form.add(distribChoice);
form.add(compChoose);
}
}


Re: bookmarkable pages from scala

2009-09-16 Thread Haim Ashkenazi
Hi Michael,

On Wed, Sep 16, 2009 at 4:40 PM, Michael Mosmann  wrote:

> Am Mittwoch, den 16.09.2009, 16:32 +0300 schrieb Haim Ashkenazi:
> > Hi
> >
> > I'm trying to run setResponsePage with a class parameter. According to
> the
> > doc if I run:
> > setResponsePage(MyPage.class)
>
> some more code?
>
Sure :)

http://github.com/babysnakes/comnshours/tree/tests

It's in the "tests" branch (revision:
1972f3bdb16d43057a067f7e3de77e96ad0aa623).

This is sbt project so you have to download  and install sbt from
here,
run 'sbt' and when you get the prompt type:

   - update
   - jetty-run

Hopefully this compiles and runs the project.

One more thing, In order to run the project you need to have
couchdbinstalled.

Thanks

Bye
-- 
Haim


Re: Unable to close ModalWindow 1.4.1

2009-09-16 Thread Pedro Santos
For cross (sub) domain reasons - I am adding document.domain to my page.

can't you access your application with http://subdomain.domain.com:8080 at
first place?
if no, see if you can reach this effect with:
http://wicket.apache.org/docs/1.4/org/apache/wicket/request/IRequestCodingStrategy.html
at the javadoc says: creating url representations for request targets

On Tue, Sep 15, 2009 at 11:17 PM, Ed _  wrote:

>
> For cross (sub) domain reasons - I am adding document.domain to my page.
>
>
>
> Is there a way to make modalwindow / Wickets Ajax links to work with it?
>
>
>
> thx
>
> > From: ed_b...@hotmail.com
> > To: users@wicket.apache.org
> > Subject: RE: Unable to close ModalWindow 1.4.1
> > Date: Tue, 15 Sep 2009 18:49:03 -0700
> >
> >
> >
> >
> > Permission denied for  to get property Window.Wicket
> from .
> >
> http://subdomain.domain.com:8080/?wicket:interface=modal-dialog-pagemap:15::
> ::
> > Line 265
> >
> > wonder why it thinks that the domains are different ?
> >
> > can I force domain.doc value somehow
> >
> > thx
> >
> > > Date: Tue, 15 Sep 2009 21:45:34 -0300
> > > Subject: Re: Unable to close ModalWindow 1.4.1
> > > From: pedros...@gmail.com
> > > To: users@wicket.apache.org
> > >
> > >  - I get permission denied exception as reported by firebug.
> > > - head section with my javascript
> > >
> > > The firebug firefox plugging has an javascript console. Execute on him
> (
> > > maybe you will not to get permission denied here):
> > > alert(Wicket.Window.current)
> > > alert(window.parent.Wicket.Window.current)
> > > at the end of the javascript operations you report:
> > >
> > > "At the end of the operations I hide all the divs and then show a div
> that
> > > has a "close link""
> > >
> > > and let us to know what value then have.
> > >
> > > call the alerts to output the values,
> > >
> > > On Tue, Sep 15, 2009 at 9:13 PM, Ed _  wrote:
> > >
> > > >
> > > > Thanks for the suggestion.
> > > >
> > > > I have been using close(target) - unfortunately attached a run when I
> was
> > > > using both methods. Even with one ajax response appended it doesn't
> work.
> > > >
> > > > New to JS - can you tell me how to test the variables. If I add
> > > >
> > > > var status = window.parent.Wicket.Window; as part of my JS - I get
> > > > permission denied exception as reported by firebug.
> > > >
> > > >
> > > > My html file includes a head section with my javascript and the
> markup has
> > > > wicket elements viz where the close links are rendered. I have two
> such
> > > > links - both of which are rendered useless when used in this
> configuration -
> > > > although the main close button of the modalwindow continues to work.
> > > >
> > > > thanks
> > > >
> > > > > Date: Tue, 15 Sep 2009 18:00:47 -0300
> > > > > Subject: Re: Unable to close ModalWindow 1.4.1
> > > > > From: pedros...@gmail.com
> > > > > To: users@wicket.apache.org
> > > > >
> > > > >  by close(target) or ModalWindow.close(target)
> > > > > --> use close(target), to maintain ModalWindow internal states
> updated.
> > > > >
> > > > > On Tue, Sep 15, 2009 at 5:56 PM, Pedro Santos  >
> > > > wrote:
> > > > >
> > > > > > On this ajax response, we can see that the close script was
> appended 2
> > > > > > times. Make sure that it appended only once, by close(target) or
> > > > > > ModalWindow.close(target).
> > > > > > Before click the "close link", in a moment that was causing
> trouble,
> > > > see if
> > > > > > these variables are not null:
> > > > > >
> > > > > > Wicket.Window.current
> > > > > > window.parent.Wicket.Window.current
> > > > > >
> > > > > > If so, look at what moment they are nullified. The close method
> called
> > > > on
> > > > > > response:
> > > > > > win.current.close()
> > > > > > depends on these variables.
> > > > > >
> > > > > >
> > > > > > On Tue, Sep 15, 2009 at 4:54 PM, Ed _ 
> wrote:
> > > > > >
> > > > > >>
> > > > > >>
> > > > > >> Looking for hints to debug the situation I am in. Thanks.
> > > > > >>
> > > > > >> Using wickets 1.4.1
> > > > > >>
> > > > > >> I have tried a simple scenario  - opening a page in a modal
> window and
> > > > > >> then using a link in the page to close the window. Works fine.
> > > > > >>
> > > > > >> Now I am opening a more complicated page with its own javascript
> -
> > > > > >> performing a bunch of operations on that page using js while it
> is
> > > > opened in
> > > > > >> a modal window. At the end of the operations I hide all the divs
> and
> > > > then
> > > > > >> show a div that has a "close link"
> > > > > >>
> > > > > >> The link does not close the modal window - I see the request
> coming to
> > > > the
> > > > > >> server I call close(target) tried ModalWindow.close(target) too
> but
> > > > nothing
> > > > > >> happens.
> > > > > >>
> > > > > >> The window closes with the X close button on the top right.
> > > > > >>
> > > > > >> the wicket debug shows the operation / at least being able to
> fetch
> > >

Re: bookmarkable pages from scala

2009-09-16 Thread Michael Mosmann
Am Mittwoch, den 16.09.2009, 16:32 +0300 schrieb Haim Ashkenazi:
> Hi
> 
> I'm trying to run setResponsePage with a class parameter. According to the
> doc if I run:
> setResponsePage(MyPage.class)

some more code?

mm:)


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



bookmarkable pages from scala

2009-09-16 Thread Haim Ashkenazi
Hi

I'm trying to run setResponsePage with a class parameter. According to the
doc if I run:
setResponsePage(MyPage.class)

I should get a bookmarkable url (
http://localhost:8080/?wicket:bookmarkablePage=:com...).

When trying the same from scala:
setResponsePage(classOf[MyPage])

I get a regular wicket url:
http://localhost:8080/?wicket:interface=:2:gohome::ILinkListener::

What I'm trying to do is to get to the home page after signout without
getting a "Page expired" error. I'm able to get it by putthing 
in the html, but I wonder why setResponsePage doesn't work as expected with
scala.

Thanks in advance

Haim Ashkenazi




-- 
Haim


Re: Shall we create a menu in wicket?

2009-09-16 Thread Ernesto Reinaldo Barreiro
Do not have a life demo. But you can see the code to use it at:
http://code.google.com/p/antilia/source/browse/trunk/
com.antilia.demo.manager/src/com/antilia/demo/manager/Index.java

http://code.google.com/p/antilia/source/browse/trunk/com.antilia.demo.manager/src/com/antilia/demo/manager/MainMenuFactory.java

and the Toolbar classes at:

http://code.google.com/p/antilia/source/browse/trunk/#trunk/com.antilia.web/src/com/antilia/web/toolbar

It is based on this menu.


http://www.gosu.pl/MyGosuMenu/

The result is something like:

http://antilia.googlecode.com/svn/wiki/toolbar1.PNG
http://antilia.googlecode.com/svn/wiki/toolbar2.PNG

As said this is just another Wicket component out there...

Ernesto

On Wed, Sep 16, 2009 at 1:54 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> I am just trying to learn something new here.. how is your menu
> different from tabbedpanel? Maybe I could leverage from that..
>
> Do you have a live demo?
>
> **
> Martin
>
> 2009/9/16 Ernesto Reinaldo Barreiro :
> > Well, that's what Wicket is about: it's so easy to roll out components
> that
> > you end up creating your own stuff and using it even when there are
> things
> > out there that already do that you want. I have rolled my "own" Menu
> because
> > I didn't what to depend on YUI. I see Menus as something different than
> > TabbedPanel... but thats just me. IMHO what is important is to have an
> > abstraction you are satisfied with...
> > Ernesto
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Shall we create a menu in wicket?

2009-09-16 Thread Martin Makundi
I am just trying to learn something new here.. how is your menu
different from tabbedpanel? Maybe I could leverage from that..

Do you have a live demo?

**
Martin

2009/9/16 Ernesto Reinaldo Barreiro :
> Well, that's what Wicket is about: it's so easy to roll out components that
> you end up creating your own stuff and using it even when there are things
> out there that already do that you want. I have rolled my "own" Menu because
> I didn't what to depend on YUI. I see Menus as something different than
> TabbedPanel... but thats just me. IMHO what is important is to have an
> abstraction you are satisfied with...
> Ernesto
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Shall we create a menu in wicket?

2009-09-16 Thread Ernesto Reinaldo Barreiro
Well, that's what Wicket is about: it's so easy to roll out components that
you end up creating your own stuff and using it even when there are things
out there that already do that you want. I have rolled my "own" Menu because
I didn't what to depend on YUI. I see Menus as something different than
TabbedPanel... but thats just me. IMHO what is important is to have an
abstraction you are satisfied with...
Ernesto

On Wed, Sep 16, 2009 at 1:32 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> > Well, your menu might have more than one level (sub-menus) and maybe you
> > want those to appear and hide as your mouse rolls over selected
> entries...
>
> I have implemented generic N-LEVEL tabbed panels with Wicket that can
> hide or show given elements depending on some parameters
> (authorization, for example)... it sounds very similar. The visual
> stuff can be changed with css or javascript whatever suits best.
>
> I know it is not good design to have n-level tabs but sometimes it
> happens ,) But how it lloks (tabs or menus) depends only on the
> markup.
>
> **
> Martin
>
> > It seems to me that would be very difficult to achieve with tabbedpanel
> > (unless you add a lot CSS/magic, which would not probably work for all
> > browsers).  If you only want a one level menu  then I agree it is the
> same
> > as tabbedpanel with a "non tabs" CSS.
> > Ernesto
> >
> >
> > On Wed, Sep 16, 2009 at 1:03 PM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> I do not mean pure css.. I just mean that Wicket has the tabbedpanel
> >> solution with ajax and without.. What's the difference of a tabbed
> >> panel to menus if you just change the visual outlook...?
> >>
> >> **
> >> Martin
> >>
> >> 2009/9/16 Ernesto Reinaldo Barreiro :
> >> > You mean pure CSS based menus? Well, I guess if you want the Menu
> working
> >> > for all brands/versions of browsers you might have some JavaScript as
> >> > well...  E.g. YUI menu allows to put an iframe behind your menu, so
> that
> >> it
> >> > display well when it overlaps with a select on IE6. Don't think you
> can
> >> > achieve that with a pure CSS solution... but don't take me for granted
> as
> >> > I'm far from been a CSS/JavaScript guru.
> >> > Ernesto
> >> >
> >> > On Wed, Sep 16, 2009 at 12:30 PM, Martin Makundi <
> >> > martin.maku...@koodaripalvelut.com> wrote:
> >> >
> >> >> Hi guys, what's the difference of menu and tabbed panel? Apart from
> the
> >> >> css?
> >> >>
> >> >> **
> >> >> Martin
> >> >>
> >> >> 2009/9/16 Ernesto Reinaldo Barreiro :
> >> >> > As far as I remember there was a YUI based Menu component on this
> >> project
> >> >> >
> >> >>
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
> >> >> >
> >> >> > <
> >> >>
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
> >> >> >See
> >> >> > for instance
> >> >> >
> >> >> >
> >> >>
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java
> >> >> >
> >> >> > For my projects I use a "home grown" menu component... which is not
> >> that
> >> >> > nice looking but works for me.
> >> >> >
> >> >> > Best,
> >> >> >
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>
> >> >>
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Non-english UTF-8 characters in POSTed data

2009-09-16 Thread Petr Fejfar
On Wed, Sep 16, 2009 at 1:35 PM, Martin Makundi
 wrote:

> Hmm.. can't you fix this with encoding settings?
>
>    getMarkupSettings().setDefaultMarkupEncoding(WebPageConstants.ISO_8859_1);
>
> Or something?

It seems it cannot. I have in my appliction's init() code:

getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
getRequestCycleSettings().setResponseRequestEncoding("UTF-8");  

and both, static texts from .HTML, translated texts from .XML are show O.K.,
but data posted from a form are not.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Non-english UTF-8 characters in POSTed data

2009-09-16 Thread Martin Makundi
Hmm.. can't you fix this with encoding settings?

getMarkupSettings().setDefaultMarkupEncoding(WebPageConstants.ISO_8859_1);

Or something?

I would assume a modified version wicket-ajax can be just accomplished
by creating a new one in same package. However, if there is no setup
for such thing it sounds like a bug.

**
Martin

2009/9/16 Petr Fejfar :
> Hi all,
>
> I'm probably facing the same problem as described here:
>
> http://mail-archives.apache.org/mod_mbox/wicket-users/200804.mbox/%3cdf3d7452-0ac0-4cf7-8164-87e9371d8...@signicat.com%3e
>
> I use Maven to build my applications, so I have a beginner's qustion:
> how to reorganize a project to work with modified version of wicket-ajax.js
> file?
>
> Thanks, Petr
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Shall we create a menu in wicket?

2009-09-16 Thread Martin Makundi
> Well, your menu might have more than one level (sub-menus) and maybe you
> want those to appear and hide as your mouse rolls over selected entries...

I have implemented generic N-LEVEL tabbed panels with Wicket that can
hide or show given elements depending on some parameters
(authorization, for example)... it sounds very similar. The visual
stuff can be changed with css or javascript whatever suits best.

I know it is not good design to have n-level tabs but sometimes it
happens ,) But how it lloks (tabs or menus) depends only on the
markup.

**
Martin

> It seems to me that would be very difficult to achieve with tabbedpanel
> (unless you add a lot CSS/magic, which would not probably work for all
> browsers).  If you only want a one level menu  then I agree it is the same
> as tabbedpanel with a "non tabs" CSS.
> Ernesto
>
>
> On Wed, Sep 16, 2009 at 1:03 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> I do not mean pure css.. I just mean that Wicket has the tabbedpanel
>> solution with ajax and without.. What's the difference of a tabbed
>> panel to menus if you just change the visual outlook...?
>>
>> **
>> Martin
>>
>> 2009/9/16 Ernesto Reinaldo Barreiro :
>> > You mean pure CSS based menus? Well, I guess if you want the Menu working
>> > for all brands/versions of browsers you might have some JavaScript as
>> > well...  E.g. YUI menu allows to put an iframe behind your menu, so that
>> it
>> > display well when it overlaps with a select on IE6. Don't think you can
>> > achieve that with a pure CSS solution... but don't take me for granted as
>> > I'm far from been a CSS/JavaScript guru.
>> > Ernesto
>> >
>> > On Wed, Sep 16, 2009 at 12:30 PM, Martin Makundi <
>> > martin.maku...@koodaripalvelut.com> wrote:
>> >
>> >> Hi guys, what's the difference of menu and tabbed panel? Apart from the
>> >> css?
>> >>
>> >> **
>> >> Martin
>> >>
>> >> 2009/9/16 Ernesto Reinaldo Barreiro :
>> >> > As far as I remember there was a YUI based Menu component on this
>> project
>> >> >
>> >>
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
>> >> >
>> >> > <
>> >>
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
>> >> >See
>> >> > for instance
>> >> >
>> >> >
>> >>
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java
>> >> >
>> >> > For my projects I use a "home grown" menu component... which is not
>> that
>> >> > nice looking but works for me.
>> >> >
>> >> > Best,
>> >> >
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Shall we create a menu in wicket?

2009-09-16 Thread Ernesto Reinaldo Barreiro
Well, your menu might have more than one level (sub-menus) and maybe you
want those to appear and hide as your mouse rolls over selected entries...
It seems to me that would be very difficult to achieve with tabbedpanel
(unless you add a lot CSS/magic, which would not probably work for all
browsers).  If you only want a one level menu  then I agree it is the same
as tabbedpanel with a "non tabs" CSS.
Ernesto


On Wed, Sep 16, 2009 at 1:03 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> I do not mean pure css.. I just mean that Wicket has the tabbedpanel
> solution with ajax and without.. What's the difference of a tabbed
> panel to menus if you just change the visual outlook...?
>
> **
> Martin
>
> 2009/9/16 Ernesto Reinaldo Barreiro :
> > You mean pure CSS based menus? Well, I guess if you want the Menu working
> > for all brands/versions of browsers you might have some JavaScript as
> > well...  E.g. YUI menu allows to put an iframe behind your menu, so that
> it
> > display well when it overlaps with a select on IE6. Don't think you can
> > achieve that with a pure CSS solution... but don't take me for granted as
> > I'm far from been a CSS/JavaScript guru.
> > Ernesto
> >
> > On Wed, Sep 16, 2009 at 12:30 PM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> Hi guys, what's the difference of menu and tabbed panel? Apart from the
> >> css?
> >>
> >> **
> >> Martin
> >>
> >> 2009/9/16 Ernesto Reinaldo Barreiro :
> >> > As far as I remember there was a YUI based Menu component on this
> project
> >> >
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
> >> >
> >> > <
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
> >> >See
> >> > for instance
> >> >
> >> >
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java
> >> >
> >> > For my projects I use a "home grown" menu component... which is not
> that
> >> > nice looking but works for me.
> >> >
> >> > Best,
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Non-english UTF-8 characters in POSTed data

2009-09-16 Thread Petr Fejfar
Hi all,

I'm probably facing the same problem as described here:

http://mail-archives.apache.org/mod_mbox/wicket-users/200804.mbox/%3cdf3d7452-0ac0-4cf7-8164-87e9371d8...@signicat.com%3e

I use Maven to build my applications, so I have a beginner's qustion:
how to reorganize a project to work with modified version of wicket-ajax.js
file?

Thanks, Petr

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Shall we create a menu in wicket?

2009-09-16 Thread Martin Makundi
I do not mean pure css.. I just mean that Wicket has the tabbedpanel
solution with ajax and without.. What's the difference of a tabbed
panel to menus if you just change the visual outlook...?

**
Martin

2009/9/16 Ernesto Reinaldo Barreiro :
> You mean pure CSS based menus? Well, I guess if you want the Menu working
> for all brands/versions of browsers you might have some JavaScript as
> well...  E.g. YUI menu allows to put an iframe behind your menu, so that it
> display well when it overlaps with a select on IE6. Don't think you can
> achieve that with a pure CSS solution... but don't take me for granted as
> I'm far from been a CSS/JavaScript guru.
> Ernesto
>
> On Wed, Sep 16, 2009 at 12:30 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Hi guys, what's the difference of menu and tabbed panel? Apart from the
>> css?
>>
>> **
>> Martin
>>
>> 2009/9/16 Ernesto Reinaldo Barreiro :
>> > As far as I remember there was a YUI based Menu component on this project
>> >
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
>> >
>> > <
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
>> >See
>> > for instance
>> >
>> >
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java
>> >
>> > For my projects I use a "home grown" menu component... which is not that
>> > nice looking but works for me.
>> >
>> > Best,
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Shall we create a menu in wicket?

2009-09-16 Thread Ernesto Reinaldo Barreiro
You mean pure CSS based menus? Well, I guess if you want the Menu working
for all brands/versions of browsers you might have some JavaScript as
well...  E.g. YUI menu allows to put an iframe behind your menu, so that it
display well when it overlaps with a select on IE6. Don't think you can
achieve that with a pure CSS solution... but don't take me for granted as
I'm far from been a CSS/JavaScript guru.
Ernesto

On Wed, Sep 16, 2009 at 12:30 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi guys, what's the difference of menu and tabbed panel? Apart from the
> css?
>
> **
> Martin
>
> 2009/9/16 Ernesto Reinaldo Barreiro :
> > As far as I remember there was a YUI based Menu component on this project
> >
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
> >
> > <
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
> >See
> > for instance
> >
> >
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java
> >
> > For my projects I use a "home grown" menu component... which is not that
> > nice looking but works for me.
> >
> > Best,
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Shall we create a menu in wicket?

2009-09-16 Thread Martin Makundi
Hi guys, what's the difference of menu and tabbed panel? Apart from the css?

**
Martin

2009/9/16 Ernesto Reinaldo Barreiro :
> As far as I remember there was a YUI based Menu component on this project
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/
>
> See
> for instance
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java
>
> For my projects I use a "home grown" menu component... which is not that
> nice looking but works for me.
>
> Best,
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Shall we create a menu in wicket?

2009-09-16 Thread Ernesto Reinaldo Barreiro
As far as I remember there was a YUI based Menu component on this project
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/

See
for instance

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicketstuff-core-1.4.1/yui-parent/yui-examples/src/main/java/org/wicketstuff/yui/examples/pages/MenuPage.java

For my projects I use a "home grown" menu component... which is not that
nice looking but works for me.

Best,

Ernesto

On Wed, Sep 16, 2009 at 11:53 AM, Gerald Fernando <
gerald.anto.ferna...@gmail.com> wrote:

> Shall we create a menu in wicket?if it possible , please tell me how to
> create menu
>
> --
> Thanks®ards,
> Gerald A
>


RE: Shall we create a menu in wicket?

2009-09-16 Thread Stefan Lindner
Yes, we should! I started an initial implementation for old Wicket 2.0 in 
wicketstuff. But this was 3 years ago. I still have a simple implementation 
that works with wicket 1.4.
Not much documentation, not very flexible, but it works and may be suitable for 
a quick and dirty solution for you.

-Ursprüngliche Nachricht-
Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com] 
Gesendet: Mittwoch, 16. September 2009 11:54
An: users@wicket.apache.org
Betreff: Shall we create a menu in wicket?

Shall we create a menu in wicket?if it possible , please tell me how to
create menu

-- 
Thanks®ards,
Gerald A

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Shall we create a menu in wicket?

2009-09-16 Thread Gerald Fernando
Shall we create a menu in wicket?if it possible , please tell me how to
create menu

-- 
Thanks®ards,
Gerald A


Re: GMap2 GOverlay.getJSConstructor() change request

2009-09-16 Thread Martin Funk
2009/9/16 Martin Funk 

> Hi Doug,
>
> the change of getJSconstructor() from protected to public is fine by me.
> Go ahead an commit that change.
>

argh... I withdraw and claim the opposite.
or at least rethink it really hard.
If the map you are reffering to already has a JavaSript-counterpart-instance
on the client your ar most likely better of doing al that in a JavaScript on
the client side.

mf



>
> The client code you posted, I haven't analyzed in depth, but seeing all
> that JavaScript genereated on the Server using so many String literals would
> make me start to think if that code could somehow be moved into a custom
> JavaScript file.
> So instead of shoving all that JavaScript code from the server to the
> client things could me reduced to calling a custom JavaScript function. It
> might be mind bending, but I think its always worth a thought.
>
> mf
>
> 2009/9/16 Doug Leeper 
>
> I recently moved from 1.3.6 to 1.4.1 and came across a compile error.  I
>> believe I had a local copy of GMap2 (1.3.x) and made modifications to make
>> the following work.
>>
>> Now I would like to propose a change but not sure who I need to talk.
>>  Specifically, I would like to request to change GOverlay.getJSConstructor()
>> from protected to public (and all subsequent derived classes)
>>
>> I am need to send javascript back to the browser which basically rebounds
>> the a GMap2...the following is my code snippet:
>>
>> 
>>private String getJSRebound() {
>>StringBuffer buf = new StringBuffer();
>>buf.append("var bounds = new GLatLngBounds();\n");
>>buf.append("var map = " + map.getJSinvoke("map"));
>>buf.append("bounds.extend( map.getCenter() ); \n");
>>
>>int idx = 0;
>>
>>for (GOverlay overlay : map.getOverlays()) {
>>if (overlay instanceof GMarker) {
>>GMarker marker = (GMarker) overlay;
>>GLatLng point = marker.getLatLng();
>>buf.append("bounds.extend( " + point.getJSconstructor()
>>+ " );\n");
>>}
>>
>>if (overlay instanceof GGeoXml) {
>>GGeoXml xml = (GGeoXml) overlay;
>>
>>String var = "xml" + idx++;
>>
>>// this is broken with 1.4.1
>>// getJSconstructor has been made protected
>>
>>buf.append("var " + var + " = " + xml.getJSconstructor()
>>+ "; \n");
>>
>>buf.append("GEvent.addListener(" + var
>>+ ", 'load', function(){ \n");
>>buf.append("bounds.extend( " + var
>>+ ".getDefaultBounds().getSouthWest() ); \n");
>>buf.append("bounds.extend( " + var
>>+ ".getDefaultBounds().getNorthEast() ); \n");
>>buf.append("map.setZoom( map.getBoundsZoomLevel(bounds)
>> );\n");
>>buf.append("}); \n");
>>}
>>}
>>
>>if (idx == 0) {
>>GLatLng point = new GLatLng(location.getCentralLatitude(),
>> location
>>.getCentralLongitude(), false);
>>buf.append("bounds.extend( " + point.getJSconstructor() + "
>> );\n");
>>buf
>>.append("map.setZoom(
>> Math.min(map.getBoundsZoomLevel(bounds),8) );\n");
>>} else {
>>buf.append("map.setZoom( map.getBoundsZoomLevel(bounds) );\n");
>>}
>>buf.append("map.setCenter( bounds.getCenter() );\n");
>>return buf.toString();
>>}
>> 
>>
>> This method is called in my constructor:
>>
>> 
>>map.add(new HeaderContributor(new IHeaderContributor() {
>>private static final long serialVersionUID = 1L;
>>
>>public void renderHead(IHeaderResponse response) {
>>response.renderOnDomReadyJavascript(getJSRebound());
>>}
>>}));
>> 
>>
>>
>> Without the ability to generated the JS object and keep a reference, I
>> don't believe I can accomplish what I need to do...rebound the map within
>> the points I have stored.  If someone has a better idea, I am all ears.  If
>> not, the accessibliity change would greatly be appreciated.
>>
>> Thanks
>> - Doug
>
>
>


Re: GMap2 GOverlay.getJSConstructor() change request

2009-09-16 Thread Martin Funk
Hi Doug,

the change of getJSconstructor() from protected to public is fine by me.
Go ahead an commit that change.

The client code you posted, I haven't analyzed in depth, but seeing all that
JavaScript genereated on the Server using so many String literals would make
me start to think if that code could somehow be moved into a custom
JavaScript file.
So instead of shoving all that JavaScript code from the server to the client
things could me reduced to calling a custom JavaScript function. It might be
mind bending, but I think its always worth a thought.

mf

2009/9/16 Doug Leeper 

> I recently moved from 1.3.6 to 1.4.1 and came across a compile error.  I
> believe I had a local copy of GMap2 (1.3.x) and made modifications to make
> the following work.
>
> Now I would like to propose a change but not sure who I need to talk.
>  Specifically, I would like to request to change GOverlay.getJSConstructor()
> from protected to public (and all subsequent derived classes)
>
> I am need to send javascript back to the browser which basically rebounds
> the a GMap2...the following is my code snippet:
>
> 
>private String getJSRebound() {
>StringBuffer buf = new StringBuffer();
>buf.append("var bounds = new GLatLngBounds();\n");
>buf.append("var map = " + map.getJSinvoke("map"));
>buf.append("bounds.extend( map.getCenter() ); \n");
>
>int idx = 0;
>
>for (GOverlay overlay : map.getOverlays()) {
>if (overlay instanceof GMarker) {
>GMarker marker = (GMarker) overlay;
>GLatLng point = marker.getLatLng();
>buf.append("bounds.extend( " + point.getJSconstructor()
>+ " );\n");
>}
>
>if (overlay instanceof GGeoXml) {
>GGeoXml xml = (GGeoXml) overlay;
>
>String var = "xml" + idx++;
>
>// this is broken with 1.4.1
>// getJSconstructor has been made protected
>
>buf.append("var " + var + " = " + xml.getJSconstructor()
>+ "; \n");
>
>buf.append("GEvent.addListener(" + var
>+ ", 'load', function(){ \n");
>buf.append("bounds.extend( " + var
>+ ".getDefaultBounds().getSouthWest() ); \n");
>buf.append("bounds.extend( " + var
>+ ".getDefaultBounds().getNorthEast() ); \n");
>buf.append("map.setZoom( map.getBoundsZoomLevel(bounds)
> );\n");
>buf.append("}); \n");
>}
>}
>
>if (idx == 0) {
>GLatLng point = new GLatLng(location.getCentralLatitude(),
> location
>.getCentralLongitude(), false);
>buf.append("bounds.extend( " + point.getJSconstructor() + "
> );\n");
>buf
>.append("map.setZoom(
> Math.min(map.getBoundsZoomLevel(bounds),8) );\n");
>} else {
>buf.append("map.setZoom( map.getBoundsZoomLevel(bounds) );\n");
>}
>buf.append("map.setCenter( bounds.getCenter() );\n");
>return buf.toString();
>}
> 
>
> This method is called in my constructor:
>
> 
>map.add(new HeaderContributor(new IHeaderContributor() {
>private static final long serialVersionUID = 1L;
>
>public void renderHead(IHeaderResponse response) {
>response.renderOnDomReadyJavascript(getJSRebound());
>}
>}));
> 
>
>
> Without the ability to generated the JS object and keep a reference, I
> don't believe I can accomplish what I need to do...rebound the map within
> the points I have stored.  If someone has a better idea, I am all ears.  If
> not, the accessibliity change would greatly be appreciated.
>
> Thanks
> - Doug


Re: Update Tree Model on Ajax timer. What's wrong ?

2009-09-16 Thread Matthias Keller

Hi Eric

I've never used a Tree before and I don't know the 
AjaxSelfUpdatingTimerBehaviour, but shouldn't you add all changed 
elements to 'target' like in all other AJAX calls I've ever encountered 
before? Wicket usually updates those things that are added to the 
AjaxRequestTarget.


Matt

Eric Bouer wrote:

Hello.
Preface: Wicket Tree is very confusing since it's some kind of hybrid between 
swing Tree model and wicket tree so please forgive me for any 
stupid/irrelevant questions.


I created a tree with a model based on database schema.I'm trying to refresh  
the tree so that it will change node names after some DB update.
I added AJAX timer to self update the tree , the ajax stuff work but it doesn't 
even try to update the model.

To create my tree I have this on my page:
tree = new TreeTable("treeTable", createTreeModel(), columns);
tree.getTreeState().setAllowSelectMultiple(true); 
tree.setOutputMarkupId(true);

add(tree);
tree.add(new AjaxSelfUpdatingTimerBehavior(Duration.ONE_SECOND) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
super.onPostProcessTarget(target);
Vector p = new Vector();
//To keep it simple. I'm only trying to update the root.
p.add(tree.getModel().getObject().getRoot()); 
TreeModelEvent event = new TreeModelEvent(tree,p.toArray());

tree.treeNodesChanged(event);
});
}
Nothing get updates.
I tried adding customized TreeModelListener however it doesn't get called at 
all.

Any idea or reference to documentation that explain this?
Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

  




smime.p7s
Description: S/MIME Cryptographic Signature


Update Tree Model on Ajax timer. What's wrong ?

2009-09-16 Thread Eric Bouer
Hello.
Preface: Wicket Tree is very confusing since it's some kind of hybrid between 
swing Tree model and wicket tree so please forgive me for any 
stupid/irrelevant questions.

I created a tree with a model based on database schema.I'm trying to refresh  
the tree so that it will change node names after some DB update.
I added AJAX timer to self update the tree , the ajax stuff work but it doesn't 
even try to update the model.
To create my tree I have this on my page:
tree = new TreeTable("treeTable", createTreeModel(), columns);
tree.getTreeState().setAllowSelectMultiple(true); 
tree.setOutputMarkupId(true);
add(tree);
tree.add(new AjaxSelfUpdatingTimerBehavior(Duration.ONE_SECOND) {
@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
super.onPostProcessTarget(target);
Vector p = new Vector();
//To keep it simple. I'm only trying to update the root.
p.add(tree.getModel().getObject().getRoot()); 
TreeModelEvent event = new TreeModelEvent(tree,p.toArray());
tree.treeNodesChanged(event);
});
}
Nothing get updates.
I tried adding customized TreeModelListener however it doesn't get called at 
all.
Any idea or reference to documentation that explain this?
Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax POST stopped because of precondition check

2009-09-16 Thread Rik Overvelde

Hello,

I've got a problem while integrating a JQuery Slider in a project that 
I'm working on. The basic idea is that when the value of the slider 
changes, a hidden textfield is changed as well and the value of this 
textfield is submitted using an AjaxFormComponentUpdatingBehavior. This 
is all working in Firefox, but in IE7 the ajax callback isn't fired.


When the slider is changed I see the following message in the Ajax Debug 
log: *: *INFO: Ajax POST stopped because of precondition check, 
url:?wicket:interface=:3:formulier:opslaanform:pagina:0:element:elementen:0:element:vraagPanelContent:indentContainer:invoer:sliderPanel:slidercontainer:slider:valueField::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true 



The following is the part of the generated HTML that takes care of this:

   
  type="hidden">   
   $('#id2e').slider({min: 0, max: 4, change: function (e, ui)
   { document.getElementById('id28').value = ui.value; var ajaxCall =
   eval(document.getElementById('id28').onchange); ajaxCall(e);},
   steps: 4}).slider('enable');


Does anyone have an idea about what is going wrong here?

Thanks in advance

Rik Overvelde

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org