Re: Form.setMultiPart(true) and setResponsePage(...) in Wicket 1.4.7

2010-03-11 Thread t3_chris


igor.vaynberg wrote:
 
 open a bug, attach a quickstart
 

Thanks, igor! Just created a quickstart, with a file upload field,
multi-part form and a setResponsePage() call. Unfortunately (fortunately?)
in my quickstart example everything works. 

So I'am a litte bit helpless now. I won't open a bug until I'm sure what
happens here.

Best Regards,
 chris

-- 
View this message in context: 
http://old.nabble.com/Form.setMultiPart%28true%29-and-setResponsePage%28...%29-in-Wicket-1.4.7-tp27833928p27860581.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: DatePicker onblur

2010-03-11 Thread Arnaud Garcia
thanks it helps me !

2010/3/10 Vit Rozkovec rozkovec...@email.cz

 Hi,
 this may help you:

 I am using DateTextField from the package
 org.apache.wicket.datetime.markup.html.form;

 In the panel where I add this field, you can do:
   @Override
   protected void onBeforeRender()
   {
   super.onBeforeRender();
   if (!hasBeenRendered())
   {
   dateField.get(date).add(new
 AjaxFormComponentUpdatingBehavior(onchange)
   {

   @Override
   protected void onUpdate(AjaxRequestTarget target)
   {

   }
   });
   }
   }

 Regards
 Vitek


 Arnaud Garcia wrote:

 Hi list !

 I add an AjaxFormComponentUpdatingBehavior on my DateTextField to update
 my
 model on the fly...

 The updating behavior is based on the onblur event...
 it works well, but since I added a DatePicker to the dateTextField I can't
 react on the onblur javascript event.

 How can I intercept the moment when the dateTextField is updated by the
 DatePicker ?

 Thanks

 Arnaud





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




Re: DatePicker onblur

2010-03-11 Thread Arnaud Garcia
;-), sure !!

2010/3/10 Martin Makundi martin.maku...@koodaripalvelut.com

 ONCHANGE!

 2010/3/10 Arnaud Garcia arn...@imagemed-87.com:
  Hi list !
 
  I add an AjaxFormComponentUpdatingBehavior on my DateTextField to update
 my
  model on the fly...
 
  The updating behavior is based on the onblur event...
  it works well, but since I added a DatePicker to the dateTextField I
 can't
  react on the onblur javascript event.
 
  How can I intercept the moment when the dateTextField is updated by the
  DatePicker ?
 
  Thanks
 
  Arnaud
 

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




icons as checkboxes

2010-03-11 Thread Eyal Golan
Hi,
How can I make a Component to act as a checkbox, but to show an icon
instead?

I want to show an icon (image) when not selected, and if the user clicks on
it, it will be selected = selected icon.
The model to use is a Boolean.

I guess this is easy, but please provide some code / explanation.

Thanks,


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


Re: icons as checkboxes

2010-03-11 Thread reiern70

Hi Eyal,

I do something similar  here

http://code.google.com/p/antilia/source/browse/trunk/com.antilia.web/src/com/antilia/web/beantable/ToggleSelectRowButton.java

It is just a Panel with and AjaxLink and an image. When user click link a
round-trip to the server toggles boolean state and redisplays the panel
changing the image accordingly (selected or un-selected). Feel free to reuse
the code or adapt it if it suits your needs.

Best,

Ernesto


egolan74 wrote:
 
 Hi,
 How can I make a Component to act as a checkbox, but to show an icon
 instead?
 
 I want to show an icon (image) when not selected, and if the user clicks
 on
 it, it will be selected = selected icon.
 The model to use is a Boolean.
 
 I guess this is easy, but please provide some code / explanation.
 
 Thanks,
 
 
 Eyal Golan
 egola...@gmail.com
 
 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74
 
 P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 
 
 -
 Eyal Golan
 egola...@gmail.com
 
 Visit: JVDrums 
 LinkedIn: LinkedIn 
 

-- 
View this message in context: 
http://old.nabble.com/icons-as-checkboxes-tp27861120p27861503.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: icons as checkboxes

2010-03-11 Thread Eyal Golan
thanks.
i'll look into it and tell you what i've made :)

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Thu, Mar 11, 2010 at 12:06 PM, reiern70 reier...@gmail.com wrote:


 Hi Eyal,

 I do something similar  here


 http://code.google.com/p/antilia/source/browse/trunk/com.antilia.web/src/com/antilia/web/beantable/ToggleSelectRowButton.java

 It is just a Panel with and AjaxLink and an image. When user click link a
 round-trip to the server toggles boolean state and redisplays the panel
 changing the image accordingly (selected or un-selected). Feel free to
 reuse
 the code or adapt it if it suits your needs.

 Best,

 Ernesto


 egolan74 wrote:
 
  Hi,
  How can I make a Component to act as a checkbox, but to show an icon
  instead?
 
  I want to show an icon (image) when not selected, and if the user clicks
  on
  it, it will be selected = selected icon.
  The model to use is a Boolean.
 
  I guess this is easy, but please provide some code / explanation.
 
  Thanks,
 
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
  necessary
 
 
  -
  Eyal Golan
  egola...@gmail.com
 
  Visit: JVDrums
  LinkedIn: LinkedIn
 

 --
 View this message in context:
 http://old.nabble.com/icons-as-checkboxes-tp27861120p27861503.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: jquery/qtip integration troubles - ajax post stopped

2010-03-11 Thread Antoine van Wel
Alright, I got this to work in a clean way.

The problem was that the QTip jQuery plugin *cloned* the panel / form.
This was causing trouble for the form submission. Simply adding a
.remove() which removed the original DOM tree fixed the issue.

I ended up with replacing
.append(   content: $('# + contentMarkupId + ').html(),)

by
.append(   content: $('# + contentMarkupId + ').remove(),)


and now everything works as a charm.


Antoine.


On Wed, Mar 10, 2010 at 6:04 PM, Antoine van Wel
antoine.van@gmail.com wrote:
 Turns out Wicket.$$(this) returned false after all. Thanks Richard!

 I ended up adapting the AjaxButton by simply kicking out the
 Wicket.$$(this) of the pre-condition check.

 So can anybody tell me what this Wicket.$$(this) is good for ... I
 got a gut-feeling what I've done is not such a good idea :-)


 Antoine


 On Tue, Mar 9, 2010 at 6:44 PM, Antoine van Wel
 antoine.van@gmail.com wrote:
 Hi Richard,

 Thanks for the reply. It didn't bring me further though.
 When debugging, Wicket.$$(this) and the other one both return true, so
 that doesn't seem to be the problem.

 When tracking the evaluation of the precondition, I end up in wicket-event.js

 25 if (Function.prototype.bind == null) {
 26 Function.prototype.bind = function(object) {
 27 var __method = this;
 28 return function() {
 29 return __method.apply(object, arguments);
 30 }
 31 }
 32}

 where line 29 will return false.
 Does that ring any bells?


 By the way, in the code I copied-and-pasted in my previous email, two
 lines were not included which needs to be there:
 setOutputMarkupId(true) on parent  content components.


 Antoine

 On Tue, Mar 9, 2010 at 4:37 PM, Richard Wilkinson
 richardjohnwilkin...@googlemail.com wrote:
 Hi,

 'Ajax POST stopped because of precondition check' is probably your
 problem.  all wicket ajax can have a precondition, which is basically
 a function that returns true or false, and will only execute the ajax
 if it returns true.  I expect that for some reason in your case this
 function is returning false.

 for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
 this: return Wicket.$$(this)Wicket.$$(' + getForm().getMarkupId()
 + ');

 in the wicket ajax javascript file i see this:

 // returns if the element belongs to current document
 // if the argument is not element, function returns true
 Wicket.$$ = function(element) {
 ...
 }

 This must be failing for you, which I presume has something to do with
 how you are passing the content into the qtip;

 content: $('# + contentMarkupId + ').html()

 Hope that helps.

 --
 Regards - Richard Wilkinson
 Developer,
 jWeekend: OO  Java Technologies - Development and Training
 http://jWeekend.com


 On 9 March 2010 13:05, Antoine van Wel antoine.van@gmail.com wrote:
 Hi everybody,

 Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
 an Ajax form submit.
 The Wicket Ajax Debug panel shows an Ajax POST stopped because of
 precondition check, so an Ajax response is never sent.

 What I'm doing is simply render the text for the tooltip on the same
 page in a hidden div, then pointing the content of the tooltip to that
 div.

 the html:

 wicket:head
        script type=text/javascript 
 src=/js/jquery-1.3.2.min.js/script
        script type=text/javascript 
 src=/js/jquery.qtip-1.0.0-rc3.min.js/script
 /wicket:head

 wicket:extend
        div wicket:id=content style=display: none;
                form wicket:id=form
                        input type=submit wicket:id=clickme 
 value=click me
                /form
        /div

        span wicket:id=tipmehover over me/span
 /wicket:extend

 the page class:

 public class JQueryTestPage extends BasePage {
        public JQueryTestPage() {
                WebMarkupContainer content = new 
 WebMarkupContainer(content);
                add(content);

                FormVoid form = new FormVoid(form);
                content.add(form);
                form.add(new AjaxButton(clickme) {
                       �...@override
                        protected void onSubmit(AjaxRequestTarget target, 
 Form? form) {
                                System.out.println(testing);
                        }

                });

                WebMarkupContainer qtip = new WebMarkupContainer(tipme);
                add(qtip);
                qtip.add(new QTipBehavior(qtip, content));
        }

 }


 and finally the QTipBehavior:

 public class QTipBehavior extends AbstractBehavior {
        private String componentMarkupId;
        private String contentMarkupId;

        public QTipBehavior(Component parent, Component content) {
                contentMarkupId = content.getMarkupId();
                componentMarkupId = parent.getMarkupId();
        }

       �...@override
        public void renderHead(IHeaderResponse response) {
                String javascript = new StringBuilder()
                        .append($(function() {)
            

Application#get in WicketSessionFilter

2010-03-11 Thread Jonas
Hi all,

we're using WicketSessionFilter in our product to access
our custom WebSession, which works fine. Now we've tried
to also access the org.apache.wicket.Application (e.g. using
Session#getApplication or Application#get), which doesn't seem
to work, because the application isn't bound to the ThreadLocal.
After searching in nabble I found some old threads ([1], [2]) suggesting
this should actually work fine, but that doesn't seem to be the case.
Is there any special configuration trick I have to apply to make this
work, or are those old posts just (no longer) true?
If anybody could confirm this is actually a bug, I'd create an issue
in JIRA to have this fixed.

Regards,
Jonas

[1] 
http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786
[2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469

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



Ad: Re: Generic solution for tabindex?

2010-03-11 Thread espen . pedersen
Thanks a lot Scott :) I've been thinking of something similar, but I don't 
like the idea of subclassing every component, that needs to be indexed.

I've been playing with the thought of going through the components on a 
page and modify / add the tabindex attribute on the components in the 
page. I'm not really sure about how and where I could possibly do this?! 

It has to be done after all components, also those from the panels is 
available in the object hierarchy, is there any hooks in the framework 
that would allow me to do something like this? I guess this would still 
not solve the Ajax issues mentioned :(

--
Espen Ønvik Pedersen
Seksjon for IT-utvikling, Husbanken
Kontor: +47 32 26 26 33 - Sentralbord: +47 815 33 370 



Fra:
Scott Swank scott.sw...@gmail.com
Til:
users@wicket.apache.org
Dato:
10.03.2010 18:45
Emne:
Re: Generic solution for tabindex?



We have created a bad solution.  The core problem is ajax.  Say you
have five fields: A, B, C, D  E.  Now you want to insert X  Y
between A  B.  No static numbering system will allow an unknown
number of fields to be inserted in between the existing fields.

On top of that you need to have the boundaries of the numbering ranges
well-defined.  Say you have two columns, numbered as follows:

A(10)  D(40)
B(20)  E(50)
C(30)  F(60)

Now let's say you insert a new row (our old friends X  Y) after the
first, you want to end up with something like:

A(10)  D(40)
X(15)  Y(45)
B(20)  E(50)
C(30)  F(60)

But it is not a simple matter to accomplish this.  So here's what we
have, which as I said has problems with corner cases.

For various FormComponents we have subclasses such as the following:

public class TabIndexTextFieldT extends TextFieldT implements 
TabIndexable {
  private ModelInteger tabIndexModel = new ModelInteger(0);

  public TabIndexTextField(String id) {
super(id);
add(new AttributeModifier(tabindex, true, tabIndexModel));
  }

  @Override
  protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
// call a parent WebMarkupContainer that implements TabIndexed
// and knows how to examine 
// ValueMap vMap = c.getMarkupAttributes();
// if (vMap.containsKey(tabindex))
//tabIndex = vMap.getInt(tabindex);
// to set the tabIndexModel's value
  }
}

The above is reasonably sound, however the implementation of
TabIndexed needs cleanup and has problems with corner conditions.
I'll post the gist of that logic if you like, but the actual
implementation is spread out (unnecessarily) across a couple of
classes.

Scott

On Wed, Mar 10, 2010 at 7:12 AM,  espen.peder...@husbanken.no wrote:
 Hi!

 Is use a lot of panels on my pages and need to be able to dynamically 
set
 the tabindex attribute on the FormComponents contained in the panels, so
 that when I reuse them in differenet page compositions the tabindex will
 be correct (top-to-bottom).
 Any good ideas out there on how this could be done?

 --
 Espen Ønvik Pedersen


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




Re: modal window problem

2010-03-11 Thread Fernando Wermus
The link is no more functional. Could you show the code?

On Thu, Mar 11, 2010 at 5:55 AM, Martin Asenov mase...@velti.com wrote:

 Please, anyone give some support on this one?

 Thank you,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Monday, March 08, 2010 6:23 PM
 To: users@wicket.apache.org
 Subject: RE: modal window problem

 Hi, Matthias!

 Well, I viewed the page source, and there is no text that says http://:/;
 . However, this happens only on two PCs from 10. Also, I typed on the one of
 the computers that have this error the above mentioned text in the browser
 and it led to the very same page with the very same parameters. Do you have
 any further ideas?

 Thanks,
 Martin

 -Original Message-
 From: Matthias Keller [mailto:matthias.kel...@ergon.ch]
 Sent: Monday, March 08, 2010 6:10 PM
 To: users@wicket.apache.org
 Subject: Re: modal window problem

 On 2010-03-08 17:07, Martin Asenov wrote:
  It's me again. I just noticed some very strange error that I have no
 explanation about. When I open a wicket modal window then it appears for a
 while and closes and the entire page gets redirected to some browser related
 pages, for instance ask.com, or some thing like this:
 
 
 http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12
 
  This is a modal window issue. Any help regarding the question will be
 highly appreciated!
 
 Hi

 It appears that something on your page/modal window is referencing an
 URL http://:/; (or maybe just :/) so your browser bar takes over
 control since that host cannot be found. Maybe check the source of that
 page for such an URL...

 Matt


 -
 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


RE: modal window problem

2010-03-11 Thread Martin Asenov
Hi, Fernando,

Тhe code's too big , about 500 lines, and the html is another 62 lines. I can 
paste it anyway, but is this problem related to the code itself? 
The string http://:/; , which Matthias mentioned about is not present anywhere 
in the page sources, as I view the pages that cause the problems only on 
certain PCs...

Regards,
Martin

-Original Message-
From: Fernando Wermus [mailto:fernando.wer...@gmail.com] 
Sent: Thursday, March 11, 2010 3:34 PM
To: users@wicket.apache.org
Subject: Re: modal window problem

The link is no more functional. Could you show the code?

On Thu, Mar 11, 2010 at 5:55 AM, Martin Asenov mase...@velti.com wrote:

 Please, anyone give some support on this one?

 Thank you,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Monday, March 08, 2010 6:23 PM
 To: users@wicket.apache.org
 Subject: RE: modal window problem

 Hi, Matthias!

 Well, I viewed the page source, and there is no text that says http://:/;
 . However, this happens only on two PCs from 10. Also, I typed on the one of
 the computers that have this error the above mentioned text in the browser
 and it led to the very same page with the very same parameters. Do you have
 any further ideas?

 Thanks,
 Martin

 -Original Message-
 From: Matthias Keller [mailto:matthias.kel...@ergon.ch]
 Sent: Monday, March 08, 2010 6:10 PM
 To: users@wicket.apache.org
 Subject: Re: modal window problem

 On 2010-03-08 17:07, Martin Asenov wrote:
  It's me again. I just noticed some very strange error that I have no
 explanation about. When I open a wicket modal window then it appears for a
 while and closes and the entire page gets redirected to some browser related
 pages, for instance ask.com, or some thing like this:
 
 
 http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12
 
  This is a modal window issue. Any help regarding the question will be
 highly appreciated!
 
 Hi

 It appears that something on your page/modal window is referencing an
 URL http://:/; (or maybe just :/) so your browser bar takes over
 control since that host cannot be found. Maybe check the source of that
 page for such an URL...

 Matt


 -
 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus

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



A question about using Spring in Wicket 1.4

2010-03-11 Thread David Chang
Yesterday I was looking at the page Migrating to Wicket 1.4

http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html

Regarding SpringWebApplication, it says: 

SpringWebApplication has been deprecated in favor of SpringBean annotation. See 
SpringWebApplication javadoc for how to setup SpringBean based injection.

I went to Wicket API about SpringWebApplication and it says:

Deprecated. when using java5 it is preferrable to use SpringBean annotations 
for injection rather then this spring-specific application subclass with its 
helpers. To setup SpringBean add the following line to your WebApplication 
subclass init method add(new SpringComponentInjector(this)); 

Here is my way of using Spring in my wicket app.

1. In the init method:

addComponentInstantiationListener(new SpringComponentInjector(this));

Please note that it is not: add(new SpringComponentInjector(this)); 

2. In wicket components that access Spring beans:

@SpringBean
private SupportService supportService;


Am I doing Spring in Wicket right way?

Thanks for input!



  

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



Re: A question about using Spring in Wicket 1.4

2010-03-11 Thread James Carman
yes

On Thu, Mar 11, 2010 at 8:56 AM, David Chang david_q_zh...@yahoo.com wrote:
 Yesterday I was looking at the page Migrating to Wicket 1.4

 http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html

 Regarding SpringWebApplication, it says:

 SpringWebApplication has been deprecated in favor of SpringBean annotation. 
 See SpringWebApplication javadoc for how to setup SpringBean based injection.

 I went to Wicket API about SpringWebApplication and it says:

 Deprecated. when using java5 it is preferrable to use SpringBean annotations 
 for injection rather then this spring-specific application subclass with its 
 helpers. To setup SpringBean add the following line to your WebApplication 
 subclass init method add(new SpringComponentInjector(this));

 Here is my way of using Spring in my wicket app.

 1. In the init method:

 addComponentInstantiationListener(new SpringComponentInjector(this));

 Please note that it is not: add(new SpringComponentInjector(this));

 2. In wicket components that access Spring beans:

 @SpringBean
 private SupportService supportService;


 Am I doing Spring in Wicket right way?

 Thanks for input!





 -
 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: A question about using Spring in Wicket 1.4

2010-03-11 Thread David Chang
James, thanks for quick reply. I guess I am a little confused is that in the 
init method, I use

addComponentInstantiationListener(new SpringComponentInjector(this));

instead of 

add(new SpringComponentInjector(this));

as Migrating guide specified. The Guide-specified approach actually generates 
compiler error.

Regards.


--- On Thu, 3/11/10, James Carman jcar...@carmanconsulting.com wrote:

 From: James Carman jcar...@carmanconsulting.com
 Subject: Re: A question about using Spring in Wicket 1.4
 To: users@wicket.apache.org
 Date: Thursday, March 11, 2010, 9:09 AM
 yes
 
 On Thu, Mar 11, 2010 at 8:56 AM, David Chang david_q_zh...@yahoo.com
 wrote:
  Yesterday I was looking at the page Migrating to
 Wicket 1.4
 
  http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html
 
  Regarding SpringWebApplication, it says:
 
  SpringWebApplication has been deprecated in favor of
 SpringBean annotation. See SpringWebApplication javadoc for
 how to setup SpringBean based injection.
 
  I went to Wicket API about SpringWebApplication and it
 says:
 
  Deprecated. when using java5 it is preferrable to use
 SpringBean annotations for injection rather then this
 spring-specific application subclass with its helpers. To
 setup SpringBean add the following line to your
 WebApplication subclass init method add(new
 SpringComponentInjector(this));
 
  Here is my way of using Spring in my wicket app.
 
  1. In the init method:
 
  addComponentInstantiationListener(new
 SpringComponentInjector(this));
 
  Please note that it is not: add(new
 SpringComponentInjector(this));
 
  2. In wicket components that access Spring beans:
 
  @SpringBean
  private SupportService supportService;
 
 
  Am I doing Spring in Wicket right way?
 
  Thanks for input!
 
 
 
 
 
 
 -
  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: A question about using Spring in Wicket 1.4

2010-03-11 Thread Matthias Keller

Hi David

addComponentInstantiationListener(new SpringComponentInjector(this));

is correct, as there is no add() method in Application.

Matt

On 2010-03-11 15:14, David Chang wrote:

James, thanks for quick reply. I guess I am a little confused is that in the 
init method, I use

addComponentInstantiationListener(new SpringComponentInjector(this));

instead of

add(new SpringComponentInjector(this));

as Migrating guide specified. The Guide-specified approach actually generates 
compiler error.

Regards.


--- On Thu, 3/11/10, James Carmanjcar...@carmanconsulting.com  wrote:

   

From: James Carmanjcar...@carmanconsulting.com
Subject: Re: A question about using Spring in Wicket 1.4
To: users@wicket.apache.org
Date: Thursday, March 11, 2010, 9:09 AM
yes

On Thu, Mar 11, 2010 at 8:56 AM, David Changdavid_q_zh...@yahoo.com
wrote:
 

Yesterday I was looking at the page Migrating to
   

Wicket 1.4
 

http://cwiki.apache.org/WICKET/migrating-to-wicket-14.html

Regarding SpringWebApplication, it says:

SpringWebApplication has been deprecated in favor of
   

SpringBean annotation. See SpringWebApplication javadoc for
how to setup SpringBean based injection.
 

I went to Wicket API about SpringWebApplication and it
   

says:
 

Deprecated. when using java5 it is preferrable to use
   

SpringBean annotations for injection rather then this
spring-specific application subclass with its helpers. To
setup SpringBean add the following line to your
WebApplication subclass init method add(new
SpringComponentInjector(this));
 

Here is my way of using Spring in my wicket app.

1. In the init method:

addComponentInstantiationListener(new
   

SpringComponentInjector(this));
 

Please note that it is not: add(new
   

SpringComponentInjector(this));
 

2. In wicket components that access Spring beans:

@SpringBean
private SupportService supportService;


Am I doing Spring in Wicket right way?

Thanks for input!





   





smime.p7s
Description: S/MIME Cryptographic Signature


Interaction behavior / site

2010-03-11 Thread Thorsten
Hi,

my site has two labels. One shows a total amount. If the user clicks on
the other label, a tooltip shows up, where the user can increase the
total amount with help of different links:
+---
+ a href=???increase by 1/a+
+ a href=???increase by 2/a+
+ a href=???increase by 3/a+
+---

How do I implement this?

So far, I have a QTipBehaviour class, that controls the tooltip. But how
can I change the total amount from there?


Thanks.

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



Re: Interaction behavior / site

2010-03-11 Thread Michael O'Cleirigh

Hi Thorsten,

The content of the tooltip should be a panel.  The panel's model can 
contain the ListInteger of the increases you want offered and then it 
can use a repeater or ListView to render each option.  If the links were 
AjaxLink subclasses you could set their model to be the particular 
Integer they represented and then within the onClick(final 
AjaxRequestTarget target) method handle the necessary changes to your 
totals.


There is also a client side version to this where all the tooltip's are 
written out invisible with the page and you have a custom Javascript 
class/object that is aware of the totals amount and can update it based 
on a client side onclick event's on the links.


Regards,

Mike


Hi,

my site has two labels. One shows a total amount. If the user clicks on
the other label, a tooltip shows up, where the user can increase the
total amount with help of different links:
+---
+a href=???increase by 1/a+
+a href=???increase by 2/a+
+a href=???increase by 3/a+
+---

How do I implement this?

So far, I have a QTipBehaviour class, that controls the tooltip. But how
can I change the total amount from there?


Thanks.

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

   



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



Re: modal window problem

2010-03-11 Thread Igor Vaynberg
view page source in the browser will not have any additions that came via ajax.

-igor

2010/3/11 Martin Asenov mase...@velti.com:
 Hi, Fernando,

 Тhe code's too big , about 500 lines, and the html is another 62 lines. I can 
 paste it anyway, but is this problem related to the code itself?
 The string http://:/; , which Matthias mentioned about is not present 
 anywhere in the page sources, as I view the pages that cause the problems 
 only on certain PCs...

 Regards,
 Martin

 -Original Message-
 From: Fernando Wermus [mailto:fernando.wer...@gmail.com]
 Sent: Thursday, March 11, 2010 3:34 PM
 To: users@wicket.apache.org
 Subject: Re: modal window problem

 The link is no more functional. Could you show the code?

 On Thu, Mar 11, 2010 at 5:55 AM, Martin Asenov mase...@velti.com wrote:

 Please, anyone give some support on this one?

 Thank you,
 Martin

 -Original Message-
 From: Martin Asenov [mailto:mase...@velti.com]
 Sent: Monday, March 08, 2010 6:23 PM
 To: users@wicket.apache.org
 Subject: RE: modal window problem

 Hi, Matthias!

 Well, I viewed the page source, and there is no text that says http://:/;
 . However, this happens only on two PCs from 10. Also, I typed on the one of
 the computers that have this error the above mentioned text in the browser
 and it led to the very same page with the very same parameters. Do you have
 any further ideas?

 Thanks,
 Martin

 -Original Message-
 From: Matthias Keller [mailto:matthias.kel...@ergon.ch]
 Sent: Monday, March 08, 2010 6:10 PM
 To: users@wicket.apache.org
 Subject: Re: modal window problem

 On 2010-03-08 17:07, Martin Asenov wrote:
  It's me again. I just noticed some very strange error that I have no
 explanation about. When I open a wicket modal window then it appears for a
 while and closes and the entire page gets redirected to some browser related
 pages, for instance ask.com, or some thing like this:
 
 
 http://www.mybrowserbar.com/cgi/errors.cgi?q=http%3A%2F%2F%3A%2Ftype=dnsISN=29A2367D3BED40D7A5BA3349E8CAA9FDccv=130cnid=374563cco=USct=12
 
  This is a modal window issue. Any help regarding the question will be
 highly appreciated!
 
 Hi

 It appears that something on your page/modal window is referencing an
 URL http://:/; (or maybe just :/) so your browser bar takes over
 control since that host cannot be found. Maybe check the source of that
 page for such an URL...

 Matt


 -
 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




 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus

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



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



jwicket question

2010-03-11 Thread Josh Chappelle
Hi,

 

Lately I've noticed more comments about jwicket. At my company we have a
couple of pages that use the wicketstuff-dojo wiper effect. However, since
that project is no longer being maintenanced(and I don't' think I will have
the time to maintain it) I am thinking about adopting another javascript
library that is integrated with wicket.

 

Is the jwicket library a good replacement for the wicketstuff-dojo?

 

Thanks,

 

Josh 



RE: jwicket question

2010-03-11 Thread Stefan Lindner
Hi Josh,

I was a former user of wicketstuff-dojo and faced the same problem as you: 
There was no maintainer for this project  2 years ago and there was a problem 
with drag and drop after Ajax Updates.
The initial goal for jWicket was a robust and clean implementation of a drag 
and drop functionality. The I added the resizable behavior und the effects. 
That's all for now.
The next steps will be the implementation of a menu bar and the accordion 
function.

There is another jQuery integration for Wicket called wiquery.

Let me know if I can help you.

Stefan

-Ursprüngliche Nachricht-
Von: Josh Chappelle [mailto:jchappe...@4redi.com] 
Gesendet: Donnerstag, 11. März 2010 18:18
An: users@wicket.apache.org
Betreff: jwicket question

Hi,

 

Lately I've noticed more comments about jwicket. At my company we have a
couple of pages that use the wicketstuff-dojo wiper effect. However, since
that project is no longer being maintenanced(and I don't' think I will have
the time to maintain it) I am thinking about adopting another javascript
library that is integrated with wicket.

 

Is the jwicket library a good replacement for the wicketstuff-dojo?

 

Thanks,

 

Josh 


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



Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread prati

Hi 

I have got a refreshing view ,it contains list of links.I need to highlight
the link when i click on that link.

It works properly but if i click the next item in the list,the previous text
remains highlighted.

wicket:extend

table cellspacing=0 class=dataview
tr

thFirst Name/th

/tr
tr wicket:id=view
td # /td
   
/tr
/table

/wicket:extend



public class RefreshingPage extends BasePage {


public RefreshingPage()
{
final ListIModel contacts = new ArrayListIModel(10);

// populate list of contacts to be displayed

IteratorContact it = rgetContacts().iterator();
while (it.hasNext())
{
contacts.add(new Model(it.next()));
}

// create the refreshing view
RefreshingView view = new RefreshingView(view)
{
/**
 * Return an iterator over models for items in the view
 */
@Override
protected IteratorIModel getItemModels()
{
return contacts.iterator();
}

@Override
protected void populateItem(final Item item)
{
Contact contact = (Contact) 
item.getModelObject();

final Label contacteLabel = new 
Label(aname,contact.getName());
contacteLabel.setOutputMarkupId(true);

item.add(new AjaxLink(name) {

private static final long 
serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget 
target) {

if(target!= null) {
contacteLabel.add(new

AttributeModifier(style, true, new AbstractReadOnlyModel() {

@Override

public String getObject() {

return background-color:#80b6ed;;

}
}));

target.addComponent(contacteLabel);
}

}



}.add(contacteLabel));
}
};

add(view);


}
}


Regards
P


moontz wrote:
 
 i tried that before.  did not work.  no compile or runtime errors, but the
 source did not show the change.
 
 im thinking, since its an ajax link and because only the target panel
 refreshes, the change to the link is not applied because the actual link
 is not refreshed.  only the other panel is.  in which case i would need to
 append javascript.  i was hping there was a pure wicket solutioin though
 without using JS.
 
 
 
 igor.vaynberg wrote:
 
 final ListItem item
 
 -igor
 
 On Fri, Feb 13, 2009 at 7:36 AM, moontz bmun...@yahoo.com wrote:

 I would like to add an attribute to the ListItem element in the markup
 (basically change the class style) on click of the link.  Below is my
 snippet.  Any insight on how I can accomplish this?  Thanks in advance!

 ListView lv = new ListView(tabListView, tabList) {
 protected void populateItem(ListItem item) {
 AjaxLink ajaxLink = new AjaxLink(tabLink,
 item.getModel()) {
   public void onClick(AjaxRequestTarget target)
 {
item.add(new
 SimpleAttributeModifier(class, on));  //
 want to do this but do not have access to item object from inner class 
 --
 ideas for this?
 .
 .
 .


 --
 View this message in context:
 http://www.nabble.com/How-to-access-ListItem-from-ListView-from-AjaxLink--tp21998739p21998739.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: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread Cemal Bayramoglu
Prati,

This is because you are only re-rendering the most recently selected label.

One solution is keep track of the previous current selection
(probably in your RefreshingView implementation - eg declare
Component currentSelection;), which you update in your Link's
onClick (ie currentSelecton = contactLabel;) _after_ you remove the
style attribute (that you previously set) on currentSelection and add
currrentSelection to the AjaxRequestTarget so it too gets refreshed.

Make sense?

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

On 11 March 2010 18:09, prati pratibha.pari...@gmail.com wrote:

 Hi

 I have got a refreshing view ,it contains list of links.I need to highlight
 the link when i click on that link.

 It works properly but if i click the next item in the list,the previous text
 remains highlighted.

 wicket:extend

 table cellspacing=0 class=dataview
    tr

        thFirst Name/th

    /tr
    tr wicket:id=view
        td #     /td

    /tr
 /table

 /wicket:extend



 public class RefreshingPage extends BasePage {


        public RefreshingPage()
        {
                final ListIModel contacts = new ArrayListIModel(10);

                // populate list of contacts to be displayed

                IteratorContact it = rgetContacts().iterator();
                while (it.hasNext())
                {
                        contacts.add(new Model(it.next()));
                }

                // create the refreshing view
                RefreshingView view = new RefreshingView(view)
                {
                        /**
                         * Return an iterator over models for items in the view
                         */
                       �...@override
                        protected IteratorIModel getItemModels()
                        {
                                return contacts.iterator();
                        }

                       �...@override
                        protected void populateItem(final Item item)
                        {
                                Contact contact = (Contact) 
 item.getModelObject();

                                final Label contacteLabel = new 
 Label(aname,contact.getName());
                                contacteLabel.setOutputMarkupId(true);

                                item.add(new AjaxLink(name) {

                                        private static final long 
 serialVersionUID = 1L;

                                       �...@override
                                        public void onClick(AjaxRequestTarget 
 target) {

                                                if(target!= null) {
                                                        contacteLabel.add(new
                                                                        
 AttributeModifier(style, true, new AbstractReadOnlyModel() {
                                                                               
 �...@override
                                                                               
  public String getObject() {
                                                                               
          return background-color:#80b6ed;;
                                                                               
  }
                                                                        }));
                                                        
 target.addComponent(contacteLabel);
                                                }

                                        }



                                }.add(contacteLabel));
                        }
                };

                add(view);


        }
 }


 Regards
 P


 moontz wrote:

 i tried that before.  did not work.  no compile or runtime errors, but the
 source did not show the change.

 im thinking, since its an ajax link and because only the target panel
 refreshes, the change to the link is not applied because the actual link
 is not refreshed.  only the other panel is.  in which case i would need to
 append javascript.  i was hping there was a pure wicket solutioin though
 without using JS.



 igor.vaynberg wrote:

 final ListItem item

 -igor

 On Fri, Feb 13, 2009 at 7:36 AM, moontz bmun...@yahoo.com wrote:

 I would like to add an attribute to the ListItem element in the markup
 (basically change the class style) on click of the link.  Below is my
 snippet.  Any insight on how I can accomplish this?  Thanks in advance!

 ListView lv = new ListView(tabListView, tabList) {
                 protected void populateItem(ListItem item) {
                         AjaxLink ajaxLink = new AjaxLink(tabLink,
 item.getModel()) {
                           public void onClick(AjaxRequestTarget target)
 {
                                        item.add(new
 SimpleAttributeModifier(class, on));  //
 want to do this but do not have access to item object from inner class
 --
 

RE: jwicket question

2010-03-11 Thread Josh Chappelle
Thanks Stefan I will. 

I will download jwicket and see how easy it is to phase out my
wicketstuff-dojo components and replace them with jwicket.

Josh

-Original Message-
From: Stefan Lindner [mailto:lind...@visionet.de] 
Sent: Thursday, March 11, 2010 11:34 AM
To: users@wicket.apache.org
Subject: RE: jwicket question

Hi Josh,

I was a former user of wicketstuff-dojo and faced the same problem as you:
There was no maintainer for this project  2 years ago and there was a
problem with drag and drop after Ajax Updates.
The initial goal for jWicket was a robust and clean implementation of a drag
and drop functionality. The I added the resizable behavior und the effects.
That's all for now.
The next steps will be the implementation of a menu bar and the accordion
function.

There is another jQuery integration for Wicket called wiquery.

Let me know if I can help you.

Stefan

-Ursprüngliche Nachricht-
Von: Josh Chappelle [mailto:jchappe...@4redi.com] 
Gesendet: Donnerstag, 11. März 2010 18:18
An: users@wicket.apache.org
Betreff: jwicket question

Hi,

 

Lately I've noticed more comments about jwicket. At my company we have a
couple of pages that use the wicketstuff-dojo wiper effect. However, since
that project is no longer being maintenanced(and I don't' think I will have
the time to maintain it) I am thinking about adopting another javascript
library that is integrated with wicket.

 

Is the jwicket library a good replacement for the wicketstuff-dojo?

 

Thanks,

 

Josh 


-
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: jwicket question

2010-03-11 Thread Martin Grigorov
Josh,

What are the problems with wicketstuff-dojo ?
Is it only that it uses Dojo 1.1 ? I think it wont be to hard to upgrade
it to 1.4.x.

Do you use declarative way to create dijits or it is too slow you ?
The declarative approach is very easy to integrate with Wicket and if
you parse only the Ajax modified widgets then the speed is quite good.

On Thu, 2010-03-11 at 13:45 -0600, Josh Chappelle wrote:
 Thanks Stefan I will. 
 
 I will download jwicket and see how easy it is to phase out my
 wicketstuff-dojo components and replace them with jwicket.
 
 Josh
 
 -Original Message-
 From: Stefan Lindner [mailto:lind...@visionet.de] 
 Sent: Thursday, March 11, 2010 11:34 AM
 To: users@wicket.apache.org
 Subject: RE: jwicket question
 
 Hi Josh,
 
 I was a former user of wicketstuff-dojo and faced the same problem as you:
 There was no maintainer for this project  2 years ago and there was a
 problem with drag and drop after Ajax Updates.
 The initial goal for jWicket was a robust and clean implementation of a drag
 and drop functionality. The I added the resizable behavior und the effects.
 That's all for now.
 The next steps will be the implementation of a menu bar and the accordion
 function.
 
 There is another jQuery integration for Wicket called wiquery.
 
 Let me know if I can help you.
 
 Stefan
 
 -Ursprüngliche Nachricht-
 Von: Josh Chappelle [mailto:jchappe...@4redi.com] 
 Gesendet: Donnerstag, 11. März 2010 18:18
 An: users@wicket.apache.org
 Betreff: jwicket question
 
 Hi,
 
  
 
 Lately I've noticed more comments about jwicket. At my company we have a
 couple of pages that use the wicketstuff-dojo wiper effect. However, since
 that project is no longer being maintenanced(and I don't' think I will have
 the time to maintain it) I am thinking about adopting another javascript
 library that is integrated with wicket.
 
  
 
 Is the jwicket library a good replacement for the wicketstuff-dojo?
 
  
 
 Thanks,
 
  
 
 Josh 
 
 
 -
 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: Submit form with ajax on enter

2010-03-11 Thread cbchhaya

John,

Is the fix in 1.4.7?


John Patterson wrote:
 
 
 
 MattyDE wrote:
 
 Any other hints for this right now?
 
 I want to submit an ajax-Form by hiting enter in Textfield, but i want
 wicket to call the same Method as i defiend in AjaxButton ... any
 ideas? 
 
 Thanks a lot in Advance
 
 
 If I remember correctly, my patch was applied so you can now attach the
 AjaxFormSubmitBehavior directly to the form and listen for onsubmit.  This
 handles both enter and click.
 
 

-- 
View this message in context: 
http://old.nabble.com/Submit-form-with-ajax-on-enter-tp24196732p27869579.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: jwicket question

2010-03-11 Thread Josh Chappelle
Martin,

The wicketstuff-dojo jar that we are using is named wicketstuff-dojo-1.3.0
which I believe is a different and older project than the
wicketstuff-dojo-1.1. In fact I don't see it in the svn repository at all in
the wicketstuff trunk. 

My main problem with it is that we are getting ready to upgrade to
wicket-1.4 and there is currently not a compatible version of the
wicketstuff-dojo project since it is not being maintained. So we are stuck
with wicket 1.3 until I can find another javascript library that is
integrated with wicket that does the same things that we are currently
doing.

It might not be hard to upgrade the wicketstuff-dojo to wicket 1.4.x. I am
tempted to try it and I may in my spare time but I don't want our product to
have a dependency on a component that is not being maintained. I don't trust
my javascript/web knowledge enough to take over the project and continue
maintaining it.

Thanks,

Josh

-Original Message-
From: Martin Grigorov [mailto:mcgreg...@e-card.bg] 
Sent: Thursday, March 11, 2010 2:37 PM
To: users@wicket.apache.org
Subject: RE: jwicket question

Josh,

What are the problems with wicketstuff-dojo ?
Is it only that it uses Dojo 1.1 ? I think it wont be to hard to upgrade
it to 1.4.x.

Do you use declarative way to create dijits or it is too slow you ?
The declarative approach is very easy to integrate with Wicket and if
you parse only the Ajax modified widgets then the speed is quite good.

On Thu, 2010-03-11 at 13:45 -0600, Josh Chappelle wrote:
 Thanks Stefan I will. 
 
 I will download jwicket and see how easy it is to phase out my
 wicketstuff-dojo components and replace them with jwicket.
 
 Josh
 
 -Original Message-
 From: Stefan Lindner [mailto:lind...@visionet.de] 
 Sent: Thursday, March 11, 2010 11:34 AM
 To: users@wicket.apache.org
 Subject: RE: jwicket question
 
 Hi Josh,
 
 I was a former user of wicketstuff-dojo and faced the same problem as you:
 There was no maintainer for this project  2 years ago and there was a
 problem with drag and drop after Ajax Updates.
 The initial goal for jWicket was a robust and clean implementation of a
drag
 and drop functionality. The I added the resizable behavior und the
effects.
 That's all for now.
 The next steps will be the implementation of a menu bar and the accordion
 function.
 
 There is another jQuery integration for Wicket called wiquery.
 
 Let me know if I can help you.
 
 Stefan
 
 -Ursprüngliche Nachricht-
 Von: Josh Chappelle [mailto:jchappe...@4redi.com] 
 Gesendet: Donnerstag, 11. März 2010 18:18
 An: users@wicket.apache.org
 Betreff: jwicket question
 
 Hi,
 
  
 
 Lately I've noticed more comments about jwicket. At my company we have a
 couple of pages that use the wicketstuff-dojo wiper effect. However, since
 that project is no longer being maintenanced(and I don't' think I will
have
 the time to maintain it) I am thinking about adopting another javascript
 library that is integrated with wicket.
 
  
 
 Is the jwicket library a good replacement for the wicketstuff-dojo?
 
  
 
 Thanks,
 
  
 
 Josh 
 
 
 -
 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



AW: Re: Don't increment the Session.pageIdCounter for stateless pages?

2010-03-11 Thread martin . grotzke
From my basic understanding I'd say that for stateless pages nothing should 
depend on the pageId. What do you think about incrementing the pageId when 
it's first accessed? I'd like to create a patch for it to see if this works.

Cheers,
Martin 

-- Urspr. Mitt. --
Betreff: Re: Don't increment the Session.pageIdCounter for stateless pages?
Von: Igor Vaynberg igor.vaynb...@gmail.com
Datum: 10.03.2010 17:50

i think we can do this in 1.5

i would rather not mess with 1.4 because i think there is a lot of
code there that depends on the fact that the id is available right
away.

please create a jira issue for this

-igor

On Mon, Mar 8, 2010 at 4:30 PM, Martin Grotzke
martin.grot...@javakaffee.de wrote:
 Hi,

 the Page.init(PageMap) invokes setNextAvailableId(), which invokes
 getSession().nextPageId() if isPageIdUniquePerSession is set.

 getSession().nextPageId() modifies the Session.pageIdCounter.

 When I have a session and afterwards access a stateless page, the
 Session.pageIdCounter is the only data that is changed in the session
 AFAICS, everything else is the same as in the request before.

 Is it possible _not_ to modify the Session.pageIdCounter if the page is
 really stateless (or just don't invoke Page.setNextAvailableId())?

 I'm interested in this, as I'm just implementing a feature for the
 memcached-session-manager ([1], memcached based session replication),
 which checks if session data has changed and replicates sessions only if
 this is provided. If session data did not change, the replication is
 omitted. Therefore, if the Session.pageIdCounter would be left unchanged
 for stateless pages, this would allow to make use of this feature in
 wicket apps.

 Thanx  cheers,
 Martin


 [1] http://code.google.com/p/memcached-session-manager/




-
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: Interaction behavior / site

2010-03-11 Thread Thorsten
On Thu, 11 Mar 2010, Michael O'Cleirigh wrote:

Hi Michael,

 The content of the tooltip should be a panel.  The panel's model can
 contain the ListInteger of the increases you want offered and then
 it can use a repeater or ListView to render each option.  If the
 links were AjaxLink subclasses you could set their model to be the
 particular Integer they represented and then within the
 onClick(final AjaxRequestTarget target) method handle the necessary
 changes to your totals.

I'm still confused. My main page looks like this:
html
span wicket:id=tooltip Click on me, and a tooltip will show up
/span
/html

class MainPage extends WebPage {
final Label tooltipHolder = new Label(tooltip, asdf);
add(tooltipHolder);
tooltipHolder.setOutputMarkupId(true);
tooltipHolder.add( new QTipBehaviour( new TooltipPanel(??? ));
}

So I don't have hany markup-id for the panel. I could define it in the
html as a hidden div, but is there a way of without an additional div?

Thorsten

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



Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread prati

Hi Cemal,

Thanks for replying me,but the list gets rendered only once,and i am able to
capture previous value on click but then how to move further.


Regards
P

jWeekend wrote:
 
 Prati,
 
 This is because you are only re-rendering the most recently selected
 label.
 
 One solution is keep track of the previous current selection
 (probably in your RefreshingView implementation - eg declare
 Component currentSelection;), which you update in your Link's
 onClick (ie currentSelecton = contactLabel;) _after_ you remove the
 style attribute (that you previously set) on currentSelection and add
 currrentSelection to the AjaxRequestTarget so it too gets refreshed.
 
 Make sense?
 
 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com
 
 On 11 March 2010 18:09, prati pratibha.pari...@gmail.com wrote:

 Hi

 I have got a refreshing view ,it contains list of links.I need to
 highlight
 the link when i click on that link.

 It works properly but if i click the next item in the list,the previous
 text
 remains highlighted.

 wicket:extend

 table cellspacing=0 class=dataview
    tr

        thFirst Name/th

    /tr
    tr wicket:id=view
        td #     /td

    /tr
 /table

 /wicket:extend



 public class RefreshingPage extends BasePage {


        public RefreshingPage()
        {
                final ListIModel contacts = new ArrayListIModel(10);

                // populate list of contacts to be displayed

                IteratorContact it = rgetContacts().iterator();
                while (it.hasNext())
                {
                        contacts.add(new Model(it.next()));
                }

                // create the refreshing view
                RefreshingView view = new RefreshingView(view)
                {
                        /**
                         * Return an iterator over models for items in the
 view
                         */
                       �...@override
                        protected IteratorIModel getItemModels()
                        {
                                return contacts.iterator();
                        }

                       �...@override
                        protected void populateItem(final Item item)
                        {
                                Contact contact = (Contact)
 item.getModelObject();

                                final Label contacteLabel = new
 Label(aname,contact.getName());
                                contacteLabel.setOutputMarkupId(true);

                                item.add(new AjaxLink(name) {

                                        private static final long
 serialVersionUID = 1L;

                                       �...@override
                                        public void
 onClick(AjaxRequestTarget target) {

                                                if(target!= null) {
                                                      
  contacteLabel.add(new
                                                                      
  AttributeModifier(style, true, new AbstractReadOnlyModel() {
                                                                          
     �...@override
                                                                          
      public String getObject() {
                                                                          
              return background-color:#80b6ed;;
                                                                          
      }
                                                                      
  }));
                                                      
  target.addComponent(contacteLabel);
                                                }

                                        }



                                }.add(contacteLabel));
                        }
                };

                add(view);


        }
 }


 Regards
 P


 moontz wrote:

 i tried that before.  did not work.  no compile or runtime errors, but
 the
 source did not show the change.

 im thinking, since its an ajax link and because only the target panel
 refreshes, the change to the link is not applied because the actual link
 is not refreshed.  only the other panel is.  in which case i would need
 to
 append javascript.  i was hping there was a pure wicket solutioin though
 without using JS.



 igor.vaynberg wrote:

 final ListItem item

 -igor

 On Fri, Feb 13, 2009 at 7:36 AM, moontz bmun...@yahoo.com wrote:

 I would like to add an attribute to the ListItem element in the markup
 (basically change the class style) on click of the link.  Below is my
 snippet.  Any insight on how I can accomplish this?  Thanks in
 advance!

 ListView lv = new ListView(tabListView, tabList) {
                 protected void populateItem(ListItem item) {
                         AjaxLink ajaxLink = new AjaxLink(tabLink,
 item.getModel()) {
                           public void 

Field highlighting on error in Modal window

2010-03-11 Thread Anna Simbirtsev
Hi,

I implemented LondonWicket-FormsWithFlair.pdf on my main windows, but on
Modal windows it does not work, since it uses Ajax to submit the form. Do I
have to check each field manually and manually highlight it in Modal
windows?

Thanks,
Anna


Re: Ajax paging navigation link exception

2010-03-11 Thread bferr

Hi,  I am getting a similar error on wicket 1.4.5 when the user clicks an
ajax link and then clicks a different ajax link on the same page before the
first response is received by the browser.  I am not using the
PagingNavigator, just simple AjaxLinks in a ListView.



kent lai wrote:
 
 Hi,
   I did an upgrade today from v1.3 beta 2 to v1.3 beta 4, but did not  
 restart my eclipse IDE (which was running my tomcat instance). The  
 problem seemed to have gone away now after a machine reboot.
 
   Sorry for all the trouble guys.
 
   Cheers
 
 Kent
 
 
 On 15 Oct 2007, at 5:19 PM, Matej Knopp wrote:
 
 I've tried to reproduce this with latest trunk but I just can't. The
 error would mean that for some reason the precondition that checks for
 element presence in markup is not evaluated for some reason. Can you
 please provide a quickstart/testcase for this?

 Thanks.

 -Matej

 On 10/14/07, kent lai mail...@virtuallyonline.net wrote:
 Yes I just downloaded Wicket 1.3 beta 4. The problem still persist.

 Basically I just do a very quick double click on an ajax paging
 navigator link and this bombs.

 On 14 Oct 2007, at 11:16 AM, Kent Tong wrote:



 kent lai wrote:

  Anyway I am using AjaxPagingNavigator, and wheneven i do a  
 double
 click(or however many times, my mouse *is* kinda faulty in that it
 triggers multiple clicks sometimes), i get the following,

  WicketMessage: Unable to find AjaxPagingNavigator component in
 hierarchy starting from [MarkupContainer [Component id = pageLink,
 page = No Page, path = 0:pageLink.AjaxPagingNavigationLink]]


 Are you using the latest v1.3?

 -
 --
 Kent Tong
 Wicket tutorials freely available at http://www.agileskills2.org/ 
 EWDW
 --
 View this message in context: http://www.nabble.com/Ajax-paging-
 navigation-link-exception-tf4612911.html#a13195781
 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



 -
 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Ajax-paging-navigation-link-exception-tp13173210p27870545.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: component xxx:yyy:zzz not found on page

2010-03-11 Thread bferr

I saw this on our website when the user clicked an AjaxLink that ran long and
then clicked another AjaxLink before the response was received.   We added a
DIV overlay to the ajax spinner and implemented IAjaxIndicatorAware on our
page so that all AjaxRequests would have the overlay with a spinner.  The
page looks like this:


public class BasePage extends WebPage implements IAjaxIndicatorAware
{
public BasePage()
{
  // other stuff 

ajaxIndicatorAppenderOverlay = new 
AjaxIndicatorAppenderOverlay();
add(ajaxIndicatorAppenderOverlay);
}

@Override
public String getAjaxIndicatorMarkupId()
{
return ajaxIndicatorAppenderOverlay.getMarkupId();
}
}



public class AjaxIndicatorAppenderOverlay extends AjaxIndicatorAppender
{
private static final long serialVersionUID = 7536644989676358796L;

public AjaxIndicatorAppenderOverlay()
{}

@Override
public void onRendered(Component component)
{
final Response r = component.getResponse();

r.write();

// adding an overlay
addOverlay(r);

// using a bigger spinner
r.write( \); );
}

private void addOverlay(final Response r)
{
r.write(div style=\height:100%;width:100%;position:fixed;);

r.write(left:0;top:0;z-index:1000;opacity:0;filter:alpha(opacity=0););
r.write(background:#00;\);
r.write(/div);
}
}




Douglas Ferguson-2 wrote:
 
 Hmm.. Would this really be resulting from the site being slow? Or the
 client being slow?
 
 D/
 
 On Jan 8, 2010, at 12:46 PM, nino martinez wael wrote:
 
 I your site is slow and the user manages to click the delete twice i
 could happen (I can see you write that too)..
 
 Put a veil over the button when it's clicked so the user cant click it
 twice..
 
 2010/1/8 Douglas Ferguson doug...@douglasferguson.us:
 Our application periodically gets these errors, where wicket say the
 component could not be found.
 
 Take this example.
 
 1) There is a delete link on the page.
 2) The user clicks the delete button
 3) They get the delete button component not found error.
 
 The intriguing part is that the item is actually deleted.
 
 This makes me think it could be a double click error.
 i.e. the item is delete and the js has another click call queued up but
 the page changes before it comes through.
 
 Is this possible? If so how do I prevent it?
 
 
 
 -
 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/component-xxx%3Ayyy%3Azzz-not-found-on-page-tp27080437p27870950.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: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread Cemal Bayramoglu
Prati,

I'm not sure what you mean.
Here's a couple of lines of code implementing what I described:

if(currentSelection != null){
// you should remove existing behaviours on
// currentSelection here or,
// use an AtrributeModifier added, just once, to all your
// labels with a model that has logic
// checking against currentSelection to
// calculate the correct value for your style attribute
currentSelection.add(new SimpleAttributeModifier(style, ));
target.addComponent(
}
currentSelection = contacteLabel;

Just declare Component currentSelection; in your RefreshingView.

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


On 11 March 2010 21:44, prati pratibha.pari...@gmail.com wrote:

 Hi Cemal,

 Thanks for replying me,but the list gets rendered only once,and i am able to
 capture previous value on click but then how to move further.


 Regards
 P

 jWeekend wrote:

 Prati,

 This is because you are only re-rendering the most recently selected
 label.

 One solution is keep track of the previous current selection
 (probably in your RefreshingView implementation - eg declare
 Component currentSelection;), which you update in your Link's
 onClick (ie currentSelecton = contactLabel;) _after_ you remove the
 style attribute (that you previously set) on currentSelection and add
 currrentSelection to the AjaxRequestTarget so it too gets refreshed.

 Make sense?

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

 On 11 March 2010 18:09, prati pratibha.pari...@gmail.com wrote:

 Hi

 I have got a refreshing view ,it contains list of links.I need to
 highlight
 the link when i click on that link.

 It works properly but if i click the next item in the list,the previous
 text
 remains highlighted.

 wicket:extend

 table cellspacing=0 class=dataview
    tr

        thFirst Name/th

    /tr
    tr wicket:id=view
        td #     /td

    /tr
 /table

 /wicket:extend



 public class RefreshingPage extends BasePage {


        public RefreshingPage()
        {
                final ListIModel contacts = new ArrayListIModel(10);

                // populate list of contacts to be displayed

                IteratorContact it = rgetContacts().iterator();
                while (it.hasNext())
                {
                        contacts.add(new Model(it.next()));
                }

                // create the refreshing view
                RefreshingView view = new RefreshingView(view)
                {
                        /**
                         * Return an iterator over models for items in the
 view
                         */
                       �...@override
                        protected IteratorIModel getItemModels()
                        {
                                return contacts.iterator();
                        }

                       �...@override
                        protected void populateItem(final Item item)
                        {
                                Contact contact = (Contact)
 item.getModelObject();

                                final Label contacteLabel = new
 Label(aname,contact.getName());
                                contacteLabel.setOutputMarkupId(true);

                                item.add(new AjaxLink(name) {

                                        private static final long
 serialVersionUID = 1L;

                                       �...@override
                                        public void
 onClick(AjaxRequestTarget target) {

                                                if(target!= null) {

  contacteLabel.add(new

  AttributeModifier(style, true, new AbstractReadOnlyModel() {

     �...@override

      public String getObject() {

              return background-color:#80b6ed;;

      }

  }));

  target.addComponent(contacteLabel);
                                                }

                                        }



                                }.add(contacteLabel));
                        }
                };

                add(view);


        }
 }


 Regards
 P


 moontz wrote:

 i tried that before.  did not work.  no compile or runtime errors, but
 the
 source did not show the change.

 im thinking, since its an ajax link and because only the target panel
 refreshes, the change to the link is not applied because the actual link
 is not refreshed.  only the other panel is.  in which case i would need
 to
 append javascript.  i was hping there was a pure wicket solutioin though
 without using JS.



 igor.vaynberg wrote:

 final ListItem item

 -igor

 On Fri, Feb 13, 2009 at 7:36 AM, moontz bmun...@yahoo.com wrote:

 I would like to add an attribute to the ListItem element in the markup
 (basically change the class style) on click of the link.  Below is my
 snippet.  Any insight on how I can 

Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread Cemal Bayramoglu
   if(currentSelection != null){
   // you should remove existing behaviours on
   // currentSelection here or,
   // use an AtrributeModifier added, just once, to all your
   // labels with a model that has logic
   // checking against currentSelection to
   // calculate the correct value for your style attribute
   currentSelection.add(new SimpleAttributeModifier(style, ));
   target.addComponent(currentSelection);
   }
   currentSelection = contacteLabel;

On 11 March 2010 22:50, Cemal Bayramoglu jweekend_for...@cabouge.com wrote:
 Prati,

 I'm not sure what you mean.
 Here's a couple of lines of code implementing what I described:

    if(currentSelection != null){
        // you should remove existing behaviours on
        // currentSelection here or,
        // use an AtrributeModifier added, just once, to all your
        // labels with a model that has logic
        // checking against currentSelection to
        // calculate the correct value for your style attribute
        currentSelection.add(new SimpleAttributeModifier(style, ));
        target.addComponent(
    }
    currentSelection = contacteLabel;

 Just declare Component currentSelection; in your RefreshingView.

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


 On 11 March 2010 21:44, prati pratibha.pari...@gmail.com wrote:

 Hi Cemal,

 Thanks for replying me,but the list gets rendered only once,and i am able to
 capture previous value on click but then how to move further.


 Regards
 P

 jWeekend wrote:

 Prati,

 This is because you are only re-rendering the most recently selected
 label.

 One solution is keep track of the previous current selection
 (probably in your RefreshingView implementation - eg declare
 Component currentSelection;), which you update in your Link's
 onClick (ie currentSelecton = contactLabel;) _after_ you remove the
 style attribute (that you previously set) on currentSelection and add
 currrentSelection to the AjaxRequestTarget so it too gets refreshed.

 Make sense?

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

 On 11 March 2010 18:09, prati pratibha.pari...@gmail.com wrote:

 Hi

 I have got a refreshing view ,it contains list of links.I need to
 highlight
 the link when i click on that link.

 It works properly but if i click the next item in the list,the previous
 text
 remains highlighted.

 wicket:extend

 table cellspacing=0 class=dataview
    tr

        thFirst Name/th

    /tr
    tr wicket:id=view
        td #     /td

    /tr
 /table

 /wicket:extend



 public class RefreshingPage extends BasePage {


        public RefreshingPage()
        {
                final ListIModel contacts = new ArrayListIModel(10);

                // populate list of contacts to be displayed

                IteratorContact it = rgetContacts().iterator();
                while (it.hasNext())
                {
                        contacts.add(new Model(it.next()));
                }

                // create the refreshing view
                RefreshingView view = new RefreshingView(view)
                {
                        /**
                         * Return an iterator over models for items in the
 view
                         */
                       �...@override
                        protected IteratorIModel getItemModels()
                        {
                                return contacts.iterator();
                        }

                       �...@override
                        protected void populateItem(final Item item)
                        {
                                Contact contact = (Contact)
 item.getModelObject();

                                final Label contacteLabel = new
 Label(aname,contact.getName());
                                contacteLabel.setOutputMarkupId(true);

                                item.add(new AjaxLink(name) {

                                        private static final long
 serialVersionUID = 1L;

                                       �...@override
                                        public void
 onClick(AjaxRequestTarget target) {

                                                if(target!= null) {

  contacteLabel.add(new

  AttributeModifier(style, true, new AbstractReadOnlyModel() {

     �...@override

      public String getObject() {

              return background-color:#80b6ed;;

      }

  }));

  target.addComponent(contacteLabel);
                                                }

                                        }



                                }.add(contacteLabel));
                        }
                };

                add(view);


        }
 }


 Regards
 P


 moontz wrote:

 i tried that before.  did not work.  no compile or runtime errors, but
 the
 source did not show the change.

 im thinking, since its an ajax link 

Re: Re: Don't increment the Session.pageIdCounter for stateless pages?

2010-03-11 Thread Igor Vaynberg
patches are always welcome.

-igor

On Thu, Mar 11, 2010 at 1:23 PM,  martin.grot...@javakaffee.de wrote:
 From my basic understanding I'd say that for stateless pages nothing should 
 depend on the pageId. What do you think about incrementing the pageId when 
 it's first accessed? I'd like to create a patch for it to see if this works.

 Cheers,
 Martin

 -- Urspr. Mitt. --
 Betreff: Re: Don't increment the Session.pageIdCounter for stateless pages?
 Von: Igor Vaynberg igor.vaynb...@gmail.com
 Datum: 10.03.2010 17:50

 i think we can do this in 1.5

 i would rather not mess with 1.4 because i think there is a lot of
 code there that depends on the fact that the id is available right
 away.

 please create a jira issue for this

 -igor

 On Mon, Mar 8, 2010 at 4:30 PM, Martin Grotzke
 martin.grot...@javakaffee.de wrote:
 Hi,

 the Page.init(PageMap) invokes setNextAvailableId(), which invokes
 getSession().nextPageId() if isPageIdUniquePerSession is set.

 getSession().nextPageId() modifies the Session.pageIdCounter.

 When I have a session and afterwards access a stateless page, the
 Session.pageIdCounter is the only data that is changed in the session
 AFAICS, everything else is the same as in the request before.

 Is it possible _not_ to modify the Session.pageIdCounter if the page is
 really stateless (or just don't invoke Page.setNextAvailableId())?

 I'm interested in this, as I'm just implementing a feature for the
 memcached-session-manager ([1], memcached based session replication),
 which checks if session data has changed and replicates sessions only if
 this is provided. If session data did not change, the replication is
 omitted. Therefore, if the Session.pageIdCounter would be left unchanged
 for stateless pages, this would allow to make use of this feature in
 wicket apps.

 Thanx  cheers,
 Martin


 [1] http://code.google.com/p/memcached-session-manager/




 -
 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



IE trouble with WebClientInfo

2010-03-11 Thread tubin gen
here is the little code I use to check the browser java script is enbled.

WebClientInfo clientInfo =
(WebClientInfo)WebRequestCycle.get().getClientInfo();
if(!clientInfo.getProperties().isJavaEnabled()){
throw new RestartResponseAtInterceptPageException(WrongBrowserPage.class);
}



but IE is displaying this page


IE displays this message




The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then
click the Refresh javascript:location.reload() button, or try again later.
--

System error: -2146697204. Error processing resource '
http://www.w3.org/TR/html4/loose.dtd'.







I debugged   wicket code

here is the last method which throws exception this is from RequestCycle

@Override
protected ClientInfo newClientInfo()
{
if
(getApplication().getRequestCycleSettings().getGatherExtendedBrowserInfo())
{
Session session = getSession();
if (session.getMetaData(BROWSER_WAS_POLLED_KEY) == null)
{
// we haven't done the redirect yet; record that we will be
// doing that now and redirect
session.setMetaData(BROWSER_WAS_POLLED_KEY, Boolean.TRUE);
String url = / + getRequest().getURL();
throw new RestartResponseException(newBrowserInfoPage(url));
}
// if we get here, the redirect already has been done; clear
// the meta data entry; we don't need it any longer is the client
// info object will be cached too
session.setMetaData(BROWSER_WAS_POLLED_KEY, (Boolean)null);
}
return new WebClientInfo(this);
}


the url created here is
/app/?x=rC*Km3UdNNYSL8EdgnhrYQuMa2JQIeVhAdBuIHf1Nft-iJbh5IpH87wT5Qs97mQUAaRJ63IeKnk
   (is this right or missing anything?)


LDM, Forms, and Ajax

2010-03-11 Thread Matthew Welch
I'm experimenting with a domain model that extremely interconnected. It's
being persisted using a graph database which handles this high degree of
interconnectivity with aplomb, however because my each of my domain objects
is so tighly tied to the others, I have to be very careful to always use
LoadableDetachableModels or I can easily end up serializing quite a bit of
unintended data with the page.

So far, this hasn't been too bad. In the past, I never used LDMs for forms,
and I ran into a few initial issues at first, but they were mostly just me
relearning some of my former habits. However, I have no run into an a corner
case that I'm hoping someone with more knowledge of Wicket or a good
creative stream might be able to help me figure out.

I have a form backed by a LDM. Three of the fields (select fields) are
cascading in the sense that I need to fill out one before the second is
enabled and the options for the second are determined by the first. The
cascade continues from the second to the third. I attached a
AjaxFormComponentUpdatingBehavior tied to the onblur event for the first
and second fields. I used this update the second and third fields when
appropriate. This seemed to work fine, but then suddenly I ran into problems
with the fields reverting back to the values they held before I modified
them. I'm embarrassed to admin that I was stumped by this for a good thirty
minutes until I remembered that this was all backed by a LDM. Obviously,
when the ajax request would hit the server, the model would be reloaded from
the back end with it's original values.

I'm a bit stuck. I can make the form a little less fancy and not limit the
items in the second and third fields from the value in the first and second
respectively, but I'd prefer not to have to do that. Any ideas?

Matt


Re: LDM, Forms, and Ajax

2010-03-11 Thread Jeremy Thomerson
Have you tried AjaxFormComponentUpdatingBehavior?

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



On Thu, Mar 11, 2010 at 8:47 PM, Matthew Welch matt...@welchkin.net wrote:

 I'm experimenting with a domain model that extremely interconnected. It's
 being persisted using a graph database which handles this high degree of
 interconnectivity with aplomb, however because my each of my domain objects
 is so tighly tied to the others, I have to be very careful to always use
 LoadableDetachableModels or I can easily end up serializing quite a bit of
 unintended data with the page.

 So far, this hasn't been too bad. In the past, I never used LDMs for forms,
 and I ran into a few initial issues at first, but they were mostly just me
 relearning some of my former habits. However, I have no run into an a
 corner
 case that I'm hoping someone with more knowledge of Wicket or a good
 creative stream might be able to help me figure out.

 I have a form backed by a LDM. Three of the fields (select fields) are
 cascading in the sense that I need to fill out one before the second is
 enabled and the options for the second are determined by the first. The
 cascade continues from the second to the third. I attached a
 AjaxFormComponentUpdatingBehavior tied to the onblur event for the first
 and second fields. I used this update the second and third fields when
 appropriate. This seemed to work fine, but then suddenly I ran into
 problems
 with the fields reverting back to the values they held before I modified
 them. I'm embarrassed to admin that I was stumped by this for a good thirty
 minutes until I remembered that this was all backed by a LDM. Obviously,
 when the ajax request would hit the server, the model would be reloaded
 from
 the back end with it's original values.

 I'm a bit stuck. I can make the form a little less fancy and not limit the
 items in the second and third fields from the value in the first and second
 respectively, but I'd prefer not to have to do that. Any ideas?

 Matt



FormTester - submitting more than once

2010-03-11 Thread Tony Wu
I'm trying to write a unit test for a form. I have a form with 2 submit
buttons. The 1st submit button is an AjaxSubmitButton which allows the user
to enter a ID, that then shows all the products associated with that ID (it
requires validators to run which is why it's a submit button). The 2nd
submit button will validate the entire form and checkout. However, I can't
do this unit test in Wicket because a FormTester can only submit once. I
can't resetup the FormTester data because the 2nd submit button (checkout)
requires a state that the 1st submit button sets.

How can I make my unit test work?

Thanks,
Tony