Re: Apache Logs, Session IDs, and PageExpiredException

2009-06-18 Thread Johan Compagner
What do you mean with sessionid disappears? From the url? Thats basic
tomcat, the first urls are with session id but if session cookie works
it wont append it to the url, or you really have to tell tomcat that
it has to do that everytime.

On 17/06/2009, Jeremy Levy  wrote:
> We see a very similar issue: Between one request to another that happen
> within a matter of seconds / minutes the sessionid disappears.  A lot of our
> traffic is mobile so I assume some of it is crappy browser implementation.
>   We have not been able to reproduce it any meaningful way.
> We have been able to mitigate the effect on our
> users by making as many pages as possible bookmarkable as well as
> including cookie based auto-login.
>
> I have seen other things cause this however, if you are using jvmRoute
> with a node that is down and your don't properly fail over you will
> consistently get this error.
>
> For what it's worth we are using Wicket 1.3.6 (but been anecdotally having
> the issue since 1.3.0 or earlier) in Tomcat/JBoss 4.2.2.
>
> Jeremy
>
>
>
>
>
> On Thu, Jun 11, 2009 at 4:31 PM, Dane Laverty  wrote:
>
>> Thanks for pointing that out. I've tried some other changes, so I'll wait
>> and see how they work out. However, if the problem persists I'll look into
>> the possibility of it being an HTTPS-related issue. That line of reasoning
>> hadn't ever occurred to me.
>>
>> Dane
>>
>> On Thu, Jun 11, 2009 at 1:09 PM, Igor Vaynberg 
>> wrote:
>> >
>> > good catch Jason.
>> >
>> > We have also ran into this when implementing wicket's @RequireHttps
>> > annotation, there is a javadoc section in HttpsRequestCycleProtocol
>> > that talks about this cookie pain.
>> >
>> > -igor
>> >
>> > On Thu, Jun 11, 2009 at 1:03 PM, Jason Lea wrote:
>> > > I notice there are some secure requests there (https)... so I will now
>> > > blindly assume you are having the same problem I had in the past...
>> > >
>> > > I had a problem with session ids changing when trying to swtich
>> > > between
>> > > secure/insecure pages.
>> > > If your first request to a tomcat server is secure, and a session is
>> > > created, tomcat will create a secure session id cookie that will only
>> be
>> > > sent in https requests.  If you request a non-secure (http) page
>> request
>> it
>> > > will not send the cookie, and a new insecure session cookie is
>> > > created.
>> > >
>> > > One way to fix* this is to use a http request filter that checks for
>> new
>> > > session id cookie creation, and writing a new insecure cookie if a
>> secure
>> > > one has been created.  Something like this:
>> > >  http://forum.springsource.org/archive/index.php/t-65651.html
>> > >
>> > > *when I say fix, I mean make the system less secure :)
>> > >
>> > > Igor Vaynberg wrote:
>> > >>
>> > >> yes, a changing sessionid will cause a page expired error because the
>> > >> client all of a sudden gets a new blank session.
>> > >>
>> > >> changing session ids can be caused by either session expiration or a
>> > >> manual session invalidation - like during a logout procedure.
>> > >>
>> > >> you have to figure out what causes the session to get dumped and a
>> > >> new
>> > >> one to be created in your application/servlet container.
>> > >>
>> > >> -igor
>> > >>
>> > >> On Thu, Jun 11, 2009 at 9:56 AM, Dane Laverty
>> > >> wrote:
>> > >>
>> > >>>
>> > >>> I'm trying to track down the source of frequent
>> > >>> PageExpiredExceptions
>> > >>> that
>> > >>> we're getting on our deployment server. One of the errors occured at
>> > >>> 01:28:06 this morning. In the Apache logs, I discovered that the
>> user's
>> > >>> session ID spontaneously changed at that time, (see the change
>> between
>> > >>> lines
>> > >>> 4 & 5 below, and then again between lines 11 & 12). Is that just a
>> > >>> coincidence, or would a changing session ID cause the
>> > >>> PageExpiredException?
>> > >>> And if so, what causes the session ID to change? (I'm using Wicket
>> 1.3.6.
>> > >>> I
>> > >>> can't replicate the errors in development, which sounds common
>> according
>> > >>> to
>> > >>> the several PageExpiredException threads. I'm not seeing any sort of
>> > >>> serialization errors either.) Thanks for your help!
>> > >>>
>> > >>> XXX.XXX.29.22 - - [11/Jun/2009:01:28:03 -0700] "GET
>> > >>> /resources/comp.Comp/Oregon2.jpg HTTP/1.1" 200 22145 "
>> > >>>
>> > >>>
>>
>> https://www.foodhandler.org/login%3bjsessionid=E0381EA98B6C107CD1D4DF8FDE5D88C3
>> > >>> "...
>> > >>> XXX.XXX.29.22 - - [11/Jun/2009:01:28:03 -0700] "GET
>> > >>> /resources/comp.Comp/newVGrad.png HTTP/1.1" 200 48736 "
>> > >>>
>> > >>>
>>
>> https://www.foodhandler.org/login%3bjsessionid=E0381EA98B6C107CD1D4DF8FDE5D88C3
>> > >>> "...
>> > >>> XXX.XXX.29.22 - - [11/Jun/2009:01:28:03 -0700] "GET
>> > >>> /resources/comp.Comp/navBoxBottom.jpg HTTP/1.1" 200 14140 "
>> > >>>
>> > >>>
>>
>> https://www.foodhandler.org/login%3bjsessionid=E0381EA98B6C107CD1D4DF8FDE5D88C3
>> > >>> "...
>> > >>> XXX.XXX.29.22 - - [11/Jun/2009:01:28:05 -0700] "GE

Re: application-level properties not component properties.

2009-06-18 Thread satar

SWEET, I was able to add it to my application bean directly:

  

  

Of course, I have more properties like this but the first example worked as
expected!

Thanks again Igor!!!



satar wrote:
> 
> Wow, thanks for such a blazing fast response Igor! 
> 
> Actually, I am already using the PropertyPlaceholderConfigurer (I think
> this is what you are talking about), and using different filter files for
> my different environments connected through profiles in my pom.xml file.
> Knew none of this stuff 2-3 months ago so I am trying to come to speed
> fast -- thank you Mystic Coders and WIA. 
> 
> I did of course check for the presence of my application.properties file
> within the tomcat webapp dir:
> 
> C:\Program Files\Apache Software Foundation\Tomcat
> 5.5\webapps\bsmatrix-1.0-beta-1\WEB-INF\classes\application.properties
> 
> I really resisted posting as I felt a bit of a failure as I usually can
> comb through these wonderful user groups and find my answer or a clue to
> what I am doing wrong. However, what really caught my interest and I
> didn't think about before is making them beans in my
> applicationContext.xml file with placeholders that my profile filtering
> can take care of just as it would have if I used a .properties file. That
> seems like a more natural way to do such a thing -- course, I didn't know
> what Spring was 6 months ago other than my favorite time of the year so
> who am I to say what is natural. Anyway, I think I will use beans as I am
> pretty certain that approach would work in both Jetty and Tomcat.
> 
> Thanks again Igor, you ROCK!
> -Steve
> 
> 
> igor.vaynberg wrote:
>> 
>> getClass().getClassLoader().getResourceAsStream() has always worked
>> fine for me. also did you check your war and make sure the properties
>> file was packaged?
>> 
>> i see you are using spring? (ApplicationContext) if so you might want
>> to look at propertyconfigurer - it is easy to setup a bean:
>> 
>> > value="${my.port}"/>> 
>> get spring to do replacement based on a properties file or jndi or
>> what have you, and then simple pull the bean out and access properties
>> via getters
>> 
>> -igor
>> 
>> On Thu, Jun 18, 2009 at 10:21 PM, Steve Tarlton
>> wrote:
>>> I hope I finally figured out how to post to this... I am very knew to
>>> Wicket
>>> and web app development but very experience Java client application
>>> developer (Swing). I read Wicket-in-Action pretty much cover-to-cover
>>> and
>>> would highly recommend it to anyone wanting to learn Wicket!
>>>
>>> Anyway, getting to the point here, I see TONS of examples all over the
>>> net
>>> about how to setup a .properties file for a UI component but none really
>>> for
>>> setting some application-level properties. For example, the host path
>>> changes between different push locations for my app. Even on the same
>>> server
>>> I have a Jetty version at 8090 and a tomcat version at 8080. I need to
>>> know
>>> how to call back to my homepage with parameters that our
>>> single-signon-server returns. There are other things like some cgi's add
>>> to
>>> some of my pages with the Include class, which I believe you want at the
>>> very top level of your directory structure as opposed to burried in some
>>> package path.
>>>
>>> So, I though hey, I would just create a Properties instance and load it
>>> up
>>> with a call to the load() method typically so I thought why not try it
>>> beings I read somewhere that I can get an InputStream of a given class
>>> using
>>> the ClassLoader.getSystemResourceAsStream(). I thought I was clever
>>> because
>>> the following WORKED through Jetty:
>>>
>>> public class MatrixApplication extends WebApplication {
>>>
>>>  private ApplicationContext ctx;
>>>
>>>  // some global application-level properties
>>>  private Properties applicationProperites;
>>>
>>>  private static final String DEFAULT_HOST = "http://localhost:8090/";;
>>>
>>>  /**
>>>   * Constructor
>>>   */
>>>  public MatrixApplication() {
>>>  }
>>>
>>>
>>> �...@override
>>>  protected void init() {
>>>    /*
>>>     * This instructs Wicket to temporarily redirect an incoming request
>>> to
>>> in
>>>     * internal Wicket page that will gather the extended browser info so
>>> I
>>> can pull
>>>     * local timezone from client browser.
>>>     */
>>>    getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
>>>
>>>    /*
>>>     * A special component instantiation listener that analyzes
>>> components
>>> that
>>>     * get constructed and injects proxies for all the
>>> Spring-bean-annotated
>>>     * members it finds.
>>>     *
>>>     * Note: This is required if using @SpringBean annotations.
>>>     */
>>>    addComponentInstantiationListener(new SpringComponentInjector(this));
>>>
>>>    /*
>>>     * Remove the wicket tags from the final output when rendering the
>>> pages
>>>     */
>>>    getMarkupSettings().setStripWicketTags(true);
>>>
>>>    /*
>>>     * Note: Saw this in the Mystic Coder's example. I think it is a way
>

Re: TinyMCE bug: http://readystate4.com/2009/05/15/tinymce-typeerror-twindocument-is-null-in-firebug-console/

2009-06-18 Thread Per Lundholm
Possible to use the close-callback of Modalwindow?

http://wicket.apache.org/docs/1.4/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html#setCloseButtonCallback(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.CloseButtonCallback)

/Per
On Fri, Jun 19, 2009 at 2:45 AM, Fernando
Wermus wrote:
> I am trying to run a TinyMCE in a ModalWindow. If the modalWindow is closed
> TinyMCE requires removes some instances through its api:
>
> tinyMCE.execCommand('mceRemoveControl', false, 'idTextArea');
> tinyMCE.execCommand('mceAddControl', false, 'idTextArea');
>
> But modalWindow close button didn't inform anything to its content. Thus I
> don't find a way to run this two sentences by tinyMCEBehavior.
>
> thanks
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>

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



AjaxSubmitLink

2009-06-18 Thread jpalmer1026





I am trying to use an AjaxSubmitLink to show a panel when a button is clicked. I am receiving the following error when I try to submit the form:Wicket.Ajax.Call.processComponent: Component with id [[verifyPanelWmc9]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.My code is as follows:public class InitiateDeclarationPage extends EzdecBaseWebPage {    @SpringBean    private IDeclarationService declarationService;    public InitiateDeclarationPage() {    final Declaration declaration = new Declaration(EzdecSession.getCurrentUser().getAccount(),    EzdecSession.getCurrentUser(), "", County.COOK, State.ILLINOIS);    add(new FeedbackPanel("feedback"));    final Form form = new Form("initiateDeclarationForm", new CompoundPropertyModel(declaration));        form.add(new Button("submitButton") {    @Override    public void onSubmit() {    Declaration declaration = (Declaration) form.getModelObject();    declaration.setStatus(Status.OPEN);    ParcelIdentification pin = declarationService.findParcelIdentification(declaration.getPin());    if (pin == null) {    error("No PIN found for PIN " + getFormattedPIN(declaration.getPin()));    } else {    if (declarationService.initiateDeclaration(declaration)) {    EzdecSession.get().info("Declaration " + declaration.getTxNumber() + " created");    setResponsePage(new DeclarationPage(declaration, 0, pin));    } else {    error("Creating declaration with PIN: " + declaration.getPin());    }    }    }    });    final EzdecRequiredTextField pinText = new EzdecRequiredTextField("pin");    form.add(pinText);        form.add(new DropDownChoice("county", Arrays.asList(County.values())) .setRequired(true) .setEnabled(false));    final WebMarkupContainer parent = new WebMarkupContainer("verifyPanelWmc");//    parent.setOutputMarkupId(true);    parent.setVisible(false);    form.add(parent);    AjaxSubmitLink verifyPinLink = new AjaxSubmitLink("verifyPinLink") {    @Override    public void onSubmit(AjaxRequestTarget target, Form form) {    Declaration declaration = (Declaration) form.getModelObject();    ParcelIdentification pid = declarationService.findParcelIdentification(declaration.getPin());    if (pid == null) {    error("No PIN found for PIN " + declaration.getPin());    } else {//    parent.setOutputMarkupId(true);    InitiateDeclarationVerifyPanel decVerifyPanel = new InitiateDeclarationVerifyPanel("verifyPanel", pid);    decVerifyPanel.setOutputMarkupId(true);    decVerifyPanel.setVisible(true);    parent.add(decVerifyPanel);    parent.setVisible(true);    target.addComponent(decVerifyPanel);//    target.addComponent(parent);    }    }    };    form.add(verifyPinLink);    add(form);    }}Anyone know how I can get around this?






Re: Hibernate Transactions and Wicket

2009-06-18 Thread vineet semwal
lazy initialization exception happens whens you try to initialize a object
(generally collection)
and hibernate session is already closed.
merge is not recommended  ,it attaches a object back to hibernate session +
also cause database update( why will you update a object when you actually
need to read a collection also what are the chances that it won't give you
the same lazy initialized exception again as hibernate session can be closed
before you try to access the collection.)

Simple solutions
1) eager fetch the collection if it's small.
2)For a big collection, write a method in  data access layer  that retrieves
collection/association( initialize the collection this time).
   you can also do  database paging  in this case.

regards,
vineet semwal

On Fri, Jun 19, 2009 at 11:13 AM, Ryan  wrote:

> I have been reading Nick Wiedenbrueck's blog, specifically about
> patterns and pitfalls when using wicket with spring and hibernate.
>
> It seems fairly common for programmers to run into the "issue" of having
> entities persisted to the database at unexpected times. This happens
> when a transaction is closed and the hibernate session is flushed.
> Certainly this issue is not specific to using Wicket with spring and
> hibernate, but I think it is common enough to warrant some attention.
>
> There are a few suggestions to solving this problem:
>
> 1) Use DTOs
> 2) Make sure validation happens in wicket so the object is not modified
> 3) Clear the hibernate session or throw exceptions at just the right
> times
>
> I think all of these have some issues. Using DTOs is code heavy.
> Validating entirely in wicket is not always an option (sometimes the
> service tier needs to do some extended business validation). Clearing
> the hibernate session or throwing exceptions will cause Lazy
> Initialization exceptions if not used carefully (which can be hard when
> you do not control all the components on a page)
>
> I wanted to share one solution I have used and see what others think.
>
> I mark all of my transactional methods (usually in the service) as read
> only. I then define a set of "persist" methods (usually on a DAO) that
> are marked as REQUIRES_NEW and are not read only. When I am ready to
> persist an object it is passed to one of these methods and merged into
> the session. This effectively persists the object. Some of these persist
> methods can take a collection of objects so that they can be persisted
> efficiently in one transaction. So far this has worked well for me.
>
> Does anyone have any thoughts on this method or can share some other
> techniques?
>
> Thanks,
> Ryan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: application-level properties not component properties.

2009-06-18 Thread satar

Wow, thanks for such a blazing fast response Igor! 

Actually, I am already using the PropertyPlaceholderConfigurer (I think this
is what you are talking about), and using different filter files for my
different environments connected through profiles in my pom.xml file. Knew
none of this stuff 2-3 months ago so I am trying to come to speed fast --
thank you Mystic Coders and WIA. 

I did of course check for the presence of my application.properties file
within the tomcat webapp dir:

C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\bsmatrix-1.0-beta-1\WEB-INF\classes\application.properties

I really resisted posting as I felt a bit of a failure as I usually can comb
through these wonderful user groups and find my answer or a clue to what I
am doing wrong. However, what really caught my interest and I didn't think
about before is making them beans in my applicationContext.xml file with
placeholders that my profile filtering can take care of just as it would
have if I used a .properties file. That seems like a more natural way to do
such a thing -- course, I didn't know what Spring was 6 months ago other
than my favorite time of the year so who am I to say what is natural.
Anyway, I think I will use beans as I am pretty certain that approach would
work in both Jetty and Tomcat.

Thanks again Igor, you ROCK!
-Steve


igor.vaynberg wrote:
> 
> getClass().getClassLoader().getResourceAsStream() has always worked
> fine for me. also did you check your war and make sure the properties
> file was packaged?
> 
> i see you are using spring? (ApplicationContext) if so you might want
> to look at propertyconfigurer - it is easy to setup a bean:
> 
>  value="${my.port}"/> 
> get spring to do replacement based on a properties file or jndi or
> what have you, and then simple pull the bean out and access properties
> via getters
> 
> -igor
> 
> On Thu, Jun 18, 2009 at 10:21 PM, Steve Tarlton wrote:
>> I hope I finally figured out how to post to this... I am very knew to
>> Wicket
>> and web app development but very experience Java client application
>> developer (Swing). I read Wicket-in-Action pretty much cover-to-cover and
>> would highly recommend it to anyone wanting to learn Wicket!
>>
>> Anyway, getting to the point here, I see TONS of examples all over the
>> net
>> about how to setup a .properties file for a UI component but none really
>> for
>> setting some application-level properties. For example, the host path
>> changes between different push locations for my app. Even on the same
>> server
>> I have a Jetty version at 8090 and a tomcat version at 8080. I need to
>> know
>> how to call back to my homepage with parameters that our
>> single-signon-server returns. There are other things like some cgi's add
>> to
>> some of my pages with the Include class, which I believe you want at the
>> very top level of your directory structure as opposed to burried in some
>> package path.
>>
>> So, I though hey, I would just create a Properties instance and load it
>> up
>> with a call to the load() method typically so I thought why not try it
>> beings I read somewhere that I can get an InputStream of a given class
>> using
>> the ClassLoader.getSystemResourceAsStream(). I thought I was clever
>> because
>> the following WORKED through Jetty:
>>
>> public class MatrixApplication extends WebApplication {
>>
>>  private ApplicationContext ctx;
>>
>>  // some global application-level properties
>>  private Properties applicationProperites;
>>
>>  private static final String DEFAULT_HOST = "http://localhost:8090/";;
>>
>>  /**
>>   * Constructor
>>   */
>>  public MatrixApplication() {
>>  }
>>
>>
>> �...@override
>>  protected void init() {
>>    /*
>>     * This instructs Wicket to temporarily redirect an incoming request
>> to
>> in
>>     * internal Wicket page that will gather the extended browser info so
>> I
>> can pull
>>     * local timezone from client browser.
>>     */
>>    getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
>>
>>    /*
>>     * A special component instantiation listener that analyzes components
>> that
>>     * get constructed and injects proxies for all the
>> Spring-bean-annotated
>>     * members it finds.
>>     *
>>     * Note: This is required if using @SpringBean annotations.
>>     */
>>    addComponentInstantiationListener(new SpringComponentInjector(this));
>>
>>    /*
>>     * Remove the wicket tags from the final output when rendering the
>> pages
>>     */
>>    getMarkupSettings().setStripWicketTags(true);
>>
>>    /*
>>     * Note: Saw this in the Mystic Coder's example. I think it is a way
>> to
>>     * mount a page to a specific path, which could be kewl
>>     */
>>    // mountBookmarkablePage("/home", HomePage.class);
>>    /*
>>     * Added the following from Mystic Coder's example. Will need to
>> analyze
>> and
>>     * understand at some point.
>>     */
>>    // start
>>    ServletContext servletContext = super.getServletContext();
>>    ctx =

Hibernate Transactions and Wicket

2009-06-18 Thread Ryan
I have been reading Nick Wiedenbrueck's blog, specifically about
patterns and pitfalls when using wicket with spring and hibernate.

It seems fairly common for programmers to run into the "issue" of having
entities persisted to the database at unexpected times. This happens
when a transaction is closed and the hibernate session is flushed.
Certainly this issue is not specific to using Wicket with spring and
hibernate, but I think it is common enough to warrant some attention.

There are a few suggestions to solving this problem:

1) Use DTOs
2) Make sure validation happens in wicket so the object is not modified
3) Clear the hibernate session or throw exceptions at just the right
times

I think all of these have some issues. Using DTOs is code heavy.
Validating entirely in wicket is not always an option (sometimes the
service tier needs to do some extended business validation). Clearing
the hibernate session or throwing exceptions will cause Lazy
Initialization exceptions if not used carefully (which can be hard when
you do not control all the components on a page)

I wanted to share one solution I have used and see what others think.

I mark all of my transactional methods (usually in the service) as read
only. I then define a set of "persist" methods (usually on a DAO) that
are marked as REQUIRES_NEW and are not read only. When I am ready to
persist an object it is passed to one of these methods and merged into
the session. This effectively persists the object. Some of these persist
methods can take a collection of objects so that they can be persisted
efficiently in one transaction. So far this has worked well for me.

Does anyone have any thoughts on this method or can share some other
techniques?

Thanks,
Ryan

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



Re: application-level properties not component properties.

2009-06-18 Thread Igor Vaynberg
getClass().getClassLoader().getResourceAsStream() has always worked
fine for me. also did you check your war and make sure the properties
file was packaged?

i see you are using spring? (ApplicationContext) if so you might want
to look at propertyconfigurer - it is easy to setup a bean:

 wrote:
> I hope I finally figured out how to post to this... I am very knew to Wicket
> and web app development but very experience Java client application
> developer (Swing). I read Wicket-in-Action pretty much cover-to-cover and
> would highly recommend it to anyone wanting to learn Wicket!
>
> Anyway, getting to the point here, I see TONS of examples all over the net
> about how to setup a .properties file for a UI component but none really for
> setting some application-level properties. For example, the host path
> changes between different push locations for my app. Even on the same server
> I have a Jetty version at 8090 and a tomcat version at 8080. I need to know
> how to call back to my homepage with parameters that our
> single-signon-server returns. There are other things like some cgi's add to
> some of my pages with the Include class, which I believe you want at the
> very top level of your directory structure as opposed to burried in some
> package path.
>
> So, I though hey, I would just create a Properties instance and load it up
> with a call to the load() method typically so I thought why not try it
> beings I read somewhere that I can get an InputStream of a given class using
> the ClassLoader.getSystemResourceAsStream(). I thought I was clever because
> the following WORKED through Jetty:
>
> public class MatrixApplication extends WebApplication {
>
>  private ApplicationContext ctx;
>
>  // some global application-level properties
>  private Properties applicationProperites;
>
>  private static final String DEFAULT_HOST = "http://localhost:8090/";;
>
>  /**
>   * Constructor
>   */
>  public MatrixApplication() {
>  }
>
>
> �...@override
>  protected void init() {
>    /*
>     * This instructs Wicket to temporarily redirect an incoming request to
> in
>     * internal Wicket page that will gather the extended browser info so I
> can pull
>     * local timezone from client browser.
>     */
>    getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
>
>    /*
>     * A special component instantiation listener that analyzes components
> that
>     * get constructed and injects proxies for all the Spring-bean-annotated
>     * members it finds.
>     *
>     * Note: This is required if using @SpringBean annotations.
>     */
>    addComponentInstantiationListener(new SpringComponentInjector(this));
>
>    /*
>     * Remove the wicket tags from the final output when rendering the pages
>     */
>    getMarkupSettings().setStripWicketTags(true);
>
>    /*
>     * Note: Saw this in the Mystic Coder's example. I think it is a way to
>     * mount a page to a specific path, which could be kewl
>     */
>    // mountBookmarkablePage("/home", HomePage.class);
>    /*
>     * Added the following from Mystic Coder's example. Will need to analyze
> and
>     * understand at some point.
>     */
>    // start
>    ServletContext servletContext = super.getServletContext();
>    ctx =
> WebApplicationContextUtils.getWebApplicationContext(servletContext);
>
>    org.apache.wicket.util.lang.Objects
>        .setObjectStreamFactory(new
> IObjectStreamFactory.DefaultObjectStreamFactory());
>    // end
>
>    // load our application properties so we can access them if needed
>    loadProperties();
>  }
>
> ...
>
>  private void loadProperties() {
>    /*
>     * Load in the properties found in the application.properties file.
>     */
>    this.getClass().getClassLoader();
>    System.out.println("Going for the resource");
>    InputStream is = ClassLoader
>        .getSystemResourceAsStream("application.properties");
>    System.out.println("Finished the resource");
>    if (is == null) {
>      System.err.println("The application.properties file is missing.");
>    } else {
>      try {
>        applicationProperites = new Properties();
>        applicationProperites.load(is);
>      } catch (IOException e1) {
>        e1.printStackTrace();
>      }
>    }
>  }
>
>
> So calling the loadProperties() from the startup of the app worked just as I
> had hoped when using Jetty BUT when I distributed it to a webapp under
> Tomcat, it failed to find the "application.properties" file. I am assuming
> because the classpath is different but not sure how that can be if my app
> works fine otherwise under Tomcat. Saw no problems until I introduced my
> external properties file as opposed to having it embedded in the code.
> Please help even if it means calling me an idiot and clueing me in on the
> right way to handle such a problem.
>
> Thanks,
> -Steve
>

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

application-level properties not component properties.

2009-06-18 Thread Steve Tarlton
I hope I finally figured out how to post to this... I am very knew to Wicket
and web app development but very experience Java client application
developer (Swing). I read Wicket-in-Action pretty much cover-to-cover and
would highly recommend it to anyone wanting to learn Wicket!

Anyway, getting to the point here, I see TONS of examples all over the net
about how to setup a .properties file for a UI component but none really for
setting some application-level properties. For example, the host path
changes between different push locations for my app. Even on the same server
I have a Jetty version at 8090 and a tomcat version at 8080. I need to know
how to call back to my homepage with parameters that our
single-signon-server returns. There are other things like some cgi's add to
some of my pages with the Include class, which I believe you want at the
very top level of your directory structure as opposed to burried in some
package path.

So, I though hey, I would just create a Properties instance and load it up
with a call to the load() method typically so I thought why not try it
beings I read somewhere that I can get an InputStream of a given class using
the ClassLoader.getSystemResourceAsStream(). I thought I was clever because
the following WORKED through Jetty:

public class MatrixApplication extends WebApplication {

  private ApplicationContext ctx;

  // some global application-level properties
  private Properties applicationProperites;

  private static final String DEFAULT_HOST = "http://localhost:8090/";;

  /**
   * Constructor
   */
  public MatrixApplication() {
  }


  @Override
  protected void init() {
/*
 * This instructs Wicket to temporarily redirect an incoming request to
in
 * internal Wicket page that will gather the extended browser info so I
can pull
 * local timezone from client browser.
 */
getRequestCycleSettings().setGatherExtendedBrowserInfo(true);

/*
 * A special component instantiation listener that analyzes components
that
 * get constructed and injects proxies for all the Spring-bean-annotated
 * members it finds.
 *
 * Note: This is required if using @SpringBean annotations.
 */
addComponentInstantiationListener(new SpringComponentInjector(this));

/*
 * Remove the wicket tags from the final output when rendering the pages
 */
getMarkupSettings().setStripWicketTags(true);

/*
 * Note: Saw this in the Mystic Coder's example. I think it is a way to
 * mount a page to a specific path, which could be kewl
 */
// mountBookmarkablePage("/home", HomePage.class);
/*
 * Added the following from Mystic Coder's example. Will need to analyze
and
 * understand at some point.
 */
// start
ServletContext servletContext = super.getServletContext();
ctx =
WebApplicationContextUtils.getWebApplicationContext(servletContext);

org.apache.wicket.util.lang.Objects
.setObjectStreamFactory(new
IObjectStreamFactory.DefaultObjectStreamFactory());
// end

// load our application properties so we can access them if needed
loadProperties();
  }

...

  private void loadProperties() {
/*
 * Load in the properties found in the application.properties file.
 */
this.getClass().getClassLoader();
System.out.println("Going for the resource");
InputStream is = ClassLoader
.getSystemResourceAsStream("application.properties");
System.out.println("Finished the resource");
if (is == null) {
  System.err.println("The application.properties file is missing.");
} else {
  try {
applicationProperites = new Properties();
applicationProperites.load(is);
  } catch (IOException e1) {
e1.printStackTrace();
  }
}
  }


So calling the loadProperties() from the startup of the app worked just as I
had hoped when using Jetty BUT when I distributed it to a webapp under
Tomcat, it failed to find the "application.properties" file. I am assuming
because the classpath is different but not sure how that can be if my app
works fine otherwise under Tomcat. Saw no problems until I introduced my
external properties file as opposed to having it embedded in the code.
Please help even if it means calling me an idiot and clueing me in on the
right way to handle such a problem.

Thanks,
-Steve


Re: JDeveloper - Can I get a show of hands?

2009-06-18 Thread Ryan Gravener
http://instantcrickets.com
Ryan Gravener
http://bit.ly/no_word_docs


On Thu, Jun 18, 2009 at 7:12 PM, Nick Heudecker wrote:

> JDeveloper?
>
> *crickets*
>
> :)
>
> --
> Nick Heudecker
> Professional Wicket Training & Consulting
> http://www.systemmobile.com
>


Re: Wicket and Single Sign-on?

2009-06-18 Thread Igor Vaynberg
saying that you will use MAC doesnt really say HOW you are going to
implement sso.

if you are going to use CAS, at least from what i understand of it,
here is one way the integration can work:

user is on a page
they click a link that requires login
your iauthorizationstrategy implementation detects that next action
requires login, it checks for CAS token, doesnt see it, it then
records the current url and issues a 302 to CAS passing in the current
url as a callback

user sees CAS login page
user authenticates
CAS redirects back to the callback url

the url again causes your iauthorizationstrategy implementation to
wake up. this time it sees the CAS token and lets the action proceed.

-igor

On Thu, Jun 18, 2009 at 7:51 PM, Jeff Longland wrote:
> I'm relatively new to Wicket and trying not to carry forward any
> preconceived notions from other frameworks.  What is the
> suggested/preferred means of authenticating single sign-on requests
> from another application?  In particular, I'm thinking about MAC
> (http://en.wikipedia.org/wiki/Message_authentication_code) but could
> potentially use a proper single sign-on framework ala CAS.  I've
> searched the list and saw some mention of using a servlet filter?  Any
> guidance would be appreciated.
>
> Thanks,
> Jeff
>
> -
> 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



Wicket and Single Sign-on?

2009-06-18 Thread Jeff Longland
I'm relatively new to Wicket and trying not to carry forward any
preconceived notions from other frameworks.  What is the
suggested/preferred means of authenticating single sign-on requests
from another application?  In particular, I'm thinking about MAC
(http://en.wikipedia.org/wiki/Message_authentication_code) but could
potentially use a proper single sign-on framework ala CAS.  I've
searched the list and saw some mention of using a servlet filter?  Any
guidance would be appreciated.

Thanks,
Jeff

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




TinyMCE bug: http://readystate4.com/2009/05/15/tinymce-typeerror-twindocument-is-null-in-firebug-console/

2009-06-18 Thread Fernando Wermus
I am trying to run a TinyMCE in a ModalWindow. If the modalWindow is closed
TinyMCE requires removes some instances through its api:

tinyMCE.execCommand('mceRemoveControl', false, 'idTextArea');
tinyMCE.execCommand('mceAddControl', false, 'idTextArea');

But modalWindow close button didn't inform anything to its content. Thus I
don't find a way to run this two sentences by tinyMCEBehavior.

thanks

-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Wicket Date Field Validation

2009-06-18 Thread wicketQ

Hi Matt,

yay!! It works!!

Thank you very much!




Matthias Keller wrote:
> 
> 
> Rao Archana (HCTM/ETA) wrote:
>> Hi,
>>
>> I am working on date fields and have problems with the validation. I
>> have referred to the link below which helped me.
>>
>> http://www.nabble.com/Strict-4-digit-year-for-DateTextField--td18656889.
>> html
>>
>>
>> So I have subclassed the PatternDateConverter and have set the pattern
>> as,
>> dateFormat = "^(\\d{1,2})/(\\d{1,2})/(\\d{4})$";
>>
>> I have 2 date fields, start_date and end_date. The start_date is a
>> required field and the end_date is not.
>> (...)
>> This works fine ie it does not allow entry of "03/03/09" or
>> "03/03/-2009"
>>
>> BUT, the end_date becomes a required field. I have to enter the end_date
>> to click 'Save'. Else it complains that an invalid date has been
>> entered.
>> But my end_date is not a required field.
>> (...)
>>   
> Possibly the simplest approach would be to use a regular expression that 
> allows an empty string like making the whole expression optional by 
> surrounding it with paranthesis and adding the optional operator '?' 
> after it. This allows the empty string OR a valid date but nothing else:
> dateFormat = "^((\\d{1,2})/(\\d{1,2})/(\\d{4}))?$";
> 
> Matt
> 
> -- 
> matthias.kel...@ergon.ch  +41 44 268 83 98
> Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
> http://www.ergon.ch
> __
> e r g o nsmart people - smart software
> 
> 
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Date-Field-Validation-tp24087119p24099701.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: JDeveloper - Can I get a show of hands?

2009-06-18 Thread Nick Heudecker
JDeveloper?

*crickets*

:)

-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com


JDeveloper - Can I get a show of hands?

2009-06-18 Thread Dane Laverty
Our management has chosen to make JDeveloper 11g the required IDE for
the department. Searching the Wicket mailing list archives, I find
that there is very little discussion about JDev. I'd be interested to
know, are any of you currently using JDeveloper as your main Wicket
IDE?

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



Re: [announce] Wicket 1.4-RC5 released

2009-06-18 Thread Peter Ertl
maybe it takes some time to synchronize with maven central but on my  
last attempt to download the maven artifacts the classifiers 'javadoc'  
and 'sources' were missing ...


besides that it's great to see the final release getting closer :-)


Am 18.06.2009 um 23:06 schrieb Jeremy Thomerson:

The Apache Wicket team is proud to announce the availability of the  
fifth
release candidate for the newest version of Wicket - 1.4.  A lot of  
bugs
have been squashed and several improvements implemented.  If you are  
already

using earlier versions of 1.4, it is recommended you update to Wicket
1.4-rc5 at your earliest convenience.

Eager people click here to download the distribution, others can read
further:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5

We thank you for your patience and support.

- The Wicket Team


Apache Wicket

Apache Wicket is a component oriented Java web application  
framework. With

proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps  
simple and
enjoyable again. Swap the boilerplate, complex debugging and brittle  
code

for powerful, reusable components written with plain Java and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org


This release

This release is the fifth release candidate for the Wicket 1.4  
product.
This release fixes several bugs and adds some minor improvements.   
You can

find out about the changes at the bottom of this announcement.


Migrating from 1.3

If you are coming from Wicket 1.3, you really want to read our  
migration

guide found on the wiki:

http://cwiki.apache.org/WICKET/migrate-14.html


Downloading the release:

You can download the release from the official Apache mirror system,  
and you

can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5/

For the Maven and Ivy fans out there: update your pom's to the  
following,

and everything will be downloaded automatically:


org.apache.wicket
wicket
1.4-rc5


Substitute the artifact ID with the projects of your liking to get  
the other

projects.

Please note that we don't prescribe a Logging implementation for  
SLF4J. You

need to specify yourself which one you prefer. Read more
about SLF4J here:

http://slf4j.org


Validating the release

The release has been signed by Jeremy Thomerson, your release  
manager for
today. The public key can be found in the KEYS file in the download  
area.

Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.4-rc5/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity


Reporting bugs

In case you do encounter a bug, we would appreciate a report in our  
JIRA:


http://issues.apache.org/jira/browse/WICKET


The distribution

In the distribution you will find a README. The README contains  
instructions
on how to build from source yourself. You also find a CHANEGELOG-1.4  
which
contains a list of all things that have been fixed, added and/or  
removed

since the 1.4 branch was created.


Release Notes - Wicket - Version 1.4-RC5

** Bug
  * [WICKET-1912] - StatelessForm problems with query string
  * [WICKET-1922] - AbstractTree - setting root to null causes
NullPointerException
  * [WICKET-2033] - & instead of & in javascript
  * [WICKET-2123] -
org.apache.wicket.util.convert.converters.SqlTimestampConverter only  
renders

the time part of the timestamp
  * [WICKET-2133] - DatePicker inserts incorrect format date
  * [WICKET-2188] - PropertyResolver$ArrayPropertyGetSet does not call
setAccessible(true) on method
  * [WICKET-2245] - PageParameters always non-empty
  * [WICKET-2259] - The JavaDoc for IPageLink still holds a  
reference to

PageLink which is deprecated
  * [WICKET-2261] - wicketTester.executeAjaxEvent(combo,  
"onchange"); works

with 1.4-rc1 but not anymore with 1.4-rc2
  * [WICKET-2270] - GET/POST mismatch with stateless page/form.
  * [WICKET-2272] - open/close div tags are rendered erroneously
  * [WICKET-2273] - wicket-devutils is missing in wicket-assembly- 
all.xml

and not mentioned in README
  * [WICKET-2274] - WicketTester.executeAjaxEvent(AjaxButton,  
"onclick");
results in clicking of another submit button if its model value is  
not null.

  * [WICKET-2276] - isComponent in BaseWicketTester contains possible
nullpointer exception
  * [WICKET-2277] - Radio#onComponentTag uses Objects.equal instead of
model comparator
  * [WICKET-2278] - StatelessChecker is always offended
  * [WICKET-2281] - MockHttpServletRequest is broken when used with
CryptedUrlWebRequestCodingStrategy
  * [WICKET-2286] - proper onBeforeRender() for NavigationToolbar
  * [WICKET-2292] - TabbedPanel uses too much generics (revert  
WICKET-2153)

  * [WICKET-2301] - When injecting more than one parm in a method, an
ArrayIndexOutOfBoundsException is thrown
  * [WICKET-2303] - [devutils] LiveSessi

Re: Turning off ModificationWatcher

2009-06-18 Thread Igor Vaynberg
or you can add an rfe into jira to make it more open...

-igor

On Thu, Jun 18, 2009 at 3:11 PM, cretzel wrote:
>
> This way you won't get no exceptions any more, but it's also terrible to
> develop without ModificationWatching. GAE does not allow spawning threads
> even in the local development environment.
>
> I tried to use my own implementation of a modification watcher, that does
> not spawn any threads but instead it does the modification watching before
> every request. Unfortunately it's not possible to replace the default
> ModificationWatcher in Wicket, because it's got dependencies to the concrete
> default ModificationWatcher and that is final, so you can't replace it with
> another implementation.
>
> You can work around this by doing some classpath messing and put your own
> ModificationWatcher implementation in your project into same package
> org.apache.wicket.util.watch of the Wicket ModificationWatcher see
> http://kimenye.blogspot.com/2009/06/google-app-engine-wicket.html here .
>
> Would be nice if Wicket relied on an interface IModificationWatcher in
> future versions, so that it can be replaced by a customized version. Or
> don't make it final.
>
> - cretzel
>
>
>
> Jonathan Locke wrote:
>>
>>
>> not sure, but try getResourceSettings().setResourcePollFrequency(null) in
>> your app init
>>
>>
>> Matt Welch wrote:
>>>
>>> I'm experimenting with Wicket inside Google's new Java support for its
>>> App
>>> Engine. My simple apps run fine if the configuration is set to
>>> DEPLOYMENT,
>>> however in development mode, I get an exception related to
>>> ModificationWatcher. Looking at the exception I think this
>>> ModificationWatcher is being used as part of a new thread which is a
>>> no-no
>>> inside the App Engine sandbox. Is there way way to just disbable this
>>> modification watcher without putting the entire app in deployment mode?
>>> There are a number of items I like about development mode but this one
>>> glitch is preventing me from using it.
>>>
>>> Matt
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p24099680.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
>
>

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



Re: Turning off ModificationWatcher

2009-06-18 Thread cretzel

This way you won't get no exceptions any more, but it's also terrible to
develop without ModificationWatching. GAE does not allow spawning threads
even in the local development environment.

I tried to use my own implementation of a modification watcher, that does
not spawn any threads but instead it does the modification watching before
every request. Unfortunately it's not possible to replace the default
ModificationWatcher in Wicket, because it's got dependencies to the concrete
default ModificationWatcher and that is final, so you can't replace it with
another implementation.

You can work around this by doing some classpath messing and put your own
ModificationWatcher implementation in your project into same package
org.apache.wicket.util.watch of the Wicket ModificationWatcher see 
http://kimenye.blogspot.com/2009/06/google-app-engine-wicket.html here .

Would be nice if Wicket relied on an interface IModificationWatcher in
future versions, so that it can be replaced by a customized version. Or
don't make it final.

- cretzel



Jonathan Locke wrote:
> 
> 
> not sure, but try getResourceSettings().setResourcePollFrequency(null) in
> your app init
> 
> 
> Matt Welch wrote:
>> 
>> I'm experimenting with Wicket inside Google's new Java support for its
>> App
>> Engine. My simple apps run fine if the configuration is set to
>> DEPLOYMENT,
>> however in development mode, I get an exception related to
>> ModificationWatcher. Looking at the exception I think this
>> ModificationWatcher is being used as part of a new thread which is a
>> no-no
>> inside the App Engine sandbox. Is there way way to just disbable this
>> modification watcher without putting the entire app in deployment mode?
>> There are a number of items I like about development mode but this one
>> glitch is preventing me from using it.
>> 
>> Matt
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Turning-off-ModificationWatcher-tp22963478p24099680.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



[announce] Wicket 1.4-RC5 released

2009-06-18 Thread Jeremy Thomerson
The Apache Wicket team is proud to announce the availability of the fifth
release candidate for the newest version of Wicket - 1.4.  A lot of bugs
have been squashed and several improvements implemented.  If you are already
using earlier versions of 1.4, it is recommended you update to Wicket
1.4-rc5 at your earliest convenience.

Eager people click here to download the distribution, others can read
further:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5

We thank you for your patience and support.

- The Wicket Team


Apache Wicket

Apache Wicket is a component oriented Java web application framework. With
proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps simple and
enjoyable again. Swap the boilerplate, complex debugging and brittle code
for powerful, reusable components written with plain Java and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org


This release

This release is the fifth release candidate for the Wicket 1.4 product.
This release fixes several bugs and adds some minor improvements.  You can
find out about the changes at the bottom of this announcement.


Migrating from 1.3

If you are coming from Wicket 1.3, you really want to read our migration
guide found on the wiki:

http://cwiki.apache.org/WICKET/migrate-14.html


Downloading the release:

You can download the release from the official Apache mirror system, and you
can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5/

For the Maven and Ivy fans out there: update your pom's to the following,
and everything will be downloaded automatically:


 org.apache.wicket
 wicket
 1.4-rc5


Substitute the artifact ID with the projects of your liking to get the other
projects.

Please note that we don't prescribe a Logging implementation for SLF4J. You
need to specify yourself which one you prefer. Read more
about SLF4J here:

http://slf4j.org


Validating the release

The release has been signed by Jeremy Thomerson, your release manager for
today. The public key can be found in the KEYS file in the download area.
Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.4-rc5/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity


Reporting bugs

In case you do encounter a bug, we would appreciate a report in our JIRA:

http://issues.apache.org/jira/browse/WICKET


The distribution

In the distribution you will find a README. The README contains instructions
on how to build from source yourself. You also find a CHANEGELOG-1.4 which
contains a list of all things that have been fixed, added and/or removed
since the 1.4 branch was created.


Release Notes - Wicket - Version 1.4-RC5

** Bug
   * [WICKET-1912] - StatelessForm problems with query string
   * [WICKET-1922] - AbstractTree - setting root to null causes
NullPointerException
   * [WICKET-2033] - & instead of & in javascript
   * [WICKET-2123] -
org.apache.wicket.util.convert.converters.SqlTimestampConverter only renders
the time part of the timestamp
   * [WICKET-2133] - DatePicker inserts incorrect format date
   * [WICKET-2188] - PropertyResolver$ArrayPropertyGetSet does not call
setAccessible(true) on method
   * [WICKET-2245] - PageParameters always non-empty
   * [WICKET-2259] - The JavaDoc for IPageLink still holds a reference to
PageLink which is deprecated
   * [WICKET-2261] - wicketTester.executeAjaxEvent(combo, "onchange"); works
with 1.4-rc1 but not anymore with 1.4-rc2
   * [WICKET-2270] - GET/POST mismatch with stateless page/form.
   * [WICKET-2272] - open/close div tags are rendered erroneously
   * [WICKET-2273] - wicket-devutils is missing in wicket-assembly-all.xml
and not mentioned in README
   * [WICKET-2274] - WicketTester.executeAjaxEvent(AjaxButton, "onclick");
results in clicking of another submit button if its model value is not null.
   * [WICKET-2276] - isComponent in BaseWicketTester contains possible
nullpointer exception
   * [WICKET-2277] - Radio#onComponentTag uses Objects.equal instead of
model comparator
   * [WICKET-2278] - StatelessChecker is always offended
   * [WICKET-2281] - MockHttpServletRequest is broken when used with
CryptedUrlWebRequestCodingStrategy
   * [WICKET-2286] - proper onBeforeRender() for NavigationToolbar
   * [WICKET-2292] - TabbedPanel uses too much generics (revert WICKET-2153)
   * [WICKET-2301] - When injecting more than one parm in a method, an
ArrayIndexOutOfBoundsException is thrown
   * [WICKET-2303] - [devutils] LiveSessionsPage is broken
   * [WICKET-2304] - [devutils] RequestsPage is broken
   * [WICKET-2305] - [devutils] Can only inspect pages in same pagemap as
the inspector
   * [WICKET-2308] - Append lastmodified to Resources shouldnt append when
the resource is a directory (ends with /)
   * [WICKET-2309] - ClassCastException in SqlDateConverter
   * 

Re: ResourceReference not locale aware?

2009-06-18 Thread Jeremy Thomerson
Possible, but hard to believe that no one else has reported.  Could
you create a quickstart and attach it to a JIRA issue, then post the
issue number back to this thread so that we can look into it?

Thanks!

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




On Wed, Jun 17, 2009 at 9:34 AM, Roman Uhlig
Maxity.de wrote:
>
> I'm trying to load localized versions of an image with a
> ResourceReference. The javadoc says:
>
> "The locale and/or style do not need to be set on a resource reference
> because those values will automatically be determined based on the
> context in which the resource is being used."
>
> Actually, it does not. No matter what locale is set in the session,
> ResourceReference is returning the same base version of the image when
> used like that:
>
> new Image("image", new ResourceReference(this.getClass(),
> "res/imagepack1/localized_testimage.gif"));
>
> res/imagepack1 contains the localized images as well, e.g.
> localized_testimage_de.gif.
>
> I'm using 1.4-rc4 right now. Am I doing something wrong or does it just
> not work?
>
> Thanks for any hints on that,
> Roman
>
> -
> 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



[announce] Wicket 1.4-RC5 released

2009-06-18 Thread Jeremy Thomerson
The Apache Wicket team is proud to announce the availability of the
fifth release candidate for the newest version of Wicket - 1.4.  A lot
of bugs have been squashed and several improvements implemented.  If
you are already using earlier versions of 1.4, it is recommended you
update to Wicket 1.4-rc5 at your earliest convenience.

Eager people click here to download the distribution, others can read further:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5

We thank you for your patience and support.

- The Wicket Team


Apache Wicket

Apache Wicket is a component oriented Java web application framework.
With proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps simple
and enjoyable again. Swap the boilerplate, complex debugging and
brittle code for powerful, reusable components written with plain Java
and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org


This release

This release is the fifth release candidate for the Wicket 1.4
product.  This release fixes several bugs and adds some minor
improvements.  You can find out about the changes at the bottom of
this announcement.


Migrating from 1.3

If you are coming from Wicket 1.3, you really want to read our
migration guide found on the wiki:

http://cwiki.apache.org/WICKET/migrate-14.html


Downloading the release:

You can download the release from the official Apache mirror system,
and you can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.4-rc5/

For the Maven and Ivy fans out there: update your pom's to the
following, and everything will be downloaded automatically:


 org.apache.wicket
 wicket
 1.4-rc5


Substitute the artifact ID with the projects of your liking to get the
other projects.

Please note that we don't prescribe a Logging implementation for
SLF4J. You need to specify yourself which one you prefer. Read more
about SLF4J here:

http://slf4j.org


Validating the release

The release has been signed by Jeremy Thomerson, your release manager
for today. The public key can be found in the KEYS file in the
download area.  Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.4-rc5/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity


Reporting bugs

In case you do encounter a bug, we would appreciate a report in our JIRA:

http://issues.apache.org/jira/browse/WICKET


The distribution

In the distribution you will find a README. The README contains
instructions on how to build from source yourself. You also find a
CHANEGELOG-1.4 which contains a list of all things that have been
fixed, added and/or removed since the 1.4 branch was created.


Release Notes - Wicket - Version 1.4-RC5

** Bug
   * [WICKET-1912] - StatelessForm problems with query string
   * [WICKET-1922] - AbstractTree - setting root to null causes
NullPointerException
   * [WICKET-2033] - & instead of & in javascript
   * [WICKET-2123] -
org.apache.wicket.util.convert.converters.SqlTimestampConverter only
renders the time part of the timestamp
   * [WICKET-2133] - DatePicker inserts incorrect format date
   * [WICKET-2188] - PropertyResolver$ArrayPropertyGetSet does not
call setAccessible(true) on method
   * [WICKET-2245] - PageParameters always non-empty
   * [WICKET-2259] - The JavaDoc for IPageLink still holds a reference
to PageLink which is deprecated
   * [WICKET-2261] - wicketTester.executeAjaxEvent(combo, "onchange");
works with 1.4-rc1 but not anymore with 1.4-rc2
   * [WICKET-2270] - GET/POST mismatch with stateless page/form.
   * [WICKET-2272] - open/close div tags are rendered erroneously
   * [WICKET-2273] - wicket-devutils is missing in
wicket-assembly-all.xml and not mentioned in README
   * [WICKET-2274] - WicketTester.executeAjaxEvent(AjaxButton,
"onclick"); results in clicking of another submit button if its model
value is not null.
   * [WICKET-2276] - isComponent in BaseWicketTester contains possible
nullpointer exception
   * [WICKET-2277] - Radio#onComponentTag uses Objects.equal instead
of model comparator
   * [WICKET-2278] - StatelessChecker is always offended
   * [WICKET-2281] - MockHttpServletRequest is broken when used with
CryptedUrlWebRequestCodingStrategy
   * [WICKET-2286] - proper onBeforeRender() for NavigationToolbar
   * [WICKET-2292] - TabbedPanel uses too much generics (revert WICKET-2153)
   * [WICKET-2301] - When injecting more than one parm in a method, an
ArrayIndexOutOfBoundsException is thrown
   * [WICKET-2303] - [devutils] LiveSessionsPage is broken
   * [WICKET-2304] - [devutils] RequestsPage is broken
   * [WICKET-2305] - [devutils] Can only inspect pages in same pagemap
as the inspector
   * [WICKET-2308] - Append lastmodified to Resources shouldnt append
when the resource is a directory (ends with /)
   * [WICKET-2309] - ClassCastException in SqlDateConverter
   

Re: Popup Editor using TinyMCE and ModalWindow

2009-06-18 Thread Fernando Wermus
This is the answer,

/**
 * This is needed because even though {...@link TinyMceBehavior} implements
IHeaderContributor,
 * the header doesn't get contributed when the component is first
rendered though an AJAX call.
 * @see https://issues.apache.org/jira/browse/WICKET-618 (which was
closed WontFix)
 */
public void renderHead(IHeaderResponse response) {

response.renderJavascriptReference(TinyMCESettings.javaScriptReference());
}

On Thu, Jun 18, 2009 at 12:08 PM, Fernando Wermus  wrote:

> I am having the same problem than you. How do you solve it?
>
>
> On Fri, Apr 24, 2009 at 1:45 AM, sshark  wrote:
>
>> Hi,
>>
>> I want to construct popup WYSIWYG editor using TinyMCE and ModalWindow.
>> What
>> I got was an ordinary un-mocked up plain textarea in the pop up dialog
>> box.
>> I have included my codes, the page and panel here. TinyMCE works well in
>> the
>> page. Did I miss any "settings"? Any suggestion? Thank you.
>>
>> public class TinyMCEPage extends WebPage
>> {
>>private static final long serialVersionUID = 1L;
>>
>>public TinyMCEPage()
>>{
>>final ModalWindow editorDialog = new ModalWindow("editorDialog");
>>editorDialog.setTitle("Edit Text");
>>editorDialog.setContent(new
>> TinyEditor(editorDialog.getContentId()));
>>
>>add(editorDialog);
>>add(new AjaxLink("edit")
>>{
>>public void onClick(AjaxRequestTarget target)
>>{
>>editorDialog.show(target);
>>}
>>});
>>}
>> }
>>
>> TinyMCEPage.html
>> 
>> 
>> 
>> Edit
>> 
>> 
>>
>>
>> public class TinyEditor extends Panel
>> {
>>private static final long serialVersionUID = 1L;
>>
>>public TinyEditor(String id)
>>{
>>super(id);
>>
>>add(new TextArea("editor", new Model("Write here"))
>>.add(new TinyMceBehavior(new
>> TinyMCESettings(TinyMCESettings.Theme.advanced;
>>}
>> }
>>
>> TinyEditor.html
>> 
>>
>> 
>>
>> /lim/
>>
>
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Popup Editor using TinyMCE and ModalWindow

2009-06-18 Thread Fernando Wermus
I am having the same problem than you. How do you solve it?

On Fri, Apr 24, 2009 at 1:45 AM, sshark  wrote:

> Hi,
>
> I want to construct popup WYSIWYG editor using TinyMCE and ModalWindow.
> What
> I got was an ordinary un-mocked up plain textarea in the pop up dialog box.
> I have included my codes, the page and panel here. TinyMCE works well in
> the
> page. Did I miss any "settings"? Any suggestion? Thank you.
>
> public class TinyMCEPage extends WebPage
> {
>private static final long serialVersionUID = 1L;
>
>public TinyMCEPage()
>{
>final ModalWindow editorDialog = new ModalWindow("editorDialog");
>editorDialog.setTitle("Edit Text");
>editorDialog.setContent(new
> TinyEditor(editorDialog.getContentId()));
>
>add(editorDialog);
>add(new AjaxLink("edit")
>{
>public void onClick(AjaxRequestTarget target)
>{
>editorDialog.show(target);
>}
>});
>}
> }
>
> TinyMCEPage.html
> 
> 
> 
> Edit
> 
> 
>
>
> public class TinyEditor extends Panel
> {
>private static final long serialVersionUID = 1L;
>
>public TinyEditor(String id)
>{
>super(id);
>
>add(new TextArea("editor", new Model("Write here"))
>.add(new TinyMceBehavior(new
> TinyMCESettings(TinyMCESettings.Theme.advanced;
>}
> }
>
> TinyEditor.html
> 
>
> 
>
> /lim/
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Conversation scope in wicket

2009-06-18 Thread Joe Fawzy
Hi Igor

On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg wrote:

> class mysession extends websesison {
>  private map> coversations;
>
>  public map getconversation(ipagemap pmap) {
>return conversations.get(pmap.getid());
>  }
> }


in your last code line , do you mean pmap.getName() instead of pmap.getId()
as i cannot find a public getId() in ipagemap

thanks
Joe



>
>
> -igor
>
> On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy wrote:
> > Hi alli need to implement something like a conversation scope in wicket
> > i know that wicket is stateful by default and i can pass object o from
> page
> > A -> page B
> > But if Object o in page A which -> page B -> page C -> page D -> page E
> > and i need Object o in page E ,that will be very tedious to pass o all
> > throught the way from A > ..E
> > also if i need to pass a large number of objects between a set of pages
> > ,this will be a nightmare
> >
> > so How can i implement a Conversation object ala Session and store these
> > objects there
> >
> > i thought of using the IPageMap as a key in this situation as it
> represent
> > an open browser window or tab ie. conversation, but in a previous mail ,i
> > 've been tald that it cannot be extended easily, and i cannot provide my
> own
> > factory for one
> >
> > so, any ideas about the conversation scope?
> > what do u think about the pageMap ? will it work? is it reliable?
> > can the core team provide some hooks to implement something like
> > IPageMapFactory?
> >
> > thanks
> > Joe
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Conversation scope in wicket

2009-06-18 Thread James Carman
JSR-299 is somewhat of a moving target right now, so it's hard to stay
up-to-date with it.  I'm mainly working with the OpenWebBeans folks on
it.

On Thu, Jun 18, 2009 at 2:03 PM, Joe Fawzy  wrote:
>
> Hi all
>
> On Thu, Jun 18, 2009 at 7:44 AM, James Carman
> wrote:
>
> > On Thu, Jun 18, 2009 at 12:38 AM, Igor Vaynberg 
> > wrote:
> > >
> > > you are free to implement this as an open source addition to wicket.
> > > there is wicketstuff or googlecode or sf.net where you can host it.
> > >
> > > wicket is a ui framework and conversational scope management falls
> > > outside wicket's scope. it is our job to provide the hooks to make
> > > such things possible, not to provide an implementation.
> >
> > And, those hooks are very nice.  I would only ask for some more
> > listener registering opportunities (like for listening to request
> > cycle events like begin/end rather than having to implement your own
> > request cycle).
>
>
> Yes this is a much needed functionality
> i think we may cooperate in that thing
> can u start another mail discussion suggesting ur needs , and make everyone
> participate
> Thanks
> Joe
>
>
>
> >
> >
> > -
> > 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: Conversation scope in wicket

2009-06-18 Thread Joe Fawzy
Hi all

On Thu, Jun 18, 2009 at 7:44 AM, James Carman
wrote:

> On Thu, Jun 18, 2009 at 12:38 AM, Igor Vaynberg 
> wrote:
> >
> > you are free to implement this as an open source addition to wicket.
> > there is wicketstuff or googlecode or sf.net where you can host it.
> >
> > wicket is a ui framework and conversational scope management falls
> > outside wicket's scope. it is our job to provide the hooks to make
> > such things possible, not to provide an implementation.
>
> And, those hooks are very nice.  I would only ask for some more
> listener registering opportunities (like for listening to request
> cycle events like begin/end rather than having to implement your own
> request cycle).


Yes this is a much needed functionality
i think we may cooperate in that thing
can u start another mail discussion suggesting ur needs , and make everyone
participate
Thanks
Joe



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


Re: Conversation scope in wicket

2009-06-18 Thread Joe Fawzy
Hi alli am working on a prototype which i think will convince you that
conversation is an important concept, it is very onject oriented as wicket
is and has many use cases

On Thu, Jun 18, 2009 at 7:38 AM, Igor Vaynberg wrote:

> you are free to implement this as an open source addition to wicket.
> there is wicketstuff or googlecode or sf.net where you can host it.
>
> wicket is a ui framework and conversational scope management falls
> outside wicket's scope. it is our job to provide the hooks to make
> such things possible, not to provide an implementation.


yes, u r right, wicket can'nt be everything for everyone ,but the question
is how much this hook thing is the responsibility of wicket
do you really think wicket is only ui framework?with no scopes so why u
support sessions? conversation is much like sessions, it is just narrowwer

Thanks
Joe



>
> -igor
>
> On Wed, Jun 17, 2009 at 9:36 PM, Joe Fawzy wrote:
> > Hiyou mean: injecting webbeans conversation component in wicket component
> at
> > construction time
> > this is only what we can achieve with webbeans, as wicket component
> cannot
> > be webbeans components (wicket is unmanaged framework)
> > my idea is about native conversation support, which enable wicket
> component
> > to be the component and the target for injection in a natural wicket way
> > beside, why depending on external project when we have all the
> functionality
> > we need as wicket is stateful and each pagemap is a conversation(long one
> > which may be easily break down to smaller pieces)
> >
> > Joe
> >
> >
> > On Thu, Jun 18, 2009 at 7:22 AM, James Carman
> > wrote:
> >
> >> There are a few folks working on implementing JSR-299 support for
> Wicket,
> >> which would provide support for conversation-scoped beans.  I'm working
> on
> >> one currently and I believe that the jboss folks have one working too.
> >>
> >> On Thu, Jun 18, 2009 at 12:08 AM, Joe Fawzy 
> wrote:
> >>
> >> > Hican this functionality added to the standard wicket?
> >> > actually much of seam popularity came from supporting conversation
> >> > scope...,
> >> > so i think that adding explicit wicket support will have momentum
> >> > i think that having just a store for conversation objects will be a
> good
> >> > begin
> >> > then we may add apis like beginConversation, endConversation
> >> > ,joinConversation,mergeConversation
> >> ,suspendConversation,resumeConversation
> >> > and other concepts like workspace
> >> > what do u think?
> >> > Joe
> >> >
> >> >
> >> > On Thu, Jun 18, 2009 at 12:32 AM, Igor Vaynberg <
> igor.vaynb...@gmail.com
> >> > >wrote:
> >> >
> >> > > only time will tell
> >> > >
> >> > > -igor
> >> > >
> >> > > On Wed, Jun 17, 2009 at 11:59 AM, Joe Fawzy
> >> wrote:
> >> > > > thanks dearwill wicket continue to support pageMap beyond 1.4 or
> it
> >> is
> >> > > now a
> >> > > > deprecated feature?
> >> > > > thanks
> >> > > > Joe
> >> > > >
> >> > > > On Wed, Jun 17, 2009 at 9:56 PM, Igor Vaynberg <
> >> > igor.vaynb...@gmail.com
> >> > > >wrote:
> >> > > >
> >> > > >> if the scope of your conversation is a browser window then its
> the
> >> > best
> >> > > >> choice.
> >> > > >>
> >> > > >> -igor
> >> > > >>
> >> > > >> On Wed, Jun 17, 2009 at 11:45 AM, Joe Fawzy
> >> > wrote:
> >> > > >> > Hi dearthanks for the reply and for the code snippet
> >> > > >> > But, do u think that using pageMap is reliable or what
> >> > > >> > i mean , is using pageMap is a good solution or just a hack,
> work
> >> > > around
> >> > > >> > thanks
> >> > > >> > Joe
> >> > > >> >
> >> > > >> > On Wed, Jun 17, 2009 at 8:58 PM, Igor Vaynberg <
> >> > > igor.vaynb...@gmail.com
> >> > > >> >wrote:
> >> > > >> >
> >> > > >> >> class mysession extends websesison {
> >> > > >> >>  private map> coversations;
> >> > > >> >>
> >> > > >> >>  public map getconversation(ipagemap pmap) {
> >> > > >> >>return conversations.get(pmap.getid());
> >> > > >> >>  }
> >> > > >> >> }
> >> > > >> >>
> >> > > >> >> -igor
> >> > > >> >>
> >> > > >> >> On Wed, Jun 17, 2009 at 10:29 AM, Joe Fawzy<
> joewic...@gmail.com>
> >> > > wrote:
> >> > > >> >> > Hi alli need to implement something like a conversation
> scope
> >> in
> >> > > >> wicket
> >> > > >> >> > i know that wicket is stateful by default and i can pass
> object
> >> o
> >> > > from
> >> > > >> >> page
> >> > > >> >> > A -> page B
> >> > > >> >> > But if Object o in page A which -> page B -> page C -> page
> D
> >> ->
> >> > > page
> >> > > >> E
> >> > > >> >> > and i need Object o in page E ,that will be very tedious to
> >> pass
> >> > o
> >> > > all
> >> > > >> >> > throught the way from A > ..E
> >> > > >> >> > also if i need to pass a large number of objects between a
> set
> >> of
> >> > > >> pages
> >> > > >> >> > ,this will be a nightmare
> >> > > >> >> >
> >> > > >> >> > so How can i implement a Conversation object ala Session and
> >> > store
> >> > > >> these
> >> > > >> >> > objects there
> >> > > >> >> >
> >> > > >> >> > i thought of 

Re: Reverse geocoding with wicket contrib gmap2

2009-06-18 Thread John Krasnay
Hehe, when I first saw "reverse geocoding" I read "reverse geolocation",
as in you point to a spot on a Google map and you get teleported there.

Now *there's* a browser feature I'd pay for!

jk

On Thu, Jun 18, 2009 at 06:46:59PM +0300, Jesse Kivialho wrote:
> Well I don't need that much events. The dragging doesn't have to emit an 
> event, just the final dragend (which already exists in the gmap2 project). 
> So the runtime would be more like:
> 
> The end of dragging a marker should emit events (which it does)
> The GCG should pick these up and reverse geocode the lat-long. (which I'm 
> atm doing with the server-side-geocoder)
> The result should be shown in the browser (which I can do with the 
> server-side-geocoder, and I guess with the client-side-geocoder the 
> showing in the browser could be an update of a label in the method which 
> is fired when the dragging is ended).
> 
> So the problem is how the GCG should notice the end of dragging and do the 
> reverse geocoding.

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



Re: Reverse geocoding with wicket contrib gmap2

2009-06-18 Thread Jesse Kivialho
Well I don't need that much events. The dragging doesn't have to emit an 
event, just the final dragend (which already exists in the gmap2 project). 
So the runtime would be more like:


The end of dragging a marker should emit events (which it does)
The GCG should pick these up and reverse geocode the lat-long. (which I'm 
atm doing with the server-side-geocoder)
The result should be shown in the browser (which I can do with the 
server-side-geocoder, and I guess with the client-side-geocoder the 
showing in the browser could be an update of a label in the method which 
is fired when the dragging is ended).


So the problem is how the GCG should notice the end of dragging and do the 
reverse geocoding.


The other point where I need the reverse geocoding is:

The clicking of the map should create a new marker
The marker's (click's) location should be reverse geocoded
the reverse geocoded location should be shown in the browser.

(Similar functionality as this thing has (I just want to create markers 
instead of infoboxes): 
http://gmaps-samples.googlecode.com/svn/trunk/geocoder/reverse.html )


I've been trying to add some new javascript to wicket-gmap.js to combine 
the event of clicking to the reverse geocoding (about like in that 
example), but without luck so far. I feel that I don't understand enough 
of the combination between wicket and javascript (and nor do i understand 
enough javascript).


br,

Jesse

On Thu, 18 Jun 2009, Martin Funk wrote:


Now that's getting quite JavaScript'isch,

out of the box, this might not be possible.

May I recap on this though, just to see if I got it right. A good starting 
point in this area to me allways seems to get aware of the runtime calling 
sequence and then think of the code that could set just that up.

So if I got it right it is happing all on the Browser side:

The dragging of a marker should emit events.
These should get picked up by GClientGeocoder.
The GCG should reverse geocode the lat lang of the marker.
The return value should be displayed in the Browser.
And eventually, maybe when the marker is droped
the server should be informed of the last result too.

For the first step I'd come up with a new implementation of 
GEventListenerBehavior

The public String getJSaddListener() would have to be overridden.
Instead of letting it render a call to addListener(...) it would have
to render a call to another yet to be implemented addX(...) method.
After that it get's dissy in my head :-(

mf
P.S.: But never mind, if you come up with soemthing, ask for write access to 
wicket-stuff, and commit it.
Your implementation of reverseDecode might be a good enough candidate 
already.




Am 18.06.2009 um 11:30 schrieb Jesse Kivialho:


Hi,

I'm using wicket 1.3.5. and downloaded the wicket contrib gmap2 from the 
wicket-stuff 1.3.x branch 
(https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-gmap2/)


I've noticed that the GClientGeocoder knows the reverse geocoding also. 
When I try the example Geocoder in contrib-gmap2-examples it gives me a 
name of the place if write to the address-field ie. 60,20.


Also, I managed to do the reverse geocoding with the server geocoder 
(wicket.contrib.gmap.util.Geocoder) by mostly copy-pasting an additional 
decoding method (since the original assumes the response to be type 
GlatLng):


public String reverseDecode(String response) throws GeocoderException {

StringTokenizer gLatLng = new StringTokenizer(response, ",");

String status = gLatLng.nextToken();
gLatLng.nextToken(); // skip precision
String address = "";
while (gLatLng.hasMoreTokens()) {
address += gLatLng.nextToken();
}

if (Integer.parseInt(status) != GeocoderException.G_GEO_SUCCESS) {
throw new GeocoderException(Integer.parseInt(status));
}
return address;
}

With reverse geocoding I want to show the markers location in text, not in 
latitude-longitude-pairs. So, when the user adds a new marker by clicking 
on the map or moves an existing marker by dragging it, I want to show the 
city name the marker is in (instead of latlng). With that additional server 
geocoding method I'm able to do it. I'd like to be able to do it 
client-side, since my fear is that the dragging will cause quite many 
reverse geocoding requests.


So how could I give the GClientGeocoder a TextField-object which would have 
the user-clicked latitude-longitude-pair? Or alternatively, how should I 
modify the GClientGeocoder to be able to hook in to the click. I've also 
looked into the click listener, but the request has always already been 
made in the onEvent-method, so I don't know how to alter the request.


The gmap2 extension is working nicely and helps me a lot, thanks!

br,

Jesse Kivialho

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For addition

Re: Mysterious NullPointerException

2009-06-18 Thread Igor Vaynberg
that is rather strange, there should be the stack trace. why dont you
change your logger to show the line numbers so we can see where the
log statement is coming from.

-igor

On Thu, Jun 18, 2009 at 7:53 AM, Jeremy Levy wrote:
> Per,
> There is no stack dump, that is the entire output.
>
> J
>
> On Thu, Jun 18, 2009 at 10:48 AM, Per Lundholm wrote:
>
>> No. ;-)
>>
>> Are you suggesting that the version of Wicket matters?
>>
>> How does the stack dump look in your logs?
>>
>> /Per
>>
>>
>> On Thu, Jun 18, 2009 at 4:25 PM, Jeremy Levy wrote:
>> > I see the following a few times a day, this is with Wicket 1.3.6.  It
>> > results in a 500 being displayed to the user...
>> >
>> > 2009-06-18 00:53:09,485 ERROR Web [RequestCycle] :
>> > java.lang.NullPointerException
>> >
>> > I realize this isn't much to go on, any ideas?
>> >
>> > j
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Jeremy Levy
>
> See my location in real-time:
> http://seemywhere.com/jeremy
>

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



Re: default integer form values

2009-06-18 Thread Igor Vaynberg
use Integer if you want support for nulls

-igor

On Thu, Jun 18, 2009 at 7:48 AM, Bas Vroling wrote:
> It is an unitialized int (private int residueNumber;)
>
> On 18 Jun, at 16:46, Per Lundholm wrote:
>
>> What is the initial value of "residueNumber"?
>>
>> /Per
>>
>> On Thu, Jun 18, 2009 at 3:35 PM, Bas Vroling wrote:
>>>
>>> I have a form with a textfield bound to an object containing interger
>>> values:
>>>
>>> TextField residueNumber = new TextField(
>>>                               "residueNumber", new
>>> PropertyModel(pso,
>>>                                               "residueNumber"));
>>>
>>> when this field is rendered it shows "0" as the 'empty' value, whereas
>>> string members are rendered real empty. It look strange this way, is
>>> there a
>>> way to display an empty field for an int?
>>>
>>> -
>>> 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: Ajax enabled pages are slow to load

2009-06-18 Thread Igor Vaynberg
seems quiet strange. wicket does not spawn threads - but your ajax
calls do. so the question is what is spawning the threads before the
page renders?

-igor

On Thu, Jun 18, 2009 at 6:55 AM, Ames, Tim wrote:
> I have recently converted a project from 1.3.5 to 1.4.rc-4.  The only thing 
> that I have changed with it is adding all the generics.
>
> On pages, panels, etc. that I have ajax classes, the pages are taking a great 
> deal of time to load. They were not
> exactly quick to load for me in 1.3.5, but in 1.4.rc-4 they are painfully 
> slow.
>
> While in debug mode, I check during the database loading phase and all that 
> is running very quickly. It seems to be at the rendering phase where the 
> problem lies. I notice in the stack that there are many many Daemon threads 
> being created before the page will finally display.  I have ran this in 
> development and in deployment mode with no appreciable difference (and on two 
> different web servers).
>
> For a test I placed a breakpoint in the onRender() method of the page.  The 
> breakpoint occurred about halfway through all the Daemon threads that were 
> being created.
>
> I am using Tomcat 6.0.14
>
> I am noticing this in other projects not just this one. Any suggestions on 
> what to look for to speed it up?  I do have logging on with info, so I have 
> verified that all the objects are serializable.
>
> One of the projects has a webpage class with a mix of these ajax components:
> AjaxSelfUpdatingTimerBehavior;
> AjaxLink;
> ModalWindow;
> IndicatingAjaxLink;
>
>
>
>
> Timothy Ames
> Developer II
> Promedica Health Systems, North
> Direct phone: 517-265-0281
> Internal extension: 72281
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> EMAIL CONFIDENTIALITY NOTICE
>
> This Email message, and any attachments, may contain confidential
> patient health information that is legally protected. This information
> is intended only for the use of the individual or entity named above.
> The authorized recipient of this information is prohibited from disclosing
> this information to any other party unless required to do so by law
> or regulation and is required to destroy the information after its stated
> need has been fulfilled. If you are not the intended recipient, you are
> hereby notified that any disclosure, copying, distribution, or action
> taken in reliance on the contents of this message is strictly prohibited.
>
> If you have received this information in error, please notify
> the sender immediately by replying to this message and delete the
> message from your system.
>

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



RE: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Lindner
I can't reproduce this error. It works form e. Take a look into trunk. In the 
Example, the DraggableElement (draggable1) is now a panel with some draggable 
element inside. The whole panel gets replaced if you klick on the "AjaxLink". 
Dragging still works after the replacement.

You can respond to my email address directly. I don't thik we need to flood the 
list with this special case.

And if your native language sould be german...

Stefan

-Ursprüngliche Nachricht-
Von: Stefan Jozsa [mailto:stefan_...@yahoo.com] 
Gesendet: Donnerstag, 18. Juni 2009 16:45
An: users@wicket.apache.org
Betreff: RE: WicketJQuery: Drag & drop behavior lost for components of AJAX 
updated panels


Yes, that is, you right !

Having:
   Panel myPanel = new MyPanel("panelId");

depending how is "rendered" by 
1. addOrReplace(myPanel) in a page constructor or by
2. target.addComponent(myPanel) in an event callback method

the result is different !
Stefan


--- On Thu, 6/18/09, Stefan Lindner  wrote:

> From: Stefan Lindner 
> Subject: RE: WicketJQuery: Drag & drop behavior lost for components of AJAX 
> updated panels
> To: users@wicket.apache.org
> Date: Thursday, June 18, 2009, 5:39 PM
> Do I understand you right, you have
> something like
> 
>     Class MyPanel {
>        public MyPanel(...) {
>           Component c = new
> Component(...);
>           c.add(new Draggable());
>           // some more components
> with draggable
>        }
>     }
> 
> 
> 
>     MyPage extends WebPage {
>       Public MyPage() {
>          add(new
> MyPanel(...));
>          // dragging works
> 
>          add(new
> AjaxLink(...){
>            
> onClick(AjaxRequestTarget) {
>            
>    MyPanel newPanel;
>            
>    getPage.addOrReplace(newPanel = new
> MyPanel(...));
>            
>    target.addComponent(newPanel);
>            
>    // Dragging stops working
>             }
>          });
>       }
>     }
> Right?
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Stefan Jozsa [mailto:stefan_...@yahoo.com]
> 
> Gesendet: Donnerstag, 18. Juni 2009 16:28
> An: users@wicket.apache.org
> Betreff: RE: WicketJQuery: Drag & drop behavior lost
> for components of AJAX updated panels
> 
> 
> Hi Stefan,
> 
> Sorry, but I missed to specify that DraggableBehavior is
> added to
> (undefined/variable number of) components of 'MyPanel',
> that is
> not to the panel itself.
> So, using the same 'MyPanel' constructor in both cases 
> DraggableBehavior is added (by Java code) to those
> components of 'MyPanel'.
> 
> Having: 
>    Panel myPanel = new MyPanel("panelId");
> depending how is "rendered" by addOrReplace(myPanel) or by
> target.addComponent(myPanel) the result is different, 
> the markup (and who knows what...) is different.
> 
> I tried WicketJQuery-0.3.5, got same (draggable behavior
> lost) result.
> 
> I tried even (naive) workarounds like:
>   myDraggableComponent.add(new
> AttributeModifier("class", true, new
> Model("ui-draggable")));
>   myDraggableComponent.add(new
> AttributeModifier("dragclass", true, new
> Model("a")));
> but got the same (draggable behavior lost) result.
> 
> This is extremly disturbing issue since cannot reload page
> (it has an embedded Flash player) and GUI interaction is
> based on
> AJAX backed panel/component refresh.
> 
> Any idea, help, workaround, fix is welcomed,
> thanks,
> Stefan
> 
> 
> --- On Thu, 6/18/09, Stefan Lindner 
> wrote:
> 
> > From: Stefan Lindner 
> > Subject: RE: WicketJQuery: Drag & drop behavior
> lost for components of AJAX updated panels
> > To: users@wicket.apache.org
> > Date: Thursday, June 18, 2009, 3:30 PM
> > I can't see a solution for what you
> > are doing.
> > 
> >     ...
> >     @Override
> >     public void onClick(AjaxRequestTarget target)
> > {
> >         Panel panel = new
> > MyPanel("panelId");
> >         addOrReplace(panel);
> >         target.addComponent(panel);
> >     }
> > 
> > creates a NEW Panel and the NEW panel is a totally
> new
> > object that does not know anything about the ORIGINAL
> Panel.
> > The AJAX response renders the NEW Panel (with it's new
> class
> > attribute but without the AJAX behaviors you've added
> to the
> > ORIGINAL Panel).
> > 
> > This also happens with Wickts builtin Behaviors. Try
> this
> > 
> >         panel.add(new
> > AjaxEventBehavior("onclick") {
> >            
> > @Override
> >            
> > protected void onEvent(AjaxRequestTarget target) {
> >            
> >     System.out.println("clicked!");
> >             }
> >         });
> > 
> > This also disappears after you replace the panel
> within an
> > AJAX call.
> > 
> > 
> > You can do two things:
> > 1.  ...
> >     @Override
> >     public void onClick(AjaxRequestTarget target)
> > {
> >         Panel panel = new
> > MyPanel("panelId");
> > !       panel.add(new
> > DraggableBehavior());
> >         addOrReplace(panel);
> >         target.addComponent(panel);
> >     }
> > 
> > !   AND USE VERSION 0.3.5!
> > 
> > 2.  ...
> >     @Override
> >    

Re: Reverse geocoding with wicket contrib gmap2

2009-06-18 Thread Martin Funk

Now that's getting quite JavaScript'isch,

out of the box, this might not be possible.

May I recap on this though, just to see if I got it right. A good  
starting point in this area to me allways seems to get aware of the  
runtime calling sequence and then think of the code that could set  
just that up.

So if I got it right it is happing all on the Browser side:

The dragging of a marker should emit events.
These should get picked up by GClientGeocoder.
The GCG should reverse geocode the lat lang of the marker.
The return value should be displayed in the Browser.
And eventually, maybe when the marker is droped
the server should be informed of the last result too.

For the first step I'd come up with a new implementation of  
GEventListenerBehavior

The public String getJSaddListener() would have to be overridden.
Instead of letting it render a call to addListener(...) it would have
to render a call to another yet to be implemented addX(...) method.
After that it get's dissy in my head :-(

mf
P.S.: But never mind, if you come up with soemthing, ask for write  
access to wicket-stuff, and commit it.
Your implementation of reverseDecode might be a good enough candidate  
already.




Am 18.06.2009 um 11:30 schrieb Jesse Kivialho:


Hi,

I'm using wicket 1.3.5. and downloaded the wicket contrib gmap2 from  
the wicket-stuff 1.3.x branch (https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-gmap2/ 
)


I've noticed that the GClientGeocoder knows the reverse geocoding  
also. When I try the example Geocoder in contrib-gmap2-examples it  
gives me a name of the place if write to the address-field ie. 60,20.


Also, I managed to do the reverse geocoding with the server geocoder  
(wicket.contrib.gmap.util.Geocoder) by mostly copy-pasting an  
additional decoding method (since the original assumes the response  
to be type GlatLng):


public String reverseDecode(String response) throws  
GeocoderException {


StringTokenizer gLatLng = new StringTokenizer(response, ",");

String status = gLatLng.nextToken();
gLatLng.nextToken(); // skip precision
String address = "";
while (gLatLng.hasMoreTokens()) {
address += gLatLng.nextToken();
}

if (Integer.parseInt(status) != GeocoderException.G_GEO_SUCCESS) {
throw new GeocoderException(Integer.parseInt(status));
}
return address;
}

With reverse geocoding I want to show the markers location in text,  
not in latitude-longitude-pairs. So, when the user adds a new marker  
by clicking on the map or moves an existing marker by dragging it, I  
want to show the city name the marker is in (instead of latlng).  
With that additional server geocoding method I'm able to do it. I'd  
like to be able to do it client-side, since my fear is that the  
dragging will cause quite many reverse geocoding requests.


So how could I give the GClientGeocoder a TextField-object which  
would have the user-clicked latitude-longitude-pair? Or  
alternatively, how should I modify the GClientGeocoder to be able to  
hook in to the click. I've also looked into the click listener, but  
the request has always already been made in the onEvent-method, so I  
don't know how to alter the request.


The gmap2 extension is working nicely and helps me a lot, thanks!

br,

Jesse Kivialho

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





Reverse Proxy and AJAX

2009-06-18 Thread T Ames
My company is going to start using a Juniper Reverse Proxy server for VPN
access.  We have a large mix of different web technologies in use. Wicket is
one of them. What this product does is URL rewriting to make things work.  I
am having a problem with Wicket AJAX functions working properly. Below is an
example of the way the URLs look where AJAX does work and where it does not.



Of course I am assuming the URL is the problem with AJAX not functioning
since we have other jsp projects where AJAX is working.  Also, we had tested
another reverse proxy server that did not mess with the URL like Juniper
does – and Wicket worked OK with that.



Here is how the URL looks when AJAX does work (using internal network via
http):

> ourdomain:28080/ms4_archive_web/ms4ar/
>


Here is how the URL looks with the Juniper Reverse Proxy where AJAX does not
work (via https):

> sslvpn2.ourdomain/ms4_archive_web/ms4ar/,DanaInfo=ourdomain,Port=28080+


I had to remove some of the URL string - the users email server was
rejecting as spam.

You can see where the Juniper software has really messed up the URL. I know
that wicket has several URL strategies which up till this point I have not
had to mess with. Is there one of these strategies that would allow Wicket
to work in this scenario? I am unfamiliar with these strategies and they are
confusing to me just reading the API’s.  Wicket worked well for me “right
out of the box” – ‘till now.



Any help appreciated.

--Tim


Re: Mysterious NullPointerException

2009-06-18 Thread Jeremy Levy
Per,
There is no stack dump, that is the entire output.

J

On Thu, Jun 18, 2009 at 10:48 AM, Per Lundholm wrote:

> No. ;-)
>
> Are you suggesting that the version of Wicket matters?
>
> How does the stack dump look in your logs?
>
> /Per
>
>
> On Thu, Jun 18, 2009 at 4:25 PM, Jeremy Levy wrote:
> > I see the following a few times a day, this is with Wicket 1.3.6.  It
> > results in a 500 being displayed to the user...
> >
> > 2009-06-18 00:53:09,485 ERROR Web [RequestCycle] :
> > java.lang.NullPointerException
> >
> > I realize this isn't much to go on, any ideas?
> >
> > j
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Jeremy Levy

See my location in real-time:
http://seemywhere.com/jeremy


Re: default integer form values

2009-06-18 Thread James Carman
so, it's 0

On Thu, Jun 18, 2009 at 10:48 AM, Bas Vroling wrote:
> It is an unitialized int (private int residueNumber;)
>
> On 18 Jun, at 16:46, Per Lundholm wrote:
>
>> What is the initial value of "residueNumber"?
>>
>> /Per
>>
>> On Thu, Jun 18, 2009 at 3:35 PM, Bas Vroling wrote:
>>>
>>> I have a form with a textfield bound to an object containing interger
>>> values:
>>>
>>> TextField residueNumber = new TextField(
>>>                               "residueNumber", new
>>> PropertyModel(pso,
>>>                                               "residueNumber"));
>>>
>>> when this field is rendered it shows "0" as the 'empty' value, whereas
>>> string members are rendered real empty. It look strange this way, is
>>> there a
>>> way to display an empty field for an int?
>>>
>>> -
>>> 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: Mysterious NullPointerException

2009-06-18 Thread Per Lundholm
No. ;-)

Are you suggesting that the version of Wicket matters?

How does the stack dump look in your logs?

/Per


On Thu, Jun 18, 2009 at 4:25 PM, Jeremy Levy wrote:
> I see the following a few times a day, this is with Wicket 1.3.6.  It
> results in a 500 being displayed to the user...
>
> 2009-06-18 00:53:09,485 ERROR Web [RequestCycle] :
> java.lang.NullPointerException
>
> I realize this isn't much to go on, any ideas?
>
> j
>

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



Re: default integer form values

2009-06-18 Thread Bas Vroling

It is an unitialized int (private int residueNumber;)

On 18 Jun, at 16:46, Per Lundholm wrote:


What is the initial value of "residueNumber"?

/Per

On Thu, Jun 18, 2009 at 3:35 PM, Bas Vroling  
wrote:

I have a form with a textfield bound to an object containing interger
values:

TextField residueNumber = new TextField(
   "residueNumber", new
PropertyModel(pso,
   "residueNumber"));

when this field is rendered it shows "0" as the 'empty' value,  
whereas
string members are rendered real empty. It look strange this way,  
is there a

way to display an empty field for an int?

-
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: default integer form values

2009-06-18 Thread Per Lundholm
What is the initial value of "residueNumber"?

/Per

On Thu, Jun 18, 2009 at 3:35 PM, Bas Vroling wrote:
> I have a form with a textfield bound to an object containing interger
> values:
>
> TextField residueNumber = new TextField(
>                                "residueNumber", new
> PropertyModel(pso,
>                                                "residueNumber"));
>
> when this field is rendered it shows "0" as the 'empty' value, whereas
> string members are rendered real empty. It look strange this way, is there a
> way to display an empty field for an int?
>
> -
> 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: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Jozsa

Yes, that is, you right !

Having:
   Panel myPanel = new MyPanel("panelId");

depending how is "rendered" by 
1. addOrReplace(myPanel) in a page constructor or by
2. target.addComponent(myPanel) in an event callback method

the result is different !
Stefan


--- On Thu, 6/18/09, Stefan Lindner  wrote:

> From: Stefan Lindner 
> Subject: RE: WicketJQuery: Drag & drop behavior lost for components of AJAX 
> updated panels
> To: users@wicket.apache.org
> Date: Thursday, June 18, 2009, 5:39 PM
> Do I understand you right, you have
> something like
> 
>     Class MyPanel {
>        public MyPanel(...) {
>           Component c = new
> Component(...);
>           c.add(new Draggable());
>           // some more components
> with draggable
>        }
>     }
> 
> 
> 
>     MyPage extends WebPage {
>       Public MyPage() {
>          add(new
> MyPanel(...));
>          // dragging works
> 
>          add(new
> AjaxLink(...){
>            
> onClick(AjaxRequestTarget) {
>            
>    MyPanel newPanel;
>            
>    getPage.addOrReplace(newPanel = new
> MyPanel(...));
>            
>    target.addComponent(newPanel);
>            
>    // Dragging stops working
>             }
>          });
>       }
>     }
> Right?
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Stefan Jozsa [mailto:stefan_...@yahoo.com]
> 
> Gesendet: Donnerstag, 18. Juni 2009 16:28
> An: users@wicket.apache.org
> Betreff: RE: WicketJQuery: Drag & drop behavior lost
> for components of AJAX updated panels
> 
> 
> Hi Stefan,
> 
> Sorry, but I missed to specify that DraggableBehavior is
> added to
> (undefined/variable number of) components of 'MyPanel',
> that is
> not to the panel itself.
> So, using the same 'MyPanel' constructor in both cases 
> DraggableBehavior is added (by Java code) to those
> components of 'MyPanel'.
> 
> Having: 
>    Panel myPanel = new MyPanel("panelId");
> depending how is "rendered" by addOrReplace(myPanel) or by
> target.addComponent(myPanel) the result is different, 
> the markup (and who knows what...) is different.
> 
> I tried WicketJQuery-0.3.5, got same (draggable behavior
> lost) result.
> 
> I tried even (naive) workarounds like:
>   myDraggableComponent.add(new
> AttributeModifier("class", true, new
> Model("ui-draggable")));
>   myDraggableComponent.add(new
> AttributeModifier("dragclass", true, new
> Model("a")));
> but got the same (draggable behavior lost) result.
> 
> This is extremly disturbing issue since cannot reload page
> (it has an embedded Flash player) and GUI interaction is
> based on
> AJAX backed panel/component refresh.
> 
> Any idea, help, workaround, fix is welcomed,
> thanks,
> Stefan
> 
> 
> --- On Thu, 6/18/09, Stefan Lindner 
> wrote:
> 
> > From: Stefan Lindner 
> > Subject: RE: WicketJQuery: Drag & drop behavior
> lost for components of AJAX updated panels
> > To: users@wicket.apache.org
> > Date: Thursday, June 18, 2009, 3:30 PM
> > I can't see a solution for what you
> > are doing.
> > 
> >     ...
> >     @Override
> >     public void onClick(AjaxRequestTarget target)
> > {
> >         Panel panel = new
> > MyPanel("panelId");
> >         addOrReplace(panel);
> >         target.addComponent(panel);
> >     }
> > 
> > creates a NEW Panel and the NEW panel is a totally
> new
> > object that does not know anything about the ORIGINAL
> Panel.
> > The AJAX response renders the NEW Panel (with it's new
> class
> > attribute but without the AJAX behaviors you've added
> to the
> > ORIGINAL Panel).
> > 
> > This also happens with Wickts builtin Behaviors. Try
> this
> > 
> >         panel.add(new
> > AjaxEventBehavior("onclick") {
> >            
> > @Override
> >            
> > protected void onEvent(AjaxRequestTarget target) {
> >            
> >     System.out.println("clicked!");
> >             }
> >         });
> > 
> > This also disappears after you replace the panel
> within an
> > AJAX call.
> > 
> > 
> > You can do two things:
> > 1.  ...
> >     @Override
> >     public void onClick(AjaxRequestTarget target)
> > {
> >         Panel panel = new
> > MyPanel("panelId");
> > !       panel.add(new
> > DraggableBehavior());
> >         addOrReplace(panel);
> >         target.addComponent(panel);
> >     }
> > 
> > !   AND USE VERSION 0.3.5!
> > 
> > 2.  ...
> >     @Override
> >     public void onClick(AjaxRequestTarget target)
> > {
> > !   
> >    originalPanel.setDefaultModelObject(some
> > new value);
> > !   
> >    target.addComponent(originalPanel);
> >     }
> > 
> > Good luck and let me know if it works for you!
> > 
> > Stefan
> > 
> > -Ursprüngliche Nachricht-
> > Von: Stefan Jozsa [mailto:stefan_...@yahoo.com]
> > 
> > Gesendet: Donnerstag, 18. Juni 2009 13:24
> > An: users@wicket.apache.org
> > Betreff: Re: WicketJQuery: Drag & drop behavior
> lost
> > for components of AJAX updated panels
> > 
> > 
> > Found that when panel is constructed like:
> >     public MyPage() {
> >         ...
> >         add(new MyPanel("panelId"));
> >         ...

RE: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Lindner
Do I understand you right, you have something like

Class MyPanel {
   public MyPanel(...) {
  Component c = new Component(...);
  c.add(new Draggable());
  // some more components with draggable
   }
}



MyPage extends WebPage {
  Public MyPage() {
 add(new MyPanel(...));
 // dragging works

 add(new AjaxLink(...){
onClick(AjaxRequestTarget) {
   MyPanel newPanel;
   getPage.addOrReplace(newPanel = new MyPanel(...));
   target.addComponent(newPanel);
   // Dragging stops working
}
 });
  }
}
Right?



-Ursprüngliche Nachricht-
Von: Stefan Jozsa [mailto:stefan_...@yahoo.com] 
Gesendet: Donnerstag, 18. Juni 2009 16:28
An: users@wicket.apache.org
Betreff: RE: WicketJQuery: Drag & drop behavior lost for components of AJAX 
updated panels


Hi Stefan,

Sorry, but I missed to specify that DraggableBehavior is added to
(undefined/variable number of) components of 'MyPanel', that is
not to the panel itself.
So, using the same 'MyPanel' constructor in both cases 
DraggableBehavior is added (by Java code) to those components of 'MyPanel'.

Having: 
   Panel myPanel = new MyPanel("panelId");
depending how is "rendered" by addOrReplace(myPanel) or by
target.addComponent(myPanel) the result is different, 
the markup (and who knows what...) is different.

I tried WicketJQuery-0.3.5, got same (draggable behavior lost) result.

I tried even (naive) workarounds like:
  myDraggableComponent.add(new AttributeModifier("class", true, new 
Model("ui-draggable")));
  myDraggableComponent.add(new AttributeModifier("dragclass", true, new 
Model("a")));
but got the same (draggable behavior lost) result.

This is extremly disturbing issue since cannot reload page
(it has an embedded Flash player) and GUI interaction is based on
AJAX backed panel/component refresh.

Any idea, help, workaround, fix is welcomed,
thanks,
Stefan


--- On Thu, 6/18/09, Stefan Lindner  wrote:

> From: Stefan Lindner 
> Subject: RE: WicketJQuery: Drag & drop behavior lost for components of AJAX 
> updated panels
> To: users@wicket.apache.org
> Date: Thursday, June 18, 2009, 3:30 PM
> I can't see a solution for what you
> are doing.
> 
>     ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
> 
> creates a NEW Panel and the NEW panel is a totally new
> object that does not know anything about the ORIGINAL Panel.
> The AJAX response renders the NEW Panel (with it's new class
> attribute but without the AJAX behaviors you've added to the
> ORIGINAL Panel).
> 
> This also happens with Wickts builtin Behaviors. Try this
> 
>         panel.add(new
> AjaxEventBehavior("onclick") {
>            
> @Override
>            
> protected void onEvent(AjaxRequestTarget target) {
>            
>     System.out.println("clicked!");
>             }
>         });
> 
> This also disappears after you replace the panel within an
> AJAX call.
> 
> 
> You can do two things:
> 1.  ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
> !       panel.add(new
> DraggableBehavior());
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
> 
> !   AND USE VERSION 0.3.5!
> 
> 2.  ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
> !   
>    originalPanel.setDefaultModelObject(some
> new value);
> !   
>    target.addComponent(originalPanel);
>     }
> 
> Good luck and let me know if it works for you!
> 
> Stefan
> 
> -Ursprüngliche Nachricht-
> Von: Stefan Jozsa [mailto:stefan_...@yahoo.com]
> 
> Gesendet: Donnerstag, 18. Juni 2009 13:24
> An: users@wicket.apache.org
> Betreff: Re: WicketJQuery: Drag & drop behavior lost
> for components of AJAX updated panels
> 
> 
> Found that when panel is constructed like:
>     public MyPage() {
>         ...
>         add(new MyPanel("panelId"));
>         ...
>     }
> markup of a draggable element is:
>  >[]
> 
> However when:
>     ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
> markup of a draggable element is:
>  >[]
> 
> that is 'ui-draggable' is not found (stripped ? not added?)
> 
> in 'class' attribute of draggable element.
> 
> Any help is welcommed,
> Stefan
> 
> 
> --- On Thu, 6/18/09, Stefan Jozsa 
> wrote:
> 
> > From: Stefan Jozsa 
> > Subject: WicketJQuery: Drag & drop behavior lost
> for components of AJAX updated panels
> > To: users@wicket.apache.org
> > Date: Thursday, June 18, 2009, 1:44 PM
> > 
> > Doing:
> >     public MyPage() {
> >         ...
> >         add(new MyPanel("panelId"));
> >         ...
> >     }
> > dragging elem

RE: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Jozsa

Hi Stefan,

Sorry, but I missed to specify that DraggableBehavior is added to
(undefined/variable number of) components of 'MyPanel', that is
not to the panel itself.
So, using the same 'MyPanel' constructor in both cases 
DraggableBehavior is added (by Java code) to those components of 'MyPanel'.

Having: 
   Panel myPanel = new MyPanel("panelId");
depending how is "rendered" by addOrReplace(myPanel) or by
target.addComponent(myPanel) the result is different, 
the markup (and who knows what...) is different.

I tried WicketJQuery-0.3.5, got same (draggable behavior lost) result.

I tried even (naive) workarounds like:
  myDraggableComponent.add(new AttributeModifier("class", true, new 
Model("ui-draggable")));
  myDraggableComponent.add(new AttributeModifier("dragclass", true, new 
Model("a")));
but got the same (draggable behavior lost) result.

This is extremly disturbing issue since cannot reload page
(it has an embedded Flash player) and GUI interaction is based on
AJAX backed panel/component refresh.

Any idea, help, workaround, fix is welcomed,
thanks,
Stefan


--- On Thu, 6/18/09, Stefan Lindner  wrote:

> From: Stefan Lindner 
> Subject: RE: WicketJQuery: Drag & drop behavior lost for components of AJAX 
> updated panels
> To: users@wicket.apache.org
> Date: Thursday, June 18, 2009, 3:30 PM
> I can't see a solution for what you
> are doing.
> 
>     ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
> 
> creates a NEW Panel and the NEW panel is a totally new
> object that does not know anything about the ORIGINAL Panel.
> The AJAX response renders the NEW Panel (with it's new class
> attribute but without the AJAX behaviors you've added to the
> ORIGINAL Panel).
> 
> This also happens with Wickts builtin Behaviors. Try this
> 
>         panel.add(new
> AjaxEventBehavior("onclick") {
>            
> @Override
>            
> protected void onEvent(AjaxRequestTarget target) {
>            
>     System.out.println("clicked!");
>             }
>         });
> 
> This also disappears after you replace the panel within an
> AJAX call.
> 
> 
> You can do two things:
> 1.  ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
> !       panel.add(new
> DraggableBehavior());
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
> 
> !   AND USE VERSION 0.3.5!
> 
> 2.  ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
> !   
>    originalPanel.setDefaultModelObject(some
> new value);
> !   
>    target.addComponent(originalPanel);
>     }
> 
> Good luck and let me know if it works for you!
> 
> Stefan
> 
> -Ursprüngliche Nachricht-
> Von: Stefan Jozsa [mailto:stefan_...@yahoo.com]
> 
> Gesendet: Donnerstag, 18. Juni 2009 13:24
> An: users@wicket.apache.org
> Betreff: Re: WicketJQuery: Drag & drop behavior lost
> for components of AJAX updated panels
> 
> 
> Found that when panel is constructed like:
>     public MyPage() {
>         ...
>         add(new MyPanel("panelId"));
>         ...
>     }
> markup of a draggable element is:
>  >[]
> 
> However when:
>     ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
> markup of a draggable element is:
>  >[]
> 
> that is 'ui-draggable' is not found (stripped ? not added?)
> 
> in 'class' attribute of draggable element.
> 
> Any help is welcommed,
> Stefan
> 
> 
> --- On Thu, 6/18/09, Stefan Jozsa 
> wrote:
> 
> > From: Stefan Jozsa 
> > Subject: WicketJQuery: Drag & drop behavior lost
> for components of AJAX updated panels
> > To: users@wicket.apache.org
> > Date: Thursday, June 18, 2009, 1:44 PM
> > 
> > Doing:
> >     public MyPage() {
> >         ...
> >         add(new MyPanel("panelId"));
> >         ...
> >     }
> > dragging elements (having DraggableBehavior) of
> 'MyPanel'
> > works.
> > 
> > However doing:
> >     ...
> >     @Override
> >     public void onClick(AjaxRequestTarget target)
> > {
> >         Panel panel = new
> > MyPanel("panelId");
> >         addOrReplace(panel);
> >         target.addComponent(panel);
> >     }
> >     
> > dragging elements of 'MyPanel' DO NOT works
> > (DraggableBehavior is lost).
> > 
> > 
> > What's going on ?
> > Any help is (very) appreciated,
> > thanks Stefan
> > 
> > Using:
> > Wicket-1.4.rc4,
> > WicketJQuery-0.3.4
> > 
> > 
> > 
> > 
> >       
> > 
> >
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> > 
> > 
> 
> 
>       
> 
> -
> To unsubscribe, e-mail: use

Mysterious NullPointerException

2009-06-18 Thread Jeremy Levy
I see the following a few times a day, this is with Wicket 1.3.6.  It
results in a 500 being displayed to the user...

2009-06-18 00:53:09,485 ERROR Web [RequestCycle] :
java.lang.NullPointerException

I realize this isn't much to go on, any ideas?

j


Ajax enabled pages are slow to load

2009-06-18 Thread Ames, Tim
I have recently converted a project from 1.3.5 to 1.4.rc-4.  The only thing 
that I have changed with it is adding all the generics.

On pages, panels, etc. that I have ajax classes, the pages are taking a great 
deal of time to load. They were not
exactly quick to load for me in 1.3.5, but in 1.4.rc-4 they are painfully slow.

While in debug mode, I check during the database loading phase and all that is 
running very quickly. It seems to be at the rendering phase where the problem 
lies. I notice in the stack that there are many many Daemon threads being 
created before the page will finally display.  I have ran this in development 
and in deployment mode with no appreciable difference (and on two different web 
servers).

For a test I placed a breakpoint in the onRender() method of the page.  The 
breakpoint occurred about halfway through all the Daemon threads that were 
being created.

I am using Tomcat 6.0.14

I am noticing this in other projects not just this one. Any suggestions on what 
to look for to speed it up?  I do have logging on with info, so I have verified 
that all the objects are serializable.

One of the projects has a webpage class with a mix of these ajax components:
AjaxSelfUpdatingTimerBehavior;
AjaxLink;
ModalWindow;
IndicatingAjaxLink;




Timothy Ames
Developer II
Promedica Health Systems, North
Direct phone: 517-265-0281
Internal extension: 72281

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE 

This Email message, and any attachments, may contain confidential 
patient health information that is legally protected. This information 
is intended only for the use of the individual or entity named above. 
The authorized recipient of this information is prohibited from disclosing 
this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated 
need has been fulfilled. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or action 
taken in reliance on the contents of this message is strictly prohibited. 

If you have received this information in error, please notify 
the sender immediately by replying to this message and delete the 
message from your system.


default integer form values

2009-06-18 Thread Bas Vroling
I have a form with a textfield bound to an object containing interger  
values:


TextField residueNumber = new TextField(
"residueNumber", new PropertyModel(pso,
"residueNumber"));

when this field is rendered it shows "0" as the 'empty' value, whereas  
string members are rendered real empty. It look strange this way, is  
there a way to display an empty field for an int?


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



Re: Who went to the GWT vs Wicket presentation in Normandy and wants to share their findings?

2009-06-18 Thread Yann PETIT
Hi Martjin and all of you Wicket fans,
I was there ! (as president of Normandy Java User Group)
It was our first JUG meeting in a small French countryside city (Rouen in
Normandie) we had around 35 attendees.
(great success for us, preceding IT meetings organized in our area never
drove more than 10 attendees )


I'll try to summarize what was said by our two local but brillant speakers :

   - Youen Chene as GWT fighter (http://www.youenchene.fr)
   - Nicolas Giard as Wicket knight (http://www.noocodecommit.com)



Here's a short list of the slides  :

   - A brief history of the two frameworks.
   - The differences in the scope covered by GWT and Wicket (technically
   speaking Ajax, javascript, etc.)
   - How it works ( GWT = coding Java compiled in JS generating HTML /
   Wicket = coding Java + HTML)
   - Differences of projects structures (packages... pictures of  the
   exploded war treeview in eclipse)
   - Server integration with other technologies like (Spring, EJB, Hibernate
   etc. using wicket-stuff in one hand or projects like gwtrpc-spring or Gilead
   in the other).
   - Available widgets natively or by sub projects (Google vizualization,
   gears, Ext GWT... vs Wicket stuff, Wiquery ...)
   - CSS or How the design layer is handled comparison.
   - Browsers compatibility (generated code plus handmade code).
   - Localization support (different JS by language for GWT, use of
   properties, xml or database ...)
   - Accessibly (GWT following ARIA since 1.5 versus Best Practice applied
   by the HTML developer for Wicket)
   - Performances (GWT = heavy compilation and long first load, Wicket
   depends mainly on the developer's code quality )
   - Tools (GWT has many plugins for integration with Eclipse, some exist
   for Wicket but aren't really useful since Wicket keeps things simple).
   - Maven integration (difficult for GWT but possible, some latency on
   dependencies. While very easy for Wicket and up to date archetypes).
   - Advantages :
  - GWT (backward compatibility, stability, code
  optimization, keyboard interaction)
   - Wicket (development mad simple again, very enthusiast and
  attractive community)
   - Drawbacks
  - GWT (very long loading the first time, very difficult to reference
  as it's JS based... very strange coming from a Search Engine company ^^ )
  - Wicket (lacks of notoriety, documentation is sometimes poor,
  performances strongly tighten to the code quality)
   - Next release / Roadmap
   -  Why use one or the other :
  - GWT for rich applications but not for content websites (blog,
  e-commerce...) due to inability to reference it on search engines.
  - Wicket for content web sites first, but why not for rich
  applications ?
   - Who uses GWT or Wicket (Lombardi, MyERP, Compiere... vs Artifactory,
   JTrac, JAlbum, Alfresco GUI, Hippo CMS...)
   - How to fill the lacks :
  - Use subproject for widgets like SmartGWT, mix GWT with other
  framework (velocity, JSF) for referencement.
  - Use JQuery instead of prototype, more native widgets using Wiquery
  ?
   - Wicket + GWT = <3 Love ? (or is it possible to mix both) It seems
   possible but might be long and hard.
   - Some links to go ahead


Maybe we'll try to translate the presentation slides in English (depends on
time we'll have for that).
For french reading ones we will publish the slides on our JUG site : *
http://www.normandyjug.org/*


I think the most important thing that should be retained is that GWT and
Wicket should be chosen depending on what we want.
A rich application that doesn't need search engine referencement => GWT
A content website with also some dynamic behaviors and referencement needs
=> Wicket

.
This presentation was done by a user of GWT and one of Wicket. They didn't
know the other one technology by themselves, and even didn't know each
others a few weeks ago. So congratulation to them because it was a real
challenge to make this comparison in very few days.
It' goal was to explain in few minutes what are GWT and Wicket, and to give
attendees the desire to go ahead with one technology or the other.

Any comments or feedbacks appreciated .



Yann






On Thu, Jun 18, 2009 at 12:08 PM, Martijn Dashorst <
martijn.dasho...@gmail.com> wrote:

> There's been quite some announcements going across twitter, but no
> conclusion...
>
> Martijn
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Conversation scope in wicket

2009-06-18 Thread James Carman
On Thu, Jun 18, 2009 at 8:27 AM, Carl-Eric Menzel
 wrote:
> > The idea of a "conversation" has been around for a long time.  It's
> > called a stateful session bean.
>
> You have a point there. But I think this is all provided by Wicket
> already - You have components and models that perfectly encapsulate all
> this. Basically this is about the lifecycle of the data needed for a
> unit of work from the user's point of view. If you have a flow of
> pages, or wizard steps, or whatever, you have a defined starting point
> where you can, for example, create a model. And then you go to the next
> step and pass this model along. Once you're finished, you just drop the
> references.
>
> Or am I missing something here?

Yes, Wicket does have great support for stateful programming.  That's
why I love Wicket!  However, if I can run Wicket inside a "container"
that supports JSR-299 and I can have my web beans injected into my
Wicket components/pages as proxies so that I'm always talking to the
right bean at the right time and I don't have to worry about all that
state crap (at least in the web tier), then I think that's a big win.
>
> Carl-Eric
>
> -
> 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: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Lindner
I can't see a solution for what you are doing.

...
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new MyPanel("panelId");
addOrReplace(panel);
target.addComponent(panel);
}

creates a NEW Panel and the NEW panel is a totally new object that does not 
know anything about the ORIGINAL Panel. The AJAX response renders the NEW Panel 
(with it's new class attribute but without the AJAX behaviors you've added to 
the ORIGINAL Panel).

This also happens with Wickts builtin Behaviors. Try this

panel.add(new AjaxEventBehavior("onclick") {
@Override
protected void onEvent(AjaxRequestTarget target) {
System.out.println("clicked!");
}
});

This also disappears after you replace the panel within an AJAX call.


You can do two things:
1.  ...
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new MyPanel("panelId");
!   panel.add(new DraggableBehavior());
addOrReplace(panel);
target.addComponent(panel);
}

!   AND USE VERSION 0.3.5!

2.  ...
@Override
public void onClick(AjaxRequestTarget target) {
!   originalPanel.setDefaultModelObject(some new value);
!   target.addComponent(originalPanel);
}

Good luck and let me know if it works for you!

Stefan

-Ursprüngliche Nachricht-
Von: Stefan Jozsa [mailto:stefan_...@yahoo.com] 
Gesendet: Donnerstag, 18. Juni 2009 13:24
An: users@wicket.apache.org
Betreff: Re: WicketJQuery: Drag & drop behavior lost for components of AJAX 
updated panels


Found that when panel is constructed like:
public MyPage() {
...
add(new MyPanel("panelId"));
...
}
markup of a draggable element is:
[]

However when:
...
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new MyPanel("panelId");
addOrReplace(panel);
target.addComponent(panel);
}
markup of a draggable element is:
[]

that is 'ui-draggable' is not found (stripped ? not added?) 
in 'class' attribute of draggable element.

Any help is welcommed,
Stefan


--- On Thu, 6/18/09, Stefan Jozsa  wrote:

> From: Stefan Jozsa 
> Subject: WicketJQuery: Drag & drop behavior lost for components of AJAX 
> updated panels
> To: users@wicket.apache.org
> Date: Thursday, June 18, 2009, 1:44 PM
> 
> Doing:
>     public MyPage() {
>         ...
>         add(new MyPanel("panelId"));
>         ...
>     }
> dragging elements (having DraggableBehavior) of 'MyPanel'
> works.
> 
> However doing:
>     ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
>     
> dragging elements of 'MyPanel' DO NOT works
> (DraggableBehavior is lost).
> 
> 
> What's going on ?
> Any help is (very) appreciated,
> thanks Stefan
> 
> Using:
> Wicket-1.4.rc4,
> WicketJQuery-0.3.4
> 
> 
> 
> 
>       
> 
> -
> 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: Conversation scope in wicket

2009-06-18 Thread Carl-Eric Menzel
On Thu, 18 Jun 2009 08:10:33 -0400
James Carman  wrote:

> On Thu, Jun 18, 2009 at 7:46 AM, Carl-Eric Menzel
>  wrote:
> > Then you already have an object that your components can work on.
> > Put that in a Wicket model and enjoy. My point is this: You either
> > have existing business code that supports conversations - then you
> > don't need Wicket conversations, you need to write your components
> > so they work with the existing code's notion of a conversation.
> 
> Wicket needs to understand when it needs to resume a previously-begun
> conversation.  The business logic can't know that by itself.  The UI
> has to provide a bit of help.

Yes of course. That's what I meant by "write your components so they
work with your existing code".

> The idea of a "conversation" has been around for a long time.  It's
> called a stateful session bean.

You have a point there. But I think this is all provided by Wicket
already - You have components and models that perfectly encapsulate all
this. Basically this is about the lifecycle of the data needed for a
unit of work from the user's point of view. If you have a flow of
pages, or wizard steps, or whatever, you have a defined starting point
where you can, for example, create a model. And then you go to the next
step and pass this model along. Once you're finished, you just drop the
references.

Or am I missing something here?

Carl-Eric

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



Re: Conversation scope in wicket

2009-06-18 Thread James Carman
On Thu, Jun 18, 2009 at 7:46 AM, Carl-Eric Menzel
 wrote:
> Then you already have an object that your components can work on. Put
> that in a Wicket model and enjoy. My point is this: You either have
> existing business code that supports conversations - then you don't need
> Wicket conversations, you need to write your components so they work
> with the existing code's notion of a conversation.

Wicket needs to understand when it needs to resume a previously-begun
conversation.  The business logic can't know that by itself.  The UI
has to provide a bit of help.

>
> Or you don't have a "business" conversation, and the whole conversation
> thing is just something for UI workflow. Then you should not have it in
> the business code. Instead, write components and models so that they
> keep all the state they need for this "conversation" where they need
> it. I don't think there needs to be a special abstraction for this,
> you'd be much better off with keeping state as appropriate for your use
> case.

The idea of a "conversation" has been around for a long time.  It's
called a stateful session bean.

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



Re: Conversation scope in wicket

2009-06-18 Thread Carl-Eric Menzel
On Thu, 18 Jun 2009 07:21:36 -0400
James Carman  wrote:
> > I fully agree. Conversation scope is a kludge for a broken model,
> > and in the end nothing more than a specialized form of global
> > variables.
> 
> To which model are you referring?

Not a model in the Wicket sense, but the model of application
development where you throw everything into a big bag (e.g. the
session, or any other such scope).

> > Just put your state into the appropriate page or component instances
> > and/or models, and you get *any* scope you need, for free.
> 
> Your business logic might not know anything about page/component
> instances, but it may support "conversations."

Then you already have an object that your components can work on. Put
that in a Wicket model and enjoy. My point is this: You either have
existing business code that supports conversations - then you don't need
Wicket conversations, you need to write your components so they work
with the existing code's notion of a conversation.

Or you don't have a "business" conversation, and the whole conversation
thing is just something for UI workflow. Then you should not have it in
the business code. Instead, write components and models so that they
keep all the state they need for this "conversation" where they need
it. I don't think there needs to be a special abstraction for this,
you'd be much better off with keeping state as appropriate for your use
case.

I may have been unclear in my earlier message, does this make more
sense?

Carl-Eric

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



Re: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Jozsa

Found that when panel is constructed like:
public MyPage() {
...
add(new MyPanel("panelId"));
...
}
markup of a draggable element is:
[]

However when:
...
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new MyPanel("panelId");
addOrReplace(panel);
target.addComponent(panel);
}
markup of a draggable element is:
[]

that is 'ui-draggable' is not found (stripped ? not added?) 
in 'class' attribute of draggable element.

Any help is welcommed,
Stefan


--- On Thu, 6/18/09, Stefan Jozsa  wrote:

> From: Stefan Jozsa 
> Subject: WicketJQuery: Drag & drop behavior lost for components of AJAX 
> updated panels
> To: users@wicket.apache.org
> Date: Thursday, June 18, 2009, 1:44 PM
> 
> Doing:
>     public MyPage() {
>         ...
>         add(new MyPanel("panelId"));
>         ...
>     }
> dragging elements (having DraggableBehavior) of 'MyPanel'
> works.
> 
> However doing:
>     ...
>     @Override
>     public void onClick(AjaxRequestTarget target)
> {
>         Panel panel = new
> MyPanel("panelId");
>         addOrReplace(panel);
>         target.addComponent(panel);
>     }
>     
> dragging elements of 'MyPanel' DO NOT works
> (DraggableBehavior is lost).
> 
> 
> What's going on ?
> Any help is (very) appreciated,
> thanks Stefan
> 
> Using:
> Wicket-1.4.rc4,
> WicketJQuery-0.3.4
> 
> 
> 
> 
>       
> 
> -
> 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: Conversation scope in wicket

2009-06-18 Thread James Carman
On Thu, Jun 18, 2009 at 7:07 AM, Carl-Eric Menzel
 wrote:
>
> +1
>
> I fully agree. Conversation scope is a kludge for a broken model, and in
> the end nothing more than a specialized form of global variables.

To which model are you referring?

>
> Just put your state into the appropriate page or component instances
> and/or models, and you get *any* scope you need, for free.

Your business logic might not know anything about page/component
instances, but it may support "conversations."

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



Re: Conversation scope in wicket

2009-06-18 Thread Carl-Eric Menzel
+1

I fully agree. Conversation scope is a kludge for a broken model, and in
the end nothing more than a specialized form of global variables. 

Just put your state into the appropriate page or component instances
and/or models, and you get *any* scope you need, for free.

Carl-Eric


On Thu, 18 Jun 2009 01:55:26 -0700 (PDT)
svenmeier  wrote:

> 
> What is this 'conversation' all about?
> 
> It doesn't seem to be a known concept in any GUI guideline I know
> (e.g. Apple's Human Interface Guidelines). Neither does wikipedia
> list it under http://en.wikipedia.org/wiki/GUI_widget.
> 
> This is what wikipedia is saying about Seam's conversation: 'The
> default Seam context is conversation which can span multiple pages
> and usually spans the whole business flow, from start to finish.'
> This seems to describe a
> http://en.wikipedia.org/wiki/Wizard_(software) .
> 
> IMHO 'conversation' is a buzzword invented for those who still think
> a web UI consists of a sequence of HTML pages only.
> Back in 2000 the same guys invented 'mvc-2' and told us that a UI can
> be built on actions only.
> 
> Just my rant (worth 2 cents or less).
> 
> Back to Wicket and wizards:
> For a wizard I'd suggest to use a single Wicket page, replacing
> components as you step through it.
> Note that Wicket extensions provide a wizard component, but you can
> easily roll your own implementation.
> 
> Sven
> 
> > Hican this functionality added to the standard wicket?
> > actually much of seam popularity came from supporting conversation
> > scope...,
> > so i think that adding explicit wicket support will have momentum
> > i think that having just a store for conversation objects will be a
> > good begin
> > then we may add apis like beginConversation, endConversation
> > ,joinConversation,mergeConversation
> > ,suspendConversation,resumeConversation
> > and other concepts like workspace
> > what do u think?
> > Joe
> 

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



Re: WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Wojciech Żaboklicki

I think it's the simmilar situation like here
http://www.nabble.com/DOJO-Menu-Items-and-AJAX-Target-Components-td24020833.html

I posted here few days ago about dojo-menus, but I couldn't solve it.

There is a problem attaching js behavior on ajax rerendered components.
Is there anybody here who managed this problem?

Regards,
Wojtek

Stefan Jozsa pisze:

Doing:
public MyPage() {
...
add(new MyPanel("panelId"));
...
}
dragging elements (having DraggableBehavior) of 'MyPanel' works.

However doing:
...
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new MyPanel("panelId");
addOrReplace(panel);
target.addComponent(panel);
}

dragging elements of 'MyPanel' DO NOT works

(DraggableBehavior is lost).


What's going on ?
Any help is (very) appreciated,
thanks Stefan

Using:
Wicket-1.4.rc4,
WicketJQuery-0.3.4




  


-
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: Conversation scope in wicket

2009-06-18 Thread Johan Compagner
+1

that whole api like beginConversation, end etc
just looks to me like set/get methods on session.
Or and that is in my eyes better is to transport the conversation object (1
object not many) from 1 page to the next
or use as below 1 page and just replace panels. And then the page model
object is the conversation object

johan



On Thu, Jun 18, 2009 at 10:55, svenmeier  wrote:

>
> What is this 'conversation' all about?
>
> It doesn't seem to be a known concept in any GUI guideline I know (e.g.
> Apple's Human Interface Guidelines). Neither does wikipedia list it under
> http://en.wikipedia.org/wiki/GUI_widget.
>
> This is what wikipedia is saying about Seam's conversation: 'The default
> Seam context is conversation which can span multiple pages and usually
> spans
> the whole business flow, from start to finish.'
> This seems to describe a http://en.wikipedia.org/wiki/Wizard_(software) .
>
> IMHO 'conversation' is a buzzword invented for those who still think a web
> UI consists of a sequence of HTML pages only.
> Back in 2000 the same guys invented 'mvc-2' and told us that a UI can be
> built on actions only.
>
> Just my rant (worth 2 cents or less).
>
> Back to Wicket and wizards:
> For a wizard I'd suggest to use a single Wicket page, replacing components
> as you step through it.
> Note that Wicket extensions provide a wizard component, but you can easily
> roll your own implementation.
>
> Sven
>
> > Hican this functionality added to the standard wicket?
> > actually much of seam popularity came from supporting conversation
> > scope...,
> > so i think that adding explicit wicket support will have momentum
> > i think that having just a store for conversation objects will be a good
> > begin
> > then we may add apis like beginConversation, endConversation
> > ,joinConversation,mergeConversation
> > ,suspendConversation,resumeConversation
> > and other concepts like workspace
> > what do u think?
> > Joe
>
> --
> View this message in context:
> http://www.nabble.com/Conversation-scope-in-wicket-tp24078377p24088943.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
>
>


WicketJQuery: Drag & drop behavior lost for components of AJAX updated panels

2009-06-18 Thread Stefan Jozsa

Doing:
public MyPage() {
...
add(new MyPanel("panelId"));
...
}
dragging elements (having DraggableBehavior) of 'MyPanel' works.

However doing:
...
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new MyPanel("panelId");
addOrReplace(panel);
target.addComponent(panel);
}

dragging elements of 'MyPanel' DO NOT works
(DraggableBehavior is lost).


What's going on ?
Any help is (very) appreciated,
thanks Stefan

Using:
Wicket-1.4.rc4,
WicketJQuery-0.3.4




  

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



Who went to the GWT vs Wicket presentation in Normandy and wants to share their findings?

2009-06-18 Thread Martijn Dashorst
There's been quite some announcements going across twitter, but no
conclusion...

Martijn

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



Reverse geocoding with wicket contrib gmap2

2009-06-18 Thread Jesse Kivialho

Hi,

I'm using wicket 1.3.5. and downloaded the wicket contrib gmap2 from the 
wicket-stuff 1.3.x branch 
(https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-gmap2/)


I've noticed that the GClientGeocoder knows the reverse geocoding also. 
When I try the example Geocoder in contrib-gmap2-examples it gives me a 
name of the place if write to the address-field ie. 60,20.


Also, I managed to do the reverse geocoding with the server geocoder 
(wicket.contrib.gmap.util.Geocoder) by mostly copy-pasting an additional 
decoding method (since the original assumes the response to be type 
GlatLng):


public String reverseDecode(String response) throws GeocoderException {

StringTokenizer gLatLng = new StringTokenizer(response, ",");

String status = gLatLng.nextToken();
gLatLng.nextToken(); // skip precision
String address = "";
while (gLatLng.hasMoreTokens()) {
address += gLatLng.nextToken();
}

if (Integer.parseInt(status) != GeocoderException.G_GEO_SUCCESS) {
throw new GeocoderException(Integer.parseInt(status));
}
return address;
}

With reverse geocoding I want to show the markers location in text, not in 
latitude-longitude-pairs. So, when the user adds a new marker by clicking 
on the map or moves an existing marker by dragging it, I want to show the 
city name the marker is in (instead of latlng). With that additional 
server geocoding method I'm able to do it. I'd like to be able to do it 
client-side, since my fear is that the dragging will cause quite many 
reverse geocoding requests.


So how could I give the GClientGeocoder a TextField-object which would 
have the user-clicked latitude-longitude-pair? Or alternatively, how 
should I modify the GClientGeocoder to be able to hook in to the click. 
I've also looked into the click listener, but the request has always 
already been made in the onEvent-method, so I don't know how to alter the 
request.


The gmap2 extension is working nicely and helps me a lot, thanks!

br,

Jesse Kivialho

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



UrlValidator rfc3986 version?

2009-06-18 Thread yong mook kim

Hi, 

  Currently Wicket is using rfc2396 for URL validator, may be know any plan to 
migrate URL validator for rfc3986 ?

http://www.ietf.org/rfc/rfc2396.txt
http://www.ietf.org/rfc/rfc3986.txt

best regards
yong


  

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



Re: Conversation scope in wicket

2009-06-18 Thread svenmeier

What is this 'conversation' all about?

It doesn't seem to be a known concept in any GUI guideline I know (e.g.
Apple's Human Interface Guidelines). Neither does wikipedia list it under
http://en.wikipedia.org/wiki/GUI_widget.

This is what wikipedia is saying about Seam's conversation: 'The default
Seam context is conversation which can span multiple pages and usually spans
the whole business flow, from start to finish.'
This seems to describe a http://en.wikipedia.org/wiki/Wizard_(software) .

IMHO 'conversation' is a buzzword invented for those who still think a web
UI consists of a sequence of HTML pages only.
Back in 2000 the same guys invented 'mvc-2' and told us that a UI can be
built on actions only.

Just my rant (worth 2 cents or less).

Back to Wicket and wizards:
For a wizard I'd suggest to use a single Wicket page, replacing components
as you step through it.
Note that Wicket extensions provide a wizard component, but you can easily
roll your own implementation.

Sven

> Hican this functionality added to the standard wicket?
> actually much of seam popularity came from supporting conversation
> scope...,
> so i think that adding explicit wicket support will have momentum
> i think that having just a store for conversation objects will be a good
> begin
> then we may add apis like beginConversation, endConversation
> ,joinConversation,mergeConversation
> ,suspendConversation,resumeConversation
> and other concepts like workspace
> what do u think?
> Joe

-- 
View this message in context: 
http://www.nabble.com/Conversation-scope-in-wicket-tp24078377p24088943.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 mini veil

2009-06-18 Thread Jing Ge (Besitec IT DEHAM)
Thanks for the replay.

The label is just example code. You can try doing anything in the
onSubmit(..) method of the AjaxButton(). 

The point is that the button is disabled when Veil is used.

Best regards!
Jing
--- 
 

-Original Message-
From: Warren Bell [mailto:warrenbe...@gmail.com] 
Sent: Mittwoch, 17. Juni 2009 17:46
To: users@wicket.apache.org
Subject: Re: wicketstuff mini veil

I don't know about the mini veil, but shouldn't your label and button be
set up something like this:

In the class add a member that is your model string and then modify it
in in the AjaxButton#onSubmit(...)

String modelString = ""

...

final Label label = new Label("testLabel", new Model("")
{

@Override
protected String getObject()
{
return modelString;
}

});

...

AjaxButton button = new AjaxButton("testVeil")

{
@Override
protected void onSubmit(AjaxRequestTarget arg0, Form arg1)
{

modelString = "" + new Random().nextLong();
arg0.addComponent(label);

}
}

I have not used setDefaultModelObject(...) before. I read that you
shouldn't set a model object this way. Maybe that is causing a problem?


Warren


Jing Ge (Besitec IT DEHAM) wrote:
> Hello, 
>
> After doing this change, the project can be compiled and run. But I
get
> another problem.
>
> Here is my test code:
>
>   final Label label = new Label("testLabel", new
> Model(""));
>   add(label);
>   Form form = new Form("testForm");
>   AjaxButton button = new AjaxButton("testVeil") {
>
> @Override
> protected void onSubmit(AjaxRequestTarget arg0, Form
> arg1) {
> try {
> Thread.sleep(5000);
> label.setDefaultModelObject("" + new
> Random().nextLong());
> arg0.addComponent(label);
> } catch (InterruptedException ex) {
>  
> Logger.getLogger(HomePage.class.getName()).log(Level.SEVERE, null,
ex);
> }
> }
> };
> button.add(new Veil());
> form.add(button);
> add(form);
>
> After the application is deployed and running, the ajax button is
> disabled. Did I do something wrong? 
>
> Best regards!
> Jing Ge
>
> -Original Message-
> From: Jing Ge (Besitec IT DEHAM) [mailto:j...@besitec.com] 
> Sent: Mittwoch, 17. Juni 2009 10:18
> To: users@wicket.apache.org
> Subject: RE: wicketstuff mini veil
>
> Hello,
>
>  
>
> Should it be:
>
>  
>
>super.bind(component);
>
>if (this.component != null) {
>
>   .
>
>}
>
>  
>
> regards!
>
> Jing Ge
>
>  
>
> -Original Message-
> From: Jing Ge (Besitec IT DEHAM) [mailto:j...@besitec.com] 
> Sent: Mittwoch, 17. Juni 2009 10:15
> To: users@wicket.apache.org
> Subject: wicketstuff mini veil
>
>  
>
> Hallo,
>
>  
>
>  
>
>  
>
> I have checked out the source code and taken a look at the class Veil.
I
>
> found the following code:
>
>  
>
>  
>
>  
>
>public void bind(Component component)
>
>  
>
>{
>
>  
>
>   super.bind(component);
>
>  
>
>   if (component != null)
>
>  
>
>   {
>
>  
>
>  throw new IllegalStateException(
>
>  
>
>   "This behavior
is
>
> already bound to component. An instance of this behavior cannot be
>
> reused between components. Bound component: "
>
>  
>
>  
>
> + this.component.toString());
>
>  
>
>   }
>
>  
>
>   this.component = component;
>
>  
>
>}
>
>  
>
>  
>
>  
>
> From the code we can see, the component will be checked after binding.
>
> If it is null, an exception will be thrown. 
>
>  
>
>  
>
>  
>
> Well, actually, I don't get it. Since the component can not be null
>
> after binding, the exception will be always thrown. Show me if I am
>
> wrong.
>
>  
>
>  
>
>  
>
> Has anyone ever used the mini veil? Could anyone give me hand? Thanks.
>
>  
>
>  
>
>  
>
> Best regards!
>
>  
>
> Jing Ge
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>  
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>   


-- 
Thanks,

Warren Bell
909-645-8864
warrenbe...@gmail.com


-
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