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

2006-05-10 Thread Ittay Dror



Igor Vaynberg wrote:

so you want to use it outside the model?


outside of an IModel context, yes. 



but then feedbackpanel.anyMessage(int level) is just

Page.getFeedbackMessages().hasAnyMessage(new 
ErrorLevelFeedbackMessage(level)) no?


no, because the model joins the page messages and session messages



-Igor


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


it will be too much of a pain, since most issues are because i'm
using wicket in an existing application, built on struts.

however, i would appriciate it if you could answer some specific
questions.

i'm trying to create my own feedback panel. an issue i encountered
is that FeedbackPanel has the anyMessages() method, which i also
need, i can copy the code, but isn't it better to move it to
FeedbackMessage, as static utility methods? or, better yet, create a
FeedbackMessages class which has the logic found in
FeedbackMessagesModel, so it can be reused outside of the context of
a model?

ittay

Igor Vaynberg wrote:
  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.
 
  -Igor
 
 
  On 5/9/06, *Ittay Dror* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[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
 
 


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





--
===
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-10 Thread Igor Vaynberg
maybe you can submit a patchhere is what i would suggestextract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection.
how does that sound?-IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
Igor Vaynberg wrote: so you want to use it outside the model?outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages
().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no?no, because the model joins the page messages and session messages -Igor On 5/9/06, *Ittay Dror* 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts.
 however, i would appriciate it if you could answer some specific questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also
 need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in
 FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote: 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. -Igor
 On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[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 -- ===
 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
--===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] using feedback not based on labels

2006-05-10 Thread Ittay Dror

yep

although i think an abstract base class suffices

will try to do it shortly.

Igor Vaynberg wrote:

maybe you can submit a patch

here is what i would suggest

extract IFeedbackMessages interface from FeedbackMessages and create a 
CompoundFeedbackMessages impl, that way you can join the session and 
page messages yourself and still use the same utility methods in 
FeedbackMessages on the joined collection.


how does that sound?

-Igor


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




Igor Vaynberg wrote:
  so you want to use it outside the model?

outside of an IModel context, yes.

 
  but then feedbackpanel.anyMessage(int level) is just
 
  Page.getFeedbackMessages ().hasAnyMessage(new
  ErrorLevelFeedbackMessage(level)) no?

no, because the model joins the page messages and session messages

 
  -Igor
 
 
  On 5/9/06, *Ittay Dror*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  it will be too much of a pain, since most issues are because i'm
  using wicket in an existing application, built on struts.
 
  however, i would appriciate it if you could answer some specific
  questions.
 
  i'm trying to create my own feedback panel. an issue i
encountered
  is that FeedbackPanel has the anyMessages() method, which i also
  need, i can copy the code, but isn't it better to move it to
  FeedbackMessage, as static utility methods? or, better yet,
create a
  FeedbackMessages class which has the logic found in
  FeedbackMessagesModel, so it can be reused outside of the
context of
  a model?
 
  ittay
 
  Igor Vaynberg wrote:
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.
   
-Igor
   
   
On 5/9/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] 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
   
   
 
 
  --
  ===
  Ittay Dror
  Chief architect, openQRM TL,
  RD, Qlusters Inc.
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[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
 
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] using feedback not based on labels

2006-05-10 Thread Ittay Dror

ok, i have it. how do i send it?

i created an AbstractFeedbackMessages, which has 2 abstract methods: 
isReadonly() and getMessages(). the rest use them

i'm thinking of maybe change it to ReadonlyFeedbackMessages and 
FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend 
it also.

what do you think?

Igor Vaynberg wrote:

maybe you can submit a patch

here is what i would suggest

extract IFeedbackMessages interface from FeedbackMessages and create a 
CompoundFeedbackMessages impl, that way you can join the session and 
page messages yourself and still use the same utility methods in 
FeedbackMessages on the joined collection.


how does that sound?

-Igor


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




Igor Vaynberg wrote:
  so you want to use it outside the model?

outside of an IModel context, yes.

 
  but then feedbackpanel.anyMessage(int level) is just
 
  Page.getFeedbackMessages ().hasAnyMessage(new
  ErrorLevelFeedbackMessage(level)) no?

no, because the model joins the page messages and session messages

 
  -Igor
 
 
  On 5/9/06, *Ittay Dror*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  it will be too much of a pain, since most issues are because i'm
  using wicket in an existing application, built on struts.
 
  however, i would appriciate it if you could answer some specific
  questions.
 
  i'm trying to create my own feedback panel. an issue i
encountered
  is that FeedbackPanel has the anyMessages() method, which i also
  need, i can copy the code, but isn't it better to move it to
  FeedbackMessage, as static utility methods? or, better yet,
create a
  FeedbackMessages class which has the logic found in
  FeedbackMessagesModel, so it can be reused outside of the
context of
  a model?
 
  ittay
 
  Igor Vaynberg wrote:
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.
   
-Igor
   
   
On 5/9/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] 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
   
   
 
 
  --
  ===
  Ittay Dror
  Chief architect, openQRM TL,
  RD, Qlusters Inc.
  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[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
 

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

2006-05-10 Thread Igor Vaynberg
hrm, so now if you want to join the two what do you do in getMessages() of the compound impl?create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field?
-IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote:
ok, i have it. how do i send it?i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use themi'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also.
what do you think?Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a
 CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound?
 -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then 
feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages
 -Igor On 5/9/06, *Ittay Dror*  [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 it will be too much of a pain, since most issues are because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer some specific
 questions. i'm trying to create my own feedback panel. an issue i encountered is that FeedbackPanel has the anyMessages() method, which i also
 need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better yet, create a FeedbackMessages class which has the logic found in
 FeedbackMessagesModel, so it can be reused outside of the context of a model? ittay Igor Vaynberg wrote:
 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. -Igor On 5/9/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] 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 -- === Ittay Dror
 Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto: [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
 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 mailto: 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] 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 

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

2006-05-10 Thread Ittay Dror



Igor Vaynberg wrote:
hrm, so now if you want to join the two what do you do in getMessages() 
of the compound impl?


create a new arraylist and merge messages from the other two? do you do 
the merged array generation on every call or keep it in a transient field?


i copy the code from FeeedbackMessagesModel ;-) (it keeps the array in a 
transient field)



-Igor


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


ok, i have it. how do i send it?

i created an AbstractFeedbackMessages, which has 2 abstract methods:
isReadonly() and getMessages(). the rest use them

i'm thinking of maybe change it to ReadonlyFeedbackMessages and
FeedbackMessages which will extend it, and CompoundFeedbackMessages
will extend it also.

what do you think?

Igor Vaynberg wrote:
  maybe you can submit a patch
 
  here is what i would suggest
 
  extract IFeedbackMessages interface from FeedbackMessages and
create a
  CompoundFeedbackMessages impl, that way you can join the session and
  page messages yourself and still use the same utility methods in
  FeedbackMessages on the joined collection.
 
  how does that sound?
 
  -Igor
 
 
  On 5/9/06, *Ittay Dror* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
 
 
  Igor Vaynberg wrote:
so you want to use it outside the model?
 
  outside of an IModel context, yes.
 
   
but then feedbackpanel.anyMessage(int level) is just
   
Page.getFeedbackMessages ().hasAnyMessage(new
ErrorLevelFeedbackMessage(level)) no?
 
  no, because the model joins the page messages and session
messages
 
   
-Igor
   
   
On 5/9/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] wrote:
   
it will be too much of a pain, since most issues are
because i'm
using wicket in an existing application, built on struts.
   
however, i would appriciate it if you could answer
some specific
questions.
   
i'm trying to create my own feedback panel. an issue i
  encountered
is that FeedbackPanel has the anyMessages() method,
which i also
need, i can copy the code, but isn't it better to move
it to
FeedbackMessage, as static utility methods? or, better
yet,
  create a
FeedbackMessages class which has the logic found in
FeedbackMessagesModel, so it can be reused outside of the
  context of
a model?
   
ittay
   
Igor Vaynberg wrote:
  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.
 
  -Igor
 
 
  On 5/9/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]
  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:
 
 
 
  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

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

2006-05-10 Thread Igor Vaynberg
nice thing about having an interface is that you dont have to do that, you can aggregate on demand and for things like Iterator simply return a compound iterator. but this is more work.i guess your way works too. create a patch and attach it to our 
sf.net tracker and one of the core devels will merge it in.-IgorOn 5/9/06, Ittay Dror 
[EMAIL PROTECTED] wrote:Igor Vaynberg wrote: hrm, so now if you want to join the two what do you do in getMessages()
 of the compound impl? create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field?i copy the code from FeeedbackMessagesModel ;-) (it keeps the array in a transient field)
 -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and
 FeedbackMessages which will extend it, and CompoundFeedbackMessages will extend it also. what do you think? Igor Vaynberg wrote: maybe you can submit a patch
 here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and
 page messages yourself and still use the same utility methods in FeedbackMessages on the joined collection. how does that sound?
 -Igor On 5/9/06, *Ittay Dror* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes.
 but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages ().hasAnyMessage(new
 ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and session messages
 -Igor On 5/9/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] wrote: it will be too much of a pain, since most issues are
 because i'm using wicket in an existing application, built on struts. however, i would appriciate it if you could answer
 some specific questions. i'm trying to create my own feedback panel. an issue i encountered
 is that FeedbackPanel has the anyMessages() method, which i also need, i can copy the code, but isn't it better to move it to FeedbackMessage, as static utility methods? or, better
 yet, create a FeedbackMessages class which has the logic found in FeedbackMessagesModel, so it can be reused outside of the
 context of a model? ittay Igor Vaynberg wrote:
 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. -Igor
 On 5/9/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] 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:
 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
 -- === Ittay Dror
 Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:
[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
 

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

2006-05-10 Thread Nino Wael








Hi Johan



Yeah it must be something
like that. But there are multiple rows for this case. I do also have a
properties files where the default text are in, im not sure if that has any
impact.



Somehow it must have
slipped my mind that there where the dropdownchoice I guess Ill just use
that instead since its the correct one to use.



-regards Nino









From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: 9. maj 2006 12:50
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
ListChoice changes appearance from dropdown to listbox





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?

johan





On 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
















[Wicket-user] (conceptual) bug in getModelObject()?

2006-05-10 Thread Ittay Dror

public final Object getModelObject()
{
final IModel model = getModel();
if (model != null)
{
// If this component has the root model for a compound 
model
if (getFlag(FLAG_HAS_ROOT_MODEL))
{
// we need to return the root model and not a 
property of the
// model
return getRootModel(model).getObject(null);
}

// Get model value for this component
return model.getObject(this);
}
else
{
return null;
}
}



note the statement: getRootModel(model).getObject(null);

why use null? 


--
===
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] (conceptual) bug in getModelObject()?

2006-05-10 Thread Matej Knopp

Ittay Dror wrote:

public final Object getModelObject()
{
final IModel model = getModel();
if (model != null)
{
// If this component has the root model for a compound model
if (getFlag(FLAG_HAS_ROOT_MODEL))
{
// we need to return the root model and not a property 
of the

// model
return getRootModel(model).getObject(null);
}

// Get model value for this component
return model.getObject(this);
}
else
{
return null;
}
}



note the statement: getRootModel(model).getObject(null);

why use null?


I believe it's because of compound models. e.g. when you have compound 
property model, getObject(Component) returns you the property of the 
model object which name is sme as component id.

getObject(null) returns you the whole model object.

If you have a form for instance and set it a compoundpropertymodel, the 
modelObject of the form is the object you put to the model.


but the model objects of components placed into the form are actually 
properties of the object you set to the model. (as the components will 
inherit the model from the form)


-Matej


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


[Wicket-user] Component.FLAG_XXX are private

2006-05-10 Thread Ittay Dror

i want to overcome the issue which i've just posted about, and to set the 
FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be made 
protected?

thanx,
ittay

--
===
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] (conceptual) bug in getModelObject()?

2006-05-10 Thread Ittay Dror

same in setModelObject

Ittay Dror wrote:

public final Object getModelObject()
{
final IModel model = getModel();
if (model != null)
{
// If this component has the root model for a compound model
if (getFlag(FLAG_HAS_ROOT_MODEL))
{
// we need to return the root model and not a property 
of the

// model
return getRootModel(model).getObject(null);
}

// Get model value for this component
return model.getObject(this);
}
else
{
return null;
}
}



note the statement: getRootModel(model).getObject(null);

why use null?



--
===
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.FLAG_XXX are private

2006-05-10 Thread Matej Knopp
But why would you do that? this flag is set automatically when you set a 
compound model to a component.


-Matej

Ittay Dror wrote:
i want to overcome the issue which i've just posted about, and to set 
the FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be 
made protected?


thanx,
ittay





---
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] (conceptual) bug in getModelObject()?

2006-05-10 Thread Ittay Dror

then i think this should be more explicit. e.g., add to ICompoundModel a 
getRootObject(), and i think that if that returns null, then return 
getObject(this)

Matej Knopp wrote:

Ittay Dror wrote:

public final Object getModelObject()
{
final IModel model = getModel();
if (model != null)
{
// If this component has the root model for a compound model
if (getFlag(FLAG_HAS_ROOT_MODEL))
{
// we need to return the root model and not a property 
of the

// model
return getRootModel(model).getObject(null);
}

// Get model value for this component
return model.getObject(this);
}
else
{
return null;
}
}



note the statement: getRootModel(model).getObject(null);

why use null?


I believe it's because of compound models. e.g. when you have compound 
property model, getObject(Component) returns you the property of the 
model object which name is sme as component id.

getObject(null) returns you the whole model object.

If you have a form for instance and set it a compoundpropertymodel, the 
modelObject of the form is the object you put to the model.


but the model objects of components placed into the form are actually 
properties of the object you set to the model. (as the components will 
inherit the model from the form)


-Matej


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




--
===
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] (conceptual) bug in getModelObject()?

2006-05-10 Thread Johan Compagner
It is not simulation holding outer models.It is the model for every child that doesn't have a model so yes it inherits its.But that is just the name. And i can't really discuss that what the real meaning is of comound and if it is the 'good' word for that or not.
So i don't know what you mean with generalized because you just say it should be renamed? But from the perspective of the componentyou set it the model on i find a IAutomaticallyInheritedModel very strange. If it is inherited why do i need to set a inherited model on something?
ICompoundModel could have a getRootObject() that would be the samething as getObject(null)But remember that getObject(null) is not really only for Compounds it is also for the normal PropertyModels.They also should just return the complete object.
A normal none property model also just returns the complete object on null (the difference that it just completely don't look what the component is)It is just a contract..johan
On 5/10/06, Ittay Dror [EMAIL PROTECTED] wrote:
i think the compound concept needs to be generalized.the ICompoundModel is really IAutomaticallyInheritedModel. whether it is compound (a model simulating holding other models) is not important i think.
Matej Knopp wrote: On the other side, you still have component parameter in IModel#getModelObject, which makes only sense when the model is compound, so maybe getRootObject() in ICompoundModel wouldn't improve
 things anyway. -Matej Matej Knopp wrote: Hmm. maybe having getRootObjecT() in ICompoundModel would make things little easier to understand, wonder what core developers would think.
 anyway, the model can't decide, whether to return null or not. it depends on the component. but the component would know whether to call getObject(this) or getRootObject(), according to FLAG_HAS_ROOT_MODEL.
 -Matej Ittay Dror wrote: then i think this should be more explicit. e.g., add to ICompoundModel a getRootObject(), and i think that if that returns
 null, then return getObject(this) Matej Knopp wrote: Ittay Dror wrote: public final Object getModelObject() {
 final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound
 model if (getFlag(FLAG_HAS_ROOT_MODEL)) { // we need to return the root model and not a
 property of the // model return getRootModel(model).getObject(null); }
 // Get model value for this component return model.getObject(this); } else {
 return null; } } note the statement: getRootModel(model).getObject(null);
 why use null? I believe it's because of compound models. e.g. when you have compound property model, getObject(Component) returns you the
 property of the model object which name is sme as component id. getObject(null) returns you the whole model object. If you have a form for instance and set it a compoundpropertymodel,
 the modelObject of the form is the object you put to the model. but the model objects of components placed into the form are actually properties of the object you set to the model. (as the
 components will inherit the model from the form) -Matej ---
 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--===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 

Re: [Wicket-user] Component.FLAG_XXX are private

2006-05-10 Thread Johan Compagner
it is an internal thing of component.Why are you wanting to change/override that?johanOn 5/10/06, Ittay Dror 
[EMAIL PROTECTED] wrote:i want to overcome the issue which i've just posted about, and to set the FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be made protected?
thanx,ittay--===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] can feedback panel be generalized?

2006-05-10 Thread Bruno Borges
I've just coded my custom version of FeedbackPanel and it works fine. I have a subclass of FeedbackPanel and a HTML file that is kind of copy of the FeedbackPanel.html from Wicket's Core.Then I added new labels and CSS and done. Now I have a feedbackPanel that shows over on top of all the webpage with a Close button that actually hiddes the div. 
Maybe is something like this you are looking for?On 5/10/06, Ittay Dror [EMAIL PROTECTED] wrote:
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 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 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-- Bruno Borges[EMAIL PROTECTED]Sun Certified Java Programmer for 
1.4Sun Certified Web Component Developer for 1.4


[Wicket-user] composite component

2006-05-10 Thread Ittay Dror

after troubling many people here, and thankful for their help, here is the 
CompositeComponent component.

you just overwrite two methods, and voila!

hope it is useful for someone else.

it is part of the product i'm working on, so it's MPL licensed. 


public abstract class CompositeComponent extends FormComponent{


public CompositeComponent(String id) {
this(id, null);
}

public CompositeComponent(String id, IModel model) {
// XXX: can make it in omModelChanged, but then i have to do 
some ugly checks
super(id);
setModel(new PartialModel(model));
}

abstract protected String[] getCompositeInput(ListString[] list);

abstract protected Object getPartialObject(Component component, Object 
modelObject);

/* (non-Javadoc)
 * @see wicket.markup.html.form.FormComponent#getInput()
 */
@Override
public String[] getInputAsArray() {
// go over all children, and create a list.
		final ListString[] list = null; 
		visitChildren(FormComponent.class, new Component.IVisitor(){


public Object component(Component component) {

list.add(((FormComponent)component).getInputAsArray());
return Component.IVisitor.CONTINUE_TRAVERSAL;
}

});
		return getCompositeInput(list); 
	}



private CompositeComponent getThis() {
return this;
}

private class PartialModel implements ICompoundModel {

private IModel selfModel;

public PartialModel(IModel model) {
selfModel = model;
}

public IModel getNestedModel() {
return null;
}

public Object getObject(Component component) {
resolveSelfModel();
return getPartialObject(component, 
selfModel.getObject(getThis()));
}

public void setObject(Component component, Object object) {
if (component == null) {
resolveSelfModel();
selfModel.setObject(getThis(), object);
}
}

private void resolveSelfModel() {
if (selfModel == null) {
selfModel = getParent().getModel();
}
}

public void detach() {
// TODO Auto-generated method stub

}

}


}


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


[Wicket-user] getting id attribute from preview

2006-05-10 Thread Ittay Dror

hi,

i am trying to write something similar to the date picker - i have an input 
field and a javascript needs to write to it. therefore, when generating the 
javascript, i want to give it the field's id.

so, creating this MyDatePicker component, i pass to it the other component in 
the ctor. then, it uses otherComponent.getPath() to get the id the component 
will be rendered with.

my problem is that i saw that if in the html i give an id to the input field, 
then that id is retained, and then using getPath() doesn't work.

so, in one component, how can i reliably get the html id of another, and where 
in the code?

thanx,
ittay

--
===
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 Link on an internal anchor

2006-05-10 Thread Juergen Donnerstag

I think getUrl() is not final and can be overwriten. I've done
something similar recently for autolinks.

regards
Juergen

On 5/10/06, Jerry Smith [EMAIL PROTECTED] wrote:




Hi all!  How would I go about making a Link that in addition goes to
whatever page, but then scrolls to some named anchor?  It looks like for
some other situations overriding onComponentTag() seems to be the answer,
however in Link that method is final.  Thanks for any input!



-Jerry



---
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] composite component

2006-05-10 Thread Johan Compagner
Yes and that is essentially only one formcomponent (youre composite) that has intenally its own markup/componentsAnd it gets the input directly from themFor example see the CheckGroup and the Check classes. Check classes aren't also FormComponents.
johan And are the children you put in that composite also again formcomponents?
 Why why aren't that just Check or Radio classes normal webcontainers Because you are now creating a hierchy in FormComponents?i didn't understand you. i use getInputAsArray(), which is defined in FormComponent. I'm trying to acheive an effect of several form components acting, for the model (set/get) as one.



Re: [Wicket-user] conversion

2006-05-10 Thread Johan Compagner
we try to do it:if (object instanceof String)   {// and that String is not emptyfinal String string = (String)object;if (!Strings.isEmpty(string))
{ // and there is a non-null property type for the component final Class propertyType = propertyType(component); if (propertyType != null)
 {  // convert the String to the right type  object = component.getConverter().convert(string, propertyType); }}
   }   PropertyResolver.setValue(_expression_, modelObject, object, component==null ? null:component.getConverter());But if you use a compound/propertymodel as the texfields own root model then the component isn't there
so the Session will be used.Why don't you se the right type on the textfields? That is the prefered way because the error is catched much earlierand validators can work on the right object.
On 5/10/06, Ittay Dror [EMAIL PROTECTED] wrote:
i created a TextField, without setting its type, but with overriding of getConverter(), i also used a CompoundPropertyModelwhat happened is that this converter was not used in convert(), but was used by the property resolver. inside the PropertyResolver code, it threw an exception, which, was rethrown as InvocationException, which was considered unexpected, and so the page was redirected to the error page (rather than showing a conversion error)
ittay--===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


[Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread smallufo
HiCan somebody explain the purpose of PackageResource.bind() in IInitializer ?I tried to remove PackageResource.bind(application , Foo.class , bar.gif) in IInitializerand ... keeps the following code intact in Page/Panel 
add(new Image(myImage , new PackageResourceReference(Foo.class, bar.gif)));and the whole application works fine , images correctly shown. (I am sure the IInitializer.init() is executed)
I just get confused. What is the purpose of PackageResource.bind in IInitializer ?In the JavaDoc , it says for some reason about sticky session or cluster ... But I am still not clear...If it is for the purpose of sticky session or cluster ... why do we need to duplicate some very similar code ?
I think PackageResource.bind(application , Foo.class , bar.gif) and ...new PackageResourceReference(Foo.class, bar.gif)));seems violate the DRY rule...


Re: [Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread Igor Vaynberg
imagine this situation w/out the use of initializeryou have a cluster where you do not use sticky sessionsuser comes to node A and requests a page. this page binds a bunch of resources that image components on this page need. browser starts to render one of these image components and makes a resource to the resource url it needs. this request now comes to node B of the cluster. on node B no one has ever accessed this page before so none of its resources have been bound yet, so now one of the images will get a 404.
the initializer makes sure that all resources are bound on all nodes at startup time not at first-access time so the situation above does not occur.hope this is clear enough-Igor
On 5/10/06, smallufo [EMAIL PROTECTED] wrote:
HiCan somebody explain the purpose of PackageResource.bind() in IInitializer ?I tried to remove PackageResource.bind(application , Foo.class , bar.gif) in IInitializer
and ... keeps the following code intact in Page/Panel 
add(new Image(myImage , new PackageResourceReference(Foo.class, bar.gif)));and the whole application works fine , images correctly shown. (I am sure the IInitializer.init() is executed)
I just get confused. What is the purpose of PackageResource.bind in IInitializer ?In the JavaDoc , it says for some reason about sticky session or cluster ... But I am still not clear...If it is for the purpose of sticky session or cluster ... why do we need to duplicate some very similar code ?
I think PackageResource.bind(application , Foo.class , bar.gif) and ...new PackageResourceReference(Foo.class, bar.gif)));seems violate the DRY rule...




Re: [Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread Johan Compagner
also no cluster or what ever. Simple one tomcat installationThe only thing is you need to do some maintenance. So you shutdown tomcat or the webapp contextupdate it and restart it again. The shutdown did save the session to disk..
Then after restart all sessions comes in memory again. And the request comes in.But now pages are not made because the come from the session. So resources are not bound anymore.. (or yet)With an initializer that is taken care of. 
johanOn 5/10/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
imagine this situation w/out the use of initializeryou have a cluster where you do not use sticky sessionsuser comes to node A and requests a page. this page binds a bunch of resources that image components on this page need. browser starts to render one of these image components and makes a resource to the resource url it needs. this request now comes to node B of the cluster. on node B no one has ever accessed this page before so none of its resources have been bound yet, so now one of the images will get a 404.
the initializer makes sure that all resources are bound on all nodes at startup time not at first-access time so the situation above does not occur.hope this is clear enough
-Igor
On 5/10/06, smallufo [EMAIL PROTECTED] wrote:

HiCan somebody explain the purpose of PackageResource.bind() in IInitializer ?I tried to remove PackageResource.bind(application , Foo.class , bar.gif) in IInitializer
and ... keeps the following code intact in Page/Panel 
add(new Image(myImage , new PackageResourceReference(Foo.class, bar.gif)));and the whole application works fine , images correctly shown. (I am sure the IInitializer.init() is executed)
I just get confused. What is the purpose of PackageResource.bind in IInitializer ?In the JavaDoc , it says for some reason about sticky session or cluster ... But I am still not clear...If it is for the purpose of sticky session or cluster ... why do we need to duplicate some very similar code ?
I think PackageResource.bind(application , Foo.class , bar.gif) and ...new PackageResourceReference(Foo.class, bar.gif)));seems violate the DRY rule...






Re: [Wicket-user] Visibility of clearInput method

2006-05-10 Thread Johan Compagner
you just want only to clear the input on that specific FormComponent?So you don't want to call Form.clearInput() ?Calling FormComponent.valid() does the same thing by the way. It clears the rawInput(and calls onValid())
But i guess this is not that logical to do (know)clearInput can be public final in my eyes.johanOn 5/9/06, Roan O'Sullivan 
[EMAIL PROTECTED] wrote:




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] Using Link on an internal anchor

2006-05-10 Thread Johan Compagner
you could make a nice component for that?AnchorLink?it is requested before so maybe it is a simple class for the core.johanOn 5/10/06, 
Jerry Smith [EMAIL PROTECTED] wrote:













Hi all! How would I go about making a Link that in addition
goes to whatever page, but then scrolls to some named anchor? It looks like
for some other situations overriding onComponentTag() seems to be the answer,
however in Link that method is final. Thanks for any input!



-Jerry










Re: [Wicket-user] conversion

2006-05-10 Thread Eelco Hillenius

Yeah, I'm not totally crazy about that either. But the fact that we
only try to convert when there is a converter set comes from:
* some components, like CheckBox use their own kind of conversion, and
thus override the convertValue method
* some users strongly objected against Wicket always trying to use
converters. In older Wicket versions, it was integrated in it's
adoption of OGNL. But users wanted less magic.

Eelco


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

i created a TextField, without setting its type, but with overriding of 
getConverter(), i also used a CompoundPropertyModel

what happened is that this converter was not used in convert(), but was used by 
the property resolver. inside the PropertyResolver code, it threw an exception, 
which, was rethrown as InvocationException, which was considered unexpected, 
and so the page was redirected to the error page (rather than showing a 
conversion error)

ittay

--
===
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] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread Eelco Hillenius

It's something we probably will try to get rid of for Wicket 2.0;
instead of the pessimistic, register first approach we have now, we
can choose an optimistic approach which will allow disallow in a
similar fashion as file filters work.

Eelco


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

imagine this situation w/out the use of initializer

you have a cluster where you do not use sticky sessions

user comes to node A and requests a page. this page binds a bunch of
resources that image components on this page need. browser starts to render
one of these image components and makes a resource to the resource url it
needs. this request now comes to node B of the cluster. on node B no one has
ever accessed this page before so none of its resources have been bound yet,
so now one of the images will get a 404.

the initializer makes sure that all resources are bound on all nodes at
startup time not at first-access time so the situation above does not occur.

hope this is clear enough

-Igor



 On 5/10/06, smallufo [EMAIL PROTECTED] wrote:

 Hi

 Can somebody explain the purpose of PackageResource.bind() in IInitializer
?

 I tried to remove PackageResource.bind(application , Foo.class ,
bar.gif) in IInitializer
 and ... keeps the following code intact in Page/Panel
 add(new Image(myImage , new PackageResourceReference(Foo.class,
bar.gif)));

 and the whole application works fine , images correctly shown. (I am sure
the IInitializer.init() is executed)

 I just get confused. What is the purpose of PackageResource.bind in
IInitializer ?
 In the JavaDoc , it says for some reason about sticky session or cluster
... But I am still not clear...

 If it is for the purpose of sticky session or cluster ... why do we need
to duplicate some very similar code ?

 I think
 PackageResource.bind(application , Foo.class , bar.gif)
 and
 ...new PackageResourceReference(Foo.class, bar.gif)));
 seems violate the DRY rule...








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

2006-05-10 Thread Johan Compagner
I guess you mean only try to convert when there is a type set ?Checkbox is abit of a bad example, A DropDown or anohter Choice is a better oneConverter is Type conversion String to Date or Integer or what ever.
But convertValue (used in the Choice classes) is not type conversionBut it is more a Lookup conversion (or how do i say this better)The input/request value is an id and for that id a object is lookupped..
The normal converter can never do that. Because it doesn't have any context (The Choices List and the IChoiceRenderer in this case)But as i said we always try to use the converter of the component.But for this particulair case we don't have the component.
Maybe we should have a getRootObject(Component) and setRootObject(Component) methodsin the ICompoundModel interface, So that we can give the component to the model.johan
On 5/10/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
Yeah, I'm not totally crazy about that either. But the fact that weonly try to convert when there is a converter set comes from:* some components, like CheckBox use their own kind of conversion, andthus override the convertValue method
* some users strongly objected against Wicket always trying to useconverters. In older Wicket versions, it was integrated in it'sadoption of OGNL. But users wanted less magic.EelcoOn 5/10/06, Ittay Dror 
[EMAIL PROTECTED] wrote: i created a TextField, without setting its type, but with overriding of getConverter(), i also used a CompoundPropertyModel what happened is that this converter was not used in convert(), but was used by the property resolver. inside the PropertyResolver code, it threw an exception, which, was rethrown as InvocationException, which was considered unexpected, and so the page was redirected to the error page (rather than showing a conversion error)
 ittay -- === 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 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] conversion

2006-05-10 Thread Ittay Dror

yes, after i saw the exception, and looked at the code to find the exact 
reason, i added the type

Johan Compagner wrote:

we try to do it:

if (object instanceof String)
{
// and that String is not empty
final String string = (String)object;
if (!Strings.isEmpty(string))
{
// and there is a non-null property type for the 
component

final Class propertyType = propertyType(component);
if (propertyType != null)
{
// convert the String to the right type
object = 
component.getConverter().convert(string, propertyType);

}
}
}

PropertyResolver.setValue(expression, modelObject, object, 
component==null ? null:component.getConverter());


But if you use a compound/propertymodel as the texfields own root model 
then the component isn't there

so the Session will be used.

Why don't you se the right type on the textfields? That is the prefered 
way because the error is catched much earlier

and validators can work on the right object.



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


i created a TextField, without setting its type, but with overriding
of getConverter(), i also used a CompoundPropertyModel

what happened is that this converter was not used in convert(), but
was used by the property resolver. inside the PropertyResolver code,
it threw an exception, which, was rethrown as InvocationException,
which was considered unexpected, and so the page was redirected to
the error page (rather than showing a conversion error)

ittay

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





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


[Wicket-user] wicket legacy integration (high level suggestion)

2006-05-10 Thread Ittay Dror

i think it will help wicket's cause if it has some way of integrating into 
existing applications, especially existing pages.

what can be done is to have a way for the page's markup (the html), to be a url 
which is then retrieved to get the html page. if this url points to 
struts/jsp/servlet, then those technologies will render it with what they have, 
and if there are wicket:id attributes, they will appear in the resulting html, 
which wicket can now process

or, support embedding wicket generated html snippet in another page (by 
jsp:include). i've done some work here (and posted most of it), but there is 
still a strong tie with Page classes (that is, the embedded snippet needs to be 
a Page implementation).

ittay

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