Re: [Wicket-user] Multiple wicket:child tags in the same page
yehh, that's excellent! I know now, thank you, igor.vaynberg. igor.vaynberg wrote: no they do not, all that is taken care off by wicket markup inheritance. for example: class basepage extends webpage { abstract componentwithassociatedmarkup newarea1(string id); abstract componentwithassociatedmarkup newarea2(string id); } basepage.html html body before1 div wicket:id=area1/div before2 div wicket:id=area2/div wicket:child/ /body /html class page1 extends basepage { //implementation of newarea1 and 2 } page1.html wicket:extend wicket:fragment for area 1/wicket:fragment wicket:fragment for area 2/wicket:fragment /wicket:extend as you can see in page1.html you do not need to repeat before1 and before2 markup. -igor -- View this message in context: http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html#a11272841 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]
hi juergen, Solution: you simply must attach HeaderContributor.forCss to any other of your components (e.g. html in your code) hmm, that i can do for own components, it'll break components like the wicket tree, too! also, this doesn't make sense, as when there is _no_ wicket-id in the html-contributor works! regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]
I added my comment to the other thread obviously discussing the very same topic. Juergen On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: I also think this would be a good solution. -Matej On 6/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 6/23/07, Matej Knopp [EMAIL PROTECTED] wrote: Modifying the tag (onComponentTag) and rendering header contribution (renderHead) are two different thing. While onComponentTag on a behavior attached to page won't work (for reasons as you stated), there is no reason why renderHead shouldn't work as well. -Matej attach the page to html tag and the entire ibehavior should make sense i think. -igor On 6/23/07, Juergen Donnerstag [EMAIL PROTECTED] wrote: Jan, the problem is that though you can attach attribute modifier (that is what HeaderContributor is as well) to a Page (or WebPage), it'll not work. WebPage doesn't have a tag. Since there is no tag, the attribute modifier are not invoked, hence the nothing gets added to the header section. Solution: you simply must attach HeaderContributor.forCss to any other of your components (e.g. html in your code) In order to prevent such errors, Wicket should detect (if not prevent) that attribute modifiers are added to WebPage. I've no idea right now how to make it a compile error, but we certainly can make it a runtime exception. Juergen On 6/22/07, Jan Kriesten [EMAIL PROTECTED] wrote: copy to the list, as sourceforge doesn't allow zip-attachments atm. Original Message Subject: Re: [Wicket-user] html wicket:id=html CSS Date: Fri, 22 Jun 2007 08:53:23 +0200 From: Jan Kriesten [EMAIL PROTECTED] Hi Juergen, I'll try my best to find some spare time to do it. Hopefully over the weekend. much appreciated, thank you! :-) I attached a zip-file containing the example. Best regards, --- Jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Adding item to ListView over Ajax - refresh only newest row
Hi, I'm trying to create a kind of expression builder UI, so I was thinking of a ListView and there is this add button on the page that will add an item to the List. I am able to do this over Ajax, and I am aware that to refresh a ListView over Ajax, you have to target a container of the ListView and all this is working fine. But this means that in the Ajax response, the HTML for the entire list is retrieved from the server. Since the list may get big and the content is complex, is it possible to only get the last ListItem and do a DOM append operation over Ajax? Does Wicket's built in Ajax support this. Any ideas would be appreciated. Thanks, Peter. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]
hi juergen, I added my comment to the other thread obviously discussing the very same topic. yes, have seen that. what i still don't understand is, why did it work when there was no wicket:id in the html? only the wicket:id broke header-contribution. regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] cannot add CSS to web page?
All behaviors are invoked from Component.onComponentTag(). When a web page renders it does not call onComponentTag() for the page, as the page has no associated markup tag. That means, though you can do add(HeaderContributor.forCss()) (assume you are adding to a page) nothing will happen. The CSS will not be added to the head section and you will not get any warning etc.. Instead you may use any other component on your page. I agree that throwing an exception is not the preferred solution, but at least it give users a hint that they are doing something that currently doesn't work. I thought this is better than nothing while we could discuss a much better solution for the problem. Using html: - means we need to create yet another auto-component (automatically assign a wicket:id; automatically create an associated WebMarkupContainer - which will need some special behavior to be invisible/transparent for users - and of course at runtime you need to execute it. We already had discusions on how to reduce the number of auto components. - do we need to change all relevant WebPage methods to refer to that component? Or only for adding behaviors (e.g. getHtmlComponent().add(behavior). By sometime referring to that that html component and sometimes not, are we not creating yet another inconsistency (or magic). I was thinking of using the body component which already is automatically created. BUT it only make sense for HeaderContributors. html make more sense for AMs which realy modify an attribute (e.g. lang). I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. I agree but would be a suitable technical solution: E.g. keep throwing an exception for IBhavior and implement public void WebPage.add(HeaderContributor contrib) { getBodyContainer().add(contrib) } lets discuss the pros and cons of all alternatives in order to find the best solution for Wicket and all its users. Juergen On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: Arrgh. Discard my previous reply. This is wrong. Why shouldn't I be able to do header contribution on behavior attached to a page? This doesn't make sense! I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. -Matej On 6/24/07, Jonathan Locke [EMAIL PROTECTED] wrote: my code which does this: add(HeaderContributor.forCss(CSS)); now throws the following exception. my web page needs to contribute CSS to the header. i'm wondering, why can't i do it this way anymore (it seems like WebPage is a component like any other and my code did work fine before this exception)? and what's the best alternative? thanks! Caused by: org.apache.wicket.WicketRuntimeException: You can not attach behaviors onto WebPages. Web pages do require a markup file but no specific tag to attach the page to. This is why behaviors such as HeaderContributor for example don't work if attached to a WebPage. Please attach the behavior to any other of your components. -- View this message in context: http://www.nabble.com/cannot-add-CSS-to-web-page--tf3970619.html#a11270671 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]
yes, this a valid comment. The html component is causing the problem. The header contribution code has obviously been designed in a way that it expects to be the very first contribution to the pages output markup. With the html component it no longer is, since the html tag must be rendered first and than, sometimes later, the head section. Though the most obvious approach doesn't right now, it is not a show stopper for you, since you can add the HeaderContributor to any other component of your page (except the page) and it'll work, correct? Juergen On 6/24/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi juergen, I added my comment to the other thread obviously discussing the very same topic. yes, have seen that. what i still don't understand is, why did it work when there was no wicket:id in the html? only the wicket:id broke header-contribution. regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] cannot add CSS to web page?
Jan - in the other thread - quite rightly pointed out that HeaderContribution does work on pages. It only does not work if a component is attached to html. What makes html different is that it must partially be rendered befor the head section. Why exactly a component starts rendering before the head tag causes the problem I don't know yet. Juergen On 6/24/07, Juergen Donnerstag [EMAIL PROTECTED] wrote: All behaviors are invoked from Component.onComponentTag(). When a web page renders it does not call onComponentTag() for the page, as the page as no associated markup tag. That means, though you can do add(HeaderContributor.forCss()) (assume you are adding to a page) nothing will happen. The CSS will not be added to the head section and you will not get any warning etc.. Instead you may use any other component on your page. I agree that throwing an exception is not the preferred solution, but at least it give users a hint that they are doing something that currently doesn't work. I thought this is better than nothing while we could discuss a much better solution for the problem. Using html: - means we need to create yet another auto-component (automatically assign a wicket:id; automatically create an associated WebMarkupContainer - which will need some special behavior to be invisible/transparent for users - and of course at runtime you need to execute it. We already had discusions on how to reduce the number of auto components. - do we need to change all relevant WebPage methods to refer to that component? Or only for adding behaviors (e.g. getHtmlComponent().add(behavior). By sometime referring to that that html component and sometimes not, are we not creating yet another inconsistency (or magic). I was thinking of using the body component which already is automatically created. BUT it only make sense for HeaderContributors. html make more sense for AMs which realy modify an attribute (e.g. lang). I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. I agree but would be a suitable technical solution: E.g. keep throwing an exception for IBhavior and implement public void WebPage.add(HeaderContributor contrib) { getBodyContainer().add(contrib) } lets discuss the pros and cons of all alternatives in order to find the best solution for Wicket and all its users. Juergen On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: Arrgh. Discard my previous reply. This is wrong. Why shouldn't I be able to do header contribution on behavior attached to a page? This doesn't make sense! I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. -Matej On 6/24/07, Jonathan Locke [EMAIL PROTECTED] wrote: my code which does this: add(HeaderContributor.forCss(CSS)); now throws the following exception. my web page needs to contribute CSS to the header. i'm wondering, why can't i do it this way anymore (it seems like WebPage is a component like any other and my code did work fine before this exception)? and what's the best alternative? thanks! Caused by: org.apache.wicket.WicketRuntimeException: You can not attach behaviors onto WebPages. Web pages do require a markup file but no specific tag to attach the page to. This is why behaviors such as HeaderContributor for example don't work if attached to a WebPage. Please attach the behavior to any other of your components. -- View this message in context: http://www.nabble.com/cannot-add-CSS-to-web-page--tf3970619.html#a11270671 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
Re: [Wicket-user] html wicket:id=html CSS]
hi juergen, yes, this a valid comment. The html component is causing the problem. The header contribution code has obviously been designed in a way that it expects to be the very first contribution to the pages output markup. With the html component it no longer is, since the html tag must be rendered first and than, sometimes later, the head section. i understand. so, wouldn't it be the easiest way to change the behavior of the HeaderContributors to automatically do a getBodyContainer().add( new HeaderContributor.forCSS() )? this could be tricky since the HeaderContributors are static as far as i've seen. Though the most obvious approach doesn't right now, it is not a show stopper for you, since you can add the HeaderContributor to any other component of your page (except the page) and it'll work, correct? not quite, my main problem isn't right now that my css don't get added to the header, but the css for wicket-components like org.apache.wicket.markup.html.tree.LinkTree best regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] File too long under Vista when extraction Wicket 1.3
Hi all I'm using my brand new vista pc to extract Wicket and I've 8 files too long to be extracted, like for example AdminAnnotationsBookmarkablePage. I'm trying to extract them under d:\wicket, so the root path isn't that big. Do you have any clue on what to do ? thanks in advance Joseph/ZedroS - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] html wicket:id=html CSS]
On 6/24/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi juergen, yes, this a valid comment. The html component is causing the problem. The header contribution code has obviously been designed in a way that it expects to be the very first contribution to the pages output markup. With the html component it no longer is, since the html tag must be rendered first and than, sometimes later, the head section. i understand. so, wouldn't it be the easiest way to change the behavior of the HeaderContributors to automatically do a getBodyContainer().add( new HeaderContributor.forCSS() )? this would be a possible solution for adding header contributions to WebPages only. But I'm not in favor of such magic. The exceptions to a rule you have the more difficult it gets to understand a product and even worse, the more effort you have to spend to explain it and to maintain the code. this could be tricky since the HeaderContributors are static as far as i've seen. Though the most obvious approach doesn't right now, it is not a show stopper for you, since you can add the HeaderContributor to any other component of your page (except the page) and it'll work, correct? not quite, my main problem isn't right now that my css don't get added to the header, but the css for wicket-components like org.apache.wicket.markup.html.tree.LinkTree I've reverted the change to WebPage, so it should work. And I think a found the reason why HtmlHeaderContainer didn't work as expected. I changed that too, all junit tests are still fine. I'll committ it in a minute. Juergen best regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] html wicket:id=html CSS]
hi juergen, I've reverted the change to WebPage, so it should work. And I think a found the reason why HtmlHeaderContainer didn't work as expected. I changed that too, all junit tests are still fine. I'll committ it in a minute. yep, great job! seems to work fine now - thanks! :-) you've deserved a relaxed sunday now! ;-) best regards, --- jan. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] File too long under Vista when extraction Wicket 1.3
ZedroS Schwart wrote: Hi all I'm using my brand new vista pc to extract Wicket and I've 8 files too long to be extracted, like for example AdminAnnotationsBookmarkablePage. I'm trying to extract them under d:\wicket, so the root path isn't that big. Do you have any clue on what to do ? Sure.. may not be the answer you want to hear though ;) sarcasm action=try-another-os http://www.ubuntu.com/ http://www.freebsd.org/ http://www.opensolaris.org/os/ /sarcams In truth I don't know and more likely it's a problem with Vista.. NTFS which to the best of my knowledge is what Vista's default fs is supports greater than 8.3 naming.. d:\ wouldn't happen to be like fat-8 or something like that would it? Beyond this you can try explaining in more detail what you're doing and maybe someone else can offer assistance. ./C - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
You can create the DOM element using custom javascript (it's very simple, basic DOM manipulation) invoked from ajaxRequestTarget.prependJavascript(). Be sure that the id attribute of new DOM element is same as new list item id. Then just render the newly created item (target.addComponent) which you create manually during the ajax request. Actually, rather then using ListView for this, I suggest you using RefreshingView, as it's more flexible. -Matej On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: Hi, I'm trying to create a kind of expression builder UI, so I was thinking of a ListView and there is this add button on the page that will add an item to the List. I am able to do this over Ajax, and I am aware that to refresh a ListView over Ajax, you have to target a container of the ListView and all this is working fine. But this means that in the Ajax response, the HTML for the entire list is retrieved from the server. Since the list may get big and the content is complex, is it possible to only get the last ListItem and do a DOM append operation over Ajax? Does Wicket's built in Ajax support this. Any ideas would be appreciated. Thanks, Peter. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] cannot add CSS to web page?
But add(HeaderContributor.forCss()) does not modify component tag. It affects header contribution. Header contribution and component tag modifications are two different things. page.add(HeaderContributor.forCss()) works as long as we don't have that check that throws exception when you add behavior to page. -Matej On 6/24/07, Juergen Donnerstag [EMAIL PROTECTED] wrote: Jan - in the other thread - quite rightly pointed out that HeaderContribution does work on pages. It only does not work if a component is attached to html. What makes html different is that it must partially be rendered befor the head section. Why exactly a component starts rendering before the head tag causes the problem I don't know yet. Juergen On 6/24/07, Juergen Donnerstag [EMAIL PROTECTED] wrote: All behaviors are invoked from Component.onComponentTag(). When a web page renders it does not call onComponentTag() for the page, as the page as no associated markup tag. That means, though you can do add(HeaderContributor.forCss()) (assume you are adding to a page) nothing will happen. The CSS will not be added to the head section and you will not get any warning etc.. Instead you may use any other component on your page. I agree that throwing an exception is not the preferred solution, but at least it give users a hint that they are doing something that currently doesn't work. I thought this is better than nothing while we could discuss a much better solution for the problem. Using html: - means we need to create yet another auto-component (automatically assign a wicket:id; automatically create an associated WebMarkupContainer - which will need some special behavior to be invisible/transparent for users - and of course at runtime you need to execute it. We already had discusions on how to reduce the number of auto components. - do we need to change all relevant WebPage methods to refer to that component? Or only for adding behaviors (e.g. getHtmlComponent().add(behavior). By sometime referring to that that html component and sometimes not, are we not creating yet another inconsistency (or magic). I was thinking of using the body component which already is automatically created. BUT it only make sense for HeaderContributors. html make more sense for AMs which realy modify an attribute (e.g. lang). I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. I agree but would be a suitable technical solution: E.g. keep throwing an exception for IBhavior and implement public void WebPage.add(HeaderContributor contrib) { getBodyContainer().add(contrib) } lets discuss the pros and cons of all alternatives in order to find the best solution for Wicket and all its users. Juergen On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: Arrgh. Discard my previous reply. This is wrong. Why shouldn't I be able to do header contribution on behavior attached to a page? This doesn't make sense! I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. -Matej On 6/24/07, Jonathan Locke [EMAIL PROTECTED] wrote: my code which does this: add(HeaderContributor.forCss(CSS)); now throws the following exception. my web page needs to contribute CSS to the header. i'm wondering, why can't i do it this way anymore (it seems like WebPage is a component like any other and my code did work fine before this exception)? and what's the best alternative? thanks! Caused by: org.apache.wicket.WicketRuntimeException: You can not attach behaviors onto WebPages. Web pages do require a markup file but no specific tag to attach the page to. This is why behaviors such as HeaderContributor for example don't work if attached to a WebPage. Please attach the behavior to any other of your components. -- View this message in context: http://www.nabble.com/cannot-add-CSS-to-web-page--tf3970619.html#a11270671 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to
Re: [Wicket-user] File too long under Vista when extraction Wicket 1.3
I'm planning to install ubuntu as well, but on a RAID + Wifi pc it's not that easy. For I'm trying to do, it's really simple : I've downloaded apache-wicket-1.3.0-incubating-beta1.zip and I just would like to unzip it. And then, after a long while but that's the Vista way isnit, I'm told that 8 files' names are too long to be extracted. When looking at one the files, AdminAnnotationsBookmarkablePage for example, it appears that this file is really deep in the repository architecture and, most probably, ends up behind a too long path name for Vista. I agree it's vista fault somewhere, but hey, more and more people are coming into it (or should at least) and it's quite a pain some wicket's files names are too long no ? Cheers, ZedroS On 6/24/07, C. Bergström [EMAIL PROTECTED] wrote: ZedroS Schwart wrote: Hi all I'm using my brand new vista pc to extract Wicket and I've 8 files too long to be extracted, like for example AdminAnnotationsBookmarkablePage. I'm trying to extract them under d:\wicket, so the root path isn't that big. Do you have any clue on what to do ? Sure.. may not be the answer you want to hear though ;) sarcasm action=try-another-os http://www.ubuntu.com/ http://www.freebsd.org/ http://www.opensolaris.org/os/ /sarcams In truth I don't know and more likely it's a problem with Vista.. NTFS which to the best of my knowledge is what Vista's default fs is supports greater than 8.3 naming.. d:\ wouldn't happen to be like fat-8 or something like that would it? Beyond this you can try explaining in more detail what you're doing and maybe someone else can offer assistance. ./C - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] cannot add CSS to web page?
please see the other thread Juergen On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: But add(HeaderContributor.forCss()) does not modify component tag. It affects header contribution. Header contribution and component tag modifications are two different things. page.add(HeaderContributor.forCss()) works as long as we don't have that check that throws exception when you add behavior to page. -Matej On 6/24/07, Juergen Donnerstag [EMAIL PROTECTED] wrote: Jan - in the other thread - quite rightly pointed out that HeaderContribution does work on pages. It only does not work if a component is attached to html. What makes html different is that it must partially be rendered befor the head section. Why exactly a component starts rendering before the head tag causes the problem I don't know yet. Juergen On 6/24/07, Juergen Donnerstag [EMAIL PROTECTED] wrote: All behaviors are invoked from Component.onComponentTag(). When a web page renders it does not call onComponentTag() for the page, as the page as no associated markup tag. That means, though you can do add(HeaderContributor.forCss()) (assume you are adding to a page) nothing will happen. The CSS will not be added to the head section and you will not get any warning etc.. Instead you may use any other component on your page. I agree that throwing an exception is not the preferred solution, but at least it give users a hint that they are doing something that currently doesn't work. I thought this is better than nothing while we could discuss a much better solution for the problem. Using html: - means we need to create yet another auto-component (automatically assign a wicket:id; automatically create an associated WebMarkupContainer - which will need some special behavior to be invisible/transparent for users - and of course at runtime you need to execute it. We already had discusions on how to reduce the number of auto components. - do we need to change all relevant WebPage methods to refer to that component? Or only for adding behaviors (e.g. getHtmlComponent().add(behavior). By sometime referring to that that html component and sometimes not, are we not creating yet another inconsistency (or magic). I was thinking of using the body component which already is automatically created. BUT it only make sense for HeaderContributors. html make more sense for AMs which realy modify an attribute (e.g. lang). I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. I agree but would be a suitable technical solution: E.g. keep throwing an exception for IBhavior and implement public void WebPage.add(HeaderContributor contrib) { getBodyContainer().add(contrib) } lets discuss the pros and cons of all alternatives in order to find the best solution for Wicket and all its users. Juergen On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: Arrgh. Discard my previous reply. This is wrong. Why shouldn't I be able to do header contribution on behavior attached to a page? This doesn't make sense! I know onComponentTag doesn't make sense, but that's IMHO not valid reason to forbid header contribution as well. -Matej On 6/24/07, Jonathan Locke [EMAIL PROTECTED] wrote: my code which does this: add(HeaderContributor.forCss(CSS)); now throws the following exception. my web page needs to contribute CSS to the header. i'm wondering, why can't i do it this way anymore (it seems like WebPage is a component like any other and my code did work fine before this exception)? and what's the best alternative? thanks! Caused by: org.apache.wicket.WicketRuntimeException: You can not attach behaviors onto WebPages. Web pages do require a markup file but no specific tag to attach the page to. This is why behaviors such as HeaderContributor for example don't work if attached to a WebPage. Please attach the behavior to any other of your components. -- View this message in context: http://www.nabble.com/cannot-add-CSS-to-web-page--tf3970619.html#a11270671 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] File too long under Vista when extraction Wicket 1.3
Have you tried other zip tools? Like 7-zip? www.7-zip.org Frank On 6/24/07, ZedroS Schwart [EMAIL PROTECTED] wrote: I'm planning to install ubuntu as well, but on a RAID + Wifi pc it's not that easy. For I'm trying to do, it's really simple : I've downloaded apache-wicket-1.3.0-incubating-beta1.zip and I just would like to unzip it. And then, after a long while but that's the Vista way isnit, I'm told that 8 files' names are too long to be extracted. When looking at one the files, AdminAnnotationsBookmarkablePage for example, it appears that this file is really deep in the repository architecture and, most probably, ends up behind a too long path name for Vista. I agree it's vista fault somewhere, but hey, more and more people are coming into it (or should at least) and it's quite a pain some wicket's files names are too long no ? Cheers, ZedroS On 6/24/07, C. Bergström [EMAIL PROTECTED] wrote: ZedroS Schwart wrote: Hi all I'm using my brand new vista pc to extract Wicket and I've 8 files too long to be extracted, like for example AdminAnnotationsBookmarkablePage. I'm trying to extract them under d:\wicket, so the root path isn't that big. Do you have any clue on what to do ? Sure.. may not be the answer you want to hear though ;) sarcasm action=try-another-os http://www.ubuntu.com/ http://www.freebsd.org/ http://www.opensolaris.org/os/ /sarcams In truth I don't know and more likely it's a problem with Vista.. NTFS which to the best of my knowledge is what Vista's default fs is supports greater than 8.3 naming.. d:\ wouldn't happen to be like fat-8 or something like that would it? Beyond this you can try explaining in more detail what you're doing and maybe someone else can offer assistance. ./C - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] File too long under Vista when extraction Wicket 1.3
ZedroS Schwart wrote: On 6/24/07, C. Bergström [EMAIL PROTECTED] wrote: ZedroS Schwart wrote: Hi all I'm using my brand new vista pc to extract Wicket and I've 8 files too long to be extracted, like for example AdminAnnotationsBookmarkablePage. I'm trying to extract them under d:\wicket, so the root path isn't that big. Do you have any clue on what to do ? Sure.. may not be the answer you want to hear though ;) sarcasm action=try-another-os http://www.ubuntu.com/ http://www.freebsd.org/ http://www.opensolaris.org/os/ /sarcams In truth I don't know and more likely it's a problem with Vista.. NTFS which to the best of my knowledge is what Vista's default fs is supports greater than 8.3 naming.. d:\ wouldn't happen to be like fat-8 or something like that would it? Beyond this you can try explaining in more detail what you're doing and maybe someone else can offer assistance. I'm planning to install ubuntu as well, but on a RAID + Wifi pc it's not that easy. Depends on your experience level, but someone new may have a difficult time. I'm not an Ubuntu user, but my preception is they take away a lot of the command line which can be difficult for MS refugees. For I'm trying to do, it's really simple : I've downloaded apache-wicket-1.3.0-incubating-beta1.zip and I just would like to unzip it. And then, after a long while but that's the Vista way isnit, I'm told that 8 files' names are too long to be extracted. When looking at one the files, AdminAnnotationsBookmarkablePage for example, it appears that this file is really deep in the repository architecture and, most probably, ends up behind a too long path name for Vista. I agree it's vista fault somewhere, but hey, more and more people are coming into it (or should at least) and it's quite a pain some wicket's files names are too long no ? Vista or other 3rd party bugs should land squarely on the shoulders of the vendor and *not* at all the on developers. Especially since there are fine alternative choices. I'll try not to rant too much.. Also please inline or bottom-post and trim your replies. It makes threads a lot easier to read for everyone. I have noticed a few senior people around here starting and if you're reading this VERY big thank you. Kindly, C. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] File too long under Vista when extraction Wicket 1.3
NTFS has a 255 character limit on the full path + filename. However the longest path in the 1.3 zip is under 200 characters long so when you extract to the root of a drive you shouldn't run into any problems, at least I didn't when extracting under XP. Check if the full path of the files you have problems with exceed the 255 limit. ZedroS Schwart wrote: I'm planning to install ubuntu as well, but on a RAID + Wifi pc it's not that easy. For I'm trying to do, it's really simple : I've downloaded apache-wicket-1.3.0-incubating-beta1.zip and I just would like to unzip it. And then, after a long while but that's the Vista way isnit, I'm told that 8 files' names are too long to be extracted. When looking at one the files, AdminAnnotationsBookmarkablePage for example, it appears that this file is really deep in the repository architecture and, most probably, ends up behind a too long path name for Vista. I agree it's vista fault somewhere, but hey, more and more people are coming into it (or should at least) and it's quite a pain some wicket's files names are too long no ? Cheers, ZedroS On 6/24/07, C. Bergström [EMAIL PROTECTED] wrote: ZedroS Schwart wrote: Hi all I'm using my brand new vista pc to extract Wicket and I've 8 files too long to be extracted, like for example AdminAnnotationsBookmarkablePage. I'm trying to extract them under d:\wicket, so the root path isn't that big. Do you have any clue on what to do ? Sure.. may not be the answer you want to hear though ;) sarcasm action=try-another-os http://www.ubuntu.com/ http://www.freebsd.org/ http://www.opensolaris.org/os/ /sarcams In truth I don't know and more likely it's a problem with Vista.. NTFS which to the best of my knowledge is what Vista's default fs is supports greater than 8.3 naming.. d:\ wouldn't happen to be like fat-8 or something like that would it? Beyond this you can try explaining in more detail what you're doing and maybe someone else can offer assistance. ./C - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
On Sun, 24 Jun 2007, Peter Thomas wrote: I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! Are you sure it's going to be a problem to update the whole Repeater? Because if not, your whole work of dynamic DOM appending might turn out to be premature optimisation. Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId() or something such. (Btw, now that we're on it, all-numeric ids that repeaters produce by default are invalid HTML. Maybe I should file a Jira issue about that.) - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: You can create the DOM element using custom javascript (it's very simple, basic DOM manipulation) invoked from ajaxRequestTarget.prependJavascript(). Be sure that the id attribute of new DOM element is same as new list item id. Then just render the newly created item (target.addComponent) which you create manually during the ajax request. Actually, rather then using ListView for this, I suggest you using RefreshingView, as it's more flexible. -Matej Thanks Matej, I'm trying with RefreshingView as you recommend. I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: Hi, I'm trying to create a kind of expression builder UI, so I was thinking of a ListView and there is this add button on the page that will add an item to the List. I am able to do this over Ajax, and I am aware that to refresh a ListView over Ajax, you have to target a container of the ListView and all this is working fine. But this means that in the Ajax response, the HTML for the entire list is retrieved from the server. Since the list may get big and the content is complex, is it possible to only get the last ListItem and do a DOM append operation over Ajax? Does Wicket's built in Ajax support this. Any ideas would be appreciated. Thanks, Peter. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
On Sun, 24 Jun 2007, Timo Rantalaiho wrote: Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId() or something myId- + domainObject.getId() surely. - Timmo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
On 6/24/07, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Sun, 24 Jun 2007, Peter Thomas wrote: I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! Are you sure it's going to be a problem to update the whole Repeater? Because if not, your whole work of dynamic DOM appending might turn out to be premature optimisation. Agreed, I'm now curious to see how far I can get, and I may not actually use a javascript heavy approach in the end. Also I've created a decent size app using only ListView (including a custom datatable with pagination) and am curious to know what the other repeaters (e.g. RefreshingView) have to offer. Also searching Nabble I see that someone else had some success, not sure if this is the same approach: http://www.nabble.com/treetable-with-table-markup-tf3557655.html#a9974461 Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId() or something such. (Btw, now that we're on it, all-numeric ids that repeaters produce by default are invalid HTML. Maybe I should file a Jira issue about that.) - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions
2007/6/23, Robert . [EMAIL PROTECTED]: this is better because if you use applications to hold non-proxied daos you have to be very careful not to leave a reference to it anywhere. because dependencies injected throgh @SpringBean are special proxies you dont have to worry about it because the proxies can be safely serialized. I do understand that. But isn't it very easy to avoid it? For example the PersonClass would be something like this: class PersonModel extends LoadableDetachableModel { private final long id; public PersonModel(long id) { this.id=id; } private PersonDao getDao() { return MyApplication.get().getPersonDao(); ... } With this getter there is no temptation to save the DAO as a field. With the above approach you have a dependency from your model to your Application class. Not everybody wants this. If it works for you, go ahead :-) AFAIK there is not a fatal problem with this. The pros and cons of both approaches are discussed in the wiki as well: http://cwiki.apache.org/WICKET/spring.html -- greetings from Berlin, Rüdiger Schulz www.2rue.de - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
There's nothing javascript heavy on this :) You add new item like this: String id = rv.newChildId(); Item item = rv.newItem(id, index, model); rv.populateItem(item); rv.add(item); (where rv is the refreshing view. Some of the methods might be protected, so you will need to subclass the view, but you have to do it anyway, as you need to implement populateItem); after you call rv.add(item) you can call item.getMarkupId(); Creating DOM in javascript is simple: var div = document.createElement(div); refreshingViewContiner.appendChild(div); div.id = id -Matej On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Sun, 24 Jun 2007, Peter Thomas wrote: I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! Are you sure it's going to be a problem to update the whole Repeater? Because if not, your whole work of dynamic DOM appending might turn out to be premature optimisation. Agreed, I'm now curious to see how far I can get, and I may not actually use a javascript heavy approach in the end. Also I've created a decent size app using only ListView (including a custom datatable with pagination) and am curious to know what the other repeaters ( e.g. RefreshingView) have to offer. Also searching Nabble I see that someone else had some success, not sure if this is the same approach: http://www.nabble.com/treetable-with-table-markup-tf3557655.html#a9974461 Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId() or something such. (Btw, now that we're on it, all-numeric ids that repeaters produce by default are invalid HTML. Maybe I should file a Jira issue about that.) - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions
And if you have about 100 DAO's, then your application class will get bloated. Martijn -- BREAKING NEWS: Wicket joins the Apache Software Foundation as Apache Wicket Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: There's nothing javascript heavy on this :) You add new item like this: String id = rv.newChildId(); Item item = rv.newItem(id, index, model); rv.populateItem(item); rv.add(item); (where rv is the refreshing view. Some of the methods might be protected, so you will need to subclass the view, but you have to do it anyway, as you need to implement populateItem); after you call rv.add(item) you can call item.getMarkupId(); Creating DOM in javascript is simple: var div = document.createElement(div); refreshingViewContiner.appendChild(div); div.id = id -Matej Just as I was thinking Wicket was not so perfect for Ajax... It works! Thanks Matej :) I really did need that guidance on constructing and adding new item to RefreshingView. And of course now I get why ListView would not have worked. On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Sun, 24 Jun 2007, Peter Thomas wrote: I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! Are you sure it's going to be a problem to update the whole Repeater? Because if not, your whole work of dynamic DOM appending might turn out to be premature optimisation. Agreed, I'm now curious to see how far I can get, and I may not actually use a javascript heavy approach in the end. Also I've created a decent size app using only ListView (including a custom datatable with pagination) and am curious to know what the other repeaters ( e.g. RefreshingView) have to offer. Also searching Nabble I see that someone else had some success, not sure if this is the same approach: http://www.nabble.com/treetable-with-table-markup-tf3557655.html#a9974461 Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId() or something such. (Btw, now that we're on it, all-numeric ids that repeaters produce by default are invalid HTML. Maybe I should file a Jira issue about that.) - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
As far as I know id is a property of DOMElement, so there should be no need to call setAttribute. -Matej On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: There's nothing javascript heavy on this :) You add new item like this: String id = rv.newChildId(); Item item = rv.newItem(id, index, model); rv.populateItem(item); rv.add(item); (where rv is the refreshing view. Some of the methods might be protected, so you will need to subclass the view, but you have to do it anyway, as you need to implement populateItem); after you call rv.add(item) you can call item.getMarkupId(); Creating DOM in javascript is simple: var div = document.createElement(div); refreshingViewContiner.appendChild(div); div.id = id One more thing Matej - last line above you meant div.setAttribute('id', id) right? Or is there some js foo I should know about? -Matej Just as I was thinking Wicket was not so perfect for Ajax... It works! Thanks Matej :) I really did need that guidance on constructing and adding new item to RefreshingView. And of course now I get why ListView would not have worked. On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Sun, 24 Jun 2007, Peter Thomas wrote: I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! Are you sure it's going to be a problem to update the whole Repeater? Because if not, your whole work of dynamic DOM appending might turn out to be premature optimisation. Agreed, I'm now curious to see how far I can get, and I may not actually use a javascript heavy approach in the end. Also I've created a decent size app using only ListView (including a custom datatable with pagination) and am curious to know what the other repeaters ( e.g. RefreshingView) have to offer. Also searching Nabble I see that someone else had some success, not sure if this is the same approach: http://www.nabble.com/treetable-with-table-markup-tf3557655.html#a9974461 Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId () or something such. (Btw, now that we're on it, all-numeric ids that repeaters produce by default are invalid HTML. Maybe I should file a Jira issue about that.) - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email
Re: [Wicket-user] Adding item to ListView over Ajax - refresh only newest row
On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: There's nothing javascript heavy on this :) You add new item like this: String id = rv.newChildId(); Item item = rv.newItem(id, index, model); rv.populateItem(item); rv.add(item); (where rv is the refreshing view. Some of the methods might be protected, so you will need to subclass the view, but you have to do it anyway, as you need to implement populateItem); after you call rv.add(item) you can call item.getMarkupId(); Creating DOM in javascript is simple: var div = document.createElement(div); refreshingViewContiner.appendChild(div); div.id = id One more thing Matej - last line above you meant div.setAttribute('id', id) right? Or is there some js foo I should know about? -Matej Just as I was thinking Wicket was not so perfect for Ajax... It works! Thanks Matej :) I really did need that guidance on constructing and adding new item to RefreshingView. And of course now I get why ListView would not have worked. On 6/24/07, Peter Thomas [EMAIL PROTECTED] wrote: On 6/24/07, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Sun, 24 Jun 2007, Peter Thomas wrote: I haven't used repeaters that much, but would newItem() be the right way to create a new Item? Anyway, I am now stuck because to ensure that the id of the DOM element is same as the newly created item, I have to call getMarkupId() on the item then I get the exception This component is not (yet) coupled to a page Help! Are you sure it's going to be a problem to update the whole Repeater? Because if not, your whole work of dynamic DOM appending might turn out to be premature optimisation. Agreed, I'm now curious to see how far I can get, and I may not actually use a javascript heavy approach in the end. Also I've created a decent size app using only ListView (including a custom datatable with pagination) and am curious to know what the other repeaters ( e.g. RefreshingView) have to offer. Also searching Nabble I see that someone else had some success, not sure if this is the same approach: http://www.nabble.com/treetable-with-table-markup-tf3557655.html#a9974461 Maybe you can override getMarkupId() for your item components to return e.g. myId + domainObject.getdId () or something such. (Btw, now that we're on it, all-numeric ids that repeaters produce by default are invalid HTML. Maybe I should file a Jira issue about that.) - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to get HTML source code from a wicket page
OK, so WicketTester is the way to go. JBQ's response implied that there was a more direct way to do it, but I'll give WicketTester a try. Thanks, jk On Sat, Jun 23, 2007 at 08:05:58PM -0700, Igor Vaynberg wrote: see our tests. all the mock setup is done for you. our tests simply call a few methods and get a page rendered into a string that is then compared to another file. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to get HTML source code from a wicket page
* John Krasnay: OK, so WicketTester is the way to go. JBQ's response implied that there was a more direct way to do it, but I'll give WicketTester a try. Yes there is a more direct way. I'm sorry I made an error, I meant StringResponse, not StringRequestTarget. I spent a few minutes writing the example, as this is a recurring question, here it is: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/staticpages/Application.java?revision=550248view=markup Look at the very bottom, where I'm using a custom BookmarkablePageRequestTarget: new BookmarkablePageRequestTarget(Page.class, params) { /** * @see org.apache.wicket.request.target.component.BookmarkablePageRequestTarget#respond(org.apache.wicket.RequestCycle) */ @Override public void respond(RequestCycle requestCycle) { if (requestParams.getString(email) != null) { final StringResponse emailResponse = new StringResponse(); final WebResponse originalResponse = (WebResponse)RequestCycle.get().getResponse(); RequestCycle.get().setResponse(emailResponse); super.respond(requestCycle); // Here send the email instead of dumping it to stdout! System.out.println(emailResponse.toString()); RequestCycle.get().setResponse(originalResponse); RequestCycle.get().setRequestTarget(new BookmarkablePageRequestTarget(Sent.class)); } else { super.respond(requestCycle); } } }; The example can be found in latest wicket examples in the staticpages demo. -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] File too long under Vista when extraction Wicket 1.3
On 6/24/07, ZedroS Schwart [EMAIL PROTECTED] wrote: I'm planning to install ubuntu as well, but on a RAID + Wifi pc it's not that easy. (sidenote: Wifi should not be a problem with Ubuntu. The install CD is a live CD as well, so you can verify device support without side effects) For I'm trying to do, it's really simple : I've downloaded apache-wicket-1.3.0-incubating-beta1.zip and I just would like to unzip it. There has been mention of alternative unzip utilities in the thread already, let me just draw your attention to another bag of tricks: cygwin. The command line unzip utility is likely to at least give you a more specific error message. Gabor Szokoli - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Updating link attributes from HeaderContributor
On 6/23/07, Tauren Mills [EMAIL PROTECTED] wrote: I am creating an application that utilizes alternate stylesheets. A javascript library also needs each stylesheet to have a title. The output format should be something like this: link rel=alternate stylesheet type=text/css href=large.css title=large / Using HeaderContributor, I can get this output: link href=/db/app/resources/mypackage.MyPanel/large.css type=text/css rel=stylesheet Note that I need to add alternate to the rel attribute and add a title attribute to the HeaderContributor output. I was hoping to alter this link tag using an AttributeModifier, but there doesn't seem to be a way to do this since HeaderContributor is not a Component. Here is code: private static final CompressedResourceReference CSS_LARGE = new CompressedResourceReference(MyPanel.class, large.css); public MyPanel(String id) { super(id); HeaderContributor large = HeaderContributor.forCss(SS_CSS_LARGE); } I thought I could create my own version of HeaderContributor.CSSReferenceHeaderContributor, but I can't override forCss(ResourceReference) because it is final. Is there some other way to alter a tag? Otherwise, how would I accomplish this? Thanks, Tauren tbh, these reqs sound a little too exotic to be supported by the core framework. that said, it is trivial to create your own css contributor. class mycontributor extends abstractbehavior implements iheadercontributor { private ResourceReference ref; private String title; public mycontributor(ref,title) {...} renderHead(final IHeaderResponse response) { response.renderString(style all your attributes href=\+requestcycle.get().urlfor(ref)+\/); } } done - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Wicket-User] Spring+Hibernate questions
Thanks for your replies everyone. I think I can make an informed decision now about what to do in each case. I like the flexibility of the @SpringBean and the simplicity of the application object, probably with seperate objects holding the DAOs and services, so not to bloat the application object. I think I will investigate more open the OpenSessionInView to see what EXACTLY that thing is doing. Perhaps I will ask more about that later. The pros and cons of both approaches are discussed in the wiki as well: http://cwiki.apache.org/WICKET/spring.html Yes I read this before posting. I think it would be more clear if it's mentioned that the InjectorHolder.getInjector().inject(this); can be used in any of your classes, such as models, and not just components. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Updating link attributes from HeaderContributor
Igor, Thanks for the solution! I'll go that route for now. However, I'm not convinced that supporting alternate stylesheets is outside the scope of wicket core. Mozilla browsers support switching to alternate stylesheets from a menu option: http://www.w3.org/Style/Examples/007/alternatives.html That alone is probably not a good enough incentive to include it in core. But my use case is to improve accessibility. The site I'm making is for senior citizens, so I'm providing them with a way to easily scale the size of the font displayed on the site by clicking font size icons on the page. This technique is explained here: http://alistapart.com/stories/alternate/ This solution uses javascript to activate and deactivate the alternate stylesheets. I prefer to utilize javascript for quick stylesheet changes rather than a round-trip to the server. I realize I could accomplish the same thing with server round-trips and not need any custom HeaderContributor. Lastly, it is possible to group stylesheets together and activate or deactivate them all at once if they have the same title. Adding that attribute would make it more robust. Regardless, as you have shown, it isn't hard to implement my own IHeaderContributor. I just wasn't sure how to go about it, and now I am. So perhaps you are right in that it is best left out of core. Thanks again! Tauren On 6/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 6/23/07, Tauren Mills [EMAIL PROTECTED] wrote: I am creating an application that utilizes alternate stylesheets. A javascript library also needs each stylesheet to have a title. The output format should be something like this: link rel=alternate stylesheet type=text/css href= large.css title=large / Using HeaderContributor, I can get this output: link href=/db/app/resources/mypackage.MyPanel/large.css type=text/css rel=stylesheet Note that I need to add alternate to the rel attribute and add a title attribute to the HeaderContributor output. I was hoping to alter this link tag using an AttributeModifier, but there doesn't seem to be a way to do this since HeaderContributor is not a Component. Here is code: private static final CompressedResourceReference CSS_LARGE = new CompressedResourceReference( MyPanel.class, large.css); public MyPanel(String id) { super(id); HeaderContributor large = HeaderContributor.forCss(SS_CSS_LARGE); } I thought I could create my own version of HeaderContributor.CSSReferenceHeaderContributor, but I can't override forCss(ResourceReference) because it is final. Is there some other way to alter a tag? Otherwise, how would I accomplish this? Thanks, Tauren tbh, these reqs sound a little too exotic to be supported by the core framework. that said, it is trivial to create your own css contributor. class mycontributor extends abstractbehavior implements iheadercontributor { private ResourceReference ref; private String title; public mycontributor(ref,title) {...} renderHead(final IHeaderResponse response) { response.renderString(style all your attributes href=\+requestcycle.get().urlfor(ref)+\/); } } done - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Updating link attributes from HeaderContributor
On 6/24/07, Tauren Mills [EMAIL PROTECTED] wrote: Igor, Thanks for the solution! I'll go that route for now. However, I'm not convinced that supporting alternate stylesheets is outside the scope of wicket core. Mozilla browsers support switching to alternate stylesheets from a menu option: http://www.w3.org/Style/Examples/007/alternatives.html That alone is probably not a good enough incentive to include it in core. But my use case is to improve accessibility. The site I'm making is for senior citizens, so I'm providing them with a way to easily scale the size of the font displayed on the site by clicking font size icons on the page. This technique is explained here: http://alistapart.com/stories/alternate/ This solution uses javascript to activate and deactivate the alternate stylesheets. I prefer to utilize javascript for quick stylesheet changes rather than a round-trip to the server. I realize I could accomplish the same thing with server round-trips and not need any custom HeaderContributor. Lastly, it is possible to group stylesheets together and activate or deactivate them all at once if they have the same title. Adding that attribute would make it more robust. Regardless, as you have shown, it isn't hard to implement my own IHeaderContributor. I just wasn't sure how to go about it, and now I am. So perhaps you are right in that it is best left out of core. Thanks again! Tauren i didnt say your usecase was in any way flawed. all i meant is that it is a very rare case that people use the title attribute of the link tag. so if we build in support for it that means most of these contributors will have an empty field which will incur a memory penalty unless we roll a different subclass for that particular contributor altogether. it is pretty easy to write a custom one like ive showed, so i just dont know if we should bother supporting it in core. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Updating link attributes from HeaderContributor
On 6/24/07, Tauren Mills [EMAIL PROTECTED] wrote: Igor, Thanks for the solution! I'll go that route for now. However, I'm not convinced that supporting alternate stylesheets is outside the scope of wicket core. Mozilla browsers support switching to alternate stylesheets from a menu option: http://www.w3.org/Style/Examples/007/alternatives.html That alone is probably not a good enough incentive to include it in core. But my use case is to improve accessibility. The site I'm making is for senior citizens, so I'm providing them with a way to easily scale the size of the font displayed on the site by clicking font size icons on the page. This technique is explained here: http://alistapart.com/stories/alternate/ This solution uses javascript to activate and deactivate the alternate stylesheets. I prefer to utilize javascript for quick stylesheet changes rather than a round-trip to the server. I realize I could accomplish the same thing with server round-trips and not need any custom HeaderContributor. Lastly, it is possible to group stylesheets together and activate or deactivate them all at once if they have the same title. Adding that attribute would make it more robust. Regardless, as you have shown, it isn't hard to implement my own IHeaderContributor. I just wasn't sure how to go about it, and now I am. So perhaps you are right in that it is best left out of core. Thanks again! Tauren in fact, take it a bit further: StylesheetSwitcher switcher=new StylesheetSwitcher(); switcher.addStylesheet(small, new ResourceReference... switcher.addStylesheet(medium, new ResourceReference... switcher.addStylesheet(large, new ResourceReference... add(switcher); add(new SwitchStylesheetLink(link, switcher, small)); add(new IncreateStylesheetLink(plus, switcher); you can encapsulate all this stuff including javascript, etc, in an encapsulated header contributor and make it totally transparent and reusable across projects. then after you get it working feel free to contribute it to wicketstuff-minis :) -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Updating link attributes from HeaderContributor
OK, that makes more sense then. I wasn't considering the memory issue. And I already have things just about ready to go as a self contained component. My plan was to contribute it to wicket-stuff. I'll get the custom HeaderContributor finished, and then will do so. Thanks again for the help! Tauren On 6/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 6/24/07, Tauren Mills [EMAIL PROTECTED] wrote: Igor, Thanks for the solution! I'll go that route for now. However, I'm not convinced that supporting alternate stylesheets is outside the scope of wicket core. Mozilla browsers support switching to alternate stylesheets from a menu option: http://www.w3.org/Style/Examples/007/alternatives.html That alone is probably not a good enough incentive to include it in core. But my use case is to improve accessibility. The site I'm making is for senior citizens, so I'm providing them with a way to easily scale the size of the font displayed on the site by clicking font size icons on the page. This technique is explained here: http://alistapart.com/stories/alternate/ This solution uses javascript to activate and deactivate the alternate stylesheets. I prefer to utilize javascript for quick stylesheet changes rather than a round-trip to the server. I realize I could accomplish the same thing with server round-trips and not need any custom HeaderContributor. Lastly, it is possible to group stylesheets together and activate or deactivate them all at once if they have the same title. Adding that attribute would make it more robust. Regardless, as you have shown, it isn't hard to implement my own IHeaderContributor. I just wasn't sure how to go about it, and now I am. So perhaps you are right in that it is best left out of core. Thanks again! Tauren in fact, take it a bit further: StylesheetSwitcher switcher=new StylesheetSwitcher(); switcher.addStylesheet(small, new ResourceReference... switcher.addStylesheet(medium, new ResourceReference... switcher.addStylesheet (large, new ResourceReference... add(switcher); add(new SwitchStylesheetLink(link, switcher, small)); add(new IncreateStylesheetLink(plus, switcher); you can encapsulate all this stuff including javascript, etc, in an encapsulated header contributor and make it totally transparent and reusable across projects. then after you get it working feel free to contribute it to wicketstuff-minis :) -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] HibernateAnnotationComponentConfigurator
Hi, I noticed that you get the field like this: String fieldName = propertyModel.getPropertyExpression(); Class type = propertyModel.getTarget().getClass(); ... Field field = type.getDeclaredField(fieldName); ... That means that the lookup is done on every configuration. Also will this work for expression such as property1.property2.property3? Property and CompoundProperty models in wicket implement the IPropertyReflectionAwareModel interface which can be used to get the reflection information. I think you should use those instead. -Matej On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote: I don't want to sound like a databinder basher, but I want to make this solution very *non-invasive*. I don't want to have to implement specific interfaces or use specific components for this to work. My solution works with standard wicket components and property models. No need to change your whole application just to get UI validation. On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote: I've looked at databinder in the past, and although it may be useful, I think it's a bit heavyweight for what I'm trying to achieve. In my opinion, database access should be abstracted away from the UI layer altogether, which leaves the goals of databinder questionable. Does anyone remember the horror of the JSP tags that directly connected to datbases?? Spring integration is a much more desirable location for database access, and there is already excellent spring integration with wicket. My goal is simply to integrate hibernate into wicket for relevant UI features. Validation is an excellent example where wicket should simply re-use the same backend validation and display good user feedback instead of waiting for the hibernate validation fire and throwing a big fat stacktrace. On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote: Just sending out a quick release announcement for a new Hibernate/Wicket integration in the wicketstuff project. The HibernateAnnotationComponentConfigurator automatically configures a wicket component based on the POJO's Hibernate annotations. one especially cool feature is that you can register this behavior for your *entire* application, without worrying about adding this functionality to each page/component. Take a look and let me know what you think! http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator you should consider teaming up with databinder and working on this there. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Security comparison
All, I started a little comparison of Wicket security frameworks on the Wicket-Stuff wiki: http://wicketstuff.org/confluence/display/STUFFWIKI/Security+Framework+Comparison As the article states it is not about who's framework is better but about giving a summary of the facts. That being said, I welcome input from others about missing or incorrect information. Also if you would like to see another project up there you can let us know here. Maurice - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] HibernateAnnotationComponentConfigurator
Thanks for the advice Matej! The current implementation does *not* support OGNL type nested expressions. I even have a unit test for it right now. =) I'll gladly look into the IPropertyReflectionAwareModel interface to see if I can improve on this. I'm not too concerned about this lookup being done multiple times. It's only done once per component, and introducing some sort of cache seems like overhead for now. On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote: Hi, I noticed that you get the field like this: String fieldName = propertyModel.getPropertyExpression(); Class type = propertyModel.getTarget().getClass(); ... Field field = type.getDeclaredField(fieldName); ... That means that the lookup is done on every configuration. Also will this work for expression such as property1.property2.property3? Property and CompoundProperty models in wicket implement the IPropertyReflectionAwareModel interface which can be used to get the reflection information. I think you should use those instead. -Matej On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote: I don't want to sound like a databinder basher, but I want to make this solution very *non-invasive*. I don't want to have to implement specific interfaces or use specific components for this to work. My solution works with standard wicket components and property models. No need to change your whole application just to get UI validation. On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote: I've looked at databinder in the past, and although it may be useful, I think it's a bit heavyweight for what I'm trying to achieve. In my opinion, database access should be abstracted away from the UI layer altogether, which leaves the goals of databinder questionable. Does anyone remember the horror of the JSP tags that directly connected to datbases?? Spring integration is a much more desirable location for database access, and there is already excellent spring integration with wicket. My goal is simply to integrate hibernate into wicket for relevant UI features. Validation is an excellent example where wicket should simply re-use the same backend validation and display good user feedback instead of waiting for the hibernate validation fire and throwing a big fat stacktrace. On 6/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 6/23/07, Ryan Sonnek [EMAIL PROTECTED] wrote: Just sending out a quick release announcement for a new Hibernate/Wicket integration in the wicketstuff project. The HibernateAnnotationComponentConfigurator automatically configures a wicket component based on the POJO's Hibernate annotations. one especially cool feature is that you can register this behavior for your *entire* application, without worrying about adding this functionality to each page/component. Take a look and let me know what you think! http://jroller.com/page/wireframe?entry=hibernateannotationcomponentconfigurator you should consider teaming up with databinder and working on this there. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to get HTML source code from a wicket page
Ah, that makes more sense. Thanks for the clarification and example. jk On Sun, Jun 24, 2007 at 05:15:14PM +0200, Jean-Baptiste Quenot wrote: Yes there is a more direct way. I'm sorry I made an error, I meant StringResponse, not StringRequestTarget. I spent a few minutes writing the example, as this is a recurring question, here it is: - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] dynamic component generation with no placeholder in markup/html
Hi, I am currently evaluating using wicket on my next project. So far I am really impressed with wicket! Quick question- After using it for a few days, it seems there must always be items in the markup(html) for each associated component in a webpage java file. In some screens we have built in the past, due to the complexity, the widgets are database driven. That is to say, the number of select boxes, is driven off a db. It is more complicated than this, but basically in struts, we would use nested beans with a lot of nasty conditional logic so there would not need a static placeholder in the .html file. (jsp). Is this possible to do with wicket? Thanks James - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] dynamic component generation with no placeholder in markup/html
On 6/24/07, James Law [EMAIL PROTECTED] wrote: Hi, I am currently evaluating using wicket on my next project. So far I am really impressed with wicket! Quick question- After using it for a few days, it seems there must always be items in the markup(html) for each associated component in a webpage java file. In some screens we have built in the past, due to the complexity, the widgets are database driven. That is to say, the number of select boxes, is driven off a db. It is more complicated than this, but basically in struts, we would use nested beans with a lot of nasty conditional logic so there would not need a static placeholder in the .html file. (jsp). Is this possible to do with wicket? Thanks James sure. the basic idea is this add a RepeatingView that is bound to a generic div tag. then into this repeater add fragments/panel dynamically. so lets say your db lists: selecbox,label,selectbox you would have a fragment/panel that has a selectbox and one that has a label. then just do RepeatingView rv=new RepeatingView(rv); for (item:items) { WebMarkupContainer rvitem=new WebMarkupContainer(rv.newChildId()); rv.add(rvitem); switch (item.gettype()) { case seletbox: rvitem.add(new selectboxfragment(sb); break; case label: rvitem.add(new labelfragment(lbl)); }} fragments can contain other repeating views with other fragments. nest to your heart's content. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user