Re: [Wicket-user] Creating Entire Forms in Java Code Only?

2007-04-09 Thread Nart Seine

Hello, I've been following the discussions here, and this one caught my eye.
Does this mean that Wicket is ill suited for example for creating dynamic
forms that are built dynamically at runtime after reading some page
definition file from xml or some other data store. I havent looked into
Wicket deeply, I just skimmed the surface, but I'm currently thinking about
converting a Struts solution that builds forms based on form metadata stored
in xml files. In my case, almost all jsp's have the same layout, and only
differ in the form fields shown.

On 4/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 I am interested in creating a complex form in Java code without needing
to
 manually configure any html for that form. In Swing for example, when
you
 create a text field, it automatically has a default representation/view.

Not a good comparison though, as Swing doesn't generate markup. Like
with Swing you have to know where/ how your components need to be
positioned using layout managers, with Wicket you need to tell where
in the markup the components are located.

It doesn't have to be a big problem though. As you start out, just
keep your markup super simple, and later revisit to do more advanced
layout etc. If you think a little bit ahead, and use CSS extensively,
you typically don't very often have to change the hierarchy and you
should get by just tweaking the templates and CSS. If you want a
default look/ layout, you can use panels. You can provide custom
markup for overriding classes later if you wish.

 It basically would be really sweet to be able to create forms, form
 elements, form layouts directly in Java code - and then later be able to
 tweak or tailor layout, css, etc. (perhaps via fragments?) As a Swing
 developer, I tend to develop every aspect of UIs in code.

 I've been using Wicket for just a couple of days. Where should I be
looking?
 How do I approach this? strategies, Fragments, WebComponents? markup
 inheritance? ...

It sounds like Echo is more your style of coding. See
http://www.nextapp.com/

Eelco

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

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


Re: [Wicket-user] Creating Entire Forms in Java Code Only?

2007-04-09 Thread Eelco Hillenius
 Hello, I've been following the discussions here, and this one caught my eye.
 Does this mean that Wicket is ill suited for example for creating dynamic
 forms that are built dynamically at runtime after reading some page
 definition file from xml or some other data store. I havent looked into
 Wicket deeply, I just skimmed the surface, but I'm currently thinking about
 converting a Struts solution that builds forms based on form metadata stored
 in xml files. In my case, almost all jsp's have the same layout, and only
 differ in the form fields shown.

On the contrairy, Wicket is very well suited for that. Panels is the magic word.

Eelco

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


Re: [Wicket-user] Fragment: optionally replace the tag

2007-04-09 Thread Thomas Singer
I meant, when I don't use the wicket:fragment-tags (like in the example at 
http://cwiki.apache.org/confluence/display/WICKET/Fragment#Fragment-Fragmentsfromotherpages
 
).

Tom

Igor Vaynberg schrieb:
 fragment doesnt own wicket:fragment, only whatever is inside the 
 wicket:fragment tags
 
 -igor
 
 
 On 4/8/07, *Thomas Singer*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 wrote:
 
 Currently, when using the Fragment component, only the content
 between the
 opening and closing tag seems to be replaced. What about optionally
 replacing the tag, too?
 
 Tom


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


Re: [Wicket-user] Fragment: optionally replace the tag

2007-04-09 Thread Martijn Dashorst
Why not just use a panel instead?

Martijn

On 4/9/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I meant, when I don't use the wicket:fragment-tags (like in the example at
 http://cwiki.apache.org/confluence/display/WICKET/Fragment#Fragment-Fragmentsfromotherpages
 ).

 Tom

 Igor Vaynberg schrieb:
  fragment doesnt own wicket:fragment, only whatever is inside the
  wicket:fragment tags
 
  -igor
 
 
  On 4/8/07, *Thomas Singer*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  wrote:
 
  Currently, when using the Fragment component, only the content
  between the
  opening and closing tag seems to be replaced. What about optionally
  replacing the tag, too?
 
  Tom


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



-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

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


Re: [Wicket-user] localized resource property file - fallback to default?

2007-04-09 Thread Wilko Hische

Thanks Jurgen  Eelco,

I understand you would not want this as default behaviour  I suppose I can
figure it out.

Cheers,

Wilko


Eelco Hillenius wrote:
 
 I see what you mean, and understand this use case may be good for some
 occasions. There is a big danger however, of Wicket 'silently' failing
 (depending on your settings not throwing an exception or displaying a
 place holder with a warning) when it cannot locate messages. It would
 be too easy to overlook messages that aren't localized.
 
 I think Wicket's defaults are good. And like Juergen said, if you feel
 you need another algorithm, you can implement this yourself by doing
 an extra bit of work. Shouldn't be too difficult.
 
 Eelco
 
 
 On 4/8/07, Wilko Hische [EMAIL PROTECTED] wrote:


 I do understand this, but that is not really my question. Let's assume
 all
 my keys are in an application scoped property file
 MyApplication.properties,
 where MyApplication.java extends the WebApplication. Let this file
 contain a
 large amount of keys. Now some customer of ours comes along and insists
 on
 the use of specific terminology for a few of the keys. I think the Wicket
 approach would be to create a variant of MyApplication.properties,
 MyApplication_customer.properties? But then I have to copy *all* keys,
 not
 only the few that will have another translation. Because if I don't
 provide
 the other keys as well Wicket will follow the tree upwards to
 WebApplication.properties, and of course will not find them. In other
 words,
 defaults are looked for on a higher level, not sideways as well. But
 maybe
 there is another way to tackle this case? Because now I would be stuck
 with
 maintaining files that are almost identical.

 Wilko


 Juergen Donnerstag wrote:
 
  Wicket does not only fall back to the default. It iterates over a long
  list of property filenames which are created from the component tree,
  locale, style and variation.
 
  Juergen
 
  On 4/8/07, Wilko Hische [EMAIL PROTECTED] wrote:
 
  Hi Erik,
 
  Wicket does fall back to the default *file* but what about the case
 where
  you have one (or more) large properties file(s) for your default
 language
  and you want to create a variation in which you want to change just a
 few
  words for instance to make them more domain specific?
  In that case I would like a way to override just those few domain
  specific
  terms, ie an additional .properties file for that variation containing
  only
  the deviating terms instead of a copy of the original with just a few
  changes. Is there a wicket way to implement that?
 
  Regards,
 
  Wilko
 
 
 
  Erik van Oosten wrote:
  
   It already does work like that.
   http://cwiki.apache.org/WICKET/i18n-and-resource-bundles.html
  
   Regards,
Erik.
  
  
   dukejansen wrote:
   Right now, if I have a localized property file (e.g.
   Welcome_de.properties),
   it seems I must have all resource keys defined in it.
  
   I would prefer to have the localizer be smart enough to fallback to
  the
   default properties file (e.g. Welcome.properties) if a property is
 not
   present in the localized property file.
  
   This would make it possible to add properties to the system and not
  have
   to
   translate them all immediately - let it fall back to the default
  language
   until someone gets around to translating it.
  
   Does Wicket have this easily configurable, or do I need to roll my
 own
   resource resolvers or other classes for this purpose?
  
  
   --
   Erik van Oosten
   http://day-to-day-stuff.blogspot.com/
  
  
  
 
 -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
 share
   your
   opinions on IT  business topics through brief surveys-and earn cash
  
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/localized-resource-property-file---fallback-to-default--tf3493032.html#a9891947
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
 share
  your
  opinions on IT  business topics through brief surveys-and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join 

Re: [Wicket-user] having a (newbie) Ajax problem

2007-04-09 Thread Robbert Vergeten

Thanks for the quick response i'll try that. I can't seem to find it in the
FAQ though.

On 4/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


you cannot update a listview with ajax, i think its in the faq. wrap it in
a webmarkupcontainer and update that instead.

-igor


 On 4/8/07, Robbert Vergeten [EMAIL PROTECTED] wrote:

  Hi, i'm new to wicket and currently trying out some things to learn
 wicket and to do proof-of-concepts with ajax functionality.
 Because for what I want for my actual application i'm going to need a
 lot of Ajax.

 I'm having a problem with an ajax update of a list through ajax. The
 concept is a simple variation of the databinder.net example.
 Its like a guestbook/chat example with a form for input and a list for
 the output. With both the ajax and the normal submit
 the server sends and receives the proper data only with the ajax the
 list is not properly updated because it works with id's.
 And all items in my list have the same id and therefore only the first
 gets updated so to speak.
 (IE and FF give quite different (both wrong) results.)

 I'm quite stuck on this so my question is how should i properly pack the
 output list into a single object with custom behavior
 that can handle its own update as a single component. Like a table
 instead of a list of rows.
 Any hints or links on where to start are most welcome.

 my current code:

 list = new PropertyListView(list, new HibernateListModel(
 ChatLine.class, new ICriteriaBuilder(){
  public void build(Criteria criteria){
   criteria.addOrder (Order.desc (id));
   criteria.setMaxResults(10);
  }})){
  @Override
  protected void populateItem(ListItem item) {
   Label textLine = new Label(text);
   Label userName = new Label(username);
   item.add(userName);
   item.add(textLine);
  }};
 list.setOutputMarkupId(true);
 add(list);

 form = new DataForm(chatform, ChatLine.class){
  @Override
  protected void onSubmit() {
   super.onSubmit();
   clearPersistentObject();
  }};
 form.add (new TextField(text));
 form.add(new TextField(username));
 form.add(new AjaxSubmitButton(ajaxsubmit, form){
  @Override
  protected void onSubmit(AjaxRequestTarget target, Form f) {
   target.addComponent(list);
  }});
 add(form);

 wicket:extend
  div style=margin-top:20px; position:absolute;
   table class=chatline
tr wicket:id=list id=list
 td wicket:id=username class=user/td
 td: /td
 td wicket:id=text class=text/td
/tr
   /table
  /div

  div style=margin-top:700px; position:absolute;
   form wicket:id=chatform
table
 tr
  tdUsername:/td
  tdChat Message:/td
 /tr
 tr
  tdinput type=text wicket:id=username //td
  tdinput type=text wicket:id=text/ size=80/td
 /tr
/table
div style=margin-left:100px; position:absolute;
input type=submit wicket:id=ajaxsubmit value=send
input type=submit value=send
/div
   /form
  /div
 /wicket:extend



 Thanks in advance,

 Robbert




 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

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



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


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


Re: [Wicket-user] having a (newbie) Ajax problem

2007-04-09 Thread Martijn Dashorst
http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

And Igor was correct, just not the general faq :-P

http://cwiki.apache.org/WICKET/listview.html#ListView-FAQ

On 4/9/07, Robbert Vergeten [EMAIL PROTECTED] wrote:
 Thanks for the quick response i'll try that. I can't seem to find it in the
 FAQ though.



 On 4/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  you cannot update a listview with ajax, i think its in the faq. wrap it in
 a webmarkupcontainer and update that instead.
 
  -igor
 
 
 
 
  On 4/8/07, Robbert Vergeten  [EMAIL PROTECTED] wrote:
  
  
   Hi, i'm new to wicket and currently trying out some things to learn
 wicket and to do proof-of-concepts with ajax functionality.
   Because for what I want for my actual application i'm going to need a
 lot of Ajax.
  
   I'm having a problem with an ajax update of a list through ajax. The
 concept is a simple variation of the databinder.net example.
   Its like a guestbook/chat example with a form for input and a list for
 the output. With both the ajax and the normal submit
   the server sends and receives the proper data only with the ajax the
 list is not properly updated because it works with id's.
   And all items in my list have the same id and therefore only the first
 gets updated so to speak.
   (IE and FF give quite different (both wrong) results.)
  
   I'm quite stuck on this so my question is how should i properly pack the
 output list into a single object with custom behavior
   that can handle its own update as a single component. Like a table
 instead of a list of rows.
   Any hints or links on where to start are most welcome.
  
   my current code:
  
  
   list = new PropertyListView(list, new
 HibernateListModel(ChatLine.class, new ICriteriaBuilder(){
public void build(Criteria criteria){
 criteria.addOrder (Order.desc (id));
 criteria.setMaxResults(10);
}})){
@Override
protected void populateItem(ListItem item) {
 Label textLine = new Label(text);
 Label userName = new Label(username);
 item.add(userName);
 item.add(textLine);
}};
   list.setOutputMarkupId(true);
   add(list);
  
   form = new DataForm(chatform, ChatLine.class){
@Override
protected void onSubmit() {
 super.onSubmit();
 clearPersistentObject();
}};
   form.add (new TextField(text));
   form.add(new TextField(username));
   form.add(new AjaxSubmitButton(ajaxsubmit, form){
@Override
protected void onSubmit(AjaxRequestTarget target, Form f) {
 target.addComponent(list);
}});
   add(form);
  
   wicket:extend
div style=margin-top:20px; position:absolute;
 table class=chatline
  tr wicket:id=list id=list
   td wicket:id=username class=user/td
   td: /td
   td wicket:id=text class=text/td
  /tr
 /table
/div
  
div style=margin-top:700px; position:absolute;
 form wicket:id=chatform
  table
   tr
tdUsername:/td
tdChat Message:/td
   /tr
   tr
tdinput type=text wicket:id=username //td
tdinput type=text wicket:id=text/ size=80/td
   /tr
  /table
  div style=margin-left:100px; position:absolute;
  input type=submit wicket:id=ajaxsubmit value=send
  input type=submit value=send
  /div
 /form
/div
   /wicket:extend
  
  
  
   Thanks in advance,
  
   Robbert
  
  
  
 -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
   opinions on IT  business topics through brief surveys-and earn cash
  
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
  opinions on IT  business topics through brief surveys-and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


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




-- 
Learn Wicket at 

Re: [Wicket-user] No Page found for component after selecting TreeNode

2007-04-09 Thread Isaac Weng
Thanks for the quick replay. After some digging, I found that I forgot 
to check that TreeItem is also a WebMarkupContainer which is rebuilt. A 
wrong way to re-implement my requirement in the Tree component let me 
think it worked on the Tree component in wicket-extension, which is 
obvious not after some serious thought.

Seems like I asked a dumb question, hah

Isaac

Matej Knopp wrote:
 When tree node is selected the appropriate part of tree is rebuilt,
 which also involves recreating the components. So the component on
 which you're calling getPage() is no longer in hierarchy, thus the
 page returned is null.

 -Matej

 On 4/8/07, Isaac Weng [EMAIL PROTECTED] wrote:
   
 Hi,

 Similar to ILinkCallback of Tree in wicket-extension, I created a
 callback link which allows me to select a tree node in my custom Link
 component. After the link is clicked, the callback is executed and the
 node is selected. However, after selectNode() runs, getPage() in the
 Link component results in No Page found for component. Following is a
 brief sample code:
 

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


Re: [Wicket-user] Creating Entire Forms in Java Code Only?

2007-04-09 Thread Justin Lee
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Actually I just did this at work but I used fragments rather than
panels.  We just need a simpler datatype-html widget look up so I just
went with fragments so that I don't need to build a bunch of java class
and html files.  The fragments are named according to the type they
represent so I can simply say :

Fragment f = new Fragment(item, typeName);
f.add(new TextField(...));

etc.

There are, of course, some if checks to determine which component to add
to f but this makes it pretty easy to add new widgets.  Now if we ever
need to start adding some very complex components I might move over to
using panels.  But for our simple form builder, the fragments work just
fine.


Eelco Hillenius wrote:
 Hello, I've been following the discussions here, and this one caught my eye.
 Does this mean that Wicket is ill suited for example for creating dynamic
 forms that are built dynamically at runtime after reading some page
 definition file from xml or some other data store. I havent looked into
 Wicket deeply, I just skimmed the surface, but I'm currently thinking about
 converting a Struts solution that builds forms based on form metadata stored
 in xml files. In my case, almost all jsp's have the same layout, and only
 differ in the form fields shown.
 
 On the contrairy, Wicket is very well suited for that. Panels is the magic 
 word.
 
 Eelco
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

- --
Justin Lee
http://www.antwerkz.com
AIM : evan chooly
Skype : evanchooly
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFGGiTLJnQfEGuJ90MRA+GxAKCqEmm3J1/k2O4xGD4x+7Q/Tw6PaQCdHyyh
5RWxlT4OYskq9NivC3mpa5Y=
=5LJx
-END PGP SIGNATURE-

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


Re: [Wicket-user] having a (newbie) Ajax problem

2007-04-09 Thread Robbert Vergeten

great link thank you.

can't believe I missed that...


On 4/9/07, Martijn Dashorst [EMAIL PROTECTED] wrote:


http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html

And Igor was correct, just not the general faq :-P

http://cwiki.apache.org/WICKET/listview.html#ListView-FAQ

On 4/9/07, Robbert Vergeten [EMAIL PROTECTED] wrote:
 Thanks for the quick response i'll try that. I can't seem to find it in
the
 FAQ though.



 On 4/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
  you cannot update a listview with ajax, i think its in the faq. wrap
it in
 a webmarkupcontainer and update that instead.
 
  -igor
 
 
 
 
  On 4/8/07, Robbert Vergeten  [EMAIL PROTECTED] wrote:
  
  
   Hi, i'm new to wicket and currently trying out some things to learn
 wicket and to do proof-of-concepts with ajax functionality.
   Because for what I want for my actual application i'm going to need
a
 lot of Ajax.
  
   I'm having a problem with an ajax update of a list through ajax. The
 concept is a simple variation of the databinder.net example.
   Its like a guestbook/chat example with a form for input and a list
for
 the output. With both the ajax and the normal submit
   the server sends and receives the proper data only with the ajax the
 list is not properly updated because it works with id's.
   And all items in my list have the same id and therefore only the
first
 gets updated so to speak.
   (IE and FF give quite different (both wrong) results.)
  
   I'm quite stuck on this so my question is how should i properly pack
the
 output list into a single object with custom behavior
   that can handle its own update as a single component. Like a table
 instead of a list of rows.
   Any hints or links on where to start are most welcome.
  
   my current code:
  
  
   list = new PropertyListView(list, new
 HibernateListModel(ChatLine.class, new ICriteriaBuilder(){
public void build(Criteria criteria){
 criteria.addOrder (Order.desc (id));
 criteria.setMaxResults(10);
}})){
@Override
protected void populateItem(ListItem item) {
 Label textLine = new Label(text);
 Label userName = new Label(username);
 item.add(userName);
 item.add(textLine);
}};
   list.setOutputMarkupId(true);
   add(list);
  
   form = new DataForm(chatform, ChatLine.class){
@Override
protected void onSubmit() {
 super.onSubmit();
 clearPersistentObject();
}};
   form.add (new TextField(text));
   form.add(new TextField(username));
   form.add(new AjaxSubmitButton(ajaxsubmit, form){
@Override
protected void onSubmit(AjaxRequestTarget target, Form f) {
 target.addComponent(list);
}});
   add(form);
  
   wicket:extend
div style=margin-top:20px; position:absolute;
 table class=chatline
  tr wicket:id=list id=list
   td wicket:id=username class=user/td
   td: /td
   td wicket:id=text class=text/td
  /tr
 /table
/div
  
div style=margin-top:700px; position:absolute;
 form wicket:id=chatform
  table
   tr
tdUsername:/td
tdChat Message:/td
   /tr
   tr
tdinput type=text wicket:id=username //td
tdinput type=text wicket:id=text/ size=80/td
   /tr
  /table
  div style=margin-left:100px; position:absolute;
  input type=submit wicket:id=ajaxsubmit value=send
  input type=submit value=send
  /div
 /form
/div
   /wicket:extend
  
  
  
   Thanks in advance,
  
   Robbert
  
  
  

-
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to
share
 your
   opinions on IT  business topics through brief surveys-and earn cash
  

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

-
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
share
 your
  opinions on IT  business topics through brief surveys-and earn cash
 

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



-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
your
 opinions on IT  business topics through brief surveys-and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 

[Wicket-user] Wicket gui building

2007-04-09 Thread Pieter Laeremans
Hi,

I'm just getting started with wicket and I like. (I have a strong  
Swing background :-)) .

Bat it looks to me that I sort of have to design each gui, i.e. I  
have to write markup files.

In some cases I would like to be able to generate a form based on a  
database table.  And I wouldn't like to adapt my code  when the table  
structure changes.

But it seems to me I always have to supply a html file were each  
component is mapped to.  Is there a way to generate the html on the  
fly ? It is not immediatly clear to me.

kind regards,

Pieter 

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


Re: [Wicket-user] XSD / Validation

2007-04-09 Thread Dmitry Kandalov


ali-13 wrote:
 
 I link your xsd to external resources of IDEA and add wicket:id to custom  
 html tags/attributes, and now it know wicket'tags
 , but  after validate following xhtml file :
 
 
Sorry, but it's just a workaround for IDEA inspection, it's not a real
schema for wicket.
-- 
View this message in context: 
http://www.nabble.com/XSD---Validation-tf3488923.html#a9901301
Sent from the Wicket - User mailing list archive at Nabble.com.


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


[Wicket-user] TopToolbar in datatable dispeared when ajax modal window closed

2007-04-09 Thread tooy li(Gmail)
hi
i used a defaultdatatable to show the data list , and add some ajax link in it 
to open some modal window to show detail.
the toptoolbar will dispeared when these modal window closed, it's only happen 
in firefox, work well in IE 6.
so ,is there any one can help me ? the below is my code. 

ps. the crypted url and customed error page cannot work in the current 2.0 
snapshot when i used modal window.

it' seem that the current 2.0 is very not stable for some ajax behavior. no 
body care it again?


table.addTopToolbar(new IToolbarFactory() {
   public AbstractToolbar newToolbar(WebMarkupContainer parent,
 String id, DataTable dataTable) {
FilterToolbar tt = new FilterToolbar(parent, id, instance, dataProvider);
tt.setOutputMarkupId(true);
return tt;
   }
  });
 table.setOutputMarkupId(true);

setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
   public void onClose(AjaxRequestTarget target) {
target.addComponent(table);
 }
  });

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


Re: [Wicket-user] TopToolbar in datatable dispeared when ajax modal window closed

2007-04-09 Thread Matej Knopp
Yes, this is a known issue with refreshing dataview with toolbars
using ajax. The problem is that toolbars use non-invalid markup which
works fine with regular requests, but doesn't work using ajax.

-Matej

On 4/9/07, tooy li(Gmail) [EMAIL PROTECTED] wrote:
 hi
 i used a defaultdatatable to show the data list , and add some ajax link in 
 it to open some modal window to show detail.
 the toptoolbar will dispeared when these modal window closed, it's only 
 happen in firefox, work well in IE 6.
 so ,is there any one can help me ? the below is my code.

 ps. the crypted url and customed error page cannot work in the current 2.0 
 snapshot when i used modal window.

 it' seem that the current 2.0 is very not stable for some ajax behavior. no 
 body care it again?


 table.addTopToolbar(new IToolbarFactory() {
public AbstractToolbar newToolbar(WebMarkupContainer parent,
  String id, DataTable dataTable) {
 FilterToolbar tt = new FilterToolbar(parent, id, instance, dataProvider);
 tt.setOutputMarkupId(true);
 return tt;
}
   });
  table.setOutputMarkupId(true);

 setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
 target.addComponent(table);
  }
   });

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


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


Re: [Wicket-user] Creating Entire Forms in Java Code Only?

2007-04-09 Thread Igor Vaynberg

search the list and wiki for bean panels. there is also a bean panel project
in wicket-stuff although i dont know how usable it is.
-igor


On 4/8/07, Philip Weaver [EMAIL PROTECTED] wrote:



I am interested in creating a complex form in Java code without needing to
manually configure any html for that form. In Swing for example, when you
create a text field, it automatically has a default representation/view. If
I decide I'd like to change the view, I set a new UI object.

It basically would be really sweet to be able to create forms, form
elements, form layouts directly in Java code - and then later be able to
tweak or tailor layout, css, etc. (perhaps via fragments?) As a Swing
developer, I tend to develop every aspect of UIs in code.

I've been using Wicket for just a couple of days. Where should I be
looking? How do I approach this? strategies, Fragments, WebComponents?
markup inheritance? ...

Thanks,
Phil



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


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


Re: [Wicket-user] Wicket gui building

2007-04-09 Thread Eelco Hillenius
Check out how panels, fragments and borders work. That will let you
break things up in smaller pieces and defer the decission of which
actual markup will be used.

if (x) {
  add(new TextFieldPanel(editor);
} else {
  add(new ListEditor(editor);
}
...

form
  ...
  span wicket:id=editor /
  ...
/form

etc.

Just play with it a bit, I'm sure you'll get it :) Also, check out
dynamic components like Tree and Wizard etc and see how they use
panels internally.

Eelco



On 4/9/07, Pieter Laeremans [EMAIL PROTECTED] wrote:
 Hi,

 I'm just getting started with wicket and I like. (I have a strong
 Swing background :-)) .

 Bat it looks to me that I sort of have to design each gui, i.e. I
 have to write markup files.

 In some cases I would like to be able to generate a form based on a
 database table.  And I wouldn't like to adapt my code  when the table
 structure changes.

 But it seems to me I always have to supply a html file were each
 component is mapped to.  Is there a way to generate the html on the
 fly ? It is not immediatly clear to me.

 kind regards,

 Pieter

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


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


Re: [Wicket-user] Internationalization and DropDownChoice

2007-04-09 Thread Timo Rantalaiho
On Thu, 05 Apr 2007, Toscano wrote:
 The getCountries() method outputs the list of countries depending on the
 language stored in session.
 But if I create the DropDownChoice as you said:
 
  countries = new DropDownChoice(country, 
 new Model() {
 public List getObject()
 {
 return getCountries();}
 }, new ChoiceRenderer (countryName, countryID));
 
 I have a RunTimeException: java.lang.NullPointerException: List of choices
 is null - Was the supplied 'Choices' model empty?

As far as I remember, at least in 2.0 DropDownChoice takes
in two models: a list of the choices, and the initial
choice.  (By the way, this is an excellent example of where
generics make the constructor more explicit). 

So double-check that you are supplying the choices
correctly, and not in fact invoking a constructor that only
determines the default choice.

-- 
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 

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


Re: [Wicket-user] Creating Entire Forms in Java Code Only?

2007-04-09 Thread Nathan Hamblen
I'm just going to echo what Eelco originally said: HTML is quite good 
for defining forms. I'm glad people have found ways to generate them 
from XML or whatever (and for some purposes I'm sure that's best), but I 
would encourage new users to keep an open mind about plain HTML 
templates for forms (and everything else). It's not always easy to 
accept coming from other Java frameworks where things are so different, 
but I hate to see people building heavy-duty (and ultimately inflexible) 
form generators just to avoid coding up ten different forms in HTML.

A really swell idea from Galligan's Groovy demo was generating basic 
form markup for components and dumping it to stdout. Ideally, this would 
go into the component missing from markup error screen. Then you could 
copy, paste, and add whatever extra markup you want. The demo is here if 
anyone missed it:
http://bigheadco.blogspot.com/2007/03/party-on-patio.html

Nathan


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


[Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Peter Thomas

Hi,

I'm trying to use some Yahoo UI widgets and currently things work fine when
the required javascript files are contributed using wicket:head

But when I have two different panels appearing within the same page - and
both contributing the same common *.js files, - the page HTML has duplicate
script type=text/javascript entries.  Is there some way to avoid this?

Thanks,

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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Igor Vaynberg

use IHeaderContributor, contributions through that are filtered.

i dont think we currently parse what exactly is in wicket:head, we just blob
it in. it might be nice to parse it, i dont know, but it is a lot of work.
you can add an rfe if you want, but it will not get a high priority imho

-igor


On 4/9/07, Peter Thomas [EMAIL PROTECTED] wrote:


Hi,

I'm trying to use some Yahoo UI widgets and currently things work fine
when the required javascript files are contributed using wicket:head

But when I have two different panels appearing within the same page - and
both contributing the same common *.js files, - the page HTML has duplicate
script type=text/javascript entries.  Is there some way to avoid this?

Thanks,

Peter.

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


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


[Wicket-user] failure notice

2007-04-09 Thread MAILER-DAEMON
Hi. This is the qmail-send program at cenia.net.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

wicket-user@lists.sourceforge.net:
66.35.250.206 does not like recipient.
Remote host said: 451-Could not complete sender verify callout
451-Could not complete sender verify callout for
451-wicket-user@lists.sourceforge.net.
451-The mail server(s) for the domain may be temporarily unreachable, or
451-they may be permanently unreachable from this server. In the latter case,
451-you need to change the address or create an MX record for its domain
451-if it is supposed to be generally accessible from the Internet.
451 Talk to your mail administrator for details.
Giving up on 66.35.250.206.
I'm not going to try again; this message has been in the queue too long.

--- Below this line is a copy of the message.

Return-Path: wicket-user@lists.sourceforge.net
Received: (qmail 6465 invoked from network); 2 Apr 2007 18:07:55 +0200
Received: from r2j243.net.upc.cz (HELO ?192.168.0.78?) (62.245.73.243)
  by iregistr.cz with SMTP; 2 Apr 2007 18:07:55 +0200
Message-ID: [EMAIL PROTECTED]
Date: Mon, 02 Apr 2007 19:07:24 +0200
From:  wicket-user@lists.sourceforge.net
User-Agent: Thunderbird 1.5.0.10 (X11/20070305)
MIME-Version: 1.0
To:  wicket-user@lists.sourceforge.net
Subject: Custom component with css style
References: [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

hello,
I have custom component FoldingBorder extends Border with associated css 
style e.g. in package  com.example.components. If I want to use style 
within the package (FoldingBorder.css) I do following:

public class FoldingBorder extends Border implements Serializable {
public FoldingBorder (String id, String title) {
//...omited

add(HeaderContributor.forCss(FoldingBorder.class, FoldingBorder.css));

//...omited
}
}

On rendered page I have this:
link rel=stylesheet type=text/css 
href=/webapp/resources/com.example.components.FoldingBorder/FoldingBorder.css/link

...and it surprisingly doesn't work;-) I'm little confused how to work 
with resources... What's the best practice to use resources within some 
component (styles, images, etc.)?

thanks for help,
marek




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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Peter Thomas

Thanks Igor I'll use IHeaderContributor for now.

On 4/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


use IHeaderContributor, contributions through that are filtered.

i dont think we currently parse what exactly is in wicket:head, we just
blob it in. it might be nice to parse it, i dont know, but it is a lot of
work. you can add an rfe if you want, but it will not get a high priority
imho

-igor


On 4/9/07, Peter Thomas [EMAIL PROTECTED] wrote:

 Hi,

 I'm trying to use some Yahoo UI widgets and currently things work fine
 when the required javascript files are contributed using wicket:head

 But when I have two different panels appearing within the same page -
 and both contributing the same common *.js files, - the page HTML has
 duplicate script type=text/javascript entries.  Is there some way to
 avoid this?

 Thanks,

 Peter.


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

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



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


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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Johan Compagner

it shouldn't be to hard i guess to send that blob through the header
contributor?
Because then it will be filtered because the head part is always the same
for a static script

johan


On 4/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


use IHeaderContributor, contributions through that are filtered.

i dont think we currently parse what exactly is in wicket:head, we just
blob it in. it might be nice to parse it, i dont know, but it is a lot of
work. you can add an rfe if you want, but it will not get a high priority
imho

-igor


On 4/9/07, Peter Thomas [EMAIL PROTECTED] wrote:

 Hi,

 I'm trying to use some Yahoo UI widgets and currently things work fine
 when the required javascript files are contributed using wicket:head

 But when I have two different panels appearing within the same page -
 and both contributing the same common *.js files, - the page HTML has
 duplicate script type=text/javascript entries.  Is there some way to
 avoid this?

 Thanks,

 Peter.


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash

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



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


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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Eelco Hillenius
 it shouldn't be to hard i guess to send that blob through the header
 contributor?
 Because then it will be filtered because the head part is always the same
 for a static script

I would have sworn we already did that. Calls for a JIRA issue.

Eelco

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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Igor Vaynberg

we are talking about two different panel classes contributing the same
link, that means we need to break the head down into individual tags and
process them that way.

this isnt the case where we filter contributions from two instances of the
same panel class.

-igor


On 4/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 it shouldn't be to hard i guess to send that blob through the header
 contributor?
 Because then it will be filtered because the head part is always the
same
 for a static script

I would have sworn we already did that. Calls for a JIRA issue.

Eelco

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

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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Matej Knopp
We already do parse content of head, but only to filter hader
contribution contributed by ajax (in javascript).

-Matej

On 4/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 we are talking about two different panel classes contributing the same
 link, that means we need to break the head down into individual tags and
 process them that way.

 this isnt the case where we filter contributions from two instances of the
 same panel class.

 -igor



 On 4/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   it shouldn't be to hard i guess to send that blob through the header
   contributor?
   Because then it will be filtered because the head part is always the
 same
   for a static script
 
  I would have sworn we already did that. Calls for a JIRA issue.
 
  Eelco
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
  opinions on IT  business topics through brief surveys-and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


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



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


Re: [Wicket-user] Fragment: optionally replace the tag

2007-04-09 Thread Martijn Dashorst
This is very nasty code: creating a page upfront and not having it be
part of the request cycle. Constructing a page can be very costly in
terms of memory usage and performance (models pulling data).

I highly recommend pulling this example from confluence, as it is
unnecessary (use panels instead) and is as dangerous as adding new
Page()'s to a PageLink (also not recommended).

Martijn


On 4/9/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I meant, when I don't use the wicket:fragment-tags (like in the example at
 http://cwiki.apache.org/confluence/display/WICKET/Fragment#Fragment-Fragmentsfromotherpages
 ).

 Tom

 Igor Vaynberg schrieb:
  fragment doesnt own wicket:fragment, only whatever is inside the
  wicket:fragment tags
 
  -igor
 
 
  On 4/8/07, *Thomas Singer*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  wrote:
 
  Currently, when using the Fragment component, only the content
  between the
  opening and closing tag seems to be replaced. What about optionally
  replacing the tag, too?
 
  Tom


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



-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

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


Re: [Wicket-user] Fragment: optionally replace the tag

2007-04-09 Thread Igor Vaynberg

yes +1, just revert to version 3

-igor


On 4/9/07, Martijn Dashorst [EMAIL PROTECTED] wrote:


This is very nasty code: creating a page upfront and not having it be
part of the request cycle. Constructing a page can be very costly in
terms of memory usage and performance (models pulling data).

I highly recommend pulling this example from confluence, as it is
unnecessary (use panels instead) and is as dangerous as adding new
Page()'s to a PageLink (also not recommended).

Martijn


On 4/9/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I meant, when I don't use the wicket:fragment-tags (like in the
example at

http://cwiki.apache.org/confluence/display/WICKET/Fragment#Fragment-Fragmentsfromotherpages
 ).

 Tom

 Igor Vaynberg schrieb:
  fragment doesnt own wicket:fragment, only whatever is inside the
  wicket:fragment tags
 
  -igor
 
 
  On 4/8/07, *Thomas Singer*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

  wrote:
 
  Currently, when using the Fragment component, only the content
  between the
  opening and closing tag seems to be replaced. What about
optionally
  replacing the tag, too?
 
  Tom



-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
your
 opinions on IT  business topics through brief surveys-and earn cash

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



--
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

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

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


Re: [Wicket-user] Help Me Improve Wicket Quickstart

2007-04-09 Thread Martin Funk

 Well, isn't that just what mvn jetty:run gives you? :-)

talking about quickstart and mvn jetty:run:

https://issues.apache.org/jira/browse/WICKET-455

Martin

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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Igor Vaynberg

there is a FormComponentPanel that can embed other form components, and act
as a formcomponent itself. and actually wicket does support embedded forms.

-igor


On 4/9/07, Carlos Pita [EMAIL PROTECTED] wrote:


Hi all,

suppose you have to implement some form input component that is
composed from other simple FormComponents. These simple input fields
will be ajax-validated individually, and they will be subject to some
global (inter-field) validation too. An example could be three
drop-downs for a date, with local validation requiring each field and
global validation asking for a valid Gregorian calendar date. AFAIK
there are nothing like nested forms in wicket, you have a form and
then at the next level its FormComponents and that's all. So I tend to
think of a static helper method that instantiates the individual form
fields and registers them with the form. Maybe there must be some
synthetic invisible component just to attach feedback from the date
global-validation, which will be implemented as a form validator. For
example:

class MyForm extends Form {

   public MyForm(String id) {
  
  DateComponent.add(this, birthDate);
  
   }
}

select wicket:id=birthDate.day/
span wicket:id=birthDate.day.feedback/span

select wicket:id=birthDate.month/
span wicket:id=birthDate.month.feedback/span

select wicket:id=birthDate.year/
span wicket:id=birthDate.year.feedback/span

span wicket:id=birthDate/span !-- dummy component --
span wicket:id=birthDate.feedback/span


There are two things in this approach that I don't particularly like:

1) Having a dummy component to attach date global-validation errors
(notice that they are not the same as form errors).

2) The procedural nature of the solution, there is no real Date component.

What do you think? Do you have a better alternative that is not too
convolved?

Best regards,
Carlos

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

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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Carlos Pita
 there is a FormComponentPanel that can embed other form components, and act

Great! Btw, is there something more like a border or fragment, to
inline the markup?

 as a formcomponent itself. and actually wicket does support embedded forms.

Can you expand on this? Will nested forms be validated and bound
before their containers?

Cheers,
Carlos


 -igor



 On 4/9/07, Carlos Pita [EMAIL PROTECTED] wrote:
 
  Hi all,
 
  suppose you have to implement some form input component that is
  composed from other simple FormComponents. These simple input fields
  will be ajax-validated individually, and they will be subject to some
  global (inter-field) validation too. An example could be three
  drop-downs for a date, with local validation requiring each field and
  global validation asking for a valid Gregorian calendar date. AFAIK
  there are nothing like nested forms in wicket, you have a form and
  then at the next level its FormComponents and that's all. So I tend to
  think of a static helper method that instantiates the individual form
  fields and registers them with the form. Maybe there must be some
  synthetic invisible component just to attach feedback from the date
  global-validation, which will be implemented as a form validator. For
  example:
 
  class MyForm extends Form {
 
 public MyForm(String id) {

DateComponent.add(this, birthDate);

 }
  }
 
  select wicket:id=birthDate.day/
  span wicket:id=birthDate.day.feedback/span
 
  select wicket:id=birthDate.month/
  span wicket:id=birthDate.month.feedback/span
 
  select wicket:id=birthDate.year/
  span wicket:id= birthDate.year.feedback/span
 
  span wicket:id=birthDate/span !-- dummy component --
  span wicket:id=birthDate.feedback/span
 
 
  There are two things in this approach that I don't particularly like:
 
  1) Having a dummy component to attach date global-validation errors
  (notice that they are not the same as form errors).
 
  2) The procedural nature of the solution, there is no real Date component.
 
  What do you think? Do you have a better alternative that is not too
 convolved?
 
  Best regards,
  Carlos
 
 
 -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
  opinions on IT  business topics through brief surveys-and earn cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


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



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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Eelco Hillenius
  as a formcomponent itself. and actually wicket does support embedded forms.

 Can you expand on this? Will nested forms be validated and bound
 before their containers?

Look at wicket.examples.forminput.Multiply and
wicket.extensions.yui.calendar.(Date)TimeField for examples.

Eelco

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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Matej Knopp
When nested form is submitted, the form components in surrounding
models are given the user input, but they are not processed. So the
input is persisted during request, but not validated and processed.
The inner (nested) form, that is submitted is both validated and if
validation succeeds, the models are updated.

-Matej

On 4/9/07, Carlos Pita [EMAIL PROTECTED] wrote:
  there is a FormComponentPanel that can embed other form components, and act

 Great! Btw, is there something more like a border or fragment, to
 inline the markup?

  as a formcomponent itself. and actually wicket does support embedded forms.

 Can you expand on this? Will nested forms be validated and bound
 before their containers?

 Cheers,
 Carlos

 
  -igor
 
 
 
  On 4/9/07, Carlos Pita [EMAIL PROTECTED] wrote:
  
   Hi all,
  
   suppose you have to implement some form input component that is
   composed from other simple FormComponents. These simple input fields
   will be ajax-validated individually, and they will be subject to some
   global (inter-field) validation too. An example could be three
   drop-downs for a date, with local validation requiring each field and
   global validation asking for a valid Gregorian calendar date. AFAIK
   there are nothing like nested forms in wicket, you have a form and
   then at the next level its FormComponents and that's all. So I tend to
   think of a static helper method that instantiates the individual form
   fields and registers them with the form. Maybe there must be some
   synthetic invisible component just to attach feedback from the date
   global-validation, which will be implemented as a form validator. For
   example:
  
   class MyForm extends Form {
  
  public MyForm(String id) {
 
 DateComponent.add(this, birthDate);
 
  }
   }
  
   select wicket:id=birthDate.day/
   span wicket:id=birthDate.day.feedback/span
  
   select wicket:id=birthDate.month/
   span wicket:id=birthDate.month.feedback/span
  
   select wicket:id=birthDate.year/
   span wicket:id= birthDate.year.feedback/span
  
   span wicket:id=birthDate/span !-- dummy component --
   span wicket:id=birthDate.feedback/span
  
  
   There are two things in this approach that I don't particularly like:
  
   1) Having a dummy component to attach date global-validation errors
   (notice that they are not the same as form errors).
  
   2) The procedural nature of the solution, there is no real Date component.
  
   What do you think? Do you have a better alternative that is not too
  convolved?
  
   Best regards,
   Carlos
  
  
  -
   Take Surveys. Earn Cash. Influence the Future of IT
   Join SourceForge.net's Techsay panel and you'll get the chance to share
  your
   opinions on IT  business topics through brief surveys-and earn cash
  
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share your
  opinions on IT  business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

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


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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Carlos Pita
Hi Eelco,

I've looked at the examples. There are a couple of things that still
troubles me:

1) How can I use a compound property model without naming the nested
form components with their full path (ie. 'birthDate.year' instead of
simply 'year').

2) If I add a validator to the form component panel (for panel level
validation), can I assume that the nested component models will be
already bound when the validator is triggered, or at least that
getConvertedInput() will work on them?

Thank you.
Cheers,
Carlos



On 4/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   as a formcomponent itself. and actually wicket does support embedded 
   forms.
 
  Can you expand on this? Will nested forms be validated and bound
  before their containers?

 Look at wicket.examples.forminput.Multiply and
 wicket.extensions.yui.calendar.(Date)TimeField for examples.

 Eelco

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


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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Eelco Hillenius
 1) How can I use a compound property model without naming the nested
 form components with their full path (ie. 'birthDate.year' instead of
 simply 'year').

 2) If I add a validator to the form component panel (for panel level
 validation), can I assume that the nested component models will be
 already bound when the validator is triggered, or at least that
 getConvertedInput() will work on them?

As you're looking at the date-time components, the answer to both
questions is that clients of those components should consider it
implementation details. Like FormComponentPanel says, it doesn't
typically get any input itself. The nested components really are for
recording intermediate input, which is applied to the model of the
panel when updateModel is called, and as you can see, the internal
state is synchronized in onAttach. I believe you should design such
compound components like black boxes, which from a user's perspective
behave like normal form components (they work on one model, and you
only have to know it's public API).

Eelco

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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Igor Vaynberg

On 4/9/07, Carlos Pita [EMAIL PROTECTED] wrote:



1) How can I use a compound property model without naming the nested
form components with their full path (ie. 'birthDate.year' instead of
simply 'year').



use the model luke

what is below is some pseudocode, it is not the best way to do this, but it
will give you an idea.

leave the formcomponentpanel's model null. immediately under it add a
webmarkupcontainer with the following model

class indentingmodel extends Model implements icomponentinheritedmodel {
iwrapmodel wraponinheritance(Component c) {
return new PropertyModel(FormComponentPanel.this.getModel(),
FormComponentPanel.this.getId()+.+c.getId());
}
}

add all the children to this webmarkupcontainer instead of directly to the
panel. what this model does is any children created without a model will
inherit a model that looks up the property that is prefixed with the
formcomponentpanel's id.

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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Jonathan Locke


maybe have FormComponentFeedbackBorders for the individual
components and then a global feedback panel to catch the general
ones (install a filter to ignore reporters that have feedback borders)


Carlos Pita-4 wrote:
 
 Hi all,
 
 suppose you have to implement some form input component that is
 composed from other simple FormComponents. These simple input fields
 will be ajax-validated individually, and they will be subject to some
 global (inter-field) validation too. An example could be three
 drop-downs for a date, with local validation requiring each field and
 global validation asking for a valid Gregorian calendar date. AFAIK
 there are nothing like nested forms in wicket, you have a form and
 then at the next level its FormComponents and that's all. So I tend to
 think of a static helper method that instantiates the individual form
 fields and registers them with the form. Maybe there must be some
 synthetic invisible component just to attach feedback from the date
 global-validation, which will be implemented as a form validator. For
 example:
 
 class MyForm extends Form {
 
public MyForm(String id) {
   
   DateComponent.add(this, birthDate);
   
}
 }
 
 select wicket:id=birthDate.day/
 
 
 select wicket:id=birthDate.month/
 
 
 select wicket:id=birthDate.year/
 
 
  !-- dummy component --
 
 
 
 There are two things in this approach that I don't particularly like:
 
 1) Having a dummy component to attach date global-validation errors
 (notice that they are not the same as form errors).
 
 2) The procedural nature of the solution, there is no real Date component.
 
 What do you think? Do you have a better alternative that is not too
 convolved?
 
 Best regards,
 Carlos
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Form-macro-component-tf3549549.html#a9911009
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Carlos Pita
Well, here is what I've done based on your suggestions. Please review
this and tell me if it can be improved, if you are so kind:

1)  An inherited model that looks into the passed model. If it's not
null it returns a propertymodel for the component id a la
CompoundPropertyModel. If it's null it returns a propertymodel for the
parent's model with the full path of the component. So inside my panel
I can add form components as add(new TextField(month,
Integer.class)) independently of the model passed (null or a real
date)

private class MyModel extends Model implements IComponentInheritedModel {
 
public IWrapModel wrapOnInheritance(Component component) {
final IModel wrappedModel;
if (model == null) {
IModel parentModel = DatePanel.this.getParent().getModel();
String path = DatePanel.this.getParent().getId() + .
 + component.getId();
wrappedModel = new PropertyModel(parentModel, path);
} else {
wrappedModel = new PropertyModel(model, component.getId());
}
return new AbstractWrapModel() {
public IModel getWrappedModel() { return wrappedModel;
}
};
}
}

2) To have control on when children are really validated and their
models updated:

public boolean processChildren() { return false; }

3) A DatePanel validator that first validate its fields (so they are
converted too) and finally do global validation (validateDate()). Note
that individual validators can do global validation do, depending on
whether the validation was ajax-triggered or not, so validateDate()
will occur depending on the value of the validateDate flag (true for
ajax-validation, false for individual validators during submit
validation). Notice that validateOnNullValue() must return true or
this validator won't be invoked.

  add(new AbstractValidator() {
protected void onValidate(IValidatable validatable) {
validateDate = false;
yearField.validate();
monthField.validate();
dayField.validate();
validateDate = true;
if (!(yearField.hasErrorMessage() ||
monthField.hasErrorMessage() || dayField.hasErrorMessage())) {
validateDate();
}
}
public boolean validateOnNullValue() { return true; }
});

4) updateModel. Just delegate to fields.

public void updateModel() {
dayField.updateModel();
monthField.updateModel();
yearField.updateModel();
}

Thank you in advance.
Best regards,
Carlos

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


Re: [Wicket-user] Form macro-component

2007-04-09 Thread Igor Vaynberg

looks good without actually running the code :)

-igor


On 4/9/07, Carlos Pita [EMAIL PROTECTED] wrote:


Well, here is what I've done based on your suggestions. Please review
this and tell me if it can be improved, if you are so kind:

1)  An inherited model that looks into the passed model. If it's not
null it returns a propertymodel for the component id a la
CompoundPropertyModel. If it's null it returns a propertymodel for the
parent's model with the full path of the component. So inside my panel
I can add form components as add(new TextField(month,
Integer.class)) independently of the model passed (null or a real
date)

private class MyModel extends Model implements IComponentInheritedModel {
 
public IWrapModel wrapOnInheritance(Component component) {
final IModel wrappedModel;
if (model == null) {
IModel parentModel = DatePanel.this.getParent
().getModel();
String path = DatePanel.this.getParent().getId() + .
+ component.getId();
wrappedModel = new PropertyModel(parentModel, path);
} else {
wrappedModel = new PropertyModel(model, component.getId
());
}
return new AbstractWrapModel() {
public IModel getWrappedModel() { return wrappedModel;
}
};
}
}

2) To have control on when children are really validated and their
models updated:

public boolean processChildren() { return false; }

3) A DatePanel validator that first validate its fields (so they are
converted too) and finally do global validation (validateDate()). Note
that individual validators can do global validation do, depending on
whether the validation was ajax-triggered or not, so validateDate()
will occur depending on the value of the validateDate flag (true for
ajax-validation, false for individual validators during submit
validation). Notice that validateOnNullValue() must return true or
this validator won't be invoked.

  add(new AbstractValidator() {
protected void onValidate(IValidatable validatable) {
validateDate = false;
yearField.validate();
monthField.validate();
dayField.validate();
validateDate = true;
if (!(yearField.hasErrorMessage() ||
monthField.hasErrorMessage() || dayField.hasErrorMessage())) {
validateDate();
}
}
public boolean validateOnNullValue() { return true; }
});

4) updateModel. Just delegate to fields.

public void updateModel() {
dayField.updateModel();
monthField.updateModel();
yearField.updateModel();
}

Thank you in advance.
Best regards,
Carlos

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

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


Re: [Wicket-user] Duplicate wicket:head contributed entries with multiple panels on a page

2007-04-09 Thread Peter Thomas

created JIRA https://issues.apache.org/jira/browse/WICKET-456

And when I use HeaderContributor (instead of wicket:head in the markup) it
works fine as expected.

Thanks,

Peter.

On 4/9/07, Matej Knopp [EMAIL PROTECTED] wrote:


We already do parse content of head, but only to filter hader
contribution contributed by ajax (in javascript).

-Matej

On 4/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 we are talking about two different panel classes contributing the same
 link, that means we need to break the head down into individual tags
and
 process them that way.

 this isnt the case where we filter contributions from two instances of
the
 same panel class.

 -igor



 On 4/9/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   it shouldn't be to hard i guess to send that blob through the header
   contributor?
   Because then it will be filtered because the head part is always the
 same
   for a static script
 
  I would have sworn we already did that. Calls for a JIRA issue.
 
  Eelco
 
 

-
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
share
 your
  opinions on IT  business topics through brief surveys-and earn cash
 

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



-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
your
 opinions on IT  business topics through brief surveys-and earn cash

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



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

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


Re: [Wicket-user] Fragment: optionally replace the tag

2007-04-09 Thread Thomas Singer
OK, do so.

Tom


On Mon, 09 Apr 2007 20:14:36 +0200, Martijn Dashorst  
[EMAIL PROTECTED] wrote:

 This is very nasty code: creating a page upfront and not having it be
 part of the request cycle. Constructing a page can be very costly in
 terms of memory usage and performance (models pulling data).

 I highly recommend pulling this example from confluence, as it is
 unnecessary (use panels instead) and is as dangerous as adding new
 Page()'s to a PageLink (also not recommended).

 Martijn


 On 4/9/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I meant, when I don't use the wicket:fragment-tags (like in the  
 example at
 http://cwiki.apache.org/confluence/display/WICKET/Fragment#Fragment-Fragmentsfromotherpages
 ).

 Tom

 Igor Vaynberg schrieb:
  fragment doesnt own wicket:fragment, only whatever is inside the
  wicket:fragment tags
 
  -igor
 
 
  On 4/8/07, *Thomas Singer*  [EMAIL PROTECTED]  
 mailto:[EMAIL PROTECTED]
  wrote:
 
  Currently, when using the Fragment component, only the content
  between the
  opening and closing tag seems to be replaced. What about  
 optionally
  replacing the tag, too?
 
  Tom


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






-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


[Wicket-user] Submit failure

2007-04-09 Thread Roman Mandeleil

Hi , 


What is the right way to identify that a submit was failed ( e.g. there is
no connection to the server ) ? 


Best regards 
Mandeleil Roman
-- 
View this message in context: 
http://www.nabble.com/Submit-failure-tf3551190.html#a9914206
Sent from the Wicket - User mailing list archive at Nabble.com.


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