[Wicket-user] wicket pages embedded in jsps

2006-05-09 Thread Ittay Dror

i've done some work to enable embedding wicket pages in jsp pages. this is 
required by us, since we're currently using struts, and can't move all our code 
to wicket. i think it is important to enable existing projects to start using 
wicket.

the main problems in that HttpServletRequest.getPath() returns null for 
forwarded/included pages

i can submit the code if you want

--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket pages embedded in jsps

2006-05-09 Thread Juergen Donnerstag

Sure. An example is more than welcome.

Juergen

On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:

i've done some work to enable embedding wicket pages in jsp pages. this is 
required by us, since we're currently using struts, and can't move all our code 
to wicket. i think it is important to enable existing projects to start using 
wicket.

the main problems in that HttpServletRequest.getPath() returns null for 
forwarded/included pages

i can submit the code if you want

--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] component input handling (was: why is MarkupContainer.add final?)

2006-05-09 Thread Igor Vaynberg
i was just looking at that. i think we messed up a little bit there. now that getinputasarray() is public i made getinput() go through that instead of request parameters directly.-Igor
On 5/8/06, Ittay Dror [EMAIL PROTECTED] wrote:
on the off chance that not only igor is patient with this threadi noticed that there is an inconsistency (in my view) in how input is handled:there's Component.getInput()then FormComponent.inputAsStringArray
()which is used to setconvertedInput - by convert()andrawInput - by inputChanged()which are used all over the place. for example, getValue returns the rawInput if it was set and getModelValue otherwise (which, btw, uses the converter directly, rather than calling convert()). this may cause surprises.
for convertedInput, i think it should be considered a caching value. the method getConvertedInput() should check it, if it is null, it does the conversion and sets it. it then returns it. calling 'convert' explicitely from other places is not needed. whoever needs a converted input should call getConvertedInput.
i don't know about rawInput, and why it is used, so i can't comment much, but i also think it should be used as cached value. it seems odd though, that getInput is not 'raw' enough.of course inputChanged should just invalidate the caches.
ittayIttay Dror wrote: Ittay Dror wrote: Ittay Dror wrote: Igor Vaynberg wrote: and how do i validate the resulting value? in updateModel, if i
 find the combined value is not right, there's not much i can do. you mean the sum of correct pieces is not always correct itself?!? you can create a validator that performs the same aggregation and
 checks that i suppose. also, there's a convert() method in Component, what if i want it to be employed also?
 if you want the whole form workflow to be employed then go about this differently. instead of overriding updatemodel() override getInput(), aggregate all the raw inputs from all the children and
 use that to feed the aggregator. that way you get the whole workflow. yep, and also inputAsStringArray oops, cannot do that. it is final. maybe i can override getRequest...
 no, getRequest is also final. thank you for your patience ittay -Igor
--===Ittay DrorChief architect, openQRM TL,RD, Qlusters Inc.
[EMAIL PROTECTED]+972-3-6081994 Fax: +972-3-6081841http://www.openQRM.org- Keeps your Data-Center Up and Running---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

It will not be previeable any more.

Juergen

On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

why not a format like this

input type=submit value=wicket:i18n:buttons.save/

or

input type=submit value=wi18n:buttons.save/

-Igor



On 5/8/06, Andrew Berman [EMAIL PROTECTED] wrote:

 Hey Guys,

 I think adding something to support localized attributes would be a big
plus.  I know that when Wicket added wicket:message it really saved a lot of
extra Java code on my part.  I think the same thing would happen if we came
up with something to do it in attributes.  AttributeModifiers obviously
work, but when you have a lot of things you want to localize on the same
page it's a lot of extra Java code that needs to be written to support this
because you need to add the specific Component and add an AttributeModifier.

 What about a compromise?  I think the experimental stuff in
WicketMessageTagHandler is cumbersome to add to the HTML, so what if we
created a component whose sole purpose is to add attributes to some HTML
element.  Or can this already be done like this:

 Java:
 add(new WebComponent(imageAlt).add(new
AttributeModifier(alt, true, new ResourceModel(my.key;

 HTML:
 img wicket:id=imageAlt src=mySrc /

 I haven't tested if this works, but if not, maybe some kind of Component
could be created which allows something like this.  It will allow for
multiple attributes to be replaced as well.

 Thoughts?


 --Andrew



 On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED] wrote:
  On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:
   Hi Juergen,
  
please see WicketMessageTagHandler.java. It is experimental only and
disabled by default. Reason: it is realy ugly to have something like
wicket:example=tag=key. AttributeModifier are much more convinent
and far less ugly, IMO.
   if you have a page with like, say, 20 labels with static text (like
   you have sometimes in complex forms for explaining things) I don't see
   something to win by adding AttributeModifiers to the component tree. I
   see localization of static text as markup issue because there is
   almost no logic to define there. The format you described is rather
   ugly, that's right: What about:
   div wicket:message=blaLabelbla/div (if you want
to go the
   message as text between the tags)
 
  this is wicket:message
value=xxxdefault/wicket:message and
  already available.
 
   input type=submit wicket:message:value=Do something/ (for
   localizing the attribute value, probably the second : is not valid xml
   any more, but another separation char like _ or  maybe no separation
   char at all could be used)
  
 
  It is all not realy nice, isn't it? That is what we struggled with. We
  didn't find a syntax which we realy liked and which is standards
  compliant (e.g. XML namespace, schema).
 
   This would be very helpful for quick  easy localization of static
   content in pages, something that's missing at the moment from my point
   of view. Tell me what you think, if I have time I would like to
   implement this and contribute it...
  
 
  your help is very much appreciated but the syntax should be right.
 
That is default. Localizer implements a search hierarchy up the
component tree. You only need one properties files per language per
Panel which contains X number of component. Thinking ... That is not
your question, isn't it? Like Application.properties is the last
resort for all messages, you ask for one per java package, right?
So,
in addition to the my.pkg.MyPanel.properties it should look in
my/pkg/Wicket.properties as well (may be Wicket.properties is not
the
best name).
   That's what I want to do and it would be a nice feature if such a
   lookup strategy could be added by just setting an option and defining
   a name for the property file. I tried to do it quick myself but
   stopped after finding out that the property file name is quite tightly
   coupled to some class name for the moment...
  
 
  It is fairly easy to add. Please see
Settings.addStringResourceLoader,
  Application.getResourceStreamLocator and
  CompoundResourceStreamLocator.java
 
  Let me know if you need any more help
 
  Juergen
 
   Regards,
   Ralf
  
  
  
---
   Using Tomcat but need to do more? Need to support web services,
security?
   Get stuff done quickly with pre-integrated technology to make your job
easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
  
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make your job
easier
  Download IBM 

Re: [Wicket-user] Localization

2006-05-09 Thread Martijn Dashorst
This component is already there:new WebMarkupContainer(imageAlt).add(new AttributeModifier(alt, true, new Resource...):-)MartijnOn 5/9/06, 
Andrew Berman [EMAIL PROTECTED] wrote:
Hey Guys,I think adding something to support localized attributes would be a big plus. I know that when Wicket added wicket:message it really saved a lot of extra Java code on my part. I think the same thing would happen if we came up with something to do it in attributes. AttributeModifiers obviously work, but when you have a lot of things you want to localize on the same page it's a lot of extra Java code that needs to be written to support this because you need to add the specific Component and add an AttributeModifier.
What about a compromise? I think the experimental stuff in WicketMessageTagHandler is cumbersome to add to the HTML, so what if we created a component whose sole purpose is to add attributes to some HTML element. Or can this already be done like this:
Java:add(new WebComponent(imageAlt).add(new AttributeModifier(alt, true, new ResourceModel(my.key;HTML:img wicket:id=imageAlt src="" /
I haven't tested if this works, but if not, maybe some kind of Component could be created which allows something like this. It will allow for multiple attributes to be replaced as well.Thoughts?
--Andrew
On 5/4/06, Juergen Donnerstag 
[EMAIL PROTECTED] wrote:
On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote: Hi Juergen,  please see 
WicketMessageTagHandler.java. It is experimental only and  disabled by default. Reason: it is realy ugly to have something like
  wicket:example=tag=key. AttributeModifier are much more convinent  and far less ugly, IMO. if you have a page with like, say, 20 labels with static text (like you have sometimes in complex forms for explaining things) I don't see
 something to win by adding AttributeModifiers to the component tree. I see localization of static text as markup issue because there is almost no logic to define there. The format you described is rather
 ugly, that's right: What about: div wicket:message=blaLabelbla/div (if you want to go the message as text between the tags)this is wicket:message value=xxxdefault/wicket:message and
already available. input type=submit wicket:message:value=Do something/ (for localizing the attribute value, probably the second : is not valid xml any more, but another separation char like _ ormaybe no separation
 char at all could be used)It is all not realy nice, isn't it? That is what we struggled with. Wedidn't find a syntax which we realy liked and which is standardscompliant (e.g. XML namespace, schema).
 This would be very helpful for quick  easy localization of static content in pages, something that's missing at the moment from my point of view. Tell me what you think, if I have time I would like to
 implement this and contribute it...your help is very much appreciated but the syntax should be right.  That is default. Localizer implements a search hierarchy up the  component tree. You only need one properties files per language per
  Panel which contains X number of component. Thinking ... That is not  your question, isn't it? Like Application.properties is the last  resort for all messages, you ask for one per java package, right? So,
  in addition to the my.pkg.MyPanel.properties it should look in  my/pkg/Wicket.properties as well (may be Wicket.properties is not the  best name). That's what I want to do and it would be a nice feature if such a
 lookup strategy could be added by just setting an option and defining a name for the property file. I tried to do it quick myself but stopped after finding out that the property file name is quite tightly
 coupled to some class name for the moment...It is fairly easy to add. Please see Settings.addStringResourceLoader,Application.getResourceStreamLocator andCompoundResourceStreamLocator.java

Let me know if you need any more helpJuergen Regards, Ralf --- Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 

http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___ Wicket-user mailing list 

Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-- Wicket 1.2 is coming! Write Ajax applications without 

Re: [Wicket-user] Localization

2006-05-09 Thread Igor Vaynberg
why not? in a preview you would get a button with text wicket:i18n:buttons.savethats good for preview since you can see the key!-IgorOn 5/8/06, 
Juergen Donnerstag [EMAIL PROTECTED] wrote:
It will not be previeable any more.JuergenOn 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote: why not a format like this input type=submit value=wicket:i18n:
buttons.save/ or input type=submit value=wi18n:buttons.save/ -Igor On 5/8/06, Andrew Berman 
[EMAIL PROTECTED] wrote:   Hey Guys,   I think adding something to support localized attributes would be a big plus.I know that when Wicket added wicket:message it really saved a lot of
 extra Java code on my part.I think the same thing would happen if we came up with something to do it in attributes.AttributeModifiers obviously work, but when you have a lot of things you want to localize on the same
 page it's a lot of extra Java code that needs to be written to support this because you need to add the specific Component and add an AttributeModifier.   What about a compromise?I think the experimental stuff in
 WicketMessageTagHandler is cumbersome to add to the HTML, so what if we created a component whose sole purpose is to add attributes to some HTML element.Or can this already be done like this:
   Java:  add(new WebComponent(imageAlt).add(new AttributeModifier(alt, true, new ResourceModel(my.key;   HTML:  img wicket:id=imageAlt src="" /
   I haven't tested if this works, but if not, maybe some kind of Component could be created which allows something like this.It will allow for multiple attributes to be replaced as well.
   Thoughts?--Andrew On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED]
 wrote:   On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:Hi Juergen,please see 
WicketMessageTagHandler.java. It is experimental only and disabled by default. Reason: it is realy ugly to have something like wicket:example=tag=key. AttributeModifier are much more convinent
 and far less ugly, IMO.if you have a page with like, say, 20 labels with static text (likeyou have sometimes in complex forms for explaining things) I don't see
something to win by adding AttributeModifiers to the component tree. Isee localization of static text as markup issue because there isalmost no logic to define there. The format you described is rather
ugly, that's right: What about:div wicket:message=blaLabelbla/div (if you want to go themessage as text between the tags)
 this is wicket:message value=xxxdefault/wicket:message and   already available.  input type=submit wicket:message:value=Do something/ (for
localizing the attribute value, probably the second : is not valid xmlany more, but another separation char like _ ormaybe no separationchar at all could be used)
It is all not realy nice, isn't it? That is what we struggled with. We   didn't find a syntax which we realy liked and which is standards   compliant (
e.g. XML namespace, schema).  This would be very helpful for quick  easy localization of staticcontent in pages, something that's missing at the moment from my point
of view. Tell me what you think, if I have time I would like toimplement this and contribute it...your help is very much appreciated but the syntax should be right.
   That is default. Localizer implements a search hierarchy up the component tree. You only need one properties files per language per Panel which contains X number of component. Thinking ... That is not
 your question, isn't it? Like Application.properties is the last resort for all messages, you ask for one per java package, right? So, in addition to the 
my.pkg.MyPanel.properties it should look in my/pkg/Wicket.properties as well (may be Wicket.properties is not the best name).That's what I want to do and it would be a nice feature if such a
lookup strategy could be added by just setting an option and defininga name for the property file. I tried to do it quick myself butstopped after finding out that the property file name is quite tightly
coupled to some class name for the moment...It is fairly easy to add. Please see Settings.addStringResourceLoader,   
Application.getResourceStreamLocator and   CompoundResourceStreamLocator.java Let me know if you need any more help Juergen  
Regards,Ralf  ---Using Tomcat but need to do more? Need to support web services,
 security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user  

Re: [Wicket-user] component input handling

2006-05-09 Thread Ittay Dror

thanx

what about using getConvertedInput and getRawInput rather than directly using 
the variables?

Igor Vaynberg wrote:
i was just looking at that. i think we messed up a little bit there. now 
that getinputasarray() is public i made getinput() go through that 
instead of request parameters directly.


-Igor


On 5/8/06, *Ittay Dror* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


on the off chance that not only igor is patient with this thread

i noticed that there is an inconsistency (in my view) in how input
is handled:
there's Component.getInput()
then FormComponent.inputAsStringArray ()
which is used to set
  convertedInput - by convert()
and
  rawInput - by inputChanged()

which are used all over the place. for example, getValue returns the
rawInput if it was set and getModelValue otherwise (which, btw, uses
the converter directly, rather than calling convert()). this may
cause surprises.

for convertedInput, i think it should be considered a caching value.
the method getConvertedInput() should check it, if it is null, it
does the conversion and sets it. it then returns it. calling
'convert' explicitely from other places is not needed. whoever needs
a converted input should call getConvertedInput.

i don't know about rawInput, and why it is used, so i can't comment
much, but i also think it should be used as cached value. it seems
odd though, that getInput is not 'raw' enough.

of course inputChanged should just invalidate the caches.

ittay



Ittay Dror wrote:
 
 
  Ittay Dror wrote:
 
 
  Ittay Dror wrote:
 
 
  Igor Vaynberg wrote:
  and how do i validate the resulting value? in updateModel,
if i
  find
  the combined value is not right, there's not much i can do.
 
  you mean the sum of correct pieces is not always correct itself?!?
  you can create a validator that performs the same aggregation and
  checks that i suppose.
 
  also, there's a convert() method in Component, what if i
want it to
  be employed also?
 
 
  if you want the whole form workflow to be employed then go about
  this differently. instead of overriding updatemodel() override
  getInput(), aggregate all the raw inputs from all the children
and
  use that to feed the aggregator. that way you get the whole
workflow.
 
  yep, and also inputAsStringArray
 
  oops, cannot do that. it is final. maybe i can override
getRequest...
 
  no, getRequest is also final.
 
 
 
  thank you for your patience
 
  ittay
 
 
  -Igor
 
 
 
 
 
 
 


--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your
job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
https://lists.sourceforge.net/lists/listinfo/wicket-user





--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] component input handling

2006-05-09 Thread Igor Vaynberg
im off to bed, so maybe the night crew can take care of this.-IgorOn 5/8/06, Ittay Dror [EMAIL PROTECTED]
 wrote:thanxwhat about using getConvertedInput and getRawInput rather than directly using the variables?
Igor Vaynberg wrote: i was just looking at that. i think we messed up a little bit there. now that getinputasarray() is public i made getinput() go through that instead of request parameters directly.
 -Igor On 5/8/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 on the off chance that not only igor is patient with this thread i noticed that there is an inconsistency (in my view) in how input is handled: there's 
Component.getInput() then FormComponent.inputAsStringArray () which is used to set convertedInput - by convert() and rawInput - by inputChanged()
 which are used all over the place. for example, getValue returns the rawInput if it was set and getModelValue otherwise (which, btw, uses the converter directly, rather than calling convert()). this may
 cause surprises. for convertedInput, i think it should be considered a caching value. the method getConvertedInput() should check it, if it is null, it does the conversion and sets it. it then returns it. calling
 'convert' explicitely from other places is not needed. whoever needs a converted input should call getConvertedInput. i don't know about rawInput, and why it is used, so i can't comment
 much, but i also think it should be used as cached value. it seems odd though, that getInput is not 'raw' enough. of course inputChanged should just invalidate the caches.
 ittay Ittay Dror wrote: Ittay Dror wrote: Ittay Dror wrote:
 Igor Vaynberg wrote: and how do i validate the resulting value? in updateModel, if i find
 the combined value is not right, there's not much i can do. you mean the sum of correct pieces is not always correct itself?!?
 you can create a validator that performs the same aggregation and checks that i suppose. also, there's a convert() method in Component, what if i
 want it to be employed also? if you want the whole form workflow to be employed then go about
 this differently. instead of overriding updatemodel() override getInput(), aggregate all the raw inputs from all the children and use that to feed the aggregator. that way you get the whole
 workflow. yep, and also inputAsStringArray oops, cannot do that. it is final. maybe i can override getRequest...
 no, getRequest is also final. thank you for your patience ittay
 -Igor
 -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 
http://www.openQRM.org - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services,
 security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user
--===Ittay DrorChief architect, openQRM TL,RD, Qlusters Inc.[EMAIL PROTECTED]+972-3-6081994 Fax: +972-3-6081841
http://www.openQRM.org- Keeps your Data-Center Up and Running---Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to overrite Application.properties properly?

2006-05-09 Thread Martijn Dashorst
foo/pkg/ MyWebApplication.properties MyWebApplication.javafoo/pkg/pages FooPage.properties FooPage.html
 FooPage.javaShould work. Can you see if you can reproduce in a wicket quickstart?MartijnOn 5/9/06, Bruno Borges 
[EMAIL PROTECTED] wrote:I have changed the TypeValidator message, in several ways:
foo/pkg/ MyWebApplication.properties MyWebApplication.java Application.propertiesfoo/pkg/pages FooPage.properties FooPage.html
 FooPage.javaNone of these have worked. :/-- Bruno Borges
[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 
1.4

-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!-- http://wicketframework.org


Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

I guess it depends on what job you are in. It is nice for the person
who has to maintain the properties. If I were a html designer I'd
rather prefer a default text like save or whatever, which btw
applies if no property is found.

Juergen

On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

why not? in a preview you would get a button with text
wicket:i18n:buttons.save

thats good for preview since you can see the key!

-Igor



On 5/8/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 It will not be previeable any more.

 Juergen

 On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
  why not a format like this
 
  input type=submit value=wicket:i18n: buttons.save/
 
  or
 
  input type=submit value=wi18n:buttons.save/
 
  -Igor
 
 
 
  On 5/8/06, Andrew Berman  [EMAIL PROTECTED] wrote:
  
   Hey Guys,
  
   I think adding something to support localized attributes would be a
big
  plus.  I know that when Wicket added wicket:message it really saved a
lot of
  extra Java code on my part.  I think the same thing would happen if we
came
  up with something to do it in attributes.  AttributeModifiers obviously
  work, but when you have a lot of things you want to localize on the same
  page it's a lot of extra Java code that needs to be written to support
this
  because you need to add the specific Component and add an
AttributeModifier.
  
   What about a compromise?  I think the experimental stuff in
  WicketMessageTagHandler is cumbersome to add to the HTML, so what if we
  created a component whose sole purpose is to add attributes to some HTML
  element.  Or can this already be done like this:
  
   Java:
   add(new WebComponent(imageAlt).add(new
  AttributeModifier(alt, true, new ResourceModel(my.key;
  
   HTML:
   img wicket:id=imageAlt src=mySrc /
  
   I haven't tested if this works, but if not, maybe some kind of
Component
  could be created which allows something like this.  It will allow for
  multiple attributes to be replaced as well.
  
   Thoughts?
  
  
   --Andrew
  
  
  
   On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED]  wrote:
On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:
 Hi Juergen,

  please see WicketMessageTagHandler.java. It is experimental only
and
  disabled by default. Reason: it is realy ugly to have something
like
  wicket:example=tag=key. AttributeModifier are much more
convinent
  and far less ugly, IMO.
 if you have a page with like, say, 20 labels with static text
(like
 you have sometimes in complex forms for explaining things) I don't
see
 something to win by adding AttributeModifiers to the component
tree. I
 see localization of static text as markup issue because there is
 almost no logic to define there. The format you described is
rather
 ugly, that's right: What about:
 div wicket:message=blaLabelbla/div (if you
want
  to go the
 message as text between the tags)
   
this is wicket:message
  value=xxxdefault/wicket:message and
already available.
   
 input type=submit wicket:message:value=Do something/ (for
 localizing the attribute value, probably the second : is not valid
xml
 any more, but another separation char like _ or  maybe no
separation
 char at all could be used)

   
It is all not realy nice, isn't it? That is what we struggled with.
We
didn't find a syntax which we realy liked and which is standards
compliant ( e.g. XML namespace, schema).
   
 This would be very helpful for quick  easy localization of static
 content in pages, something that's missing at the moment from my
point
 of view. Tell me what you think, if I have time I would like to
 implement this and contribute it...

   
your help is very much appreciated but the syntax should be right.
   
  That is default. Localizer implements a search hierarchy up the
  component tree. You only need one properties files per language
per
  Panel which contains X number of component. Thinking ... That is
not
  your question, isn't it? Like Application.properties is the last
  resort for all messages, you ask for one per java package,
right?
  So,
  in addition to the my.pkg.MyPanel.properties it should look in
  my/pkg/Wicket.properties as well (may be Wicket.properties is
not
  the
  best name).
 That's what I want to do and it would be a nice feature if such a
 lookup strategy could be added by just setting an option and
defining
 a name for the property file. I tried to do it quick myself but
 stopped after finding out that the property file name is quite
tightly
 coupled to some class name for the moment...

   
It is fairly easy to add. Please see
  Settings.addStringResourceLoader,
Application.getResourceStreamLocator and
CompoundResourceStreamLocator.java
   
Let me know if you need any more help
   
Juergen
   
 Regards,
 Ralf



  

Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

It'll give people choice though. Not everyone cares about
previewability in the same fashion.

Eelco


On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:

I guess it depends on what job you are in. It is nice for the person
who has to maintain the properties. If I were a html designer I'd
rather prefer a default text like save or whatever, which btw
applies if no property is found.

Juergen

On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 why not? in a preview you would get a button with text
 wicket:i18n:buttons.save

 thats good for preview since you can see the key!

 -Igor



 On 5/8/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  It will not be previeable any more.
 
  Juergen
 
  On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
   why not a format like this
  
   input type=submit value=wicket:i18n: buttons.save/
  
   or
  
   input type=submit value=wi18n:buttons.save/
  
   -Igor
  
  
  
   On 5/8/06, Andrew Berman  [EMAIL PROTECTED] wrote:
   
Hey Guys,
   
I think adding something to support localized attributes would be a
 big
   plus.  I know that when Wicket added wicket:message it really saved a
 lot of
   extra Java code on my part.  I think the same thing would happen if we
 came
   up with something to do it in attributes.  AttributeModifiers obviously
   work, but when you have a lot of things you want to localize on the same
   page it's a lot of extra Java code that needs to be written to support
 this
   because you need to add the specific Component and add an
 AttributeModifier.
   
What about a compromise?  I think the experimental stuff in
   WicketMessageTagHandler is cumbersome to add to the HTML, so what if we
   created a component whose sole purpose is to add attributes to some HTML
   element.  Or can this already be done like this:
   
Java:
add(new WebComponent(imageAlt).add(new
   AttributeModifier(alt, true, new ResourceModel(my.key;
   
HTML:
img wicket:id=imageAlt src=mySrc /
   
I haven't tested if this works, but if not, maybe some kind of
 Component
   could be created which allows something like this.  It will allow for
   multiple attributes to be replaced as well.
   
Thoughts?
   
   
--Andrew
   
   
   
On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED]  wrote:
 On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:
  Hi Juergen,
 
   please see WicketMessageTagHandler.java. It is experimental only
 and
   disabled by default. Reason: it is realy ugly to have something
 like
   wicket:example=tag=key. AttributeModifier are much more
 convinent
   and far less ugly, IMO.
  if you have a page with like, say, 20 labels with static text
 (like
  you have sometimes in complex forms for explaining things) I don't
 see
  something to win by adding AttributeModifiers to the component
 tree. I
  see localization of static text as markup issue because there is
  almost no logic to define there. The format you described is
 rather
  ugly, that's right: What about:
  div wicket:message=blaLabelbla/div (if you
 want
   to go the
  message as text between the tags)

 this is wicket:message
   value=xxxdefault/wicket:message and
 already available.

  input type=submit wicket:message:value=Do something/ (for
  localizing the attribute value, probably the second : is not valid
 xml
  any more, but another separation char like _ or  maybe no
 separation
  char at all could be used)
 

 It is all not realy nice, isn't it? That is what we struggled with.
 We
 didn't find a syntax which we realy liked and which is standards
 compliant ( e.g. XML namespace, schema).

  This would be very helpful for quick  easy localization of static
  content in pages, something that's missing at the moment from my
 point
  of view. Tell me what you think, if I have time I would like to
  implement this and contribute it...
 

 your help is very much appreciated but the syntax should be right.

   That is default. Localizer implements a search hierarchy up the
   component tree. You only need one properties files per language
 per
   Panel which contains X number of component. Thinking ... That is
 not
   your question, isn't it? Like Application.properties is the last
   resort for all messages, you ask for one per java package,
 right?
   So,
   in addition to the my.pkg.MyPanel.properties it should look in
   my/pkg/Wicket.properties as well (may be Wicket.properties is
 not
   the
   best name).
  That's what I want to do and it would be a nice feature if such a
  lookup strategy could be added by just setting an option and
 defining
  a name for the property file. I tried to do it quick myself but
  stopped after finding out that the property file name is quite
 tightly
  coupled to some class name for the moment...
 

 It is fairly 

Re: [Wicket-user] component input handling (was: why is MarkupContainer.add final?)

2006-05-09 Thread Johan Compagner
rawinput should also be a string[] but the problem is if we change that then getValue()/getRawInput() and maybe als getModelValue all should also change and that will affect a lot...johan
On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
i was just looking at that. i think we messed up a little bit there. now that getinputasarray() is public i made getinput() go through that instead of request parameters directly.
-Igor
On 5/8/06, Ittay Dror [EMAIL PROTECTED] wrote:

on the off chance that not only igor is patient with this threadi noticed that there is an inconsistency (in my view) in how input is handled:there's Component.getInput()then FormComponent.inputAsStringArray

()which is used to setconvertedInput - by convert()andrawInput - by inputChanged()which are used all over the place. for example, getValue returns the rawInput if it was set and getModelValue otherwise (which, btw, uses the converter directly, rather than calling convert()). this may cause surprises.
for convertedInput, i think it should be considered a caching value. the method getConvertedInput() should check it, if it is null, it does the conversion and sets it. it then returns it. calling 'convert' explicitely from other places is not needed. whoever needs a converted input should call getConvertedInput.
i don't know about rawInput, and why it is used, so i can't comment much, but i also think it should be used as cached value. it seems odd though, that getInput is not 'raw' enough.of course inputChanged should just invalidate the caches.
ittayIttay Dror wrote: Ittay Dror wrote: Ittay Dror wrote: Igor Vaynberg wrote: and how do i validate the resulting value? in updateModel, if i
 find the combined value is not right, there's not much i can do. you mean the sum of correct pieces is not always correct itself?!?
 you can create a validator that performs the same aggregation and
 checks that i suppose. also, there's a convert() method in Component, what if i want it to be employed also?

 if you want the whole form workflow to be employed then go about this differently. instead of overriding updatemodel() override getInput(), aggregate all the raw inputs from all the children and
 use that to feed the aggregator. that way you get the whole workflow. yep, and also inputAsStringArray oops, cannot do that. it is final. maybe i can override getRequest...
 no, getRequest is also final. thank you for your patience ittay -Igor
--===Ittay DrorChief architect, openQRM TL,RD, Qlusters Inc.

[EMAIL PROTECTED]+972-3-6081994 Fax: +972-3-6081841
http://www.openQRM.org- Keeps your Data-Center Up and Running---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





Re: [Wicket-user] page map with hot deploy

2006-05-09 Thread Johan Compagner
yes but the strange this is. if the request starts. All pagemaps are walked over and the session is set to themCan you debug that and tell me why that doesn't happen for you?Look at Session.init() and Session.visitPageMaps
()They should walk over all the attributes in the session and what is a pagemap will be get and the session will be set.johanOn 5/9/06, Roan O'Sullivan
 [EMAIL PROTECTED] wrote:
I get the same exception. Here is the stack trace:java.lang.NullPointerExceptionat wicket.PageMap.visitEntries(Lwicket.PageMap$IVisitor;)V(PageMap.java:574)at wicket.PageMap.clear()V(PageMap.java
:193)at wicket.PageMap.remove()V(PageMap.java:308)at wicket.Session.newPageMap(Ljava.lang.String;)Lwicket.PageMap;(Session.java:567)at wicket.Session.pageMapForName(Ljava.lang.String;Z)Lwicket.PageMap;(
Session.java:448)at wicket.PageMap.forName(Ljava.lang.String;)Lwicket.PageMap;(PageMap.java:166)at wicket.Page.init()V(Page.java:1153)at wicket.Page.()V(Page.java:194)at wicket.markup.html.WebPage
.()V(WebPage.java:122)at wicket.markup.html.pages.ExceptionErrorPage.(Ljava.lang.Throwable;Lwicket.Page;)V(ExceptionErrorPage.java:53)at wicket.markup.html.pages.ExceptionErrorPage.(Ljava.lang.Throwable;Lwicket.Page;)V(
ExceptionErrorPage.java:53)at wicket.request.compound.DefaultExceptionResponseStrategy.respond(Lwicket.RequestCycle;Ljava.lang.RuntimeException;)V(DefaultExceptionResponseStrategy.java:104)at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond
(Ljava.lang.RuntimeException;Lwicket.RequestCycle;)V(AbstractCompoundRequestCycleProcessor.java:76)at wicket.RequestCycle.step()V(RequestCycle.java:1000)at wicket.RequestCycle.steps()V(RequestCycle.java
:1034)at wicket.RequestCycle.request()V(RequestCycle.java:453)at wicket.protocol.http.WicketServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(WicketServlet.java
:215)Having just upgraded I'm at a bit of a loss to offer any solutions. But here are some observations: - The NPE occurs when trying to forward/redirect to ExceptionErrorPage, so there is some underlying exception
 - Session#newPageMap only invokes PageMap#remove when usedPageMaps.size() = maxPageMapsMy problems are also with hot deploy (Weblogic Server 8.1).
From: [EMAIL PROTECTED] on behalf of Johan CompagnerSent: Mon 5/8/2006 6:22 PMTo: 
wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] page map with hot deploythat is strangeare you saying that those pagemaps get deployed when a request is happening?Because all pagemaps gets the session set when the request comes in. (see 
RequestCycle.prepare() and Session.init())On 5/9/06, Lusebrink, Scott E CTR DISA GIG-CS [EMAIL PROTECTED] wrote:doing hot deploys on wicket 
1.2 projects gives null pointers in pagemap.java. a page will work fine then after a hot deploy going back to the page caused a null pointer on session.getAttributeNames();I'm not sure what is causing the session to be null but adding this check seemed to fix it.I no longer am getting the null pointer after a hot deploy
ScottPageMap.javafinal void visitEntries(final IVisitor visitor){if(session==null){ session = Session.get();
}...}


Re: [Wicket-user] wicket pages embedded in jsps

2006-05-09 Thread Ittay Dror

oh, one last thing.

i think it would be nicer if embedded pages can extend panels. i'm not sure if 
it is possible (so when including a url, the panel class will be called)

ittay

Ittay Dror wrote:
ok, this is what i did given the existing wicket code. i'm sure it can 
be done better by changing the code itself


1. change newWebRequest in QrmApplication
protected WebRequest newWebRequest(final HttpServletRequest 
servletRequest) {

   if (servletRequest.getPathInfo() == null) {
   if 
(servletRequest.getAttribute(javax.servlet.include.request_uri) != 
null) {

   return new IncludedServletWebRequest(servletRequest);
   }
  
   if 
(servletRequest.getAttribute(javax.servlet.forward.request_uri) != 
null) {

   return new ForwardedServletWebRequest(servletRequest);
   }
  
   log.error(Could not find an implementation of WebRequest 
that fits this request. trying the default);
  
   }
  
   return super.newWebRequest(servletRequest);

   }

2. create IncludedServletWebRequest and ForwardedServletWebRequest. they 
extend BaseServletWebRequest

for IncludedServletWebRequest:
public String getPath() {
return 
(String)getHttpServletRequest().getAttribute(javax.servlet.include.path_info); 

   
}


public String getContextPath() {
return 
(String)getHttpServletRequest().getAttribute(javax.servlet.include.context_path); 


}

public String getServletPath() {
return 
(String)getHttpServletRequest().getAttribute(javax.servlet.include.servlet_path); 


}

3. create BaseServletWebRequest, extending ServletWebRequest and rewrite 
getRelativeURL


public String getRelativeURL() {
/**
 * Servlet 2.3 specification :
 *  * Servlet Path: The path section that directly 
corresponds to the
 * mapping which activated this request. This path starts with a 
/
 * character except in the case where the request is matched 
with the

 * /* pattern, in which case it is the empty string.
 *  * PathInfo: The part of the request path that is not 
part of the
 * Context Path or the Servlet Path. It is either null if there 
is no

 * extra path, or is a string with a leading /.
 */
String url = getServletPath();
final String pathInfo = getPath();

if (pathInfo != null)
{
url += pathInfo;
}

final String queryString = 
getHttpServletRequest().getQueryString();


if (queryString != null)
{
url += (? + queryString);
}

// If url is non-empty it has to start with '/', which we should 
lose

if (!url.equals())
{
// Remove leading '/'
url = url.substring(1);
}
return url;
}


4. if using a form create an EmbeddedForm class, and override the 
onComponentTag


here i can't give a generic code, but the basic thing is to rewrite the 
action, tag, so it goes to the original page, and put the action as a 
parameter in the url, which is used by the containing page to include


protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
String action = tag.getAttributes().getString(action);
Map parameters = new HashMap(getRequest().getParameterMap());
parameters.put(wicketAction, action);
String newAction = containingUrl + 
StringUtils.toString(parameters, , null);

tag.put(action, newAction);
}

in the jsp, the code should be something like
jsp:include page=%=request.getParameter(wicketAction) == null ? 
url-to-wicket : request.getParameter(wicketAction) %/


hope it helps,

ittay



Juergen Donnerstag wrote:

Sure. An example is more than welcome.

Juergen

On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
i've done some work to enable embedding wicket pages in jsp pages. 
this is required by us, since we're currently using struts, and can't 
move all our code to wicket. i think it is important to enable 
existing projects to start using wicket.


the main problems in that HttpServletRequest.getPath() returns null 
for forwarded/included pages


i can submit the code if you want

--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, 
security?
Get stuff done quickly with pre-integrated technology to make your 
job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

Re: [Wicket-user] component input handling

2006-05-09 Thread Ittay Dror

i don't see why there should be a getInputAsArray. it seems to me there should 
be an 'Object getInput()', which will usually return 
getRequest().getParameter(getInputName()), but for some components, that for 
some reason require multiple inputs, it will return  
getRequest().getParameters(getInputName())

then, if there needs to be a conversion from that object to a String (which i 
don't see why), then the converter needs to take care of it.



Johan Compagner wrote:
rawinput should also be a string[] but the problem is if we change that 
then getValue()/getRawInput() and maybe als getModelValue all should 
also change and that will affect a lot...


johan


On 5/9/06, *Igor Vaynberg* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


i was just looking at that. i think we messed up a little bit there.
now that getinputasarray() is public i made getinput() go through
that instead of request parameters directly.

-Igor



On 5/8/06, *Ittay Dror* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

on the off chance that not only igor is patient with this thread

i noticed that there is an inconsistency (in my view) in how
input is handled:
there's Component.getInput()
then FormComponent.inputAsStringArray ()
which is used to set
  convertedInput - by convert()
and
  rawInput - by inputChanged()

which are used all over the place. for example, getValue returns
the rawInput if it was set and getModelValue otherwise (which,
btw, uses the converter directly, rather than calling
convert()). this may cause surprises.

for convertedInput, i think it should be considered a caching
value. the method getConvertedInput() should check it, if it is
null, it does the conversion and sets it. it then returns it.
calling 'convert' explicitely from other places is not needed.
whoever needs a converted input should call getConvertedInput.

i don't know about rawInput, and why it is used, so i can't
comment much, but i also think it should be used as cached
value. it seems odd though, that getInput is not 'raw' enough.

of course inputChanged should just invalidate the caches.

ittay



Ittay Dror wrote:


  Ittay Dror wrote:
 
 
  Ittay Dror wrote:
 
 
  Igor Vaynberg wrote:
  and how do i validate the resulting value? in
updateModel, if i
  find
  the combined value is not right, there's not much i can do.
 
  you mean the sum of correct pieces is not always correct
itself?!?
  you can create a validator that performs the same
aggregation and
  checks that i suppose.
 
  also, there's a convert() method in Component, what if
i want it to
  be employed also?
 
 
  if you want the whole form workflow to be employed then go
about
  this differently. instead of overriding updatemodel() override
  getInput(), aggregate all the raw inputs from all the
children and
  use that to feed the aggregator. that way you get the whole
workflow.
 
  yep, and also inputAsStringArray
 
  oops, cannot do that. it is final. maybe i can override
getRequest...

  no, getRequest is also final.

 
 
  thank you for your patience
 
  ittay
 
 
  -Igor
 
 
 
 
 




--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make
your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
https://lists.sourceforge.net/lists/listinfo/wicket-user






--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL 

Re: [Wicket-user] component input handling

2006-05-09 Thread Johan Compagner
Object?ughhThen we have to cast and or check for it everywhere. Because getInput() is used for a lot of things,What it could be is always and String[] but then we just have getInputAsArray()and i guess thats the method we should use as much as possible everywhere.
which we already do for the convertValue and so on.if we fall to the Converter then we use plain getInput() but that is because for FormComponentthat specify type the input is always pure text. And if we give to that an array. Then the converter
will be much harder to build for people.So when input comes in.We use getInputAsArray() when components do the conversions themselfs If there is a type specified we let the converter handle the conversion fron String-Type
and we use getInput()And we want to change the converter interface so that it is something like this:convertInput(String, Class);convertValue(Object);So that it is for developers much easier to build a converter and know what in and out going is.
Maybe we could make a convertInput(String[], Class); instead then it is all type save. And we can use the getInputAsArray() everywhere.johanOn 5/9/06, 
Ittay Dror [EMAIL PROTECTED] wrote:
i don't see why there should be a getInputAsArray. it seems to me there should be an 'Object getInput()', which will usually return getRequest().getParameter(getInputName()), but for some components, that for some reason require multiple inputs, it will returngetRequest().getParameters(getInputName())
then, if there needs to be a conversion from that object to a String (which i don't see why), then the converter needs to take care of it.Johan Compagner wrote: rawinput should also be a string[] but the problem is if we change that
 then getValue()/getRawInput() and maybe als getModelValue all should also change and that will affect a lot... johan On 5/9/06, *Igor Vaynberg* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: i was just looking at that. i think we messed up a little bit there.
 now that getinputasarray() is public i made getinput() go through that instead of request parameters directly. -Igor On 5/8/06, *Ittay Dror* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: on the off chance that not only igor is patient with this thread
 i noticed that there is an inconsistency (in my view) in how input is handled: there's Component.getInput() then FormComponent.inputAsStringArray ()
 which is used to set convertedInput - by convert() and rawInput - by inputChanged() which are used all over the place. for example, getValue returns
 the rawInput if it was set and getModelValue otherwise (which, btw, uses the converter directly, rather than calling convert()). this may cause surprises. for convertedInput, i think it should be considered a caching
 value. the method getConvertedInput() should check it, if it is null, it does the conversion and sets it. it then returns it. calling 'convert' explicitely from other places is not needed.
 whoever needs a converted input should call getConvertedInput. i don't know about rawInput, and why it is used, so i can't comment much, but i also think it should be used as cached
 value. it seems odd though, that getInput is not 'raw' enough. of course inputChanged should just invalidate the caches. ittay Ittay Dror wrote:
   Ittay Dror wrote:   Ittay Dror wrote:
   Igor Vaynberg wrote:   and how do i validate the resulting value? in updateModel, if i   find   the combined value is not right, there's not much i can do.
 you mean the sum of correct pieces is not always correct itself?!?   you can create a validator that performs the same
 aggregation and   checks that i suppose. also, there's a convert() method in Component, what if i want it to
   be employed also?   if you want the whole form workflow to be employed then go
 about   this differently. instead of overriding updatemodel() override   getInput(), aggregate all the raw inputs from all the children and
   use that to feed the aggregator. that way you get the whole workflow. yep, and also inputAsStringArray  
   oops, cannot do that. it is final. maybe i can override getRequest...  no, getRequest is also final.   
 thank you for your patience ittay
   -Igor
 -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841 http://www.openQRM.org
 - Keeps your Data-Center Up and Running --- Using Tomcat but need to do more? Need to support web services,
 security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___
 Wicket-user mailing list 

Re: [Wicket-user] MaskConverter: isn't a better way?

2006-05-09 Thread Johan Compagner
currently not. What could be better in your eyes?We will overhaul the converter interface in the next version so that it should be simpler.johanOn 5/9/06, 
Bruno Borges [EMAIL PROTECTED] wrote:
This is the only way I know (better: I learned from Wiki/Docs/Examples) on how to use MaskConverter:TextField zipCode = new TextField(zipCode) {

public IConverter getConverter() {MaskFormatter zipFormat = null;try {zipFormat = new MaskFormatter(#-###); // Brazillian format

} catch(Exception e) {} // never throwsreturn new UncheckedMaskConverter(zipFormat);}};Isn't a better way to to this? 
-- 
Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 
1.4Sun Certified Web Component Developer for 1.4




[Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-05-09 Thread Nino Wael








Hi



Im not sure if this is the intended functionality,
but I belive Ive discovered an oddity or featureJ. 



When I use the constructor which also takes a model (ListChoice(dropdown_job,
new Model(),myList, new myRenderer)) my listchoice is no longer displayed as a
dropdown but as a listbox. 



If I instead of using the constructor with the model property
call the set model method (listChoice_job.setModel(new Model())) then it
remains displayed as a dropdown 



Code snipplet:

// this gives a listbox

 listChoice_job
= new ListChoice(dropdown_job,new Model(),jobcenter.toArray().getList(),
new DataItemRenderer())



//this gives a dropdown

 listChoice_job
= new ListChoice(dropdown_job, jobcenter.toArray().getList(), new
DataItemRenderer())

 listChoice_job.setModel(new
Model());

Code snipplet end





Its that latter I want displayed.





-regards Nino








Re: [Wicket-user] Localization

2006-05-09 Thread Johan Compagner
the problem i see is are we going to check every tag's attribute (wicket component or not) for such a thing? And if it is not a wicket component we make it a special (none raw markup) tag?and if it is a wicket component already we just put a special object in the tags attributes?
johanOn 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
It'll give people choice though. Not everyone cares aboutpreviewability in the same fashion.EelcoOn 5/9/06, Juergen Donnerstag [EMAIL PROTECTED]
 wrote: I guess it depends on what job you are in. It is nice for the person who has to maintain the properties. If I were a html designer I'd rather prefer a default text like save or whatever, which btw
 applies if no property is found. Juergen On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:  why not? in a preview you would get a button with text
  wicket:i18n:buttons.save   thats good for preview since you can see the key!   -Igor On 5/8/06, Juergen Donnerstag 
[EMAIL PROTECTED] wrote:   It will not be previeable any more. Juergen On 5/9/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:why not a format like this   input type=submit value=wicket:i18n: 
buttons.save/   or   input type=submit value=wi18n:buttons.save/   
-Igor On 5/8/06, Andrew Berman  [EMAIL PROTECTED] wrote:
 Hey Guys, I think adding something to support localized attributes would be a  bigplus.I know that when Wicket added wicket:message it really saved a
  lot ofextra Java code on my part.I think the same thing would happen if we  cameup with something to do it in attributes.AttributeModifiers obviously
work, but when you have a lot of things you want to localize on the samepage it's a lot of extra Java code that needs to be written to support  thisbecause you need to add the specific Component and add an
  AttributeModifier. What about a compromise?I think the experimental stuff inWicketMessageTagHandler is cumbersome to add to the HTML, so what if we
created a component whose sole purpose is to add attributes to some HTMLelement.Or can this already be done like this: Java:
 add(new WebComponent(imageAlt).add(newAttributeModifier(alt, true, new ResourceModel(my.key; HTML:
 img wicket:id=imageAlt src="" / I haven't tested if this works, but if not, maybe some kind of  Component
could be created which allows something like this.It will allow formultiple attributes to be replaced as well. Thoughts?
 --Andrew On 5/4/06, Juergen Donnerstag  
[EMAIL PROTECTED]  wrote:  On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:
   Hi Juergen,  please see WicketMessageTagHandler.java. It is experimental only  anddisabled by default. Reason: it is realy ugly to have something
  likewicket:example=tag=key. AttributeModifier are much more  convinentand far less ugly, IMO.
   if you have a page with like, say, 20 labels with static text  (like   you have sometimes in complex forms for explaining things) I don't
  see   something to win by adding AttributeModifiers to the component  tree. I   see localization of static text as markup issue because there is
   almost no logic to define there. The format you described is  rather   ugly, that's right: What about:   div wicket:message=blaLabelbla/div (if you
  wantto go the   message as text between the tags)   this is wicket:messagevalue=xxxdefault/wicket:message and
  already available.input type=submit wicket:message:value=Do something/ (for   localizing the attribute value, probably the second : is not valid
  xml   any more, but another separation char like _ ormaybe no  separation   char at all could be used)  
   It is all not realy nice, isn't it? That is what we struggled with.  We  didn't find a syntax which we realy liked and which is standards
  compliant ( e.g. XML namespace, schema).This would be very helpful for quick  easy localization of static   content in pages, something that's missing at the moment from my
  point   of view. Tell me what you think, if I have time I would like to   implement this and contribute it...  
   your help is very much appreciated but the syntax should be right. That is default. Localizer implements a search hierarchy up the
component tree. You only need one properties files per language  perPanel which contains X number of component. Thinking ... That is
  notyour question, isn't it? Like Application.properties is the lastresort for all messages, you ask for one per java package,
  right?So,in addition to the my.pkg.MyPanel.properties it should look inmy/pkg/Wicket.properties as well (may be 
Wicket.properties is  notthebest name).   That's what I want to do 

Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

Or we use one of these post-processing filters. That way components
might even clear them or insert new ones, and only the resulting
markup will be processed.

Eelco


On 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:

the problem i see is are we going to check every tag's attribute (wicket
component or not) for such a thing?

And if it is not a wicket component we make it a special (none raw markup)
tag?
and if it is a wicket component already we just put a special object in the
tags attributes?

johan



On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 It'll give people choice though. Not everyone cares about
 previewability in the same fashion.

 Eelco


 On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED]  wrote:
  I guess it depends on what job you are in. It is nice for the person
  who has to maintain the properties. If I were a html designer I'd
  rather prefer a default text like save or whatever, which btw
  applies if no property is found.
 
  Juergen
 
  On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
   why not? in a preview you would get a button with text
   wicket:i18n:buttons.save
  
   thats good for preview since you can see the key!
  
   -Igor
  
  
  
   On 5/8/06, Juergen Donnerstag  [EMAIL PROTECTED] wrote:
It will not be previeable any more.
   
Juergen
   
On 5/9/06, Igor Vaynberg  [EMAIL PROTECTED] wrote:
 why not a format like this

 input type=submit value=wicket:i18n: buttons.save/

 or

 input type=submit value=wi18n:buttons.save/

 -Igor



 On 5/8/06, Andrew Berman  [EMAIL PROTECTED] wrote:
 
  Hey Guys,
 
  I think adding something to support localized attributes would
be a
   big
 plus.  I know that when Wicket added wicket:message it really
saved a
   lot of
 extra Java code on my part.  I think the same thing would happen
if we
   came
 up with something to do it in attributes.  AttributeModifiers
obviously
 work, but when you have a lot of things you want to localize on
the same
 page it's a lot of extra Java code that needs to be written to
support
   this
 because you need to add the specific Component and add an
   AttributeModifier.
 
  What about a compromise?  I think the experimental stuff in
 WicketMessageTagHandler is cumbersome to add to the HTML, so what
if we
 created a component whose sole purpose is to add attributes to
some HTML
 element.  Or can this already be done like this:
 
  Java:
  add(new WebComponent(imageAlt).add(new
 AttributeModifier(alt, true, new ResourceModel(my.key;
 
  HTML:
  img wicket:id=imageAlt src=mySrc /
 
  I haven't tested if this works, but if not, maybe some kind of
   Component
 could be created which allows something like this.  It will allow
for
 multiple attributes to be replaced as well.
 
  Thoughts?
 
 
  --Andrew
 
 
 
  On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED] 
wrote:
   On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:
Hi Juergen,
   
 please see WicketMessageTagHandler.java. It is
experimental only
   and
 disabled by default. Reason: it is realy ugly to have
something
   like
 wicket:example=tag=key. AttributeModifier are much more
   convinent
 and far less ugly, IMO.
if you have a page with like, say, 20 labels with static
text
   (like
you have sometimes in complex forms for explaining things) I
don't
   see
something to win by adding AttributeModifiers to the
component
   tree. I
see localization of static text as markup issue because
there is
almost no logic to define there. The format you described is
   rather
ugly, that's right: What about:
div wicket:message=blaLabelbla/div
(if you
   want
 to go the
message as text between the tags)
  
   this is wicket:message
 value=xxxdefault/wicket:message and
   already available.
  
input type=submit wicket:message:value=Do something/
(for
localizing the attribute value, probably the second : is not
valid
   xml
any more, but another separation char like _ or  maybe no
   separation
char at all could be used)
   
  
   It is all not realy nice, isn't it? That is what we struggled
with.
   We
   didn't find a syntax which we realy liked and which is
standards
   compliant ( e.g. XML namespace, schema).
  
This would be very helpful for quick  easy localization of
static
content in pages, something that's missing at the moment
from my
   point
of view. Tell me what you think, if I have time I would like
to
implement this and contribute it...
   
  
   your help is very much appreciated but the syntax should be
right.
  
 That is default. Localizer implements a search hierarchy
up the
 component tree. 

Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

We do something similar for autolinks already. Actually I think there
at least 3 solutions:
1) If no wicket:id is present than replace the attribute on the fly
and add it to the markup stream as if it were RawMarkup. Con: changes
to the properties at runtime are not taken into account. Tags with
wicket:id are treated as below.
2) Automatically create a WebMarkupContainer for all tags without
wicket:id but with such attributes and auto-attach an
AttributeModifier. If wicket:id already exists, than auto-attach the
AttributeModifier to the already existing component. Con: you
auto-create plenty more Containers and the debug page is filled with
automatically created components.
3) A 3rd option could by an OutputTransformer kind of
Component/Behavior which simply ignores the html/xml structure and
search  replaces the attributes in the output string. Something like
s/w18n:([w+\.])/${getString($1)/g  (pseudo code only). The
properties file of course could only be with the the transformer or
any container up the hierarchy. Currently I like this idea most. In
most scenarios (RESPONSE_BUFFER) we cache the output string already.
We'd simply kind of post process the output. Might as well be more
efficient (performance and memory) than any of the other solutions.

Juergen

On 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:

the problem i see is are we going to check every tag's attribute (wicket
component or not) for such a thing?

And if it is not a wicket component we make it a special (none raw markup)
tag?
and if it is a wicket component already we just put a special object in the
tags attributes?

johan



On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 It'll give people choice though. Not everyone cares about
 previewability in the same fashion.

 Eelco


 On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED]  wrote:
  I guess it depends on what job you are in. It is nice for the person
  who has to maintain the properties. If I were a html designer I'd
  rather prefer a default text like save or whatever, which btw
  applies if no property is found.
 
  Juergen
 
  On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
   why not? in a preview you would get a button with text
   wicket:i18n:buttons.save
  
   thats good for preview since you can see the key!
  
   -Igor
  
  
  
   On 5/8/06, Juergen Donnerstag  [EMAIL PROTECTED] wrote:
It will not be previeable any more.
   
Juergen
   
On 5/9/06, Igor Vaynberg  [EMAIL PROTECTED] wrote:
 why not a format like this

 input type=submit value=wicket:i18n: buttons.save/

 or

 input type=submit value=wi18n:buttons.save/

 -Igor



 On 5/8/06, Andrew Berman  [EMAIL PROTECTED] wrote:
 
  Hey Guys,
 
  I think adding something to support localized attributes would
be a
   big
 plus.  I know that when Wicket added wicket:message it really
saved a
   lot of
 extra Java code on my part.  I think the same thing would happen
if we
   came
 up with something to do it in attributes.  AttributeModifiers
obviously
 work, but when you have a lot of things you want to localize on
the same
 page it's a lot of extra Java code that needs to be written to
support
   this
 because you need to add the specific Component and add an
   AttributeModifier.
 
  What about a compromise?  I think the experimental stuff in
 WicketMessageTagHandler is cumbersome to add to the HTML, so what
if we
 created a component whose sole purpose is to add attributes to
some HTML
 element.  Or can this already be done like this:
 
  Java:
  add(new WebComponent(imageAlt).add(new
 AttributeModifier(alt, true, new ResourceModel(my.key;
 
  HTML:
  img wicket:id=imageAlt src=mySrc /
 
  I haven't tested if this works, but if not, maybe some kind of
   Component
 could be created which allows something like this.  It will allow
for
 multiple attributes to be replaced as well.
 
  Thoughts?
 
 
  --Andrew
 
 
 
  On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED] 
wrote:
   On 5/4/06, Ralf Ebert [EMAIL PROTECTED] wrote:
Hi Juergen,
   
 please see WicketMessageTagHandler.java. It is
experimental only
   and
 disabled by default. Reason: it is realy ugly to have
something
   like
 wicket:example=tag=key. AttributeModifier are much more
   convinent
 and far less ugly, IMO.
if you have a page with like, say, 20 labels with static
text
   (like
you have sometimes in complex forms for explaining things) I
don't
   see
something to win by adding AttributeModifiers to the
component
   tree. I
see localization of static text as markup issue because
there is
almost no logic to define there. The format you described is
   rather
ugly, that's right: What about:
div wicket:message=blaLabelbla/div
(if you
   want
 

Re: [Wicket-user] Localization

2006-05-09 Thread Johan Compagner
I think 1 is much more performant when it isn't a wicket componentbecause then the markup is stored under a locale and that markup is preparsed for everything.Can't be faster then that.3 is by far the worst when it comes done to performance. Because we have to do it everytime for every request
even if there isn't a tag like that.. And if it is then we have to manipulate (string concatting and copying) the bufferAnd it can only be done when the person does buffer the response...If we store the markup under the locale and the markup is parsed for that locale and all resources are inserted into
the markup. Then it doesn't matter if it is a wicket component tag or not. Just set the right attribute value into the Component tag attribute. (if a developer alters that again it is his doing) Then we only parse once and we have the right markup file per locale.
The problem with resources changes can be fixed if we monitor resource changes and just delete the markup then(as a whole or maybe a part if we can make the links)johan
On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
We do something similar for autolinks already. Actually I think thereat least 3 solutions:1) If no wicket:id is present than replace the attribute on the flyand add it to the markup stream as if it were RawMarkup. Con: changes
to the properties at runtime are not taken into account. Tags withwicket:id are treated as below.2) Automatically create a WebMarkupContainer for all tags withoutwicket:id but with such attributes and auto-attach an
AttributeModifier. If wicket:id already exists, than auto-attach theAttributeModifier to the already existing component. Con: youauto-create plenty more Containers and the debug page is filled withautomatically created components.
3) A 3rd option could by an OutputTransformer kind ofComponent/Behavior which simply ignores the html/xml structure andsearch  replaces the attributes in the output string. Something likes/w18n:([w+\.])/${getString($1)/g(pseudo code only). The
properties file of course could only be with the the transformer orany container up the hierarchy. Currently I like this idea most. Inmost scenarios (RESPONSE_BUFFER) we cache the output string already.We'd simply kind of post process the output. Might as well be more
efficient (performance and memory) than any of the other solutions.JuergenOn 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote: the problem i see is are we going to check every tag's attribute (wicket
 component or not) for such a thing? And if it is not a wicket component we make it a special (none raw markup) tag? and if it is a wicket component already we just put a special object in the
 tags attributes? johan On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:  It'll give people choice though. Not everyone cares about
  previewability in the same fashion.   EelcoOn 5/9/06, Juergen Donnerstag [EMAIL PROTECTED]
  wrote:   I guess it depends on what job you are in. It is nice for the person   who has to maintain the properties. If I were a html designer I'd   rather prefer a default text like save or whatever, which btw
   applies if no property is found. Juergen On 5/9/06, Igor Vaynberg [EMAIL PROTECTED]
 wrote:why not? in a preview you would get a button with textwicket:i18n:buttons.save   thats good for preview since you can see the key!
   -Igor On 5/8/06, Juergen Donnerstag  
[EMAIL PROTECTED] wrote: It will not be previeable any more. Juergen On 5/9/06, Igor Vaynberg  
[EMAIL PROTECTED] wrote:  why not a format like this   input type=submit value=wicket:i18n: 
buttons.save/   or   input type=submit value=wi18n:buttons.save
/   -Igor On 5/8/06, Andrew Berman  
[EMAIL PROTECTED] wrote: Hey Guys, I think adding something to support localized attributes would
 be abig  plus.I know that when Wicket added wicket:message it really saved alot of  extra Java code on my part.I think the same thing would happen
 if wecame  up with something to do it in attributes.AttributeModifiers obviously  work, but when you have a lot of things you want to localize on
 the same  page it's a lot of extra Java code that needs to be written to supportthis  because you need to add the specific Component and add an
AttributeModifier. What about a compromise?I think the experimental stuff in  WicketMessageTagHandler is cumbersome to add to the HTML, so what
 if we  created a component whose sole purpose is to add attributes to some HTML  element.Or can this already be done like this:  
   Java:   add(new WebComponent(imageAlt).add(new  AttributeModifier(alt, true, new ResourceModel(
my.key; HTML:   img wicket:id=imageAlt src="" /  
   I haven't tested if this works, but if not, maybe some kind ofComponent  could be created which allows 

Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-05-09 Thread Johan Compagner
A ListChoice should always be a List instead of a DropDown (for a drop down we have the DropDownChoice)I don't know why you see a difference it shouldn't look at all to the model that holds the selection.It only looks at the choices:
tag.put(size, Math.min(maxRows, getChoices().size()));so i guess if maxRows of size() == 1 then it becomes a dropdown?johanOn 5/9/06, 
Nino Wael [EMAIL PROTECTED] wrote:













Hi



Im not sure if this is the intended functionality,
but I belive I've discovered an oddity or featureJ
. 



When I use the constructor which also takes a model (ListChoice(dropdown_job,
new Model(),myList, new myRenderer)) my listchoice is no longer displayed as a
dropdown but as a listbox. 



If I instead of using the constructor with the model property
call the set model method (listChoice_job.setModel(new Model())) then it
remains displayed as a dropdown 



Code snipplet:

// this gives a listbox

 listChoice_job
= new ListChoice(dropdown_job,new Model(),jobcenter.toArray().getList(),
new DataItemRenderer())



//this gives a dropdown

 listChoice_job
= new ListChoice(dropdown_job, jobcenter.toArray().getList(), new
DataItemRenderer())

 listChoice_job.setModel(new
Model());

Code snipplet end





It's that latter I want displayed.





-regards Nino










Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink

2006-05-09 Thread Rüdiger Schulz
Hello Igor

not sure how iframes behave here, but it is possible to call
javascript functions in one frame, which is defined in another frame,
which then again can do anything with the calling frame. Done this a
couple of years ago (when frames where still en vogue ;), but as it
turned out, nothing like that will be necessary to solve our problem
here :-)

-- 
greetings from Berlin,

Rüdiger Schulz


Igor Vaynberg wrote on 04.05.2006 at 19:28:

 i guess there can be a hidden iframe, but then the loaded js will
 not be part of the page because frames are isolated, no?

 -Igor


 On 5/4/06, Rüdiger Schulz [EMAIL PROTECTED] wrote:
 in that case i dont see how you can ever make this work in xhtml
 unless you refresh the entire page.

 A twisted solution using an invisible frame loading only JS comes to
 mind ;-)

 - Rüdiger



 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmdlnk kid0709 bid 3057 dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user









---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] component input handling

2006-05-09 Thread Ittay Dror
for me, it is hard to distinguish getInput from getInputAsArray. what use cases do you have of the returned array having more than 1 string? if that happens, why not use several components, each assigned an index, and still returning getInput (by getRequest().getParameters(name)[idx]). 


returning object can still be nice to allow getting input which is not from 
http (e.g, maybe RMI based components?)

what about convertedInput and rawInput? their use is hard to track. why not 
just have getConvertedInput, which can cache the data if it wants

ittay

Johan Compagner wrote:

Object?
ughh

Then we have to cast and or check for it everywhere. Because getInput() 
is used for a lot of things,
What it could be is always and String[] but then we just have 
getInputAsArray()

and i guess thats the method we should use as much as possible everywhere.
which we already do for the convertValue and so on.

if we fall to the Converter then we use plain getInput() but that is 
because for FormComponent
that specify type the input is always pure text. And if we give to that 
an array. Then the converter

will be much harder to build for people.

So when input comes in.
We use getInputAsArray() when components do the conversions themselfs
If there is a type specified we let the converter handle the conversion 
fron String-Type

and we use getInput()

And we want to change the converter interface so that it is something 
like this:


convertInput(String, Class);
convertValue(Object);

So that it is for developers much easier to build a converter and know 
what in and out going is.

Maybe we could make a
convertInput(String[], Class);
instead then it is all type save. And we can use the getInputAsArray() 
everywhere.


johan

On 5/9/06, * Ittay Dror* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


i don't see why there should be a getInputAsArray. it seems to me
there should be an 'Object getInput()', which will usually return
getRequest().getParameter(getInputName()), but for some components,
that for some reason require multiple inputs, it will
return  getRequest().getParameters(getInputName())

then, if there needs to be a conversion from that object to a String
(which i don't see why), then the converter needs to take care of it.



Johan Compagner wrote:
  rawinput should also be a string[] but the problem is if we
change that
  then getValue()/getRawInput() and maybe als getModelValue all should
  also change and that will affect a lot...
 
  johan
 
 
  On 5/9/06, *Igor Vaynberg*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
  i was just looking at that. i think we messed up a little bit
there.
  now that getinputasarray() is public i made getinput() go through
  that instead of request parameters directly.
 
  -Igor
 
 
 
  On 5/8/06, *Ittay Dror*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  on the off chance that not only igor is patient with this
thread
 
  i noticed that there is an inconsistency (in my view) in how
  input is handled:
  there's Component.getInput()
  then FormComponent.inputAsStringArray ()
  which is used to set
convertedInput - by convert()
  and
rawInput - by inputChanged()
 
  which are used all over the place. for example, getValue
returns
  the rawInput if it was set and getModelValue otherwise
(which,
  btw, uses the converter directly, rather than calling
  convert()). this may cause surprises.
 
  for convertedInput, i think it should be considered a
caching
  value. the method getConvertedInput() should check it, if
it is
  null, it does the conversion and sets it. it then returns it.
  calling 'convert' explicitely from other places is not
needed.
  whoever needs a converted input should call
getConvertedInput.
 
  i don't know about rawInput, and why it is used, so i can't
  comment much, but i also think it should be used as cached
  value. it seems odd though, that getInput is not 'raw'
enough.
 
  of course inputChanged should just invalidate the caches.
 
  ittay
 
 
 
  Ittay Dror wrote:
  
  
Ittay Dror wrote:
   
   
Ittay Dror wrote:
   
   
Igor Vaynberg wrote:
and how do i validate the resulting value? in
  updateModel, if i
find
the combined 

Re: [Wicket-user] changing images with Ajax

2006-05-09 Thread Johan Compagner
still the question remains how random is random ;)On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
just checked it into corethe param looks like this wicket:antiCache=random
-IgorOn 5/8/06, 
Bruno Borges 
[EMAIL PROTECTED] wrote:This could go to Wicket Core. But before this happens, one note:
The 'rand' parameter should be renamed to something like .wicket_rand. 'rand' is too simple... :)Regardsm
On 5/8/06, Eelco Hillenius 

[EMAIL PROTECTED] wrote:
Fine with me. If something thinks of a nice API.EelcoOn 5/8/06, Martijn Dashorst [EMAIL PROTECTED]
 wrote: This seems common enough, shouldn't we add this to core (of course, only
 when it works :-))? Martijn On 5/8/06, Igor Vaynberg  

[EMAIL PROTECTED] wrote:   try this:
   Image image = new Image(image, resource) { protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); String src=
"">  src="">  tag.set(src, src);  };   if it works you can encapsulate it into a NonCachingImage or something
-Igor  On 5/8/06, Potje rode kool  

[EMAIL PROTECTED] wrote:
 How are you adding those parameters the the image URL?   In html I have an image tag like this: img wicket:id=image/
 and in code: Resource resource =    Image image = new Image(image, resource); I also tried:
 Image image = new Image(image, new Model(/images/sunshine.png)); But than it tries to find the images in the package (as package
 resource). How can I simple create an Image object which loads the image relative from the webcontext root, and how do I add a random parameter so that the browser
   will allways reload the image. Thanks,   Evert   2006/5/7, Anatol Pomozov  


[EMAIL PROTECTED]: I usually do such thing   /path_to_img.png?random_number   
so example image path is /images/logo.png?32342342342 or /images/logo.png?rand=32342342342 On 5/7/06, Bruno Borges 
[EMAIL PROTECTED] wrote: Make random URLs for the image. You can do that simply adding dummy
 parameters, like /image.ext?foo=bar1, bar2, bar3... etc. The browser cache
 resources per URL. I think this will work. See ya
 On 5/7/06, Igor Vaynberg [EMAIL PROTECTED]
 wrote:   well, if the browser ignores that then you should change the url.
-Igor
  On 5/7/06, Potje rode kool  [EMAIL PROTECTED] wrote:
 Yes, its a caching problem, when I disable caching in Firefox
 (doing this with the web developer toolbar) it works fine.   How do I add those headers for the images I want to disable caching for.I tried to set some headers on my WebResource subclass
   I use like this: response.setDateHeader(Expires, System.currentTimeMillis());

   response.setHeader(Cache-Control, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0);  
   But that doesn't seems to work. Thanks in advance,   Evert  
   2006/5/7, Igor Vaynberg  

[EMAIL PROTECTED]:
 are you updating img's src attribute in the ajax call? or is the image streamed from somewhere and reflects a property you changed with
 ajax?   the first should work   the lettter might not unless the url changes - because the
 browser would have the cached version and no reason to reload it. so you either have to update the url and add a rand=randomnumber parameter to force the browser to reload the image or add no-cache no-store headers when
 you are streaming the image.  -Igor  
  On 5/6/06, Potje rode kool 

[EMAIL PROTECTED]
 wrote: Hi, I am trying to change an image after an AjaxLink is clicked
 but I can't get it working. The images are on a Panel, when I click on the AjaxLink I create a new Panel and replace the old one (by calling getPage().replace(Component) ).
 I also have put an Label on the Panel and the Label gets updated when I click on the AjaxLink, but not the images.


 Do I have to do something extra to let images update or does Wicket doesn't support updating images by Ajax? Thanks in advance.
 Evert  

 -- Bruno Borges 

[EMAIL PROTECTED]
 Sun Certified Java Programmer for 1.4 Sun Certified Web Component Developer for 1.4
--anatol ( http://pomozov.info)

 -- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_! -- http://wicketframework.org
---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642

Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

On 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:

I think 1 is much more performant when it isn't a wicket component
because then the markup is stored under a locale and that markup is
preparsed for everything.
Can't be faster then that.


That is how WicketMessageTagHandler works today. It merely replaces
the attribute's value. But contrary to what I wrote we don't need to
create AMs for tags with wicket:id. It actually doesn't matter if
wicket:id exists or not. We simply change the attributes value.



3 is by far the worst when it comes done to performance. Because we have to
do it everytime for every request
even if there isn't a tag like that.. And if it is then we have to
manipulate (string concatting and copying) the buffer
And it can only be done when the person does buffer the response...



I don't think the performance is that much worse.
Yes we have to do it for all requests, but only than you can change
your properties on the fly. Else you'd have to remove the entry from
the markup cache to force markup reloading.
String manipulation I'd guess is about the same in all 3 scenarios.
Your last point is wrong. Transformers are independent from the
RESPONSE_BUFFER settings.


If we store the markup under the locale and the markup is parsed for that
locale and all resources are inserted into
the markup. Then it doesn't matter if it is a wicket component tag or not.
Just set the right attribute value into the
Component tag attribute. (if a developer alters that again it is his doing)
Then we only parse once and we have the right markup file per locale.



true, see above.
Hot deplyoment of properties files would require clearing the cache
(not true, but everything else seems far to complicated)


The problem with resources changes can be fixed if we monitor resource
changes and just delete the markup then
(as a whole or maybe a part if we can make the links)



you need to remove all markups which make use of the properties files
and that could potentially be every child component. Even worse, the
algorithm would be tied to the logic we use to find properties. That
logic however will become even more flexible in 1.2 meaning that you
can not rely on it all to remove the markup cache entries. IMO it'd be
sufficient to clear the whole cache and avoid these troubles all
together.

Juergen


johan



On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:

We do something similar for autolinks already. Actually I think there
at least 3 solutions:
1) If no wicket:id is present than replace the attribute on the fly
and add it to the markup stream as if it were RawMarkup. Con: changes
to the properties at runtime are not taken into account. Tags with
wicket:id are treated as below.
2) Automatically create a WebMarkupContainer for all tags without
wicket:id but with such attributes and auto-attach an
AttributeModifier. If wicket:id already exists, than auto-attach the
AttributeModifier to the already existing component. Con: you
auto-create plenty more Containers and the debug page is filled with
automatically created components.
3) A 3rd option could by an OutputTransformer kind of
Component/Behavior which simply ignores the html/xml structure and
search  replaces the attributes in the output string. Something like
s/w18n:([w+\.])/${getString($1)/g  (pseudo code only).
The
properties file of course could only be with the the transformer or
any container up the hierarchy. Currently I like this idea most. In
most scenarios (RESPONSE_BUFFER) we cache the output string already.
We'd simply kind of post process the output. Might as well be more
efficient (performance and memory) than any of the other solutions.

Juergen

On 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:
 the problem i see is are we going to check every tag's attribute (wicket
 component or not) for such a thing?

 And if it is not a wicket component we make it a special (none raw markup)
 tag?
 and if it is a wicket component already we just put a special object in
the
 tags attributes?

 johan



 On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  It'll give people choice though. Not everyone cares about
  previewability in the same fashion.
 
  Eelco
 
 
  On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED]  wrote:
   I guess it depends on what job you are in. It is nice for the person
   who has to maintain the properties. If I were a html designer I'd
   rather prefer a default text like save or whatever, which btw
   applies if no property is found.
  
   Juergen
  
   On 5/9/06, Igor Vaynberg [EMAIL PROTECTED]  wrote:
why not? in a preview you would get a button with text
wicket:i18n:buttons.save
   
thats good for preview since you can see the key!
   
-Igor
   
   
   
On 5/8/06, Juergen Donnerstag  [EMAIL PROTECTED] wrote:
 It will not be previeable any more.

 Juergen

 On 5/9/06, Igor Vaynberg  [EMAIL PROTECTED] wrote:
  why not a format like this
 
  input type=submit 

Re: [Wicket-user] component input handling

2006-05-09 Thread Johan Compagner
there are several components in html that return multipy entriesfor example ListMultiplyChoice (SELECT tag) or Checkboxes withing the same group.convertedinput and rawinput are 2 completely seperate things.
rawinput really caches the raw string data. So that forms can render themselfs again without doing any validation or conversion.ConvertedInput is only there when required check is ok and the conversion did work. After that the validators will be runned.
rawinput for example is used to cache some results between 2 page loads. With the help of an Button that has the DefaultFormProcessing boolean on false.johanOn 5/9/06, 
Ittay Dror [EMAIL PROTECTED] wrote:
for me, it is hard to distinguish getInput from getInputAsArray. what use cases do you have of the returned array having more than 1 string? if that happens, why not use several components, each assigned an index, and still returning getInput (by getRequest().getParameters(name)[idx]).
returning object can still be nice to allow getting input which is not from http (e.g, maybe RMI based components?)what about convertedInput and rawInput? their use is hard to track. why not just have getConvertedInput, which can cache the data if it wants
ittayJohan Compagner wrote: Object? ughh Then we have to cast and or check for it everywhere. Because getInput() is used for a lot of things, What it could be is always and String[] but then we just have
 getInputAsArray() and i guess thats the method we should use as much as possible everywhere. which we already do for the convertValue and so on. if we fall to the Converter then we use plain getInput() but that is
 because for FormComponent that specify type the input is always pure text. And if we give to that an array. Then the converter will be much harder to build for people. So when input comes in.
 We use getInputAsArray() when components do the conversions themselfs If there is a type specified we let the converter handle the conversion fron String-Type and we use getInput()
 And we want to change the converter interface so that it is something like this: convertInput(String, Class); convertValue(Object); So that it is for developers much easier to build a converter and know
 what in and out going is. Maybe we could make a convertInput(String[], Class); instead then it is all type save. And we can use the getInputAsArray() everywhere. johan
 On 5/9/06, * Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: i don't see why there should be a getInputAsArray. it seems to me
 there should be an 'Object getInput()', which will usually return getRequest().getParameter(getInputName()), but for some components, that for some reason require multiple inputs, it will
 returngetRequest().getParameters(getInputName()) then, if there needs to be a conversion from that object to a String (which i don't see why), then the converter needs to take care of it.
 Johan Compagner wrote: rawinput should also be a string[] but the problem is if we change that then getValue()/getRawInput() and maybe als getModelValue all should
 also change and that will affect a lot... johan On 5/9/06, *Igor Vaynberg*  
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote: i was just looking at that. i think we messed up a little bit there.
 now that getinputasarray() is public i made getinput() go through that instead of request parameters directly. -Igor
 On 5/8/06, *Ittay Dror*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: on the off chance that not only igor is patient with this
 thread i noticed that there is an inconsistency (in my view) in how input is handled: there's Component.getInput
() then FormComponent.inputAsStringArray () which is used to set convertedInput - by convert() and rawInput - by inputChanged()
 which are used all over the place. for example, getValue returns the rawInput if it was set and getModelValue otherwise (which,
 btw, uses the converter directly, rather than calling convert()). this may cause surprises. for convertedInput, i think it should be considered a
 caching value. the method getConvertedInput() should check it, if it is null, it does the conversion and sets it. it then returns it. calling 'convert' explicitely from other places is not
 needed. whoever needs a converted input should call getConvertedInput. i don't know about rawInput, and why it is used, so i can't
 comment much, but i also think it should be used as cached value. it seems odd though, that getInput is not 'raw' enough. of course inputChanged should just invalidate the caches.
 ittay Ittay Dror wrote:   Ittay Dror wrote:
   Ittay Dror wrote:   Igor Vaynberg wrote:
   and how do i validate the resulting value? in updateModel, if i   find   the combined value is not right, there's not
 much i can do. you mean the sum of correct pieces is not always correct itself?!?
   you can create a validator that performs the same 

Re: [Wicket-user] Localization

2006-05-09 Thread Johan Compagner
 3 is by far the worst when it comes done to performance. Because we have to
 do it everytime for every request even if there isn't a tag like that.. And if it is then we have to manipulate (string concatting and copying) the buffer And it can only be done when the person does buffer the response...
I don't think the performance is that much worse.i think it will. Because you have to scan really every output everytime for to find if it has toreplace something. And if it has to replace something then it concats and copies
large strings (pages can become easily 25 100KB)That generates a lot of garbage We could optimze it a bit by using our AppendingStringBuffer for manipulation outputSo we just alter the internal string array by giving that class replace(String toSearch, String replaceString) methods 
then we search for the toSearch string and we alter the internal array with the replace string 
Yes we have to do it for all requests, but only than you can changeyour properties on the fly. Else you'd have to remove the entry fromthe markup cache to force markup reloading.String manipulation I'd guess is about the same in all 3 scenarios.
Your last point is wrong. Transformers are independent from theRESPONSE_BUFFER settings.I wasn't talking about transformers. I was talking about Filters. Filters runover the complete output of the page after it is rendered.
And if you use a transformer for that over the completel page.. Then that is the sameas the Response_Buffer setting...Because you do buffer then completely.by the way we really should depricate this:public abstract CharSequence transform(final Component component, final String output)
and make it:public abstract CharSequence transform(final Component component, final CharSequence output)orpublic abstract AppendingStringBuffer transform(final Component component, final AppendingStringBuffer output)
Because when no transformation happens then the toString() is a wasteand the transform method can do the alterations in the appendingstringbuffer itself.
 If we store the markup under the locale and the markup is parsed for that locale and all resources are inserted into the markup. Then it doesn't matter if it is a wicket component tag or not. Just set the right attribute value into the
 Component tag attribute. (if a developer alters that again it is his doing) Then we only parse once and we have the right markup file per locale.true, see above.Hot deplyoment of properties files would require clearing the cache
(not true, but everything else seems far to complicated)yes i agree clear the cache completely. It is most of the time developerment mode only.I want speed and performance when i am in production.
Ofcourse also then we could have properties comming from a database that should be reflected on a page..But somehow something must be reloaded then and that can clear the cache.johan


Re: [Wicket-user] component input handling

2006-05-09 Thread Ittay Dror



Johan Compagner wrote:

there are several components in html that return multipy entries
for example ListMultiplyChoice (SELECT tag) or Checkboxes withing the 
same group.


convertedinput and rawinput are 2 completely seperate things.
rawinput really caches the raw string data. So that forms can render 
themselfs again without doing any validation or conversion.


why not use getInput()? why not have getInput() use rawInput internally, for 
caching?



ConvertedInput is only there when required check is ok and the 
conversion did work. After that the validators will be runned.


my suggestion is to not access convertedInput anywhere but in 
getConvertedInput. the validators will run on the result by getConvertedInput. 
you can return null, or throw exception, or some special String reference to 
show errors in conversion.




rawinput for example is used to cache some results between 2 page loads. 
With the help of an Button that has the DefaultFormProcessing boolean on 
false.



johan


On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


for me, it is hard to distinguish getInput from getInputAsArray.
what use cases do you have of the returned array having more than 1
string? if that happens, why not use several components, each
assigned an index, and still returning getInput (by
getRequest().getParameters(name)[idx]).

returning object can still be nice to allow getting input which is
not from http (e.g, maybe RMI based components?)

what about convertedInput and rawInput? their use is hard to track.
why not just have getConvertedInput, which can cache the data if it
wants

ittay

Johan Compagner wrote:
  Object?
  ughh
 
  Then we have to cast and or check for it everywhere. Because
getInput()
  is used for a lot of things,
  What it could be is always and String[] but then we just have
  getInputAsArray()
  and i guess thats the method we should use as much as possible
everywhere.
  which we already do for the convertValue and so on.
 
  if we fall to the Converter then we use plain getInput() but that is
  because for FormComponent
  that specify type the input is always pure text. And if we give
to that
  an array. Then the converter
  will be much harder to build for people.
 
  So when input comes in.
  We use getInputAsArray() when components do the conversions themselfs
  If there is a type specified we let the converter handle the
conversion
  fron String-Type
  and we use getInput()
 
  And we want to change the converter interface so that it is something
  like this:
 
  convertInput(String, Class);
  convertValue(Object);
 
  So that it is for developers much easier to build a converter and
know
  what in and out going is.
  Maybe we could make a
  convertInput(String[], Class);
  instead then it is all type save. And we can use the
getInputAsArray()
  everywhere.
 
  johan
 
  On 5/9/06, * Ittay Dror* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  i don't see why there should be a getInputAsArray. it seems
to me
  there should be an 'Object getInput()', which will usually return
  getRequest().getParameter(getInputName()), but for some
components,
  that for some reason require multiple inputs, it will
  return  getRequest().getParameters(getInputName())
 
  then, if there needs to be a conversion from that object to a
String
  (which i don't see why), then the converter needs to take
care of it.
 
 
 
  Johan Compagner wrote:
rawinput should also be a string[] but the problem is if we
  change that
then getValue()/getRawInput() and maybe als getModelValue
all should
also change and that will affect a lot...
   
johan
   
   
On 5/9/06, *Igor Vaynberg*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   
i was just looking at that. i think we messed up a
little bit
  there.
now that getinputasarray() is public i made getinput()
go through
that instead of request parameters directly.
   
-Igor
   
   
   
On 5/8/06, *Ittay Dror*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

I solved this some time ago with own preprocessor that replaces
${key} with the value from property files.

I know this is not very wicket-like, but the markup looks much simpler 
with ${key} then with wicket:message key=key/wicket:message


-Matej

Igor Vaynberg wrote:
why not? in a preview you would get a button with text 
wicket:i18n:buttons.save


thats good for preview since you can see the key!

-Igor


On 5/8/06, * Juergen Donnerstag* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


It will not be previeable any more.

Juergen

On 5/9/06, Igor Vaynberg [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  why not a format like this
 
  input type=submit value=wicket:i18n: buttons.save/
 
  or
 
  input type=submit value=wi18n:buttons.save/
 
  -Igor
 
 
 
  On 5/8/06, Andrew Berman  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
   Hey Guys,
  
   I think adding something to support localized attributes would
be a big
  plus.  I know that when Wicket added wicket:message it really
saved a lot of
  extra Java code on my part.  I think the same thing would happen
if we came
  up with something to do it in attributes.  AttributeModifiers
obviously
  work, but when you have a lot of things you want to localize on
the same
  page it's a lot of extra Java code that needs to be written to
support this
  because you need to add the specific Component and add an
AttributeModifier.
  
   What about a compromise?  I think the experimental stuff in
  WicketMessageTagHandler is cumbersome to add to the HTML, so what
if we
  created a component whose sole purpose is to add attributes to
some HTML
  element.  Or can this already be done like this:
  
   Java:
   add(new WebComponent(imageAlt).add(new
  AttributeModifier(alt, true, new ResourceModel(my.key;
  
   HTML:
   img wicket:id=imageAlt src=mySrc /
  
   I haven't tested if this works, but if not, maybe some kind of
Component
  could be created which allows something like this.  It will allow for
  multiple attributes to be replaced as well.
  
   Thoughts?
  
  
   --Andrew
  
  
  
   On 5/4/06, Juergen Donnerstag  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
On 5/4/06, Ralf Ebert [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 Hi Juergen,

  please see WicketMessageTagHandler.java. It is
experimental only and
  disabled by default. Reason: it is realy ugly to have
something like
  wicket:example=tag=key. AttributeModifier are much more
convinent
  and far less ugly, IMO.
 if you have a page with like, say, 20 labels with static
text (like
 you have sometimes in complex forms for explaining things)
I don't see
 something to win by adding AttributeModifiers to the
component tree. I
 see localization of static text as markup issue because
there is
 almost no logic to define there. The format you described
is rather
 ugly, that's right: What about:
 div wicket:message=blaLabelbla/div (if you want
  to go the
 message as text between the tags)
   
this is wicket:message
  value=xxxdefault/wicket:message and
already available.
   
 input type=submit wicket:message:value=Do something/
(for
 localizing the attribute value, probably the second : is
not valid xml
 any more, but another separation char like _ or  maybe no
separation
 char at all could be used)

   
It is all not realy nice, isn't it? That is what we struggled
with. We
didn't find a syntax which we realy liked and which is standards
compliant ( e.g. XML namespace, schema).
   
 This would be very helpful for quick  easy localization of
static
 content in pages, something that's missing at the moment
from my point
 of view. Tell me what you think, if I have time I would like to
 implement this and contribute it...

   
your help is very much appreciated but the syntax should be
right.
   
  That is default. Localizer implements a search hierarchy
up the
  component tree. You only need one properties files per
language per
  Panel which contains X number of component. Thinking ...
That is not
  your question, isn't it? Like Application.properties is
the last
  resort for all messages, you ask for one per java
package, right?
  So,
  in addition to the my.pkg.MyPanel.properties it should
look in
  my/pkg/Wicket.properties as well (may be
Wicket.properties is not
  the
  best name).
 

Re: [Wicket-user] Localization

2006-05-09 Thread Johan Compagner
That is also a possibiltyThat we pre process the markup even before the markup parser handles it.Then we just replace all wicket:i18n:key:XX (or whatever we call it) and then parse the markup.johan
On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
I solved this some time ago with own preprocessor that replaces${key} with the value from property files.I know this is not very wicket-like, but the markup looks much simplerwith ${key} then with wicket:message key=key/wicket:message
-MatejIgor Vaynberg wrote: why not? in a preview you would get a button with text wicket:i18n:buttons.save thats good for preview since you can see the key!
 -Igor On 5/8/06, * Juergen Donnerstag* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote: It will not be previeable any more. Juergen On 5/9/06, Igor Vaynberg [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote: why not a format like this input type=submit value=wicket:i18n: 
buttons.save/ or input type=submit value=wi18n:buttons.save/ -Igor
 On 5/8/06, Andrew Berman  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote:   Hey Guys,   I think adding something to support localized attributes would be a big plus.I know that when Wicket added wicket:message it really
 saved a lot of extra Java code on my part.I think the same thing would happen if we came up with something to do it in attributes.AttributeModifiers obviously
 work, but when you have a lot of things you want to localize on the same page it's a lot of extra Java code that needs to be written to support this because you need to add the specific Component and add an
 AttributeModifier.   What about a compromise?I think the experimental stuff in WicketMessageTagHandler is cumbersome to add to the HTML, so what
 if we created a component whose sole purpose is to add attributes to some HTML element.Or can this already be done like this:   Java:
  add(new WebComponent(imageAlt).add(new AttributeModifier(alt, true, new ResourceModel(my.key;   HTML:
  img wicket:id=imageAlt src="" /   I haven't tested if this works, but if not, maybe some kind of Component
 could be created which allows something like this.It will allow for multiple attributes to be replaced as well.   Thoughts? 
   --Andrew On 5/4/06, Juergen Donnerstag  
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:   On 5/4/06, Ralf Ebert 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:Hi Juergen,please see 
WicketMessageTagHandler.java. It is experimental only and disabled by default. Reason: it is realy ugly to have something like wicket:example=tag=key. AttributeModifier are much more
 convinent and far less ugly, IMO.if you have a page with like, say, 20 labels with static text (likeyou have sometimes in complex forms for explaining things)
 I don't seesomething to win by adding AttributeModifiers to the component tree. Isee localization of static text as markup issue because
 there isalmost no logic to define there. The format you described is ratherugly, that's right: What about:div wicket:message=blaLabelbla/div (if you want
 to go themessage as text between the tags) this is wicket:message value=xxxdefault/wicket:message and
   already available.  input type=submit wicket:message:value=Do something/ (forlocalizing the attribute value, probably the second : is
 not valid xmlany more, but another separation char like _ ormaybe no separationchar at all could be used)   
 It is all not realy nice, isn't it? That is what we struggled with. We   didn't find a syntax which we realy liked and which is standards
   compliant ( e.g. XML namespace, schema).  This would be very helpful for quick  easy localization of staticcontent in pages, something that's missing at the moment
 from my pointof view. Tell me what you think, if I have time I would like toimplement this and contribute it...   
 your help is very much appreciated but the syntax should be right.   That is default. Localizer implements a search hierarchy
 up the component tree. You only need one properties files per language per Panel which contains X number of component. Thinking ...
 That is not your question, isn't it? Like Application.properties is the last resort for all messages, you ask for one per java
 package, right? So, in addition to the my.pkg.MyPanel.properties it should look in my/pkg/Wicket.properties as well (may be
 Wicket.properties is not the best name).That's what I want to do and it would be a nice feature if such a
lookup strategy could be added by just setting an option and defininga name for the property file. I tried to do it quick myself butstopped after finding out that the property file name is
 quite tightlycoupled to some class name for the moment...It is fairly easy to add. Please see
 Settings.addStringResourceLoader,   Application.getResourceStreamLocator and   CompoundResourceStreamLocator.java Let me know 

Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

So far I can say it works well for me.
The only problematic (or cumbersome) thing was that I had to make my own 
 ResourceStreamLocator and ResourceStream to have this done.

Having some kind of preprocessing filters (with methods like

   String processString(String)   or

   InputStream processStream(Input Stream)

would be enough);

-Matej


Johan Compagner wrote:

That is also a possibilty
That we pre process the markup even before the markup parser handles it.
Then we just replace all wicket:i18n:key:XX (or whatever we call it) 
and then parse the markup.


johan


On 5/9/06, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

I solved this some time ago with own preprocessor that replaces
${key} with the value from property files.

I know this is not very wicket-like, but the markup looks much simpler
with ${key} then with wicket:message key=key/wicket:message

-Matej

Igor Vaynberg wrote:
  why not? in a preview you would get a button with text
  wicket:i18n:buttons.save
 
  thats good for preview since you can see the key!
 
  -Igor
 
 
  On 5/8/06, * Juergen Donnerstag* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
  It will not be previeable any more.
 
  Juergen
 
  On 5/9/06, Igor Vaynberg [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
why not a format like this
   
input type=submit value=wicket:i18n: buttons.save/
   
or
   
input type=submit value=wi18n:buttons.save/
   
-Igor
   
   
   
On 5/8/06, Andrew Berman  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 Hey Guys,

 I think adding something to support localized attributes
would
  be a big
plus.  I know that when Wicket added wicket:message it really
  saved a lot of
extra Java code on my part.  I think the same thing would
happen
  if we came
up with something to do it in attributes.  AttributeModifiers
  obviously
work, but when you have a lot of things you want to
localize on
  the same
page it's a lot of extra Java code that needs to be written to
  support this
because you need to add the specific Component and add an
  AttributeModifier.

 What about a compromise?  I think the experimental stuff in
WicketMessageTagHandler is cumbersome to add to the HTML,
so what
  if we
created a component whose sole purpose is to add attributes to
  some HTML
element.  Or can this already be done like this:

 Java:
 add(new WebComponent(imageAlt).add(new
AttributeModifier(alt, true, new ResourceModel(my.key;

 HTML:
 img wicket:id=imageAlt src=mySrc /

 I haven't tested if this works, but if not, maybe some
kind of
  Component
could be created which allows something like this.  It
will allow for
multiple attributes to be replaced as well.

 Thoughts?


 --Andrew



 On 5/4/06, Juergen Donnerstag 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  On 5/4/06, Ralf Ebert  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
   Hi Juergen,
  
please see WicketMessageTagHandler.java. It is
  experimental only and
disabled by default. Reason: it is realy ugly to have
  something like
wicket:example=tag=key. AttributeModifier are
much more
  convinent
and far less ugly, IMO.
   if you have a page with like, say, 20 labels with static
  text (like
   you have sometimes in complex forms for explaining
things)
  I don't see
   something to win by adding AttributeModifiers to the
  component tree. I
   see localization of static text as markup issue
because
  there is
   almost no logic to define there. The format you
described
  is rather
   ugly, that's right: What about:
   div wicket:message=blaLabelbla/div (if you want
to go the
   message as text between the tags)
   

Re: [Wicket-user] component input handling

2006-05-09 Thread Johan Compagner
 convertedinput and rawinput are 2 completely seperate things. rawinput really caches the raw string data. So that forms can render
 themselfs again without doing any validation or conversion.why not use getInput()? why not have getInput() use rawInput internally, for caching?Thats what getValue() is for.getInput and getInputArray is just an abstraction for the request params.
rawinput sits between the model object and the inputIt is not really input it is more output, it overrides the model value (see getValue()) Maybe getInput() could use that value if it is set, i don't think that would be a big problem
i can't think of an situation that rawinput would override new input then when calling getInput()only problem is that rawinput != exactly getInput because rawinput == getInputAsArray() concatted.So i gues we then first need to make rawinput a String[] (as i said before)
and let getInputArray() return the rawinput array when set. ConvertedInput is only there when required check is ok and the
 conversion did work. After that the validators will be runned.my suggestion is to not access convertedInput anywhere but in getConvertedInput. the validators will run on the result by getConvertedInput. you can return null, or throw exception, or some special String reference to show errors in conversion.
that is the case.convertedInput will only be set in the right places and it will only be read in the getConvertedInput() johan


Re: [Wicket-user] How to overrite Application.properties properly?

2006-05-09 Thread Bruno Borges
I found the problem. BIOS... (In portuguese, means: Stupid Ignorant Operating the System)... :)On 5/9/06, Martijn Dashorst 
[EMAIL PROTECTED] wrote:
foo/pkg/ MyWebApplication.properties MyWebApplication.javafoo/pkg/pages FooPage.properties FooPage.html
 FooPage.javaShould work. Can you see if you can reproduce in a wicket quickstart?Martijn
On 5/9/06, Bruno Borges 
[EMAIL PROTECTED] wrote:I have changed the TypeValidator message, in several ways:
foo/pkg/ MyWebApplication.properties MyWebApplication.java Application.propertiesfoo/pkg/pages FooPage.properties FooPage.html
 FooPage.javaNone of these have worked. :/-- Bruno Borges

[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 
1.4

-- Wicket 1.2 is coming! Write Ajax applications without touching _javascript_!-- 
http://wicketframework.org

-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 
1.4


[Wicket-user] What should be used: PatternValidator or MaskConverter/MaskFormatter ?

2006-05-09 Thread Bruno Borges
What's the difference between these two components and where they fit better?-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 
1.4Sun Certified Web Component Developer for 1.4


Re: [Wicket-user] changing images with Ajax

2006-05-09 Thread Matej Knopp

Johan Compagner wrote:

still the question remains how random is random ;)

right. maybe one shared atomically increased integer would do better job?


On 5/9/06, *Igor Vaynberg* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


just checked it into core

the param looks like this wicket:antiCache=random

-Igor



On 5/8/06, * Bruno Borges*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

This could go to Wicket Core. But before this happens, one note:

The 'rand' parameter should be renamed to something like
.wicket_rand. 'rand' is too simple... :)

Regardsm


On 5/8/06, *Eelco Hillenius*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

Fine with me. If something thinks of a nice API.

Eelco

On 5/8/06, Martijn Dashorst [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  This seems common enough, shouldn't we add this to core
(of course, only
  when it works :-))?

  Martijn



  On 5/8/06, Igor Vaynberg  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
   try this:
  
   Image image = new Image(image, resource) {
  protected void onComponentTag(final ComponentTag tag) {
  super.onComponentTag(tag);
String src= tag.getAttributes().get(src);
 src=src+rand=+Math.random();
 tag.set(src, src);
   };
  
   if it works you can encapsulate it into a
NonCachingImage or something
  
  
   -Igor
  
  
  
  
   On 5/8/06, Potje rode kool  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   
How are you adding those parameters the the image URL?
In html I have an image tag like this:
   
img wicket:id=image/
   
and in code:
   
Resource resource = 
Image image = new Image(image, resource);
   
I also tried:
   
Image image = new Image(image, new
Model(/images/sunshine.png));
   
But than it tries to find the images in the package
(as package
  resource).
   
How can I simple create an Image object which loads
the image relative
  from the webcontext root, and how do I add a random
parameter so that the
  browser
will allways reload the image.
   
Thanks,
Evert
   
   
2006/5/7, Anatol Pomozov  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]:
   

 I usually do such thing

 /path_to_img.png?random_number

 so example image path is /images/logo.png?32342342342 or
  /images/logo.png?rand=32342342342



 On 5/7/06, Bruno Borges  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
  Make random URLs for the image. You can do that
simply adding dummy
  parameters, like /image.ext?foo=bar1, bar2, bar3... etc.
The browser cache
  resources per URL.
 
  I think this will work.
 
  See ya
 
 
 
  On 5/7/06, Igor Vaynberg [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
   well, if the browser ignores that then you
should change the url.
  
  
   -Igor
  
  
  
  
   On 5/7/06, Potje rode kool 
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   
Yes, its a caching problem, when I disable
caching in Firefox
  (doing this with the web developer toolbar) it works fine.
How do I add those headers for the images I
want to disable
  caching for.  I tried to set some headers on my
WebResource subclass
I use like this:
   
response.setDateHeader(Expires,
  System.currentTimeMillis());

Re: [Wicket-user] What should be used: PatternValidator or MaskConverter/MaskFormatter ?

2006-05-09 Thread Johan Compagner
The difference is that a validator only does it job when data comes in.A converter also works on data that goes out.And the difference in incomming data isn't that great, they are doing the same thing.Except thata converter throws an conversion exception and that will be a TypeValidator error message
and a validator will throw its own message with its own name.johanOn 5/9/06, Bruno Borges 
[EMAIL PROTECTED] wrote:What's the difference between these two components and where they fit better?
-- Bruno Borges[EMAIL PROTECTED]
Sun Certified Java Programmer for 
1.4Sun Certified Web Component Developer for 1.4




Re: [Wicket-user] Localization

2006-05-09 Thread Bruno Borges
Sure it works, but... if Wicket is going to have ${key}... ${something} in htmls, let's go back to JSP 2.0 and use EL... just a thoughtOn 5/9/06, Matej Knopp
 [EMAIL PROTECTED] wrote:So far I can say it works well for me.
The only problematic (or cumbersome) thing was that I had to make my ownResourceStreamLocator and ResourceStream to have this done.Having some kind of preprocessing filters (with methods likeString processString(String) or
InputStream processStream(Input Stream)would be enough);-MatejJohan Compagner wrote: That is also a possibilty That we pre process the markup even before the markup parser handles it.
 Then we just replace all wicket:i18n:key:XX (or whatever we call it) and then parse the markup. johan On 5/9/06, *Matej Knopp* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I solved this some time ago with own preprocessor that replaces ${key} with the value from property files.
 I know this is not very wicket-like, but the markup looks much simpler with ${key} then with wicket:message key=key/wicket:message -Matej
 Igor Vaynberg wrote: why not? in a preview you would get a button with text wicket:i18n:buttons.save thats good for preview since you can see the key!
 -Igor On 5/8/06, * Juergen Donnerstag* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote: It will not be previeable any more. Juergen On 5/9/06, Igor Vaynberg 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: why not a format like this
 input type=submit value=wicket:i18n: buttons.save/ or input type=submit value=wi18n:
buttons.save/ -Igor On 5/8/06, Andrew Berman  
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:   Hey Guys,   I think adding something to support localized attributes
 would be a big plus.I know that when Wicket added wicket:message it really saved a lot of extra Java code on my part.I think the same thing would
 happen if we came up with something to do it in attributes.AttributeModifiers obviously work, but when you have a lot of things you want to
 localize on the same page it's a lot of extra Java code that needs to be written to support this because you need to add the specific Component and add an
 AttributeModifier.   What about a compromise?I think the experimental stuff in WicketMessageTagHandler is cumbersome to add to the HTML,
 so what if we created a component whose sole purpose is to add attributes to some HTML element.Or can this already be done like this:
   Java:  add(new WebComponent(imageAlt).add(new AttributeModifier(alt, true, new ResourceModel(
my.key;   HTML:  img wicket:id=imageAlt src="" / 
  I haven't tested if this works, but if not, maybe some kind of Component could be created which allows something like this.It
 will allow for multiple attributes to be replaced as well.   Thoughts?  
  --Andrew On 5/4/06, Juergen Donnerstag  
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:   On 5/4/06, Ralf Ebert  
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote:Hi Juergen,please see 
WicketMessageTagHandler.java. It is experimental only and disabled by default. Reason: it is realy ugly to have something like
 wicket:example=tag=key. AttributeModifier are much more convinent and far less ugly, IMO.
if you have a page with like, say, 20 labels with static text (likeyou have sometimes in complex forms for explaining
 things) I don't seesomething to win by adding AttributeModifiers to the component tree. Isee localization of static text as markup issue
 because there isalmost no logic to define there. The format you described is ratherugly, that's right: What about:
div wicket:message=blaLabelbla/div (if you want to go themessage as text between the tags)
 this is wicket:message value=xxxdefault/wicket:message and   already available.
  input type=submit wicket:message:value=Do something/ (forlocalizing the attribute value, probably the second
 : is not valid xmlany more, but another separation char like _ ormaybe no separationchar at all could be used)
It is all not realy nice, isn't it? That is what we struggled with. We
   didn't find a syntax which we realy liked and which is standards   compliant ( e.g. XML namespace, schema).  
This would be very helpful for quick  easy localization of staticcontent in pages, something that's missing at the
 moment from my pointof view. Tell me what you think, if I have time I would like toimplement this and contribute it...
your help is very much appreciated but the syntax should be right.
   That is default. Localizer implements a search hierarchy up the component tree. You only need one properties files per
 language per Panel which contains X number of component. 

Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Bruno Borges wrote:
This is completely different. ${key} is simply replaced by a string from 
property file. No EL, no expressions, no ognl, nothing. Just a simple 
string.


Comparing wicket:message key=key/wicket:message
to${key}

which one is simpler?

-Matej

Sure it works, but... if Wicket is going to have ${key}... ${something} 
in htmls, let's go back to JSP 2.0 and use EL... just a thought




On 5/9/06, *Matej Knopp * [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

So far I can say it works well for me.
The only problematic (or cumbersome) thing was that I had to make my own
  ResourceStreamLocator and ResourceStream to have this done.
Having some kind of preprocessing filters (with methods like

String processString(String)   or

InputStream processStream(Input Stream)

would be enough);

-Matej


Johan Compagner wrote:
  That is also a possibilty
  That we pre process the markup even before the markup parser
handles it.
  Then we just replace all wicket:i18n:key:XX (or whatever we
call it)
  and then parse the markup.
 
  johan
 
 
  On 5/9/06, *Matej Knopp*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  I solved this some time ago with own preprocessor that replaces
  ${key} with the value from property files.
 
  I know this is not very wicket-like, but the markup looks
much simpler
  with ${key} then with wicket:message key=key/wicket:message
 
  -Matej
 
  Igor Vaynberg wrote:
why not? in a preview you would get a button with text
wicket:i18n:buttons.save
   
thats good for preview since you can see the key!
   
-Igor
   
   
On 5/8/06, * Juergen Donnerstag*
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   
It will not be previeable any more.
   
Juergen
   
On 5/9/06, Igor Vaynberg  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  why not a format like this
 
  input type=submit value=wicket:i18n:
buttons.save/
 
  or
 
  input type=submit value=wi18n: buttons.save/
 
  -Igor
 
 
 
  On 5/8/06, Andrew Berman  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
  
   Hey Guys,
  
   I think adding something to support localized
attributes
  would
be a big
  plus.  I know that when Wicket added wicket:message
it really
saved a lot of
  extra Java code on my part.  I think the same thing
would
  happen
if we came
  up with something to do it in
attributes.  AttributeModifiers
obviously
  work, but when you have a lot of things you want to
  localize on
the same
  page it's a lot of extra Java code that needs to be
written to
support this
  because you need to add the specific Component and
add an
AttributeModifier.
  
   What about a compromise?  I think the
experimental stuff in
  WicketMessageTagHandler is cumbersome to add to the
HTML,
  so what
if we
  created a component whose sole purpose is to add
attributes to
some HTML
  element.  Or can this already be done like this:
  
   Java:
   add(new WebComponent(imageAlt).add(new
  AttributeModifier(alt, true, new ResourceModel(
my.key;
  
   HTML:
   img wicket:id=imageAlt src=mySrc /
  
   I haven't tested if this works, but if not, maybe
some
  kind of
Component
  could be created which allows something like this.  It
  

Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more 
interested in clean and simple preprocessing filters, something wicket 
lacks currently.


-Matej

Bruno Borges wrote:

And how should I write if I want to literally output ${key} to the user?

On 5/9/06, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Bruno Borges wrote:
This is completely different. ${key} is simply replaced by a string
from
property file. No EL, no expressions, no ognl, nothing. Just a simple
string.

Comparing wicket:message key=key/wicket:message
to${key}

which one is simpler?

-Matej

  Sure it works, but... if Wicket is going to have ${key}...
${something}
  in htmls, let's go back to JSP 2.0 and use EL... just a thought
 
 
 
  On 5/9/06, *Matej Knopp *  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
  So far I can say it works well for me.
  The only problematic (or cumbersome) thing was that I had to
make my own
ResourceStreamLocator and ResourceStream to have this done.
  Having some kind of preprocessing filters (with methods like
 
  String processString(String)   or
 
  InputStream processStream(Input Stream)
 
  would be enough);
 
  -Matej
 
 
  Johan Compagner wrote:
That is also a possibilty
That we pre process the markup even before the markup parser
  handles it.
Then we just replace all wicket:i18n:key:XX (or
whatever we
  call it)
and then parse the markup.
   
johan
   
   
On 5/9/06, *Matej Knopp*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
   
I solved this some time ago with own preprocessor
that replaces
${key} with the value from property files.
   
I know this is not very wicket-like, but the markup looks
  much simpler
with ${key} then with wicket:message
key=key/wicket:message
   
-Matej
   
Igor Vaynberg wrote:
  why not? in a preview you would get a button with text
  wicket:i18n: buttons.save
 
  thats good for preview since you can see the key!
 
  -Igor
 
 
  On 5/8/06, * Juergen Donnerstag*
  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:
 
  It will not be previeable any more.
 
  Juergen
 
  On 5/9/06, Igor Vaynberg 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
why not a format like this
   
input type=submit value=wicket:i18n:
  buttons.save/
   
or
   
input type=submit value=wi18n:
buttons.save/
   
-Igor
   
   
   
On 5/8/06, Andrew Berman 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

Re: [Wicket-user] changing images with Ajax

2006-05-09 Thread Martijn Dashorst
On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
Johan Compagner wrote: still the question remains how random is random ;)right. maybe one shared atomically increased integer would do better job?System.nanoTime() should do the trick :-)
Martijn


Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters, something wicket
lacks currently.



That is true, we don't have something that allow to pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.

Juergen


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] using feedback not based on labels

2006-05-09 Thread Ittay Dror

hi,

i have a feedback based on javascript. basically, i want to populate a 
javascript function's body with all messages, so it will show them one by one.

the final result will be like:
function showFeedback() {
var message;
message += first feedback\n;
message += second feedback\n;

alert(message);
}

theoretically, in wicket, create a panel with something like:
function showFeedback() {
var message;
span wicket:id=feedback
message += span wicket:id=message/span
/span
alert(message);
}

but, will the parser handle this? will the 'span' tags be replaced? i thing 
that at least the 'message' span will not, since it uses Label, which replaces 
the body, not the tag.

how can i do this?

--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] What should be used: PatternValidator or MaskConverter/MaskFormatter ?

2006-05-09 Thread Eelco Hillenius

Typically you'd use the validator when you only want to validate
whether the input follows a certain pattern. But if you want a string
to be formatted between input and ouput, such a converter makes sense.

Eelco


On 5/9/06, Bruno Borges [EMAIL PROTECTED] wrote:

What's the difference between these two components and where they fit
better?

--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Juergen Donnerstag wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters, something wicket
lacks currently.

Unfortunately IMarkupFilter does not seem to be capable of replacing 
things in RawMarkup elements, does it? So it seems not to be able to 
replace ${key} to localized value, or am I missing anything here?


?xml encoding=.. does complicate things a bit, but not much. What 
about load the ?xml line, determine encoding and loat the rest of the 
file as string. Then let the preprocessor process it and then send it to 
MarkupParser? (Just a thoght).


-Matej


That is true, we don't have something that allow to pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.

Juergen


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Eelco Hillenius

Or take a look at what's in wicket.extensions.util.resource and look
at the Slider component in YUI for an example. I think it's cleaner
like that (keep the javascript in seperate files and run some variable
substitution over it).

Eelco

On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:

hi,

i have a feedback based on javascript. basically, i want to populate a 
javascript function's body with all messages, so it will show them one by one.

the final result will be like:
function showFeedback() {
var message;
message += first feedback\n;
message += second feedback\n;

alert(message);
}

theoretically, in wicket, create a panel with something like:
function showFeedback() {
var message;
span wicket:id=feedback
message += span wicket:id=message/span
/span
alert(message);
}

but, will the parser handle this? will the 'span' tags be replaced? i thing 
that at least the 'message' span will not, since it uses Label, which replaces 
the body, not the tag.

how can i do this?

--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

I haven't looked into it deeper, but it sounds to me that we could
make it slightly easier. We already have post processing filters, so
personally I would think we would be consistent to have pre processing
filters too. I know the functionality to do this is there already, but
we might come up with something that makes it easier and more
consistant with the postprocessing filters.

Eelco

On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
 $${key}? Or whatever you want.
 I don't need this behavior to be in wicket core. I'm much more
 interested in clean and simple preprocessing filters, something wicket
 lacks currently.


That is true, we don't have something that allow to pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.

Juergen


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] changing images with Ajax

2006-05-09 Thread Johan Compagner
i think millis will do. If you have a request in the same milli second for the same image.Then the image should really be the same, What can possible change in 1 milli! :)johan
On 5/9/06, Martijn Dashorst [EMAIL PROTECTED] wrote:
On 5/9/06, Matej Knopp 
[EMAIL PROTECTED] wrote:
Johan Compagner wrote: still the question remains how random is random ;)right. maybe one shared atomically increased integer would do better job?
System.nanoTime() should do the trick :-)
Martijn




Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Ittay Dror



Eelco Hillenius wrote:

Or take a look at what's in wicket.extensions.util.resource and look
at the Slider component in YUI for an example. I think it's cleaner
like that (keep the javascript in seperate files and run some variable
substitution over it).


what do you mean by 'variable substitution'? how can i do that?



Eelco

On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:

hi,

i have a feedback based on javascript. basically, i want to populate a 
javascript function's body with all messages, so it will show them one 
by one.


the final result will be like:
function showFeedback() {
var message;
message += first feedback\n;
message += second feedback\n;

alert(message);
}

theoretically, in wicket, create a panel with something like:
function showFeedback() {
var message;
span wicket:id=feedback
message += span wicket:id=message/span
/span
alert(message);
}

but, will the parser handle this? will the 'span' tags be replaced? i 
thing that at least the 'message' span will not, since it uses Label, 
which replaces the body, not the tag.


how can i do this?

--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MaskConverter: isn't a better way?

2006-05-09 Thread Eelco Hillenius

Yep. Bruno, It's trivial to make your own component classes - probably
textfields, no? - that have an API that's more to your taste. It's one
of Wicket's main ideas to make creating custom components easy, so why
not make use of that?

Eelco


On 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:

because there is only one converter and validators must be stored in a list.

This is all to keep the internal state of a component as clean as possible.
You don't have to create an anon class. You can return there a normal class
or a inner class if you want.


johan

On 5/9/06, Bruno Borges [EMAIL PROTECTED] wrote:

 I really don't like the idea of having too many properties that must be
get through anonymous classes.

 Why there's no setConverter(IConverter c) just like add(IValidator v)
returning the object itself?

 see ya



 On 5/9/06, Johan Compagner  [EMAIL PROTECTED] wrote:
 
  currently not. What could be better in your eyes?
 
  We will overhaul the converter interface in the next version so that it
should be simpler.
 
 
  johan
 
 
 
 
  On 5/9/06, Bruno Borges [EMAIL PROTECTED] wrote:
  
   This is the only way I know (better: I learned from
Wiki/Docs/Examples) on how to use MaskConverter:
  
  
   TextField zipCode = new TextField(zipCode) {
  
   public IConverter getConverter() {
  
   MaskFormatter zipFormat = null;
   try {
  
   zipFormat = new MaskFormatter(#-###); // Brazillian format
   } catch(Exception e) {} // never throws
  
   return new UncheckedMaskConverter(zipFormat);
   }
   };
  
   Isn't a better way to to this?
  
   --
   Bruno Borges
  
   [EMAIL PROTECTED]
   Sun Certified Java Programmer for 1.4
   Sun Certified Web Component Developer for 1.4
 
 



 --
 Bruno Borges
 [EMAIL PROTECTED]
 Sun Certified Java Programmer for 1.4
 Sun Certified Web Component Developer for 1.4





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] changing images with Ajax

2006-05-09 Thread Matej Knopp

System.nanoTime() is @since 1.5, so I don't think it's usable anyway :)

Johan Compagner wrote:
i think millis will do. If you have a request in the same milli second 
for the same image.
Then the image should really be the same, What can possible change in 1 
milli! :)


johan


On 5/9/06, *Martijn Dashorst* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


On 5/9/06, *Matej Knopp*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:

Johan Compagner wrote:
  still the question remains how random is random ;)
right. maybe one shared atomically increased integer would do
better job?



System.nanoTime() should do the trick :-)

Martijn






---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Filterable ListViews

2006-05-09 Thread Michiel Trimpe








Thanks for the feedback, Ive gotten
the basics working but I have two remaining problems:




 How
 do I filter on reference Objects, not strings
 Can
 I make my code filter on partial matches as well?




This is my code excerpt so far:



IColumn[] columns = new IColumn[3];

columns[0] = new
FilteredAbstractColumn(new Model(Actions)) {..};

columns[1] = new
TextFilteredPropertyColumn(new Model(Name),name,
name);

columns[2] = new
ChoiceFilteredPropertyColumn(new Model(Manufacturer),manufacturer,
manufacturer, new Model((Serializable) getSpringHibernateService().getManufacturers()))
;

PhonesDataProvider dataProvider = new
PhonesDataProvider(getSpringHibernateService());

DefaultDataTable phones = new
DefaultDataTable(phones, Arrays.asList(columns), dataProvider, 10);

phones.addTopToolbar(new
FilterToolbar(phones, dataProvider));

add(phones);



The getManufacturers() function returns a
ListManufacturer with manufacturer.name. Ive tried 



columns[2] = new
ChoiceFilteredPropertyColumn(new Model(Manufacturer),manufacturer.name,
manufacturer.name, new Model((Serializable) getSpringHibernateService().getManufacturers()))
;



but that doesnt work either.



Thanks in advance, and I must admit, Im
starting to fall in love with Wicket over here ;)



-
Michiel



P.S. Would someone like to help me create
a proper component for editing Sets? Ive got a basic setup but would
like to get it ready for prime-time as practice.







Michiel Trimpe|Java Developer| TomTom | [EMAIL PROTECTED] | +31
(0)6 41482341mobile











From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Friday, May 05, 2006 11:52
PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Filterable ListViews





What about the
DefaultDataTable in wicket-extensions? I'm using Spring and Hibernate and
it works great. 

-- Forwarded message --
From: Michiel Trimpe [EMAIL PROTECTED]
Date: May 5, 2006 11:25 AM
Subject: [Wicket-user] Filterable ListViews 
To: wicket-user@lists.sourceforge.net.





Hey
everybody,



I've
just started a Wicket pilot as a possible web-framework to complement Spring
and Hibernate at our company and I'm going to need some help.



My
first question to the list is, are there any examples of filtered tables??



I
get a list from spring with Hibernate managed objects and a list of possible
objects and so far I've only been able to add a DropDownChoice and a ListView,
but I don't know how to make them work together.



Thanks
a lot already and have a nice weekend!



-
michiel





Michiel Trimpe |Java Developer| TomTom | [EMAIL PROTECTED]
| +31 (0)6 41482341mobile













This e-mail message contains information which is confidential and may
be privileged. It is intended for use by the addressee only. If you are not the
intended addressee, we request that you notify the sender immediately and
delete or destroy this e-mail message and any attachment(s), without copying,
saving, forwarding, disclosing or using its contents in any other way. TomTom
N.V., TomTom International BV
or any other company belonging to the TomTom group of companies will not be
liable for damage relating to the communication by e-mail of data, documents or
any other information. 









This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.






Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Matej Knopp wrote:

Juergen Donnerstag wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters, something wicket
lacks currently.

Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was 
evaluating this and it was not possible back then.


Anyway, it seems that markup filter should be enough.

Unfortunately IMarkupFilter does not seem to be capable of replacing 
things in RawMarkup elements, does it? So it seems not to be able to 
replace ${key} to localized value, or am I missing anything here?


?xml encoding=.. does complicate things a bit, but not much. What 
about load the ?xml line, determine encoding and loat the rest of the 
file as string. Then let the preprocessor process it and then send it to 
MarkupParser? (Just a thoght).


-Matej


That is true, we don't have something that allow to pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.

Juergen


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Fragment rendering

2006-05-09 Thread JasonB

Juergen Donnerstag wrote:

you need to register it. It is not yet activated by default
application.getPageSettings().addComponentResolver(new 
FragmentResolver());


Strangely enough I just used fragments over the weekend and didn't have 
to set this setting. What confused me was not having to add a component 
to define that a fragment definition existed on the current page. After 
I ignored that, using the fragment was amazingly simple.

- Jason B.


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MaskConverter: isn't a better way?

2006-05-09 Thread Bruno Borges
Sure... I got the message. :)On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
Yep. Bruno, It's trivial to make your own component classes - probablytextfields, no? - that have an API that's more to your taste. It's one
of Wicket's main ideas to make creating custom components easy, so whynot make use of that?EelcoOn 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:
 because there is only one converter and validators must be stored in a list. This is all to keep the internal state of a component as clean as possible. You don't have to create an anon class. You can return there a normal class
 or a inner class if you want. johan On 5/9/06, Bruno Borges [EMAIL PROTECTED] wrote:   I really don't like the idea of having too many properties that must be
 get through anonymous classes.   Why there's no setConverter(IConverter c) just like add(IValidator v) returning the object itself?   see ya
 On 5/9/06, Johan Compagner  [EMAIL PROTECTED] wrote: currently not. What could be better in your eyes?
 We will overhaul the converter interface in the next version so that it should be simpler.   johan
   On 5/9/06, Bruno Borges [EMAIL PROTECTED] wrote:   This is the only way I know (better: I learned from
 Wiki/Docs/Examples) on how to use MaskConverter:  TextField zipCode = new TextField(zipCode) {   public IConverter getConverter() {
   MaskFormatter zipFormat = null;try {   zipFormat = new MaskFormatter(#-###); // Brazillian format
} catch(Exception e) {} // never throws   return new UncheckedMaskConverter(zipFormat);}};   
Isn't a better way to to this?   --Bruno Borges   
[EMAIL PROTECTED]Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 1.4  
   --  Bruno Borges  [EMAIL PROTECTED]  Sun Certified Java Programmer for 1.4  Sun Certified Web Component Developer for 
1.4---Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 
1.4Sun Certified Web Component Developer for 1.4


Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Ittay Dror

ok, i got most of it.

last question: can the template have a way to loop on a list? if not, then how 
do you suggest i templatize the messages, so their formatting is kept in the js 
file?

thanx,
ittay

Ittay Dror wrote:



Eelco Hillenius wrote:

Or take a look at what's in wicket.extensions.util.resource and look
at the Slider component in YUI for an example. I think it's cleaner
like that (keep the javascript in seperate files and run some variable
substitution over it).


what do you mean by 'variable substitution'? how can i do that?



Eelco

On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:

hi,

i have a feedback based on javascript. basically, i want to populate 
a javascript function's body with all messages, so it will show them 
one by one.


the final result will be like:
function showFeedback() {
var message;
message += first feedback\n;
message += second feedback\n;

alert(message);
}

theoretically, in wicket, create a panel with something like:
function showFeedback() {
var message;
span wicket:id=feedback
message += span wicket:id=message/span
/span
alert(message);
}

but, will the parser handle this? will the 'span' tags be replaced? i 
thing that at least the 'message' span will not, since it uses Label, 
which replaces the body, not the tag.


how can i do this?

--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, 
security?
Get stuff done quickly with pre-integrated technology to make your 
job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters, something wicket
lacks currently.

-Matej


Yeah, that sounds like a good idea. If we have that pluggable, users
can decide for themselves what they want, while we don't have to
officially support a certain syntax of which the danger may be that
sooner or later people will want to ask OGNL or JSP like features.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

Martijn is writing about localization for Wicket In Action now. I'm
sure he'd appreciate it if someone would write up some notes about how
to do this on the WIKI.

Eelco


On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

Matej Knopp wrote:
 Juergen Donnerstag wrote:
 On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
 $${key}? Or whatever you want.
 I don't need this behavior to be in wicket core. I'm much more
 interested in clean and simple preprocessing filters, something wicket
 lacks currently.

Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was
evaluating this and it was not possible back then.

Anyway, it seems that markup filter should be enough.

 Unfortunately IMarkupFilter does not seem to be capable of replacing
 things in RawMarkup elements, does it? So it seems not to be able to
 replace ${key} to localized value, or am I missing anything here?

 ?xml encoding=.. does complicate things a bit, but not much. What
 about load the ?xml line, determine encoding and loat the rest of the
 file as string. Then let the preprocessor process it and then send it to
 MarkupParser? (Just a thoght).

 -Matej

 That is true, we don't have something that allow to pre-processor the
 plain input string and IMO it is not needed and when I think about
 ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
 similar function but are already aware of the xml structure, the
 encoding, etc.. And it is trivial to register them with the
 application.

 Juergen


 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Andrew Berman
So are we saying that there is going to be some MarkupFilter to replace whatever the developer decides to use for a localization demarcator?I had another idea. What if wicket:message was enhanced? Would something like this work:
wicket:message key=myKey applyTo=value input type=submit value=Previewable Value//wicket:messageThis way we could still have the previewability of the HTML page and have the localization applied at runtime.
--AndrewOn 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
Martijn is writing about localization for Wicket In Action now. I'msure he'd appreciate it if someone would write up some notes about howto do this on the WIKI.EelcoOn 5/9/06, Matej Knopp 
[EMAIL PROTECTED] wrote: Matej Knopp wrote:  Juergen Donnerstag wrote:  On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:  $${key}? Or whatever you want.
  I don't need this behavior to be in wicket core. I'm much more  interested in clean and simple preprocessing filters, something wicket  lacks currently. 
 Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was evaluating this and it was not possible back then. Anyway, it seems that markup filter should be enough.
  Unfortunately IMarkupFilter does not seem to be capable of replacing  things in RawMarkup elements, does it? So it seems not to be able to  replace ${key} to localized value, or am I missing anything here?
   ?xml encoding=.. does complicate things a bit, but not much. What  about load the ?xml line, determine encoding and loat the rest of the  file as string. Then let the preprocessor process it and then send it to
  MarkupParser? (Just a thoght).   -Matej   That is true, we don't have something that allow to pre-processor the  plain input string and IMO it is not needed and when I think about
  ?xml encoding=..? it could be dangerous. IMarkupFilter serve a  similar function but are already aware of the xml structure, the  encoding, etc.. And it is trivial to register them with the
  application.   Juergen---  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job  easier  Download IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
  http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642  ___
  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user  ---  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job  easier  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo  
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642  ___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user  ---
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1
 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

What I definitively like about the pre-processor/ filter is that it is
very efficient. Only for static messages though, but that's the whole
idea on these special tags/ attributes anyway.

I don't know. If we can reach a consensus on the best way, I'd be okay
with adopting something that works out-of-the-box. If not, it's better
to provide the means to customize Wicket so that it works like you
want.

Eelco


On 5/9/06, Andrew Berman [EMAIL PROTECTED] wrote:

So are we saying that there is going to be some MarkupFilter to replace
whatever the developer decides to use for a localization demarcator?

I had another idea.  What if wicket:message was enhanced?  Would something
like this work:

wicket:message key=myKey applyTo=value
  input type=submit value=Previewable Value/
/wicket:message

This way we could still have the previewability of the HTML page and have
the localization applied at runtime.

--Andrew


On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:

 Martijn is writing about localization for Wicket In Action now. I'm
sure he'd appreciate it if someone would write up some notes about how
to do this on the WIKI.

Eelco


On 5/9/06, Matej Knopp  [EMAIL PROTECTED] wrote:
 Matej Knopp wrote:
  Juergen Donnerstag wrote:
  On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
  $${key}? Or whatever you want.
  I don't need this behavior to be in wicket core. I'm much more
  interested in clean and simple preprocessing filters, something wicket
  lacks currently.
 
 Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was
 evaluating this and it was not possible back then.

 Anyway, it seems that markup filter should be enough.

   Unfortunately IMarkupFilter does not seem to be capable of replacing
  things in RawMarkup elements, does it? So it seems not to be able to
  replace ${key} to localized value, or am I missing anything here?
 
  ?xml encoding=.. does complicate things a bit, but not much. What
  about load the ?xml line, determine encoding and loat the rest of the
  file as string. Then let the preprocessor process it and then send it to
  MarkupParser? (Just a thoght).
 
  -Matej
 
  That is true, we don't have something that allow to pre-processor the
  plain input string and IMO it is not needed and when I think about
  ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
  similar function but are already aware of the xml structure, the
  encoding, etc.. And it is trivial to register them with the
  application.
 
  Juergen
 
 
 
---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make your job
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make your job
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 
https://lists.sourceforge.net/lists/listinfo/wicket-user
 



 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642

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





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642

Re: [Wicket-user] MaskConverter: isn't a better way?

2006-05-09 Thread Eelco Hillenius

:) It's not to bluntly stop the discussion or anything. I just that it
might not be obvious to everyone that creating custom components/ a
set of base widgets tailored to your need/ taste works great.

Eelco


On 5/9/06, Bruno Borges [EMAIL PROTECTED] wrote:

Sure... I got the message. :)



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:

What I definitively like about the pre-processor/ filter is that it is
very efficient. Only for static messages though, but that's the whole
idea on these special tags/ attributes anyway.



But it realy shouldn't be a quick fix. IMO we should first improve the
general resource chain. Additional an text based filter in between
would be very easy than.

Juergen


I don't know. If we can reach a consensus on the best way, I'd be okay
with adopting something that works out-of-the-box. If not, it's better
to provide the means to customize Wicket so that it works like you
want.

Eelco


On 5/9/06, Andrew Berman [EMAIL PROTECTED] wrote:
 So are we saying that there is going to be some MarkupFilter to replace
 whatever the developer decides to use for a localization demarcator?

 I had another idea.  What if wicket:message was enhanced?  Would something
 like this work:

 wicket:message key=myKey applyTo=value
   input type=submit value=Previewable Value/
 /wicket:message

 This way we could still have the previewability of the HTML page and have
 the localization applied at runtime.

 --Andrew


 On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 
  Martijn is writing about localization for Wicket In Action now. I'm
 sure he'd appreciate it if someone would write up some notes about how
 to do this on the WIKI.

 Eelco


 On 5/9/06, Matej Knopp  [EMAIL PROTECTED] wrote:
  Matej Knopp wrote:
   Juergen Donnerstag wrote:
   On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
   $${key}? Or whatever you want.
   I don't need this behavior to be in wicket core. I'm much more
   interested in clean and simple preprocessing filters, something wicket
   lacks currently.
  
  Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was
  evaluating this and it was not possible back then.
 
  Anyway, it seems that markup filter should be enough.
 
Unfortunately IMarkupFilter does not seem to be capable of replacing
   things in RawMarkup elements, does it? So it seems not to be able to
   replace ${key} to localized value, or am I missing anything here?
  
   ?xml encoding=.. does complicate things a bit, but not much. What
   about load the ?xml line, determine encoding and loat the rest of the
   file as string. Then let the preprocessor process it and then send it to
   MarkupParser? (Just a thoght).
  
   -Matej
  
   That is true, we don't have something that allow to pre-processor the
   plain input string and IMO it is not needed and when I think about
   ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
   similar function but are already aware of the xml structure, the
   encoding, etc.. And it is trivial to register them with the
   application.
  
   Juergen
  
  
  
 ---
   Using Tomcat but need to do more? Need to support web services,
 security?
   Get stuff done quickly with pre-integrated technology to make your job
   easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
   Geronimo
  
 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  
   ---
   Using Tomcat but need to do more? Need to support web services,
 security?
   Get stuff done quickly with pre-integrated technology to make your job
   easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
   ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642

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





Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Eelco Hillenius

The templating function is deliberately kept simple. If you want it's
pretty easy to create your own template thingies using e.g. Velocity
or Freemarker. But in this case, it's probably sufficient to just
concatenate the list yourself and do substitution of one variable
placeholder. Thus: in your Java code you do the loop and create the
'message' part:

  messages.append(first feedback\n').append(second feedback\n);

or something smarter, and then replace ${messages}

function showFeedback() {
  var '${messages}';
  alert(message);
}


Eelco


On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:

ok, i got most of it.

last question: can the template have a way to loop on a list? if not, then how 
do you suggest i templatize the messages, so their formatting is kept in the js 
file?

thanx,
ittay

Ittay Dror wrote:


 Eelco Hillenius wrote:
 Or take a look at what's in wicket.extensions.util.resource and look
 at the Slider component in YUI for an example. I think it's cleaner
 like that (keep the javascript in seperate files and run some variable
 substitution over it).

 what do you mean by 'variable substitution'? how can i do that?


 Eelco

 On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
 hi,

 i have a feedback based on javascript. basically, i want to populate
 a javascript function's body with all messages, so it will show them
 one by one.

 the final result will be like:
 function showFeedback() {
 var message;
 message += first feedback\n;
 message += second feedback\n;

 alert(message);
 }

 theoretically, in wicket, create a panel with something like:
 function showFeedback() {
 var message;
 span wicket:id=feedback
 message += span wicket:id=message/span
 /span
 alert(message);
 }

 but, will the parser handle this? will the 'span' tags be replaced? i
 thing that at least the 'message' span will not, since it uses Label,
 which replaces the body, not the tag.

 how can i do this?

 --
 ===
 Ittay Dror
 Chief architect, openQRM TL,
 RD, Qlusters Inc.
 [EMAIL PROTECTED]
 +972-3-6081994 Fax: +972-3-6081841

 http://www.openQRM.org
 - Keeps your Data-Center Up and Running


 ---
 Using Tomcat but need to do more? Need to support web services,
 security?
 Get stuff done quickly with pre-integrated technology to make your
 job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user





--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket-example Japanese translation

2006-05-09 Thread Takeshi Matsuba
Hi 
I am Japanese Wicket user.

I translate three files of Wicket-examples .

FormInput_ja.html
FormInput_ja.properties
FoemInputApplication.properties

see attached file 

thanks



wicket-example_ja.tar
Description: Binary data


Re: [Wicket-user] wicket-example Japanese translation

2006-05-09 Thread Juergen Donnerstag

What encoding (?xml version=1.0 encoding=) did you use for
FormInput_ja.html. My browser shows some rubbish which I don't think
is japanese. It doesn't seem to be UTF-8.

Juergen

On 5/9/06, Takeshi Matsuba [EMAIL PROTECTED] wrote:

Hi
I am Japanese Wicket user.

I translate three files of Wicket-examples .

FormInput_ja.html
FormInput_ja.properties
FoemInputApplication.properties

see attached file

thanks







---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-example Japanese translation

2006-05-09 Thread Eelco Hillenius

Cool! Thanks a lot. One thing: it is advisable to start your page's
markup files with:

?xml version=1.0 encoding=utf-8?

So that the encoding is set properly. If that is not put in the
markup, it renders quite funny on my box :)

Maybe you want to take a look at these buttons too? You can look at
FormInputApplication.init to see how that is done for Chinese.

Cheers,

Eelco


On 5/9/06, Takeshi Matsuba [EMAIL PROTECTED] wrote:

Hi
I am Japanese Wicket user.

I translate three files of Wicket-examples .

FormInput_ja.html
FormInput_ja.properties
FoemInputApplication.properties

see attached file

thanks







---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Concurrent Modification Exception

2006-05-09 Thread Frank Silbermann








I created a CheckboxData type containing a
boolean (checked) and a label.



I created a CheckboxDataPanel whose
constructor takes a CheckboxData object, and which displays a checkbox and the
label  each using a PropertyModel built from the Checkbox Data object.



I constructed a ListView using a
ListCheckboxData, which displays a CheckboxDataPanel for each item.



I have a button which removes from the ListCheckboxData every CheckboxData object whose check field is unchecked. When I click this button, I would expect the ListView would shrink  perhaps down to nothing if none were checked. When I press it to remove the last remaining item, however, I get a java.util.ConcurrentModificationException.What am I doing wrong? Ive been using an ArrayList as my List implementation, but I get the same result using a Vector. Could I avoid this problem by using a CheckboxGroup instead of my own ListView? 










Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

But it realy shouldn't be a quick fix. IMO we should first improve the
general resource chain. Additional an text based filter in between
would be very easy than.

Juergen



Well, we consider you being the markup masta :) I'm certainly not in
favor of a quick fix anytime, anywhere in Wicket. Quick fixes always
come back to bite you later. However, I'm quite attracted to the idea
of pre-processing (be that through markup loading mech or not) and the
efficiency gain is probably that great that I don't consider it a
quick fix.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Concurrent Modification Exception -- NEVER MIND!

2006-05-09 Thread Frank Silbermann








Never mind! The problem had nothing to do with
Wicket. My error was trying to
delete elements of the very list I was iterating:

 for (CheckboxData cbd :
listToBePruned ){

 if (
!cbd.isChecked() ) {


listToBePruned.remove(cbd);

 }

 }



A different looping strategy solved
it. /Frank



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Silbermann
Sent: Tuesday, May 09, 2006 12:35 PM
To:
wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Concurrent
Modification Exception



I created a CheckboxData
type containing a boolean (checked) and a label.



I created a
CheckboxDataPanel whose constructor takes a CheckboxData object, and which
displays a checkbox and the label  each using a PropertyModel built from
the Checkbox Data object.



I constructed a ListView
using a ListCheckboxData, which displays a CheckboxDataPanel for each
item.



I have a button which removes from the ListCheckboxData every CheckboxData object whose check field is unchecked. When I click this button, I would expect the ListView would shrink  perhaps down to nothing if none were checked. When I press it to remove the last remaining item, however, I get a java.util.ConcurrentModificationException.What am I doing wrong? Ive been using an ArrayList as my List implementation, but I get the same result using a Vector. Could I avoid this problem by using a CheckboxGroup instead of my own ListView? 










Re: [Wicket-user] Localization

2006-05-09 Thread Justin Lee
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Personally, I find the concept of any sort of templating/text
substitution a little distasteful.  Things would start looking like
velocity or JSP and I can't afford the alcohol to make that livable...

Juergen Donnerstag wrote:
 On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 What I definitively like about the pre-processor/ filter is that it is
 very efficient. Only for static messages though, but that's the whole
 idea on these special tags/ attributes anyway.

 
 But it realy shouldn't be a quick fix. IMO we should first improve the
 general resource chain. Additional an text based filter in between
 would be very easy than.
 
 Juergen
 
 I don't know. If we can reach a consensus on the best way, I'd be okay
 with adopting something that works out-of-the-box. If not, it's better
 to provide the means to customize Wicket so that it works like you
 want.

 Eelco


 On 5/9/06, Andrew Berman [EMAIL PROTECTED] wrote:
  So are we saying that there is going to be some MarkupFilter to replace
  whatever the developer decides to use for a localization demarcator?
 
  I had another idea.  What if wicket:message was enhanced?  Would
 something
  like this work:
 
  wicket:message key=myKey applyTo=value
input type=submit value=Previewable Value/
  /wicket:message
 
  This way we could still have the previewability of the HTML page and
 have
  the localization applied at runtime.
 
  --Andrew
 
 
  On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
   Martijn is writing about localization for Wicket In Action now. I'm
  sure he'd appreciate it if someone would write up some notes about how
  to do this on the WIKI.
 
  Eelco
 
 
  On 5/9/06, Matej Knopp  [EMAIL PROTECTED] wrote:
   Matej Knopp wrote:
Juergen Donnerstag wrote:
On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters,
 something wicket
lacks currently.
   
   Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess
 I was
   evaluating this and it was not possible back then.
  
   Anyway, it seems that markup filter should be enough.
  
 Unfortunately IMarkupFilter does not seem to be capable of
 replacing
things in RawMarkup elements, does it? So it seems not to be
 able to
replace ${key} to localized value, or am I missing anything here?
   
?xml encoding=.. does complicate things a bit, but not much.
 What
about load the ?xml line, determine encoding and loat the rest
 of the
file as string. Then let the preprocessor process it and then
 send it to
MarkupParser? (Just a thoght).
   
-Matej
   
That is true, we don't have something that allow to
 pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.
   
Juergen
   
   
   
  ---
Using Tomcat but need to do more? Need to support web services,
  security?
Get stuff done quickly with pre-integrated technology to make
 your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
   
  http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
  https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
   
---
Using Tomcat but need to do more? Need to support web services,
  security?
Get stuff done quickly with pre-integrated technology to make
 your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
   
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
  https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
   ---
   Using Tomcat but need to do more? Need to support web services,
 security?
   Get stuff done quickly with pre-integrated technology to make your
 job
  easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
  
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
 

Re: [Wicket-user] Localization

2006-05-09 Thread Juergen Donnerstag

What would be your suggestion on how to localize HTML which contains
plenty of text which needs to be localized?

Juergen

On 5/9/06, Justin Lee [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Personally, I find the concept of any sort of templating/text
substitution a little distasteful.  Things would start looking like
velocity or JSP and I can't afford the alcohol to make that livable...

Juergen Donnerstag wrote:
 On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 What I definitively like about the pre-processor/ filter is that it is
 very efficient. Only for static messages though, but that's the whole
 idea on these special tags/ attributes anyway.


 But it realy shouldn't be a quick fix. IMO we should first improve the
 general resource chain. Additional an text based filter in between
 would be very easy than.

 Juergen

 I don't know. If we can reach a consensus on the best way, I'd be okay
 with adopting something that works out-of-the-box. If not, it's better
 to provide the means to customize Wicket so that it works like you
 want.

 Eelco


 On 5/9/06, Andrew Berman [EMAIL PROTECTED] wrote:
  So are we saying that there is going to be some MarkupFilter to replace
  whatever the developer decides to use for a localization demarcator?
 
  I had another idea.  What if wicket:message was enhanced?  Would
 something
  like this work:
 
  wicket:message key=myKey applyTo=value
input type=submit value=Previewable Value/
  /wicket:message
 
  This way we could still have the previewability of the HTML page and
 have
  the localization applied at runtime.
 
  --Andrew
 
 
  On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
   Martijn is writing about localization for Wicket In Action now. I'm
  sure he'd appreciate it if someone would write up some notes about how
  to do this on the WIKI.
 
  Eelco
 
 
  On 5/9/06, Matej Knopp  [EMAIL PROTECTED] wrote:
   Matej Knopp wrote:
Juergen Donnerstag wrote:
On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters,
 something wicket
lacks currently.
   
   Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess
 I was
   evaluating this and it was not possible back then.
  
   Anyway, it seems that markup filter should be enough.
  
 Unfortunately IMarkupFilter does not seem to be capable of
 replacing
things in RawMarkup elements, does it? So it seems not to be
 able to
replace ${key} to localized value, or am I missing anything here?
   
?xml encoding=.. does complicate things a bit, but not much.
 What
about load the ?xml line, determine encoding and loat the rest
 of the
file as string. Then let the preprocessor process it and then
 send it to
MarkupParser? (Just a thoght).
   
-Matej
   
That is true, we don't have something that allow to
 pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.
   
Juergen
   
   
   
  ---
Using Tomcat but need to do more? Need to support web services,
  security?
Get stuff done quickly with pre-integrated technology to make
 your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
   
  http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
  https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
   
---
Using Tomcat but need to do more? Need to support web services,
  security?
Get stuff done quickly with pre-integrated technology to make
 your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
   
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
   
  https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
  
   ---
   Using Tomcat but need to do more? Need to support web services,
 security?
   Get stuff done quickly with pre-integrated technology to make your
 job
  easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
  
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   

Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

I think this kind of substition is fine. A slippery slope, but as long
as we resist substituting anything else than just static text, we'll
be fine.

Eelco

On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:

What would be your suggestion on how to localize HTML which contains
plenty of text which needs to be localized?

Juergen

On 5/9/06, Justin Lee [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: RIPEMD160

 Personally, I find the concept of any sort of templating/text
 substitution a little distasteful.  Things would start looking like
 velocity or JSP and I can't afford the alcohol to make that livable...

 Juergen Donnerstag wrote:
  On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  What I definitively like about the pre-processor/ filter is that it is
  very efficient. Only for static messages though, but that's the whole
  idea on these special tags/ attributes anyway.
 
 
  But it realy shouldn't be a quick fix. IMO we should first improve the
  general resource chain. Additional an text based filter in between
  would be very easy than.
 
  Juergen
 
  I don't know. If we can reach a consensus on the best way, I'd be okay
  with adopting something that works out-of-the-box. If not, it's better
  to provide the means to customize Wicket so that it works like you
  want.
 
  Eelco
 
 
  On 5/9/06, Andrew Berman [EMAIL PROTECTED] wrote:
   So are we saying that there is going to be some MarkupFilter to replace
   whatever the developer decides to use for a localization demarcator?
  
   I had another idea.  What if wicket:message was enhanced?  Would
  something
   like this work:
  
   wicket:message key=myKey applyTo=value
 input type=submit value=Previewable Value/
   /wicket:message
  
   This way we could still have the previewability of the HTML page and
  have
   the localization applied at runtime.
  
   --Andrew
  
  
   On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
   
Martijn is writing about localization for Wicket In Action now. I'm
   sure he'd appreciate it if someone would write up some notes about how
   to do this on the WIKI.
  
   Eelco
  
  
   On 5/9/06, Matej Knopp  [EMAIL PROTECTED] wrote:
Matej Knopp wrote:
 Juergen Donnerstag wrote:
 On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
 $${key}? Or whatever you want.
 I don't need this behavior to be in wicket core. I'm much more
 interested in clean and simple preprocessing filters,
  something wicket
 lacks currently.

Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess
  I was
evaluating this and it was not possible back then.
   
Anyway, it seems that markup filter should be enough.
   
  Unfortunately IMarkupFilter does not seem to be capable of
  replacing
 things in RawMarkup elements, does it? So it seems not to be
  able to
 replace ${key} to localized value, or am I missing anything here?

 ?xml encoding=.. does complicate things a bit, but not much.
  What
 about load the ?xml line, determine encoding and loat the rest
  of the
 file as string. Then let the preprocessor process it and then
  send it to
 MarkupParser? (Just a thoght).

 -Matej

 That is true, we don't have something that allow to
  pre-processor the
 plain input string and IMO it is not needed and when I think about
 ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
 similar function but are already aware of the xml structure, the
 encoding, etc.. And it is trivial to register them with the
 application.

 Juergen



   ---
 Using Tomcat but need to do more? Need to support web services,
   security?
 Get stuff done quickly with pre-integrated technology to make
  your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo

   http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

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




 ---
 Using Tomcat but need to do more? Need to support web services,
   security?
 Get stuff done quickly with pre-integrated technology to make
  your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
   Geronimo

  
  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

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

   
   
   
---
Using Tomcat but need to do more? Need to support web services,
  security?
Get stuff done quickly 

Re: [Wicket-user] wicket-example Japanese translation

2006-05-09 Thread Eelco Hillenius

Yeah, it's UTF-8. Don't forget to set the encoding type in your
editor. That's done for Eclipse if you update.

Eelco


On 5/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:

What encoding (?xml version=1.0 encoding=) did you use for
FormInput_ja.html. My browser shows some rubbish which I don't think
is japanese. It doesn't seem to be UTF-8.

Juergen

On 5/9/06, Takeshi Matsuba [EMAIL PROTECTED] wrote:
 Hi
 I am Japanese Wicket user.

 I translate three files of Wicket-examples .

 FormInput_ja.html
 FormInput_ja.properties
 FoemInputApplication.properties

 see attached file

 thanks






---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] component input handling (was: why is MarkupContainer.add final?)

2006-05-09 Thread Igor Vaynberg
should we rfe for 2.0?-IgorOn 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:
rawinput should also be a string[] but the problem is if we change that then getValue()/getRawInput() and maybe als getModelValue all should also change and that will affect a lot...
johan
On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

i was just looking at that. i think we messed up a little bit there. now that getinputasarray() is public i made getinput() go through that instead of request parameters directly.

-Igor
On 5/8/06, Ittay Dror [EMAIL PROTECTED] wrote:


on the off chance that not only igor is patient with this threadi noticed that there is an inconsistency (in my view) in how input is handled:there's Component.getInput()then FormComponent.inputAsStringArray


()which is used to setconvertedInput - by convert()andrawInput - by inputChanged()which are used all over the place. for example, getValue returns the rawInput if it was set and getModelValue otherwise (which, btw, uses the converter directly, rather than calling convert()). this may cause surprises.
for convertedInput, i think it should be considered a caching value. the method getConvertedInput() should check it, if it is null, it does the conversion and sets it. it then returns it. calling 'convert' explicitely from other places is not needed. whoever needs a converted input should call getConvertedInput.
i don't know about rawInput, and why it is used, so i can't comment much, but i also think it should be used as cached value. it seems odd though, that getInput is not 'raw' enough.of course inputChanged should just invalidate the caches.
ittayIttay Dror wrote: Ittay Dror wrote: Ittay Dror wrote: Igor Vaynberg wrote: and how do i validate the resulting value? in updateModel, if i
 find the combined value is not right, there's not much i can do. you mean the sum of correct pieces is not always correct itself?!?

 you can create a validator that performs the same aggregation and
 checks that i suppose. also, there's a convert() method in Component, what if i want it to be employed also?


 if you want the whole form workflow to be employed then go about this differently. instead of overriding updatemodel() override getInput(), aggregate all the raw inputs from all the children and
 use that to feed the aggregator. that way you get the whole workflow. yep, and also inputAsStringArray oops, cannot do that. it is final. maybe i can override getRequest...
 no, getRequest is also final. thank you for your patience ittay -Igor
--===Ittay DrorChief architect, openQRM TL,RD, Qlusters Inc.


[EMAIL PROTECTED]+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org- Keeps your Data-Center Up and Running---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing listWicket-user@lists.sourceforge.net

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







Re: [Wicket-user] Localization

2006-05-09 Thread Johan Compagner
+1 or juergen can come up with a nice way to do it in our Tags introducing a special MessageTag that is just handles like the RawInputTag for tagsthat only consist of a i18n key. And append auto something in the Wicket Component Tag
attribute if it is a wicket component that also has a i18n attribute.I am not in favor a post processing this kind of stuff.So pre or inline processing is fine. And maybe inline is better for property changes...
johanOn 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
I think this kind of substition is fine. A slippery slope, but as longas we resist substituting anything else than just static text, we'llbe fine.EelcoOn 5/9/06, Juergen Donnerstag 
[EMAIL PROTECTED] wrote: What would be your suggestion on how to localize HTML which contains plenty of text which needs to be localized? Juergen On 5/9/06, Justin Lee 
[EMAIL PROTECTED] wrote:  -BEGIN PGP SIGNED MESSAGE-  Hash: RIPEMD160   Personally, I find the concept of any sort of templating/text
  substitution a little distasteful.Things would start looking like  velocity or JSP and I can't afford the alcohol to make that livable...   Juergen Donnerstag wrote:
   On 5/9/06, Eelco Hillenius [EMAIL PROTECTED] wrote:   What I definitively like about the pre-processor/ filter is that it is
   very efficient. Only for static messages though, but that's the whole   idea on these special tags/ attributes anyway.   But it realy shouldn't be a quick fix. IMO we should first improve the
   general resource chain. Additional an text based filter in between   would be very easy than. Juergen I don't know. If we can reach a consensus on the best way, I'd be okay
   with adopting something that works out-of-the-box. If not, it's better   to provide the means to customize Wicket so that it works like you   want.  
   Eelco   On 5/9/06, Andrew Berman [EMAIL PROTECTED] wrote:So are we saying that there is going to be some MarkupFilter to replace
whatever the developer decides to use for a localization demarcator?   I had another idea.What if wicket:message was enhanced?Would   something
like this work:   wicket:message key=myKey applyTo=valueinput type=submit value=Previewable Value/
/wicket:message   This way we could still have the previewability of the HTML page and   havethe localization applied at runtime.
   --Andrew  On 5/9/06, Eelco Hillenius [EMAIL PROTECTED]
 wrote:   Martijn is writing about localization for Wicket In Action now. I'msure he'd appreciate it if someone would write up some notes about how
to do this on the WIKI.   Eelco  On 5/9/06, Matej Knopp  
[EMAIL PROTECTED] wrote: Matej Knopp wrote:  Juergen Donnerstag wrote:  On 5/9/06, Matej Knopp 
[EMAIL PROTECTED] wrote:  $${key}? Or whatever you want.  I don't need this behavior to be in wicket core. I'm much more
  interested in clean and simple preprocessing filters,   something wicket  lacks currently. 
 Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess   I was evaluating this and it was not possible back then.
 Anyway, it seems that markup filter should be enough. Unfortunately IMarkupFilter does not seem to be capable of   replacing
  things in RawMarkup elements, does it? So it seems not to be   able to  replace ${key} to localized value, or am I missing anything here?
   ?xml encoding=.. does complicate things a bit, but not much.   What  about load the ?xml line, determine encoding and loat the rest
   of the  file as string. Then let the preprocessor process it and then   send it to  MarkupParser? (Just a thoght).
   -Matej   That is true, we don't have something that allow to   pre-processor the
  plain input string and IMO it is not needed and when I think about  ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
  similar function but are already aware of the xml structure, the  encoding, etc.. And it is trivial to register them with the  application.
   Juergen   ---
  Using Tomcat but need to do more? Need to support web services,security?  Get stuff done quickly with pre-integrated technology to make
   your job  easier  Download IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
  ___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
  ---
  Using Tomcat but need to do more? Need to support web services,security?  Get stuff done quickly with pre-integrated technology to make
   your job  easier  Download IBM 

Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Well, it looks that this is not as easy as it seemed to be.

I've made a MarkupFilter that translates the string. But I need
to give it ContainerInfo of current markup resource (same as 
WicketMessageTagHandler gets). The problem is that I can't touch markup 
(or markup.getResource) in my LocalizedMarkupParser#initFilterChain 
method (I derived my own parser from MarkupParser).


At least protected Markup MarkupParser.getMarkup() would help.

-Matej

Matej Knopp wrote:

Matej Knopp wrote:

Juergen Donnerstag wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters, something wicket
lacks currently.

Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was 
evaluating this and it was not possible back then.


Anyway, it seems that markup filter should be enough.

Unfortunately IMarkupFilter does not seem to be capable of replacing 
things in RawMarkup elements, does it? So it seems not to be able to 
replace ${key} to localized value, or am I missing anything here?


?xml encoding=.. does complicate things a bit, but not much. What 
about load the ?xml line, determine encoding and loat the rest of the 
file as string. Then let the preprocessor process it and then send it 
to MarkupParser? (Just a thoght).


-Matej


That is true, we don't have something that allow to pre-processor the
plain input string and IMO it is not needed and when I think about
?xml encoding=..? it could be dangerous. IMarkupFilter serve a
similar function but are already aware of the xml structure, the
encoding, etc.. And it is trivial to register them with the
application.

Juergen


---
Using Tomcat but need to do more? Need to support web services, 
security?
Get stuff done quickly with pre-integrated technology to make your 
job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink

2006-05-09 Thread Igor Vaynberg
well, my concern is to make this automatic.for example:when a component contributes scriptfunc whatever() { }/script through wicket:head that contribution needs to magically merge.
or when a component contributes stylea { color:red; }/style that also has to magically get mergedbut from what i have seen there is no way to do that, you first have to transform these kinds of outputs into a more dynamic version that can then be merged using _javascript_, etc...which is a huge pain.
im not sure how to proceed at all.-IgorOn 5/9/06, Rüdiger Schulz [EMAIL PROTECTED] wrote:
Hello Igornot sure how iframes behave here, but it is possible to call_javascript_ functions in one frame, which is defined in another frame,
which then again can do anything with the calling frame. Done this acouple of years ago (when frames where still en vogue ;), but as itturned out, nothing like that will be necessary to solve our problemhere :-)
--greetings from Berlin,Rüdiger SchulzIgor Vaynberg wrote on 04.05.2006 at 19:28: i guess there can be a hidden iframe, but then the loaded js will not be part of the page because frames are isolated, no?
 -Igor On 5/4/06, Rüdiger Schulz [EMAIL PROTECTED] wrote: in that case i dont see how you can ever make this work in xhtml unless you refresh the entire page.
 A twisted solution using an invisible frame loading only JS comes to mind ;-) - Rüdiger --- Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmdlnk kid0709 bid 3057 dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Localization

2006-05-09 Thread Igor Vaynberg
this was never meant to be postprocessedusers are not meant to output wicket:i18n:key to the attribute using an attribute modifier and expect it to work.this was only meant as a preprocessing step toloading the markup. after that users are on their own.
of course then we need to figure out where the properties come from because you dont have the hierarchy yet? maybe this can wait until 2.0.-IgorOn 5/9/06, 
Matej Knopp [EMAIL PROTECTED] wrote:Well, it looks that this is not as easy as it seemed to be.
I've made a MarkupFilter that translates the string. But I needto give it ContainerInfo of current markup resource (same asWicketMessageTagHandler gets). The problem is that I can't touch markup(or markup.getResource
) in my LocalizedMarkupParser#initFilterChainmethod (I derived my own parser from MarkupParser).At least protected Markup MarkupParser.getMarkup() would help.-MatejMatej Knopp wrote: Matej Knopp wrote:
 Juergen Donnerstag wrote: On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote: $${key}? Or whatever you want. I don't need this behavior to be in wicket core. I'm much more
 interested in clean and simple preprocessing filters, something wicket lacks currently. Oh, stupid me. It is possible. Was it possible in 1.1 too? I guess I was
 evaluating this and it was not possible back then. Anyway, it seems that markup filter should be enough. Unfortunately IMarkupFilter does not seem to be capable of replacing
 things in RawMarkup elements, does it? So it seems not to be able to replace ${key} to localized value, or am I missing anything here? ?xml encoding=.. does complicate things a bit, but not much. What
 about load the ?xml line, determine encoding and loat the rest of the file as string. Then let the preprocessor process it and then send it to MarkupParser? (Just a thoght).
 -Matej That is true, we don't have something that allow to pre-processor the plain input string and IMO it is not needed and when I think about ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
 similar function but are already aware of the xml structure, the encoding, etc.. And it is trivial to register them with the application. Juergen
 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your
 job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job
 easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] changing images with Ajax

2006-05-09 Thread Igor Vaynberg
heh, i think its random enough. how many decimal places does it show? but you guys can do whatever you want of course :)-IgorOn 5/9/06, Matej Knopp
 [EMAIL PROTECTED] wrote:System.nanoTime
() is @since 1.5, so I don't think it's usable anyway :)Johan Compagner wrote: i think millis will do. If you have a request in the same milli second for the same image. Then the image should really be the same, What can possible change in 1
 milli! :) johan On 5/9/06, *Martijn Dashorst* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote: On 5/9/06, *Matej Knopp*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 Johan Compagner wrote: still the question remains how random is random ;) right. maybe one shared atomically increased integer would do better job?
 System.nanoTime() should do the trick :-) Martijn---Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Filterable ListViews

2006-05-09 Thread Igor Vaynberg
On 5/9/06, Michiel Trimpe [EMAIL PROTECTED] wrote:
















Thanks for the feedback, I've gotten
the basics working but I have two remaining problems:




 How
 do I filter on reference Objects, not stringsyou mean in the DropDownChoice you want to get an object reference back?you should use a IChoiceRenderer - that way wicket can translate the choice made back into your object.
see examples of DropDownChoice in wicket-examples component reference
Can
 I make my code filter on partial matches as well?thats really up to you. you are in control of the bean that creates the criteria, how you filter your query using that bean is entirely up to you.

P.S. Would someone like to help me create
a proper component for editing Sets? I've got a basic setup but would
like to get it ready for prime-time as practice.whats it do? whats it look like?-Igor


Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp
If WicketMessageTagHandler can get resource.getContainerInfo(), why my 
filter can't?


There's something about this that doesn't make me feel entirely good. 
Why can't my filter get this information? Or even better, why can't my 
MarkupParser get this information? Is it /that/ internal?


IMHO sometimes wicket is being way too overprotective. Quite often when 
I want to implement something with wicket that is not common I get into 
this kind of situation. And sometimes it can be little bit frustrating.


-Matej

Igor Vaynberg wrote:

this was never meant to be postprocessed

users are not meant to output wicket:i18n:key to the attribute using an 
attribute modifier and expect it to work.


this was only meant as a preprocessing step toloading the markup. after 
that users are on their own.


of course then we need to figure out where the properties come from 
because you dont have the hierarchy yet? maybe this can wait until 2.0.


-Igor


On 5/9/06, * Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Well, it looks that this is not as easy as it seemed to be.

I've made a MarkupFilter that translates the string. But I need
to give it ContainerInfo of current markup resource (same as
WicketMessageTagHandler gets). The problem is that I can't touch markup
(or markup.getResource ) in my LocalizedMarkupParser#initFilterChain
method (I derived my own parser from MarkupParser).

At least protected Markup MarkupParser.getMarkup() would help.

-Matej

Matej Knopp wrote:
  Matej Knopp wrote:
  Juergen Donnerstag wrote:
  On 5/9/06, Matej Knopp [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
  $${key}? Or whatever you want.
  I don't need this behavior to be in wicket core. I'm much more
  interested in clean and simple preprocessing filters,
something wicket
  lacks currently.
 
  Oh, stupid me. It is possible. Was it possible in 1.1 too? I
guess I was
  evaluating this and it was not possible back then.
 
  Anyway, it seems that markup filter should be enough.
 
  Unfortunately IMarkupFilter does not seem to be capable of replacing
  things in RawMarkup elements, does it? So it seems not to be able to
  replace ${key} to localized value, or am I missing anything here?
 
  ?xml encoding=.. does complicate things a bit, but not much.
What
  about load the ?xml line, determine encoding and loat the rest
of the
  file as string. Then let the preprocessor process it and then
send it
  to MarkupParser? (Just a thoght).
 
  -Matej
 
  That is true, we don't have something that allow to
pre-processor the
  plain input string and IMO it is not needed and when I think about
  ?xml encoding=..? it could be dangerous. IMarkupFilter serve a
  similar function but are already aware of the xml structure, the
  encoding, etc.. And it is trivial to register them with the
  application.
 
  Juergen
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
  security?
  Get stuff done quickly with pre-integrated technology to make your
  job easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make
your job
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make
your job
  easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

  

[Wicket-user] Visibility of clearInput method

2006-05-09 Thread Roan O'Sullivan


Could the FormComponent#clearInput() be made public? 

This is my scenario:

* a recipient property on my model object
* a DropDown (that listens to selection change events) lets users select from a list of Recipient beans
* aTextField is bound to the email fieldfor the model object's recipient property 

When I select a new Recipient, the display value of the email TextField is still blank. In 1.1.1 the TextField would show the new model object value (which is the correct behavior for my page). 

I assume the change in behavior with 1.2 is due to the introduction of FormComponent#rawInput (which, by the way, works like a dream in most other scenarios). The #getRawInput() method on theTextField bound to "recipient.email" returns empty string ("") in the #onSelectionChanged() listener for the DropDown bound to recipient.

If I could invoke #clearInput() on the TextField bound to "recipient.email", I assume that model value for the newly selected recipient would get rendered just like I want it to. Are developers willing to consider API changes this late in the game for a 1.2 release?

If#clearInput()cannot (or should not) be made public, can anyone think of any other ways to achieve this effect?

Thanks, Roan

Re: [Wicket-user] Fragment rendering

2006-05-09 Thread Igor Vaynberg
you only need to set the setting if the fragment is going to be rendererd by a different component then the one whose markup its defined in.for example, if you were going to use the fragment that is defiend in your page to create a panel that you add to a column inside a datatable - then you have to specify who the markup owner is - because the component in charge of rendering the fragment ( in this case an Item inside the datatable ) is not the same component in whose markup the fragment is defined ( the page )
does that make any sense?-IgorOn 5/9/06, JasonB [EMAIL PROTECTED] wrote:
Juergen Donnerstag wrote: you need to register it. It is not yet activated by default
 application.getPageSettings().addComponentResolver(new FragmentResolver());Strangely enough I just used fragments over the weekend and didn't haveto set this setting. What confused me was not having to add a component
to define that a fragment definition existed on the current page. AfterI ignored that, using the fragment was amazingly simple. - Jason B.---
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Localization

2006-05-09 Thread Igor Vaynberg
the flipside is of course that we were able to refactor a ton without breaking too much api. you can argue that 1.2 has a lot of api breaks, but if you compare code in 1.2 to 1.1 they can almost be different frameworks.
-IgorOn 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
If WicketMessageTagHandler can get resource.getContainerInfo(), why myfilter can't?There's something about this that doesn't make me feel entirely good.Why can't my filter get this information? Or even better, why can't my
MarkupParser get this information? Is it /that/ internal?IMHO sometimes wicket is being way too overprotective. Quite often whenI want to implement something with wicket that is not common I get intothis kind of situation. And sometimes it can be little bit frustrating.
-MatejIgor Vaynberg wrote: this was never meant to be postprocessed users are not meant to output wicket:i18n:key to the attribute using an attribute modifier and expect it to work.
 this was only meant as a preprocessing step toloading the markup. after that users are on their own. of course then we need to figure out where the properties come from because you dont have the hierarchy yet? maybe this can wait until 
2.0. -Igor On 5/9/06, * Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, it looks that this is not as easy as it seemed to be.
 I've made a MarkupFilter that translates the string. But I need to give it ContainerInfo of current markup resource (same as WicketMessageTagHandler gets). The problem is that I can't touch markup
 (or markup.getResource ) in my LocalizedMarkupParser#initFilterChain method (I derived my own parser from MarkupParser). At least protected Markup MarkupParser.getMarkup() would help.
 -Matej Matej Knopp wrote: Matej Knopp wrote: Juergen Donnerstag wrote: On 5/9/06, Matej Knopp 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: $${key}? Or whatever you want. I don't need this behavior to be in wicket core. I'm much more
 interested in clean and simple preprocessing filters, something wicket lacks currently. Oh, stupid me. It is possible. Was it possible in 
1.1 too? I guess I was evaluating this and it was not possible back then. Anyway, it seems that markup filter should be enough. Unfortunately IMarkupFilter does not seem to be capable of replacing
 things in RawMarkup elements, does it? So it seems not to be able to replace ${key} to localized value, or am I missing anything here? ?xml encoding=.. does complicate things a bit, but not much.
 What about load the ?xml line, determine encoding and loat the rest of the file as string. Then let the preprocessor process it and then send it
 to MarkupParser? (Just a thoght). -Matej That is true, we don't have something that allow to pre-processor the
 plain input string and IMO it is not needed and when I think about ?xml encoding=..? it could be dangerous. IMarkupFilter serve a similar function but are already aware of the xml structure, the
 encoding, etc.. And it is trivial to register them with the application. Juergen
 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your
 job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
 --- Using Tomcat but need to do more? Need to support web services,
 security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make
 your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
 --- Using Tomcat but need to do 

Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

Yeah, Wicket is not perfect and neither are we. That's why we discuss
here and see whether we can reach common ground. Then everyone will be
happy! :)

Eelco

On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

the flipside is of course that we were able to refactor a ton without
breaking too much api. you can argue that 1.2 has a lot of api breaks, but
if you compare code in 1.2 to 1.1 they can almost be different frameworks.

-Igor



On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
 If WicketMessageTagHandler can get resource.getContainerInfo(), why my
 filter can't?

 There's something about this that doesn't make me feel entirely good.
 Why can't my filter get this information? Or even better, why can't my
 MarkupParser get this information? Is it /that/ internal?

 IMHO sometimes wicket is being way too overprotective. Quite often when
 I want to implement something with wicket that is not common I get into
 this kind of situation. And sometimes it can be little bit frustrating.

 -Matej

 Igor Vaynberg wrote:
  this was never meant to be postprocessed
 
  users are not meant to output wicket:i18n:key to the attribute using an
  attribute modifier and expect it to work.
 
  this was only meant as a preprocessing step toloading the markup. after
  that users are on their own.
 
  of course then we need to figure out where the properties come from
  because you dont have the hierarchy yet? maybe this can wait until 2.0.
 
  -Igor
 
 
  On 5/9/06, * Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
 
  Well, it looks that this is not as easy as it seemed to be.
 
  I've made a MarkupFilter that translates the string. But I need
  to give it ContainerInfo of current markup resource (same as
  WicketMessageTagHandler gets). The problem is that I can't touch
markup
  (or markup.getResource ) in my
LocalizedMarkupParser#initFilterChain
  method (I derived my own parser from MarkupParser).
 
  At least protected Markup MarkupParser.getMarkup() would help.
 
  -Matej
 
  Matej Knopp wrote:
Matej Knopp wrote:
Juergen Donnerstag wrote:
On 5/9/06, Matej Knopp  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  wrote:
$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm much more
interested in clean and simple preprocessing filters,
  something wicket
lacks currently.
   
Oh, stupid me. It is possible. Was it possible in 1.1 too? I
  guess I was
evaluating this and it was not possible back then.
   
Anyway, it seems that markup filter should be enough.
   
Unfortunately IMarkupFilter does not seem to be capable of
replacing
things in RawMarkup elements, does it? So it seems not to be
able to
replace ${key} to localized value, or am I missing anything
here?
   
?xml encoding=.. does complicate things a bit, but not much.
  What
about load the ?xml line, determine encoding and loat the rest
  of the
file as string. Then let the preprocessor process it and then
  send it
to MarkupParser? (Just a thoght).
   
-Matej
   
That is true, we don't have something that allow to
  pre-processor the
plain input string and IMO it is not needed and when I think
about
?xml encoding=..? it could be dangerous. IMarkupFilter
serve a
similar function but are already aware of the xml structure,
the
encoding, etc.. And it is trivial to register them with the
application.
   
Juergen
   
   
   
---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make
your
job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache
Geronimo
   
 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642

   
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
   
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
   
   
---
Using Tomcat but need to do more? Need to support web services,
  security?
Get stuff done quickly with pre-integrated technology to make
  your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache
Geronimo
   
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
  

Re: [Wicket-user] MaskConverter: isn't a better way?

2006-05-09 Thread Igor Vaynberg
to elaborate a littlelets say we did let you use a setterthen we have to keep a reference to the converter in the Component, so when serialized it is one more object - that almost never changes - that has to be serialized. making components session footprint even bigger.
also if we let you use a setter we have to version the changes - so thats yet another object we have to add to session (the undo object)by making getconverter() overridible we eliminate the two scenarios above.
-IgorOn 5/9/06, Johan Compagner [EMAIL PROTECTED] wrote:
because there is only one converter and validators must be stored in a list.This is all to keep the internal state of a component as clean as possible.You don't have to create an anon class. You can return there a normal class or a inner class if you want.
johanOn 5/9/06, Bruno Borges 
[EMAIL PROTECTED] wrote:
I really don't like the idea of having too many properties that must be get through anonymous classes.Why there's no setConverter(IConverter c) just like add(IValidator v) returning the object itself?

see yaOn 5/9/06, Johan Compagner 

[EMAIL PROTECTED] wrote:
currently not. What could be better in your eyes?We will overhaul the converter interface in the next version so that it should be simpler.


johanOn 5/9/06, 
Bruno Borges [EMAIL PROTECTED] wrote:



This is the only way I know (better: I learned from Wiki/Docs/Examples) on how to use MaskConverter:TextField zipCode = new TextField(zipCode) {

public IConverter getConverter() {MaskFormatter zipFormat = null;try {zipFormat = new MaskFormatter(#-###); // Brazillian format

} catch(Exception e) {} // never throwsreturn new UncheckedMaskConverter(zipFormat);}};Isn't a better way to to this? 



-- 
Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 
1.4Sun Certified Web Component Developer for 1.4



-- Bruno Borges[EMAIL PROTECTED]

Sun Certified Java Programmer for 1.4Sun Certified Web Component Developer for 
1.4






Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Igor Vaynberg wrote:
I don't mind API breaks. Not at all. If I touch code that is not a part 
of Stable API, I take the risk of having to change my code when wicket 
version changes. I really don't mind.


What I do mind is the (occasional) lack of flexibility and things that 
keep me from extending the framework the way I want.


The truth is that this kind of protection doesn't work very well. When 
I was porting my application from 1.0 to 1.1, there were couple of 
things that didn't work and had to be redone. When porting the 
application from 1.1 to 1.2 things were even worse. The whole parsing 
process was changed and my code didn't work anymore (I had my own 
XMLPullParser that wrapped wicket default one). And I didn't touch any 
internal stuff.



-Matej

the flipside is of course that we were able to refactor a ton without 
breaking too much api. you can argue that 1.2 has a lot of api breaks, 
but if you compare code in 1.2 to 1.1 they can almost be different 
frameworks.


-Igor


On 5/9/06, *Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

If WicketMessageTagHandler can get resource.getContainerInfo(), why my
filter can't?

There's something about this that doesn't make me feel entirely good.
Why can't my filter get this information? Or even better, why can't my
MarkupParser get this information? Is it /that/ internal?

IMHO sometimes wicket is being way too overprotective. Quite often when
I want to implement something with wicket that is not common I get into
this kind of situation. And sometimes it can be little bit frustrating.

-Matej

Igor Vaynberg wrote:
  this was never meant to be postprocessed
 
  users are not meant to output wicket:i18n:key to the attribute
using an
  attribute modifier and expect it to work.
 
  this was only meant as a preprocessing step toloading the markup.
after
  that users are on their own.
 
  of course then we need to figure out where the properties come from
  because you dont have the hierarchy yet? maybe this can wait
until 2.0.
 
  -Igor
 
 
  On 5/9/06, * Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  Well, it looks that this is not as easy as it seemed to be.
 
  I've made a MarkupFilter that translates the string. But I need
  to give it ContainerInfo of current markup resource (same as
  WicketMessageTagHandler gets). The problem is that I can't
touch markup
  (or markup.getResource ) in my
LocalizedMarkupParser#initFilterChain
  method (I derived my own parser from MarkupParser).
 
  At least protected Markup MarkupParser.getMarkup() would help.
 
  -Matej
 
  Matej Knopp wrote:
Matej Knopp wrote:
Juergen Donnerstag wrote:
On 5/9/06, Matej Knopp  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]
  wrote:
$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm
much more
interested in clean and simple preprocessing filters,
  something wicket
lacks currently.
   
Oh, stupid me. It is possible. Was it possible in 1.1 too? I
  guess I was
evaluating this and it was not possible back then.
   
Anyway, it seems that markup filter should be enough.
   
Unfortunately IMarkupFilter does not seem to be capable
of replacing
things in RawMarkup elements, does it? So it seems not to
be able to
replace ${key} to localized value, or am I missing
anything here?
   
?xml encoding=.. does complicate things a bit, but not
much.
  What
about load the ?xml line, determine encoding and loat
the rest
  of the
file as string. Then let the preprocessor process it and then
  send it
to MarkupParser? (Just a thoght).
   
-Matej
   
That is true, we don't have something that allow to
  pre-processor the
plain input string and IMO it is not needed and when I
think about
?xml encoding=..? it could be dangerous.
IMarkupFilter serve a
similar function but are already aware of the xml
structure, the
encoding, etc.. And it is trivial to register them with the
application.
   
Juergen
   
   
---
Using Tomcat but need to do more? Need to support web
services,
security?
Get stuff done quickly with pre-integrated technology to
make your
job 

Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Wicket really isn't perfect. But it's really getting closer and closer :)

-Matej

Eelco Hillenius wrote:

Yeah, Wicket is not perfect and neither are we. That's why we discuss
here and see whether we can reach common ground. Then everyone will be
happy! :)

Eelco

On 5/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

the flipside is of course that we were able to refactor a ton without
breaking too much api. you can argue that 1.2 has a lot of api breaks, 
but
if you compare code in 1.2 to 1.1 they can almost be different 
frameworks.


-Igor



On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:
 If WicketMessageTagHandler can get resource.getContainerInfo(), why my
 filter can't?

 There's something about this that doesn't make me feel entirely good.
 Why can't my filter get this information? Or even better, why can't my
 MarkupParser get this information? Is it /that/ internal?

 IMHO sometimes wicket is being way too overprotective. Quite often when
 I want to implement something with wicket that is not common I get into
 this kind of situation. And sometimes it can be little bit frustrating.

 -Matej

 Igor Vaynberg wrote:
  this was never meant to be postprocessed
 
  users are not meant to output wicket:i18n:key to the attribute 
using an

  attribute modifier and expect it to work.
 
  this was only meant as a preprocessing step toloading the markup. 
after

  that users are on their own.
 
  of course then we need to figure out where the properties come from
  because you dont have the hierarchy yet? maybe this can wait until 
2.0.

 
  -Igor
 
 
  On 5/9/06, * Matej Knopp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
 
  Well, it looks that this is not as easy as it seemed to be.
 
  I've made a MarkupFilter that translates the string. But I need
  to give it ContainerInfo of current markup resource (same as
  WicketMessageTagHandler gets). The problem is that I can't touch
markup
  (or markup.getResource ) in my
LocalizedMarkupParser#initFilterChain
  method (I derived my own parser from MarkupParser).
 
  At least protected Markup MarkupParser.getMarkup() would help.
 
  -Matej
 
  Matej Knopp wrote:
Matej Knopp wrote:
Juergen Donnerstag wrote:
On 5/9/06, Matej Knopp  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  wrote:
$${key}? Or whatever you want.
I don't need this behavior to be in wicket core. I'm 
much more

interested in clean and simple preprocessing filters,
  something wicket
lacks currently.
   
Oh, stupid me. It is possible. Was it possible in 1.1 too? I
  guess I was
evaluating this and it was not possible back then.
   
Anyway, it seems that markup filter should be enough.
   
Unfortunately IMarkupFilter does not seem to be capable of
replacing
things in RawMarkup elements, does it? So it seems not to be
able to
replace ${key} to localized value, or am I missing anything
here?
   
?xml encoding=.. does complicate things a bit, but not 
much.

  What
about load the ?xml line, determine encoding and loat the 
rest

  of the
file as string. Then let the preprocessor process it and then
  send it
to MarkupParser? (Just a thoght).
   
-Matej
   
That is true, we don't have something that allow to
  pre-processor the
plain input string and IMO it is not needed and when I think
about
?xml encoding=..? it could be dangerous. IMarkupFilter
serve a
similar function but are already aware of the xml structure,
the
encoding, etc.. And it is trivial to register them with the
application.
   
Juergen
   
   
   
---
Using Tomcat but need to do more? Need to support web 
services,

security?
Get stuff done quickly with pre-integrated technology to 
make

your
job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache
Geronimo
   
 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642

   
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
   
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
   
   
---
Using Tomcat but need to do more? Need to support web 
services,

  security?
Get stuff done quickly with pre-integrated technology to make
  your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache
Geronimo
   
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 

Re: [Wicket-user] Localization

2006-05-09 Thread Eelco Hillenius

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

Igor Vaynberg wrote:
I don't mind API breaks. Not at all. If I touch code that is not a part
of Stable API, I take the risk of having to change my code when wicket
version changes. I really don't mind.


Well, not everyone agrees with you. Some people started to be
seriously grumpy about it the last two months.




- Hide quoted text -

What I do mind is the (occasional) lack of flexibility and things that
keep me from extending the framework the way I want.


The only thing that will not happen is if we know beforehand what that'll be.


The truth is that this kind of protection doesn't work very well. When
I was porting my application from 1.0 to 1.1, there were couple of
things that didn't work and had to be redone. When porting the
application from 1.1 to 1.2 things were even worse. The whole parsing
process was changed and my code didn't work anymore (I had my own
XMLPullParser that wrapped wicket default one). And I didn't touch any
internal stuff.


Imagine what it would have been like if we didn't protect so much.
Seriously, there would be no beginning to it as you probably would
have 'customized' it so much that there wouldn't be a start.

Furthermore - and I feel this is very important - the fact that we
have guys like you complaining about features and extension points you
miss, tells us (and the rest of the readers here) what kind of use
cases there may be and the discussion hopefully concludes in something
really usefull. It has been like that many times, and if we opened up
prematurely, you might have been able to profit from it from time to
time, but Wicket wouldn't have been as good.

So, I think we're doing just fine. We should look for something that
works good out of the box on top of extension points that are useful.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp

Eelco Hillenius wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

Igor Vaynberg wrote:
I don't mind API breaks. Not at all. If I touch code that is not a part
of Stable API, I take the risk of having to change my code when wicket
version changes. I really don't mind.


Well, not everyone agrees with you. Some people started to be
seriously grumpy about it the last two months.

Yeah, I can imagine. That was my opinion only.





- Hide quoted text -

What I do mind is the (occasional) lack of flexibility and things that
keep me from extending the framework the way I want.


The only thing that will not happen is if we know beforehand what 
that'll be.



The truth is that this kind of protection doesn't work very well. When
I was porting my application from 1.0 to 1.1, there were couple of
things that didn't work and had to be redone. When porting the
application from 1.1 to 1.2 things were even worse. The whole parsing
process was changed and my code didn't work anymore (I had my own
XMLPullParser that wrapped wicket default one). And I didn't touch any
internal stuff.


Imagine what it would have been like if we didn't protect so much.
Seriously, there would be no beginning to it as you probably would
have 'customized' it so much that there wouldn't be a start.
I don't think protection is entirely bad idea. I just think that 
sometimes the protection is taken too far.


Furthermore - and I feel this is very important - the fact that we
have guys like you complaining about features and extension points you
miss, tells us (and the rest of the readers here) what kind of use
cases there may be and the discussion hopefully concludes in something
really usefull. It has been like that many times, and if we opened up
prematurely, you might have been able to profit from it from time to
time, but Wicket wouldn't have been as good.
I can second this, I know that you don't ignore the feedback. It's just 
that sometimes I'd rather take the risk of being forced to redo 
something even if the minor version changes, rather than not be able to 
do the thing at all.


So, I think we're doing just fine. We should look for something that
works good out of the box on top of extension points that are useful.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Matej Knopp
Anyway, I don't want to sound grumpy or bitter. I really do appreciate 
all the hard work you guys do on Wicket. Wicket has made an incredible 
progress and I really like the way it's heading.


I'm using wicket for almost year and half now and it seems that I'm not 
going to abandon it any soon :)


-Matej

Matej Knopp wrote:

Eelco Hillenius wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

Igor Vaynberg wrote:
I don't mind API breaks. Not at all. If I touch code that is not a part
of Stable API, I take the risk of having to change my code when wicket
version changes. I really don't mind.


Well, not everyone agrees with you. Some people started to be
seriously grumpy about it the last two months.

Yeah, I can imagine. That was my opinion only.





- Hide quoted text -

What I do mind is the (occasional) lack of flexibility and things that
keep me from extending the framework the way I want.


The only thing that will not happen is if we know beforehand what 
that'll be.



The truth is that this kind of protection doesn't work very well. When
I was porting my application from 1.0 to 1.1, there were couple of
things that didn't work and had to be redone. When porting the
application from 1.1 to 1.2 things were even worse. The whole parsing
process was changed and my code didn't work anymore (I had my own
XMLPullParser that wrapped wicket default one). And I didn't touch any
internal stuff.


Imagine what it would have been like if we didn't protect so much.
Seriously, there would be no beginning to it as you probably would
have 'customized' it so much that there wouldn't be a start.
I don't think protection is entirely bad idea. I just think that 
sometimes the protection is taken too far.


Furthermore - and I feel this is very important - the fact that we
have guys like you complaining about features and extension points you
miss, tells us (and the rest of the readers here) what kind of use
cases there may be and the discussion hopefully concludes in something
really usefull. It has been like that many times, and if we opened up
prematurely, you might have been able to profit from it from time to
time, but Wicket wouldn't have been as good.
I can second this, I know that you don't ignore the feedback. It's just 
that sometimes I'd rather take the risk of being forced to redo 
something even if the minor version changes, rather than not be able to 
do the thing at all.


So, I think we're doing just fine. We should look for something that
works good out of the box on top of extension points that are useful.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Localization

2006-05-09 Thread Igor Vaynberg
Eelco Hillenius wrote: On 5/9/06, Matej Knopp 
[EMAIL PROTECTED] wrote: Igor Vaynberg wrote: I don't mind API breaks. Not at all. If I touch code that is not a part of Stable API, I take the risk of having to change my code when wicket
 version changes. I really don't mind.hey!! i didnt write that!!-Igor


Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Eelco Hillenius

It's explained in the javadocs. And check out the YUI projects from
wicket-stuff and like at the Slider component which has an example of
it. Also, see bottom of
http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/

Eelco


On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:



Eelco Hillenius wrote:
 Or take a look at what's in wicket.extensions.util.resource and look
 at the Slider component in YUI for an example. I think it's cleaner
 like that (keep the javascript in seperate files and run some variable
 substitution over it).

what do you mean by 'variable substitution'? how can i do that?


 Eelco

 On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
 hi,

 i have a feedback based on javascript. basically, i want to populate a
 javascript function's body with all messages, so it will show them one
 by one.

 the final result will be like:
 function showFeedback() {
 var message;
 message += first feedback\n;
 message += second feedback\n;

 alert(message);
 }

 theoretically, in wicket, create a panel with something like:
 function showFeedback() {
 var message;
 span wicket:id=feedback
 message += span wicket:id=message/span
 /span
 alert(message);
 }

 but, will the parser handle this? will the 'span' tags be replaced? i
 thing that at least the 'message' span will not, since it uses Label,
 which replaces the body, not the tag.

 how can i do this?

 --
 ===
 Ittay Dror
 Chief architect, openQRM TL,
 RD, Qlusters Inc.
 [EMAIL PROTECTED]
 +972-3-6081994 Fax: +972-3-6081841

 http://www.openQRM.org
 - Keeps your Data-Center Up and Running


 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



 ---
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Ittay Dror

thanx, i did look and you do amazing things with wicket

however, i still want to do it as i first suggested. the reason is that the function i 
mentioned is not that simple and has a lot of gui logic in it, which i don't 
want to move inside my java code.

thanx,
ittay

Eelco Hillenius wrote:

It's explained in the javadocs. And check out the YUI projects from
wicket-stuff and like at the Slider component which has an example of
it. Also, see bottom of
http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ 



Eelco


On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:



Eelco Hillenius wrote:
 Or take a look at what's in wicket.extensions.util.resource and look
 at the Slider component in YUI for an example. I think it's cleaner
 like that (keep the javascript in seperate files and run some variable
 substitution over it).

what do you mean by 'variable substitution'? how can i do that?


 Eelco

 On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
 hi,

 i have a feedback based on javascript. basically, i want to populate a
 javascript function's body with all messages, so it will show them one
 by one.

 the final result will be like:
 function showFeedback() {
 var message;
 message += first feedback\n;
 message += second feedback\n;

 alert(message);
 }

 theoretically, in wicket, create a panel with something like:
 function showFeedback() {
 var message;
 span wicket:id=feedback
 message += span wicket:id=message/span
 /span
 alert(message);
 }

 but, will the parser handle this? will the 'span' tags be replaced? i
 thing that at least the 'message' span will not, since it uses Label,
 which replaces the body, not the tag.

 how can i do this?

 --
 ===
 Ittay Dror
 Chief architect, openQRM TL,
 RD, Qlusters Inc.
 [EMAIL PROTECTED]
 +972-3-6081994 Fax: +972-3-6081841

 http://www.openQRM.org
 - Keeps your Data-Center Up and Running


 ---
 Using Tomcat but need to do more? Need to support web services, 
security?

 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

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



 ---
 Using Tomcat but need to do more? Need to support web services, 
security?

 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
===
Ittay Dror
Chief architect, openQRM TL,
RD, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

Re: [Wicket-user] Localization

2006-05-09 Thread Ittay Dror



Eelco Hillenius wrote:

On 5/9/06, Matej Knopp [EMAIL PROTECTED] wrote:

Igor Vaynberg wrote:
I don't mind API breaks. Not at all. If I touch code that is not a part
of Stable API, I take the risk of having to change my code when wicket
version changes. I really don't mind.


Well, not everyone agrees with you. Some people started to be
seriously grumpy about it the last two months.


for what it's worth, as a user, i *would* like API to change, if it means a 
more natural API and functionality. wicket is great, but i feel the 
API/functionality is not mature, in the sense that when i look in the code, 
some things feel hackish.

can't refactoring tools help? maybe provide a wicket-compatability package 
(jar)?






- Hide quoted text -

What I do mind is the (occasional) lack of flexibility and things that
keep me from extending the framework the way I want.


The only thing that will not happen is if we know beforehand what 
that'll be.



The truth is that this kind of protection doesn't work very well. When
I was porting my application from 1.0 to 1.1, there were couple of
things that didn't work and had to be redone. When porting the
application from 1.1 to 1.2 things were even worse. The whole parsing
process was changed and my code didn't work anymore (I had my own
XMLPullParser that wrapped wicket default one). And I didn't touch any
internal stuff.


Imagine what it would have been like if we didn't protect so much.
Seriously, there would be no beginning to it as you probably would
have 'customized' it so much that there wouldn't be a start.

Furthermore - and I feel this is very important - the fact that we
have guys like you complaining about features and extension points you
miss, tells us (and the rest of the readers here) what kind of use
cases there may be and the discussion hopefully concludes in something
really usefull. It has been like that many times, and if we opened up
prematurely, you might have been able to profit from it from time to
time, but Wicket wouldn't have been as good.

So, I think we're doing just fine. We should look for something that
works good out of the box on top of extension points that are useful.

Eelco


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Igor Vaynberg
but what is really a problem then i dont understand? all you want to do is write out some _javascript_ based on feedback messages? instead of using a feedbackpanel add a label that writes out the _javascript_ you want. you can get the messages using 
Page.getFeedbackMessages()so something like this:add(new Label(js, new AbstractReadOnlyModel() { Object getObject(Component c) { FeedbackMessages msgs=c.getPage().getFeedbackMessages();
 AppendingStringBuffer js=new AppendingStringBuffer();  fill in _javascript_ into js return js.toString(); }).setEscapeModelStrings(false));and you should be good to go right?
-IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
thanx, i did look and you do amazing things with wickethowever, i still want to do it as i first suggested. the reason is that the function i mentioned is not that simple and has a lot of gui logic in it, which i don't want to move inside my java code.
thanx,ittayEelco Hillenius wrote: It's explained in the javadocs. And check out the YUI projects from wicket-stuff and like at the Slider component which has an example of it. Also, see bottom of
 http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ Eelco
 On 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: Eelco Hillenius wrote:  Or take a look at what's in 
wicket.extensions.util.resource and look  at the Slider component in YUI for an example. I think it's cleaner  like that (keep the _javascript_ in seperate files and run some variable  substitution over it).
 what do you mean by 'variable substitution'? how can i do that?   Eelco   On 5/9/06, Ittay Dror 
[EMAIL PROTECTED] wrote:  hi,   i have a feedback based on _javascript_. basically, i want to populate a  _javascript_ function's body with all messages, so it will show them one
  by one.   the final result will be like:  function showFeedback() {  var message;  message += first feedback\n;
  message += second feedback\n;   alert(message);  }   theoretically, in wicket, create a panel with something like:
  function showFeedback() {  var message;  span wicket:id=feedback  message += span wicket:id=message/span
  /span  alert(message);  }   but, will the parser handle this? will the 'span' tags be replaced? i
  thing that at least the 'message' span will not, since it uses Label,  which replaces the body, not the tag.   how can i do this? 
  --  ===  Ittay Dror  Chief architect, openQRM TL,  RD, Qlusters Inc.  
[EMAIL PROTECTED]  +972-3-6081994 Fax: +972-3-6081841   http://www.openQRM.org
  - Keeps your Data-Center Up and Running---  Using Tomcat but need to do more? Need to support web services,
 security?  Get stuff done quickly with pre-integrated technology to make your job  easier  Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job  easier  Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo  http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user  -- ===
 Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] +972-3-6081994 Fax: +972-3-6081841
 http://www.openQRM.org - Keeps your Data-Center Up and Running ---
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user --- Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--===
Ittay DrorChief architect, openQRM TL,RD, Qlusters 

[Wicket-user] can feedback panel be generalized?

2006-05-09 Thread Ittay Dror

the FeedbackPanel component has a lot of non-trivial functionality, that makes 
it hard to write my own customized version of it. especially, adding other 
components, or controlling existing ones is hackish (i have to use 
Component.get() and visitChildren)

maybe have FeedbackPanel use a FeedbackComponent, created through 
newFeedbackComponent, provided by subclasses?

--
===
Ittay Dror 
Chief architect, openQRM TL, 
RD, Qlusters Inc.

[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841

http://www.openQRM.org
- Keeps your Data-Center Up and Running


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Ittay Dror



Igor Vaynberg wrote:
but what is really a problem then i dont understand? all you want to do 
is write out some javascript based on feedback messages? instead of 
using a feedbackpanel add a label that writes out the javascript you 
want. you can get the messages using Page.getFeedbackMessages()


so something like this:


add(new Label(js, new AbstractReadOnlyModel() {
Object getObject(Component c) {
  FeedbackMessages msgs=c.getPage().getFeedbackMessages();
  AppendingStringBuffer js=new AppendingStringBuffer();
   fill in javascript into js
  return js.toString();
 }).setEscapeModelStrings(false));

and you should be good to go right?


the javascript has a lot of GUI code in it, so it looks to me like something from the 
early days of servlets. i'm not looking for something that works, but, for something that 
works the wicket way



-Igor


On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


thanx, i did look and you do amazing things with wicket

however, i still want to do it as i first suggested. the reason is
that the function i mentioned is not that simple and has a lot of
gui logic in it, which i don't want to move inside my java code.

thanx,
ittay

Eelco Hillenius wrote:
  It's explained in the javadocs. And check out the YUI projects from
  wicket-stuff and like at the Slider component which has an example of
  it. Also, see bottom of
 

http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/
 
 
  Eelco
 
 
  On 5/9/06, Ittay Dror [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 
 
  Eelco Hillenius wrote:
   Or take a look at what's in wicket.extensions.util.resource
and look
   at the Slider component in YUI for an example. I think it's
cleaner
   like that (keep the javascript in seperate files and run some
variable
   substitution over it).
 
  what do you mean by 'variable substitution'? how can i do that?
 
  
   Eelco
  
   On 5/9/06, Ittay Dror  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
   hi,
  
   i have a feedback based on javascript. basically, i want to
populate a
   javascript function's body with all messages, so it will show
them one
   by one.
  
   the final result will be like:
   function showFeedback() {
   var message;
   message += first feedback\n;
   message += second feedback\n;
  
   alert(message);
   }
  
   theoretically, in wicket, create a panel with something like:
   function showFeedback() {
   var message;
   span wicket:id=feedback
   message += span wicket:id=message/span
   /span
   alert(message);
   }
  
   but, will the parser handle this? will the 'span' tags be
replaced? i
   thing that at least the 'message' span will not, since it
uses Label,
   which replaces the body, not the tag.
  
   how can i do this?
  
   --
   ===
   Ittay Dror
   Chief architect, openQRM TL,
   RD, Qlusters Inc.
   [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
   +972-3-6081994 Fax: +972-3-6081841
  
   http://www.openQRM.org
   - Keeps your Data-Center Up and Running
  
  
   ---
   Using Tomcat but need to do more? Need to support web services,
  security?
   Get stuff done quickly with pre-integrated technology to make
your job
   easier
   Download IBM WebSphere Application Server v.1.0.1 based on
Apache
   Geronimo
  
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
   ---
   Using Tomcat but need to do more? Need to support web services,
  security?
   Get stuff done quickly with pre-integrated technology to make
your job
   easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
  
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
   

Re: [Wicket-user] using feedback not based on labels

2006-05-09 Thread Igor Vaynberg
give us an html snippet of what you want as the end result and tell us where the components are. it is very difficult to talk on such a huge abstraction level.-IgorOn 5/9/06, 
Ittay Dror [EMAIL PROTECTED] wrote:
Igor Vaynberg wrote: but what is really a problem then i dont understand? all you want to do is write out some _javascript_ based on feedback messages? instead of using a feedbackpanel add a label that writes out the _javascript_ you
 want. you can get the messages using Page.getFeedbackMessages() so something like this: add(new Label(js, new AbstractReadOnlyModel() { Object getObject(Component c) {
 FeedbackMessages msgs=c.getPage().getFeedbackMessages(); AppendingStringBuffer js=new AppendingStringBuffer();  fill in _javascript_ into js return 
js.toString();}).setEscapeModelStrings(false)); and you should be good to go right?the _javascript_ has a lot of GUI code in it, so it looks to me like something from the early days of servlets. i'm not looking for something that works, but, for something that works the wicket way



  1   2   >