Redirect to ResourceStream While *Also* Refreshing Form

2010-12-09 Thread eugenebalt
I have a situation where, as a result of onSubmit() in my form, I redirect to a resource stream. That part works fine. ResourceStreamRequestTarget target = new ResourceStreamRequestTarget( new FileResourceStream(file));

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-09 Thread eugenebalt
Thank you for the idea, however there is no stable URL for the resource. The resource gets created on the fly as a local file and streamed into the browser. By the way, if I were to go this route, how/where would I add the JavaScript? In the onSubmit()? Any other possible workarounds for this

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
As I said previously, the resource is not deployed as a URL, rather it gets created on the fly as a temp file and then streamed into the browser. So I can't use the above example either. The file is an Excel spreadsheet created dynamically with the package Apache-HSSF (which allows dynamic Excel

Re: I also have the question

2010-12-10 Thread eugenebalt
UPBrandon, I tried your code, and it doesn't repaint the form. Isn't that something you wanted to do? When I tried it, it gave me the file stream, but the form was NOT updated... -- View this message in context:

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
anybody? any examples/ideas? this is pretty urgent. thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-ResourceStream-While-Also-Refreshing-Form-tp3081069p3082445.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
I don't understand that example. What is item? Where does the first section go, in onSubmit()? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-ResourceStream-While-Also-Refreshing-Form-tp3081069p3082558.html Sent from the Users forum mailing list archive

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
Thank you, but: 1) AjaxButton constructor does not take a single ID param, syntax error 2) So I override the methods protected IResourceStream getResourceStream() {...//override } protected String getFileName() { ...//override} with my file generation logic? Or I change them to take a

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
Yeah, I finally got it work. Thanks a lot for that example. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-ResourceStream-While-Also-Refreshing-Form-tp3081069p3082669.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
One more question, though. I did get it to work, but the Ajax Download kicks in before any of the form Validators do. I should only start the download if all the Validators passed. In case of any errors thrown by attached form Validators, I should not proceed. But the Ajax Button-Click is

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-10 Thread eugenebalt
Ernesto: it's the Ajax Download that shouldn't get called, that is the problem. (The onSubmit() maybe doesn't get called, it's true.) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirect-to-ResourceStream-While-Also-Refreshing-Form-tp3081069p3082730.html Sent

Re: Redirect to ResourceStream While *Also* Refreshing Form

2010-12-13 Thread eugenebalt
Sorry to bump this again, but is there a way to do Repaint + Download with the Validators kicking in before the repaint as they normally do? Right now, I'm able to initiate the download upon clicking the Submit buttons, but that happens BEFORE any of the Validators kick in. I should only

Invoke Validators manually, in arbitrary places (e.g. Ajax)

2010-12-13 Thread eugenebalt
Is there a way to invoke a Validator manually in an arbitrary place in the code, or do we have no control over when Wicket runs Validators (it always happens on the form submit)? In my situation, I'd like to invoke a validator manually in the Ajax part of my code. Thanks -- View this message in

Re: Invoke Validators manually, in arbitrary places (e.g. Ajax)

2010-12-13 Thread eugenebalt
Thanks Igor. That method is a void. Is it possible to get some kind of a boolean result from form.validate() to indicate success/failure? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Invoke-Validators-manually-in-arbitrary-places-e-g-Ajax-tp3085646p3085680.html

CheckboxMultipleChoice doesn't support Ajax Behavior?

2010-12-20 Thread eugenebalt
I have a CheckBoxMultipleChoice which doesn't seem to support Ajax onChange. My code: CheckBoxMultipleChoice group = new CheckBoxMultipleChoice(CheckboxGroup1, valueList); group.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target)

Re: CheckboxMultipleChoice doesn't support Ajax Behavior?

2010-12-20 Thread eugenebalt
Thank you, the onClick() works, but I have another question: As I select/de-select checkboxes, I need to check what's currently selected. Example: If Checkbox X is selected by itself (as a result of my selections/de-selections), then I need to do some Ajax action. The problem is, I don't have

Re: CheckboxMultipleChoice doesn't support Ajax Behavior?

2010-12-20 Thread eugenebalt
Pedro's reply did it. I'm getting the Values correctly if I use the AjaxFormChoiceComponentUpdatingBehavior() (as opposed to the AjaxFormComponentUpdatingBehavior). Thanks all, problem resolved!! -- View this message in context:

Initial DropDown Blank Choice (Choose One) Disappearing

2010-12-20 Thread eugenebalt
In my DropDown, the initial choice is blank (Choose One), which I want to keep. My selections allow N/A which means nothing is selected. Initially on my form, the Choose One blank option is available, but after I make a selection, it goes away. Do I need to manually add a blank option to my

Re: Initial DropDown Blank Choice (

2010-12-20 Thread eugenebalt
Great. Thanks Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Initial-DropDown-Blank-Choice-Choose-One-Disappearing-tp3095904p3095931.html Sent from the Users forum mailing list archive at Nabble.com.

Set Current DropDownChoice Item (Selected)

2010-12-21 Thread eugenebalt
How do I set the DropDownChoice to a particular choice (item) of the list? My DropDownChoice has items X,Y,Z. I would like to set the currently selected item to Y. I have the method setChoices(..) which lets me initialize the list, but is there a method to select an item by index? -- View this

Re: Set Current DropDownChoice Item (Selected)

2010-12-21 Thread eugenebalt
Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Set-Current-DropDownChoice-Item-Selected-tp3154886p3159534.html Sent from the Users forum mailing list archive at Nabble.com. - To

target.addComponent(Field) in Ajax erases that Field's values

2010-12-21 Thread eugenebalt
I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can

Re: target.addComponent(Field) in Ajax erases that Field's values

2010-12-21 Thread eugenebalt
Thanks for the fast replies, much appreciated, but what should I change in my code? I'm still not clear. Yes, the Field2 had some initial values with which it was constructed. -- View this message in context:

Re: target.addComponent(Field) in Ajax erases that Field's values

2010-12-21 Thread eugenebalt
But I can't use AjaxFormSubmittingBehavior (correct me if I'm wrong). I need to make some changes to Field2 prior to any form submission, they have to be made as soon as the sourceField has changed in any way. I just don't want the Field2's values to get erased without me even doing anything. I

Re: target.addComponent(Field) in Ajax erases that Field's values

2010-12-21 Thread eugenebalt
It looks like I fixed it by adding new Ajax code to Field2. The Field2's Ajax code does nothing, it just calls target.addComponent() on itself: target.addComponent(Field2). This got rid of the values getting erased. So whenever you update something via Ajax, it has to be 2-way? You need to

Select All / Clear All Checkboxes in CheckBoxMultipleChoice

2010-12-22 Thread eugenebalt
Is there an easy way to select all/clear all checkboxes in CheckBoxMultipleChoice? My Model of that field is an ArrayList. I wish there was a method called setModelValue(..) where I could set the string 0;1;2;3;4;5;6;... to select all the values, but it's deprecated. -- View this message in

Get Request URL (prior to /?Wicket query)

2011-01-04 Thread eugenebalt
I need to get the main Request URL in Wicket, up to the /?Wicket... substring. (I tried RequestCycle.get().getRequest().getURL() - that returns the /?Wicket string that I don't want) Thanks -- View this message in context:

Re: Get Request URL (prior to /?Wicket query)

2011-01-04 Thread eugenebalt
Already found the answer... RequestUtils.toAbsolutePath(RequestCycle.get().getRequest().getURL()) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Get-Request-URL-prior-to-Wicket-query-tp3174002p3174137.html Sent from the Users forum mailing list archive at

Check for User-Modified (Dirty) Fields before Form Submission

2011-01-17 Thread eugenebalt
Is there a way in wicket to check if a field has been modified by the user before submitting the form? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Check-for-User-Modified-Dirty-Fields-before-Form-Submission-tp3221228p3221228.html Sent from the Users forum

AjaxButton's onSubmit goes into Form Submit? Why?

2011-02-02 Thread eugenebalt
I have an Ajax Button which is NOT a submit button; it's a custom button that does my own action. AjaxButton reportButton = new AjaxButton(reportButton) { @Override protected void onSubmit(AjaxRequestTarget arg0, Form? arg1) { // TODO Auto-generated

How to Replace Choose One with Blank () in DropDown

2011-02-02 Thread eugenebalt
Please advise, I need to replace Choose One with a BLANK choice () in my dropdown. I know I can either create some kind of properties file, or override something, but I'm not sure exactly what to do, step-by-step. Could you give an exact, step-by-step instruction regarding what file to create,

Re: How to Replace Choose One with Blank () in DropDown

2011-02-02 Thread eugenebalt
I have a Form and a DropDown on it, that's it. (There are no Panels or anything else.) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-Replace-Choose-One-with-Blank-in-DropDown-tp3256149p3256195.html Sent from the Users forum mailing list archive at

Re: AjaxButton's onSubmit goes into Form Submit? Why?

2011-02-02 Thread eugenebalt
OK thanks, that did the trick. But I have one more question: That AjaxLink is supposed to start a browser File Download. The code that I have for that works like a charm in the Form OnSubmit, but it doesn't work inside the Ajax Link. File f = generateFile();

Re: How to Replace Choose One with Blank () in DropDown

2011-02-02 Thread eugenebalt
Thank you but I don't understand that instruction! Quote: Create a .properties file for your subclass of form/panel and define the null key for the value you want. For example: A .properties file where?? in the same location as the Form.java? How will it be hooked up to the actual dropdown?

Re: AjaxButton's onSubmit goes into Form Submit? Why?

2011-02-02 Thread eugenebalt
When you say regular link you mean a DownloadLink? How do I construct it? I need to define either a File or a PropertyModel (the 2nd arg). Not sure what to put in there. Thanks -- View this message in context:

Re: How to Replace Choose One with Blank () in DropDown

2011-02-02 Thread eugenebalt
anyone, please? I don't understand where to create the properties file, how to name it, and what to put in there. My form name: Form1 My dropdown name: choice1 No panels. Where should the file be placed and how will it be found automatically? -- View this message in context:

Stop at Validator X in case of error, do not run Validator Y

2011-02-16 Thread eugenebalt
Wicket seems to accumulate all error messages and display them at once. But I have a case where, if Validator X doesn't pass, I should *NOT* go into Validator Y. How do I break the chain? Also, how do I know if a particular validator has completed successfully? thanks -- View this message in

Re: Stop at Validator X in case of error, do not run Validator Y

2011-02-16 Thread eugenebalt
James Carman, correct, one validator is on a component and the other is form-level. That's why they both occur, and I need to prevent the form-level one from kicking in. How do I need to override that method? Can it be empty, or what do I specify? -- View this message in context:

Re: Stop at Validator X in case of error, do not run Validator Y

2011-02-16 Thread eugenebalt
James, are {textArea1, textArea2} global variables? where are they defined? I was thinking of creating and returning an array of (FormComponent)form.get(fieldname), but the method doesn't know about the form, it's not passed in as a param the way it is in validate(). -- View this message in

Disable Individual Checkboxes in CheckBoxMultipleChoice

2011-02-17 Thread eugenebalt
I have a CheckBoxMultipleChoice in my form, and I need to disable individual checkboxes (not all), say the 1st and 3rd one. (But I still have to show them, as disabled.) Does someone have an example of how to do that? My field is based on an ArrayListString. So each checkbox in the list is just

Re: Disable Individual Checkboxes in CheckBoxMultipleChoice

2011-02-17 Thread eugenebalt
There's no isDisabled in Component, did you mean isEnabled? How would I have control over individual elements there in that override? Frankly, slightly longer answers would be very much appreciated. Thanks -- View this message in context:

Re: Disable Individual Checkboxes in CheckBoxMultipleChoice

2011-02-17 Thread eugenebalt
Actually, thanks a lot, I found isDisabled(). Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disable-Individual-Checkboxes-in-CheckBoxMultipleChoice-tp3311071p3311227.html Sent from the Users forum mailing list archive at Nabble.com.

Erase Previous Error Messages in Feedback Panel after Download

2011-02-17 Thread eugenebalt
I have a FeedbackPanel which may contain previous error messages. Once the form is successfully submitted, it's not refreshed, and the previous errors remain on the screen. A browser Download is initiated on submit, so I lose control of the form. Is there a way to reach the FeedbackPanel

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-17 Thread eugenebalt
Does this code go in the SubmitButton's onClick Ajax behavior? What if I don't have a URL? I'm not saving the file anywhere, I'm immediately exporting it to the browser so the user can do a Save As. Thanks -- View this message in context:

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-18 Thread eugenebalt
Hi Igor, the file isn't saved anywhere, it's immediately returned to the user in the browser, as follows: (in Form OnSubmit) --- File f = generateExcelFile(); // generates a File object ResourceStreamRequestTarget target = new ResourceStreamRequestTarget(

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-18 Thread eugenebalt
That would introduce a whole new level of complexity. Such a resource service would need to be thread-safe, it would have to have cleanup of old documents, or maybe the documents would need to be stored in a database. Is there a relatively easy way to take care of this problem, which is

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-18 Thread eugenebalt
One other question I have, how do I know what will happpen first? (Ajax or Refresh)? Suppose I add JavaScript to my Ajax Button Click; my file-generation happens in the OnSubmit(), so I don't know whether I have the file already or not. In fact, my output console shows that the Ajax Click always

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-18 Thread eugenebalt
Thanks for that example. How do I create an IResourceStream? According to that example, I need to provide a custom createResourceStream(). I have a File object returned to me as part of my file generation, how do I convert the File into an IResourceStream? Thanks -- View this message in

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-18 Thread eugenebalt
Gabriel Landon, I got it to work, but my Validators don't work any more. I need the validators to check for empty fields etc. BEFORE downloading. Before, the validator chain was working in Form onSubmit(). Now with this AjaxDownload, no Validators get activated. Any ideas? -- View this message

Making Ajax Download Work With Validator Messages (in FeedbackPanel)

2011-02-20 Thread eugenebalt
Guys, I almost got the Ajax Download-with-Form Refresh to work. I followed this example of how to do an Ajax download: https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html But there is one problem; the form has a FeedbackPanel which shows Validator messages. With this

Re: Making Ajax Download Work With Validator Messages (in FeedbackPanel)

2011-02-20 Thread eugenebalt
My code is below. 1) In Form Constructor: public MyForm(String id) { super(id); // add BeginDate/EndDate text fields: these require validation add(new TextField(bdate, new PropertyModel(myBean, bdate)) .add(new ErrorDateValidator1()) .add(new

Re: Making Ajax Download Work With Validator Messages (in FeedbackPanel)

2011-02-20 Thread eugenebalt
You're the man, Igor! :) Thanks a lot. It's working now. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Making-Ajax-Download-Work-With-Validator-Messages-in-FeedbackPanel-tp3315334p3315433.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Making Ajax Download Work With Validator Messages (in FeedbackPanel)

2011-02-20 Thread eugenebalt
I just have one more question. I need to put a red frame around the fields that have errors, in addition to displaying the Feedback message. I overrode onError() and did target.addComponent(feedbackPanel) so I'm getting the message displayed, that part works great. Now I just need to update the

Re: Making Ajax Download Work With Validator Messages (in FeedbackPanel)

2011-02-20 Thread eugenebalt
Any help with the above question? (update red/normal border around problem fields, I need to do it manually here, I think) I was thinking of iterating over all my components and doing a target.addComponent() on each one. That updates their border, but I can't make all my components

CheckBoxMultipleChoice.getInput() = NULL after switch to AjaxSubmit

2011-02-21 Thread eugenebalt
When I was doing the Form onSubmit() to do my file download, the CheckBoxMultipleChoice.getInput() was returning correct input selections from my checkbox list. (I have a CheckBoxMultipleChoice field in my form.) As soon as I switched to the AjaxDownload (which does the download + FeedbackPanel

Re: Erase Previous Error Messages in Feedback Panel after Download

2011-02-22 Thread eugenebalt
Gabriel, I got that part to work. But I also need to update the red border around the problem fields. This was working automatically before with the validators firing on onSubmit(), and it's broken now. Now, I need to manually highlight the error fields. Any ideas how to do that? I can do

Select All Non-Disabled Items in CheckBoxMultipleChoice

2011-02-22 Thread eugenebalt
I have a CheckBoxMultipleChoice which has some disabled checkboxes (I was able to achieve that by overriding isDisabled(final Object object, int index, String selected) on the CheckBoxMultipleChoice). Now, I have a 'Select All' button which needs to select all *enabled* checkboxes in that field.

Re: Select All Non-Disabled Items in CheckBoxMultipleChoice

2011-02-22 Thread eugenebalt
Can anyone help with this? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Select-All-Non-Disabled-Items-in-CheckBoxMultipleChoice-tp3319897p3320046.html Sent from the Users forum mailing list archive at Nabble.com.

Adding Title or AltText to CheckBoxMultipleChoice

2011-02-23 Thread eugenebalt
Is it possible to add a Title or an AltText attribute to a CheckBoxMultipleChoice? (for the tip window) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-Title-or-AltText-to-CheckBoxMultipleChoice-tp3321054p3321054.html Sent from the Users forum mailing

Re: Adding Title or AltText to CheckBoxMultipleChoice

2011-02-23 Thread eugenebalt
Yes, we tried AttributeModifier and it's not working. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-Title-or-AltText-to-CheckBoxMultipleChoice-tp3321054p3321193.html Sent from the Users forum mailing list archive at Nabble.com.

Re: CheckBoxMultipleChoice.getInput() = NULL after switch to AjaxSubmit

2011-02-23 Thread eugenebalt
Hi Kikiya, thanks a lot for the reply. Can you provide details on what you did? For everyone else reading this. Maybe the original post wasn't worded very well, but here's the issue: When I'm doing Form onSubmit(), CheckBoxMultipleChoice.getInput() returns correct results. However, in any Ajax

Re: Adding Title or AltText to CheckBoxMultipleChoice

2011-02-23 Thread eugenebalt
Our code is as follows. It's not working for us. Thanks a lot CheckBoxMultipleChoice appsCheckBox = new CheckBoxMultipleChoice(apps, appList).setPrefix(li).setSuffix(/li); appsCheckBox.add(new AttributeModifier(title,true, new Model() { @Override

Re: CheckBoxMultipleChoice.getInput() = NULL after switch to AjaxSubmit

2011-02-23 Thread eugenebalt
Yes, I've tried both the first one and the second one with onclick/onchange. The problem is still happening. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CheckBoxMultipleChoice-getInput-NULL-after-switch-to-AjaxSubmit-tp3317829p3321391.html Sent from the Users

Re: Select All Non-Disabled Items in CheckBoxMultipleChoice

2011-02-23 Thread eugenebalt
I don't understand this answer. Can you expand? When creating the CheckBoxMultipleChoice for the very first time, I override isDisabled(...). But this is different, I have the Select All button on which I am defining Ajax Updating Behavior. How do I get access to

Re: Select All Non-Disabled Items in CheckBoxMultipleChoice

2011-02-24 Thread eugenebalt
When I try to call isDisabled() from another location, I get the error The method isDisabled(E,int,String) is not visible. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Select-All-Non-Disabled-Items-in-CheckBoxMultipleChoice-tp3319897p3322799.html Sent from the

How to prevent user from double-clicking a non-Ajax component

2011-02-28 Thread eugenebalt
How do we prevent the user from double-clicking a non-Ajax component? When the submit occurs, isEnabled is set to false for the Wicket Button. If the user does a quick double click on the button, its throws a wicket runtime excpetion saying the component is disabled. Thanks -- View this

Pre-Select CheckBox in CheckBoxMultipleChoice?

2011-04-05 Thread eugenebalt
I have a CheckBoxMultipleChoice with some checkboxes. I also have a String, X. If there is a checkbox in the list whose title matches X, then I have to pre-select it (select it in the model). Any idea how to do that? Thanks -- View this message in context:

Re: Pre-Select CheckBox in CheckBoxMultipleChoice?

2011-04-05 Thread eugenebalt
Ok. thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Pre-Select-CheckBox-in-CheckBoxMultipleChoice-tp3428739p3428823.html Sent from the Users forum mailing list archive at Nabble.com. - To

CheckBoxMultipleChoice's getInput and getValue return NULL

2011-04-11 Thread eugenebalt
BACKGROUND: I have a CheckBoxMultipleChoice where all items are disabled. Also, one of the items is selected by default. 1. I construct my CheckBoxMultipleChoice as checkBoxes = new CheckBoxMultipleChoice(CheckboxGroup, new ArrayList()) ; 2. I present the choices (all disabled) as

Form Submission of Disabled-Selected Fields Not Working

2011-04-12 Thread eugenebalt
I ran into a problem which could be a bug. I have a field on the form which is disabled (a disabled CheckBoxMultipleChoice). However, one item in that field is pre-selected, so it's a Disabled+Selected situation. There is another Ajax fields that does a target.addComponent() of this

Re: Form Submission of Disabled-Selected Fields Not Working

2011-04-13 Thread eugenebalt
Thanks for the reply. That's what I suspected. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-Submission-of-Disabled-Selected-Fields-Not-Working-tp3445600p3447600.html Sent from the Users forum mailing list archive at Nabble.com.

Ajax is Modifying Field When It Shouldn't

2011-04-13 Thread eugenebalt
New Ajax issue: I have a CheckBoxMultipleChoice which is disabled upon initialization. There is another component which can enable this CheckBoxMultipleChoice in Ajax IF a certain condition is true. There is no else. If the condition is not true, then the Ajax shouldn't touch the

File Chooser / Browse For File Common Dialog Box?

2011-05-10 Thread eugenebalt
I have a text box with a 'Browse...' button next to it in my Web app. The Browse button is supposed to bring up the common Choose File dialog box. After the user selects a file there, the name is populated into the textbox. (I can choose to provide a local file, which is processed by the app.)

Re: File Chooser / Browse For File Common Dialog Box?

2011-05-10 Thread eugenebalt
It looks like HTML supports this automatically via input type=file. But my question is, when I do this in my HTML, Wicket gives me this error: Component comp must be applied to a tag with 'type' attribute matching 'text', not 'file' Does anyone know how to let Wicket handle an input type=file?

Re: File Chooser / Browse For File Common Dialog Box?

2011-05-10 Thread eugenebalt
Got it, it's working. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/File-Chooser-Browse-For-File-Common-Dialog-Box-tp3511882p3512006.html Sent from the Users forum mailing list archive at Nabble.com.

Error with FileUpload: ServletRequest does not contain multipart content

2011-05-10 Thread eugenebalt
I am using a File Picker (FileUpload class, for input type=file) in my form. Upon clicking the Submit button, I'm getting this error: ServletRequest does not contain multipart content. One possible sol ution is to explicitly call Form.setMultipart(true), Wicket tries its best to auto-detect

Re: Error with FileUpload: ServletRequest does not contain multipart content

2011-05-10 Thread eugenebalt
To clarify, I am handling the submit with a simple override of public void onSubmit() { ... } Also, there's no Ajax in the code, I removed all of it, and I'm still getting this error. What's going on with this FileUpload? -- View this message in context:

Re: Error with FileUpload: ServletRequest does not contain multipart content

2011-05-10 Thread eugenebalt
Basically, where should I put setMultipart(true)? Because in the constructor doesn't work. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-with-FileUpload-ServletRequest-does-not-contain-multipart-content-tp3512653p3512701.html Sent from the Users forum mailing

Re: Error with FileUpload: ServletRequest does not contain multipart content

2011-05-10 Thread eugenebalt
I looked through that example and in fact duplicated what you have there in the simplest possible example. My simple example below is just a single FileUpload field and a submit button, that's it. And I'm still getting that error! I have no idea why. My HTML: -- html

Re: Error with FileUpload: ServletRequest does not contain multipart content

2011-05-10 Thread eugenebalt
Sorry, I don't understand the hint. Do you mean UploadWebRequest in the Application class? The documentation says it's needed for the status bar, I don't have any status bars. My form is extremely simple. I'm still not sure what to do. -- View this message in context:

Re: Error with FileUpload: ServletRequest does not contain multipart content

2011-05-10 Thread eugenebalt
Yes, the form submitted with the GET. I removed the method, and it's working now. So a multipart should with the POST, then. Thanks. -- View this message in context:

FileUploadField Losing Value After Form Submit

2011-05-11 Thread eugenebalt
I've noticed that all the fields keep their values after you submit; the DropDowns, for example, don't get erased. But the FileUploadField does get erased after you submit. The File textbox (input type=file) is empty on each reload. Is this some kind of limitation, or is there a way around it?

Re: FileUploadField Losing Value After Form Submit

2011-05-11 Thread eugenebalt
Thanks for the reply. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FileUploadField-Losing-Value-After-Form-Submit-tp3514801p3514900.html Sent from the Users forum mailing list archive at Nabble.com.

FileUploadField.getClientFileName() doesn't give Absolute Path

2011-05-11 Thread eugenebalt
Another issue with the FileUpload, When I try to retrieve the specified filename with getClientFileName(), I only get the name of the file, without the absolute path. So I can't construct a java.io.File object with just the filename. How do I get the full path? In the example at

Re: FileUploadField.getClientFileName() doesn't give Absolute Path

2011-05-11 Thread eugenebalt
Thanks. That's what I'm doing. BTW, found this thread that explains why you can't get the full path: http://apache-wicket.1842946.n4.nabble.com/Where-is-the-full-client-filename-during-FileUpload-td1876600.html It's a security issue, if you could get the full path then you could have access to

Re: FileUploadField.getClientFileName() doesn't give Absolute Path

2011-05-11 Thread eugenebalt
Yes, I understand now. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FileUploadField-getClientFileName-doesn-t-give-Absolute-Path-tp3514910p3515021.html Sent from the Users forum mailing list archive at Nabble.com.

Need to distinguish between FileUpload's Empty Field and Bad File

2011-05-11 Thread eugenebalt
One final question on the FileUpload. I need to differentiate between 2 kinds of errors (I display a different message for each), 1) The FileUpload box is empty (i.e., nothing was typed in, and the Browse button wasn't clicked), 2) The file does not exist (a filename was typed in, but that file

Re: Need to distinguish between FileUpload's Empty Field and Bad File

2011-05-11 Thread eugenebalt
Since no one's replied, I guess there's no way to distinguish. Empty file box and invalid file are one and the same, and Wicket doesn't expose that granularity. I tried attaching a validator to the file box for an invalid file check and also did setRequired(true) to check for blanks, and the

FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?

2011-05-11 Thread eugenebalt
I have a FeedbackPanel in my form that displays errors. Rather than a regular FeedbackPanel that lists LI items, this one is a 2-level hierarchy which uses Definition Lists (DD/DT tags). Example from http://www.w3.org/TR/html401/struct/lists.html , DL DTCategory 1/DT DDItem 1/DD DDItem

Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?

2011-05-11 Thread eugenebalt
So I need to write my own class that extends Panel and implements IFeedback? I just looked in the IFeedback javadoc, it doesn't have any methods, it's just a marker. So how would I handle my messages? -- View this message in context:

Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?

2011-05-12 Thread eugenebalt
But what is responsible for actually presenting (listing) the items? My Model can be a HashMaplt;String,Listgt; that maps a category to a list of errors in that category. But what do I have to override to make the feedback panel present that hierarchical list based on the HashMap? -- View this

Re: FeedbackPanel with Hierarchical DT/DD (Definition List Tags)?

2011-05-12 Thread eugenebalt
Do I also have to override getModelObject()? If so, how? I'm getting an error in your code on the line HashMaplt;String,Listgt; messagesByCategory = getModelObject(); the error is that getModelObject() is undefined for the custom class. Thanks -- View this message in context:

How to turn off the ModificationWatcher Task?

2011-05-16 Thread eugenebalt
I recently started getting constant debug output on my console, like this: Run the job: org.apache.wicket.util.watch.ModificationWatcher$1@11dd1 1dd [5/16/11 10:18:34:454 EDT] 001c SystemOut O 1641041 [ModificationWatcher Task] DEBUG org.apa che.wicket.util.thread.Task - Finished with

JavaScript onClick Handler Stops Form Submit

2011-05-18 Thread eugenebalt
Hi, My SubmitButton has an onClick JavaScript handler. Let's say the handler is something simple, like onclick=alert('Test') There are no JS errors when I run. But the problem is, the form submit flow stops. The flow doesn't go into Form.onSubmit() as it should. I tried returning true and

Re: JavaScript onClick Handler Stops Form Submit

2011-05-19 Thread eugenebalt
Thanks for the replies. I did what Pedro suggested and when I do the onClick handler in Wicket, the flow is OK now. (When I did it in HTML, I still get the alert box, but the flow would stop afterwards.) -- View this message in context:

Form Doesn't Reload on Bad Filename in File Input Box

2011-05-19 Thread eugenebalt
My form doesn't reload on bad (invalid) filename entered in the FileUpload input box. But it *does* reload in these 2 cases: 1) Empty field 2) File exists Does anyone know why? I have to display a message on invalid file just like I do with the other two cases, no file specified and file OK.

Re: Form Doesn't Reload on Bad Filename in File Input Box

2011-05-19 Thread eugenebalt
I think I know the answer, it's an IE-specific issue. Some more info: http://www.webmasterworld.com/html/3290988.htm Essentially, in IE6 and 7, if your file input doesn't begin with C:\ or some other drive-letter path, IE won't even try to submit. But if it does, then it will submit, even if the

Set FeedbackPanel with Error from JavaScript?

2011-05-19 Thread eugenebalt
Is it possible to do some validation in JavaScript, and if that fails, have that error be displayed as one of the messages in the FeedbackPanel? In other words, this FeedbackPanel message won't be from server-side validation, it will originate from JavaScript. -- View this message in context:

Re: Set FeedbackPanel with Error from JavaScript?

2011-05-20 Thread eugenebalt
Thanks, which one is easier? Are there any examples of how this would be done? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Set-FeedbackPanel-with-Error-from-JavaScript-tp3536164p3538940.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Set FeedbackPanel with Error from JavaScript?

2011-05-20 Thread eugenebalt
Sorry, but can someone help? This is pretty urgent. I like the 2nd idea, it looks easier to implement. I need to issue an AJAX request for the FeedbackPanel inside of JavaScript. The only thing is, I haven't used AJAX by itself. Thanks -- View this message in context:

Setting the value of a HiddenField from JavaScript

2011-05-20 Thread eugenebalt
Hi, As was posted before, the FileUploadField resets its model on Submit. We lose the user's input. I need to save the user's input because, in case the file doesn't exist, the error message has to mention it by name: File [XYZ] does not exist. In JavaScript, I can easily get the user's input.

  1   2   3   >