[Wicket-user] double trouble
hi, I am having a couple of problems with doubles. 1. when I hand a double into a TextField the value is often rounded. Is there a way to make sure this does not happen? 2. i would like to validate an entry so that it has a maximum of x digits after the decimal. Is there some functionality that will allow me to do this? florian - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
Hi all, I have been on holiday for a while... and I am very much surprised to see this thread still going! Eelco Hillenius wrote: previous post. After all, as far as I could notice, he's the only one who didn't make fun of this thread's initiator in his first response. You know how it is with programmers... always passionate about their stuff :) I didn't think Florian deserved such a strong reaction, as I think it's good he let us know on what grounds some people don't choose Wicket (though such posts come dangerously close to flame baits), and maybe we can learn from that. That said, I agreed with the reasoning of most other reactions. It was far from being my intention to start any kind of flame-war. On the contrary I was just sad that my team had not decided to go with wicket , and as Eelco said I thought it was good to let the wicket community know what had happened... feedback is always better then none. I did not take any of the comments posted back badly. I have nothing but respect for Wicket and it's community. Further-more I am looking at how I can use Wicket on some other personal projects to keep on discovering all of it's features. Anyway... let this be the last post in this thread. Please. florian - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
Hi John, John Krasnay wrote: Amongst Wicket's many advantages, the following stand out for me: - The ability to encapsulate UI components, including all required markup, CSS, Javascript, and localization files, into shared JARs on the classpath. Having a shared component library is key to our team, since we tend to develop many small Web apps. - The ability to aggregate smaller components into larger and more complex ones. This allows us to create much richer pages, since we can think at an appropriate level of abstraction: I can just throw our standard page banner component on a page without thinking about the fact that it contains a logo, the app title, and a list of global navigation links. (In fact, it's even simpler than that. The banner is added by the base page that each app page extends.) - The fact that the same principles of a component tree and markup inheritance work from the smallest components right up to the entire page. This is very different from most Model2 frameworks, where you need something like SiteMesh or Tiles to add common banners and navbars to pages, and from JSF, where the internal structure of components is very different that the way they are composed into pages. I agree with you that these are some of the strongest benefits of Wicket. In my experience these facts were seen as a disadvantage... and I am still trying to figure out why? My group is a very strong OOP group yet the fully contained component advantage of Wicket was not appealing. The only reason I can find for these irrational conclusion is that the Model 2 frameworks out there have defined themselves as THE proper web implementation of MVC. Furthermore, our need for web-apps are peripheral to our main business. We typically need to put together many small support web-applications. so, Having a re-usabble set of components which require zero-config would have been a great advantage. florian - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] wicket did not make the grade.
HI all, I am sad to announce that my company did not choose to use wicket after comparison with struts 2. :-( One criticism that came out as we were looking at Wicket code was that there seems to be a need to write a lot of Java code in a ListView for such things as displaying a table. Although I did not see this issue as out-weighing all the benefits, many of my colleagues did. Is there any plan or push or hidden feature that allows for a bean to be directly mapped to a template without having to declare new Label(...) for each field in the ListView. I think this would be a great win for Wicket if adding those low-level components was only necessary when one wants to add special handling, formating, validation, etc. thanks, Florian. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
Hi, The 3 key arguments against wicket were: -It will be easier to hire someone with Struts knowledge on top of the fact that we have some in-house knowledge with it. -Struts is the de-facto standard with a lot of community/vendor/documentation support -Struts seems heavy on the java-code required for things that are pretty simple with struts I agree that it was not a pure technology issue in the end and that the comparison was not purely on technical capabilities. The ability to build clean self-contained components as wicket allows was not at all appreciated. They did not see the potential for us to build our own custom components on top. Oddly enough that was seen as an improper separation of concern because then java is used for presentation aspects like layout. Frankly I think this is an idea that has been manufactured by other frameworks to sell their scattered technology/markup/syntax framework approaches. I have dabbled with other frameworks and thought that for default behavior it would be nice not to have a line of code per label in a table. There was a comment that there is different handling in a DataView. But is that true? I have used them and I had to add new Label(...) in the populateItem() method. anyways... what can you do... I still think wicket is a pretty dam good framework. thanks, florian Peter Thomas wrote: I am sad to announce that my company did not choose to use wicket after comparison with struts 2. :-( One criticism that came out as we were looking at Wicket code was that there seems to be a need to write a lot of Java code in a ListView for such things as displaying a table. Although I did not see this issue as out-weighing all the benefits, many of my colleagues did. All I'll say is that I'm personally sure this is not about technology - this has to be politics, and these colleagues must have already learnt Struts2 and want to protect their investment or have the misconception that Struts2 == Struts1. Or maybe they were swayed by some presentation that used job search statistics to compare web ui frameworks... Sometimes it is a waste of time to try and convince people. Been there done that. Just move on. Regards, Peter. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
hi, oops! first a correction: Struts seems heavy on the java-code required for things that are pretty simple with Struts should have read Wicket seems heavy on the java-code required for things that are pretty simple with Struts2 Struts 2 is a complete re-wite... yes and no. It's nothing like struts 1.x . But it's pretty much a re-branded version of WebWorks. In other words the Struts team marketing strategy worked: Use a well known name and put something else behind it. regards, florian Matej Knopp wrote: But you've decided to use struts2. Struts 2 is a complete rewrite, it's different than struts 1. -Matej On 6/5/07, Florian Hehlen [EMAIL PROTECTED] wrote: Hi, The 3 key arguments against wicket were: -It will be easier to hire someone with Struts knowledge on top of the fact that we have some in-house knowledge with it. -Struts is the de-facto standard with a lot of community/vendor/documentation support -Struts seems heavy on the java-code required for things that are pretty simple with struts I agree that it was not a pure technology issue in the end and that the comparison was not purely on technical capabilities. The ability to build clean self-contained components as wicket allows was not at all appreciated. They did not see the potential for us to build our own custom components on top. Oddly enough that was seen as an improper separation of concern because then java is used for presentation aspects like layout. Frankly I think this is an idea that has been manufactured by other frameworks to sell their scattered technology/markup/syntax framework approaches. I have dabbled with other frameworks and thought that for default behavior it would be nice not to have a line of code per label in a table. There was a comment that there is different handling in a DataView. But is that true? I have used them and I had to add new Label(...) in the populateItem() method. anyways... what can you do... I still think wicket is a pretty dam good framework. thanks, florian Peter Thomas wrote: I am sad to announce that my company did not choose to use wicket after comparison with struts 2. :-( One criticism that came out as we were looking at Wicket code was that there seems to be a need to write a lot of Java code in a ListView for such things as displaying a table. Although I did not see this issue as out-weighing all the benefits, many of my colleagues did. All I'll say is that I'm personally sure this is not about technology - this has to be politics, and these colleagues must have already learnt Struts2 and want to protect their investment or have the misconception that Struts2 == Struts1. Or maybe they were swayed by some presentation that used job search statistics to compare web ui frameworks... Sometimes it is a waste of time to try and convince people. Been there done that. Just move on. Regards, Peter. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket did not make the grade.
Hi, The comparison was a bit skewed where I showed the richness of such components as a DataView(sortable and pageable) in wicket and that was compared with a simple static table on Struts 2. Johan Compagner wrote: Wicket if adding those low-level components was only necessary when one wants to add special handling, formating, validation, etc. and where is then the binding specified? What kind of data should be displayed where? Well how about simply binding a DataView to a the Model and assume that for all wicket:id in the html template I should find a getter method in the bean? regards, Florian PS: I agree wiith all you guys that this is not a big issue... that it's more a question of style/philospophy and possibly fashion. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] form silently failing to load data when template and pojo are different
hi, I have just found that if a form contains an input type=text/ and the corresponding pojo contains myForm.add(new TextAre(...)) then wicket fails to load data into the form but it will correctly read the data onSubmit. is this a known bug it sure took me a long time to resolve it. regards, Florian. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] wicket vs. struts presentation
Hi all, I am looking for help presenting wicket to my development team. 1-Has anyone out there had to defend wicket vs. struts and would you have any resources/links/presentations to pass this way to help in presenting wicket to our group? 2-Has anyone made any measurements/analysis of the code-base needed for identical application in wicket vs. struts(or any other framework) 3-Objectively, I am also looking for what wicket is weak at. florian - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket vs. struts presentation
Hi, Thanks for the feedback. We are contemplating doing some prototyping. I am currently implementing a small application within the group with wicket but it is not clear weather we will have the time to do the same for struts. On the other hand most people in the group have some level of experience with struts. When is 1.3 being released? regards, florian Johan Compagner wrote: can't you make 2 prototypes of the same application with your team and then see how it works? 3-Objectively, I am also looking for what wicket is weak at. hope you have a magnifying glass with you then because that is ofcourse hard to find ;) But most people would say i guess use of session memory. But we manage that for you and in 1.3 this is much lighter then before. And i have seen struts apps that did take 1MB of session memory and most of the time that where also leaks because of session objects that wheren't cleaned correctly because the developer needed some state from Page X to Page Y. but forgot to clean it up or the user never got to Page Y. johan - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket vs. struts presentation
Hi, the reason we are comparing to Struts is that that's one of the contender. We are not a web-app shop. We need a general purpose toolkit for intranet development. But since struts is so popular it's being pitted against wicket. Florian Erik van Oosten wrote: Hi Florian, 1- I am surprised you want to compare against Struts. Almost any modern web framework will kick ass compared to Struts. 2- I know only of one. It is the first article on this page on the wiki: http://cwiki.apache.org/WICKET/articles-about-wicket.html. It has a very nice comparison of Wicket and JSF listings. Its a simple application, you can easily image how to do it in Struts. 3- Wicket is weak at sites that need to handle millions of hits per minute (not many frameworks are good at this). Wicket is also not very good if you need absolute and complete control on the format of your URLs. These are both extremes. I think Wicket will do very well for at least 90% of the web applications. Good luck, Erik. Florian Hehlen-2 wrote: Hi all, I am looking for help presenting wicket to my development team. 1-Has anyone out there had to defend wicket vs. struts and would you have any resources/links/presentations to pass this way to help in presenting wicket to our group? 2-Has anyone made any measurements/analysis of the code-base needed for identical application in wicket vs. struts(or any other framework) 3-Objectively, I am also looking for what wicket is weak at. florian - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] I see a lot of questions and talk about DropDownChoice and IChoiceRenderer.
hi all, thanks for all the input on DDC. I have finally gotten the DDC to work. My problem was that I was mixing up the OO notions in the DDC and the html notions of the select tab anyways it's working well now. I just had to make sure that the list of objects passed to the DDC was also the object that would be set in my form model object. Instead I was providing object s to the DDC and hoping it would set strings in my form model object. About the IConverter... this is very interesting. I will need to experiment with these because they might allow me to get around an other problem I have: my business objects are not bean-compatible! Am I correct in thinking that I could use converters to do custom mapping when dealing with non-bean-compatible pojos? At the moment I get around the problem by implementing a proxy layer of simple pojos. I can live with this at the moment because I don't have very many data objects to render in wicket and in many cases they are complex enough object-graphs that I my proxy layer is not simply a one-to-one mapping layer but rather a layer of synthetic data objects. An example of this is I have an object graph on the DB side made up of 1 parent and 5 children records/objects and I really only ever want to render one table row on a web page for each one of those graphs. anyways... thanks again for the help... this mailing-list is quite useful. florian Thomas R. Corbin wrote: On Friday 18 May 2007 4:27 pm, Johan Compagner escreveu: a converter and choice renderer is not really the same thing But i guess if you give a list of strings to the DDC that it displays then the converter can convert the selected object to that string and back again that should also work yes. Cool. Actually, what I do is load objects from the db using ibatis and give those to the DDC and the converter pulls the strings to display. Works really well. the choicerender is if you don't want to do that upfront but just have a list of Objects/Pojos and the selected object is also that Object/Pojo then you the toString is done for you johan On 5/18/07, Thomas R. Corbin [EMAIL PROTECTED] wrote: I had started to use a ChoiceRenderer when I started with wicket, but quickly found that registering a converter was easier for me. Is that an unusual way of dealing with DDC? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer
Hi Igor, Check my response to Re: [Wicket-user] I see a lot of questions and talk aboutDropDownChoice and IChoiceRenderer. I have figured it out and thanks for the help. Florian Igor Vaynberg wrote: since you are using a compound property model, and create your ddc with id categories you are trying to access bean.getCategories() property, but i see no such property defined. so why is your form model compound? once again i urge you to read the models wiki page. -igor On 5/18/07, *Florian Hehlen* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Here is the bean... sorry I should have thought to include it: package com.sag.ids.web.data.dto; import com.sag.ids.api.datamodel.java.*; import java.io.*; public class SymbolDto implements Serializable { public String getIdsDocoId() { return theIdsDocoId; } public void setIdsDocoId(String aIdsDocoId) { theIdsDocoId = aIdsDocoId; } public long getIdsSymbolId() { return theIdsSymbolId; } public void setIdsSymbolId(long aIdsSymbolId) { theIdsSymbolId = aIdsSymbolId; } public String getName() { return theName; } public void setName(String aName) { theName = aName; } public String getCategoryName() { return theCategoryName; } public void setCategoryName(String aCategoryName) { theCategoryName = aCategoryName; } public String getCategoryId() { return theCategoryId; } public void setCategoryId(String aCategoryId) { theCategoryId = aCategoryId; } public String getProductTypeName() { return theProductTypeName; } public void setProductTypeName(String aProductTypeName) { theProductTypeName = aProductTypeName; } public String getProductTypeId() { return theProductTypeId; } public void setProductTypeId(String aProductTypeId) { theProductTypeId = aProductTypeId; } public String getUnderlyingTypeName() { return theUnderlyingTypeName; } public void setUnderlyingTypeName(String aUnderlyingTypeName) { theUnderlyingTypeName = aUnderlyingTypeName; } public String getUnderlyingTypeId() { return theUnderlyingTypeId; } public void setUnderlyingTypeId(String aUnderlyingTypeId) { theUnderlyingTypeId = aUnderlyingTypeId; } public String getCurrencyName() { return theCurrencyName; } public void setCurrencyName(String aCurrencyName) { theCurrencyName = aCurrencyName; } public String getCurrencyId() { return theCurrencyId; } public void setCurrencyId(String aCurrencyId) { theCurrencyId = aCurrencyId; } public String getExchangeName() { return theExchangeName; } public void setExchangeName(String aExchangeName) { theExchangeName = aExchangeName; } public String getExchangeId() { return theExchangeId; } public void setExchangeId(String aExchangeId) { theExchangeId = aExchangeId; } public String getDescription() { return theDescription; } public void setDescription(String aDescription) { theDescription = aDescription; } public String getTradingHours() { return theTradingHours; } public void setTradingHours(String aTradingHours) { theTradingHours = aTradingHours; } public String getUrl() { return theUrl; } public void setUrl(String aUrl) { theUrl = aUrl; } public double getMultiplier() { return theMultiplier; } public void setMultiplier(double aMultiplier) { theMultiplier = aMultiplier; } public void setDaoActionError(String aResult) { theDaoActionErrorState = true; theDaoActionError = aResult; } public boolean isDaoActionErrorState() { return theDaoActionErrorState
Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer
Hi, Thanks for the help... It's starting to make more sense to me although still not working. The issue is definitely with the form model. because all my sandbox experiments show me that it all goes to hell when i introduce the model in the form. My form is a a bean wrapped in a CompoundPropertyModel. Maybe you can clarify below your explanation in that context. florian Igor Vaynberg wrote: if you type it it looks like this DDCT(String,IModelT,IModelListT,IChoiceRendererT) the first model is the one that holds the selection, the second is the one that holds a list of available choices. the constructor with a single model: DDCT(String,IModelListT,IChoiceRendererT) is used when you use DDC in combination with a compound property model on the form, in which case the ddc's id is used as a property expression into form's model to determine the selection. there is a great wiki page on models. so try this myForm.add(new DropDownChoice(select,new Model(),new MyChoices(),myRenderer)); this will create a ddc with a null selection. its not practical, because to get the selection you have to call ddc.getmodelobject(), but it will at least get you going before you decide on what model to use. -igor On 5/16/07, *Florian Hehlen* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: hi, I am new to wicket so I am not sure how simple this issue is. I am creating DropDownChoice components. I want to a) build the the Options from a list of Objects (not primitives) and b) want to render the option id and value as an attribute of the object in the list. this definitly works in the following sample code: public class WicketSandbox extends WebPage { public WicketSandbox() { addPageTitle(Development Sandbox); final Form myForm = new Form(form); add(myForm); final ChoiceRenderer myRenderer = new ChoiceRenderer(name, id); myForm.add(new DropDownChoice(select,new MyChoices(),myRenderer)); } } But as soon as I add an IModel to the form it seems that the DropDownChoice looks up the choices in the form's IModel. I have tried to use the other constructors for the DropDownChoice which require an (String id, IModel model, IModel choices, IChoicerenderer renderer) but I can't figure out what is the difference between the 2 IModel objects that have to be provided. If I provide twice a ref to the same object I get a different error: The expression 'id' is neither an index nor is it a method for the list class java.util.ArrayList this is an improvement because it is accessing the right object and retrieving the list of choices but not extracting the the objects from the list as it does when I use (String id, IModel choices, IChoicerenderer renderer). In all cases if I remove the ChoiceRenderer my web page builds and displays but I see object.toString() values in my drop-downs. Any tips or pointers would be greatly appreciated. Florian Hehlen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer
Here is the bean... sorry I should have thought to include it: package com.sag.ids.web.data.dto; import com.sag.ids.api.datamodel.java.*; import java.io.*; public class SymbolDto implements Serializable { public String getIdsDocoId() { return theIdsDocoId; } public void setIdsDocoId(String aIdsDocoId) { theIdsDocoId = aIdsDocoId; } public long getIdsSymbolId() { return theIdsSymbolId; } public void setIdsSymbolId(long aIdsSymbolId) { theIdsSymbolId = aIdsSymbolId; } public String getName() { return theName; } public void setName(String aName) { theName = aName; } public String getCategoryName() { return theCategoryName; } public void setCategoryName(String aCategoryName) { theCategoryName = aCategoryName; } public String getCategoryId() { return theCategoryId; } public void setCategoryId(String aCategoryId) { theCategoryId = aCategoryId; } public String getProductTypeName() { return theProductTypeName; } public void setProductTypeName(String aProductTypeName) { theProductTypeName = aProductTypeName; } public String getProductTypeId() { return theProductTypeId; } public void setProductTypeId(String aProductTypeId) { theProductTypeId = aProductTypeId; } public String getUnderlyingTypeName() { return theUnderlyingTypeName; } public void setUnderlyingTypeName(String aUnderlyingTypeName) { theUnderlyingTypeName = aUnderlyingTypeName; } public String getUnderlyingTypeId() { return theUnderlyingTypeId; } public void setUnderlyingTypeId(String aUnderlyingTypeId) { theUnderlyingTypeId = aUnderlyingTypeId; } public String getCurrencyName() { return theCurrencyName; } public void setCurrencyName(String aCurrencyName) { theCurrencyName = aCurrencyName; } public String getCurrencyId() { return theCurrencyId; } public void setCurrencyId(String aCurrencyId) { theCurrencyId = aCurrencyId; } public String getExchangeName() { return theExchangeName; } public void setExchangeName(String aExchangeName) { theExchangeName = aExchangeName; } public String getExchangeId() { return theExchangeId; } public void setExchangeId(String aExchangeId) { theExchangeId = aExchangeId; } public String getDescription() { return theDescription; } public void setDescription(String aDescription) { theDescription = aDescription; } public String getTradingHours() { return theTradingHours; } public void setTradingHours(String aTradingHours) { theTradingHours = aTradingHours; } public String getUrl() { return theUrl; } public void setUrl(String aUrl) { theUrl = aUrl; } public double getMultiplier() { return theMultiplier; } public void setMultiplier(double aMultiplier) { theMultiplier = aMultiplier; } public void setDaoActionError(String aResult) { theDaoActionErrorState = true; theDaoActionError = aResult; } public boolean isDaoActionErrorState() { return theDaoActionErrorState; } public String getDaoActionError() { return theDaoActionError; } private long theIdsSymbolId = -1; private String theIdsDocoId; private String theName = NEW SYMBOL; private String theCategoryName = ; private String theCategoryId = ; private String theProductTypeName = ; private String theProductTypeId = ; private String theUnderlyingTypeName = ; private String theUnderlyingTypeId = ; private String theCurrencyName = ; private String theCurrencyId = ; private String theExchangeName = ; private String theExchangeId = ; private String theDescription = ; private String theTradingHours = ; private String theUrl = ; private double theMultiplier = -1; private String theDaoActionError =; private boolean theDaoActionErrorState; } Igor Vaynberg wrote: no, it doesnt really help since we cant see the bean that is inside mySymbol. as far as the example below: see the use of loadabledetachablemodel below. also you are specifying the same model for selection and list of choices, that makes no sense. if whatever bean inside mySymbol model has a categories property, then see my correction below. -igor On 5/18/07, *Florian Hehlen* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: public class SymbolAddUpdate extends WebPage { public SymbolAddUpdate(PageParameters aParams) { addFeedback(); addPageTitle(Add/Update Symbol
Re: [Wicket-user] I see a lot of questions and talk about DropDownChoice and IChoiceRenderer.
Hi, Do you have a snipet of code you could share on how you do this? Florian Thomas R. Corbin wrote: I had started to use a ChoiceRenderer when I started with wicket, but quickly found that registering a converter was easier for me. Is that an unusual way of dealing with DDC? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] DropDownChoice with IModel and ChoiceRenderer
hi, I am new to wicket so I am not sure how simple this issue is. I am creating DropDownChoice components. I want to a) build the the Options from a list of Objects (not primitives) and b) want to render the option id and value as an attribute of the object in the list. this definitly works in the following sample code: public class WicketSandbox extends WebPage { public WicketSandbox() { addPageTitle(Development Sandbox); final Form myForm = new Form(form); add(myForm); final ChoiceRenderer myRenderer = new ChoiceRenderer(name, id); myForm.add(new DropDownChoice(select,new MyChoices(),myRenderer)); } } But as soon as I add an IModel to the form it seems that the DropDownChoice looks up the choices in the form's IModel. I have tried to use the other constructors for the DropDownChoice which require an (String id, IModel model, IModel choices, IChoicerenderer renderer) but I can't figure out what is the difference between the 2 IModel objects that have to be provided. If I provide twice a ref to the same object I get a different error: The expression 'id' is neither an index nor is it a method for the list class java.util.ArrayList this is an improvement because it is accessing the right object and retrieving the list of choices but not extracting the the objects from the list as it does when I use (String id, IModel choices, IChoicerenderer renderer). In all cases if I remove the ChoiceRenderer my web page builds and displays but I see object.toString() values in my drop-downs. Any tips or pointers would be greatly appreciated. Florian Hehlen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user