Re: E-commerce site built on Wicket
Looks pretty nice. Did you guys use any CMS (say wicket based like BRIX) .. or simply coded it straight up? - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/E-commerce-site-built-on-Wicket-tp3682832p3682897.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Forward to Bookmarkable
Hi; How can i forward user to a BookmarkablePage. I don't need redirection. I don't want user to see url. Thanks.
Re: Forward to Bookmarkable
I also tried WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get(); ServletRequest httpRequest = cycle.getWebRequest().getHttpServletRequest(); ServletResponse httpResponse = cycle.getWebResponse().getHttpServletResponse(); ServletContext context = ((WebApplication) Application.get()).getServletContext(); context.getRequestDispatcher(/mywelcome).forward(httpRequest, httpResponse); where mywelcome url is BookmarkablePage, in MyWebApplication.java this.mountBookmarkablePageWithUrlCoding(/mywelcome, Welcome.class); Thanks. From: Lurtz Nazgul lu...@ymail.com To: users@wicket.apache.org Sent: Thu, July 21, 2011 12:15:19 PM Subject: Forward to Bookmarkable Hi; How can i forward user to a BookmarkablePage. I don't need redirection. I don't want user to see url. Thanks.
Re: Forward to Bookmarkable
You can setResponePage or throw one of the RestartResponse*-Exceptions Regards Hans Am 21.07.11 11:19 schrieb Lurtz Nazgul unter lu...@ymail.com: I also tried WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get(); ServletRequest httpRequest = cycle.getWebRequest().getHttpServletRequest(); ServletResponse httpResponse = cycle.getWebResponse().getHttpServletResponse(); ServletContext context = ((WebApplication) Application.get()).getServletContext(); context.getRequestDispatcher(/mywelcome).forward(httpRequest, httpResponse); where mywelcome url is BookmarkablePage, in MyWebApplication.java this.mountBookmarkablePageWithUrlCoding(/mywelcome, Welcome.class); Thanks. From: Lurtz Nazgul lu...@ymail.com To: users@wicket.apache.org Sent: Thu, July 21, 2011 12:15:19 PM Subject: Forward to Bookmarkable Hi; How can i forward user to a BookmarkablePage. I don't need redirection. I don't want user to see url. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
Some can better elaborate on this, but I know for a fact that this - http://www.bodybuilding.com/fun/bbmaintrain.htm and http://blog.bodybuilding.com/ are both wicket. I doubt that there are any traces of wicket stuff on those pages thought. Our group in charge of the SuperSite (http://www.bodybuilding.com/fun/index.html) is in the process of finishing porting it to wicket, so if you go to that page or any page under /fun your very likely browsing wicket served pages. Dmitriy. On 07/20/2011 03:08 PM, richard emberson [via Apache Wicket] wrote: I looked at the Page source for about 10 pages and could not tell that they were generated using Wicket. Are there some telltale indicators that might indicate Wicket usage? Yea, inside knowledge is one indicator, but I mean some other indicator. Something about the HTML or such? Thanks Richard On 07/20/2011 12:57 PM, dryajov wrote: Well, bodybuilding.com is beginning to use wicket extensively, there are several parts of the website ported to wicket (store excluded) already and a major revamp is being worked on as we speak - all in wicket. That is by far the biggest site that uses wicket AFAIK. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=0 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=1 -- Quis custodiet ipsos custodes - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=2 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=3 If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682047.html To start a new topic under Apache Wicket, email ml-node+1842946-1101451549-253...@n4.nabble.com To unsubscribe from Apache Wicket, click here http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=ZHJ5YWpvdkBnbWFpbC5jb218MTg0Mjk0NnwxNTA1MjE0ODY0. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682181.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
Just for the statistics - Wicket 1.4 or 1.5 ? On Thu, Jul 21, 2011 at 1:09 AM, dryajov drya...@gmail.com wrote: Some can better elaborate on this, but I know for a fact that this - http://www.bodybuilding.com/fun/bbmaintrain.htm and http://blog.bodybuilding.com/ are both wicket. I doubt that there are any traces of wicket stuff on those pages thought. Our group in charge of the SuperSite (http://www.bodybuilding.com/fun/index.html) is in the process of finishing porting it to wicket, so if you go to that page or any page under /fun your very likely browsing wicket served pages. Dmitriy. On 07/20/2011 03:08 PM, richard emberson [via Apache Wicket] wrote: I looked at the Page source for about 10 pages and could not tell that they were generated using Wicket. Are there some telltale indicators that might indicate Wicket usage? Yea, inside knowledge is one indicator, but I mean some other indicator. Something about the HTML or such? Thanks Richard On 07/20/2011 12:57 PM, dryajov wrote: Well, bodybuilding.com is beginning to use wicket extensively, there are several parts of the website ported to wicket (store excluded) already and a major revamp is being worked on as we speak - all in wicket. That is by far the biggest site that uses wicket AFAIK. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3681916.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=0 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=1 -- Quis custodiet ipsos custodes - To unsubscribe, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=2 For additional commands, e-mail: [hidden email] /user/SendEmail.jtp?type=nodenode=3682047i=3 If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682047.html To start a new topic under Apache Wicket, email ml-node+1842946-1101451549-253...@n4.nabble.com To unsubscribe from Apache Wicket, click here http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1842946code=ZHJ5YWpvdkBnbWFpbC5jb218MTg0Mjk0NnwxNTA1MjE0ODY0. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3682181.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
http://www.endomondo.com uses Wicket with an estimated 1 million registered users. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3683342.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
You better add your sites to https://cwiki.apache.org/WICKET/websites-based-on-wicket.html so next time someone ask Who is using Wicket? to see these big sites. On Thu, Jul 21, 2011 at 1:37 PM, Marco ma...@mkconsultancy.nl wrote: http://www.endomondo.com uses Wicket with an estimated 1 million registered users. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3683342.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forward to Bookmarkable
Hi Hans; Thanks for your answer But still url can be seen by the user. I need to forward in order to hide the url from user. Any idea ? Thanks. From: Hans Lesmeister hans.lesmeis...@lessy-software.de To: Wicket Users users@wicket.apache.org Sent: Thu, July 21, 2011 12:35:21 PM Subject: Re: Forward to Bookmarkable You can setResponePage or throw one of the RestartResponse*-Exceptions Regards Hans Am 21.07.11 11:19 schrieb Lurtz Nazgul unter lu...@ymail.com: I also tried WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get(); ServletRequest httpRequest = cycle.getWebRequest().getHttpServletRequest(); ServletResponse httpResponse = cycle.getWebResponse().getHttpServletResponse(); ServletContext context = ((WebApplication) Application.get()).getServletContext(); context.getRequestDispatcher(/mywelcome).forward(httpRequest, httpResponse); where mywelcome url is BookmarkablePage, in MyWebApplication.java this.mountBookmarkablePageWithUrlCoding(/mywelcome, Welcome.class); Thanks. From: Lurtz Nazgul lu...@ymail.com To: users@wicket.apache.org Sent: Thu, July 21, 2011 12:15:19 PM Subject: Forward to Bookmarkable Hi; How can i forward user to a BookmarkablePage. I don't need redirection. I don't want user to see url. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
dynamic DataTable
Hi, How can we create a dynamic DataTable which has dynamic Columns? I want to create a page that has following components: - A TextArea for SQL Statement input (User will type any SELECT Sql here) - A Submit button to run the SQL - A Table to view the SQL Resultset. Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. How can I simply do this in Wicket? Thanks a lot, Regards,
RE: dynamic DataTable
Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using nested repeaters over the ResultSetMetaData column info and ResultSet rows instead. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
Any simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using nested repeaters over the ResultSetMetaData column info and ResultSet rows instead. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forward to Bookmarkable
What do you mean by 'hide the url'? Do you mean obfuscate the URL? BybridUrlEncodingStrategy will let you display a bookmarkable URL that is stateful (so it isn't the actual bookmarkable page) For example: /mayapp/welcome.0 Note the .0 on the end. If the user's session expires, I believe it will attempt to reload the page, but it will create a new one if the expected version isn't in session. -Clint On Thu, Jul 21, 2011 at 5:44 AM, Lurtz Nazgul lu...@ymail.com wrote: Hi Hans; Thanks for your answer But still url can be seen by the user. I need to forward in order to hide the url from user. Any idea ? Thanks. From: Hans Lesmeister hans.lesmeis...@lessy-software.de To: Wicket Users users@wicket.apache.org Sent: Thu, July 21, 2011 12:35:21 PM Subject: Re: Forward to Bookmarkable You can setResponePage or throw one of the RestartResponse*-Exceptions Regards Hans Am 21.07.11 11:19 schrieb Lurtz Nazgul unter lu...@ymail.com: I also tried WebRequestCycle cycle = (WebRequestCycle) RequestCycle.get(); ServletRequest httpRequest = cycle.getWebRequest().getHttpServletRequest(); ServletResponse httpResponse = cycle.getWebResponse().getHttpServletResponse(); ServletContext context = ((WebApplication) Application.get()).getServletContext(); context.getRequestDispatcher(/mywelcome).forward(httpRequest, httpResponse); where mywelcome url is BookmarkablePage, in MyWebApplication.java this.mountBookmarkablePageWithUrlCoding(/mywelcome, Welcome.class); Thanks. From: Lurtz Nazgul lu...@ymail.com To: users@wicket.apache.org Sent: Thu, July 21, 2011 12:15:19 PM Subject: Forward to Bookmarkable Hi; How can i forward user to a BookmarkablePage. I don't need redirection. I don't want user to see url. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: E-commerce site built on Wicket
It is using Daisy as a CMS but mostly just to store content in a JCR for easy access to place on the pages where needed. It also allows the business users to modify content on the fly. The site itself was coded straight up. -Original Message- From: Arjun Dhar [mailto:dhar...@yahoo.com] Sent: Thursday, July 21, 2011 2:11 AM To: users@wicket.apache.org Subject: Re: E-commerce site built on Wicket Looks pretty nice. Did you guys use any CMS (say wicket based like BRIX) .. or simply coded it straight up? - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/E-commerce-site-built-on-Wick et-tp3682832p3682897.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
Yeah, I agree there must be some easier way. I hope the Wicket gurus and fanboys here can show the simple way and save the Wicket's title and pride - easiest framework ever :) I remember, even the Struts 1 framework had a component named DisplayTag that can be easily bind to dynamic datasets or resultsets. So Struts 1 DisplayTag component can show any data in a Table format without needing to know the result of the SELECT SQL Queries. It can show the results of any SQL simply without coding any nested repeater to loop for headers and rows.. I also remember, even 10 years ago it was very easy to do this kind of dynamic things in .NET. .NET has GridView component which can also be bind easily to any dataset simply, just simple as below: DataSet ds = new DataSet(); OracleConnection conn = new OracleConnection(strConnectionString); OracleDataAdapter adap = new OracleDataAdapter(txtSql.Text, conn); conn.Open(); adap.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); So tell me if Wicket framework is that simple or not :) On 21 July 2011 15:18, Lurtz Nazgul lu...@ymail.com wrote: Any simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using nested repeaters over the ResultSetMetaData column info and ResultSet rows instead. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
Am I that old or .NET is younger than 10 years ? First tell me what is so complex with wicket-extensions DataTable and I'll tell you how to do it ;-) You *need* to extract the DB meta data if you want the dynamics. Wicket is web framework, not common data extraction framework. Once you have the column names then you can create the ListIColumnEntity and IDataProviderEntity needed by DataTable. From there on Wicket will create the table for you. So if you do the easy part to extract the columns meta data then give it to me and I'll do the hard part to dress it in a DataTable ;-) On Thu, Jul 21, 2011 at 5:08 PM, davut uysal dauy...@gmail.com wrote: Yeah, I agree there must be some easier way. I hope the Wicket gurus and fanboys here can show the simple way and save the Wicket's title and pride - easiest framework ever :) I remember, even the Struts 1 framework had a component named DisplayTag that can be easily bind to dynamic datasets or resultsets. So Struts 1 DisplayTag component can show any data in a Table format without needing to know the result of the SELECT SQL Queries. It can show the results of any SQL simply without coding any nested repeater to loop for headers and rows.. I also remember, even 10 years ago it was very easy to do this kind of dynamic things in .NET. .NET has GridView component which can also be bind easily to any dataset simply, just simple as below: DataSet ds = new DataSet(); OracleConnection conn = new OracleConnection(strConnectionString); OracleDataAdapter adap = new OracleDataAdapter(txtSql.Text, conn); conn.Open(); adap.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); So tell me if Wicket framework is that simple or not :) On 21 July 2011 15:18, Lurtz Nazgul lu...@ymail.com wrote: Any simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using nested repeaters over the ResultSetMetaData column info and ResultSet rows instead. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Strange encoding problem
Hi, i have a strange url encoding problem. I load some names from db (One of them is Schlümpfe). Then i add a BookmarkablePageLink to my OverviewPage. Markup is encoded as UTF-8. If i check markup links href = Overview.html/name/Schlümpfe. If i click the link browser url is http://localhost:8080/Overview.html/name/Schlümpfe. Everything is ok. But if i use a textfield, put the name Schlümpfe in it and redirect to my OverviewPage the browser url is http://localhost:8080/Overview.html/sTerm/Schl%FCmpfe. Thats bad because now nothing is loaded anymore. So my question is: Is BookmarkablePageLink and setResponsePage working anyhow differently? If so can i change that? Thanks Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
wickets AjaxFallbackDefaultDatatable is my favourite component. Josh On 21 Jul 2011 17:23, Martin Grigorov mgrigo...@apache.org wrote: Am I that old or .NET is younger than 10 years ? First tell me what is so complex with wicket-extensions DataTable and I'll tell you how to do it ;-) You *need* to extract the DB meta data if you want the dynamics. Wicket is web framework, not common data extraction framework. Once you have the column names then you can create the ListIColumnEntity and IDataProviderEntity needed by DataTable. From there on Wicket will create the table for you. So if you do the easy part to extract the columns meta data then give it to me and I'll do the hard part to dress it in a DataTable ;-) On Thu, Jul 21, 2011 at 5:08 PM, davut uysal dauy...@gmail.com wrote: Yeah, I agree there must ... -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users...
Re: dynamic DataTable
OK. I am glad someone is trying to understand my problem :) So, what is complex about Wicket and Datatable to show any SQL results in a HTML table format. (Just as you may know Oracle 's iSQL-Plus which you just write SQL, then click on Run command and then see the results in a HTML table) 1) For simple way, you need domain objects as you call Entity. But for an unknown SQL command this is impossible because you cant know what domain object the SQL result will match, right 2) For the custom way, you need to code nested repeaters for the case you dont use any domain objects, to loop for table headers and rows. Just tell me there is no way other than option 2 which is the hard way.. BTW: Struts is just a View layer too, but it has DisplayTag component that saves you from coding nested repeaters, loopers etc. On 21 July 2011 17:22, Martin Grigorov mgrigo...@apache.org wrote: Am I that old or .NET is younger than 10 years ? First tell me what is so complex with wicket-extensions DataTable and I'll tell you how to do it ;-) You *need* to extract the DB meta data if you want the dynamics. Wicket is web framework, not common data extraction framework. Once you have the column names then you can create the ListIColumnEntity and IDataProviderEntity needed by DataTable. From there on Wicket will create the table for you. So if you do the easy part to extract the columns meta data then give it to me and I'll do the hard part to dress it in a DataTable ;-) On Thu, Jul 21, 2011 at 5:08 PM, davut uysal dauy...@gmail.com wrote: Yeah, I agree there must be some easier way. I hope the Wicket gurus and fanboys here can show the simple way and save the Wicket's title and pride - easiest framework ever :) I remember, even the Struts 1 framework had a component named DisplayTag that can be easily bind to dynamic datasets or resultsets. So Struts 1 DisplayTag component can show any data in a Table format without needing to know the result of the SELECT SQL Queries. It can show the results of any SQL simply without coding any nested repeater to loop for headers and rows.. I also remember, even 10 years ago it was very easy to do this kind of dynamic things in .NET. .NET has GridView component which can also be bind easily to any dataset simply, just simple as below: DataSet ds = new DataSet(); OracleConnection conn = new OracleConnection(strConnectionString); OracleDataAdapter adap = new OracleDataAdapter(txtSql.Text, conn); conn.Open(); adap.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); So tell me if Wicket framework is that simple or not :) On 21 July 2011 15:18, Lurtz Nazgul lu...@ymail.com wrote: Any simple way ? Thanks. From: Wilhelmsen Tor Iver toriv...@arrive.no To: users@wicket.apache.org users@wicket.apache.org Sent: Thu, July 21, 2011 3:10:16 PM Subject: RE: dynamic DataTable Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using nested repeaters over the ResultSetMetaData column info and ResultSet rows instead. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
Hi again Davut :) Are you asking this question in every possible forum in the hope of getting a different answer? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/dynamic-DataTable-tp3683514p3683930.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Strange encoding problem
Am 21.07.2011 16:24, schrieb Mike Mander: Hi, i have a strange url encoding problem. I load some names from db (One of them is Schlümpfe). Then i add a BookmarkablePageLink to my OverviewPage. Markup is encoded as UTF-8. If i check markup links href = Overview.html/name/Schlümpfe. If i click the link browser url is http://localhost:8080/Overview.html/name/Schlümpfe. Everything is ok. But if i use a textfield, put the name Schlümpfe in it and redirect to my OverviewPage the browser url is http://localhost:8080/Overview.html/sTerm/Schl%FCmpfe. Thats bad because now nothing is loaded anymore. So my question is: Is BookmarkablePageLink and setResponsePage working anyhow differently? If so can i change that? Thanks Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org The solution seems to be that i had to decode the parameter for responsepage. Urls gets ugly but it works. Thanks Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
Yes Andrew, until I find a real simple solution :) I am currently migrating a Struts project to Wicket. And this is the only issue I have. I hate doing things in a long way, there must be a simple solution. Btw: nice to see you here too after stackoverflow and linkedin :) On Jul 21, 2011 6:05 PM, Andrew Fielden andrew.fiel...@power-oasis.com wrote: Hi again Davut :) Are you asking this question in every possible forum in the hope of getting a different answer? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/dynamic-DataTable-tp3683514p3683930.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
1.4 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3684371.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Javascript applications
Hi there, We are evaluating libraries like ExtJs or SmartClient to build the application. This sort of deviates standard wicket paradigm as most of the responses will be in json or xml format and will not need .html file associated with it. Personally I don't like idea of such kind of applications, but admittedly some of the widgets these libraries provide are very good and in many of the cases all we have to do is provide proper datasource. Will wicket be good choice for backend of such kind of applications. We already have some services in our wicket application that does generate json responses etc, so it's certainly possible. Another concern I have is security - which might be mute concern. My understanding (which is almost nothing) of wicket security is, security is applied on page level or request level as it uses servlet filters and really does not care what kind of output request is generating or whether it has corresponding html page or not. Is this right understanding? For the calls these libraries will be making, we need to make sure we don't serve the data if user is not signed in etc. Just wanted to gather what others think before we finalize the decision. Regards, - Niranajn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DateTimeField and setOutputMarkupId()
We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian
Re: DateTimeField and setOutputMarkupId()
cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dynamic DataTable
I see your problem Davut, but I really don't think Wicket can solve it in the way you want it to. As Martin said, you need an entity to populate the models used by the various Wicket components. Could you somehow parse the SQL statement to extract the table name, and find its meta data? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/dynamic-DataTable-tp3683514p3684513.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField and setOutputMarkupId()
Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian
Re: DateTimeField and setOutputMarkupId()
what is hours ? -igor On Thu, Jul 21, 2011 at 11:17 AM, Julian Sinai jsi...@gmail.com wrote: Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
A safer way to build PropertyModels
After seeing the LambdaJ-based model idea at https://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-LambdaJ I thought I'd try and implement something like that in a ready-to-use fashion, and simplify it a little. The result is here: https://github.com/duesenklipper/wicket-safemodel This is a way to refactor-safely and type-safely build models, without relying on brittle string literals: SomeBean myBean = ... IModelString childNameModel = model(from(myBean).getChild().getName()); No cast, no string literal, only getters. It works with regular JavaBeans, Lists, and with Maps (string keys only though). Instead of requiring a compile-time step this does some proxying in the background to construct a property expression. Anybody interested please give it a try and let me know of any issues. Note: If you feel comfortable with configuring an annotation processor in your Maven build as well as your IDE build, go ahead and try Igor's metagen [https://github.com/42Lines/metagen]. That way you don't have any runtime magic. Use SafeModel if you don't want an additional compile step and do want (very slightly) less keyboard typing. Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling form components onError
Awesome, works beautifully! This solves one of the biggest Wicket headaches for our form-heavy application. Components no longer have to worry about what to render when forms have errors, or how to clear those errors on success. It's even more magical than the automatic AJAX feedback rendering. :) By the way, rather than render components unconditionally (to clear errors), I add a MetaData object mark components that received an error styling on the previous request. I'd encourage anyone developing an app with lots of validation to consider the attached. Dan On Wed, Jul 20, 2011 at 9:48 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: On Wed, Jul 20, 2011 at 9:11 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hey it's the man himself. :) We already use the automatic AJAX feedback recipe (thanks for that), but I'm not sure how that solves the problem at hand. I only add the temporary behaviors in myIComponentOnBeforeRenderListener, and that only gets called if the component's *already* been added to the ART. If the behavior weren't temporary then your suggestion makes sense, assuming we're okay with visiting the entire page for every AJAX request. But once we've paid that cost, why not just add the temporary behavior during visitation? I suppose I don't mind scouring the component graph for invalid FormComponents if and only if !Session.getFeedbackMessages().isEmpty(). Do you agree with this approach, or am I missing your point? scouring the component graph is cheap. look for all formcomponentlabels and update them. you have to do this even if there are no errors because the formcomponent might have been invalid in the previous submit and now is valid. -igor Regards, Dan On Wed, Jul 20, 2011 at 8:15 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: no worries, the cookbook has your back! look in this recipe: Providing Ajax feedback automatically have your temporary behavior implement a tagging interface. then in the ajax request target listener look for all components that have a behavior with this tagging interface, and if they do add it to the target. -igor On Wed, Jul 20, 2011 at 8:01 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hey all, I want a low-interference approach to adding CSS class attributes to form components and their labels when they have associated errors. Igor's * Cookbook* suggests a behavior, but leaves the automation as something done during page construction. We have too many AJAX modals and panel updates for this to cover everything. Therefore I wrote an IComponentOnBeforeRenderListener that adds temporary behaviors to FormComponents and FormComponentLabels which has me pretty close to nirvana. However, the problem remains of getting the form components (or at least the form) added to AjaxRequestTargets. It seems like I want an application-level form submit listener, but I'm not sure how to approach that. Any suggestions or criticisms? This would be awesome for us to get working. Dan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling form components onError
your attachment didnt make it through :( maybe put it on our wiki. thanks, -igor On Thu, Jul 21, 2011 at 12:00 PM, Dan Retzlaff dretzl...@gmail.com wrote: Awesome, works beautifully! This solves one of the biggest Wicket headaches for our form-heavy application. Components no longer have to worry about what to render when forms have errors, or how to clear those errors on success. It's even more magical than the automatic AJAX feedback rendering. :) By the way, rather than render components unconditionally (to clear errors), I add a MetaData object mark components that received an error styling on the previous request. I'd encourage anyone developing an app with lots of validation to consider the attached. Dan On Wed, Jul 20, 2011 at 9:48 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: On Wed, Jul 20, 2011 at 9:11 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hey it's the man himself. :) We already use the automatic AJAX feedback recipe (thanks for that), but I'm not sure how that solves the problem at hand. I only add the temporary behaviors in myIComponentOnBeforeRenderListener, and that only gets called if the component's *already* been added to the ART. If the behavior weren't temporary then your suggestion makes sense, assuming we're okay with visiting the entire page for every AJAX request. But once we've paid that cost, why not just add the temporary behavior during visitation? I suppose I don't mind scouring the component graph for invalid FormComponents if and only if !Session.getFeedbackMessages().isEmpty(). Do you agree with this approach, or am I missing your point? scouring the component graph is cheap. look for all formcomponentlabels and update them. you have to do this even if there are no errors because the formcomponent might have been invalid in the previous submit and now is valid. -igor Regards, Dan On Wed, Jul 20, 2011 at 8:15 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: no worries, the cookbook has your back! look in this recipe: Providing Ajax feedback automatically have your temporary behavior implement a tagging interface. then in the ajax request target listener look for all components that have a behavior with this tagging interface, and if they do add it to the target. -igor On Wed, Jul 20, 2011 at 8:01 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hey all, I want a low-interference approach to adding CSS class attributes to form components and their labels when they have associated errors. Igor's * Cookbook* suggests a behavior, but leaves the automation as something done during page construction. We have too many AJAX modals and panel updates for this to cover everything. Therefore I wrote an IComponentOnBeforeRenderListener that adds temporary behaviors to FormComponents and FormComponentLabels which has me pretty close to nirvana. However, the problem remains of getting the form components (or at least the form) added to AjaxRequestTargets. It seems like I want an application-level form submit listener, but I'm not sure how to approach that. Any suggestions or criticisms? This would be awesome for us to get working. Dan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField and setOutputMarkupId()
It is the hours component of the DateTimeField. From DateTimeField.html: input type=text wicket:id=hours size=2 /nbsp;: Julian On Thu, Jul 21, 2011 at 11:24 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: what is hours ? -igor On Thu, Jul 21, 2011 at 11:17 AM, Julian Sinai jsi...@gmail.com wrote: Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian
Re: DateTimeField and setOutputMarkupId()
what is adding that to the target? -igor On Thu, Jul 21, 2011 at 12:07 PM, Julian Sinai jsi...@gmail.com wrote: It is the hours component of the DateTimeField. From DateTimeField.html: input type=text wicket:id=hours size=2 /nbsp;: Julian On Thu, Jul 21, 2011 at 11:24 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what is hours ? -igor On Thu, Jul 21, 2011 at 11:17 AM, Julian Sinai jsi...@gmail.com wrote: Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField and setOutputMarkupId()
Nothing is adding it, we add the DateTimeField itself to the target. Julian On Thu, Jul 21, 2011 at 12:08 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: what is adding that to the target? -igor On Thu, Jul 21, 2011 at 12:07 PM, Julian Sinai jsi...@gmail.com wrote: It is the hours component of the DateTimeField. From DateTimeField.html: input type=text wicket:id=hours size=2 /nbsp;: Julian On Thu, Jul 21, 2011 at 11:24 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what is hours ? -igor On Thu, Jul 21, 2011 at 11:17 AM, Julian Sinai jsi...@gmail.com wrote: Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian
Re: A safer way to build PropertyModels
This looks fantastic. Can you think of an elegant way to use similar syntactic sugar to create LoadableDetachableModels as well? For example: // This would return a PropertyModel model(from(myBean).getChild().getName()); // This a LoadableDetachableModel loadedModel(from(myService).listUsers()); // Which is more concise than new LoadableDetachableModelListUser { protected ListUser load() { myService.listUsers(); } } On Jul 21, 2011, at 11:45 AM, Carl-Eric Menzel wrote: After seeing the LambdaJ-based model idea at https://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-LambdaJ I thought I'd try and implement something like that in a ready-to-use fashion, and simplify it a little. The result is here: https://github.com/duesenklipper/wicket-safemodel This is a way to refactor-safely and type-safely build models, without relying on brittle string literals: SomeBean myBean = ... IModelString childNameModel = model(from(myBean).getChild().getName()); No cast, no string literal, only getters. It works with regular JavaBeans, Lists, and with Maps (string keys only though). Instead of requiring a compile-time step this does some proxying in the background to construct a property expression. Anybody interested please give it a try and let me know of any issues. Note: If you feel comfortable with configuring an annotation processor in your Maven build as well as your IDE build, go ahead and try Igor's metagen [https://github.com/42Lines/metagen]. That way you don't have any runtime magic. Use SafeModel if you don't want an additional compile step and do want (very slightly) less keyboard typing. Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Javascript applications
Hi, I think something like Jersey, Resteasy will be better for your needs. On Thu, Jul 21, 2011 at 8:25 PM, Niranjan Rao nhr...@gmail.com wrote: Hi there, We are evaluating libraries like ExtJs or SmartClient to build the application. This sort of deviates standard wicket paradigm as most of the responses will be in json or xml format and will not need .html file associated with it. Personally I don't like idea of such kind of applications, but admittedly some of the widgets these libraries provide are very good and in many of the cases all we have to do is provide proper datasource. Will wicket be good choice for backend of such kind of applications. We already have some services in our wicket application that does generate json responses etc, so it's certainly possible. Another concern I have is security - which might be mute concern. My understanding (which is almost nothing) of wicket security is, security is applied on page level or request level as it uses servlet filters and really does not care what kind of output request is generating or whether it has corresponding html page or not. Is this right understanding? For the calls these libraries will be making, we need to make sure we don't serve the data if user is not signed in etc. Just wanted to gather what others think before we finalize the decision. Regards, - Niranajn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField and setOutputMarkupId()
Show some code. On Thu, Jul 21, 2011 at 10:09 PM, Julian Sinai jsi...@gmail.com wrote: Nothing is adding it, we add the DateTimeField itself to the target. Julian On Thu, Jul 21, 2011 at 12:08 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: what is adding that to the target? -igor On Thu, Jul 21, 2011 at 12:07 PM, Julian Sinai jsi...@gmail.com wrote: It is the hours component of the DateTimeField. From DateTimeField.html: input type=text wicket:id=hours size=2 /nbsp;: Julian On Thu, Jul 21, 2011 at 11:24 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what is hours ? -igor On Thu, Jul 21, 2011 at 11:17 AM, Julian Sinai jsi...@gmail.com wrote: Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: A safer way to build PropertyModels
Matt, You need first class functions. All cool JVM langs support them. Just peek your favorite. On Thu, Jul 21, 2011 at 10:17 PM, Matt Brictson m...@55minutes.com wrote: This looks fantastic. Can you think of an elegant way to use similar syntactic sugar to create LoadableDetachableModels as well? For example: // This would return a PropertyModel model(from(myBean).getChild().getName()); // This a LoadableDetachableModel loadedModel(from(myService).listUsers()); // Which is more concise than new LoadableDetachableModelListUser { protected ListUser load() { myService.listUsers(); } } On Jul 21, 2011, at 11:45 AM, Carl-Eric Menzel wrote: After seeing the LambdaJ-based model idea at https://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-LambdaJ I thought I'd try and implement something like that in a ready-to-use fashion, and simplify it a little. The result is here: https://github.com/duesenklipper/wicket-safemodel This is a way to refactor-safely and type-safely build models, without relying on brittle string literals: SomeBean myBean = ... IModelString childNameModel = model(from(myBean).getChild().getName()); No cast, no string literal, only getters. It works with regular JavaBeans, Lists, and with Maps (string keys only though). Instead of requiring a compile-time step this does some proxying in the background to construct a property expression. Anybody interested please give it a try and let me know of any issues. Note: If you feel comfortable with configuring an annotation processor in your Maven build as well as your IDE build, go ahead and try Igor's metagen [https://github.com/42Lines/metagen]. That way you don't have any runtime magic. Use SafeModel if you don't want an additional compile step and do want (very slightly) less keyboard typing. Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling form components onError
No problem, it's the least I can do. :) https://cwiki.apache.org/confluence/display/WICKET/Automatic+styling+of+form+errors On Thu, Jul 21, 2011 at 12:02 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: your attachment didnt make it through :( maybe put it on our wiki. thanks, -igor On Thu, Jul 21, 2011 at 12:00 PM, Dan Retzlaff dretzl...@gmail.com wrote: Awesome, works beautifully! This solves one of the biggest Wicket headaches for our form-heavy application. Components no longer have to worry about what to render when forms have errors, or how to clear those errors on success. It's even more magical than the automatic AJAX feedback rendering. :) By the way, rather than render components unconditionally (to clear errors), I add a MetaData object mark components that received an error styling on the previous request. I'd encourage anyone developing an app with lots of validation to consider the attached. Dan On Wed, Jul 20, 2011 at 9:48 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: On Wed, Jul 20, 2011 at 9:11 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hey it's the man himself. :) We already use the automatic AJAX feedback recipe (thanks for that), but I'm not sure how that solves the problem at hand. I only add the temporary behaviors in myIComponentOnBeforeRenderListener, and that only gets called if the component's *already* been added to the ART. If the behavior weren't temporary then your suggestion makes sense, assuming we're okay with visiting the entire page for every AJAX request. But once we've paid that cost, why not just add the temporary behavior during visitation? I suppose I don't mind scouring the component graph for invalid FormComponents if and only if !Session.getFeedbackMessages().isEmpty(). Do you agree with this approach, or am I missing your point? scouring the component graph is cheap. look for all formcomponentlabels and update them. you have to do this even if there are no errors because the formcomponent might have been invalid in the previous submit and now is valid. -igor Regards, Dan On Wed, Jul 20, 2011 at 8:15 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: no worries, the cookbook has your back! look in this recipe: Providing Ajax feedback automatically have your temporary behavior implement a tagging interface. then in the ajax request target listener look for all components that have a behavior with this tagging interface, and if they do add it to the target. -igor On Wed, Jul 20, 2011 at 8:01 PM, Dan Retzlaff dretzl...@gmail.com wrote: Hey all, I want a low-interference approach to adding CSS class attributes to form components and their labels when they have associated errors. Igor's * Cookbook* suggests a behavior, but leaves the automation as something done during page construction. We have too many AJAX modals and panel updates for this to cover everything. Therefore I wrote an IComponentOnBeforeRenderListener that adds temporary behaviors to FormComponents and FormComponentLabels which has me pretty close to nirvana. However, the problem remains of getting the form components (or at least the form) added to AjaxRequestTargets. It seems like I want an application-level form submit listener, but I'm not sure how to approach that. Any suggestions or criticisms? This would be awesome for us to get working. Dan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: A safer way to build PropertyModels
I LOLed at this: Unfortunately, most of us are stuck in Java world where proper functions are still considered science fiction like flying cars and World Peace. - Original Message - From: Carl-Eric Menzel cmen...@wicketbuch.de To: users@wicket.apache.org Sent: Thursday, 21 July, 2011 7:45:02 PM Subject: A safer way to build PropertyModels After seeing the LambdaJ-based model idea at https://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-LambdaJ I thought I'd try and implement something like that in a ready-to-use fashion, and simplify it a little. The result is here: https://github.com/duesenklipper/wicket-safemodel This is a way to refactor-safely and type-safely build models, without relying on brittle string literals: SomeBean myBean = ... IModelString childNameModel = model(from(myBean).getChild().getName()); No cast, no string literal, only getters. It works with regular JavaBeans, Lists, and with Maps (string keys only though). Instead of requiring a compile-time step this does some proxying in the background to construct a property expression. Anybody interested please give it a try and let me know of any issues. Note: If you feel comfortable with configuring an annotation processor in your Maven build as well as your IDE build, go ahead and try Igor's metagen [https://github.com/42Lines/metagen]. That way you don't have any runtime magic. Use SafeModel if you don't want an additional compile step and do want (very slightly) less keyboard typing. Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: A safer way to build PropertyModels
On Thu, 21 Jul 2011 22:33:47 +0300 Martin Grigorov mgrigo...@apache.org wrote: Matt, You need first class functions. All cool JVM langs support them. Just peek your favorite. That is indeed true. However, just for the fun of it, I'm going to try and implement at least a limited version of this... :-) Carl-Eric www.wicketbuch.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField and setOutputMarkupId()
Hi Martin Thanks for looking at this. It's a bit complicated because we've built a form framework around Wicket, but here goes: In the page: HtFormPanel.DateFormField startField = new HtFormPanel.DateFormField(startField, new StringResourceModel(start, this, null), new PropertyModelDate(this, start), false); Where the constructor for HtFormPanel.DateFormField is: public DateFormField(String uniqueId, IModelString label, IModel m, boolean bShowTime) { // The DateTimeField is contained within the DateFormField super(uniqueId, FieldType.DATETEXTFIELD.toString(), (bShowTime ? new DateTimeField(FIELD_ID) : new DateField(FIELD_ID)), label, m); } Next, in the page: startField.setFieldOutputMarkupId(true); // The radio button that does the ajax update: final HtFormPanel.RadioFormFieldReportAction actionField = new HtFormPanel.RadioFormFieldReportAction( actionField,new ResourceModel(actionField),actionTypes,new LocalizedChoiceRendererReportAction(this), new PropertyModelReportAction(this,action)); Finally, the update code that causes the problem: actionField.getFormComponent().add( new HtAjaxFormChoiceComponentUpdatingBehavior() { private static final long serialVersionUID = 8574977146235850631L; protected void onUpdate(AjaxRequestTarget target) { if (getAction() != null getAction().equals(ReportAction.VIEW)) { startField.setRequired(false); } else { startField.setRequired(true); } // We update the startField and the DateTimeField inside it. target.addComponent(startField); target.addComponent(startField.getComponent()); } }); Julian On Thu, Jul 21, 2011 at 12:30 PM, Martin Grigorov mgrigo...@apache.orgwrote: Show some code. On Thu, Jul 21, 2011 at 10:09 PM, Julian Sinai jsi...@gmail.com wrote: Nothing is adding it, we add the DateTimeField itself to the target. Julian On Thu, Jul 21, 2011 at 12:08 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what is adding that to the target? -igor On Thu, Jul 21, 2011 at 12:07 PM, Julian Sinai jsi...@gmail.com wrote: It is the hours component of the DateTimeField. From DateTimeField.html: input type=text wicket:id=hours size=2 /nbsp;: Julian On Thu, Jul 21, 2011 at 11:24 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what is hours ? -igor On Thu, Jul 21, 2011 at 11:17 AM, Julian Sinai jsi...@gmail.com wrote: Igor, We do update the DateTimeField itself, and this is what we see: SEVERE: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] java.lang.IllegalArgumentException: cannot update component that does not have setOutputMarkupId property set to true. Component: [MarkupContainer [Component id = hours]] at org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:346) Julian On Thu, Jul 21, 2011 at 11:02 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: cant update the DateTimeField itself? -igor On Thu, Jul 21, 2011 at 10:57 AM, Julian Sinai jsi...@gmail.com wrote: We have a need to update a DateTimeField via Ajax, but its fields are private, and they don't have setOutputMarkupId() set on them. The result is an exception upon Ajax update. Is there any solution other than cloning and owning DateTimeField? We are using Wicket 1.4.17 (and we can't upgrade to 1.5 just yet). Any help is appreciated. Julian -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com
updating a property model
From the wicket java docs for property model, it says: ...we can create form components that work dynamically on the given model object. For instance, we could create a text field that updates the name property of a person like this: add(new TextField(myTextField, new PropertyModel(person, name)); My question is: How does the text field update the name field in the person object? Is it built in on onsubmit or some function inside the TextField class? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/updating-a-property-model-tp3685186p3685186.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: updating a property model
updatemodel of textfield calls model.setobject(value) where model is a property model propertymodel then calls person.setname(value) -igor On Thu, Jul 21, 2011 at 2:41 PM, wmike1...@gmail.com wmike1...@gmail.com wrote: From the wicket java docs for property model, it says: ...we can create form components that work dynamically on the given model object. For instance, we could create a text field that updates the name property of a person like this: add(new TextField(myTextField, new PropertyModel(person, name)); My question is: How does the text field update the name field in the person object? Is it built in on onsubmit or some function inside the TextField class? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/updating-a-property-model-tp3685186p3685186.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Issues with HeaderResponseContainerFilteringHeaderResponse
Under normal circumstances I would, but I don't have my css in a file. It gets pulled from a database and stashed in the session. All the header contributer classes and resource references assume there's a file somewhere with this info. But in my case there is not. And, even id I did stuff this data into a file it still wouldn't fix my problem, because the customer defined css needs to override everything else with the same css selector. If another component added a header contributor afterwards that would not be the case. - Loren On Tue, Jul 19, 2011 at 11:35 PM, Jeremy Thomerson jer...@wickettraining.com wrote: To start, don't use a Label to contribute css. Use a header contributor. That's what they're made for. On 2011 7 19 13:22, Loren Cole loren.c...@gmail.com wrote: We're making our application skinable, but I'm having some trouble getting user specified css into the right place in the header. We're working in a distributed environment, so instead of saving their css in the file system we're putting it in our database, and in order to get the cascade to work properly we need to add this css after all the others. Here's how I'm adding it: StandardPage.java onInitialize() //Add any override style Tenant tenant = MyWebSession.get().getTenant(); Css css = cssRepository.GetStyleByTenant(tenant); if(tenant.getBranding() css != null) { add(new Label(style, css.getStyle())); } } StandardPage.html wicket:head style type=text/css wicket:id=style/style /wicket:head - So the issue is that thet style tag comes before all my header contributions. I've tried specifying a header response decorator like so: Application.java public static final String HEADER_FILTER_NAME = myHeaderBucket; init() { super.init(); setHeaderResponseDecorator(new IHeaderResponseDecorator() { HeaderResponseContainerFilteringHeaderResponse.IHeaderResponseFilter[] filters = {new CssAcceptingHeaderResponseFilter(HEADER_FILTER_NAME)}; @Override public IHeaderResponse decorate(IHeaderResponse response) { return new HeaderResponseContainerFilteringHeaderResponse(response, HEADER_FILTER_NAME, filters); } }); } StandardPage.html wicket:head div wicket:id=myHeaderBucket/div style type=text/css wicket:id=style/style /wicket:head -- Unfortunately I'm getting this exception when I instantiate a page: 12:28:04,097 INFO [STDOUT] 2011-07-19 12:28:04.096 [http-127.0.0.1-8080-1] [127.0.0.1] [T:2] [U:3 - joe_sharp] [com.transverse.bleep.wicket.desktop.DesktopPage] ERROR org.apache.wicket.RequestCycle 1529 - Exception in rendering component: [MarkupContainer [Component id = headerBucket]] org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = headerBucket]] at org.apache.wicket.Component.renderComponent(Component.java:2729) ~[wicket-1.4.17.jar:1.4.17] at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1539) ~[wicket-1.4.17.jar:1.4.17] at org.apache.wicket.Component.render(Component.java:2521) ~[wicket-1.4.17.jar:1.4.17] ... Caused by: java.lang.RuntimeException: there was an error processing the header response - you tried to render a bucket of response from HeaderResponseContainerFilteringHeaderResponse, but it had not yet run and been closed. this should occur when the header container that is standard in wicket renders, so perhaps you have done something to keep that from rendering? at org.apache.wicket.resource.filtering.HeaderResponseFilteredResponseContainer.onComponentTagBody(HeaderResponseFilteredResponseContainer.java:67) ~[wicket-1.4.17.jar:1.4.17] at org.apache.wicket.Component.renderComponent(Component.java:2690) ~[wicket-1.4.17.jar:1.4.17] ... 81 common frames omitted Any ideas on what I'm doing wrong? Is there an easier approach I can take? Thanks, Loren
Re: updating a property model
Thanks Igor, I've been trying to update the TextField's model myself through an added AjaxEventBehavior(onchange) event. But I can't seem to access the text that the user inputs in the TextField. I have: textField.add(new AjaxEventBehavior(onchange) { @Override protected void onEvent(AjaxRequestTarget target) { system.out.println(textField.getInput()); } }); This doesnt print out the text that's currently in the text box. How does the updateModel method in FromComponent know what the inputted text is? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/updating-a-property-model-tp3685186p3685298.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: updating a property model
use AjaxFormComponentUpdatingBehavior instead -igor On Thu, Jul 21, 2011 at 3:17 PM, wmike1...@gmail.com wmike1...@gmail.com wrote: Thanks Igor, I've been trying to update the TextField's model myself through an added AjaxEventBehavior(onchange) event. But I can't seem to access the text that the user inputs in the TextField. I have: textField.add(new AjaxEventBehavior(onchange) { @Override protected void onEvent(AjaxRequestTarget target) { system.out.println(textField.getInput()); } }); This doesnt print out the text that's currently in the text box. How does the updateModel method in FromComponent know what the inputted text is? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/updating-a-property-model-tp3685186p3685298.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Issues with HeaderResponseContainerFilteringHeaderResponse
put your css string from db in: new StringBufferResourceStream().add(yourCssFromDB) and then you can contribute to the header properly -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issues-with-HeaderResponseContainerFilteringHeaderResponse-tp3678890p3685782.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
PageMap in 1.5
I'm porting this sample scala/wicket application from Wicket 1.4 to 1.5. I've almost completely got it figured out except for this bit of code from a class that extends RequestCycle (it does some basic EntityManager/Transaction stuff): override def onEndRequest = { super.onEndRequest() if (em != null) { if (em.getTransaction().isActive()) em.getTransaction().commit() em.close() } // TODO: in 1.5 page maps no longer in use - not sure why they'd want to do this to begin with... // TODO: ahhh, maybe to prevent hitting 'back button'? //if (_endConversation) getRequest().getPage().getPageMap().remove() } The line I have commented out at the end is what I can't find an equivalent for in Wicket 1.5. Whether or not this is the proper way to do database stuff is really not important to me - please don't let that distract from the question. For those that are curious, the _endConversation flag is set in the body of a form's onSubmit() method, after data is written to the database. What I'm really interested in is a) Why would someone want to remove the page map from the session in Wicket 1.4? like above Is my comment correct that it prevents hitting the back button and re-submitting a form? b) What is the Wicket 1.5 way of handling a situation like this? I looked at some other related posts on these forums, but haven't found a good description yet. c) In general, how does page caching work in Wicket 1.5? There isn't much on the migrating wiki page... Thanks, -Doug -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageMap-in-1-5-tp3685858p3685858.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
we have used wicket extensively in several banking applications . both retail and internal apps. we have very large amounts of transactions. mostly using 1.4 version. On Jul 22, 2011, at 1:24 AM, dryajov drya...@gmail.com wrote: 1.4 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3684371.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bigger sites running on wicket?
I stumbled by accident on Coldwell banker's web site, which is using wicket. I don't know if that is known. It is a pretty big corporation. -Nelson On Thu, Jul 21, 2011 at 8:32 PM, Horacio Natyural horacio.natyu...@gmail.com wrote: we have used wicket extensively in several banking applications . both retail and internal apps. we have very large amounts of transactions. mostly using 1.4 version. On Jul 22, 2011, at 1:24 AM, dryajov drya...@gmail.com wrote: 1.4 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Bigger-sites-running-on-wicket-tp2197500p3684371.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org