Re Wicket Web Beans
Hi Would like to know if some one has used Wicket Web Beans in their wicket projects? One of our requirements is to add fields at runtime and be able to render it on the front end. So in this case , I have no control of building the panels for some fields that are 'yet' to be created and to infer what UI component(textfield, drop downs, radio box) should be rendered when I try to view those fields on the front end. Also will I be able to add validation rules to these fields at the same time the field is defined? I am using Wicket as the primary framework for the web layer and hibernate for the backend. I am hoping that this toolkit will be helpful in addressing this requirement. If anyone of you have used this toolkit would like to hear about your experiences. I am yet to embark on this path but in the meantime welcome your thoughts. Thanks Reg Niv -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-Web-Beans-tp2326481p2326481.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: DropDownChoice does not push value into Model
James Could you please clarify this for me, I noticed is that with PropertyModel usage in the above context. I have to define one(PropertyModel instance) for each of the form component explicitly, like so 1. ModelStudyModel studyModel = new ModelStudyModel(new StudyModel());/Top level Model In the Form: I associate the studyModel above in the constructor and ModelStudyModel pModel = (Model)getModel(); 2. firstName = new TextField(studyName,new PropertyModelStudy(pModel.getObject().getStudyName(),studyName)); // I am manually telling it to navigate to a property ..thought it will be nice if its automatic based on the expression I am unable to create a single instance like PropertyModelStudy propertyModel = new PropertyModelStudy(studyModel, study); And then use propertyModel instance for each component. Am I missing something here? Thanks again Niv -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2326600.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is WicketFilter.checkCharacterEncoding() safe?
As solution I can see using HttpServletRequestWrapper instead of dealing directly with the HttpServletRequest passed by the container. This way we can provide custom implementation of HttpServletRequestWrapper that overrides javax.servlet.ServletRequestWrapper.getCharacterEncoding() and if super.getCharacterEncoding() returns 'null' then use the preconfigured one in the settings and cache it. If other devs think this solution is ok then please create a ticket and we will improve it. On Sun, Aug 15, 2010 at 6:32 PM, Harald Wellmann harald.wellm...@multi-m.de wrote: I'm not sure if this is severe or not, but I think there's a gap in the implicit assumptions underlying WicketFilter.checkCharacterEncoding(): It seems the author's intention was to guarantee a postcondition of servletRequest.getCharacterEncoding() != null, but this postcondition does not hold in all cases. I ran into this issue after upgrading my Glassfish app server from 3.0.1 to 3.1-b12, containing a newer release of Weld which causes the problem to appear. After this upgrade, my log was full of warnings of the following type: WARN o.apache.catalina.connector.Request - PWC4011: Unable to set request character encoding to UTF-8 from context /xxx, because request parameters have already been read, or ServletRequest.getReader() has already been called Setting a couple of breakpoints revealed that Weld registers a ServletRequestListener and calls request.getParameter() in that listener. By specification, this listener gets called before all servlet filters, including WicketFilter, and again by specification, the invocation of servlet.request.setCharacterEncoding() from WicketFilter has no effect, since a request parameter has already been read by the WeldListener. So it there are other parts of Wicket relying on the request character encoding to be non-null, then this looks like a bug to me. Otherwise, if Wicket handles a null character encoding gracefully, then checkCharacterEncoding() is redundant, because it cannot be guaranteed to have any effect. Regards, Harald - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: UploadProgressBar does not work in Safari browser?
Does anyone know if any patches were submitted for this or does anyone know of some code that can work? We're finding more and more of our users are Chrome and Safari and its becoming a pain. I have tried looking at this but my javascript knowledge is beginner at best. thanks for any help or pointers Wayne On Sat, Jul 4, 2009 at 9:46 PM, Mathias Nilsson wicket.program...@gmail.com wrote: After dealing with this for a long time I desided to make my own servlet and AJAX communication and that works. It seams to be a problem for Safari, Chrome to make a GET request to resources/classpath. I don't see anything other than that that messes up the UploadProgressBar to work in all browsers. Also, there is a bug in the percentage width for safari and Opera. You could do this by changing the % width to pixels and solve the problem. -- View this message in context: http://www.nabble.com/UploadProgressBar-does-not-work-in-Safari-browser--tp21571997p24337460.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Scroll to tabpanel
Do i need to create css file for that On Mon, Aug 16, 2010 at 1:45 AM, vineetsemwal [via Apache Wicket] ml-node+2326413-28146642-136...@n4.nabble.comml-node%2b2326413-28146642-136...@n4.nabble.com wrote: don't add them in wicket:panel/ vineet semwal -- View message @ http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2326413.html To unsubscribe from Re: How to add Scroll to tabpanel, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_codenode=2325315code=YXJ1bmFrdW1tYXJpQGdtYWlsLmNvbXwyMzI1MzE1fC00Njg4NjYxODg=. -- Regards Aruna.R 404-988-5562 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2326753.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: How to get submitting component in onError()?
On Sun, Aug 15, 2010 at 5:24 PM, b...@actrix.gen.nz wrote: Hi James, Thank you very much for your reply. It didn't work because the form was submitted with input type=image, and I did not add an ImageButton for it. Things would be a little easier if there was an overridable onClick() method for submitting components not this Where was I type of back to front logic. There's an onSubmit that you can override in Button. When using an ImageButton, one is forced to store the image as resource in the Java package structure which is another complication because web designers want to control such images in the web directory. You can use other kinds of resources (that don't have to be packaged in the src directory), you can relocate your resources, or you can use a regular old Button or SubmitLink attached to a tag of your liking. -- Jeremy Thomerson http://www.wickettraining.com
Re: DropDownChoice does not push value into Model
On Mon, Aug 16, 2010 at 5:42 AM, nivs shravann...@gmail.com wrote: 2. firstName = new TextField(studyName,new PropertyModelStudy(pModel.getObject().getStudyName(),studyName)); It should be: new PropertyModelString(pModel, studyName). The first argument to PropertyModel's constructor is the root for the property expression. If it's a model, Wicket knows to get the model's object and apply the property expression to that. What you're doing is telling Wicket to set up a property model where a String is the root and the propertyExpression is studyName. There is no studyName property on the String class, so that won't work. Also, your expression and your model type (Study) don't match here. You're telling it to traverse to the study name (which is a String I assume) and you're saying the model is of type Study. The property navigation you're trying to do won't work either. All that does is traverse the property before the method is called and passes its value in to the method as a parameter. It's not recording anything. I would just go with the simplest solution for now to get you going. Don't try to get too fancy too fast. Walk before you run. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Scroll to tabpanel
i meant don't add style in wicket:panel tag ,add it to say div.. wicket:panel div style= my style your markup /div /wicket:panel - vineet semwal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2326816.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: [Vote] wicketstuff-core structure to support wicket 1.5 related development
[X] wicket 1.5 branch is set to wicket 1.5-SNAPSHOT and if there is demand we can cut releases to match the wicket milestones and/or release candidates. -Original Message- From: Michael O'Cleirigh [mailto:michael.ocleir...@rivulet.ca] Sent: Friday, August 13, 2010 10:16 PM To: users@wicket.apache.org Cc: d...@wicket.apache.org Subject: [Vote] wicketstuff-core structure to support wicket 1.5 related development Hello, With the first milestone of wicket 1.5 released there has been some interest expressed for a corresponding wicketstuff-core branch. Because wicket 1.5 is basically experimental right now I'm not sure if switching trunk to track it is the best idea. But eventually trunk will track 1.5, probably at the release candidate stage. However, I'm willing to implement the consensus opinion on this. Structure Options: [ ] - trunk to track 1.5, branch for 1.4.11-SNAPSHOT and subsequent releases. (+:no merge later; -: trunk will be broken for an extended period) [ ] - trunk stays on 1.4.x, create new branch to track 1.5-M1. (+: no switch is needed; -: at some point need to merge the branch back into trunk) Wicket 1.5 Options: [ ] wicket 1.5 branch is set to wicket 1.5-M1, hard code to the released milestone and increment with each new version until the 1.5 release. [X] wicket 1.5 branch is set to wicket 1.5-SNAPSHOT and if there is demand we can cut releases to match the wicket milestones and/or release candidates. I'll wait until Monday night (eastern time) before making any changes based on the vote. Thanks, Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component .... not found on page for a Link colun in the Datatable after self refresh using the AjaxSelfUpdatingTimerBehavior
Thanks, that seems to do the trick... Fernando: Returning null does not work since the resolve method requires a not null return value. But if the AjaxLink trick works, it seems I wont be needing to modify the resolve method anyway... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/component-not-found-on-page-for-a-Link-colun-in-the-Datatable-after-self-refresh-using-the-AjaxSelfUr-tp1892913p2327012.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to add Scroll to tabpanel
Thank you very much i got that Regards Aruna.R On Mon, Aug 16, 2010 at 8:48 AM, vineetsemwal [via Apache Wicket] ml-node+2326816-1331009021-136...@n4.nabble.comml-node%2b2326816-1331009021-136...@n4.nabble.com wrote: i meant don't add style in wicket:panel tag ,add it to say div.. wicket:panel div style= my style your markup /div /wicket:panel vineet semwal -- View message @ http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2326816.html To unsubscribe from Re: How to add Scroll to tabpanel, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_codenode=2325315code=YXJ1bmFrdW1tYXJpQGdtYWlsLmNvbXwyMzI1MzE1fC00Njg4NjYxODg=. -- -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2327131.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Re Wicket Web Beans
Where does your fields come from ? In WWB, you have to provide beans, and configure them with annotations or beanprops files to control the way the beans are displayed. You can provide beans and they will be correctly displayed in a default way, with proper editing inputs according to the datatype of each field. But both the beans and the (optional) configurations need to be coded, you will not be able to provide WWB with a stream of isolated fields. Regarding validations, some are provided by WWB itself (required), anything else will be rather hard to add with standard WWB, but you can provide customized input field implementations (see customfields example). Of course those custom fields will not be used by default, you will have to configure the properties to use them. See live examples here: http://jweekend.com/wicketwebbeans-examples-1.1/WebBeans/ And the source code for the examples here: http://code.google.com/p/wicket-web-beans/source/browse/#svn/trunk/wicketwebbeans-examples/src/main/java/com/googlecode/wicketwebbeans/examples Hth, Daniel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-Web-Beans-tp2326481p2327195.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
rendering Wicket components to HTML
Hi, First of all, before I get flamed - I've seen many topics about this since I've been looking into this: http://www.mail-archive.com/users@wicket.apache.org/msg27512.html http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/ http://apache-wicket.1842946.n4.nabble.com/Wicket-PDF-Page-Project-td1934168.html My problem is that I am trying to get the rendered contents of a Page to hopefully post process it and make a PDF out of it (using Flying Saucer) - because of this I need to reference the currently running application for the WicketTester (otherwise the application properties aren't available) So, the standard WicketTester approach looks like this as far as I can tell: public static String toString(Class? extends Page pageClass) { final WicketTester renderer = new WicketTester((WebApplication) Application.get()); renderer.startPage(pageClass); String renderedSource = renderer.getServletResponse().getDocument(); return renderedSource; } The problem with this approach is that the init method of the application now runs twice (once when the app starts and once when this code runs). This is causing an error because we are mounting resources which don't like being mounted twice. I have tried the other approach suggested from Dan Walmsley and haven't had any luck with this either - can anyone get this to work? Am I just making this terribly hard on myself - is it really this complicated to render a Page to a String? Thanks very much for any feedback you might be able to offer. Joe
AjaxPagingNavigator give out strange error
I tried to use AjaxPagingNavigator in a simple page in Eclipse Helio with WTP (configured tomcat6). When debug, it just gives out a raw API page of ExceptionErrorPage with mismatched close tag error that reference the API page. Couple of other pages in the same app are working fine. I then tried to just copy pasted the original Wicket Example PageablesPage into my WebApplication, same thing. I commented out the AjaxPagingNavigator object, everything works fine. I step through the entire page, all components on PageablesPage are fine. The first Exception thrown is at Component class render : [code] org.apache.wicket.markup.MarkupException: Tag 'DT' (line 103, column 1) has a mismatched close tag at '/DL' (line 104, column 1) [markup = jar:file:/H:/DOCUMENTS/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/hfweb/WEB-INF/lib/wicket-1.4.10-javadoc.jar!/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigator.ht [/code] Which is already referring to the AjaxPagingNavigator API page (I have the wicket Javadoc package from Maven in the env.) I cannot even see the error even when I'm stepping through the whole thing line by line. The only error comes out is from API page markup error when its trying to render. Would really appreciate it if anyone can help. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxPagingNavigator-give-out-strange-error-tp2327360p2327360.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-extensions alive?
ok, I had read that in a post from several years ago, it just didnt make sense to me, because I thought alive and well would mean that is has some ability to work with a more current version of wicket. a bit misleading first response. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-extensions-alive-tp2324725p2327366.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom AJAX component...
I have seen that wiquery for instance takes another approach in for instance their AutoCompleteBehavior. In that class they override respond() and get the response from the requestcycle and start writing to it, like this: @Override protected void respond(AjaxRequestTarget target) { // response: outputing the list of results as a js map ListAutocompleteValueT, E results = autocomplete(); Response response = this.getComponent().getRequestCycle().getResponse(); response.write({); for (AutocompleteValueT, E autocompleteValue : results) { autocompleteValue.write(response); } response.write(}); } If this is the correct approach it would be nice because it would allow me to have complete control over generating the response. But, is this a valid approach? Will it not interfere with the default response? Or is everything ok as along as no components are added to the request target? Can anyone comment on the validity of this approach? If this is not a recommended approach then what is the correct approach to take for getting complete control over the response content from an ajax behavior? Cheers Erik
Re: Custom AJAX component...
I have been looking around a bit more and it seems like Wicket in Action provides a solution on p.260 (the book keeps on growing on me). It looks like the idea is to extend AbstractAjaxBehavior and use RequestCycle.get().setRequestTarget(new StringRequestTarget(myString)); or more generically use ResourceStreamRequestTarget. From the looks of it, the wicket-specific ajax library comes in through AbstractDefautAjaxBehavior. It beats me why some libraries are still extending AbstractDefaultAjaxBehavior if they are integrating a custom framework. Cheers Erik
How to render Enum values as RadioGroup and set default value
I have an User class with a gender field using a Gender-Enum: public class User implements DomainObjectLong { ... private Gender gender; I want to bind this gender field to a radiogroup (representing all enum values) in a registration form. This is what I did so far: code public enum Gender { MALE, FEMALE }; public class RegistrationEntryPanel extends Panel { private User user = new User(); public RegistrationEntryPanel(String id) { super(id); // default value user.setGender(Gender.MALE); CompoundPropertyModel userModel = new CompoundPropertyModel(user); final RadioGroupGender genderGroup = new RadioGroupGender( genderGroup, userModel.bind(gender)); Form form = new Form(form, userModel) { @Override protected void onSubmit() { System.out.println(USER: + user); } }; add(form); form.add(genderGroup); // gender Gender[] genderValues = Gender.values(); ListGender genders = Arrays.asList(genderValues); ListViewGender genderList = new ListViewGender(genderList, genders) { @Override protected void populateItem(ListItemGender item) { item.add(new RadioGender(radio, item.getModel())); item.add(new Label(label, getString(item.getModelObject() .toString(; } }; genderGroup.add(genderList); } } /code This works so far: I can select a radio button and the value in the user object is changed on submit. But as I have to use different models for the group and the listview, the default setting with user.setGender has no effect. How can I preselect the first radio button of the listview or better the dedicated MALE radio button? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[Notice] wicketstuff-core trunk is now tracking wicket 1.5-SNAPSHOT
Hello, Based on the vote there were 3 votes for and none against. All those who voted wanted trunk to track 1.5-SNAPSHOT versus a stable milestone. I have created a branch to track wicket 1.4-SNAPSHOT here: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4 I have just changed the pom.xml in trunk to wicket 1.5-SNAPSHOT so right now there will be errors but there is a place to commit changes to. The wicketstuff-core version is now 1.5-SNAPSHOT. Developers that want to continue to track the 1.4 branch will have to use the svn switch command in their working copy to move it to the new location. Regards, Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: style=\display:none\
Thanks a lot Igor for your quick response and the fix. That did the trick. Cheers, Satish -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Thursday, August 12, 2010 4:49 PM To: users@wicket.apache.org Subject: Re: style=\display:none\ should be fixed in branch. now is a good time to build a snapshot and use it since 1.4.10 was just released and there are not too many commits into the branch yet. -igor On Thu, Aug 12, 2010 at 4:15 PM, Satish Nekkalapudi snekkalap...@walmart.com wrote: Thank you Igor for your response. The style=display:none for div is causing the problem. The reason why the forms are not working is the hidden variables like wicket:interface within div with 'style=display:none'is ignored by large number of mobile devices. They are working if display:none is removed. This is how I confirmed this. I created two sample forms with method=get and accessed on mobile devices with problems: one with style=display:none http://ieagleye.com/w5/ (On form submission in the mobile this never showed the hidden variables in the url ) div style=display:none; input id=hidden_data type=hidden name=hidden_data value=hiddenData/ /div other with style=visibility:hidden http://ieagleye.com/w6/ (On form submission in the mobile the hidden variables showed up in the url) div style=visibility:hidden; input id=hidden_data type=hidden name=hidden_data value=hiddenData/ /div Please note that this has to be tested in mobile devices with problems and it works fine in the browser. Cheers, Satish -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Thursday, August 12, 2010 3:42 PM To: users@wicket.apache.org Subject: Re: style=\display:none\ are you completely sure that the div is causing the problem? doesnt make sense. -igor On Thu, Aug 12, 2010 at 3:00 PM, Satish Nekkalapudi snekkalap...@walmart.com wrote: Hi, We are using Wicket 1.4.9 for very large mobile application. We are unable to process any forms on a large number of mobile devices. The problem caused by line 1923 of org.apache.wicket.markup.html.form.Form. This line adds a style=\display:none\ to div inside of the form: // render the hidden field AppendingStringBuffer buffer = new AppendingStringBuffer( div style=\display:none\input type=\hidden\ name=\).append(nameAndId) .append(\ id=\) .append(nameAndId) .append(\ /); Does anyone have suggestion for how to suppress the style=\display:none\ so that we can make our forms work for all devices? Cheers, Satish - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re Wicket Web Beans
Hi Daniel Thank you for getting back so quickly. I used Hibernate that maps to entities in the table. Fields are defined by an administrator when he creates a new entity like Study(Hibernate entity for Study). There is a standard table called Study however if the administrator feels this new study he is creating requires additional fields he then will do the following Create Scenario: 1. Click a button to add new field 2. Provides the Field Name (either types it in or selects from a list of data dictionary fields) 3. Selects a data type from a drop down ( I have created this table with required data types so this can be sourced) 4. Enters a value for the new field. 5. Optionally, he must be able to provide the type of control this field will be linkedf to ( guess #4 and 5 are inter-related) or can WWB infer this? Not sure about this part. 6. On Save - The New field meta data is stored along with the data in another table that links to this meta data table. View/Edit Scenario: When a user reads or looks up this entity, it should bring back the general fields and the custom fields that were defined. Now, the UI should be rendered. Will I be able to use WWB in this scenario? I guess if I don't use WWB then, i have to stored field UI meta data along with values in separate tables and infer this when the UI is rendered. Will be quite a task. Thanks for your time Dan, I was planning on playing with WWB and see if my requirements can be met using WWB. Reg Niv On Tue, Aug 17, 2010 at 1:13 AM, Daniel Toffetti dto...@yahoo.com.arwrote: Where does your fields come from ? In WWB, you have to provide beans, and configure them with annotations or beanprops files to control the way the beans are displayed. You can provide beans and they will be correctly displayed in a default way, with proper editing inputs according to the datatype of each field. But both the beans and the (optional) configurations need to be coded, you will not be able to provide WWB with a stream of isolated fields. Regarding validations, some are provided by WWB itself (required), anything else will be rather hard to add with standard WWB, but you can provide customized input field implementations (see customfields example). Of course those custom fields will not be used by default, you will have to configure the properties to use them. See live examples here: http://jweekend.com/wicketwebbeans-examples-1.1/WebBeans/ And the source code for the examples here: http://code.google.com/p/wicket-web-beans/source/browse/#svn/trunk/wicketwebbeans-examples/src/main/java/com/googlecode/wicketwebbeans/examples Hth, Daniel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-Web-Beans-tp2326481p2327195.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Re Wicket Web Beans
It sounds like what you're after is a dynamic form. This has been discussed several times on the list and used to be detailed in the wiki. It's pretty straightforward to implement. Hopefully this gives you an implementation option. On Mon, Aug 16, 2010 at 7:17 PM, Nivedan Nadaraj shravann...@gmail.comwrote: Hi Daniel Thank you for getting back so quickly. I used Hibernate that maps to entities in the table. Fields are defined by an administrator when he creates a new entity like Study(Hibernate entity for Study). There is a standard table called Study however if the administrator feels this new study he is creating requires additional fields he then will do the following Create Scenario: 1. Click a button to add new field 2. Provides the Field Name (either types it in or selects from a list of data dictionary fields) 3. Selects a data type from a drop down ( I have created this table with required data types so this can be sourced) 4. Enters a value for the new field. 5. Optionally, he must be able to provide the type of control this field will be linkedf to ( guess #4 and 5 are inter-related) or can WWB infer this? Not sure about this part. 6. On Save - The New field meta data is stored along with the data in another table that links to this meta data table. View/Edit Scenario: When a user reads or looks up this entity, it should bring back the general fields and the custom fields that were defined. Now, the UI should be rendered. Will I be able to use WWB in this scenario? I guess if I don't use WWB then, i have to stored field UI meta data along with values in separate tables and infer this when the UI is rendered. Will be quite a task. Thanks for your time Dan, I was planning on playing with WWB and see if my requirements can be met using WWB. Reg Niv
Re: Re Wicket Web Beans
Hi Niv, I'm not sure if I just get your domain model right, the closest I think you can get is something like this: http://jweekend.com/wicketwebbeans-examples-1.1/WebBeans/?wicket:interface=:0:2::: Where you can have a list (a table) of fields, each with a name, a datatype and a value. But all values in each column will be represented with one single type of input field. Perhaps you can attempt to create a custom field for the value property, that renders a different input for each datatype, but I'm not sure if this can be done at all. One problem is, how to re-render the input if the datatype changes ? Don't think WWB allows that easily. Cheers, Daniel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-Web-Beans-tp2326481p2327733.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DynamicWebResource double request
Hello, guys Can you please advise me on the proper implementation of the DynamicWebResource subclass? When I override the abstract methods I see that my getResourceState() is called twice. The resource is registered in Wicket and is used to generate a JavaScript data. Thanks, Dmitry -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DynamicWebResource-double-request-tp2327741p2327741.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: rendering Wicket components to HTML
pass in a dummy application to tester -igor On Mon, Aug 16, 2010 at 11:20 AM, Joe Hudson joe.hud...@clear2pay.com wrote: Hi, First of all, before I get flamed - I've seen many topics about this since I've been looking into this: http://www.mail-archive.com/users@wicket.apache.org/msg27512.html http://www.danwalmsley.com/2008/10/21/render-a-wicket-page-to-a-string-for-html-email/ http://apache-wicket.1842946.n4.nabble.com/Wicket-PDF-Page-Project-td1934168.html My problem is that I am trying to get the rendered contents of a Page to hopefully post process it and make a PDF out of it (using Flying Saucer) - because of this I need to reference the currently running application for the WicketTester (otherwise the application properties aren't available) So, the standard WicketTester approach looks like this as far as I can tell: public static String toString(Class? extends Page pageClass) { final WicketTester renderer = new WicketTester((WebApplication) Application.get()); renderer.startPage(pageClass); String renderedSource = renderer.getServletResponse().getDocument(); return renderedSource; } The problem with this approach is that the init method of the application now runs twice (once when the app starts and once when this code runs). This is causing an error because we are mounting resources which don't like being mounted twice. I have tried the other approach suggested from Dan Walmsley and haven't had any luck with this either - can anyone get this to work? Am I just making this terribly hard on myself - is it really this complicated to render a Page to a String? Thanks very much for any feedback you might be able to offer. Joe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom AJAX component...
In case of wiQuery, many behaviors wicket AJAX is used (not jquery AJAX) so it seem natural to use AbstractDefaultAjaxBehavior. In other cases probably you are right and it is over killing. Is that what you are asking? Cheers, Ernesto On Mon, Aug 16, 2010 at 10:47 PM, Erik Brakkee erik.brak...@gmail.com wrote: I have been looking around a bit more and it seems like Wicket in Action provides a solution on p.260 (the book keeps on growing on me). It looks like the idea is to extend AbstractAjaxBehavior and use RequestCycle.get().setRequestTarget(new StringRequestTarget(myString)); or more generically use ResourceStreamRequestTarget. From the looks of it, the wicket-specific ajax library comes in through AbstractDefautAjaxBehavior. It beats me why some libraries are still extending AbstractDefaultAjaxBehavior if they are integrating a custom framework. Cheers Erik - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org