Re: Label and textfiled component
thanks guys. I was working on someone else's code and thought I might need that. We did use FormComponents but eventually I didn't have to associate these components. What we did is: create an Enum that holds the keys (for the markup), type (field / area) and enabled status. In the init method, we run on all values of this enum, for each one we created a TextField (or TextArea) and added it and the label to the form. According to the enabled status, we have set the styling class dynamically. Thanks On Sun, Mar 23, 2008 at 11:34 PM, Maurice Marrink [EMAIL PROTECTED] wrote: If you want to build your own FormComponentWithLabel component you probably want to use FormComponentPanel. Maurice On Sun, Mar 23, 2008 at 6:50 PM, James Carman [EMAIL PROTECTED] wrote: On Sun, Mar 23, 2008 at 1:05 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see formcomponentlabel And, if you wanted to bake your own FormComponentWithLabel component, that's a great idea. However, some folks might display a component's label and the component itself completely differently (some might use a table for instance) than the way you do it. So, I don't know if it would be a good candidate for a cross-project, reusable component. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/
file uploads
Hi I am using the file upload component in wicket and I like to set the folder path to save uploaded files. Folder folder = new Folder(Uploads); folder.mkdirs(); File newFile = new File(folder,fileUpload.getClientFileName()); This code snippet saves the files in a folder called 'uploads' but is created inside the resin folder. How do I specify a relative path so that a folder is created inside my project directory thanks tbt -- View this message in context: http://www.nabble.com/file-uploads-tp16249006p16249006.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: the checkRequired () magic is back (bug or a normal behavior?)
done On Thu, Mar 20, 2008 at 2:03 AM, Vitaly Tsaplin [EMAIL PROTECTED] wrote: Oh, sorry. I meant write in javadoc :) On Thu, Mar 20, 2008 at 2:02 AM, Vitaly Tsaplin [EMAIL PROTECTED] wrote: For me that's probably fine if you will clearly right in javadoc that anyone who overrides checkRequired should carefully call isRequired in order to conform the common behavior. On Thu, Mar 20, 2008 at 1:33 AM, Johan Compagner [EMAIL PROTECTED] wrote: Thats all fine, but it was not build/designed that way period... The biggest api break was at the moment we removed final, which was there for quite sometime, and then sneaky add javadoc that it is required to call isRequired first before calling this method! but before that for this public callable method this was not needed, so everybody who uses that method suddenly breaks because of a sneaky javadoc update and the removal of the final keyword. What the javadoc should have stated is that overrides should ALWAYS first check the isRequired() itself just like the method that they override already did for 2 years! The removal of the final keyword had in this particular case big consequentes it really changed the api behavior. Johan On 3/20/08, Vitaly Tsaplin [EMAIL PROTECTED] wrote: What if a requirement cannot be met if an input contains only spaces. I would override the checkRequired to do so. And it could be done for a text field. Why not? Anyway if I can override checkRequired I may not be calling isRequired and it's perfectly legal. Because the method is under my control. But...setRequired is still there and anyone can call it excpecting it's normal behavior. Setting required property to false (setRequired) should prevent any requirement check whatever it would be. On Thu, Mar 20, 2008 at 12:57 AM, Johan Compagner [EMAIL PROTECTED] wrote: hmm the more i think about it the more i stand with my initial reply. checkRequired was always meant to be standalone it always checked from day 1 if required must be checked (thats why it is called *check*Required) and then it actually did the test. it was first protected final and then a long time public final validateRequired does something else it calls checkRequired and with that return value it sets an adds an error message But that is not always what you want (the reason why checkRequired is public) so validateRequired is not a substitute and i guess checkRequired has to be public because we made it public for a reason. (see the thread) The only thing i come up with now is, but that will break all formcomponentpanels that did have implemented checkRequired(), that we make it final again (keep it public) and create a protected overridable method that can be used in FCP something like protected boolean doRequiredInputCheck() { } or what ever better name we can come up with. that way we suddenly dont have a completely different definition of a method johan On Thu, Mar 20, 2008 at 12:03 AM, Johan Compagner [EMAIL PROTECTED] wrote: no some protected methods can be called just fine from the outside world like validateRequired() (that could be public yes) But checkRequired() doesn't make much to call from the outside world because we have validateRequired() except that validateRequired() does set an error then and doesn't return the actual boolean So i guess that that is the reason why checkRequired() is public. it was first public final that as removed for FormComponentPanel and when it was public final it made perfect sense to also check for required there.. So the definition is really changed when we removed final before that it was really what i thought initially because it is a public callable method (back then the javadoc also didnt specify that it was typically required that isRequired must be callled) so suddenly final is gone and the definition changed... Nobody would call isRequired() before it would call checkRequired() and it was it first few months (2006) it was protected final, then you made it public final because of this thread [Wicket-user] Components Label for FeedbackMessage So if anybody programmed against that method back then because of that thread. Those are not calling
Re: Japanese Wicket book Wicket 1.4
Thank you, Timo. I will see the thread on [EMAIL PROTECTED] thanks. On 2008/03/24, at 5:21, Timo Rantalaiho wrote: On Mon, 24 Mar 2008, Tsutomu Yano wrote: So I have a question about Wicket 1.4. I think the next wicket 1.4 will be 'Wicket 1.3 + Generics' and will be distributed as soon as possible. So if the release will come until this summer, I want to change the schedule of publishing the japanese book and make the book compatible with new wicket 1.4. How the release plan of wicket 1.4? Do you already have the plan? Planning is happening at the moment on [EMAIL PROTECTED] http://www.nabble.com/Planning-Wicket-Next-Generation-td16046194.html ...and a couple of other threads. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Tsutomu YANO benbrand at mac.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file uploads
On Mon, Mar 24, 2008 at 7:31 AM, tbt [EMAIL PROTECTED] wrote: Hi I am using the file upload component in wicket and I like to set the folder path to save uploaded files. Folder folder = new Folder(Uploads); folder.mkdirs(); File newFile = new File(folder,fileUpload.getClientFileName()); By default, your files are saved in a temporary directory. You can just copy your uploaded files to whatever directory you want. Check out the source code to the file upload example for inspiration. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AJAX Dropdown Choices cleared on submit
Hi, I have two dropdowns. Once you select a value from the first dropdown the second dropdown is populated using ajax. I got this to work based on the example on wicketstuff. But when I submit the form the model is null-ed out. I tried to remove the ajax call and then re-submit the form and the model is fine so it looks like the ajax call is actually nulling out my model. Here is the code. AdminSelection adminSelection = new AdminSelection(); adminSelection.setWeek(weekStartInfo.getCurrentWeek()); adminSelection.setLeagueType(ncaa); Form form = new Form(selectWeekForm, new CompoundPropertyModel(adminSelection)) { @Override protected void onSubmit() { //super.onSubmit();get AdminSelection adminSelection = (AdminSelection)getModelObject(); System.out.println(adminSelection); getAdminSelection().setWeek(adminSelection.getWeek()); getAdminSelection().setLeagueType(adminSelection.getLeagueType()); setResponsePage(redirection); } }; add(form); IModel weeks = new AbstractReadOnlyModel() { public Object getObject() { ListWeekStartInfo weeks; try { //System.out.println(selectedType.getLeagueType()); weeks = weekStartManager.getAllWeeksFromDB(selectedType.getLeagueType()); } catch (SystemException systemException) { systemException.printStackTrace(); weeks = Collections.EMPTY_LIST; } if (weeks == null) { weeks = Collections.EMPTY_LIST; } return weeks; } }; ListLeagueInfo leagueTypes = leagueManager.getLeagueTypes(); final DropDownChoice comboChoiceDropDown = new DropDownChoice(leagueType, new PropertyModel(this, selectedType), leagueTypes, //new ChoiceRenderer(leagueTypeDisplay, leagueType)); new LeagueTypeChoiceRenderer()); comboChoiceDropDown.setRequired(true); comboChoiceDropDown.setLabel(new Model(League Type)); form.add(comboChoiceDropDown); final DropDownChoice weeksDropDown = new DropDownChoice( week, new CompoundPropertyModel(new WeekStartInfo()), weeks, new ChoiceRenderer( selectedWeek, selectedWeek)); //weeksDropDown.setRequired(true); weeksDropDown.setOutputMarkupId(true); form.add(weeksDropDown); public class AdminSelection extends BaseInfo { private String leagueType; private int week=-1; /** * Constructs a codeString/code with all attributes * in name = value format. * * @return a codeString/code representation * of this object. */ public String toString() { final String TAB = ; String retValue = ; retValue = AdminSelection ( + leagueType = + this.leagueType + TAB + week = + this.week + TAB + ); return retValue; } public String getLeagueType() { return leagueType; } public void setLeagueType(String leagueType) { this.leagueType = leagueType; } public int getWeek() { return week; } public void setWeek(int week) { this.week = week; } public boolean isAdminLeagueSet() { if (leagueType==null||leagueType.equalsIgnoreCase()) { return false; } else { return true; } } public void invailateAdminLeagueType() {
Re: AJAX Dropdown Choices cleared on submit
What does the Ajax version of the code look like? On Mon, Mar 24, 2008 at 9:37 AM, tdelesio [EMAIL PROTECTED] wrote: Hi, I have two dropdowns. Once you select a value from the first dropdown the second dropdown is populated using ajax. I got this to work based on the example on wicketstuff. But when I submit the form the model is null-ed out. I tried to remove the ajax call and then re-submit the form and the model is fine so it looks like the ajax call is actually nulling out my model. Here is the code. AdminSelection adminSelection = new AdminSelection(); adminSelection.setWeek(weekStartInfo.getCurrentWeek()); adminSelection.setLeagueType(ncaa); Form form = new Form(selectWeekForm, new CompoundPropertyModel(adminSelection)) { @Override protected void onSubmit() { //super.onSubmit();get AdminSelection adminSelection = (AdminSelection)getModelObject(); System.out.println(adminSelection); getAdminSelection().setWeek(adminSelection.getWeek()); getAdminSelection().setLeagueType(adminSelection.getLeagueType()); setResponsePage(redirection); } }; add(form); IModel weeks = new AbstractReadOnlyModel() { public Object getObject() { ListWeekStartInfo weeks; try { //System.out.println(selectedType.getLeagueType()); weeks = weekStartManager.getAllWeeksFromDB(selectedType.getLeagueType()); } catch (SystemException systemException) { systemException.printStackTrace(); weeks = Collections.EMPTY_LIST; } if (weeks == null) { weeks = Collections.EMPTY_LIST; } return weeks; } }; ListLeagueInfo leagueTypes = leagueManager.getLeagueTypes(); final DropDownChoice comboChoiceDropDown = new DropDownChoice(leagueType, new PropertyModel(this, selectedType), leagueTypes, //new ChoiceRenderer(leagueTypeDisplay, leagueType)); new LeagueTypeChoiceRenderer()); comboChoiceDropDown.setRequired(true); comboChoiceDropDown.setLabel(new Model(League Type)); form.add(comboChoiceDropDown); final DropDownChoice weeksDropDown = new DropDownChoice( week, new CompoundPropertyModel(new WeekStartInfo()), weeks, new ChoiceRenderer( selectedWeek, selectedWeek)); //weeksDropDown.setRequired(true); weeksDropDown.setOutputMarkupId(true); form.add(weeksDropDown); public class AdminSelection extends BaseInfo { private String leagueType; private int week=-1; /** * Constructs a codeString/code with all attributes * in name = value format. * * @return a codeString/code representation * of this object. */ public String toString() { final String TAB = ; String retValue = ; retValue = AdminSelection ( + leagueType = + this.leagueType + TAB + week = + this.week + TAB + ); return retValue; } public String getLeagueType() { return leagueType; } public void setLeagueType(String leagueType) { this.leagueType = leagueType; } public int getWeek() { return week; } public void setWeek(int week) { this.week = week; } public boolean isAdminLeagueSet() { if (leagueType==null||leagueType.equalsIgnoreCase()) { return false; } else { return true; } } public void
RE: DataView size() iterator() call order issue
We are using a modified version of the Generic DAO for Hibernate (http://www.hibernate.org/328.html) where we make reuse of common DAO methods such as keyword searches that retrieve corresponding entities as well a total size (both use the same search criteria when determining results so it makes sense to combine the operations). As you stated, we are making two calls the database, but only one call to the DAO (although, as stated in previous responses there are alternative ways to perform one query to achieve this). Our business tier handles the transactions for us (not our DAOs ;o) using an event model (similar to typical BPM systems). Broadcast agents are used to notify our business listeners which in turn process our DAO calls. This gives us an the flexibility to have independent transactions for different business rule operations and makes the most out of code reuse. Avoiding the heavier call makes perfect sense, but couldn't this responsibility be passed to the data provider implementation? It may make more sense if the operation were combined so that the implementation could determine how/when to make the call to the persistence tier for the two operations. I guess I'm not seeing why we need the count before the iterator. The data provider impl can determine whether or not it will make the expensive call for the results. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 2:44 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue knowing the size and the window together seems like a ui requirement, it is a bit strange to me that you have it inside a dao which should cater to business logic. eg, as far as i know there is no single db operation that will produce both, so you are still doing two calls inside the dao. also transaction management should be handled outside the dao, daos are too fine an object to implement transaction management for. anywho, just nitpicking :) size() is called first for a lot of reasons, namely even knowing if there are any rows to retrieve before a much heavier iterator() is called. some clients want to hide a repeater if there are no items visible, and so size() might get called from inside isvisible() as well. idataprovider is quiet old and we havent had many complaints about its design so far. if all you are using is the dataview it should be pretty simple for you to roll your own dataview, if you look at dataview all it does is implement idataprovider handling to feed the pageable view. however, if you do you will also lose datatable as well :| if you got suggestions on how to improve it im all ears. -igor On Fri, Mar 21, 2008 at 11:24 AM, Hoover, William [EMAIL PROTECTED] wrote: When using DataView/IDataProvider size() is called before iterator(int first, int count) causing calls to DAOs to be duplicated. Our current framework that is internally using Hibernate allows one call to be made to a DAO that returns both the total result size and the actual records (based off first/count). The problem is that the first and count are unknown until the iterator method is called- forcing multiple calls to the DAO to retrieve the data (also forcing multiple transactions). What are the reasons behind calling size before iterator? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AJAX Dropdown Choices cleared on submit
My bad. I missed that part when I copied and pasted. comboChoiceDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(weeksDropDown); } }); tdelesio wrote: Hi, I have two dropdowns. Once you select a value from the first dropdown the second dropdown is populated using ajax. I got this to work based on the example on wicketstuff. But when I submit the form the model is null-ed out. I tried to remove the ajax call and then re-submit the form and the model is fine so it looks like the ajax call is actually nulling out my model. Here is the code. AdminSelection adminSelection = new AdminSelection(); adminSelection.setWeek(weekStartInfo.getCurrentWeek()); adminSelection.setLeagueType(ncaa); Form form = new Form(selectWeekForm, new CompoundPropertyModel(adminSelection)) { @Override protected void onSubmit() { //super.onSubmit();get AdminSelection adminSelection = (AdminSelection)getModelObject(); System.out.println(adminSelection); getAdminSelection().setWeek(adminSelection.getWeek()); getAdminSelection().setLeagueType(adminSelection.getLeagueType()); setResponsePage(redirection); } }; add(form); IModel weeks = new AbstractReadOnlyModel() { public Object getObject() { ListWeekStartInfo weeks; try { //System.out.println(selectedType.getLeagueType()); weeks = weekStartManager.getAllWeeksFromDB(selectedType.getLeagueType()); } catch (SystemException systemException) { systemException.printStackTrace(); weeks = Collections.EMPTY_LIST; } if (weeks == null) { weeks = Collections.EMPTY_LIST; } return weeks; } }; ListLeagueInfo leagueTypes = leagueManager.getLeagueTypes(); final DropDownChoice comboChoiceDropDown = new DropDownChoice(leagueType, new PropertyModel(this, selectedType), leagueTypes, //new ChoiceRenderer(leagueTypeDisplay, leagueType)); new LeagueTypeChoiceRenderer()); comboChoiceDropDown.setRequired(true); comboChoiceDropDown.setLabel(new Model(League Type)); form.add(comboChoiceDropDown); final DropDownChoice weeksDropDown = new DropDownChoice( week, new CompoundPropertyModel(new WeekStartInfo()), weeks, new ChoiceRenderer( selectedWeek, selectedWeek)); //weeksDropDown.setRequired(true); weeksDropDown.setOutputMarkupId(true); form.add(weeksDropDown); public class AdminSelection extends BaseInfo { private String leagueType; private int week=-1; /** * Constructs a codeString/code with all attributes * in name = value format. * * @return a codeString/code representation * of this object. */ public String toString() { final String TAB = ; String retValue = ; retValue = AdminSelection ( + leagueType = + this.leagueType + TAB + week = + this.week + TAB + ); return retValue; } public String getLeagueType() { return leagueType; } public void setLeagueType(String leagueType) { this.leagueType = leagueType; } public int getWeek() { return week; } public void setWeek(int week) { this.week = week; } public boolean isAdminLeagueSet()
Re: Redirect after post Issue
I got it working. Basically the ProxyPassReverse directive should use HTTP not AJP. This article helped: http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html Jeremy On Fri, Mar 21, 2008 at 10:35 AM, James Carman [EMAIL PROTECTED] wrote: On 3/21/08, Jeremy Levy [EMAIL PROTECTED] wrote: Sebastiaan, Thanks very much, that helps a lot. It now works. Now that it's working I want to switch it to use ajp instead of http. I understand from your explanation how ProxyPreserveHost was breaking it. However, when I switch to use ajp, I'm seeing the same behavior. I'm having trouble understanding what tomcat is returning in terms of what I should define as my ProxyPassReverse. Is there an easier way to debug this? Here is how my virtualhost looks now: Have you tried asking the tomcat folks? They're much more adept at this stuff than us, I would imagine. They may have seen this sort of stuff before. Can you reproduce the issue with a simple JSP-based example? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localization of DropDownChoice
Erik van Oosten wrote: Hi Greeklinux, Thanks for the link. It helped. Please see my earlier reply on a similar question. http://www.nabble.com/DropDownChoice-getting-value-into-the-model-td15905486.html#a15906830 I am not sure the wiki page is correct. Regards, Erik. greeklinux wrote: Hello, I want to localize a DropDownChoice component. I read the examples http://www.wicket-library.com/wicket-examples/compref/ and http://cwiki.apache.org/WICKET/dropdownchoice-examples.html. The displayed option value is a localized string and the value is a key that will be stored in DB. Now I want to get the value of a selected option and store this in a form CompoundPropertyModel. The Object backing the model will be stored in DB. -code private SelectChoise[] myList = { new SelectChoise(alglg, new ResourceModel(list.alglg)), new SelectChoise(algmd, new ResourceModel(list.algmd)) } DropDownChoice listInput = new DropDownChoice(listInput, formModel, Arrays.asList(myList), new ChoiceRenderer(value, key)); -- But I get a runtime exception. Because the expression key cannot be applied on the class that is backing my formModel. I thought that the key is applied on the List SelectChoise class. Can someone give me a hint? Thanks a lot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Localization-of-DropDownChoice-tp16224334p16254622.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax CheckGroup problem exception: java.lang.IllegalStateException: No Page found for component
Hey Johan, thanks to your tip, I was able to locate the problem. As what you said, each time the page was rendered, I added more checkboxes to the list. I am using fragment that add checkbox. What I did instead, was, using a Map instead of a List: Here is the change: / package and import @SuppressWarnings(unchecked) abstract class EntitiesPanelE extends ConfigurationEntity extends Panel { private static final long serialVersionUID = -4638085092491297735L; private static final int DEFAULT_PAGING = 100; private final String configurationName; private final Class browserClass; private final boolean withSelect; private final int paging; /** True if all items are selected */ private boolean allChecked; /** Maintains a list of checked items. */ private final ListEntityWrapperE checkGroupModel = new ArrayListEntityWrapperE(); /** The select-all check box * */ private MyAjaxCheckBox checkGroup; /** Each select boc * */ /** The list of all entities* */ private ListEntityWrapperE entitiesList; /** The table * */ private DataTable entityDataTable; *private final MapEntityWrapper, EntityCheckBox checkboxesMap;* @SpringBean(name = sageDalSecured) protected SageDal sageDal; EntitiesPanel(String id, String confName, Class browserClass) { this(id, confName, browserClass, false, DEFAULT_PAGING); } EntitiesPanel(String id, String confName, Class browserClass, boolean withSelect, int paging) { super(id); add(HeaderContributor.forCss(EntitiesPanel.class, EntitiesPanel.css )); ... this.withSelect = withSelect; this.configurationName = confName; this.browserClass = browserClass; this.paging = paging; entitiesList = new ArrayListEntityWrapperE(); checkboxesMap = new HashMapEntityWrapper, EntityCheckBox(); addCheckGroup(); } final void addToPanel(SetEntityWrapperE wrappedEntities) { setEntitiesList(wrappedEntities); final boolean listEmpty = (entitiesList.size() == 0); EntityDataProvider entitiesProvider = new EntityDataProvider(entitiesList, getLinkSortProp()); final ListString allFields; if (listEmpty) { allFields = new ArrayListString(); } else { allFields = getAllFields(configurationName); } createTable(entitiesProvider, allFields); } ListAbstractColumn getColumnsForTable(ListString allFields) { ListAbstractColumn columns = new ArrayListAbstractColumn(); for (String field : allFields) { columns.add(createColumn(field)); } return columns; } final PropertyColumn createColumn(final String fieldName) { PropertyColumn p = new PropertyColumn(new Model(getColumnHeader(fieldName)), fieldName, fieldName) { private static final long serialVersionUID = 1L; @Override public void populateItem(Item cellItem, String componentId, IModel rowModel) { ConfigurationEntity confEntity = ((EntityWrapper) rowModel.getObject()) .getEntity(); ... Fragment frag = new CellEntityFrag(componentId, cellFrag, EntitiesPanel.this, strValue); cellItem.add(frag); } }; return p; } /** Subclasses can override */ //protected void onUpdate(AjaxRequestTarget target) { //} // Private Methods private void addCheckGroup() { checkGroup = new MyAjaxCheckBox(allChecked, new PropertyModel(this, allChecked)) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { final boolean isSelected = isChecked(); if (isSelected) { checkGroupModel.addAll(entitiesList); } else { checkGroupModel.clear(); } *CollectionEntityCheckBox checkboxes = checkboxesMap.values(); for (EntityCheckBox check : checkboxes) { check.setOutputMarkupId(true); target.addComponent(check); }* for (EntityWrapper entity : entitiesList) { entity.setSelect(isSelected); } //EntitiesPanel.this.onUpdate(target); } @Override public boolean isVisible() { return (withSelect entitiesList != null entitiesList.size() 0); } }; checkGroup.setOutputMarkupId(true); Label allSelectedLabel = new Label(allSelectedLabel, new Model(Utils .getLocalizationField(allSelected, entities.label.))); add(checkGroup); add(allSelectedLabel); } private void
File upload field inside of a modal?
According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Japanese Wicket book Wicket 1.4
I'm a user of wicket from japan. I have some good news and a question. First, We finally found a wicket user group in Japan - The Wicket User Group Japna aka Wicket-ja. http://www.wicket-ja.org/ I'm a founder of the group. I want to make the group the starting point of WICKET in Japan. Wicket is now very hot technology in Japan. Next, I'm now writing a wicket book in japanese language and plan to publish it at this summer. In current plan, it will be published at July. Very good to hear. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RenderedDynamicImageResource: how to add a random attribute to an URL?
Hi guys, How to add a random attribute to an URL created by a RenderedDynamicImageResource subclass to enforce a browser update on every request? I think I saw it somewhere but I cannot remember where exactly... Vitaly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload field inside of a modal?
dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload field inside of a modal?
No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Funky issue with double quotes (when copied from WIA ebook)
Guys, More than a few times, I've been bitten by a problem with double quote characters when I copy Wicket tags from the WIA PDF into to HTML editor of my IDE (NetBeans). In the NetBeans editor, the copied double-quote characters display with a slight tilt to the right (the normal double quotes display as two vertical lines). So, they are a different type of character, but NetBeans editor renders them fine. And I think the browser (firefox) parses them ok. But when the webapp is run, Wicket gives the following error.. WicketMessage: The wicket:id attribute value must not be empty. May be unmatched quotes?!? And here, you can see the display of the double-quote characters (in the browser error page). a href=”#” wicket:id=”registerLink”Register/a To fix this, I just go delete the double quotes in the NetBeans editor and re-type them. I realize this is probably some kind of font issue, but if there is a way to address this, it would save some people frustration. This is not a big deal, but if someone understands the issue, it might help some of us avoid this. Then again, if it's not obvious what the problem is, if it hurts, don't do it might be a reasonable response. Probably not worth spending any time on investigating. Phil -- Phil Grimm Mobile: (858) 335-3426 Skype: philgrimm336
Re-render after AbstractRestartResponseException() not working in Ajax case
Here is my test code: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private String word; public HomePage(final PageParameters parameters) { add(new FeedbackPanel(feedback) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = FeedbackPanel onBeforeRender()); System.out.println( FeedbackbackMessageModel = + getFeedbackMessagesModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupPlaceholderTag(true)); // if the word blowup is entered, //this register a error message and throw new AbstractRestartResponseException() IModel model = new Model() { private static final long serialVersionUID = 1L; @Override public Object getObject() { if (word != null word.equals(blowup)) { word = -w-e-b-l-e-w-u-p-; HomePage.this.fatal([2/2]This message is from Model.); // why this is NOT render in Ajax? getPage().detach(); System.out.println(! ! ! ! ! throwing new AbstractRestartResponseException()); throw new AbstractRestartResponseException() { private static final long serialVersionUID = 1L; }; } else { return The word is: \ + (word == null ? n u l l : word) + \; } } }; add(new Label(message, model) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = Label onBeforeRender(), model = + getModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupId(true)); Form form = new Form(form, new CompoundPropertyModel(this)); add(form); form.add(new TextField(word).setRequired(true)); AjaxFallbackButton submitButton = new AjaxFallbackButton(submitButton, form) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form f) { if (word != null word.equals(blowup)) { HomePage.this.error([1/2]This message is from onSubmit. There should also be a message from model); } if (target != null) { target.addComponent(HomePage.this.get(feedback)); // clear error feedback if any target.addComponent(HomePage.this.get(message)); } } @Override protected void onError(AjaxRequestTarget target, Form f) { target.addComponent(HomePage.this.get(feedback)); // show updated error feedback } }; form.add(submitButton); } } Things work perfectly in non-Ajax. But in Ajax, after 'throw new AbstractRestartResponseException()' in model, the Ajax response to the browser is wrong in two places. 1) the feedback component don't have the second message register in the model, only the message from onSubmit(target) show. 2) the Ajax response is missing the second half: no Label component and the /ajax-response end tag. = This is the normal Ajax response copy from the debug panel: INFO: Received ajax response (257 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=feedback4 ![CDATA[span id=feedback4 /span]]/componentcomponent id=message1 ![CDATA[span id=message1The word is: bla/span]]/component/ajax-response INFO: Response parsed. Now invoking steps... INFO: Response processed successfully. = This is the Ajax response after 'throw new AbstractRestartResponseException()': INFO: Received ajax response (339 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=feedback4 encoding=wicket1 ![CDATA[span id=feedback4 ul li class=feedbackPanelERROR span class=feedbackPanelERROR[1/2]^This message is from onSubmit. There should also be a message from model/span /li /ul /span]]/component ERROR: Error while parsing response: Could not find root ajax-response element INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... From tracing the wicket code, I just don't see how this can be. I see AjaxResponseTarget#response() is called again, and response.write(/ajax-response); is called on line 539. But in the end the Ajax response is wrong. What is wrong? Is this a bug? Here is the WicketApplication for the non-Ajax case: public class WicketApplication extends WebApplication { public WicketApplication() { } public Class? extends WebPage getHomePage() { return HomePage.class; } @Override public RequestCycle newRequestCycle(Request request, Response response) {
Dropdown Choices
Is it possible to use two objects in a dropdown choice. For instance in the below code I want to use the class Pizza for the model of the form but load it with a list of toppings. When I do it the model of the form is getting set to Topping when I expect it to be Pizza. Thanks for the help. public class Pizza { private String selectedTopping; private String name; } public class Toppings { pirvate int id; private String name; } ListToppings toppingList = some list from a databae final DropDownChoice comboChoiceDropDown = new DropDownChoice( selectedTopping, new CompoundPropertyModel(new Pizza()), toppingList, new ChoiceRenderer(lid, name)); -- View this message in context: http://www.nabble.com/Dropdown-Choices-tp16259995p16259995.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dropdown Choices
Try setting the compoundmodel on the form and the form of the dropdownchoice to null. compoundmodels operate by checking if a parent has a compoundmodel, the component holding the compoundmodel will behave just like a normal model and return the actual object instead of one of its properties. Alternatively you can use a PropertyModel on the dropdownchoice instead of a compoundmodel. Maurice On Mon, Mar 24, 2008 at 9:16 PM, tdelesio [EMAIL PROTECTED] wrote: Is it possible to use two objects in a dropdown choice. For instance in the below code I want to use the class Pizza for the model of the form but load it with a list of toppings. When I do it the model of the form is getting set to Topping when I expect it to be Pizza. Thanks for the help. public class Pizza { private String selectedTopping; private String name; } public class Toppings { pirvate int id; private String name; } ListToppings toppingList = some list from a databae final DropDownChoice comboChoiceDropDown = new DropDownChoice( selectedTopping, new CompoundPropertyModel(new Pizza()), toppingList, new ChoiceRenderer(lid, name)); -- View this message in context: http://www.nabble.com/Dropdown-Choices-tp16259995p16259995.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dropdown Choices
Read about models [1] and the DDC example [2,3]. Considering that this is the N-th posting with exactly the same question and you already know Nabble, how about using the search facilities [4]? Martijn [1] http://cwiki.apache.org/WICKET/working-with-wicket-models.html [2] http://wicket.apache.org/exampledropdownchoice.html [3] http://cwiki.apache.org/WICKET/dropdownchoice-examples.html [4] http://www.nabble.com/forum/Search.jtp?query=dropdownchoice+modellocal=yforum=13974daterange=0startdate=enddate= On 3/24/08, tdelesio [EMAIL PROTECTED] wrote: Is it possible to use two objects in a dropdown choice. For instance in the below code I want to use the class Pizza for the model of the form but load it with a list of toppings. When I do it the model of the form is getting set to Topping when I expect it to be Pizza. Thanks for the help. public class Pizza { private String selectedTopping; private String name; } public class Toppings { pirvate int id; private String name; } ListToppings toppingList = some list from a databae final DropDownChoice comboChoiceDropDown = new DropDownChoice( selectedTopping, new CompoundPropertyModel(new Pizza()), toppingList, new ChoiceRenderer(lid, name)); -- View this message in context: http://www.nabble.com/Dropdown-Choices-tp16259995p16259995.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RenderedDynamicImageResource: how to add a random attribute to an URL?
see NonCachingImage -igor On Mon, Mar 24, 2008 at 11:29 AM, Vitaly Tsaplin [EMAIL PROTECTED] wrote: Hi guys, How to add a random attribute to an URL created by a RenderedDynamicImageResource subclass to enforce a browser update on every request? I think I saw it somewhere but I cannot remember where exactly... Vitaly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RadioChoice vs RadioGroup
I am new to Wicket. Can anyone explain about the difference between RadioChoice and RadioGroup with example and when to use which? Thanks, Sanjay
Re: File upload field inside of a modal?
usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RadioChoice vs RadioGroup
radiochoice generates the html for you. radiogroup/radio allow you to define your own html. there are examples in wicket-examples of both. -igor On Mon, Mar 24, 2008 at 1:40 PM, Patel, Sanjay [EMAIL PROTECTED] wrote: I am new to Wicket. Can anyone explain about the difference between RadioChoice and RadioGroup with example and when to use which? Thanks, Sanjay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload field inside of a modal?
That sounds worthwhile exploring. How do I trigger a POST request in an iFrame from within a Wicket modal window? Thanks again for your input. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:41 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Funky issue with double quotes (when copied from WIA ebook)
The quote marks in the PDF must be the typographer's quote: like this pair and not the straight quote like this pair. The straight quote marks probably got converted when the code is pasted into the page layout program. The author should probably turn of auto quote mark convertion off in the page layout program. On Mon, Mar 24, 2008 at 12:05 PM, Phil Grimm [EMAIL PROTECTED] wrote: Guys, More than a few times, I've been bitten by a problem with double quote characters when I copy Wicket tags from the WIA PDF into to HTML editor of my IDE (NetBeans). In the NetBeans editor, the copied double-quote characters display with a slight tilt to the right (the normal double quotes display as two vertical lines). So, they are a different type of character, but NetBeans editor renders them fine. And I think the browser (firefox) parses them ok. But when the webapp is run, Wicket gives the following error.. WicketMessage: The wicket:id attribute value must not be empty. May be unmatched quotes?!? And here, you can see the display of the double-quote characters (in the browser error page). a href=”#” wicket:id=”registerLink”Register/a To fix this, I just go delete the double quotes in the NetBeans editor and re-type them. I realize this is probably some kind of font issue, but if there is a way to address this, it would save some people frustration. This is not a big deal, but if someone understands the issue, it might help some of us avoid this. Then again, if it's not obvious what the problem is, if it hurts, don't do it might be a reasonable response. Probably not worth spending any time on investigating. Phil -- Phil Grimm Mobile: (858) 335-3426 Skype: philgrimm336
Re: File upload field inside of a modal?
via javascript: form.submit(); -igor On Mon, Mar 24, 2008 at 2:03 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That sounds worthwhile exploring. How do I trigger a POST request in an iFrame from within a Wicket modal window? Thanks again for your input. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:41 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload field inside of a modal?
Right - the old fashioned way. Igor strikes again - I'll give that a shot - let you know if it pans out :-) Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:10 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? via javascript: form.submit(); -igor On Mon, Mar 24, 2008 at 2:03 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That sounds worthwhile exploring. How do I trigger a POST request in an iFrame from within a Wicket modal window? Thanks again for your input. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:41 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataView size() iterator() call order issue
how are we going to cover these usecases: * pagination toolbar needs to call dataprovier.size() to figure out how many total records there are. at this point the toolbar doesnt know what window of data to retrieve, it just wants to know the size. * often users do: new dataview() { isvisible() { return dataprovider.size()0; } once again, datawindow size is not known. -igor On Mon, Mar 24, 2008 at 6:52 AM, Hoover, William [EMAIL PROTECTED] wrote: We are using a modified version of the Generic DAO for Hibernate (http://www.hibernate.org/328.html) where we make reuse of common DAO methods such as keyword searches that retrieve corresponding entities as well a total size (both use the same search criteria when determining results so it makes sense to combine the operations). As you stated, we are making two calls the database, but only one call to the DAO (although, as stated in previous responses there are alternative ways to perform one query to achieve this). Our business tier handles the transactions for us (not our DAOs ;o) using an event model (similar to typical BPM systems). Broadcast agents are used to notify our business listeners which in turn process our DAO calls. This gives us an the flexibility to have independent transactions for different business rule operations and makes the most out of code reuse. Avoiding the heavier call makes perfect sense, but couldn't this responsibility be passed to the data provider implementation? It may make more sense if the operation were combined so that the implementation could determine how/when to make the call to the persistence tier for the two operations. I guess I'm not seeing why we need the count before the iterator. The data provider impl can determine whether or not it will make the expensive call for the results. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 2:44 PM To: users@wicket.apache.org Subject: Re: DataView size() iterator() call order issue knowing the size and the window together seems like a ui requirement, it is a bit strange to me that you have it inside a dao which should cater to business logic. eg, as far as i know there is no single db operation that will produce both, so you are still doing two calls inside the dao. also transaction management should be handled outside the dao, daos are too fine an object to implement transaction management for. anywho, just nitpicking :) size() is called first for a lot of reasons, namely even knowing if there are any rows to retrieve before a much heavier iterator() is called. some clients want to hide a repeater if there are no items visible, and so size() might get called from inside isvisible() as well. idataprovider is quiet old and we havent had many complaints about its design so far. if all you are using is the dataview it should be pretty simple for you to roll your own dataview, if you look at dataview all it does is implement idataprovider handling to feed the pageable view. however, if you do you will also lose datatable as well :| if you got suggestions on how to improve it im all ears. -igor On Fri, Mar 21, 2008 at 11:24 AM, Hoover, William [EMAIL PROTECTED] wrote: When using DataView/IDataProvider size() is called before iterator(int first, int count) causing calls to DAOs to be duplicated. Our current framework that is internally using Hibernate allows one call to be made to a DAO that returns both the total result size and the actual records (based off first/count). The problem is that the first and count are unknown until the iterator method is called- forcing multiple calls to the DAO to retrieve the data (also forcing multiple transactions). What are the reasons behind calling size before iterator? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File upload field inside of a modal?
take a look here for a starting point: http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ we cannot use jquery in wicket core projects directly because it is not properly namespaced... -igor On Mon, Mar 24, 2008 at 2:12 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Right - the old fashioned way. Igor strikes again - I'll give that a shot - let you know if it pans out :-) Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:10 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? via javascript: form.submit(); -igor On Mon, Mar 24, 2008 at 2:03 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That sounds worthwhile exploring. How do I trigger a POST request in an iFrame from within a Wicket modal window? Thanks again for your input. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:41 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload field inside of a modal?
What a tease! No source code from what I can tell... Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:14 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? take a look here for a starting point: http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ we cannot use jquery in wicket core projects directly because it is not properly namespaced... -igor On Mon, Mar 24, 2008 at 2:12 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Right - the old fashioned way. Igor strikes again - I'll give that a shot - let you know if it pans out :-) Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:10 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? via javascript: form.submit(); -igor On Mon, Mar 24, 2008 at 2:03 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That sounds worthwhile exploring. How do I trigger a POST request in an iFrame from within a Wicket modal window? Thanks again for your input. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:41 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: File upload field inside of a modal?
Never mind - found it, but it's PHP. Well, might help to structure things properly. Thanks, Michael -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:24 PM To: users@wicket.apache.org Subject: RE: File upload field inside of a modal? What a tease! No source code from what I can tell... Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:14 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? take a look here for a starting point: http://www.phpletter.com/Demo/AjaxFileUpload-Demo/ we cannot use jquery in wicket core projects directly because it is not properly namespaced... -igor On Mon, Mar 24, 2008 at 2:12 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Right - the old fashioned way. Igor strikes again - I'll give that a shot - let you know if it pans out :-) Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 2:10 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? via javascript: form.submit(); -igor On Mon, Mar 24, 2008 at 2:03 PM, Michael Mehrle [EMAIL PROTECTED] wrote: That sounds worthwhile exploring. How do I trigger a POST request in an iFrame from within a Wicket modal window? Thanks again for your input. Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 1:41 PM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? usually it is done with a hidden iframe which does the POST -igor On Mon, Mar 24, 2008 at 12:05 PM, Michael Mehrle [EMAIL PROTECTED] wrote: No, I don't have an example - looking for a way to make it work... Michael -Original Message- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:30 AM To: users@wicket.apache.org Subject: Re: File upload field inside of a modal? dont think so.. ajax file upload is not possible i think. Or do you have examples where they do that? On Mon, Mar 24, 2008 at 6:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote: According to this old threat, the use of a file upload field inside a wicket Ajax modal was not possible: http://tinyurl.com/3e4z35 Has anyone found a work-around to this (besides placing the field into a regular page ;-) ? Thanks! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dropdown Choices
Try setting the compoundmodel on the form and the form of the dropdownchoice to null. That must ofcourse be: Try setting the compoundmodel on the form and the MODEL of the dropdownchoice to null. Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dropdown Choices
The problem is that the typing of the selectedTopping is a String instead of Toppings Martijn On 3/24/08, Maurice Marrink [EMAIL PROTECTED] wrote: Try setting the compoundmodel on the form and the form of the dropdownchoice to null. That must ofcourse be: Try setting the compoundmodel on the form and the MODEL of the dropdownchoice to null. Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Emedding Javascript into render head?
(Continuation of fileupload/Ajax question...) Reading the jQuery docs it seems that the starting point is to embed something like this into the header of your page: function ajaxFileUpload() { .. .. } If you remember one of my previous questions (copied below) - based on what you were saying it seems that doing it in a render head should work. Before I waste a lot of time I wanted to make sure that's the way to go. Cheers, Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 5:51 PM To: users@wicket.apache.org Subject: Re: How to set focus to a textfield inside AJAX if you are doing it in renderhead you have to use response.renderonloadjavascript(), if you spit out straight javascript then when it runs the textfield is not in the dom yet so document.getelementbyid wont be able to look it up... -igor On Thu, Mar 20, 2008 at 4:04 PM, Michael Mehrle [EMAIL PROTECTED] wrote: I was actually trying something close with overriding renderHead(IHeaderResponse iHeaderResponse). Didn't seem to stick though... Just for the record - would the above method be an alternative to making this work? Thanks a bunch - saved my day. Cheers, Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 3:56 PM To: users@wicket.apache.org Subject: Re: How to set focus to a textfield inside AJAX textfield.setoutputmarkupid(true); radio.add(new behavior() { oncomponenttag(tag) { tag.put(onclick, getelementbyid('+textfield.getmarkupid()+').focus();})); -igor On Thu, Mar 20, 2008 at 3:51 PM, Michael Mehrle [EMAIL PROTECTED] wrote: Well, it doesn't necessarily have to happen in there. What I need to do is to bind a Radio component to a TextField component. When the Radio gets clicked I want the focus in it's TextField to be set. Any ideas? Michael -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 3:28 PM To: users@wicket.apache.org Subject: Re: How to set focus to a textfield inside AJAX why cant you do this with javascript without ajax?? seems like a huge waste to have a server callback just to set focus -igor On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle [EMAIL PROTECTED] wrote: I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside I want to set the focus to a particular textfield - how would I do that? I have seen some techniques on how to do this on page load, but this is AJAX so I need something dynamic. Anyone solved this problem before? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception adding a SimpleAttributeModifier to a TextField
Comrades, I'm getting a strange exception. I created a SimpleAttributeModifier and added it to a TextField component, like this: textField.add(modifier); When I run it, I get an exception that says this: java.lang.ClassCastException: org.apache.wicket.behavior.SimpleAttributeModifier cannot be cast to org.apache.wicket.behavior.IBehaviorListener at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:91) The line of code that generates the exception looks like this: behaviorListener = (IBehaviorListener)component.getBehaviors().get(idAsInt); It appears to be extracting from a list of IBehaviors, so I have no idea why it's trying to cast it as an IBehaviorListener. Does anybody know what I'm doing wrong? Or is this a bug in Wicket? -- View this message in context: http://www.nabble.com/Exception-adding-a-SimpleAttributeModifier-to-a-TextField-tp16262822p16262822.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RenderedDynamicImageResource: how to add a random attribute to an URL?
As I found out the problem is actually different. The way I create an image is the following add (new Image (captcha, new CaptchaImageResource (100, 40, new PropertyModel (this, captchaValue; But it seems that an image does request an attached image resource only first time it's created. I need it be rendered again and again every time my page is rendered. How to achieve this goal? On Mon, Mar 24, 2008 at 9:40 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: see NonCachingImage -igor On Mon, Mar 24, 2008 at 11:29 AM, Vitaly Tsaplin [EMAIL PROTECTED] wrote: Hi guys, How to add a random attribute to an URL created by a RenderedDynamicImageResource subclass to enforce a browser update on every request? I think I saw it somewhere but I cannot remember where exactly... Vitaly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
clustering failover error
We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(Clu steredSessionValve.java:87) at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteVal ve.java:84) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC onnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:241) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpPro tocol.java:381) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 7) at java.lang.Thread.run(Unknown Source) Caused by: java.io.StreamCorruptedException: invalid type code: B8 at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at
Re: Re-render after AbstractRestartResponseException() not working in Ajax case
So in getObject that is only called in the renderphase in an ajax request you throw an restart exception? We dont really support that and i believe that igor had the same kind of thread a few days back. Make a issue for this if you want. On 3/24/08, Matthew Young [EMAIL PROTECTED] wrote: Here is my test code: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private String word; public HomePage(final PageParameters parameters) { add(new FeedbackPanel(feedback) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = FeedbackPanel onBeforeRender()); System.out.println( FeedbackbackMessageModel = + getFeedbackMessagesModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupPlaceholderTag(true)); // if the word blowup is entered, //this register a error message and throw new AbstractRestartResponseException() IModel model = new Model() { private static final long serialVersionUID = 1L; @Override public Object getObject() { if (word != null word.equals(blowup)) { word = -w-e-b-l-e-w-u-p-; HomePage.this.fatal([2/2]This message is from Model.); // why this is NOT render in Ajax? getPage().detach(); System.out.println(! ! ! ! ! throwing new AbstractRestartResponseException()); throw new AbstractRestartResponseException() { private static final long serialVersionUID = 1L; }; } else { return The word is: \ + (word == null ? n u l l : word) + \; } } }; add(new Label(message, model) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = Label onBeforeRender(), model = + getModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupId(true)); Form form = new Form(form, new CompoundPropertyModel(this)); add(form); form.add(new TextField(word).setRequired(true)); AjaxFallbackButton submitButton = new AjaxFallbackButton(submitButton, form) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form f) { if (word != null word.equals(blowup)) { HomePage.this.error([1/2]This message is from onSubmit. There should also be a message from model); } if (target != null) { target.addComponent(HomePage.this.get(feedback)); // clear error feedback if any target.addComponent(HomePage.this.get(message)); } } @Override protected void onError(AjaxRequestTarget target, Form f) { target.addComponent(HomePage.this.get(feedback)); // show updated error feedback } }; form.add(submitButton); } } Things work perfectly in non-Ajax. But in Ajax, after 'throw new AbstractRestartResponseException()' in model, the Ajax response to the browser is wrong in two places. 1) the feedback component don't have the second message register in the model, only the message from onSubmit(target) show. 2) the Ajax response is missing the second half: no Label component and the /ajax-response end tag. = This is the normal Ajax response copy from the debug panel: INFO: Received ajax response (257 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=feedback4 ![CDATA[span id=feedback4 /span]]/componentcomponent id=message1 ![CDATA[span id=message1The word is: bla/span]]/component/ajax-response INFO: Response parsed. Now invoking steps... INFO: Response processed successfully. = This is the Ajax response after 'throw new AbstractRestartResponseException()': INFO: Received ajax response (339 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=feedback4 encoding=wicket1 ![CDATA[span id=feedback4 ul li class=feedbackPanelERROR span class=feedbackPanelERROR[1/2]^This message is from onSubmit. There should also be a message from model/span /li /ul /span]]/component ERROR: Error while parsing response: Could not find root ajax-response element INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... From tracing the wicket code, I just don't see how this can be. I see AjaxResponseTarget#response() is called again, and response.write(/ajax-response); is called on line 539. But
Re: Exception adding a SimpleAttributeModifier to a TextField
Do you have a testcase that you can attach to a jira issue? This is strange because why is there a behaviorrequesttarget created for that attribute modifier, that seems very strange On 3/24/08, Miguel Munoz [EMAIL PROTECTED] wrote: Comrades, I'm getting a strange exception. I created a SimpleAttributeModifier and added it to a TextField component, like this: textField.add(modifier); When I run it, I get an exception that says this: java.lang.ClassCastException: org.apache.wicket.behavior.SimpleAttributeModifier cannot be cast to org.apache.wicket.behavior.IBehaviorListener at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:91) The line of code that generates the exception looks like this: behaviorListener = (IBehaviorListener)component.getBehaviors().get(idAsInt); It appears to be extracting from a list of IBehaviors, so I have no idea why it's trying to cast it as an IBehaviorListener. Does anybody know what I'm doing wrong? Or is this a bug in Wicket? -- View this message in context: http://www.nabble.com/Exception-adding-a-SimpleAttributeModifier-to-a-TextField-tp16262822p16262822.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? On 3/24/08, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(Clu steredSessionValve.java:87) at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteVal ve.java:84) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC onnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:241) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpPro tocol.java:381) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 7) at java.lang.Thread.run(Unknown Source) Caused by: java.io.StreamCorruptedException:
Re: clustering failover error
We run JBoss and haven't tried this on other app servers. Could the fact that we're running Java 6 be relevant? The specific type code in the exception varies each time, and this occurs every time we fail over from one node to another. We don't a test case, but if you have a JBoss cluster we could maybe send you a war. :) Thank you, Scott On Mon, Mar 24, 2008 at 3:25 PM, Johan Compagner [EMAIL PROTECTED] wrote: Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? On 3/24/08, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(Clu steredSessionValve.java:87) at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteVal ve.java:84) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:104) at
Re: Re-render after AbstractRestartResponseException() not working in Ajax case
So in getObject that is only called in the renderphase in an ajax request you throw an restart exception? To be very clear, no exception is thrown on re-render, the restart exception is only thrown in the initial render. I trace the Wicket code and it's re-rendering, but the end result on the browser side is wrong. Why in Ajax, only half of the ajax-response get to the browser and the exact same work in non-Ajax? i believe that igor had the same kind of thread a few days back Yes, this is a follow up of that. Igor showed an ErrorAwareModelAdapter. My simplified test does the same on model error: call page.detach(), throw new AbstractRestartResponseException(). Is it possible to try running my test code and see what is going on? Maybe something is not quite right in Wicket? On Mon, Mar 24, 2008 at 3:16 PM, Johan Compagner [EMAIL PROTECTED] wrote: So in getObject that is only called in the renderphase in an ajax request you throw an restart exception? We dont really support that and i believe that igor had the same kind of thread a few days back. Make a issue for this if you want. On 3/24/08, Matthew Young [EMAIL PROTECTED] wrote: Here is my test code: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private String word; public HomePage(final PageParameters parameters) { add(new FeedbackPanel(feedback) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = FeedbackPanel onBeforeRender()); System.out.println( FeedbackbackMessageModel = + getFeedbackMessagesModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupPlaceholderTag(true)); // if the word blowup is entered, //this register a error message and throw new AbstractRestartResponseException() IModel model = new Model() { private static final long serialVersionUID = 1L; @Override public Object getObject() { if (word != null word.equals(blowup)) { word = -w-e-b-l-e-w-u-p-; HomePage.this.fatal([2/2]This message is from Model.); // why this is NOT render in Ajax? getPage().detach(); System.out.println(! ! ! ! ! throwing new AbstractRestartResponseException()); throw new AbstractRestartResponseException() { private static final long serialVersionUID = 1L; }; } else { return The word is: \ + (word == null ? n u l l : word) + \; } } }; add(new Label(message, model) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = Label onBeforeRender(), model = + getModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupId(true)); Form form = new Form(form, new CompoundPropertyModel(this)); add(form); form.add(new TextField(word).setRequired(true)); AjaxFallbackButton submitButton = new AjaxFallbackButton(submitButton, form) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form f) { if (word != null word.equals(blowup)) { HomePage.this.error([1/2]This message is from onSubmit. There should also be a message from model); } if (target != null) { target.addComponent(HomePage.this.get(feedback)); // clear error feedback if any target.addComponent(HomePage.this.get(message)); } } @Override protected void onError(AjaxRequestTarget target, Form f) { target.addComponent(HomePage.this.get(feedback)); // show updated error feedback } }; form.add(submitButton); } } Things work perfectly in non-Ajax. But in Ajax, after 'throw new AbstractRestartResponseException()' in model, the Ajax response to the browser is wrong in two places. 1) the feedback component don't have the second message register in the model, only the message from onSubmit(target) show. 2) the Ajax response is missing the second half: no Label component and the /ajax-response end tag. = This is the normal Ajax response copy from the debug panel: INFO: Received ajax response (257 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responsecomponent id=feedback4 ![CDATA[span id=feedback4
Re: clustering failover error
Using the HttpSessionStore pushes this exception to JBoss. It seems that something in the session just can't be deserialized by a separate jvm. On Mon, Mar 24, 2008 at 3:54 PM, Scott Swank [EMAIL PROTECTED] wrote: We run JBoss and haven't tried this on other app servers. Could the fact that we're running Java 6 be relevant? The specific type code in the exception varies each time, and this occurs every time we fail over from one node to another. We don't a test case, but if you have a JBoss cluster we could maybe send you a war. :) Thank you, Scott On Mon, Mar 24, 2008 at 3:25 PM, Johan Compagner [EMAIL PROTECTED] wrote: Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? On 3/24/08, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(Clu
Re: clustering failover error
If we use ObjectOutputStream to write the session to disk we can read it back on the same jvm. However, a separate jvm cannot read the file -- we get the same StreamCorruptedException. What could be jvm-specific? Thank you, Scott On Mon, Mar 24, 2008 at 4:35 PM, Scott Swank [EMAIL PROTECTED] wrote: Using the HttpSessionStore pushes this exception to JBoss. It seems that something in the session just can't be deserialized by a separate jvm. On Mon, Mar 24, 2008 at 3:54 PM, Scott Swank [EMAIL PROTECTED] wrote: We run JBoss and haven't tried this on other app servers. Could the fact that we're running Java 6 be relevant? The specific type code in the exception varies each time, and this occurs every time we fail over from one node to another. We have don't a test case, but if you have a JBoss cluster we could maybe send you a war. :) Thank you, Scott On Mon, Mar 24, 2008 at 3:25 PM, Johan Compagner [EMAIL PROTECTED] wrote: Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
are all the nodes running identical software? -igor On Mon, Mar 24, 2008 at 4:52 PM, Scott Swank [EMAIL PROTECTED] wrote: If we use ObjectOutputStream to write the session to disk we can read it back on the same jvm. However, a separate jvm cannot read the file -- we get the same StreamCorruptedException. What could be jvm-specific? Thank you, Scott On Mon, Mar 24, 2008 at 4:35 PM, Scott Swank [EMAIL PROTECTED] wrote: Using the HttpSessionStore pushes this exception to JBoss. It seems that something in the session just can't be deserialized by a separate jvm. On Mon, Mar 24, 2008 at 3:54 PM, Scott Swank [EMAIL PROTECTED] wrote: We run JBoss and haven't tried this on other app servers. Could the fact that we're running Java 6 be relevant? The specific type code in the exception varies each time, and this occurs every time we fail over from one node to another. We have don't a test case, but if you have a JBoss cluster we could maybe send you a war. :) Thank you, Scott On Mon, Mar 24, 2008 at 3:25 PM, Johan Compagner [EMAIL PROTECTED] wrote: Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Links, getting values from form text field
I've got a log on screen, ie user name and password with a submit button. That part works fine. I want to have a link on the screen that can be clicked on to email a password hint to the email associated to the username in the username form field. The problem is that I can't seem to be able to figure out how to get the value of the form text field in the link's onClick method. Can anyone point me int he right direction? Thanks in advance for any assistance. -- View this message in context: http://www.nabble.com/Links%2C-getting-values-from-form-text-field-tp16266151p16266151.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Links, getting values from form text field
SubmitLink seems useful in this case. Gerolf On Tue, Mar 25, 2008 at 2:03 AM, BretChampoux [EMAIL PROTECTED] wrote: I've got a log on screen, ie user name and password with a submit button. That part works fine. I want to have a link on the screen that can be clicked on to email a password hint to the email associated to the username in the username form field. The problem is that I can't seem to be able to figure out how to get the value of the form text field in the link's onClick method. Can anyone point me int he right direction? Thanks in advance for any assistance. -- View this message in context: http://www.nabble.com/Links%2C-getting-values-from-form-text-field-tp16266151p16266151.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
Seemingly yes. If we write the session to disk, stop the jvm, restart the jvm, and then read the session from disk on the same server we get this exception. - Scott On Mon, Mar 24, 2008 at 5:10 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: are all the nodes running identical software? -igor On Mon, Mar 24, 2008 at 4:52 PM, Scott Swank [EMAIL PROTECTED] wrote: If we use ObjectOutputStream to write the session to disk we can read it back on the same jvm. However, a separate jvm cannot read the file -- we get the same StreamCorruptedException. What could be jvm-specific? Thank you, Scott On Mon, Mar 24, 2008 at 4:35 PM, Scott Swank [EMAIL PROTECTED] wrote: Using the HttpSessionStore pushes this exception to JBoss. It seems that something in the session just can't be deserialized by a separate jvm. On Mon, Mar 24, 2008 at 3:54 PM, Scott Swank [EMAIL PROTECTED] wrote: We run JBoss and haven't tried this on other app servers. Could the fact that we're running Java 6 be relevant? The specific type code in the exception varies each time, and this occurs every time we fail over from one node to another. We have don't a test case, but if you have a JBoss cluster we could maybe send you a war. :) Thank you, Scott On Mon, Mar 24, 2008 at 3:25 PM, Johan Compagner [EMAIL PROTECTED] wrote: Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
Couldn't missing SerialVersionUUID cause this? Doesn't seem likely though, I'd expect much saner exception in that case. -Matej On Tue, Mar 25, 2008 at 3:24 AM, Scott Swank [EMAIL PROTECTED] wrote: Seemingly yes. If we write the session to disk, stop the jvm, restart the jvm, and then read the session from disk on the same server we get this exception. - Scott On Mon, Mar 24, 2008 at 5:10 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: are all the nodes running identical software? -igor On Mon, Mar 24, 2008 at 4:52 PM, Scott Swank [EMAIL PROTECTED] wrote: If we use ObjectOutputStream to write the session to disk we can read it back on the same jvm. However, a separate jvm cannot read the file -- we get the same StreamCorruptedException. What could be jvm-specific? Thank you, Scott On Mon, Mar 24, 2008 at 4:35 PM, Scott Swank [EMAIL PROTECTED] wrote: Using the HttpSessionStore pushes this exception to JBoss. It seems that something in the session just can't be deserialized by a separate jvm. On Mon, Mar 24, 2008 at 3:54 PM, Scott Swank [EMAIL PROTECTED] wrote: We run JBoss and haven't tried this on other app servers. Could the fact that we're running Java 6 be relevant? The specific type code in the exception varies each time, and this occurs every time we fail over from one node to another. We have don't a test case, but if you have a JBoss cluster we could maybe send you a war. :) Thank you, Scott On Mon, Mar 24, 2008 at 3:25 PM, Johan Compagner [EMAIL PROTECTED] wrote: Stream corrupt exceptio, invalid type code? It seems that the byte array on that side isnt correct. Do you have a setup/testcase for this? Do you get it on other app servers? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: clustering failover error
Are these nodes on the same machine or are you running different machines? On Mon, Mar 24, 2008 at 6:15 PM, Scott Swank [EMAIL PROTECTED] wrote: We are trying to get clustering working with Wicket 1.3.2 (on JBoss 4.3.0) and we get the following exception when one node fails over to another node. Has anyone seen anything like this before? Any suggestions/guesses? Thank you, Scott 15:02:17,320 ERROR [RequestCycle] Could not deserialize object using `org.apache .wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicke t.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:40 6) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deseriali zePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskP ageStore.java:706) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.convertToPage (DiskPageStore.java:1218) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.getLastPage(SecondLevelCacheSessionStore.java:228) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLe velCachePageMap.get(SecondLevelCacheSessionStore.java:296) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRender edPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebR equestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 358) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.jav a:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.CustomerFacingClientContextFilter.doFilter(Custom erFacingClientContextFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at com.vegas.ui.filter.HibernateFilter.doFilter(HibernateFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179) at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(Clu steredSessionValve.java:87) at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteVal ve.java:84) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC onnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:241) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpPro tocol.java:381) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 7) at java.lang.Thread.run(Unknown Source) Caused by: java.io.StreamCorruptedException:
Re: Re-render after AbstractRestartResponseException() not working in Ajax case
I forgot to include the HomePage.html. Here is all the files of my small test. Please check it out if possible. If you run it with JS off, all is fine. With JS on, Ajax response is wrong. HomePage.html: html head/head span wicket:id=messagemessage will be here/span form wicket:id=form input type=text wicket:id=word/ input type=submit value=Enter wicket:id=submitButton/ /form span wicket:id=feedbackFEEDBACK/span /html HomePage.java: public class HomePage extends WebPage { private static final long serialVersionUID = 1L; private String word; public HomePage(final PageParameters parameters) { add(new FeedbackPanel(feedback) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = FeedbackPanel onBeforeRender()); System.out.println( FeedbackbackMessageModel = + getFeedbackMessagesModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupPlaceholderTag(true)); // if the word blowup is entered, //this register a error message and throw IModel model = new Model() { private static final long serialVersionUID = 1L; @Override public Object getObject() { if (word != null word.equals(blowup)) { word = -w-e-b-l-e-w-u-p-; HomePage.this.fatal([2/2]This message is from Model.); getPage().detach(); System.out.println(! ! ! ! ! throwing new AbstractRestartResponseException()); throw new AbstractRestartResponseException() { private static final long serialVersionUID = 1L; }; } else { return The word is: \ + (word == null ? n u l l : word) + \; } } }; add(new Label(message, model) { private static final long serialVersionUID = 1L; @Override protected void onBeforeRender() { System.out.println(= = = = Label onBeforeRender(), model = + getModel().getObject()); super.onBeforeRender(); } }.setOutputMarkupId(true)); Form form = new Form(form, new CompoundPropertyModel(this)); add(form); form.add(new TextField(word).setRequired(true)); AjaxFallbackButton submitButton = new AjaxFallbackButton(submitButton, form) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form f) { if (word != null word.equals(blowup)) { HomePage.this.error([1/2]This message is from onSubmit. There should also be a message from model); } if (target != null) { target.addComponent(HomePage.this.get(feedback)); // clear error feedback if any target.addComponent(HomePage.this.get(message)); } } @Override protected void onError(AjaxRequestTarget target, Form f) { target.addComponent(HomePage.this.get(feedback)); // show updated error feedback } }; form.add(submitButton); } } WicketApplication.java: public class WicketApplication extends WebApplication { public WicketApplication() { } public Class? extends WebPage getHomePage() { return HomePage.class; } @Override public RequestCycle newRequestCycle(Request request, Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { // page can be null if (page == null) { return super.onRuntimeException(page, e); } return page; } }; } }