Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Erik van Oosten
  You will not be able to see the difference between optimalization...
  String.equals() does exactly that, it test for length

Aha! This is new for me. The last time I checked (Java 1.3) there were 
are least 2 instanceof operators in the implementation of 
String.equals(String) and no length checking.
I just checked the Java 5 implementation. It looks a lot better, but 
there is still 1 instanceof operator.

Anyway, another myth busted.

 Erik.


Johan Compagner schreef:
 You will not be able to see the difference between optimalization...
 String.equals() does exactly that, it test for length

 and where we just do this .equals(value) without testing for null
 i will not rewrite those by first testing null to be able to call for 
 length.


 On 9/21/06, *Erik van Oosten* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 If this gets accepted, may I humbly suggest to replace

   value != null  !.equals(value)

 with

   value != null  value.length() != 0

 The latter performs considerably faster (though it is of course
 still a
 micro optimization).

 Regards,
  Erik.


 --
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.com/


 Manuel Barzi schreef:
  Ok, Igor, I already solved this issue by re-implementing Link
 class in
  my custom LinkButton class, just adding the following snippet
  extracted from Button class, and added to the original
  onComponentTag Link in this new LinkButton class:
 
  ---
  // Default handling for tag
super.onComponentTag(tag);
 
// manuelbarzi {
// setting the value property to the tag
try {
String value = getModelObjectAsString();
if (value != null  !.equals(value)) {
tag.put(value, value);
}
} catch (Exception e) {
// ignore.
}
// }
 
// Set href to link to this link's linkClicked method
  ---
 
  It works fine now. May this simple addition be interesting for other
  people needing this functionality, you'll judge according to
  statistics...
 
  Thank you and regards,
 
  Manu
 

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
 share your
 opinions on IT  business topics through brief surveys -- and earn
 cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Manuel Barzi
 and where we just do this .equals(value) without testing for null
 i will not rewrite those by first testing null to be able to call for
 length.

This is wrong, we never said so. Just meant switching from
[nullability-check]  !.equals(value) to [nullability-check] 
value.length() != 0... ONLY THOSE DUETS!

Re-read it, you will see.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Erik van Oosten
He is just saying he doesn't want to rewrite the cases that do not have 
a null check.

Please re-read yourself ;)

Manuel Barzi schreef:
 and where we just do this .equals(value) without testing for null
 i will not rewrite those by first testing null to be able to call for
 length.
 

 This is wrong, we never said so. Just meant switching from
 [nullability-check]  !.equals(value) to [nullability-check] 
 value.length() != 0... ONLY THOSE DUETS!

 Re-read it, you will see.
   

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Manuel Barzi
 He is just saying he doesn't want to rewrite the cases that do not have
 a null check.

Very weill, but the question is: whoever promoted that idea? Seems to
be auto-promoted and auto-rejected... ;)

Anyway, have a nice day!

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Erik van Oosten
Indeed 8)
I should probably be denied write-access to this list for at least a 
week. None of my e-mails seem to hit the mark at the moment.

Erik.

Manuel Barzi schreef:
 He is just saying he doesn't want to rewrite the cases that do not have
 a null check.
 

 Very weill, but the question is: whoever promoted that idea? Seems to
 be auto-promoted and auto-rejected... ;)

 Anyway, have a nice day!
   
-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Gwyn Evans
There's also wicket.util.string.Strings#isEmpty
(http://wicket.sourceforge.net/apidocs/wicket/util/string/Strings.html#isEmpty(java.lang.CharSequence)
to consider...

/Gwyn

On 22/09/06, Erik van Oosten [EMAIL PROTECTED] wrote:
 Indeed 8)
 I should probably be denied write-access to this list for at least a
 week. None of my e-mails seem to hit the mark at the moment.

 Erik.

 Manuel Barzi schreef:
  He is just saying he doesn't want to rewrite the cases that do not have
  a null check.
 
 
  Very weill, but the question is: whoever promoted that idea? Seems to
  be auto-promoted and auto-rejected... ;)
 
  Anyway, have a nice day!
 
 --
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.com/


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-- 
Download Wicket 1.2.2 now! - http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Manuel Barzi
 There's also wicket.util.string.Strings#isEmpty
 (http://wicket.sourceforge.net/apidocs/wicket/util/string/Strings.html#isEmpty(java.lang.CharSequence)
 to consider...

Just FYI, what people from Apache does (matching Erik's optimization
proposal ;)... I guess wicket does the same.

[org.apache.commons.lang.StringUtils]

// Empty checks
//---
/**
 * pChecks if a String is empty () or null./p
 *
 * pre
 * StringUtils.isEmpty(null)  = true
 * StringUtils.isEmpty()= true
 * StringUtils.isEmpty( )   = false
 * StringUtils.isEmpty(bob) = false
 * StringUtils.isEmpty(  bob  ) = false
 * /pre
 *
 * pNOTE: This method changed in Lang version 2.0.
 * It no longer trims the String.
 * That functionality is available in isBlank()./p
 *
 * @param str  the String to check, may be null
 * @return codetrue/code if the String is empty or null
 */
public static boolean isEmpty(String str) {
return (str == null || str.length() == 0);
}

(http://www.koders.com/java/fidB29436EC634995BA0A41C5DC97C3F97F549D54B9.aspx?s=apache+%22StringUtils%22)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Johan Compagner
i just checked an 1.3 String implementation and there the same thing was doneAs far as i know they have to do that. How else would you test for equals for a string?You have to walk the chars on both sides comparing it. So if you don't test
first for lenght the length can be different and if you walk then over the 2 char arrays you willget and arrayindexoutofbounds exception.. So i can't imaging an other implementation then that.an instanceof check is pretty fast. I never have been able to get that popped up in a profiler.
(and that is also directly the null check that you need)you can read some more here:
http://www.google.com/url?sa=tct=rescd=2url=""
johanOn 9/22/06, Erik van Oosten [EMAIL PROTECTED] wrote:
  You will not be able to see the difference between optimalization...  String.equals() does exactly that, it test for lengthAha! This is new for me. The last time I checked (Java 1.3) there wereare least 2 instanceof operators in the implementation of
String.equals(String) and no length checking.I just checked the Java 5 implementation. It looks a lot better, butthere is still 1 instanceof operator.Anyway, another myth busted. Erik.
Johan Compagner schreef: You will not be able to see the difference between optimalization... String.equals() does exactly that, it test for length and where we just do this .equals(value) without testing for null
 i will not rewrite those by first testing null to be able to call for length. On 9/21/06, *Erik van Oosten* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote: If this gets accepted, may I humbly suggest to replace value != null  !.equals(value)
 with value != null  value.length() != 0 The latter performs considerably faster (though it is of course still a micro optimization).
 Regards,Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/
 Manuel Barzi schreef:  Ok, Igor, I already solved this issue by re-implementing Link class in  my custom LinkButton class, just adding the following snippet
  extracted from Button class, and added to the original  onComponentTag Link in this new LinkButton class:   ---  // Default handling for tag
  super.onComponentTag(tag);   // manuelbarzi {  // setting the value property to the tag  try {
  String value = getModelObjectAsString();  if (value != null  !.equals(value)) {  
tag.put(value, value);  }  } catch (Exception e) {  // ignore.  }  // }
   // Set href to link to this link's linkClicked method  ---   It works fine now. May this simple addition be interesting for other
  people needing this functionality, you'll judge according to  statistics...   Thank you and regards,   Manu 
 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to
 share your opinions on IT  business topics through brief surveys -- and earn cash 
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
  - Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT  business topics through brief surveys -- and earn cash 
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV  ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
--Erik van Oostenhttp://www.day-to-day-stuff.blogspot.com/-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Johan Compagner
almost: public static boolean isEmpty(final CharSequence string) {  return string == null || string.length() == 0 || string.toString().trim().equals(); }so we could also do this:
 public static boolean isEmpty(final CharSequence string) {  return string == null || string.length() == 0 || string.toString().trim().length() == 0; }I am not against these changes or what ever, i am just pointing out that you will not notice these changes in real live. 
I was just reacting to the bug report that there was a 'huge' gain to be made by this change. johanOn 9/22/06, Manuel Barzi 
[EMAIL PROTECTED] wrote: There's also wicket.util.string.Strings#isEmpty
 (http://wicket.sourceforge.net/apidocs/wicket/util/string/Strings.html#isEmpty(java.lang.CharSequence)
 to consider...Just FYI, what people from Apache does (matching Erik's optimizationproposal ;)... I guess wicket does the same.[org.apache.commons.lang.StringUtils]// Empty checks
//---/** * pChecks if a String is empty () or null./p * * pre * StringUtils.isEmpty
(null)= true * StringUtils.isEmpty()= true * StringUtils.isEmpty( ) = false * StringUtils.isEmpty(bob) = false * StringUtils.isEmpty
(bob) = false * /pre * * pNOTE: This method changed in Lang version 2.0. * It no longer trims the String. * That functionality is available in isBlank()./p
 * * @param strthe String to check, may be null * @return codetrue/code if the String is empty or null */public static boolean isEmpty(String str) {return (str == null || 
str.length() == 0);}(http://www.koders.com/java/fidB29436EC634995BA0A41C5DC97C3F97F549D54B9.aspx?s=apache+%22StringUtils%22
)-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Manuel Barzi
Sirs... WicketUsersMailingListStackOverflowException: discussion has
branched interesting, but to the infinite ;)

 i just checked an 1.3 String implementation and there the same thing was
 ...
 ...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Johan Compagner
what can i say :) i like performance discussions.. :)Yourkit is running constantly on all my java programs that i run/debug on my laptop..On 9/22/06, Manuel Barzi
 [EMAIL PROTECTED] wrote:Sirs... WicketUsersMailingListStackOverflowException: discussion has
branched interesting, but to the infinite ;) i just checked an 1.3 String implementation and there the same thing was ... ...-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Manuel Barzi
 what can i say :) i like performance discussions.. :)

:) That's fine, at the end it's very nutritive...

 Yourkit is running constantly on all my java programs that i run/debug on my
 laptop..

Good! should try it...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Igor Vaynberg
lol, if there is one thing i learned from working on wicket it is that if you are going to discuss optimizations with johan you have to bring your a-game-IgorOn 9/22/06, 
Johan Compagner [EMAIL PROTECTED] wrote:
what can i say :) i like performance discussions.. :)Yourkit is running constantly on all my java programs that i run/debug on my laptop..
On 9/22/06, Manuel Barzi
 [EMAIL PROTECTED] wrote:
Sirs... WicketUsersMailingListStackOverflowException: discussion has
branched interesting, but to the infinite ;) i just checked an 1.3 String implementation and there the same thing was ... ...-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-22 Thread Manuel Barzi
;) ha! never give up...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
Hi, Igor

 what do you mean act as a link when clicked? a button submits the form -
 that is its purpose. if you dont want it to submit the form then instead of
 using type=submit use type=button and dont use Button but a
 webmarkupcontainer that sets the onclick attr to whatever you want.

Yes, I've already tried it. In fact, before adding I18N I was using
Link class attached to INPUT to fill onclick, as described
following:

[java]
add(new Link(MainMenuPage-link-1) {
public void onClick() {
setResponsePage(new CaocAdminPage());
}
});
[html]
input name=nou wicket:id=MainMenuPage-link-1
class=buttonEditar type=button

And the resulting output when processed by wicket, is:

[html-output]
input type=button wicket:id=MainMenuPage-link-1
class=buttonEditar
onclick=location.href='/nt/ntapplication?wicket:interface=:1:MainMenuPage-link-1::ILinkListener';
name=nou

So, this accomplishes what we need in respect to linking
(navigation), making a button html element to act as a link. But,
the obstacle comes when trying to add I18N to this buttoned-link...
watching Wicket API I found Button class as a good choice to provide
I18N to the INPUT-type=button, and also to add the act as a link
capability. But, as you confirmed to me, Button class is not the
correct solution.

Then you recommend me to use other WebMarkupContainer based class...
ok, that's still glass while not finding the right component...

What WebMarkupContainer does accomplish this functionality I am looking for?

Thank you.

Regards,

Manu

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
Note that I am using the INPUT(type=button) / BUTTON html element as a
standalone component, not inside a form...

Wait for your answer... hope to come soon. Thanks.

On 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
 Hi, Igor

  what do you mean act as a link when clicked? a button submits the form -
  that is its purpose. if you dont want it to submit the form then instead of
  using type=submit use type=button and dont use Button but a
  webmarkupcontainer that sets the onclick attr to whatever you want.

 Yes, I've already tried it. In fact, before adding I18N I was using
 Link class attached to INPUT to fill onclick, as described
 following:

 [java]
 add(new Link(MainMenuPage-link-1) {
 public void onClick() {
 setResponsePage(new CaocAdminPage());
 }
 });
 [html]
 input name=nou wicket:id=MainMenuPage-link-1
 class=buttonEditar type=button

 And the resulting output when processed by wicket, is:

 [html-output]
 input type=button wicket:id=MainMenuPage-link-1
 class=buttonEditar
 onclick=location.href='/nt/ntapplication?wicket:interface=:1:MainMenuPage-link-1::ILinkListener';
 name=nou

 So, this accomplishes what we need in respect to linking
 (navigation), making a button html element to act as a link. But,
 the obstacle comes when trying to add I18N to this buttoned-link...
 watching Wicket API I found Button class as a good choice to provide
 I18N to the INPUT-type=button, and also to add the act as a link
 capability. But, as you confirmed to me, Button class is not the
 correct solution.

 Then you recommend me to use other WebMarkupContainer based class...
 ok, that's still glass while not finding the right component...

 What WebMarkupContainer does accomplish this functionality I am looking for?

 Thank you.

 Regards,

 Manu


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
Ok, Igor, I already solved this issue by re-implementing Link class in
my custom LinkButton class, just adding the following snippet
extracted from Button class, and added to the original
onComponentTag Link in this new LinkButton class:

---
// Default handling for tag
super.onComponentTag(tag);

// manuelbarzi {
// setting the value property to the tag
try {
String value = getModelObjectAsString();
if (value != null  !.equals(value)) {
tag.put(value, value);
}
} catch (Exception e) {
// ignore.
}
// }

// Set href to link to this link's linkClicked method
---

It works fine now. May this simple addition be interesting for other
people needing this functionality, you'll judge according to
statistics...

Thank you and regards,

Manu

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Erik van Oosten
If this gets accepted, may I humbly suggest to replace

  value != null  !.equals(value)

with

  value != null  value.length() != 0

The latter performs considerably faster (though it is of course still a 
micro optimization).

Regards,
 Erik.


-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


Manuel Barzi schreef:
 Ok, Igor, I already solved this issue by re-implementing Link class in
 my custom LinkButton class, just adding the following snippet
 extracted from Button class, and added to the original
 onComponentTag Link in this new LinkButton class:

 ---
 // Default handling for tag
   super.onComponentTag(tag);

   // manuelbarzi {
   // setting the value property to the tag
   try {
   String value = getModelObjectAsString();
   if (value != null  !.equals(value)) {
   tag.put(value, value);
   }
   } catch (Exception e) {
   // ignore.
   }
   // }

   // Set href to link to this link's linkClicked method
 ---

 It works fine now. May this simple addition be interesting for other
 people needing this functionality, you'll judge according to
 statistics...

 Thank you and regards,

 Manu
   

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Frank Bille
On 9/21/06, Erik van Oosten [EMAIL PROTECTED] wrote:
If this gets accepted, may I humbly suggest to replacevalue != null  !.equals(value)withvalue != null  value.length() != 0The latter performs considerably faster (though it is of course still a
micro optimization).You are welcome to submit a patch :)Frank
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
Hi, Erik,

 If this gets accepted, may I humbly suggest to replace
   value != null  !.equals(value)
 with
   value != null  value.length() != 0
 The latter performs considerably faster (though it is of course still a
 micro optimization).

You're right... already updated! Thanks.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
Hi, Frank,

 You are welcome to submit a patch :)

Yeah, why not... should I enroll wicket-devel to submit this patch,
you tell me...

Thanks.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Frank Bille
Sry I was talking to Erik that if he's got a better way to do such checks in Wicket. Since I haven't been following this discussion I can't really say if what your doing is something that can be used :) Frank
On 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
Hi, Frank, You are welcome to submit a patch :)Yeah, why not... should I enroll wicket-devel to submit this patch,you tell me...Thanks.-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
I know, I know, you were addressing to Erik... just told you as I have
the hot-code here updated...

On 9/21/06, Frank Bille [EMAIL PROTECTED] wrote:
 Sry I was talking to Erik that if he's got a better way to do such checks in
 Wicket.

 Since I haven't been following this discussion I can't really say if what
 your doing is something that can be used :)

 Frank


 On 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
 
  Hi, Frank,
 
   You are welcome to submit a patch :)
 
  Yeah, why not... should I enroll wicket-devel to submit this patch,
  you tell me...
 
  Thanks.
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
  opinions on IT  business topics through brief surveys -- and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
(Btw, SRY is the s---e---x determining Y chromosome... meaning that :?)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Frank Bille
Sry again. Please submit patch if you have the time. We use sourceforge's bugtracker:https://sourceforge.net/tracker/?group_id=119783atid=684975
FrankOn 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
I know, I know, you were addressing to Erik... just told you as I havethe hot-code here updated...On 9/21/06, Frank Bille [EMAIL PROTECTED] wrote: Sry I was talking to Erik that if he's got a better way to do such checks in
 Wicket. Since I haven't been following this discussion I can't really say if what your doing is something that can be used :) Frank On 9/21/06, Manuel Barzi 
[EMAIL PROTECTED] wrote:   Hi, Frank,You are welcome to submit a patch :)   Yeah, why not... should I enroll wicket-devel to submit this patch,
  you tell me...   Thanks.   -  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share your  opinions on IT  business topics through brief surveys -- and earn cash  
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV  ___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user  -
 Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Erik van Oosten
LOL

I'll refrain from sending trivial changes to the wicket list in the 
future :)

 Erik.


-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Frank Bille
and I stop talking to people when my head is not clear... :SFrankOn 9/21/06, Erik van Oosten [EMAIL PROTECTED]
 wrote:LOLI'll refrain from sending trivial changes to the wicket list in the
future :) Erik.--Erik van Oostenhttp://www.day-to-day-stuff.blogspot.com/-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
:) so trivial? then, let it be...

I guess with a global search  replace tool, you may
micro-optimize likely a lot of portions of code containing that
non-optimized comparison...

(will try, nevertheless, to submit that patch...)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Erik van Oosten
Very true. BTW this sounds like a PMD rule :)

Still, they will be micro optimizations, only noticeable when they occur 
in a long loop.
Usually its good architecture that will give you real performance gains. 
(This is why I love Wicket!)


Manuel Barzi schreef:
 :) so trivial? then, let it be...

 I guess with a global search  replace tool, you may
 micro-optimize likely a lot of portions of code containing that
 non-optimized comparison...

 (will try, nevertheless, to submit that patch...)
   
-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
Submitted and CLOSED.
https://sourceforge.net/tracker/index.php?func=detailaid=1562907group_id=119783atid=684975

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Frank Bille
If you could do the actual change and then submit a patch for that change it will be even faster for us to handle it.FrankOn 9/21/06, Manuel Barzi
 [EMAIL PROTECTED] wrote:Submitted and CLOSED.
https://sourceforge.net/tracker/index.php?func=detailaid=1562907group_id=119783atid=684975
-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Frank Bille
And submit a patch just means attaching the patch to that bug report you have opened.FrankOn 9/21/06, Frank Bille 
[EMAIL PROTECTED] wrote:If you could do the actual change and then submit a patch for that change it will be even faster for us to handle it.
FrankOn 9/21/06, Manuel Barzi
 [EMAIL PROTECTED] wrote:
Submitted and CLOSED.
https://sourceforge.net/tracker/index.php?func=detailaid=1562907group_id=119783atid=684975
-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your

opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
 If you could do the actual change and then submit a patch for that change it
 will be even faster for us to handle it.

Done...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Manuel Barzi
 And submit a patch just means attaching the patch to that bug report you
 have opened.

Sí, chabón, ya te había entendido... ;)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Igor Vaynberg
i guess this should be the last we hear from frank-IgorOn 9/21/06, Frank Bille [EMAIL PROTECTED]
 wrote:and I stop talking to people when my head is not clear... :S
FrankOn 9/21/06, Erik van Oosten 
[EMAIL PROTECTED]
 wrote:LOLI'll refrain from sending trivial changes to the wicket list in the
future :) Erik.--Erik van Oostenhttp://www.day-to-day-stuff.blogspot.com/
-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-21 Thread Johan Compagner
You will not be able to see the difference between optimalization...String.equals() does exactly that, it test for lengthand where we just do this .equals(value) without testing for nulli will not rewrite those by first testing null to be able to call for length.
On 9/21/06, Erik van Oosten [EMAIL PROTECTED] wrote:
If this gets accepted, may I humbly suggest to replacevalue != null  !.equals(value)withvalue != null  value.length() != 0The latter performs considerably faster (though it is of course still a
micro optimization).Regards, Erik.--Erik van Oostenhttp://www.day-to-day-stuff.blogspot.com/Manuel Barzi schreef:
 Ok, Igor, I already solved this issue by re-implementing Link class in my custom LinkButton class, just adding the following snippet extracted from Button class, and added to the original onComponentTag Link in this new LinkButton class:
 --- // Default handling for tag super.onComponentTag(tag); // manuelbarzi { // setting the value property to the tag
 try { String value = getModelObjectAsString(); if (value != null  !.equals(value)) { 
tag.put(value, value); } } catch (Exception e) { // ignore. } // } // Set href to link to this link's linkClicked method
 --- It works fine now. May this simple addition be interesting for other people needing this functionality, you'll judge according to statistics... Thank you and regards,
 Manu-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-20 Thread Manuel Barzi
Hi, there,

I am working with I18N and I have an HTML INPUT that has its value
property to be updated to the current locale, but also has to react as
a link when clicking, by means of onClick property.

I do this in wicket-java-side:
--
labelModel = new StringResourceModel(CaocAdminPage-lit-8, this, null);
add(new Button(CaocAdminPage-link-1, labelModel) {
public void onSubmit() {
setResponsePage(new 
CaocMantenimentRolsCertficatsCiutadaPage());
}
});
--

And the html-side:
--
input value=Veure / Editar name=nou class=buttonEditar
wicket:id=CaocAdminPage-link-1 type=submit
--

When testing the page it shows with the correct locale, but the LINK
DOESNT WORK - onClick overriden method does not make the button to
work as link. The html-output obtained does not provide the onclick
correctly filled up by Wicket, as show here:
--
input value=Ver / Editar type=submit class=buttonEditar
wicket:id=CaocAdminPage-link-1 name=CaocAdminPage-link-1
--

I guess I should not use Button by some wicket-reason, then my question is:

to achieve this goal of providing an INPUT with I18N and onClick
(link capability), what would you recommend?

Grazie.

Manu

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] INPUT (+ value, + onClick) as Button?

2006-09-20 Thread Igor Vaynberg
On 9/20/06, Manuel Barzi [EMAIL PROTECTED] wrote:
Hi, there,I am working with I18N and I have an HTML INPUT that has its valueproperty to be updated to the current locale, but also has to react asa link when clicking, by means of onClick property.
what do you mean act as a link when clicked? a button submits the form - that is its purpose. if you dont want it to submit the form then instead of using type=submit use type=button and dont use Button but a webmarkupcontainer that sets the onclick attr to whatever you want.
-IgorI do this in wicket-java-side:--labelModel = new StringResourceModel(CaocAdminPage-lit-8, this, null);
add(new Button(CaocAdminPage-link-1, labelModel) {public void onSubmit() {setResponsePage(new CaocMantenimentRolsCertficatsCiutadaPage());
}});--And the html-side:--input value=Veure / Editar name=nou class=buttonEditarwicket:id=CaocAdminPage-link-1 type=submit
--When testing the page it shows with the correct locale, but the LINKDOESNT WORK - onClick overriden method does not make the button towork as link. The html-output obtained does not provide the onclick
correctly filled up by Wicket, as show here:--input value=Ver / Editar type=submit class=buttonEditarwicket:id=CaocAdminPage-link-1 name=CaocAdminPage-link-1
--I guess I should not use Button by some wicket-reason, then my question is:to achieve this goal of providing an INPUT with I18N and onClick(link capability), what would you recommend?
Grazie.Manu-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user