Re: IE8, IE7 Ajax fails with Wicket 6?

2012-10-31 Thread T Ames
I tried this with the example and I got the JS errors when I used the X to
close the window. When using the "Show modal dialog with a page" and then a
close link that returns a response, the window closed fine.



On Wed, Oct 31, 2012 at 3:22 PM, Jack Berg  wrote:

> Hi,
>
> I'm having problem with javascript in IE8 and IE7. I am getting a flood of
> SCRIPT5007: Unable to get value of the property
> 'jQuery17209514285345432955': object is null or undefined
> jquery-ver-1348220874405.js, line 3405 character 3
> errors to the console
> or an
> SCRIPT438: Object doesn't support this property or method
> jquery-ver-1348220874405.js, line 3241 character 6
> error to the console (element type: select-one; property:focus).
>
> The problem can also be observed in the simple example
> www.wicket-library.com/wicket-examples-6.0.x/ajax/modal-window
> Just open the modal, close the modal. Observe how the console is flooded
> with error messages. IE9 in IE8 mode will also do.
>
> If your browser is configured to show pop-ups of those javascript errors,
> then you are screwed.
>
> Tried it with wicket 6.2. Line numbers are for development mode javascript.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/IE8-IE7-Ajax-fails-with-Wicket-6-tp4653503.html
> Sent from the Users forum 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: DropDownChoice - how to select default item

2010-09-01 Thread T Ames
Mike may have been referring to the usage of "this" when he was
talking about the constructor.  I create drop downs in constructors
with no issue, I have not however used a "this" with a property model.

Wild guess:  possibly java is in the process of constructing the
object, but DropDownChoice cannot access the "this" yet?

On occasion I am using drop downs without choice renderer and setting
the initial value OK.


On Wed, Sep 1, 2010 at 10:20 AM, Sven Meier  wrote:
> Hi,
>
> your dropdown accesses the selected account via a model, so it should work
> regardless when you initialize the selectedAccount variable.
>
> Put a breakpoint on that line and check the return value of
> getDefaultAccount().
>
> BTW using Model and IChoiceRenderer gives you some advantages
> (always up-to-date account list, don't keep selected account in session,
> ...).
>
> Sven
>
> On 09/01/2010 04:02 PM, drf wrote:
>>
>> Mike
>>
>> Thanks - not sure if the problem is with the fact that the code is in the
>> constructor:
>> 1) the In Action book seems to setup dropdowns ect in the constructor -
>> where else would I define the drop down?
>> 2) the debugger and syout both show that selectedAccount has the correct
>> value prior to constructing the dropdown.
>>
>> Re IChoseRenderer, the dropdown is displaying the correct values and also
>> updating selectedAccount correctly. So what does IChoseRenderer apart from
>> saving the effort to extract the raw account numbers - are you brining in
>> IChoseRenderer as good advice or are you saying that the fact I am not
>> using
>> it is part of the issue?
>>
>> I need to understand Models better, but I am wondering - do I have to
>> write
>> another class to wrap Account with a Model implementation just to do this
>> simple thing? Also, if the selectedAccount is correctly set before calling
>> the constructor, will this still help?
>>
>> David
>>
>>
>
>
> -
> 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: Wicket + Eclipse + Tomcat

2010-08-23 Thread T Ames
Hmmm.  I would try a clean install of Eclipse (I am using 3.6.0) , the
m2eclipse plugin that goes with that version and a fresh workspace.
Create a Maven Project and then select a wicket archetype or the maven
web archetype.  I have used both archetypes and they "should" create
web projects upon completion.

On Mon, Aug 23, 2010 at 9:55 AM, Mike Dee  wrote:
>
> That is the same setup I have.  Tomcat and Eclipse are on the same machine.
> The problem is that when creating the project through Maven and importing to
> Eclipse, something goes wrong.  The end result is that a Java project is
> created - not a web app (Dynamic Web Project).  Java projects can not be
> added to the Tomcat list of apps.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335146.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: Wicket + Eclipse + Tomcat

2010-08-23 Thread T Ames
I have never used that option when developing with Tomcat and the
m2eclipse plugin. I have my development Tomcat loaded on the same
machine as Eclipse, so the dynamic updates to Tomcat just happen when
I change a class.  You see this down in the Servers tab. It will say
[Started, Synchronized] or [Started, Restart]. If Restart shows, then
I click the restart on the Server tab.

Are you adding the project to the Server?  In the Server tab, right
click your Tomcat server and do and Add and Remove.

On Mon, Aug 23, 2010 at 9:40 AM, Mike Dee  wrote:
>
> When I tried the m2eclipse plugin, it created a (WTP) java project.  Since it
> wasn't a webapp (aka Dynamic Web Project in WTP lingo), it had no "Run As
> Server" command.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335123.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: Wicket + Eclipse + Tomcat

2010-08-23 Thread T Ames
In Eclipse I use the m2eclipse plugin.  It works pretty good and I
rarely use the command line.  To start a Wicket project, I create a
Maven project which is part of the m2eclipse plug in.  I then bring in
the org.apache.wicket quickstart archetype.  This creates a web
project. I then modify the pom.xml to remove the jetty stuff and add
is some of my own.

To build the war, I used to use the Export -> War which worked fine,
but I then added some extra copy and clean-up procedures in my pom.xml
so now I just use Run As -> Maven Package (part of m2eclipse plugin)


I should really look into using jetty someday, but our production
servers are all Tomcat so that is what I have stuck with so far.


On Mon, Aug 23, 2010 at 8:41 AM, Mike Dee  wrote:
>
> Good point.
>
> In the case of automating or scripting builds, is there ever a worry about
> keeping the Eclipse and Maven builds consistent?  I would imagine that one
> could develop and debug in Eclipse.  But when it comes time to do an
> official build (with Maven), the results could be a little different.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Eclipse-Tomcat-tp2333641p2335041.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: TextField

2010-07-26 Thread T Ames
If I take out the setType method, still no cast error, but the Integer
checking is not done - feedback panel does not receive an error.



On Mon, Jul 26, 2010 at 9:23 AM, T Ames  wrote:
> I just whipped up a test, this is working - at least on 1.4.1
>
>         Form form = new Form("form");
>         add(form);
>
>         final TextField textInt = new
> TextField("textInt", new Model());
>         textInt.setType(Integer.class);
>         form.add(textInt);
>
> I did not get any errors casting to Long.  I even added a feedback
> panel and put in alpha characters. It properly came back stated that
> ...'abc' is not a valid Integer.
>
>
>
> On Mon, Jul 26, 2010 at 1:21 AM, dferguson  wrote:
>>
>> When I supply Integer as the type, i get an error cannot cast "Long" to 
>> "Integer"
>>
>> D/
>>
>> On Jul 22, 2010, at 5:01 PM, Josh Glassman wrote:
>>
>> > There is also a constructor that will take a Class type as a parameter.
>> >
>> > On Thu, Jul 22, 2010 at 3:11 PM, T Ames  wrote:
>> >
>> >> I think you have to use the setType(Integer.class) method on the TextField
>> >> object.
>> >>
>> >> setType
>> >>
>> >> public final FormComponent
>> >>
>> >> > >>
>> >> >
>> >> *setType*(java.lang.Class type)
>> >>
>> >> Sets the type that will be used when updating the model for this 
>> >> component.
>> >> If no type is specified String type is assumed.
>> >>
>> >> *Parameters:*type - *Returns:*this for chaining
>> >>
>> >> On Thu, Jul 22, 2010 at 1:50 PM, Douglas Ferguson <
>> >> doug...@douglasferguson.us> wrote:
>> >>
>> >>> Has anybody succesfully used TextField?
>> >>>
>> >>> I get an runtime exception trying to cast String to Integer.
>> >>>
>> >>> If supply (Integer.class) to the constructor then it is trying to case
>> >> Long
>> >>> to Integer.
>> >>>
>> >>> D/
>> >>>
>> >>
>>
>>
>> -
>> 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: TextField

2010-07-26 Thread T Ames
I just whipped up a test, this is working - at least on 1.4.1

        Form form = new Form("form");
        add(form);

        final TextField textInt = new
TextField("textInt", new Model());
        textInt.setType(Integer.class);
        form.add(textInt);

I did not get any errors casting to Long.  I even added a feedback
panel and put in alpha characters. It properly came back stated that
...'abc' is not a valid Integer.



On Mon, Jul 26, 2010 at 1:21 AM, dferguson  wrote:
>
> When I supply Integer as the type, i get an error cannot cast "Long" to 
> "Integer"
>
> D/
>
> On Jul 22, 2010, at 5:01 PM, Josh Glassman wrote:
>
> > There is also a constructor that will take a Class type as a parameter.
> >
> > On Thu, Jul 22, 2010 at 3:11 PM, T Ames  wrote:
> >
> >> I think you have to use the setType(Integer.class) method on the TextField
> >> object.
> >>
> >> setType
> >>
> >> public final FormComponent
> >>
> >>  >>
> >> >
> >> *setType*(java.lang.Class type)
> >>
> >> Sets the type that will be used when updating the model for this component.
> >> If no type is specified String type is assumed.
> >>
> >> *Parameters:*type - *Returns:*this for chaining
> >>
> >> On Thu, Jul 22, 2010 at 1:50 PM, Douglas Ferguson <
> >> doug...@douglasferguson.us> wrote:
> >>
> >>> Has anybody succesfully used TextField?
> >>>
> >>> I get an runtime exception trying to cast String to Integer.
> >>>
> >>> If supply (Integer.class) to the constructor then it is trying to case
> >> Long
> >>> to Integer.
> >>>
> >>> D/
> >>>
> >>
>
>
> -
> 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: TextField

2010-07-22 Thread T Ames
I think you have to use the setType(Integer.class) method on the TextField
object.

setType

public final FormComponent
>
*setType*(java.lang.Class type)

Sets the type that will be used when updating the model for this component.
If no type is specified String type is assumed.

 *Parameters:*type - *Returns:*this for chaining

On Thu, Jul 22, 2010 at 1:50 PM, Douglas Ferguson <
doug...@douglasferguson.us> wrote:

> Has anybody succesfully used TextField?
>
> I get an runtime exception trying to cast String to Integer.
>
> If supply (Integer.class) to the constructor then it is trying to case Long
> to Integer.
>
> D/
>


Re: IE6 issue regarding Wicket JS and Ajax

2010-04-08 Thread T Ames
Hmmm, curious.  Not sure what you mean exactly by the mask, but on one of my
apps, there are three date pickers in a Panel.  This also has a ModalWindow
that pops up over that panel.  I just tried it and do not experience any
problems.  I even left the DatePicker calendar open and then opened and
closed the modal.

On Thu, Apr 8, 2010 at 11:06 AM, Martin Asenov  wrote:

> Hi, T Ames!
>
> The datepicker is not in a modal window, but in a page. I was saying that
> when a modal window is closed, the mask it creates is never removed. Anyway,
> we'll probably not support IE6
>
> Best,
> Martin
>
> Martin Asenov | Software Developer
> Velti
> Mob: +359.89.986.6745 | Tel: +359.2.933.5541 | Fax: +359.2.933.5502
> Email: mase...@velti.com | Web: www.velti.com
> Velti is a global leader in the provision of mobile marketing solutions and
> value added services for mobile
> operators, ad agencies, brands, and media groups.
> London | New York | San Francisco | Boston | Athens | Madrid | Sofia |
> Nicosia | Moscow | Dubai |
>
> New Delhi | Mumbai | Beijing | Shanghai
>
>
> -Original Message-
> From: T Ames [mailto:tamesw...@gmail.com]
> Sent: Thursday, April 08, 2010 6:03 PM
> To: users@wicket.apache.org
> Subject: Re: IE6 issue regarding Wicket JS and Ajax
>
> Sadly in the corporate world these things move  very, very slowly.  We have
> vendor apps that require IE6 so we are at their mercy.
>
> Anyways, we use IE6 and DatePicker is working although I don't think I have
> tried in on a ModalWindow.
>
>
>
> On Thu, Apr 8, 2010 at 10:23 AM, Martijn Dashorst <
> martijn.dasho...@gmail.com> wrote:
>
> > IE6's not pinin,' it's passed on! This browser is no more! It has
> > ceased to be! It's expired and gone to meet its maker! This is a late
> > browser! It's a stiff! Bereft of life, it rests in peace! If you
> > hadn't nailed him to the perch he would be pushing up the daisies! Its
> > metabolical processes are of interest only to historians! It's hopped
> > the twig! It's shuffled off this mortal coil! It's run down the
> > curtain and joined the choir invisible! This is an EX-BROWSER!
> >
> > http://ie6funeral.com
> >
> > Martijn
> >
> > On Thu, Apr 8, 2010 at 4:17 PM, Martin Asenov  wrote:
> > > Hello, everyone!
> > > I just noticed that my DatePicker doesn't work in IE6 - it doesn't even
> > get displayed on mouse click. Also, when I close a modal window, the mask
> > isn't hidden and the underlying page is not intractable, so I'm forced to
> > refresh the whole page.
> > > Also, ajax components update cause some screen flickering and
> misplacing
> > some components (images, dropdown choices, etc.)
> > > All problems occur in IE6.
> > > Any ideas?
> > > Best,
> > >
> > >
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.4 increases type safety for web applications
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.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: IE6 issue regarding Wicket JS and Ajax

2010-04-08 Thread T Ames
Sadly in the corporate world these things move  very, very slowly.  We have
vendor apps that require IE6 so we are at their mercy.

Anyways, we use IE6 and DatePicker is working although I don't think I have
tried in on a ModalWindow.



On Thu, Apr 8, 2010 at 10:23 AM, Martijn Dashorst <
martijn.dasho...@gmail.com> wrote:

> IE6's not pinin,' it's passed on! This browser is no more! It has
> ceased to be! It's expired and gone to meet its maker! This is a late
> browser! It's a stiff! Bereft of life, it rests in peace! If you
> hadn't nailed him to the perch he would be pushing up the daisies! Its
> metabolical processes are of interest only to historians! It's hopped
> the twig! It's shuffled off this mortal coil! It's run down the
> curtain and joined the choir invisible! This is an EX-BROWSER!
>
> http://ie6funeral.com
>
> Martijn
>
> On Thu, Apr 8, 2010 at 4:17 PM, Martin Asenov  wrote:
> > Hello, everyone!
> > I just noticed that my DatePicker doesn't work in IE6 - it doesn't even
> get displayed on mouse click. Also, when I close a modal window, the mask
> isn't hidden and the underlying page is not intractable, so I'm forced to
> refresh the whole page.
> > Also, ajax components update cause some screen flickering and misplacing
> some components (images, dropdown choices, etc.)
> > All problems occur in IE6.
> > Any ideas?
> > Best,
> >
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket and Reverse Proxy

2010-03-26 Thread T Ames
Makes sense, but I need to override this behavior.  Is there a way to stop
Wicket from sending the  elements at the time of the AJAX response?

On Fri, Mar 26, 2010 at 9:52 AM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote:

> because wicket doesnt track what has been "sent" or not, it simply
> renders what you tell it to. the filtering of duplicates happens on
> the client side where js knows whats is there and what is not.
>
> -igor
>
> On Fri, Mar 26, 2010 at 5:53 AM, T Ames <tamesw...@gmail.com> wrote:
> > H... No responses.  Maybe I can attack this little by little.
> >
> > When an AJAX response is sent back to the browser, is there a way to stop
> > Wicket from sending the <script>
> > elements?  These <script> elements are already there on the initial page
> > load so I don't see why it needs to send these again on the AJAX
> response.
> >
> >
> > On Mon, Feb 22, 2010 at 11:59 AM, T Ames <tamesw...@gmail.com> wrote:
> >
> >> A while ago I sent a message ( at bottom) and received no responses. In
> >> that message I had thought that AJAX was not working, but I was
> mistaken. In
> >> the Ajax Debug screen, Wicket is responding back with a stream.
> >>
> >> Here is one of the issues that I found.
> >>
> >> I get this error.
> >> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is
> >> null or not an object
> >>
> >> The Juniper system adds strange things in the resource path.
> >>
> >> Example. This is a snippet of the source view on initial load for wicket
> >> javascript:
> >>
> >> <script type="text/javascript"
> >>
> src="../resources/org.apache.wicket.markup.html.WicketEventReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-event.js">
> >>  >>
> src="../resources/org.apache.wicket.ajax.WicketAjaxReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax.js">
> >>  >>
> src="../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax-debug.js">
> >>  >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> >> wicketAjaxDebugEnable=true;
> >> /*-->]]>*/
> >>
> >>
> >> When the ajax stream is returned from the ajax call, the "added" stuff
> is
> >> not there:
> >>
> >>  >>
> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js">
> >>  >>
> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js">
> >>  >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> >> wicketAjaxDebugEnable=true;
> >> /*-->]^]^>*/
> >>
> >> so I am assuming this is why I am getting the Wicket Ajax Error.
> >>
> >> I am not understanding what Juniper is trying to do. I was hoping maybe
> >> someone may be able to shed some light on this. Another strange thing I
> >> noticed was when debugging the web page in Eclipse, my class level
> variables
> >> were always set at the initial value even though I would change the
> value
> >> within the ajax code.  If I run the application normally without using
> >> Juniper, the class level values change as you would expect.  It is
> strange
> >> but is seems like each time I am returned to the java code I am getting
> the
> >> the initial page object.
> >>
> >>
> >>>
> >>
> >> Nabble link to original messsage ->
> >> http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730
> >>
> >>
> 
> >> June 18, 2009
> >>
> >> 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.
> >>
> >> .
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket and Reverse Proxy

2010-03-26 Thread T Ames
H... No responses.  Maybe I can attack this little by little.

When an AJAX response is sent back to the browser, is there a way to stop
Wicket from sending the 
elements?  These <script> elements are already there on the initial page
load so I don't see why it needs to send these again on the AJAX response.


On Mon, Feb 22, 2010 at 11:59 AM, T Ames <tamesw...@gmail.com> wrote:

> A while ago I sent a message ( at bottom) and received no responses. In
> that message I had thought that AJAX was not working, but I was mistaken. In
> the Ajax Debug screen, Wicket is responding back with a stream.
>
> Here is one of the issues that I found.
>
> I get this error.
> ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is
> null or not an object
>
> The Juniper system adds strange things in the resource path.
>
> Example. This is a snippet of the source view on initial load for wicket
> javascript:
>
> <script type="text/javascript"
> src="../resources/org.apache.wicket.markup.html.WicketEventReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-event.js">
>  src="../resources/org.apache.wicket.ajax.WicketAjaxReference/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax.js">
>  src="../resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/,DanaInfo=159.116.216.35,Port=38080,CT=js+wicket-ajax-debug.js">
>  id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]]>*/
>
>
> When the ajax stream is returned from the ajax call, the "added" stuff is
> not there:
>
>  src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js">
>  src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js">
>  id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]^]^>*/
>
> so I am assuming this is why I am getting the Wicket Ajax Error.
>
> I am not understanding what Juniper is trying to do. I was hoping maybe
> someone may be able to shed some light on this. Another strange thing I
> noticed was when debugging the web page in Eclipse, my class level variables
> were always set at the initial value even though I would change the value
> within the ajax code.  If I run the application normally without using
> Juniper, the class level values change as you would expect.  It is strange
> but is seems like each time I am returned to the java code I am getting the
> the initial page object.
>
>
>>
>
> Nabble link to original messsage ->
> http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730
>
> 
> June 18, 2009
>
> 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.
>
> .
>


Re: Where to put an application's configuration parameters?

2010-03-08 Thread T Ames
As an alternative, I place all my properties in an LDAP server.  In the
Application, I have a class that retrieves the properties.



On Sun, Mar 7, 2010 at 8:33 PM, James Carman wrote:

> And if you want live redeployment, you could use jrebel and their spring
> plugin.  I think it will reload beans based on property file changes
>
> On Mar 7, 2010 7:17 PM, "Riyad Kalla"  wrote:
>
> James,
>
> Thanks for the link.
>
> -R
>
> On Sun, Mar 7, 2010 at 4:50 PM, James Carman  >wrote:
>
>
> > If you want to see how I did it with spring config, you can check out my
> > advanced wicket demo a...
>


Re: W.: serializable problem

2010-02-26 Thread T Ames
Here was my response to your original post:

Serialization gets tricky. You must be very careful about all of the class
level fields/objects you use. They must all be serializable and each object
that those objects use or refer to must be serializable. Instead of using
class level fields, wherever possible, pass objects around as parameters to
your methods and constructors.  This would include class level
fields/objects in the Session object too since obviously that gets
serialized.


I had a situation similar to yours where a class that is used by the JDBC
driver was not serializable.  To make a long story short, I was using a
class level field that down the chain eventually ended up being mapped to
the database and thus utilizing the jdbc driver's class.  It took me quite a
while to find this one :)

I did not really need that field/object at the class level.  When I removed
it and reworked the code a bit, the problem went away.  After I found it, I
was wondering why I used this at the class level anyway.


2010/2/26 björn liffers 

> hello,
> i´ve got a problem with serialization.
>
> my application is connected to a mysql-db and every class of mine
> implements serializable.
> but still there are exceptions telling me that java.lang.Object isn´t
> serializable...
>
> 
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: java.lang.Object
>
> private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
> [class=java.util.HashMap]
> private java.util.Map
> com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
> [class=java.lang.Object] <- field that is not serializable
> 
>
> is there a possibility to deactivate serialization?
> or how shall i solve this problem?
>
> kind regards ans many thanks to those who can help me out of the
> serialization-jungle (never serialized anything before and i am relatively
> new to wicket with my very first real wicket-project)
>
>
>
>
> Tolle Dekolletés oder scharfe Tatoos? Vote jetzt ... oder mach selbst mit
> und zeige Deine Schokoladenseite
> bei Topp oder Hopp von Arcor: http://www.arcor.de/rd/footer.toh
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: serializable problem

2010-02-25 Thread T Ames
Serialization gets tricky. You must be very careful about all of the class
level fields/objects you use. They must all be serializable and each object
that those objects use or refer to must be serializable. Instead of using
class level fields, wherever possible, pass objects around as parameters to
your methods and constructors.  This would include class level
fields/objects in the Session object too since obviously that gets
serialized.


I had a situation similar to yours where a class that is used by the JDBC
driver was not serializable.  To make a long story short, I was using a
class level field that down the chain eventually ended up being mapped to
the database and thus utilizing the jdbc driver's class.  It took me quite a
while to find this one :)

I did not really need that field/object at the class level.  When I removed
it and reworked the code a bit, the problem went away.  After I found it, I
was wondering why I used this at the class level anyway.



2010/2/25 björn liffers 

> hello,
> i´ve got a problem with serialization.
>
> my application is connected to a mysql-db and every class of mine
> implements serializable.
> but still there are exceptions telling me that java.lang.Object isn´t
> serializable...
>
> 
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: java.lang.Object
>
> private java.util.Map com.mysql.jdbc.ConnectionImpl.charsetConverterMap
> [class=java.util.HashMap]
> private java.util.Map
> com.mysql.jdbc.ConnectionImpl.charsetConverterMap[write:1][write:2]
> [class=java.lang.Object] <- field that is not serializable
> 
>
> is there a possibility to deactivate serialization?
> or how shall i solve this problem?
>
> kind regards ans many thanks to those who can help me out of the
> serialization-jungle (never serialized anything before and i am relatively
> new to wicket with my very first real wicket-project)
>
> Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns
> für Sie: der neue Arcor.de-Newsletter!
> Jetzt anmelden und einfach alles wissen:
> http://www.arcor.de/rd/footer.newsletter
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket and Reverse Proxy

2010-02-22 Thread T Ames
A while ago I sent a message ( at bottom) and received no responses. In that
message I had thought that AJAX was not working, but I was mistaken. In the
Ajax Debug screen, Wicket is responding back with a stream.

Here is one of the issues that I found.

I get this error.
ERROR: Wicket.Ajax.Call.failure: Error while parsing response: 'src' is null
or not an object

The Juniper system adds strange things in the resource path.

Example. This is a snippet of the source view on initial load for wicket
javascript:




]]>*/


When the ajax stream is returned from the ajax call, the "added" stuff is
not there:



]^]^>*/

so I am assuming this is why I am getting the Wicket Ajax Error.

I am not understanding what Juniper is trying to do. I was hoping maybe
someone may be able to shed some light on this. Another strange thing I
noticed was when debugging the web page in Eclipse, my class level variables
were always set at the initial value even though I would change the value
within the ajax code.  If I run the application normally without using
Juniper, the class level values change as you would expect.  It is strange
but is seems like each time I am returned to the java code I am getting the
the initial page object.


>

Nabble link to original messsage ->
http://old.nabble.com/Reverse-Proxy-and-AJAX-td24094730.html#a24094730

June 18, 2009

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.


.


Re: beginning with Listview

2009-12-16 Thread T Ames
oops, sorry, your html should look like this:


  link<
span>



On Wed, Dec 16, 2009 at 9:59 AM, T Ames  wrote:

> Hmmm. I have never put actual wicket Link objects as members of a List, so
> it looks a little confusing.  Anyway, you have not added the Link itself.
> What you did was in effect "override" the  tag and made it a Label.  The
> wicket Link object itself does not have a getAddress() method.  The
> onClick() is called when the Link is clicked by the user. It is up to you to
> do something at that point.
>
> Important:  I assume you created the Link objects with an ID = "link".
>
> There is a couple ways to do this but the simplest would be:
>
> Change your html:
>
> 
>wicket:id="linkName">link
> 
>
> Your code:
>
>
> add(new ListView("list", new LinkDAO().allLinks()){
>@Override
>protected void populateItem(ListItem arg0) {
>Link l = (Link)arg0.getModelObject();
>l.add(new Label("linkLabel", l.getName());
>arg0.add(l);
> }
>
>});
>
> Adding the Link will override the href attribute to do a call to the
> onClick() method you defined when you created each Link object.  I assume
> the onClick() method has the code that tells wicket what to do when the Link
> is clicked - like go to to an address.
>
> Generally, Link objects are created as anonymous inner classes. In this
> scenario, you would not create Link objects in your List. Your List would
> contain your label data to display, and what to do when the link is clicked.
>
> add(new ListView("list", new LinkDAO().getLinkData()){
>
>@Override
>protected void populateItem(ListItem arg0) {
>
>LinkDataObject linkData =
> arg0.getModelObject();
>
>Link l = new Link("link") {
>
>  public void onClick() {
> // go somewhere or do something
> ... linkData.getWhereToGo();
>  }
>
>};
>
>l.add(new Label("linkLabel",
> linkData.getLabel());
>arg0.add(l);
> }
>
>});
>
> Hope this helps.
>
>
>
>
> On Wed, Dec 16, 2009 at 8:48 AM, marioosh.net wrote:
>
>> I'm starting with ListView and i like it, but...
>>
>> code:
>>add(new ListView("list", new LinkDAO().allLinks()){
>>@Override
>>protected void populateItem(ListItem arg0) {
>>Link l = (Link)arg0.getModelObject();
>>arg0.add(new Label("link", l.getName()));
>>}
>>
>>});
>>
>> template:
>> 
>> link
>> 
>>
>> question:
>> How to change href="#" with l.getAddress() ?
>>
>> --
>> Greetings
>> marioosh
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: beginning with Listview

2009-12-16 Thread T Ames
Hmmm. I have never put actual wicket Link objects as members of a List, so
it looks a little confusing.  Anyway, you have not added the Link itself.
What you did was in effect "override" the  tag and made it a Label.  The
wicket Link object itself does not have a getAddress() method.  The
onClick() is called when the Link is clicked by the user. It is up to you to
do something at that point.

Important:  I assume you created the Link objects with an ID = "link".

There is a couple ways to do this but the simplest would be:

Change your html:


  link


Your code:

add(new ListView("list", new LinkDAO().allLinks()){
   @Override
   protected void populateItem(ListItem arg0) {
   Link l = (Link)arg0.getModelObject();
   l.add(new Label("linkLabel", l.getName());
   arg0.add(l);
}

   });

Adding the Link will override the href attribute to do a call to the
onClick() method you defined when you created each Link object.  I assume
the onClick() method has the code that tells wicket what to do when the Link
is clicked - like go to to an address.

Generally, Link objects are created as anonymous inner classes. In this
scenario, you would not create Link objects in your List. Your List would
contain your label data to display, and what to do when the link is clicked.

add(new ListView("list", new LinkDAO().getLinkData()){
   @Override
   protected void populateItem(ListItem arg0) {

   LinkDataObject linkData =
arg0.getModelObject();

   Link l = new Link("link") {

 public void onClick() {
// go somewhere or do something
... linkData.getWhereToGo();
 }

   };

   l.add(new Label("linkLabel",
linkData.getLabel());
   arg0.add(l);
}

   });

Hope this helps.



On Wed, Dec 16, 2009 at 8:48 AM, marioosh.net wrote:

> I'm starting with ListView and i like it, but...
>
> code:
>add(new ListView("list", new LinkDAO().allLinks()){
>@Override
>protected void populateItem(ListItem arg0) {
>Link l = (Link)arg0.getModelObject();
>arg0.add(new Label("link", l.getName()));
>}
>
>});
>
> template:
> 
> link
> 
>
> question:
> How to change href="#" with l.getAddress() ?
>
> --
> Greetings
> marioosh
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Query related to displaying ListView items in a particular way

2009-12-03 Thread T Ames
Would gridview also handle a vertical column approach rather than
horizontal?  For example each model item would be a checkbox and
description.  I want two columns of this set on each physical row. Layed out
like a dictionary or phonebook.

The "x" below is a checkbox with a description next to it.


x   AA descriptionx  CB description
x   AB descriptionx  DA description
x   BA descriptionx  DB description
x   BB descriptionx  EA description
x   CA description

On Thu, Dec 3, 2009 at 1:17 AM, vineet semwal wrote:

> take a look at  gridview
>
> On Thu, Dec 3, 2009 at 11:33 AM,  wrote:
>
> > Hi,
> >
> >
> >
> > I have a List View. I want to display the items in this list view in 2
> > columns. The logic for this is as follows:
> >
> >
> >
> > If only 1 item in list then there will 1 item in left columns, and no
> > right column.
> >
> > For 2 items there will be 1 item in left and 1 in right.
> >
> > For 3 items there will be 1st item in left and then 2nd in right and in
> > the next line 3rd in left.
> >
> > For 4 items there will be 1st item in left and then 2nd in right and in
> > the next line 3rd in left and 4th in right.
> >
> > And so on for N items.
> >
> >
> >
> > How can I achieve this?
> >
> >
> >
> > I am interested in both, the HTML markup & code.
> >
> >
> >
> > Thanks.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Vinay Karmarkar
> >
> >
> > Please do not print this email unless it is absolutely necessary.
> >
> > The information contained in this electronic message and any attachments
> to
> > this message are intended for the exclusive use of the addressee(s) and
> may
> > contain proprietary, confidential or privileged information. If you are
> not
> > the intended recipient, you should not disseminate, distribute or copy
> this
> > e-mail. Please notify the sender immediately and destroy all copies of
> this
> > message and any attachments.
> >
> > WARNING: Computer viruses can be transmitted via email. The recipient
> > should check this email and any attachments for the presence of viruses.
> The
> > company accepts no liability for any damage caused by any virus
> transmitted
> > by this email.
> >
> > www.wipro.com
> >
>
>
>
> --
> regards,
> Vineet Semwal
>


Re: Calling IN TO Wicket from JSP

2009-11-12 Thread T Ames
We are actually doing this with the POST as suggested below.  Our intranet
portal is in JSP, and passes info from the portal to individual Wicket apps
in this manner.

For me, these POST parameters appeared in the Request.getParameterMap()



On Thu, Nov 12, 2009 at 11:55 AM, Frank Silbermann <
frank.silberm...@fedex.com> wrote:

>
> When working within Wicket, we need not concern ourselves with the raw
> content of the HttpServletRequest object, as our models are automatically
> updated with the contents.  However, I do believe Wicket provides you with
> the ability to read the HttpServletRequest object if you wish to do so.
>
> Suppose that instead of providing your data as request parameters you POST
> your form to the Wicket page.  Then I imagine that your form data would be
> contained within the HttpServletRequest object -- and your wicket page could
> query it and obtain that data manually.  Further interactions with the user,
> then, would be through Wicket's native mechanisms.
>
> Caution is that I've never done this -- I'm just speculating.
>
> Frank Silbermann,   Memphis, Tennessee
>
> On Thu, Nov 12, 2009 at 8:34 AM, Corbin, James 
> wrote:
> > That is exactly the issue that is causing the problem and what I need
> > clarification on how to do
> >
> > J.D.
> >
> > -Original Message-
> > From: Frank Silbermann [mailto:frank.silberm...@fedex.com]
> > Sent: Thursday, November 12, 2009 9:23 AM
> > To: users@wicket.apache.org
> > Subject: RE: Calling IN TO Wicket from JSP
> >
> > The question, I think, is how to deliver request-specific parameters
> > along with the URL to the Wicket page.  For example, if a form in a JSP
> > page is to be processed by a Wicket page, how can the JSP's form data to
> > be delivered to the Wicket page?
> >
> > Is that the question?
> >
> >> -Original Message-
> >> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> >> Sent: Thursday, November 12, 2009 9:59 AM
> >> To: users@wicket.apache.org
> >> Subject: Re: Calling IN TO Wicket from JSP
> >>
> >> I guess a more concrete example from you would be helpful.  You should
> > be
> >> able to mount a page to a bookmarkable URL and then it will be easy to
> >> create a URL to go into Wicket.
> >
> >
> >>> -Original Message-
> >>> From: Corbin, James [mailto:jcor...@iqnavigator.com]
> >>> Sent: Wednesday, November 11, 2009 4:51 PM
> >>> To: users@wicket.apache.org
> >>> Subject: Calling IN TO Wicket from JSP
> >>>
> >>> Is it possible to build a wicket URL in a JSP that gets forwarded to
> > and
> >>> handle by the Wicket filter mechanism?
> >>>
> >>> This seems like it should be simple but doesn't appear to work right
> > in
> >>> 1.4.1.
> >>>
> >>> We build up a wicketized URL that makes it into the WicketFilter, but
> >>> that filter strips all the request parameters.
> >>>
> >>> Any suggestions on how to approach redirecting from JSP into Wicket
> >>> would be greatly appreciated.
> >>>
> >>> J.D. Corbin | IQNavigator, Inc. | Technology 6465 Greenwood Village
> >>> Blvd, Suite 800, Centennial, CO  80111 | Office 303.563.1503 | Mobile
> >>> 303.912.0958 | www.iqnavigator.com | jcor...@iqnavigator.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
> >
> >
>
> -
> 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: LDAP Authentication

2009-11-05 Thread T Ames
I am using simple AuthenticatedWebApplication and AuthenticatedWebSession
which through that you can assign roles. There are examples in
wicket-examples.

 I wrote my own classes to verify credentials using javax.naming against AD.
Although I don't use roles much, you could assign a role based on AD Groups
membership.


Re: How do you achieve persistency

2009-10-06 Thread T Ames
I use a product called JPersist - no XML, just POJOs.  Has built in pooling.
I instantiate the DatabaseManager in the web application and use a getter.

http://www.jpersist.org

It has a list of tested databases, but I use Microsoft SQL.  Haven't had too
many issues with it.





On Tue, Oct 6, 2009 at 5:34 AM, Peter Arnulf Lustig wrote:

> What's the fast and easy way?
>
> I am asking because of a lot of trouble with hibernate.
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to list files by name in Eclipe's Package Explorer?

2009-10-05 Thread T Ames
Your question should be "Is it possible to?"

I have not found a way.  I have gotten used to it.



On Mon, Oct 5, 2009 at 8:48 AM, David Chang  wrote:

> Does anybody know the trick for this task? Thanks!
>
>
> --- On Sun, 10/4/09, David Chang  wrote:
>
> > From: David Chang 
> > Subject: How to list files by name in Eclipe's Package Explorer?
> > To: users@wicket.apache.org
> > Date: Sunday, October 4, 2009, 4:44 PM
> > Hello,
> >
> > I am using Eclipse for devleopment. The files in its
> > Package Explorer are listed by extensions: java files first.
> > This is good for non-wicket development. Now each page's
> > java and markup files are in the same directory and I hope
> > to see them naturally stay together, which means making
> > Package Explorer to list files by name.
> >
> > How to do this?
> >
> > Thank you!
> >
> >
> >
> >
> > -
> > 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: Best way to work with the iterator of IDataProvider

2009-09-28 Thread T Ames
Further, you don't really need to define the Iterator, just return them.


   public Iterator iterator(int first, int count) {

   result = new ArrayList();

   if (requestFormModel != null) {

   if (requestFormModel.getId() != null) {
   request =
requestService.getRequest(requestFormModel.getId());

>result.add(request);
>return result.iterator();
>
>} else if (requestFormModel.getFileName() != null) {
>return
> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>



On Mon, Sep 28, 2009 at 9:08 AM, T Ames  wrote:

> I see several undefined objects:
>
> result
> requestFormModel
> it
>
> If these are defined at the class level, they must be serializable.
>
> If you have Logging set at Info, Wicket will give you the actual field that
> is not serializable, although from the error it looks like something to do
> with AbstractList
>
> Iterator objects are not serializable.  I would look at how you are
> defining the "it" variable.
>
>
>
>
> On Mon, Sep 28, 2009 at 7:25 AM, Charles Moulliard 
> wrote:
>
>> Hi,
>>
>> I would like to know what is the best way to work with the method
>> iterator of DataProvider.
>>
>> I have created a class implementing IDataProvider. Depending of a
>> parameter, the DAO service called is not the same inside in the
>> iterator method. For some DAO services, a list is returned but for one
>> service, an object is returned instead of a list.
>>
>> If I try to create a ArrayList inside the iterator, the following
>> error is generated :
>>
>>
>> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
>> Unable to serialize class: java.util.AbstractList$Itr
>> Field hierarchy is:
>>  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
>>private java.lang.Object
>> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>>  java.lang.Object org.apache.wicket.Component.data[3]
>> [class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
>>private final
>> org.apache.wicket.markup.repeater.data.IDataProvider
>> org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
>> [class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
>>  private java.util.Iterator
>> com.xpectis.x3s.fundbox.web.data.RequestProvider.it
>> [class=java.util.AbstractList$Itr] <- field that is not
>> serializable
>>at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)
>>
>> How can I avoid this issue ?
>>
>> Here is my code :
>>
>> public class RequestProvider implements IDataProvider {
>>
>> ...
>>
>>public Iterator iterator(int first, int count) {
>>
>>result = new ArrayList();
>>
>>if (requestFormModel != null) {
>>
>>if (requestFormModel.getId() != null) {
>>request =
>> requestService.getRequest(requestFormModel.getId());
>>result.add(request);
>>it = result.iterator();
>>
>>} else if (requestFormModel.getFileName() != null)
>> {
>>it =
>> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>>
>>}
>>
>> Regards,
>>
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *
>> blog : http://cmoulliard.blogspot.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread T Ames
I see several undefined objects:

result
requestFormModel
it

If these are defined at the class level, they must be serializable.

If you have Logging set at Info, Wicket will give you the actual field that
is not serializable, although from the error it looks like something to do
with AbstractList

Iterator objects are not serializable.  I would look at how you are defining
the "it" variable.



On Mon, Sep 28, 2009 at 7:25 AM, Charles Moulliard wrote:

> Hi,
>
> I would like to know what is the best way to work with the method
> iterator of DataProvider.
>
> I have created a class implementing IDataProvider. Depending of a
> parameter, the DAO service called is not the same inside in the
> iterator method. For some DAO services, a list is returned but for one
> service, an object is returned instead of a list.
>
> If I try to create a ArrayList inside the iterator, the following
> error is generated :
>
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: java.util.AbstractList$Itr
> Field hierarchy is:
>  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
>private java.lang.Object
> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>  java.lang.Object org.apache.wicket.Component.data[3]
> [class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
>private final
> org.apache.wicket.markup.repeater.data.IDataProvider
> org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
> [class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
>  private java.util.Iterator
> com.xpectis.x3s.fundbox.web.data.RequestProvider.it
> [class=java.util.AbstractList$Itr] <- field that is not
> serializable
>at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)
>
> How can I avoid this issue ?
>
> Here is my code :
>
> public class RequestProvider implements IDataProvider {
>
> ...
>
>public Iterator iterator(int first, int count) {
>
>result = new ArrayList();
>
>if (requestFormModel != null) {
>
>if (requestFormModel.getId() != null) {
>request =
> requestService.getRequest(requestFormModel.getId());
>result.add(request);
>it = result.iterator();
>
>} else if (requestFormModel.getFileName() != null) {
>it =
> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>
>}
>
> Regards,
>
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *
> blog : http://cmoulliard.blogspot.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: wicket menu

2009-09-22 Thread T Ames
I downloaded jquery-1.2.6.min.js and replaced the ResourceReference with
that.  Set everything else back to original and now it is working.




On Tue, Sep 22, 2009 at 9:25 AM, T Ames  wrote:

> Found it.  Oddly enough, it is the jquery version.
>
> I removed the ResourceReference to JQUERY in MenuBar.java and stuck the
> script directly into the  tag of TestMenu.html :
>
> http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"</a>;>
>
> I also removed the -4px hack in the css.  Works in my IE6 now without the
> hack or the holly hack for that matter.
>
>
>
>
> On Tue, Sep 22, 2009 at 9:00 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
>> Then, I don't know what's the problem As, said I can't see this
>> happening on my IE6...
>> Another thing we could try is making a static page using
>> jquery-1.3.2.min.js
>> and see if this is the issue...  so that, we are sure it is not "Wicket"
>> related.
>> Best,
>>
>> Ernesto
>>
>> On Tue, Sep 22, 2009 at 2:49 PM, T Ames  wrote:
>>
>> > Yes, I did try the holly hack with a wicket:head and tried inserting the
>> > html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made
>> any
>> > difference.
>> >
>> > I also noticed that they were using an older version of jquery 1.2.6
>> > although I am not sure that would matter.
>> >
>> >
>> >
>> > On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro <
>> > reier...@gmail.com> wrote:
>> >
>> > > Hi,
>> > > The only difference I see between their page and TestMenu page is
>> > >
>> > > 
>> > >
>> > > So, I just added
>> > > 
>> > > 
>> > > 
>> > > 
>> > > 
>> > >
>> > > to TestMenu page Can you check, please, if that fixes the problem?
>> > >
>> > > Best,
>> > >
>> > > Ernesto
>> > >
>> > > On Mon, Sep 21, 2009 at 5:41 PM, T Ames  wrote:
>> > >
>> > > > Hmmm.   The demo version on the dynamicdrive site works ok in my
>> IE6.
>> > > >
>> > > >
>> > > >
>> > > > On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro <
>> > > > reier...@gmail.com> wrote:
>> > > >
>> > > > > Thanks for the feedback!
>> > > > > Just one question... I can't see the problems you are mentioning
>> on
>> > my
>> > > > > (MultipleIEs) IE6. On the other hand if I add the lines you
>> mention
>> > > then
>> > > > I
>> > > > > get those sub-menus displaced to the left... 4 pixels. So, it
>> might
>> > be
>> > > > that
>> > > > > this is somethings that doesn't show up on my "simulated" IE6? So,
>> I
>> > > > first
>> > > > > committed the changes you proposed but later I rolled them back...
>> as
>> > I
>> > > > > can't see the problems myself.
>> > > > >
>> > > > > Maybe we should report this in here
>> > > > >
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>> http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
>> > > > >
>> > > > > As I'm just building a wrapper for what they have done
>> > > > >
>> > > > > Best,
>> > > > >
>> > > > > Ernesto
>> > > > >
>> > > > > On Mon, Sep 21, 2009 at 4:32 PM, T Ames 
>> wrote:
>> > > > >
>> > > > > > I just downloaded and tried.
>> > > > > >
>> > > > > > Works good in FF 3.0.14
>> > > > > >
>> > > > > > If you are using IE6, you will get a 4 pixel space on a
>> secondary
>> > > list.
>> > > > > > This
>> > > > > > causes issues when you slide the mouse in this tiny space. In
>> the
>> > > Test
>> > > > > > example, this is the list that would show when hovering over
>> > Two-2-1.
>> > > > > >
>> > > > > > For IE6, I can fix by adding another layer in the CSS - see "Fix
>> &

Re: wicket menu

2009-09-22 Thread T Ames
Found it.  Oddly enough, it is the jquery version.

I removed the ResourceReference to JQUERY in MenuBar.java and stuck the
script directly into the  tag of TestMenu.html :

http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"</a>;>

I also removed the -4px hack in the css.  Works in my IE6 now without the
hack or the holly hack for that matter.



On Tue, Sep 22, 2009 at 9:00 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Then, I don't know what's the problem As, said I can't see this
> happening on my IE6...
> Another thing we could try is making a static page using
> jquery-1.3.2.min.js
> and see if this is the issue...  so that, we are sure it is not "Wicket"
> related.
> Best,
>
> Ernesto
>
> On Tue, Sep 22, 2009 at 2:49 PM, T Ames  wrote:
>
> > Yes, I did try the holly hack with a wicket:head and tried inserting the
> > html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made
> any
> > difference.
> >
> > I also noticed that they were using an older version of jquery 1.2.6
> > although I am not sure that would matter.
> >
> >
> >
> > On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi,
> > > The only difference I see between their page and TestMenu page is
> > >
> > > 
> > >
> > > So, I just added
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > to TestMenu page Can you check, please, if that fixes the problem?
> > >
> > > Best,
> > >
> > > Ernesto
> > >
> > > On Mon, Sep 21, 2009 at 5:41 PM, T Ames  wrote:
> > >
> > > > Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.
> > > >
> > > >
> > > >
> > > > On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro <
> > > > reier...@gmail.com> wrote:
> > > >
> > > > > Thanks for the feedback!
> > > > > Just one question... I can't see the problems you are mentioning on
> > my
> > > > > (MultipleIEs) IE6. On the other hand if I add the lines you mention
> > > then
> > > > I
> > > > > get those sub-menus displaced to the left... 4 pixels. So, it might
> > be
> > > > that
> > > > > this is somethings that doesn't show up on my "simulated" IE6? So,
> I
> > > > first
> > > > > committed the changes you proposed but later I rolled them back...
> as
> > I
> > > > > can't see the problems myself.
> > > > >
> > > > > Maybe we should report this in here
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
> > > > >
> > > > > As I'm just building a wrapper for what they have done
> > > > >
> > > > > Best,
> > > > >
> > > > > Ernesto
> > > > >
> > > > > On Mon, Sep 21, 2009 at 4:32 PM, T Ames 
> wrote:
> > > > >
> > > > > > I just downloaded and tried.
> > > > > >
> > > > > > Works good in FF 3.0.14
> > > > > >
> > > > > > If you are using IE6, you will get a 4 pixel space on a secondary
> > > list.
> > > > > > This
> > > > > > causes issues when you slide the mouse in this tiny space. In the
> > > Test
> > > > > > example, this is the list that would show when hovering over
> > Two-2-1.
> > > > > >
> > > > > > For IE6, I can fix by adding another layer in the CSS - see "Fix
> > IE6
> > > > sub
> > > > > > menu list".  The use of the "_" in front of the "left:" is only
> > > visible
> > > > > for
> > > > > > IE6
> > > > > >
> > > > > >
> > > > > > /*All subsequent sub menu levels vertical offset after 1st level
> > sub
> > > > menu
> > > > > > */
> > > > > > .jqueryslidemenu ul li ul li ul{
> > > > > >  top: 0;
> > > > > > }
> > > > > >
> > > > > > /*Fix IE6 sub menu list   */
> > > > > > .

Re: wicket menu

2009-09-22 Thread T Ames
Yes, I did try the holly hack with a wicket:head and tried inserting the
html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made any
difference.

I also noticed that they were using an older version of jquery 1.2.6
although I am not sure that would matter.



On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
> The only difference I see between their page and TestMenu page is
>
> 
>
> So, I just added
> 
> 
> 
> 
> 
>
> to TestMenu page Can you check, please, if that fixes the problem?
>
> Best,
>
> Ernesto
>
> On Mon, Sep 21, 2009 at 5:41 PM, T Ames  wrote:
>
> > Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.
> >
> >
> >
> > On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Thanks for the feedback!
> > > Just one question... I can't see the problems you are mentioning on my
> > > (MultipleIEs) IE6. On the other hand if I add the lines you mention
> then
> > I
> > > get those sub-menus displaced to the left... 4 pixels. So, it might be
> > that
> > > this is somethings that doesn't show up on my "simulated" IE6? So, I
> > first
> > > committed the changes you proposed but later I rolled them back... as I
> > > can't see the problems myself.
> > >
> > > Maybe we should report this in here
> > >
> > >
> > >
> >
> http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
> > >
> > > As I'm just building a wrapper for what they have done
> > >
> > > Best,
> > >
> > > Ernesto
> > >
> > > On Mon, Sep 21, 2009 at 4:32 PM, T Ames  wrote:
> > >
> > > > I just downloaded and tried.
> > > >
> > > > Works good in FF 3.0.14
> > > >
> > > > If you are using IE6, you will get a 4 pixel space on a secondary
> list.
> > > > This
> > > > causes issues when you slide the mouse in this tiny space. In the
> Test
> > > > example, this is the list that would show when hovering over Two-2-1.
> > > >
> > > > For IE6, I can fix by adding another layer in the CSS - see "Fix IE6
> > sub
> > > > menu list".  The use of the "_" in front of the "left:" is only
> visible
> > > for
> > > > IE6
> > > >
> > > >
> > > > /*All subsequent sub menu levels vertical offset after 1st level sub
> > menu
> > > > */
> > > > .jqueryslidemenu ul li ul li ul{
> > > >  top: 0;
> > > > }
> > > >
> > > > /*Fix IE6 sub menu list   */
> > > > .jqueryslidemenu ul li ul li ul li{
> > > > _left: -4px; /* IE6 only */
> > > > }
> > > >
> > > >
> > > > On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro <
> > > > reier...@gmail.com> wrote:
> > > >
> > > > > Hi Joeri,
> > > > > Good to hear that it worked for you! In the mean time I did some
> > > clean-up
> > > > > to
> > > > > make the component more configurable... If you get the chance to
> > > improve
> > > > > it,
> > > > > and if you are allowed to do so, it would nice if you also share
> the
> > > > > modifications... So, that others can benefit too.
> > > > >
> > > > > I also have had problems with SVN and eclipse (I guess because a
> > stupid
> > > > > proxy in between) but after some struggle I manage to get it
> > > working
> > > > >
> > > > > Best,
> > > > >
> > > > > Ernesto
> > > > >
> > > > > On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) <
> > > joeri.boyd...@oz.be
> > > > > >wrote:
> > > > >
> > > > > > Hi Ernesto,
> > > > > >
> > > > > > I downloaded your files and it's working fine!  It's indeed very
> > easy
> > > > to
> > > > > > create such a menu if the javascript exists !
> > > > > >
> > > > > > I'll have a look how we can integrate it in our new project!
> > > > > >
> > > > > > Thanks
> > > > > > Joeri
> > > > > >
> &

Re: wicket menu

2009-09-21 Thread T Ames
Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.



On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Thanks for the feedback!
> Just one question... I can't see the problems you are mentioning on my
> (MultipleIEs) IE6. On the other hand if I add the lines you mention then I
> get those sub-menus displaced to the left... 4 pixels. So, it might be that
> this is somethings that doesn't show up on my "simulated" IE6? So, I first
> committed the changes you proposed but later I rolled them back... as I
> can't see the problems myself.
>
> Maybe we should report this in here
>
>
> http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
>
> As I'm just building a wrapper for what they have done
>
> Best,
>
> Ernesto
>
> On Mon, Sep 21, 2009 at 4:32 PM, T Ames  wrote:
>
> > I just downloaded and tried.
> >
> > Works good in FF 3.0.14
> >
> > If you are using IE6, you will get a 4 pixel space on a secondary list.
> > This
> > causes issues when you slide the mouse in this tiny space. In the Test
> > example, this is the list that would show when hovering over Two-2-1.
> >
> > For IE6, I can fix by adding another layer in the CSS - see "Fix IE6 sub
> > menu list".  The use of the "_" in front of the "left:" is only visible
> for
> > IE6
> >
> >
> > /*All subsequent sub menu levels vertical offset after 1st level sub menu
> > */
> > .jqueryslidemenu ul li ul li ul{
> >  top: 0;
> > }
> >
> > /*Fix IE6 sub menu list   */
> > .jqueryslidemenu ul li ul li ul li{
> > _left: -4px; /* IE6 only */
> > }
> >
> >
> > On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi Joeri,
> > > Good to hear that it worked for you! In the mean time I did some
> clean-up
> > > to
> > > make the component more configurable... If you get the chance to
> improve
> > > it,
> > > and if you are allowed to do so, it would nice if you also share the
> > > modifications... So, that others can benefit too.
> > >
> > > I also have had problems with SVN and eclipse (I guess because a stupid
> > > proxy in between) but after some struggle I manage to get it
> working
> > >
> > > Best,
> > >
> > > Ernesto
> > >
> > > On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) <
> joeri.boyd...@oz.be
> > > >wrote:
> > >
> > > > Hi Ernesto,
> > > >
> > > > I downloaded your files and it's working fine!  It's indeed very easy
> > to
> > > > create such a menu if the javascript exists !
> > > >
> > > > I'll have a look how we can integrate it in our new project!
> > > >
> > > > Thanks
> > > > Joeri
> > > >
> > > >
> > > > Ps: i had problems with the google svn... maybe it's my eclipse
> > settings
> > > > but I downloaded the files manually..
> > > >
> > > >
> > > > -Oorspronkelijk bericht-
> > > > Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
> > > > Verzonden: maandag 21 september 2009 15:08
> > > > Aan: users@wicket.apache.org
> > > > Onderwerp: Re: wicket menu
> > > >
> > > > Hi Joeri,
> > > > I just implemented the menu you mentioned
> > > >
> > > >
> > http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css
> > > > _menu_2/
> > > >
> > > > in here
> > > >
> > > >
> > http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
> > > > /com/antilia/web/dynamicdrive
> > > >
> > > > If you want to give it a try... get those sources on that package and
> > > > mount
> > > > the test page
> > > >
> > > >
> > http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
> > > > /com/antilia/web/dynamicdrive/test/TestMenu.java
> > > >
> > > > On you application... Feel free to modify the code as you need...
> > > >
> > > > It is so easy to create components in Wicket (moreover, when someone
> > > > else
> > > > has done the dirty JavaScript work;-)
> > > >
> > > > Best,
> > > >
> > > > Ernesto
> > > >
> > > >
> > > > <
> > http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr
> > > > c/com/antilia/web/dynamicdrive>
> > > >
> > > > On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ)
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >
> > > > >
> > > > > We are changing from Struts to Wicket, in our Struts application we
> > > > used
> > > > > Struts-Menu.  Now I've searched the wicket mailing list but I
> > couldn't
> > > > > find any descent menu.
> > > > >
> > > > >
> > > > >
> > > > > Is there a Wicket menu available, where can I find it ? Or should I
> > > > > write my own?
> > > > >
> > > > >
> > > > >
> > > > > I've seen some code based on YUI, but I can't find that anymore in
> > the
> > > > > svn.
> > > > >
> > > > >
> > > > >
> > > > > Joeri
> > > > >
> > > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > >
> > >
> >
>


Re: wicket menu

2009-09-21 Thread T Ames
I just downloaded and tried.

Works good in FF 3.0.14

If you are using IE6, you will get a 4 pixel space on a secondary list. This
causes issues when you slide the mouse in this tiny space. In the Test
example, this is the list that would show when hovering over Two-2-1.

For IE6, I can fix by adding another layer in the CSS - see "Fix IE6 sub
menu list".  The use of the "_" in front of the "left:" is only visible for
IE6


/*All subsequent sub menu levels vertical offset after 1st level sub menu */
.jqueryslidemenu ul li ul li ul{
  top: 0;
}

/*Fix IE6 sub menu list   */
.jqueryslidemenu ul li ul li ul li{
_left: -4px; /* IE6 only */
}


On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi Joeri,
> Good to hear that it worked for you! In the mean time I did some clean-up
> to
> make the component more configurable... If you get the chance to improve
> it,
> and if you are allowed to do so, it would nice if you also share the
> modifications... So, that others can benefit too.
>
> I also have had problems with SVN and eclipse (I guess because a stupid
> proxy in between) but after some struggle I manage to get it working
>
> Best,
>
> Ernesto
>
> On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ)  >wrote:
>
> > Hi Ernesto,
> >
> > I downloaded your files and it's working fine!  It's indeed very easy to
> > create such a menu if the javascript exists !
> >
> > I'll have a look how we can integrate it in our new project!
> >
> > Thanks
> > Joeri
> >
> >
> > Ps: i had problems with the google svn... maybe it's my eclipse settings
> > but I downloaded the files manually..
> >
> >
> > -Oorspronkelijk bericht-
> > Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
> > Verzonden: maandag 21 september 2009 15:08
> > Aan: users@wicket.apache.org
> > Onderwerp: Re: wicket menu
> >
> > Hi Joeri,
> > I just implemented the menu you mentioned
> >
> > http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css
> > _menu_2/
> >
> > in here
> >
> > http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
> > /com/antilia/web/dynamicdrive
> >
> > If you want to give it a try... get those sources on that package and
> > mount
> > the test page
> >
> > http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
> > /com/antilia/web/dynamicdrive/test/TestMenu.java
> >
> > On you application... Feel free to modify the code as you need...
> >
> > It is so easy to create components in Wicket (moreover, when someone
> > else
> > has done the dirty JavaScript work;-)
> >
> > Best,
> >
> > Ernesto
> >
> >
> >  > c/com/antilia/web/dynamicdrive>
> >
> > On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ)
> > wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > > We are changing from Struts to Wicket, in our Struts application we
> > used
> > > Struts-Menu.  Now I've searched the wicket mailing list but I couldn't
> > > find any descent menu.
> > >
> > >
> > >
> > > Is there a Wicket menu available, where can I find it ? Or should I
> > > write my own?
> > >
> > >
> > >
> > > I've seen some code based on YUI, but I can't find that anymore in the
> > > svn.
> > >
> > >
> > >
> > > Joeri
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: How to access text fields in a data view

2009-09-18 Thread T Ames
What the example lacks is the Submit button processing for the entire form.
There are probably lots of ways to handle this - ajax and non-ajax.

Once you get the submit button you want to use defined, that is where you
can access all the items in the repeater by visiting the "children" of the
form

I did something like this within the onSubmit of whatever button/link you
choose:

form.visitFormComponents(new FormComponent.AbstractVisitor() {

@Override
 protected void onFormComponent(FormComponent formComponent) {

   if
(formComponent.getInputName().contains(":orderComponent:orderNo")) {
if (formComponent.getConvertedInput() != null) {
// update stuff
}
   }

 }
}

the getInputName() allows you to check which component name you are working
with.  All of the components in the same repeater "row" will have the same
number.   Run the example again and do a view page source. You will see what
I mean. simple:41:id, simple:41:firstname, etc.   I have only used this in
one application so far and only needed one input field in the repeater.  I
am sure there may be better ways to get at the entire row, then process each
component in that row.  Perhaps each row could be a markup container then
process the children of that container?

This is just one way. I am sure those with more experience will show other
ways.


On Fri, Sep 18, 2009 at 10:06 AM, Randy  wrote:

>
> In the Wicket Examples, there is a data view with editable values
> (org.apache.wicket.examples.repeater.FormPage).  It is not clear to me how
> to access the updated text field(s) so that changes can be recorded in the
> actual data item instance for the row.  I see how to reference the data
> item
> instance, but am not sure how to access the text fields.
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: TextField and MinimumValidator

2009-08-26 Thread T Ames
Great! Thanks!

I know you guys are super busy. One thing to put on the list would be to
update the wicket examples - FormInput.java

This is still using the NumberValidator and all it's various forms which
have been deprecated.  I assume that I would have seen the setType() in
there if it were updated.  Something in that older style must have taken
care of that since the examples still work.




On Wed, Aug 26, 2009 at 5:11 PM, Igor Vaynberg wrote:

> testLong.setType(Long.class)
>
> -igor
>
> On Wed, Aug 26, 2009 at 1:41 PM, T Ames wrote:
> > I cannot seem to get a simple validation to work on a form.  Using
> 1.4-rc5.
> >
> >TextField testLong = new TextField("testLong", new
> > Model(0));
> >testLong.add(new MinimumValidator(0));
> >batchForm.add(testLong);
> >
> > I want the text field to be validated as a number, and zero or greater.
> >
> > *Problem 1:*  If I remove the MinimumValidator, I get no feedback message
> if
> > I put a non-numeric character in the field, and no errors.
> >
> > *Problem 2:  *With the MinimumValidator I get a class cast error:
> >
> > WicketMessage: Exception 'java.lang.ClassCastException: java.lang.Long
> > cannot be cast to java.lang.String' occurred during validation
> > org.apache.wicket.validation.validator.MinimumValidator on component
> > 1:batchArchiveForm:testLong
> >
> > Root cause:
> >
> > java.lang.ClassCastException: java.lang.Long cannot be cast to
> > java.lang.String
> > at java.lang.String.compareTo(String.java:92)
> > at
> >
> org.apache.wicket.validation.validator.MinimumValidator.validate(MinimumValidator.java:50)
> > at
> >
> org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1585)
> > at
> >
> org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1174)
> > at org.apache.wicket.markup.html.form.Form$22.validate(Form.java:2098)
> > at
> >
> org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:169)
> > at
> >
> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:415)
> > at
> >
> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:402)
> > at
> >
> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:374)
> > at
> >
> org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1182)
> > at
> >
> org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:2090)
> > at org.apache.wicket.markup.html.form.Form.validate(Form.java:2070)
> > at org.apache.wicket.markup.html.form.Form.process(Form.java:961)
> > at org.apache.wicket.markup.html.form.Form.process(Form.java:911)
> > at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> >
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
> > at
> >
> org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
> > at
> >
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
> > at
> >
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1241)
> > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1320)
> > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
> > at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> > at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
> > at
> >
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
> >
> > .
> >
> > I know the feedback messages are working since I have a RequiredTextField
> > set up and it is responding properly.
> >
> > It must be something simple that I am missing...
> >
> > Thanks.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


TextField and MinimumValidator

2009-08-26 Thread T Ames
I cannot seem to get a simple validation to work on a form.  Using 1.4-rc5.

TextField testLong = new TextField("testLong", new
Model(0));
testLong.add(new MinimumValidator(0));
batchForm.add(testLong);

I want the text field to be validated as a number, and zero or greater.

*Problem 1:*  If I remove the MinimumValidator, I get no feedback message if
I put a non-numeric character in the field, and no errors.

*Problem 2:  *With the MinimumValidator I get a class cast error:

WicketMessage: Exception 'java.lang.ClassCastException: java.lang.Long
cannot be cast to java.lang.String' occurred during validation
org.apache.wicket.validation.validator.MinimumValidator on component
1:batchArchiveForm:testLong

Root cause:

java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String
at java.lang.String.compareTo(String.java:92)
at
org.apache.wicket.validation.validator.MinimumValidator.validate(MinimumValidator.java:50)
at
org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1585)
at
org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1174)
at org.apache.wicket.markup.html.form.Form$22.validate(Form.java:2098)
at
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:169)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:415)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:402)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:374)
at
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1182)
at
org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:2090)
at org.apache.wicket.markup.html.form.Form.validate(Form.java:2070)
at org.apache.wicket.markup.html.form.Form.process(Form.java:961)
at org.apache.wicket.markup.html.form.Form.process(Form.java:911)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1320)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)

.

I know the feedback messages are working since I have a RequiredTextField
set up and it is responding properly.

It must be something simple that I am missing...

Thanks.


Re: Custom WebSession and bind()

2009-08-20 Thread T Ames
Yes, I had done that. I was hoping there may be a more efficient place to do
this since the attach() method appears to be called several times during the
session life-cycle.

Thanks!



On Thu, Aug 20, 2009 at 11:00 AM, Igor Vaynberg wrote:

> maybe something like this...
>
> class mysession {
>  Object object;
>
>   attach() {
> super.attach();
> if
> (object==null&&getsessionstore().lookup(requestcycle.get().getrequest())!=null)
> {
>   object=...
> }}}
>
> -igor
>
> On Thu, Aug 20, 2009 at 7:53 AM, T Ames wrote:
> > I have read several posts about how to manually bind stateless pages in a
> > custom WebSession object to the http session.  In my custom WebSession, I
> > would like to create some objects, but only if and when the WebSession
> > actually binds as normal when a stateful page is called up.
> >
> > Is there a method I can do this in?   The bind() method is final, so I
> > cannot do it there.  I only want to create these objects once just as if
> > they were in the constructor. I am assuming that the bind() method is
> only
> > called once.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Custom WebSession and bind()

2009-08-20 Thread T Ames
I have read several posts about how to manually bind stateless pages in a
custom WebSession object to the http session.  In my custom WebSession, I
would like to create some objects, but only if and when the WebSession
actually binds as normal when a stateful page is called up.

Is there a method I can do this in?   The bind() method is final, so I
cannot do it there.  I only want to create these objects once just as if
they were in the constructor. I am assuming that the bind() method is only
called once.


Date Validation - From - To Dates

2009-08-12 Thread T Ames
I have coded a simple Validator below that may help others out who are
looking for a way to make sure that a from-date and a to-date on a form fall
within a proper range of each other.  Meaning that a from date cannot be
greater than a to date.

I did this based on an older post of the same subject to this list where
Igor (Thanks!) pointed us to look at EqualInputValidator as an example. So
with that in mind I copied EqualInputValidator and modified it.

It is called DateDependencyInputValidator - I could not come up with a
better name :)

I am not a great Java coder, but you can take this and do whatever you
want.  IMHO it would be great to put this idea into the Wicket core since
this is a very common issue much like EqualInputValidator.

The error message I used looks like this:
DateDependencyInputValidator='${input0}' from ${label0} and '${input1}' from
${label1} are not in a correct range.




import java.util.Date;

import org.apache.wicket.datetime.markup.html.form.DateTextField;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.FormComponent;
import org.apache.wicket.markup.html.form.validation.AbstractFormValidator;

/**
 * Validates that the input of two date form components are within range of
each
 * other. The FROM date cannot be greater than the TO date and the TO date
 * cannot be less than the FROM date. An argument is passed as to whether
 * you want to allow the dates to be equal.
 *
 * Errors are reported on the second form component with key
 * 'DateDependencyInputValidator' and the variables:
 * 
 * ${input(n)}: the user's input: n=0 fromDate, n=1 toDate
 * ${name}: the name of the component
 * ${label(n)}: the label of the component - either comes from
 * FormComponent.labelModel or resource key [form-id].[form-component-id] in
 * that order
 * 
 *
 * To use this add it to the form itself: add(new
 * DateDependencyInputValidator(date1, date2, true)
 *
 * In your page/panel .properties file do something like this:
 * DateDependencyInputValidator='${input0}' from ${label0} and '${input1}'
from ${label1} are not in a correct range.
 *
 * This was copied and modified from the Wicket EqualInputValidator - Igor
Vaynberg (ivaynberg)
 *
 * 
 * Versions
 * 
 * 08/11/2009
 * 
 * 
 *
 *
 * @author T.Ames
 */
public class DateDependencyInputValidator extends AbstractFormValidator {

private static final long serialVersionUID = 1L;

private boolean equalAllowed;
/** form components to be checked. */
private final FormComponent[] components;


/**
 * Construct.
 *
 * @param fromDateComponent
 *a DateTextField
 * @param toDateComponenet
 *a DateTextField
 * @param allowEqual
 * true = allow dates to be equal
 * false = the dates cannot be equal
 */
public DateDependencyInputValidator(DateTextField fromDateComponent,
DateTextField toDateComponent, boolean equalAllowed) {

if (fromDateComponent == null) {
throw new IllegalArgumentException("argument fromDateComponent
cannot be null");
}
if (toDateComponent == null) {
throw new IllegalArgumentException("argument toDateComponent
cannot be null");
}
components = new FormComponent[] { fromDateComponent,
toDateComponent };
this.equalAllowed = equalAllowed;
}



/**
 * @see
org.apache.wicket.markup.html.form.validation.IFormValidator#getDependentFormComponents()
 */
public FormComponent[] getDependentFormComponents() {
return components;
}



/**
 * @see
org.apache.wicket.markup.html.form.validation.IFormValidator#validate(org.apache.wicket.markup.html.form.Form)
 */
public void validate(Form form) {

Date fromDate;
Date toDate;


final DateTextField fromDateComponent = (DateTextField)
components[0];
final DateTextField toDateComponent = (DateTextField) components[1];

fromDate = fromDateComponent.getConvertedInput();
toDate = toDateComponent.getConvertedInput();

// Compare the dates.
// If the dates are equal and we are not allowing them to be
// OR
// The begin date is greater than the end date
int compDate = fromDate.compareTo(toDate);
if ( (compDate == 0 && ! equalAllowed) || compDate > 0) {
error(toDateComponent);
}

}
}


AutoCompleteTextField and IE6

2009-08-07 Thread T Ames
Wicket version 1.4-rc5

I am hoping someone has a CCS hack or something that will help with this.

I have the AutoCompleteTextField working, and have placed the CSS from the
examples in my .css file. It is all working great until I decide to move the
vertical scroll down the page.

For example.  I have a large form that requires the vertical scroll to show
on the browser.  The ACTF is two-thirds down the page when the page is
displayed.  If I do NOT scroll down to move the ACTF field more into the
center of the page, the drop down list appears just below the ACTF when you
start typing into the field - all is good.  If however I first scroll down
to center the field on the page then start typing, the drop down appears at
the original location that the field was in when the page is first
displayed.  The drop down list works, but it is not shown just underneath
the ACTF.

In FireFox, the dropdown "follows" the ACTF field wherever I scroll to like
I think it should.  In IE6 it does not.   Of course, we have an exclusively
IE6 enterprise.  FYI: I am not too javascript literate - which is OK, I get
to use a bunch of cool stuff that Wicket just handles for me!

Below is my css stuff which is mostly a copy of the examples:


/* AutoComplete settings  */
> div.wicket-aa {
> font-family: "Lucida Grande","Lucida Sans
> Unicode",Tahoma,Verdana;
> font-size: 12px;
> background-color: tan;
> border-width: 1px;
> border-color: #cc;
> border-style: solid;
> padding: 2px;
> margin: 1px 0 0 0;
> text-align:left;
> }
> div.wicket-aa ul { list-style:none; padding: 2px; margin:0; }
> div.wicket-aa ul li.selected { background-color: #00; padding: 2px;
> margin:0; }
>


 Thanks for any tips.


Re: How Wicket's big concepts/objects work together and in what order?

2009-08-06 Thread T Ames
I think for most people anyway, you learn by doing.  I would think that by
now you have a basic understanding to put together a really decent web
application. There is quite a learning curve, but you do not have to
understand all of the internals.

I learn more about Wicket each time I do a web app.  I don't think you could
really be a "good" Wicket programmer unless you have several apps under your
belt.  Just go in a DO IT! The understanding will come with experience.



On Thu, Aug 6, 2009 at 7:54 AM, jWeekend wrote:

>
> David,
>
> Jonathan Locke and I have started writing an article describing the Wicket
> architecture (as opposed to the Architecture of A Wicket Application). It
> will be the document I wish could have found when I had the good fortune to
> come across Wicket in 2007.
>
> In the meantime, we have a few articles on the wiki by Dima (pen name syl)
> like
>
> http://cwiki.apache.org/WICKET/request-cycle-and-request-cycle-processor.html
> this  that you may find useful.
>
> Regards - Cemal
> jWeekend
> OO, Java Technologies, Wicket - Training & Consultancy
> http://jWeekend.com
>
>
>
> David Chang-5 wrote:
> >
> >
> > Hello, I am learning Wicket now and feel a bit confused by the new
> > concepts in Wicket regarding how they work together and in what order.
> >
> > The big concepts I am talking about include:
> >
> > Application
> > Session
> > Request
> > RequestCycle
> > RequestCycleProcessor
> > RequestTarget
> > SessionStore
> > Request
> > Response
> >
> > Suppose I have a simple page with just one Wicket label. A user requests
> > this page. I would like to know how the above objects/concepts get
> > involved and in what order.
> >
> > If it needs too much description, then forget it. If it does not take too
> > much of your time or you want to refresh yourself by give me an
> > explanation, I really appreciate it.
> >
> > I want to be a good Wicket programmer.
> >
> > Thank you!
> >
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/August-London-Wicket-Event-%28just-a-drink-%29-tp24834574p24845115.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: Alternate rows with different color

2009-08-05 Thread T Ames
Following Igor's example, you will need to override the newItem() method.
It is inherited into DataView from RefreshingView. Something like:

new DataView() {

  @Override
  protected item newItem(..) {
   return new OddEvenItem(...);
  }
 
}



On Wed, Aug 5, 2009 at 12:22 AM, arungupta  wrote:

>
> Cristi,
>
> You are right, I'm a total noob to Wicket :)
>
> Anyway digging further ...
>
> It seems DataView is most suited for my database-backed repeating view. I'm
> having difficulty in understanding how to hook DataView and OddEvenItem
> together. Suggestions ?
>
> -Arun
>
>
>
> Cristi Manole wrote:
> >
> > your solution is definitely better, Igor, but he seems very new to wicket
> > and it was faster to get that working than to explain he needs to change
> > the
> > repeater. at least that's what i thought.
> >
> > On Wed, Aug 5, 2009 at 1:43 AM, Igor Vaynberg
> > wrote:
> >
> >> you guys are more then welcome to head down this badly broken road, or
> >> you can look at what i said...
> >>
> >> -igor
> >>
> >> On Tue, Aug 4, 2009 at 5:37 PM, Cristi Manole
> >> wrote:
> >> > How about
> >> >
> >> > public class RunlogPage extends BasePage {
> >> > private int counter;
> >> >
> >> > (...)
> >> >
> >> > item.add(new AttributeModifier("class", counter++ % 2 == 0 ? new
> >> > Model("list-line-odd") : new Model("list-line-event")));
> >> >
> >> > ?
> >> >
> >> >
> >> > On Wed, Aug 5, 2009 at 1:33 AM, arungupta 
> wrote:
> >> >
> >> >>
> >> >> Sweet, that worked :)
> >> >>
> >> >> Now runlog.getId() does not return alternating odd/even numbers so
> >> will
> >> >> need
> >> >> to figure out what might ;) Is there anything in the model that might
> >> >> provide that information ?
> >> >>
> >> >> -Arun
> >> >>
> >> >>
> >> >> Cristi Manole wrote:
> >> >> >
> >> >> > you can always just wrap it...
> >> >> >
> >> >> > item.add(new AttributeModifier("class", runlog.getId() % 2 == 0 ?
> >> new
> >> >> > Model("list-line-odd") : new Model("list-line-event")));
> >> >> >
> >> >> > note that you'll get different colors only if you have defined
> >> >> > list-line-odd
> >> >> > in your css, added that to page and, of course, if runlog.geId()
> >> returns
> >> >> > alternating odd/even numbers.
> >> >> >
> >> >> > On Wed, Aug 5, 2009 at 1:17 AM, Igor Vaynberg
> >> >> > wrote:
> >> >> >
> >> >> >> this was meant as an example for you and can work under 1.3.6 as
> >> well
> >> as
> >> >> >> 1.4.
> >> >> >>
> >> >> >> look at the source to see what it does, you would use it like so:
> >> >> >>
> >> >> >> new refreshingview() { protected item newItem(..) { return new
> >> >> >> oddevenitem(...); }}
> >> >> >>
> >> >> >> btw 1.4.0 is out.
> >> >> >>
> >> >> >> -igor
> >> >> >>
> >> >> >> On Tue, Aug 4, 2009 at 4:56 PM, arungupta
> >> wrote:
> >> >> >> >
> >> >> >> > I've been using 1.3.6 but let me try 1.4 rc build and see where
> >> it
> >> >> >> takes
> >> >> >> me.
> >> >> >> >
> >> >> >> > Is there an example that shows how it can be used in the above
> >> context
> >> >> >> ?
> >> >> >> >
> >> >> >> > -Arun
> >> >> >> >
> >> >> >> >
> >> >> >> > igor.vaynberg wrote:
> >> >> >> >>
> >> >> >> >> see
> >> >> >> >>
> >> >> >> >> org.apache.wicket.markup.repeater.OddEvenItem
> >> >> >> >>
> >> >> >> >> for a cleaner, simpler way to do this
> >> >> >> >>
> >> >> >> >> -igor
> >> >> >> >>
> >> >> >> >> On Tue, Aug 4, 2009 at 4:36 PM, Arun Gupta<
> arun.gu...@gmail.com>
> >> >> >> wrote:
> >> >> >> >>> Trying to provide different color to alternate rows by
> >> following
> >> the
> >> >> >> >>> recommendation at:
> >> >> >> >>>
> >> >> >> >>>
> >> >> >>
> >> >>
> >>
> http://devinvenable.blogspot.com/2007/10/wicket-and-html-style-attributes.html
> >> >> >> >>>
> >> >> >> >>> The source code is available at:
> >> >> >> >>>
> >> >> >> >>>
> >> >> >>
> >> >>
> >>
> http://kenai.com/projects/runner/sources/subversion/content/wicket/runner/src/main/java/org/example/runner/runlog/RunlogPage.java?rev=118
> >> >> >> >>>
> >> >> >> >>> Adding the following code:
> >> >> >> >>>
> >> >> >> >>> item.add(new AttributeModifier("class", new
> PropertyModel(this,
> >> >> >> >>> runlog.getId() % 2 == 0 ? "list-line-odd" :
> >> "list-line-event")));
> >> >> >> >>>
> >> >> >> >>> at line 104 or 134 gives the following error:
> >> >> >> >>>
> >> >> >> >>> -- cut here --
> >> >> >> >>> WicketMessage: No get method defined for class: class
> >> >> >> >>> org.example.runner.runlog.RunlogPage$2 expression:
> >> list-line-odd
> >> >> >> >>>
> >> >> >> >>> Root cause:
> >> >> >> >>>
> >> >> >> >>> org.apache.wicket.WicketRuntimeException: No get method
> defined
> >> for
> >> >> >> >>> class: class org.example.runner.runlog.RunlogPage$2
> expression:
> >> >> >> >>> list-line-odd
> >> >> >> >>> at
> >> >> >> >>>
> >> >> >>
> >> >>
> >>
> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:440)
> >> >> >> >>> at
> >> >> >> >>>
> >> >> >>
> >> >>
> >>
> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSette

Set focus on a form field within a ModalWindow

2009-06-26 Thread T Ames
When doing this in regular html pages, I take the easy way and just use this
below the form within the html

...
 


document.forms["noteForm"].noteField.focus();


Works fine with typical wicket WebPage and Panel.

This easy way does not appear to work within a ModalWindow html panel
markup.



   



Note:




Select one of the
following:


site 1
site 2






document.forms["noteForm"].noteField.focus();





 

I am not very javascript literate, Is there a way to do this?

Thanks


Re: Ajax enabled pages are slow to load

2009-06-19 Thread T Ames
Thanks Igor for making me THINK!

This was my issue. I instituted my own ConfigurationType. At the time I did
not realize that the WebApplication.getConfigurationType() was being called
at many points during the rendering phase. So each time this method was
called it was thrashing about in LDAP - which is where I am storing many of
my properties. It makes sense to me NOW :)

All fixed and AJAX is working SUPER FAST.

--Tim

On Thu, Jun 18, 2009 at 11:43 AM, Igor Vaynberg wrote:

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


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