Great tip, thanks! After implementing, I see that the behavior is added to
the text field correctly, but the renderHead() method is not being called,
can you help me understand why that is?
jwcarman wrote:
On 3/9/08, James Carman ja...@carmanconsulting.com wrote:
On 3/9/08, Warren
Hi!
Did you implement the IHeaderContributor and mark @Override?
2009/12/28 duncan787 duncan...@gmail.com:
Great tip, thanks! After implementing, I see that the behavior is added to
the text field correctly, but the renderHead() method is not being called,
can you help me understand why
Thank you MartinM. Your question caused me to question the other methods I
was overriding from the super...after removing those unnecessary overridden
methods, its working like a charm.
Thank you!
MartinM wrote:
Hi!
Did you implement the IHeaderContributor and mark @Override?
Jonathan,
Have you considered O'Reilly's Cookbook series? I've done some tech
review for them over the years, though not recently. E-mail me
directly if you'd like a potentially dated contact. :)
Scott
On Sun, Dec 28, 2008 at 9:26 AM, Jonathan Locke
jonathan.lo...@gmail.com wrote:
I have
I have a really elegant solution to this problem that is general enough to
go in core or extensions eventually (solves all of the above problems).
Actually, I'm putting together a short, but action-packed book called
Twenty-Six Wicket Tricks and the code for this problem is going to be
trick F
Why not put this code into Wicket?
jwcarman wrote:
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
I suggest wiki.
Done:
http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component
I'm happy now. My work (no matter how trivial) may help
Hi,
I'm trying to set the 'focus on load' to an AutoCompleteTextField within
a form.
I tried extending the technique outlined by James Carman (see link) to
extend AbstractDefaultAjaxBehavior, without success.
Any thoughts on how to do this ?
Thanks,
Rod.
)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at java.lang.Thread.run(Thread.java:619)
-Original Message-
From: Rod Good
Sent: Friday, 13 June 2008 1:06 PM
To: users@wicket.apache.org
Subject: Re: Default Focus Behavior?
Hi,
I'm trying to set the 'focus
This helped me. Thanks, jwcarman!
-Doug
jwcarman wrote:
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
I suggest wiki.
Done:
http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component
I'm happy now. My work (no matter how trivial) may
Glad to hear it! If you are using it to highlight/focus on errors and
you have the time, update the wiki with a little example since I never
got around to it. :)
On Thu, May 29, 2008 at 6:43 PM, Doug Donohoe [EMAIL PROTECTED] wrote:
This helped me. Thanks, jwcarman!
-Doug
jwcarman
We have this discussion with each major release of Wicket, and each
time there are 100 ways to skin the cat. We want not only to minimize
the surface area, but also the number of requests to alter the
behavior of existing functionality. If we implement method X, then
sure enough someone comes
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
We have this discussion with each major release of Wicket, and each
time there are 100 ways to skin the cat. We want not only to minimize
the surface area, but also the number of requests to alter the
behavior of existing functionality.
I suggest wiki.
Thanks,
Martijn
On 3/11/08, James Carman [EMAIL PROTECTED] wrote:
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
We have this discussion with each major release of Wicket, and each
time there are 100 ways to skin the cat. We want not only to minimize
the
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
I suggest wiki.
Done:
http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component
I'm happy now. My work (no matter how trivial) may help someone
someday! :) I don't have time to do so now, but I might
Another option would be (if there is enough interest) to add it to
wicketstuff minis.
Martijn
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point
and i guess that is WebPage.focusComponent()
or maybe Form (but you could have 2)
By the way we have focus support in ajax mode... see AjaxRequestTarget
johan
On Tue, Mar 11, 2008 at 12:41 PM, James
On 3/11/08, Martijn Dashorst [EMAIL PROTECTED] wrote:
Another option would be (if there is enough interest) to add it to
wicketstuff minis.
Yeah, I thought about that. And, I may try to put that in there.
Perhaps there could be a few focus behaviors in there? Perhaps even a
FocusBehaviors
Sebastiaan van Erk wrote:
Johan Compagner wrote:
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point
I agree.
and i guess that is WebPage.focusComponent()
I agree on that one too.
or maybe Form (but you could have 2)
Exactly, so not a good
Johan Compagner wrote:
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point
I agree.
and i guess that is WebPage.focusComponent()
I agree on that one too.
or maybe Form (but you could have 2)
Exactly, so not a good idea. The page should determine
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point
and i guess that is WebPage.focusComponent()
or maybe Form (but you could have 2)
By the way we have focus support in ajax mode... see
you do
WebPage.focusComponent(textField)
johan
On Tue, Mar 11, 2008 at 2:30 PM, James Carman [EMAIL PROTECTED]
wrote:
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point
and i guess that is
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
you do
WebPage.focusComponent(textField)
I mean, in what class? Your page class? In a component class? I'm
just trying to understand what the difference is between doing
WebPage.focusComponent(textField) or textField.add(new
MyPage()
{
textField1.add(new FocuOnLoadBehavior());
textField2.add(new FocuOnLoadBehavior());
textField3.add(new FocuOnLoadBehavior());
}
which fields gets the focus?
On Tue, Mar 11, 2008 at 2:49 PM, James Carman [EMAIL PROTECTED]
wrote:
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
and a behavior is really the wrong thing
Because who says if you render the page again that it has to again set the
focus on that one?
MyPage()
{
textField1.add(new FocuOnLoadBehavior());
textField2.add(new FocuOnLoadBehavior());
textField3.add(new FocuOnLoadBehavior());
Form form = new
that still wouldn't help adding 3 of them at once
On Tue, Mar 11, 2008 at 3:17 PM, Gerolf Seitz [EMAIL PROTECTED]
wrote:
the behavior would have to be temporary.
On Tue, Mar 11, 2008 at 3:14 PM, Johan Compagner [EMAIL PROTECTED]
wrote:
and a behavior is really the wrong thing
Because
On 3/11/08, Gerolf Seitz [EMAIL PROTECTED] wrote:
the behavior would have to be temporary.
Yes, the behaviors stay with the component. I guess that would screw
this up! :)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
that still wouldn't help adding 3 of them at once
Well, adding three of them like this would just be stupid. :) It
wouldn't really break anything. The last one that gets rendered would
probably get the focus, since it would be the last one
yes so it is not the last one you ask to have focus on
Very confusing for an average user
thats why there should be a single point just like
AjaxRequestTarget.focusComponent() works.
johan
On Tue, Mar 11, 2008 at 3:24 PM, James Carman [EMAIL PROTECTED]
wrote:
On 3/11/08, Johan Compagner
the behavior would have to be temporary.
On Tue, Mar 11, 2008 at 3:14 PM, Johan Compagner [EMAIL PROTECTED]
wrote:
and a behavior is really the wrong thing
Because who says if you render the page again that it has to again set the
focus on that one?
MyPage()
{
textField1.add(new
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
yes so it is not the last one you ask to have focus on
Very confusing for an average user
thats why there should be a single point just like
AjaxRequestTarget.focusComponent() works.
Ok, you've sold me. So, is this something that
how about boolean WebPage#isAutoFocusEnabled and the possibility
to provide several IFocusStrategy instances with different priority?
this would allow to eg only set the focus on the first formcomponent of the
first form if no other formcomponent has an error...
On Tue, Mar 11, 2008 at 3:36 PM,
hmm the request cycle would be quite awful its not really there for that
kind of state
The problem is that the AjaxRequestTarget is in normal rendering something
like PageRequestTarget.
The problem is you cant really through it on a Page because the page can
maybe not be accessed
(if you have a
On 3/11/08, Johan Compagner [EMAIL PROTECTED] wrote:
hmm the request cycle would be quite awful its not really there for that
kind of state
The problem is that the AjaxRequestTarget is in normal rendering something
like PageRequestTarget.
The problem is you cant really through it on a
Gerolf Seitz wrote:
how about boolean WebPage#isAutoFocusEnabled and the possibility
to provide several IFocusStrategy instances with different priority?
this would allow to eg only set the focus on the first formcomponent of the
first form if no other formcomponent has an error...
I like
What I mean is commonly used when users must enter data quickly, eg no
mouse clicks. Not sure if the use case is large enough, though..
So the following thing can happend:
When you fill a textfield to a certain length(or press enter) or choose
a radio button it automaticly passes on to the
On Sun, Mar 9, 2008 at 1:37 PM, James Carman [EMAIL PROTECTED] wrote:
On 3/9/08, djo.mos [EMAIL PROTECTED] wrote:
This simply looks great ! I think this should make it into the core Wicket
behaviors as the componenet focus is quite useful.
Me too! That's why I submitted:
Can we have a faq in the wiki enumerating all the possible scenarios and
solutions?
On Sun, Mar 9, 2008 at 11:51 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:
On Sun, Mar 9, 2008 at 1:37 PM, James Carman [EMAIL PROTECTED]
wrote:
On 3/9/08, djo.mos [EMAIL PROTECTED] wrote:
This
On 3/10/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
i dont think something like this should go into core. it seems pretty
clear from this thread that there are very many ways to do this and
each project will use their own. what you have proposed seems trivial
to construct, so for projects
WebMarkupContainer bodyTag = new WebMarkupContainer(bodyTag);
bodyTag.add(new SimpleAttributeModifier(onload,
form.username.focus();));
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of James Carman
Sent: Sunday, March 09, 2008 7:58 AM
To:
On 3/9/08, Warren [EMAIL PROTECTED] wrote:
WebMarkupContainer bodyTag = new WebMarkupContainer(bodyTag);
bodyTag.add(new SimpleAttributeModifier(onload,
form.username.focus();));
Ok, but wouldn't it be cooler/easier/more java-oriented to do:
TextField userName = new TextField(userName);
On 3/9/08, James Carman [EMAIL PROTECTED] wrote:
On 3/9/08, Warren [EMAIL PROTECTED] wrote:
WebMarkupContainer bodyTag = new WebMarkupContainer(bodyTag);
bodyTag.add(new SimpleAttributeModifier(onload,
form.username.focus();));
Ok, but wouldn't it be cooler/easier/more java-oriented
true..!
You could add it to wicket input events , if it fits..
regards Nino
James Carman wrote:
On 3/9/08, Warren [EMAIL PROTECTED] wrote:
WebMarkupContainer bodyTag = new WebMarkupContainer(bodyTag);
bodyTag.add(new SimpleAttributeModifier(onload,
form.username.focus();));
Ok,
What about a chaining component?
EG you enter something in form.field a, and when thats filled then it
jumps to form field b..? Etc...
regards Nino
James Carman wrote:
On 3/9/08, Warren [EMAIL PROTECTED] wrote:
WebMarkupContainer bodyTag = new WebMarkupContainer(bodyTag);
PROTECTED] Behalf Of James Carman
Sent: Sunday, March 09, 2008 8:52 AM
To: users@wicket.apache.org
Subject: Re: Default Focus Behavior?
On 3/9/08, James Carman [EMAIL PROTECTED] wrote:
On 3/9/08, Warren [EMAIL PROTECTED] wrote:
WebMarkupContainer bodyTag = new WebMarkupContainer(bodyTag
jwcarman wrote:
How about something like:
public class DefaultFocusBehavior extends AbstractBehavior
{
private Component component;
public void bind( Component component )
{
this.component = component;
component.setOutputMarkupId(true);
}
-1 for letting components handle focus. There's only _one_ focus that
can set on a page at a time. What if several components demand focus?
Who will be the winner?
Also, not every WebComponent can receive focus (Label, Image, ...) but
only FormComponents (input, select, button, ...)
I
On 3/9/08, Peter Ertl [EMAIL PROTECTED] wrote:
-1 for letting components handle focus. There's only _one_ focus that
can set on a page at a time. What if several components demand focus?
Who will be the winner?
Well, the last one that requests it will win because it will be the
last
I don't think I understand what you mean here. Do you mean something
like setting the tab order like in Swing?
On 3/9/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote:
What about a chaining component?
EG you enter something in form.field a, and when thats filled then it
On 3/9/08, djo.mos [EMAIL PROTECTED] wrote:
This simply looks great ! I think this should make it into the core Wicket
behaviors as the componenet focus is quite useful.
Me too! That's why I submitted:
https://issues.apache.org/jira/browse/WICKET-1404
I was pretty surprised something
I think he means that, suppose you have a username and password field;
then if the username is already filled in (e.g. from a cookie), then
focus should go to the next field (password field).
It probably should be the same as the tab order (first empty field in
tab order gets focus) from a ui
On 3/9/08, Sebastiaan van Erk [EMAIL PROTECTED] wrote:
I think he means that, suppose you have a username and password field;
then if the username is already filled in (e.g. from a cookie), then
focus should go to the next field (password field).
Well, since you set up the behavior in your
I need to write a function that involves many components. It would be nice
to add a behavior to a form, like you have with a TextField, that would
construct a function that included all of the relevant components of that
form. The function I need to write looks like this:
function keyPressed()
{
Because currently there is no way during ajax processing to determine
that the event was a focus related one. I think that it's good to
restore focus on last focused element by default. But I'm also aware
that it causes problems with focus related event, so i think maybe we
should just call
behavior if the event is onblur. Can you submit RFE?
Done. I filed it as minor improvement
https://issues.apache.org/jira/browse/WICKET-957.
Because currently there is no way during ajax processing to determine
that the event was a focus related one. I think that it's good to
Maybe setting
see my comments in that issue.
Its not that we have to do something on the serverside this is a clientside
issue.
johan
On 9/11/07, Carlos Pita [EMAIL PROTECTED] wrote:
behavior if the event is onblur. Can you submit RFE?
Done. I filed it as minor improvement
Dunno. Up till now my workaround is to set focusComponent to null at
the server-side for validation purposes. I'm not suggesting that this
should be wicket's approach or something similar, of course.
Regards,
Carlos
On 9/11/07, Johan Compagner [EMAIL PROTECTED] wrote:
see my comments in that
56 matches
Mail list logo