Re: [Wicket-user] Spring design in Wicket
Hello Roland, Personally I would not recommend the (beta) javaconfig thing to an unexperienced spring user. Avoiding XML hell is done by doing the wiring with Spring, and doing configuration separately (with or without Spring). I know this is a fine line of distinction, but one well worth exploring. Regards, Erik. Roland Kaercher wrote: > Hi ZedroS, > > you could check out the wicket pastebin at > http://developer.berlios.de/projects/wicketpastebin/ which uses wicket > and spring. > I personally think using only the interfaces in your code is usually a > good idea. If you want to avoid XML and don't mind dabbling with > experimental code then you could take a look at > http://www.springframework.org/javaconfig which aims to configure > spring in java code. > > regards, > > roland > > -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the best way of doing menus in Wicket?
MyGosuMenu is worth a look. It's a stagnant project, but it's simple, fast and still has good cross-browser support (although I probably wouldn't use it for a public site). Here's an example of the standard drop down menu: http://code.gosu.pl/dl/mygosuMenu/demo/1.1/example1.html You can download it here: http://sourceforge.net/project/ showfiles.php?group_id=69763 (under the "mygosumenu v1.x" section) The distribution comes with examples and documentation. Wicket integrates seamlessly with this or any other layout-based JS menu. Just use Link (or PageLink etc.) components instead of static anchor tags. -Ryan On Mar 7, 2007, at 4:24 PM, Thomas R. Corbin wrote: > > We need a menu bar across the top of our pages, with pull down menus. > > We used to use this stuff: > http://struts-menu.sf.net > > but I'm not sure how to integrate it, since it seems to rely on jsp > tags. > > Thanks. > > -- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Retrieving a value from a PropertyModel
Thanks Igor, I was having the same issue as Jason (see [Wicket-user] Getting value of a text field via Ajax, no form ) I changed to using AjaxFormComponentUpdatingBehavior and all is happy. Thanks again, Tim Igor Vaynberg wrote: havent looked at your code but here is how i would do it class mypanel extends panel { private String value; //getter+setter public mypanel() { TextField tf=new TextField("tf", new PropertyModel(this, "value")); Label l=new Label("l", new propertyModel(this, "value")); . } } -igor On 3/8/07, Tim Squires <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to get working a panel containing a TextField and a Label. > The label contains the hex value for the TextField content. The > TextField is Ajaxed so that it updates the label on each key press. > > Unfortunalty, I cannot retrieve the value from the TextField, it > always returns a null. Will someone elighten me to the best way to > retrieve the current TextField value? > > Code is included below. > > Thanks for your help, > Tim > > public class TextFieldWithHexValue extends Panel { > > private static final Log logger = LogFactory > .getLog(TextFieldWithHexValue.class); > > @SuppressWarnings("serial") > public TextFieldWithHexValue(String id, final PropertyModel > model, > int tabindex) { > super(id); > final TextField textField = new TextField("text field > with hex", model); > textField.setOutputMarkupId(true); > add(textField); > > textField.add(new AttributeModifier("tabindex", true, > new Model( > tabindex))); > textField.setOutputMarkupId(true); > > // Server Port Hex > Model hexModel = new Model() { > public Object getObject(Component arg0) { > logger.debug("Calculating hex > value..."); > String value = model.getObject(null) + > ""; > logger.debug("Pre hexed value = " + > value); > > if (StringUtils.isNotEmpty(value)) { > StringBuffer buffer = new > StringBuffer(); > StringTokenizer tokens = new > StringTokenizer(value, "."); > while (tokens.hasMoreTokens()) { > String token = > tokens.nextToken(); > try { > Integer hex = > new Integer(token); > > buffer.append(StringUtils.leftPad(Integer > > .toHexString(hex), 2, '0')); > } catch > (NumberFormatException e) { > > logger.warn("Unable to format >>" + token > > + "<< to hex"); > } > } > return > buffer.toString().toUpperCase(); > } else > return ""; > } > }; > final Label hexLabel = new Label("hex for text field", > hexModel); > hexLabel.setOutputMarkupId(true); > > textField.add(new AjaxEventBehavior("onkeypress") { > protected void onEvent(AjaxRequestTarget > target) { > logger.debug("value has changed, > recalculate hex value"); > target.addComponent(hexLabel); > } > }); > add(hexLabel); > } > } > The Information contained in this e-mail message is intended only for the individuals named above. If you are not the intended recipient, you should be aware that any dissemination, distribution, forwarding or other duplication of this communication is strictly prohibited. The views expressed in this e-mail are those of the individual author and not necessarily those of LINK Interchange Network Ltd. Prior to taking any action based upon this e-mail message you should seek appropriate confirmation of its authenticity. If you have received this e-mail in error, please notify the sender immediately. LINK Interchange Network Limited Tel: 01423 356000, Fax: 01423 356356 email: [EMAIL PROTECTED] http://www.link.co.uk Registered in ENGLAND Number. 3565766 Registered Office: Arundel House * 1 Liverpool Gardens * Worthing * West Sussex* BN11 1SL -
[Wicket-user] He plans to unveil the findings next week at an international prospector's convention in Toronto.
Note: This story has been adapted from a news release issued by National Energy Technology Laboratory. However, something seems to have gone awry in this case. Skip to:Search BoxSection NavigationNetwork NavigationContentView the SitemapNEWS. It's possible they may point the way to a kimberlite plume between the Twin Cities and Duluth or western Wisconsin, he added. Sometimes you can't find it. That process will take several years of work and consultation with other geologists. Perri and Tucker present a description and interpretation of the first convincing examples of bacteria in ancient microbial mats. The positions listed below are those available within the Force at the current time. The tremor in the town of Tembi, described by Greek seismologists as "weak", was also felt in neighbouring towns, the Greek Ana news agency reported. Email AddressPassword "The need is to make the data available and to make itharmonious," said Jackson. "We're going to use technology to take the water out, peel it away," said David Robinson, one of the mission archaeologists. The vertical movement totals about 3 to 6 feet during a single magnitude-7 quake. We are committed to creating a police service that is representative of the communities we serve, and we believe that in this way the Constabulary will be better able to meet our aims and priorities. Associated Press contributed to this report. So perhaps our voyage to the centre of the Earth will be numerical. "We've already passed the civil protection authorities these results. It will take several years to trace back the mineral markers to see if they lead to kimberlite and, perhaps, diamonds. Physical chemists have created a new, cheap test to detect mercury, an element known to harm the brain, kidneys, heart, lungs and immune system. 9 on the Richter scale,. Ballard plans several television programs daily during the weeklong mission that will be broadcast to schools and museums and aquariums around the nation. "We expect the volcano to continue erupting," said Alberto Nunez, head of Colombia's Geology Institute. They seem to bring earthquakes in their wake. 'Sometimes it's kimberlite but there are no diamonds A A. amoral.gif Description: GIF image - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Spring design in Wicket
Hi Roland and Erik Thanks for your replies, notably the "best practices" provided. Regarding the way to design, I would sum your answers as following : - one can follow a "Domain Driven Design", with a manager per kind of object. - In the Spring ApplicationContext file, I should only define implementations and in my Java code I should only use interfaces. Is that correct ? I will have a look at Wicket Pastebin source code to see how they did, but I don't know what design they followed and if it's well implemented. Can you give me an idea about it ? For the time, I guess I'll avoid spring javaconfig, I tend to progress quite slowly so... lol BTW, could you advice me some goods books on the topic ? I'm reading a french book on it, but it doesn't detail the design aspects of it... Thanks in advance ZedroS - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Frustracted with JDBC...
I really don't know where to ask this, so I am trying here because someone may have encountered a similar problem... I use MSSQLServer 2000 and JTurbo (JDBC 2.1) driver. Wicket 1.3, Databinder 1.1 I ran into a case where my tables had triggers on them. Hibernate wouldn't let the update occur because it looked like I was updating too many rows. So, I modified the triggers to SET NOCOUNT ON at the beginning and SET NOCOUNT OFF at the end. Query Analyzer reports only one row updated, but now Hibernate gets ZERO rows. I assume that it is not Hibernate's fault, but the JDBC driver reporting the rowcount wrong. So, I had been planning on switching to the jTDS driver anyway (for when we switch to SQLServer 2005) so I try to hook that it. Not a big deal, fix the hibernate.cfg.xml and a simple JUNIT that uses a Session and Criteria returns the parent object and children collections just fine. Enter my code, Pages, Panels, HibernateObjectModels, etc. Now, I can't get ALL of the data to display only the parent object, the child collections appear as empty. Arghh! I know, I know... That's ridiculous, nothing changed but the driver! So, I added some code to the page constructor that did very much what the Unit test did and voila, it worked. I get a parent object with initialized collections. Yet, still when it comes time for the model to pull the collections off the parent, nothing! So, I simply switch back to the old driver and it starts working again. What could possibly be happening? The only real difference (besides the obvious fact that I am using two different drivers) is that one driver (the original is a JDBC 2.1) and the new driver (jTDS) is a JDBC 3.0. But, since I can pull data with the driver, that doesn't seem like it could be the problem. Have you ever encountered something so ridiculous as this? Why aren't the Models returning data for the children collections? Even when I get a handle to the parent object from the main model and call the collection directly it doesn't work! I set fetch=EAGER on the collection, no luck. I turned off second level cache, no luck. I'm very frustrated and am hoping you have some insight. n summary, using old JDBC 2.1 driver (JTurbo) Hibernate retrieves all data and models can display all data. Using new JDBC 3.0 (jTDS), Hibernate retrieves all data, but models only retrieve the parent data, not children! Thoughts? Chuck -- View this message in context: http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9394737 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Frustracted with JDBC...
I was able to narrow the problem scope a little. The difference is between getting a result from a Criteria object vs Session.load(). With both drivers, using the criteria object gets a fully populated object (with children) With the JTurbo (JDBC 2.1) driver, Session.load returns the fully populated object while jTDS (JDBC 3.0) returns only the parent! The problem with the model is that the DataBinder HibernateObjectModel uses session.load()! So now my problem lies with Hibernate(?) and the difference between those methods. I'm still interested in ideas if anyone has had similar experiences with this. Chuck ChuckDeal wrote: > > I really don't know where to ask this, so I am trying here because someone > may have encountered a similar problem... > > I use MSSQLServer 2000 and JTurbo (JDBC 2.1) driver. > Wicket 1.3, Databinder 1.1 > > I ran into a case where my tables had triggers on them. Hibernate > wouldn't let the update occur because it looked like I was updating too > many rows. So, I modified the triggers to SET NOCOUNT ON at the beginning > and SET NOCOUNT OFF at the end. Query Analyzer reports only one row > updated, but now Hibernate gets ZERO rows. I assume that it is not > Hibernate's fault, but the JDBC driver reporting the rowcount wrong. > > So, I had been planning on switching to the jTDS driver anyway (for when > we switch to SQLServer 2005) so I try to hook that it. Not a big deal, > fix the hibernate.cfg.xml and a simple JUNIT that uses a Session and > Criteria returns the parent object and children collections just fine. > Enter my code, Pages, Panels, HibernateObjectModels, etc. Now, I can't > get ALL of the data to display only the parent object, the child > collections appear as empty. Arghh! > > I know, I know... That's ridiculous, nothing changed but the driver! So, > I added some code to the page constructor that did very much what the Unit > test did and voila, it worked. I get a parent object with initialized > collections. Yet, still when it comes time for the model to pull the > collections off the parent, nothing! So, I simply switch back to the old > driver and it starts working again. > > What could possibly be happening? The only real difference (besides the > obvious fact that I am using two different drivers) is that one driver > (the original is a JDBC 2.1) and the new driver (jTDS) is a JDBC 3.0. > But, since I can pull data with the driver, that doesn't seem like it > could be the problem. Have you ever encountered something so ridiculous > as this? Why aren't the Models returning data for the children > collections? Even when I get a handle to the parent object from the main > model and call the collection directly it doesn't work! I set fetch=EAGER > on the collection, no luck. I turned off second level cache, no luck. > I'm very frustrated and am hoping you have some insight. > > n summary, > using old JDBC 2.1 driver (JTurbo) Hibernate retrieves all data and models > can display all data. > Using new JDBC 3.0 (jTDS), Hibernate retrieves all data, but models only > retrieve the parent data, not children! > > Thoughts? > > Chuck > > -- View this message in context: http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9395214 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Design questions: Use of controllers and wicket models
On Thursday, 08 March 2007 07:58 pm, Igor Vaynberg escreveu: > see above. take a simple example where you have a list of checkboxes and > you want all selected objects to end up in a collection. how do you do it? > sounds like a complex mapping? the most elegant way is to write a custom > model. Can you use a CheckBoxMultipleChoice for this? > > class mypage extends page { > private Set selected=new HashSet(); > > private class PersonCheckboxModel implements IModel { > private final IModel person; > public final PersonCheckBoxModel(IModel person) { > this.person=person; } > > public Boolean getObject() { > return selected.contains(person.getObject()); > } > > public void setObject(Boolean b) { > if (Boolean.TRUE.equals(b)) { > selected.put(person.getObject()); > } else { > selected.remove(person.getObject()); > } > } > > public void detach() { person.detach(); } > } > > } > > now all you have to do is > > LoadableDetachableModel person=new LoadalbeDetachableModel(id); > new CheckBox(this, "cb", new PersonCheckBoxModel(person)); > > and everything magically works, hope it gives you some ideas. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] What's the best way of doing menus in Wicket?
On Friday, 09 March 2007 04:18 am, Ryan Holmes escreveu: > MyGosuMenu is worth a look. It's a stagnant project, but it's simple, > fast and still has good cross-browser support (although I probably > wouldn't use it for a public site). Here's an example of the standard > drop down menu: http://code.gosu.pl/dl/mygosuMenu/demo/1.1/example1.html > > You can download it here: http://sourceforge.net/project/ > showfiles.php?group_id=69763 (under the "mygosumenu v1.x" section) > The distribution comes with examples and documentation. > > Wicket integrates seamlessly with this or any other layout-based JS > menu. Just use Link (or PageLink etc.) components instead of static > anchor tags. It looks pretty cool. We've been working with the YUI menu stuff and it looks real easy, though I think I could do a better job with it. > > -Ryan > > On Mar 7, 2007, at 4:24 PM, Thomas R. Corbin wrote: > > We need a menu bar across the top of our pages, with pull down menus. > > > > We used to use this stuff: > > http://struts-menu.sf.net > > > > but I'm not sure how to integrate it, since it seems to rely on jsp > > tags. > > > > Thanks. > > > > -- > > --- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > > share your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php? > > page=join.php&p=sourceforge&CID=DEVDEV > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Spring design in Wicket
Hi, ZedroS Schwart wrote: > - one can follow a "Domain Driven Design", with a manager per kind of object. > That is a major simplification, but yes, that is true. > - In the Spring ApplicationContext file, I should only define > implementations and in my Java code I should only use interfaces. > > Is that correct ? > Yes. > BTW, could you advice me some goods books on the topic ? I'm reading a > french book on it, but it doesn't detail the design aspects of it... > I gave you one already, but I think a book in Spring would be more helpful (for example 'Spring in Action', or 'Pro Spring'). Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Frustracted with JDBC...
If you have lazy-loaded objects in your graph then they are initially populated with Hibernate proxies and only resolved from the database when you access them in your application code. I imagine that in one case the Hibernate transaction is being closed before you have walked the object graph far enough to retrieve all of the relevant objects, while in the other case the transaction is still open and so Hibernate can resolve the proxies. Try looking at any relevant settings on the jdbc drivers. We're using jtds successfully (to the degree that anyone uses sql server successfully). Scott On 3/9/07, ChuckDeal <[EMAIL PROTECTED]> wrote: > > I was able to narrow the problem scope a little. > > The difference is between getting a result from a Criteria object vs > Session.load(). > > With both drivers, using the criteria object gets a fully populated object > (with children) > With the JTurbo (JDBC 2.1) driver, Session.load returns the fully populated > object while jTDS (JDBC 3.0) returns only the parent! > > The problem with the model is that the DataBinder HibernateObjectModel uses > session.load()! So now my problem lies with Hibernate(?) and the difference > between those methods. I'm still interested in ideas if anyone has had > similar experiences with this. > > Chuck > > > > ChuckDeal wrote: > > > > I really don't know where to ask this, so I am trying here because someone > > may have encountered a similar problem... > > > > I use MSSQLServer 2000 and JTurbo (JDBC 2.1) driver. > > Wicket 1.3, Databinder 1.1 > > > > I ran into a case where my tables had triggers on them. Hibernate > > wouldn't let the update occur because it looked like I was updating too > > many rows. So, I modified the triggers to SET NOCOUNT ON at the beginning > > and SET NOCOUNT OFF at the end. Query Analyzer reports only one row > > updated, but now Hibernate gets ZERO rows. I assume that it is not > > Hibernate's fault, but the JDBC driver reporting the rowcount wrong. > > > > So, I had been planning on switching to the jTDS driver anyway (for when > > we switch to SQLServer 2005) so I try to hook that it. Not a big deal, > > fix the hibernate.cfg.xml and a simple JUNIT that uses a Session and > > Criteria returns the parent object and children collections just fine. > > Enter my code, Pages, Panels, HibernateObjectModels, etc. Now, I can't > > get ALL of the data to display only the parent object, the child > > collections appear as empty. Arghh! > > > > I know, I know... That's ridiculous, nothing changed but the driver! So, > > I added some code to the page constructor that did very much what the Unit > > test did and voila, it worked. I get a parent object with initialized > > collections. Yet, still when it comes time for the model to pull the > > collections off the parent, nothing! So, I simply switch back to the old > > driver and it starts working again. > > > > What could possibly be happening? The only real difference (besides the > > obvious fact that I am using two different drivers) is that one driver > > (the original is a JDBC 2.1) and the new driver (jTDS) is a JDBC 3.0. > > But, since I can pull data with the driver, that doesn't seem like it > > could be the problem. Have you ever encountered something so ridiculous > > as this? Why aren't the Models returning data for the children > > collections? Even when I get a handle to the parent object from the main > > model and call the collection directly it doesn't work! I set fetch=EAGER > > on the collection, no luck. I turned off second level cache, no luck. > > I'm very frustrated and am hoping you have some insight. > > > > n summary, > > using old JDBC 2.1 driver (JTurbo) Hibernate retrieves all data and models > > can display all data. > > Using new JDBC 3.0 (jTDS), Hibernate retrieves all data, but models only > > retrieve the parent data, not children! > > > > Thoughts? > > > > Chuck > > > > > > -- > View this message in context: > http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9395214 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > -- Scott Swank reformed mathematician - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.ph
Re: [Wicket-user] Frustracted with JDBC...
Scott Swank wrote: > > If you have lazy-loaded objects in your graph then they are initially > populated with Hibernate proxies and only resolved from the database > when you access them in your application code. I imagine that in one > case the Hibernate transaction is being closed before you have walked > the object graph far enough to retrieve all of the relevant objects, > while in the other case the transaction is still open and so Hibernate > can resolve the proxies. > > Try looking at any relevant settings on the jdbc drivers. We're using > jtds successfully (to the degree that anyone uses sql server > successfully). > > Scott > Yeah, I thought of that, but given the following code, you'll see that that isn't the case. Yet, the load() statement fails in my scenario. I made a very simple Parent and Child class test that doesn't suffer from this problem. But, my complex objects do. My guess is that I have a "bad" mapping, but my REAL concern is that with one driver it works and the other it doesn't! SpecChangeModelObject result; Session sess = hibernateSessionFactory.openSession(); Criteria criteria = sess.createCriteria(SpecChangeModelObject.class); criteria.add(Restrictions.idEq("{8D6A620D-B094-46CB-A6E7-34B4CE99EECD}")); result = (SpecChangeModelObject) criteria.uniqueResult(); assertNotNull("SpecChangeModelObject should not be null", result); assertNotNull("ResponsibleIndividuals should not be null", result.getResponsibleIndividuals()); assertFalse("ResponsibleIndividuals.isEmpty failed", result.getResponsibleIndividuals().isEmpty()); assertEquals("ResponsibleIndividuals.size failed", 2, result.getResponsibleIndividuals().size()); result = (SpecChangeModelObject) sess.load(SpecChangeModelObject.class, "{8D6A620D-B094-46CB-A6E7-34B4CE99EECD}"); assertNotNull("SpecChangeModelObject should not be null", result); // will fail on the next line! assertNotNull("ResponsibleIndividuals should not be null", result.getResponsibleIndividuals()); assertFalse("ResponsibleIndividuals.isEmpty failed", result.getResponsibleIndividuals().isEmpty()); assertEquals("ResponsibleIndividuals.size failed", 2, result.getResponsibleIndividuals().size()); sess.close(); Chuck -- View this message in context: http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9399084 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Design questions: Use of controllers and wicket models
yes, but then you are married to the output it genereates. [] label [] label whats below you can use just for the checkbox, so you are free to generate your own label/panel/whatever. eg selecting rows in a table. -igor On 3/9/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote: On Thursday, 08 March 2007 07:58 pm, Igor Vaynberg escreveu: > see above. take a simple example where you have a list of checkboxes and > you want all selected objects to end up in a collection. how do you do it? > sounds like a complex mapping? the most elegant way is to write a custom > model. Can you use a CheckBoxMultipleChoice for this? > > class mypage extends page { > private Set selected=new HashSet(); > > private class PersonCheckboxModel implements IModel { > private final IModel person; > public final PersonCheckBoxModel(IModel person) { > this.person=person; } > > public Boolean getObject() { > return selected.contains(person.getObject()); > } > > public void setObject(Boolean b) { > if (Boolean.TRUE.equals(b)) { > selected.put(person.getObject()); > } else { > selected.remove(person.getObject()); > } > } > > public void detach() { person.detach(); } > } > > } > > now all you have to do is > > LoadableDetachableModel person=new LoadalbeDetachableModel(id); > new CheckBox(this, "cb", new PersonCheckBoxModel(person)); > > and everything magically works, hope it gives you some ideas. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Frustracted with JDBC...
you do know that session.load() will return a proxy even if the object doesnt exist, where as session.get() will return null. -igor On 3/9/07, ChuckDeal <[EMAIL PROTECTED]> wrote: Scott Swank wrote: > > If you have lazy-loaded objects in your graph then they are initially > populated with Hibernate proxies and only resolved from the database > when you access them in your application code. I imagine that in one > case the Hibernate transaction is being closed before you have walked > the object graph far enough to retrieve all of the relevant objects, > while in the other case the transaction is still open and so Hibernate > can resolve the proxies. > > Try looking at any relevant settings on the jdbc drivers. We're using > jtds successfully (to the degree that anyone uses sql server > successfully). > > Scott > Yeah, I thought of that, but given the following code, you'll see that that isn't the case. Yet, the load() statement fails in my scenario. I made a very simple Parent and Child class test that doesn't suffer from this problem. But, my complex objects do. My guess is that I have a "bad" mapping, but my REAL concern is that with one driver it works and the other it doesn't! SpecChangeModelObject result; Session sess = hibernateSessionFactory.openSession(); Criteria criteria = sess.createCriteria(SpecChangeModelObject.class); criteria.add(Restrictions.idEq("{8D6A620D-B094-46CB-A6E7-34B4CE99EECD}")); result = (SpecChangeModelObject) criteria.uniqueResult(); assertNotNull("SpecChangeModelObject should not be null", result); assertNotNull("ResponsibleIndividuals should not be null", result.getResponsibleIndividuals()); assertFalse("ResponsibleIndividuals.isEmpty failed", result.getResponsibleIndividuals().isEmpty()); assertEquals("ResponsibleIndividuals.size failed", 2, result.getResponsibleIndividuals().size()); result = (SpecChangeModelObject) sess.load(SpecChangeModelObject.class, "{8D6A620D-B094-46CB-A6E7-34B4CE99EECD}"); assertNotNull("SpecChangeModelObject should not be null", result); // will fail on the next line! assertNotNull("ResponsibleIndividuals should not be null", result.getResponsibleIndividuals()); assertFalse("ResponsibleIndividuals.isEmpty failed", result.getResponsibleIndividuals().isEmpty()); assertEquals("ResponsibleIndividuals.size failed", 2, result.getResponsibleIndividuals().size()); sess.close(); Chuck -- View this message in context: http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9399084 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Frustracted with JDBC...
igor.vaynberg wrote: > > you do know that session.load() will return a proxy even if the object > doesnt exist, where as session.get() will return null. > > -igor > Yeah, but that really doesn't apply to this sceanrio. I KNOW that there is data. I KNOW that with either driver, when I use a Criteria object I do get the non-empty set. I KNOW that with one driver, when I use load() I get a non-empty set, but with the other driver it returns an empty set. I swear, the ONLY change that I make is to switch the JDBC driver class and adjust the connection URL. I know that it works because I do get *some* data, just not all of it. Chuck -- View this message in context: http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9399846 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Frustracted with JDBC...
I'd look for something like auto-commit inserting itself between these two lines. result = (SpecChangeModelObject) criteria.uniqueResult(); assertNotNull("SpecChangeModelObject should not be null", result); but that's just my best guess. Scott - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxTimer clearTimeout
On 3/7/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > Hi all, > I have a panel with an AjaxTimerBehavior that can be replaced through an > AjaxLink by another panel. However, this leaves the AjaxTimerBehaviors > setTimeout behind to fire off after the replacement. When it fires and > wicket can't resolve the requested component, a redirect to the containing > page occurs, causing an unsightly refresh and flicker. > > First, is there a way to short circuit this redirect? > > If not, what would be a good pattern for preventing this timeout when the > component is replaced? > > I think the best way would be to wrap the javascript timer function in a > check to see if it should still fire. This will be easy to do if generated > markupIds are unique even when one component replaces another. Can someone > confirm that is the case? Another way would be to capture the timeoutId and > clear it when the component gets replaced. That code already smells and it > hasn't even left my brain :). Hmmm, yeah, that's interesting. Maybe others thought of this before, but I hadn't. So we can add header (/body?) contributions via ajax dynamically now. What we want here is the opposite: remove them when the linked component was removed/ replaced, right? Eelco - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxTimer clearTimeout
On 3/9/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Hmmm, yeah, that's interesting. Maybe others thought of this before, but I hadn't. So we can add header (/body?) contributions via ajax dynamically now. What we want here is the opposite: remove them when the linked component was removed/ replaced, right? Eelco Right, my first instinct was to ask for an onRemove as part of the component/behavior lifecycle. But with larger issues looming for wicket, I decided to hold off. Turns out my problem with the AjaxTimer was pretty straight forward to solve since wicket generates unique ids for all components even if they occupy the same place in the hierarchy. In case anyone is interested, you just need to override getCallbackScript : @Override protected CharSequence getCallbackScript(boolean recordPageVersion) { String mId = getComponent().getMarkupId(); StringBuilder sb = new StringBuilder("exec_func(function() { "); sb.append("var el = wicketGet('" + mId + "'); "); sb.append("if(null != el) {"); sb.append(super.getCallbackScript(recordPageVersion)); sb.append("}"); sb.append("})"); return sb.toString(); } This just wraps it in an anonymous func that checks to see if the dom element is still there before calling the timer. exec_func is necessary because the anonymous function is passed to setTimeout as string and ff is not happy with that (it does only what it says). But it is a hack and I would love to have a wicket way of doing this. Thanks for getting back to me. best, jim - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AjaxTimer clearTimeout
Hi, I'm afraid there's no easy solution. But two thoughts are quiete right. Either you can clearTimeout, or wrap the setTimeout method callback (not the settimeout itself!) to check a condition whether it actually can fire ajax request to server. But for both these you will need to slightly modify AbstractAjaxTimerBehavior. -Matej James McLaughlin wrote: > Hi all, > I have a panel with an AjaxTimerBehavior that can be replaced through an > AjaxLink by another panel. However, this leaves the AjaxTimerBehaviors > setTimeout behind to fire off after the replacement. When it fires and > wicket can't resolve the requested component, a redirect to the > containing page occurs, causing an unsightly refresh and flicker. > > First, is there a way to short circuit this redirect? > > If not, what would be a good pattern for preventing this timeout when > the component is replaced? > > I think the best way would be to wrap the javascript timer function in a > check to see if it should still fire. This will be easy to do if > generated markupIds are unique even when one component replaces another. > Can someone confirm that is the case? Another way would be to capture > the timeoutId and clear it when the component gets replaced. That code > already smells and it hasn't even left my brain :). > > Any other ideas? > > thx, > jim > > > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Spring design in Wicket
Thanks a lot. I definitely have to learn more of it :) ZedroS On 3/9/07, Erik van Oosten <[EMAIL PROTECTED]> wrote: > Hi, > > ZedroS Schwart wrote: > > - one can follow a "Domain Driven Design", with a manager per kind of > > object. > > > That is a major simplification, but yes, that is true. > > > - In the Spring ApplicationContext file, I should only define > > implementations and in my Java code I should only use interfaces. > > > > Is that correct ? > > > Yes. > > > BTW, could you advice me some goods books on the topic ? I'm reading a > > french book on it, but it doesn't detail the design aspects of it... > > > I gave you one already, but I think a book in Spring would be more > helpful (for example 'Spring in Action', or 'Pro Spring'). > > Regards, > Erik. > > -- > Erik van Oosten > http://www.day-to-day-stuff.blogspot.com/ > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] mountBookmarkablePage problem
I cannot seem to get mountBookmarkablePage() to work. Any time I try an access a page through the mapping I set up, I get a 404 error. The strange thing is, if I set up a wicket Link in my app to link to the mounted page, it puts the proper mapped address in the browser's address bar but still gives a 404 error. So it recognizes the mapping but can't find the page. If I remove the mountBookmarkablePage() call, run the app and click the link it finds the page just fine. I even tried mounting the entire package (since all my wicket components are in the same package), but get a 404 error when trying to access the app at all. Is it at all possible that the application server is to blame? That it's trying to map the address before passing it to the wicket servlet? I'm using oc4j 10.1.3.1.1 and don't have much of a choice on what app server I use. I'm baffled why something so basic in wicket is simply not working, and I'm completely out of ideas. Thanks. Joel - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] mountBookmarkablePage problem
make sure your servlet mapping ends with /* and not just / -igor On 3/9/07, Joel Hill <[EMAIL PROTECTED]> wrote: I cannot seem to get mountBookmarkablePage() to work. Any time I try an access a page through the mapping I set up, I get a 404 error. The strange thing is, if I set up a wicket Link in my app to link to the mounted page, it puts the proper mapped address in the browser's address bar but still gives a 404 error. So it recognizes the mapping but can't find the page. If I remove the mountBookmarkablePage() call, run the app and click the link it finds the page just fine. I even tried mounting the entire package (since all my wicket components are in the same package), but get a 404 error when trying to access the app at all. Is it at all possible that the application server is to blame? That it's trying to map the address before passing it to the wicket servlet? I'm using oc4j 10.1.3.1.1 and don't have much of a choice on what app server I use. I'm baffled why something so basic in wicket is simply not working, and I'm completely out of ideas. Thanks. Joel - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Design questions: Use of controllers and wicket models
On Friday, 09 March 2007 11:57 am, Igor Vaynberg escreveu: > yes, but then you are married to the output it genereates. > > [] label > [] label > > whats below you can use just for the checkbox, so you are free to generate > your own label/panel/whatever. eg selecting rows in a table. Ooooh - thanks! > > -igor > > On 3/9/07, Thomas R. Corbin <[EMAIL PROTECTED]> wrote: > > On Thursday, 08 March 2007 07:58 pm, Igor Vaynberg escreveu: > > > see above. take a simple example where you have a list of checkboxes > > > and you want all selected objects to end up in a collection. how do you > > > do > > > > it? > > > > > sounds like a complex mapping? the most elegant way is to write a > > > custom model. > > > > Can you use a CheckBoxMultipleChoice for this? > > > > > class mypage extends page { > > > private Set selected=new HashSet(); > > > > > > private class PersonCheckboxModel implements IModel { > > > private final IModel person; > > > public final PersonCheckBoxModel(IModel person) { > > > this.person=person; } > > > > > > public Boolean getObject() { > > > return selected.contains(person.getObject()); > > > } > > > > > > public void setObject(Boolean b) { > > > if (Boolean.TRUE.equals(b)) { > > > selected.put(person.getObject()); > > > } else { > > > selected.remove(person.getObject()); > > > } > > > } > > > > > > public void detach() { person.detach(); } > > > } > > > > > > } > > > > > > now all you have to do is > > > > > > LoadableDetachableModel person=new LoadalbeDetachableModel(id); > > > new CheckBox(this, "cb", new PersonCheckBoxModel(person)); > > > > > > and everything magically works, hope it gives you some ideas. > > > > - > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] How to get a dynamic home page?
Hi, I face a small problem: the first page of my application must display data coming from the Wicket filter initialization parameters in web.xml. So I redefined WebApplication.init() to read the parameters. But now, how can these values be used in WebApplication.getHomePage() or as the parameters for the user first request? Thanks for your assistance. -- Pierre Métras - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] 你=好
--柏远实/业有-限-公-司- 您.好! 本公司以(低.税.率)代.办"珠三角地区"各专用票|类业|务,如:商品销售、其他服|务行业发|票等;真伪性绝对%。如有需求欢.迎来.电咨.询,进一步洽/商与合/作! 手机:13544271905 联 系 人:杨先生 [EMAIL PROTECTED]/2/6.co/m - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to get a dynamic home page?
You can read them in in your home page's constructor ((WebApplication)Application.get()).getInitParameter("foo") Eelco On 3/9/07, Pierre Métras <[EMAIL PROTECTED]> wrote: > Hi, > > I face a small problem: the first page of my application must display data > coming from the Wicket filter initialization parameters in web.xml. So I > redefined WebApplication.init() to read the parameters. But now, how can > these values be used in WebApplication.getHomePage() or as the parameters for > the user first request? > > Thanks for your assistance. > > -- Pierre Métras > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to get a dynamic home page?
Hi, Eelco Hillenius wrote: > > You can read them in in your home page's constructor > ((WebApplication)Application.get()).getInitParameter("foo") > I forgot to tell that there is no difference between the home page and secondary pages. In secondary pages, I can obtain dynamic information from request parameters. From what I understand, I have to create 2 classes: one for the home page to get the information from the constructor, and the other one for the secondary pages. I hoped I could avoid this duplication of code/html. Thanks --Pierre Métras -- View this message in context: http://www.nabble.com/How-to-get-a-dynamic-home-page--tf3379386.html#a9406773 Sent from the Wicket - User mailing list archive at Nabble.com. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in 2.0
Regarding the constructor change in 2.0, in some of my components (in wicket 1.2) I used wicket 2.0 type constructor where i could pass null as the parent. In such a scenario I would have to add the child components explicitly. When i passed a non-null value to the constructor the component would be auto added by the parent. In addition regarding the use for generics in IModels, I liked that idea a lot. That helps simplify coding a lot, removing unnecessary type casts for model Object all the time. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to get a dynamic home page?
You only have to code it once, if you share a base page. Alternatively (or additionally), take a look at IPageFactory. Eelco On 3/9/07, genepi <[EMAIL PROTECTED]> wrote: > > Hi, > > > Eelco Hillenius wrote: > > > > You can read them in in your home page's constructor > > ((WebApplication)Application.get()).getInitParameter("foo") > > > > I forgot to tell that there is no difference between the home page and > secondary pages. In secondary pages, I can obtain dynamic information from > request parameters. > From what I understand, I have to create 2 classes: one for the home page to > get the information from the constructor, and the other one for the > secondary pages. I hoped I could avoid this duplication of code/html. > > Thanks > > --Pierre Métras > -- > View this message in context: > http://www.nabble.com/How-to-get-a-dynamic-home-page--tf3379386.html#a9406773 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Question about DataGridView
Hi, I have a little question, I'm using a DataGridView to display dynamic columns in table, each row has modify link, view detail link, and a selecting chckbox that when user select some checkbox and submit delete button, rows with selected checkbox will be deleted. modify link & view detail link work ok, because I can get each row's object from rowModel in ICellPopulator#populateItem to pass into Link#onClick to modify/view detail of each row. But now I have 3 problems: - with the checkbox I can't get the list of selected row, I try to do DataGridView.getModelObject but it return null, so my question is how can I get list of model object in current page of DataGridView, it take IDataProvider rather than IModel, not like ListView, isn't it used for displaying only not for modifying in form because it does not hold any model and so can't update it's model? - how can I get row index of each row, in ICellPopulator#populateItem(Item cellItem, String componentId, IModel rowModel), both cellItem & rowModel seem to contain no detail of row index. - how to dynamic change style of each row to class="odd"/class="even" up to row index in DataGridView. Thank you, Blackzabaha The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Question about DataGridView
On 3/9/07, blackboy zabaha <[EMAIL PROTECTED]> wrote: - with the checkbox I can't get the list of selected row, I try to do DataGridView.getModelObject but it return null, so my question is how can I get list of model object in current page of DataGridView, it take IDataProvider rather than IModel, not like ListView, isn't it used for displaying only not for modifying in form because it does not hold any model and so can't update it's model? i have very recently described how to do this in this thread: *[Wicket-user] Design questions: Use of controllers and wicket models * - how can I get row index of each row, in ICellPopulator#populateItem(Item cellItem, String componentId, IModel rowModel), both cellItem & rowModel seem to contain no detail of row index. there should be a method on Item like getIndex() - how to dynamic change style of each row to class="odd"/class="even" up to row index in DataGridView. see how DataTable does, namely DataTable.newRowItem() i believe. -igor Thank you, Blackzabaha The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Reverting the constructor change of 2.0
Hi, It looks like the discussion around reverting the constructor change that we did for 2.0 has cooled down. This email is not a vote yet, but a summary of opinions so far[1]. Those of you Wicket committers who didn't have your say yet (Juergen, Frank, Gwyn, Janne, Jan, Ate), I consider that an OK for reverting. If not, please reply to the thread. Juergen, you have been working on 2.0 quite a bit. Can you please state your opinion, and can you tell us whether there are more functional differences between 1.3 and 2.0 other than the constructor change, Java 5 features, the attach/ detach change and improved models and validators?[2] I think so far we can safely say reverting is supported broadly. At least, of the people who reacted, most stated they actually preferred add over the new constructor, and those who were either neutral or had a slight preference for the new constructor would still support reverting as that would keep the momentum for the project going. So, it looks like this may happen. But we'll vote about that in a few days. Before we do that, we have to reach consensus on the package we'll vote on. We have some different - and strong - opinions[3] so we need to find a way to bridge that. Here are what I think the different opinions: a) focus on stabilizing 1.3 first, meanwhile keep supporting 2.0 (though only for bugfixes). 1.4 will be the release with backports of the currently missing 2.0 features, and 1.5 will be 1.4 + the Java 5 features (including generics). b) as a) but rather than developing 1.3 up to a final release, freeze asap (only fix bugs) and start on 1.4 c) put all backports except for the Java 5 features in 1.3 after the beta1 release (which we agreed upon doing this weekend). 1.4 will be for the Java 5 features, and the branch should be started as soon as 1.3 is feature complete. Maybe the most constructive way to gather opinions here is to first let people plainly state what they prefer before we enter discussion mode. So, please state what package you think is the best idea (or introduce d if you want), and why. Cheers, Eelco [1] http://www.nabble.com/IMPORTANT%3A-your-opinion-on-the-constructor-change-in-2.0-tf3358738.html#a9350505 http://www.nabble.com/Re%3A-IMPORTANT%3A-your-opinion-on-the-constructor-tf3359229.html#a9344068 [2] http://www.nabble.com/State-1.3--features-tf3376983.html [3] http://www.nabble.com/VOTE%3A-backporting-wicket-2.0-model-change-to-1.3-tf3364601.html http://www.nabble.com/roadmap-tf3366743.html - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] AJAX validation
* Arnout Engelen: > So far it seems either Apache2, mod_caucho or Resin (2.1.16) is eating > the POST body parameters. Has anyone ever seen something like this? Any > idea where to look? Is POST followed by a redirect? If yes, is the URL missing a trailing slash? What Wicket version are you using? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Reverting the constructor change of 2.0
> a) focus on stabilizing 1.3 first, meanwhile keep supporting 2.0 > (though only for bugfixes). 1.4 will be the release with backports of > the currently missing 2.0 features, and 1.5 will be 1.4 + the Java 5 > features (including generics). > > b) as a) but rather than developing 1.3 up to a final release, freeze > asap (only fix bugs) and start on 1.4 > > c) put all backports except for the Java 5 features in 1.3 after the > beta1 release (which we agreed upon doing this weekend). 1.4 will be > for the Java 5 features, and the branch should be started as soon as > 1.3 is feature complete. I feel very strongly about choosing c). Imo, a) takes too long for the people currently working on 2.0 (including myself for Wicket In Action). We basically tell them to hold their breath until we are ready for it, which in fact punishes them twice for being early adaptors (who I think we should value especially giving the type of framework Wicket is). I think b) would be good if it worked. However, I don't believe it will. We have been annoyingly slow in putting out releases this year. Sure there have been lots of reasons for it, but the fact remains that even though we plan to move fast with releases, we never actually do[1]. And with all the best intentions, I have absolutely not doubt that if we follow b), it'll be months up to a year before we reach 1.5. So for me c) is the best package. We'll have the pain (of which I doubt the intensity for most people, but let's play with Johan's branch for that) now, which probably sucks, but it is the quickest way to get things really stable. We will have implemented all the API changes we have been thinking about the last 1.5 years, and 1.3 will be a release that'll be good for a long time. We'll have a separate branch for Java 5 stuff with 1.4, but as long as we want to support Java 1.4, we'll have that anyway. The code should be largely the same except for the generified components and models and some 1.5 constructs. Compared to maintaining the current 2.0 and 1.3, that should be a piece of cake. A final argument for c) is that it just pushes us to get it over with. My 2c, Eelco [1] http://www.nabble.com/remove-add%28%29-and-pass-parent-in-constructor--tf929620.html The interesting thing there is that even back then there was discussion on whether to break early or not. I think in hind-sight we can say that it was a bad decision we didn't do it right away, which makes my opinion about c) even stronger. We might have been 'stuck' with the new constructor forever you may argue, but otoh, we might have found out it wasn't gonna work earlier. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user