Re: Form FileUploadField maxSize does not work

2009-09-04 Thread Igor Vaynberg
so is the problem that the form being submitted is the outer form and
it doesnt support the inner form's maxsize?

-igor

On Fri, Sep 4, 2009 at 9:10 AM, nytrus wrote:
>
> Yes igor, below there is the code, even if is not very short.
> The issue is that when I click on upload1 button the submitting form is
> form0 instead of simpleUpload.
> Maybe I've bad-coded some part.
>
> /** the upload panel, very similar to the wicket example **/
> public class UploadFilePanel extends Panel {
>    /**
>     * Form for uploads.
>     */
>    private class FileUploadForm extends Form implements
> IFormVisitorParticipant{
>        private FileUploadField fileUploadField;
>        public FileUploadForm(String name, IModel model, Bytes
> maxSize){
>            super(name);
>            // set this form to multipart mode
>            setMultiPart(true);
>            // Add one file input field
>            add(fileUploadField = new FileUploadField("fileInput", model));
>            setMaxSize(maxSize);
>        }
>
>       �...@override
>        protected void onSubmit(){
>            final FileUpload upload = fileUploadField.getFileUpload();
>            if (upload != null){
>                // Create a new file
>                File newFile = new File(getUploadFolder(),
> upload.getClientFileName());
>                try{
>                    // Save to new file
>                    newFile.createNewFile();
>                    upload.writeTo(newFile);
>                    FileUploadForm.this.info("saved file: " +
> upload.getClientFileName());
>                }
>                catch (Exception e){}
>            }
>        }
>    }
>
>    public UploadFilePanel(String id, Bytes maxSize) {
>        super(id);
>
>        // Add simple upload form, which is hooked up to its feedback panel
> by
>        // virtue of that panel being nested in the form.
>        if (maxSize==null) maxSize = Bytes.kilobytes(100);
>        final FileUploadForm simpleUploadForm = new
> FileUploadForm("simpleUpload", new Model(null), maxSize);
>        add(simpleUploadForm);
>
>        final FeedbackPanel uploadFeedback = new
> FeedbackPanel("uploadFeedback", new ContainerFeedbackMessageFilter(this));
>        add(uploadFeedback);
>    }
> }
> /** the panel html **/
> 
> 
>    
>            
>      
>    
>    
> 
> 
>
>
> /** the test page **/
> public class TestPage extends WebPage {
>        Form form0 = new Form("form0");
>        UploadFilePanel upload0 = new UploadFilePanel("upload0",
> Bytes.kilobytes(100));
>        form0.add(upload0); /*** this upload DOES NOT check max size ***/
>        add(form0);
>
>        UploadFilePanel upload1 = new UploadFilePanel("upload1",
> Bytes.kilobytes(100));
>        add(upload1); /*** this upload DOES check max size ***/
> }
> /** test page html **/
> 
> 
>        
> 
> 
> 
>
>
>
>
> igor.vaynberg wrote:
>>
>> perhaps if you showed your code it would be more clear.
>>
>> -igor
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Form-FileUploadField-maxSize-does-not-work-tp25293039p25297271.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can't update TextField via Ajax after a validation error

2009-09-04 Thread Jason Lea
When a field is submitted and there is a validation error, it doesn't 
update the model and the field will redisplay with the invalid input.  
This way the user can see what they typed and can fix the problem.
With your populate link, you are updating the model, but wicket won't 
look at the model because the field is redisplaying the invalid input 
(in your case an empty field).


If you want to update the underlying model value and ignore the previous 
failed validation you will need to clear the input.
You could use Form.clearInput() to clear all invalid fields or 
testInput.clearInput() perhaps.


Neil Curzon wrote:

Thanks for the reply.

It doesn't sound like this is exactly what I want, though. I do need my
required field to be validated, always. I just don't understand why
validation works when the link that fills in the Integer behind the property
model is clicked first, but the same link populating and updating the field
stops working after a validation error.

On Fri, Sep 4, 2009 at 6:11 PM, Pedro Santos  wrote:

  

Take a look at:

http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)

On Fri, Sep 4, 2009 at 7:01 PM, Neil Curzon  wrote:



Hi all,

I'm having a weird problem that causes an input to refuse to update with
  

an


AjaxLink click method when there's been a validation error. One field in
the
form has a property model pointing to an Integer value. It's set to
required, and there are other links that set the Integer value.

What I see is that when I first click a link that populates the Integer
under the required field, everything works fine. But when I click submit
first, the populate links stop working. The handlers are still invoked,
  

but


the HTML that comes back in the Ajax Debug shows an input with value=""
(even though the getModelObject() for that TextField returns the proper
value in debugging statements). This results in the input always being
showed empty. If I do things in the proper order, I see the correct value
populate in the text field as expected. It's not just a display issue,
either. The form refuses to submit successfully at all if there was a
validation error first (and you don't manually enter anything into the
field).

Below is a simple application that reproduces the issue I'm seeing. I'm
using wicket 1.3.7 but I've tried 1.4.1 with the same result. Any help
would
be greatly appreciated.

Thanks
Neil



public class HomePage extends WebPage {

   public HomePage() {
   add(new TestForm("testForm"));
   }

   class TestForm extends Form {

   private Integer value;
   private FeedbackPanel feedbackPanel;
   private TextField testInput;

   public TestForm(String id) {
   super(id);

   add(feedbackPanel = new FeedbackPanel("feedbackPanel"));
   feedbackPanel.setOutputMarkupId(true);

   add(testInput = new TextField("testInput", new
PropertyModel(this, "value")));
   testInput.setRequired(true);
   testInput.setOutputMarkupId(true);

   add(new AjaxButton("submitButton"){
   @Override
   protected void onError(AjaxRequestTarget target, Form
  

form)


{
   target.addComponent(feedbackPanel);
   }

   protected void onSubmit(AjaxRequestTarget target, Form
  

form)


{
   info("It worked!");
   target.addComponent(feedbackPanel);
   }
   });

   add(new AjaxLink("chooseOneLink"){
   public void onClick(AjaxRequestTarget target) {
   value = 1;
   target.addComponent(testInput);
   target.addComponent(feedbackPanel);
   }
   });
   }
   }
}


   
   
   
   
   Choose 1
   Submit
   
   


  


  


--
Jason Lea




Transparent resolver parent child working but cannot add third component

2009-09-04 Thread david
Hello all, I have a WebPage parent transparent resolver that displays the child 
page OK. The parent page is a tabbed menu and the child is a row of submenus. 
When the submenu child is clicked I want an added third component (a WebPage 
class) to be displayed. But instead I get the usual ugly 
WicketRunTimeException: component added but markup not found. All classes and 
HTML are in the same package. Obviously, this issue is the result of some 
mismatch in the hierarchy but I thought the transparent resolver would fix the 
hierarchy dilemma. I have studied every transparent resolver example I can 
Google but nothing jumps out as a diagnostic to perform to resolve this 
problem. I don't want to refactor all of the classes from markup inheritance to 
Panel if this can be avoided as this will in all-likelihood break the menu 
pages. Please advise.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: Can't update TextField via Ajax after a validation error

2009-09-04 Thread Neil Curzon
Thanks for the reply.

It doesn't sound like this is exactly what I want, though. I do need my
required field to be validated, always. I just don't understand why
validation works when the link that fills in the Integer behind the property
model is clicked first, but the same link populating and updating the field
stops working after a validation error.

On Fri, Sep 4, 2009 at 6:11 PM, Pedro Santos  wrote:

> Take a look at:
>
> http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)
>
> On Fri, Sep 4, 2009 at 7:01 PM, Neil Curzon  wrote:
>
> > Hi all,
> >
> > I'm having a weird problem that causes an input to refuse to update with
> an
> > AjaxLink click method when there's been a validation error. One field in
> > the
> > form has a property model pointing to an Integer value. It's set to
> > required, and there are other links that set the Integer value.
> >
> > What I see is that when I first click a link that populates the Integer
> > under the required field, everything works fine. But when I click submit
> > first, the populate links stop working. The handlers are still invoked,
> but
> > the HTML that comes back in the Ajax Debug shows an input with value=""
> > (even though the getModelObject() for that TextField returns the proper
> > value in debugging statements). This results in the input always being
> > showed empty. If I do things in the proper order, I see the correct value
> > populate in the text field as expected. It's not just a display issue,
> > either. The form refuses to submit successfully at all if there was a
> > validation error first (and you don't manually enter anything into the
> > field).
> >
> > Below is a simple application that reproduces the issue I'm seeing. I'm
> > using wicket 1.3.7 but I've tried 1.4.1 with the same result. Any help
> > would
> > be greatly appreciated.
> >
> > Thanks
> > Neil
> >
> >
> >
> > public class HomePage extends WebPage {
> >
> >public HomePage() {
> >add(new TestForm("testForm"));
> >}
> >
> >class TestForm extends Form {
> >
> >private Integer value;
> >private FeedbackPanel feedbackPanel;
> >private TextField testInput;
> >
> >public TestForm(String id) {
> >super(id);
> >
> >add(feedbackPanel = new FeedbackPanel("feedbackPanel"));
> >feedbackPanel.setOutputMarkupId(true);
> >
> >add(testInput = new TextField("testInput", new
> > PropertyModel(this, "value")));
> >testInput.setRequired(true);
> >testInput.setOutputMarkupId(true);
> >
> >add(new AjaxButton("submitButton"){
> >@Override
> >protected void onError(AjaxRequestTarget target, Form
> form)
> > {
> >target.addComponent(feedbackPanel);
> >}
> >
> >protected void onSubmit(AjaxRequestTarget target, Form
> form)
> > {
> >info("It worked!");
> >target.addComponent(feedbackPanel);
> >}
> >});
> >
> >add(new AjaxLink("chooseOneLink"){
> >public void onClick(AjaxRequestTarget target) {
> >value = 1;
> >target.addComponent(testInput);
> >target.addComponent(feedbackPanel);
> >}
> >});
> >}
> >}
> > }
> >
> > 
> >
> >
> >
> >
> >Choose 1
> >Submit
> >
> >
> > 
> >
>


Re: Can't update TextField via Ajax after a validation error

2009-09-04 Thread Pedro Santos
Take a look at:
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/form/Button.html#setDefaultFormProcessing(boolean)

On Fri, Sep 4, 2009 at 7:01 PM, Neil Curzon  wrote:

> Hi all,
>
> I'm having a weird problem that causes an input to refuse to update with an
> AjaxLink click method when there's been a validation error. One field in
> the
> form has a property model pointing to an Integer value. It's set to
> required, and there are other links that set the Integer value.
>
> What I see is that when I first click a link that populates the Integer
> under the required field, everything works fine. But when I click submit
> first, the populate links stop working. The handlers are still invoked, but
> the HTML that comes back in the Ajax Debug shows an input with value=""
> (even though the getModelObject() for that TextField returns the proper
> value in debugging statements). This results in the input always being
> showed empty. If I do things in the proper order, I see the correct value
> populate in the text field as expected. It's not just a display issue,
> either. The form refuses to submit successfully at all if there was a
> validation error first (and you don't manually enter anything into the
> field).
>
> Below is a simple application that reproduces the issue I'm seeing. I'm
> using wicket 1.3.7 but I've tried 1.4.1 with the same result. Any help
> would
> be greatly appreciated.
>
> Thanks
> Neil
>
>
>
> public class HomePage extends WebPage {
>
>public HomePage() {
>add(new TestForm("testForm"));
>}
>
>class TestForm extends Form {
>
>private Integer value;
>private FeedbackPanel feedbackPanel;
>private TextField testInput;
>
>public TestForm(String id) {
>super(id);
>
>add(feedbackPanel = new FeedbackPanel("feedbackPanel"));
>feedbackPanel.setOutputMarkupId(true);
>
>add(testInput = new TextField("testInput", new
> PropertyModel(this, "value")));
>testInput.setRequired(true);
>testInput.setOutputMarkupId(true);
>
>add(new AjaxButton("submitButton"){
>@Override
>protected void onError(AjaxRequestTarget target, Form form)
> {
>target.addComponent(feedbackPanel);
>}
>
>protected void onSubmit(AjaxRequestTarget target, Form form)
> {
>info("It worked!");
>target.addComponent(feedbackPanel);
>}
>});
>
>add(new AjaxLink("chooseOneLink"){
>public void onClick(AjaxRequestTarget target) {
>value = 1;
>target.addComponent(testInput);
>target.addComponent(feedbackPanel);
>}
>});
>}
>}
> }
>
> 
>
>
>
>
>Choose 1
>Submit
>
>
> 
>


Can't update TextField via Ajax after a validation error

2009-09-04 Thread Neil Curzon
Hi all,

I'm having a weird problem that causes an input to refuse to update with an
AjaxLink click method when there's been a validation error. One field in the
form has a property model pointing to an Integer value. It's set to
required, and there are other links that set the Integer value.

What I see is that when I first click a link that populates the Integer
under the required field, everything works fine. But when I click submit
first, the populate links stop working. The handlers are still invoked, but
the HTML that comes back in the Ajax Debug shows an input with value=""
(even though the getModelObject() for that TextField returns the proper
value in debugging statements). This results in the input always being
showed empty. If I do things in the proper order, I see the correct value
populate in the text field as expected. It's not just a display issue,
either. The form refuses to submit successfully at all if there was a
validation error first (and you don't manually enter anything into the
field).

Below is a simple application that reproduces the issue I'm seeing. I'm
using wicket 1.3.7 but I've tried 1.4.1 with the same result. Any help would
be greatly appreciated.

Thanks
Neil



public class HomePage extends WebPage {

public HomePage() {
add(new TestForm("testForm"));
}

class TestForm extends Form {

private Integer value;
private FeedbackPanel feedbackPanel;
private TextField testInput;

public TestForm(String id) {
super(id);

add(feedbackPanel = new FeedbackPanel("feedbackPanel"));
feedbackPanel.setOutputMarkupId(true);

add(testInput = new TextField("testInput", new
PropertyModel(this, "value")));
testInput.setRequired(true);
testInput.setOutputMarkupId(true);

add(new AjaxButton("submitButton"){
@Override
protected void onError(AjaxRequestTarget target, Form form)
{
target.addComponent(feedbackPanel);
}

protected void onSubmit(AjaxRequestTarget target, Form form)
{
info("It worked!");
target.addComponent(feedbackPanel);
}
});

add(new AjaxLink("chooseOneLink"){
public void onClick(AjaxRequestTarget target) {
value = 1;
target.addComponent(testInput);
target.addComponent(feedbackPanel);
}
});
}
}
}






Choose 1
Submit





Re: WebMarkupContainer Ajax update problem

2009-09-04 Thread Altuğ B . Altıntaş
I replaced "Id" with "class" and it worked !

Thanks.

2009/9/4 Jeremy Thomerson 

> I'm not sure you can change the ID of an element in an Ajax request.
>  Wicket
> depends on the ID to do component replacement.  Try using a class instead.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Thu, Sep 3, 2009 at 5:57 PM, Altuğ B. Altıntaş 
> wrote:
>
> > Hi ;
> >
> > In Panel I have a  AjaxButton
> >
> > In that  AjaxButton, I tried to update the background (Parent Pages's
> > WebMarkupContainer). Here is the simplified code :
> >
> >  AjaxButton vote = new AjaxButton("Vote") {
> >
> >@Override
> >protected void onSubmit(AjaxRequestTarget target,
> > Form form) {
> >
> >.
> >   WebMarkupContainer content =  (WebMarkupContainer)
> > super.findPage().get("Content");
> >   content.add(new SimpleAttributeModifier("id",
> > "content_selected")) ;
> >   target.addComponent(content);
> > }
> > 
> >
> > Also I set WebMarkupContainer.setOutputMarkupId(true);  in my parent page
> >
> > Any suggestions ?
> >
> > Thanks.
> >
> > --
> > Altuğ.
> >
>



-- 
Altuğ.


Re: Footer Toolbar for DefaultDataTable (wicket 1.3.2)

2009-09-04 Thread saahuja

Hi,

Does anyone have an example of a toolbar that would add the amounts in the
table?

Thanks.


swapnil.wadagave wrote:
> 
> hi Sanjeev,
> I think you can able to do it using this code,
> 
> extend parent class as DataTable,dont use DefaultDataTable :
> code:
> DatatTable datatable=new DataTable("entries",column,provider,3)
> {
> protected Item newRowItem(String id,int index,IModel model)
> {
> return new OddEvenItem(id,indexmmodel);
> }};
> datatable.addTopToolBar(new HeadersToolBar(datatble,provider));
> datatable.addBottomToolBar(new NavigationToolBar(datatble));
> add(datatable);
> 
> Regards,
> Swapnil
> 
> 
> 
> standon wrote:
>> 
>> I'm using DefaultDataTable with sortable data provider in my project. All
>> the columns are sortable. This  data table has few amount columns, which
>> I need to sum up and show as a last row (TotalRow) at the bottom of the
>> table. This last row (TotalRow) should not be part of sortable data
>> provider. Otherwise, if user clicks on any table column, the table will
>> sort it and put in top (1st row, descending order) of the table.
>> 
>> Basically, the way the column headers are displayed on default data
>> table, I want similar thing to be displayed at the bottom of the table
>> (TotalRow), which I can control it. I don't know how to use
>> addBottomToolbar to achieve this.
>> 
>> If there is a way, pls let me know. If you can provide a code snippet
>> that would be great.
>> 
>> Thanks
>> Sanjeev
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Footer-Toolbar-for-DefaultDataTable-%28wicket-1.3.2%29-tp16995010p25301509.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-04 Thread Pedro Santos
Done, I commit now the mbeanview to wicket stuff.
Johannes, what about the donuts?!

On Fri, Sep 4, 2009 at 3:34 PM, Johannes Schneider
wrote:

> Well, who is the One?
>
> Igor Vaynberg wrote:
> > or you can request commit access and eat your own donuts :)
> >
> > -igor
> >
> > On Fri, Sep 4, 2009 at 10:43 AM, Johannes
> > Schneider wrote:
> >> Hi,
> >>
> >> I really love the work that has been put into WicketStuff. The world is
> >> much better *with* WicketStuff.
> >> But unfortunately several files are outdated and many releases are
> missing.
> >>
> >> So at first I want to say thank you to everybody who has put work into
> >> that project. Then I want to motivate those with commit rights to update
> >> the projects and release some of the modules...
> >> I am offering some donuts ;-)
> >>
> >>
> >> Thanks,
> >>
> >> Johannes
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicketstuff really needs some updates

2009-09-04 Thread Johannes Schneider
Well, who is the One?

Igor Vaynberg wrote:
> or you can request commit access and eat your own donuts :)
> 
> -igor
> 
> On Fri, Sep 4, 2009 at 10:43 AM, Johannes
> Schneider wrote:
>> Hi,
>>
>> I really love the work that has been put into WicketStuff. The world is
>> much better *with* WicketStuff.
>> But unfortunately several files are outdated and many releases are missing.
>>
>> So at first I want to say thank you to everybody who has put work into
>> that project. Then I want to motivate those with commit rights to update
>> the projects and release some of the modules...
>> I am offering some donuts ;-)
>>
>>
>> Thanks,
>>
>> Johannes
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Palette rendering issue

2009-09-04 Thread Troy Cauble
Thanks,

I'm CSS challenged.  But  the "override" keyword
helped me google a direction.

-troy

On Fri, Sep 4, 2009 at 12:26 PM, Jeremy
Thomerson wrote:
> Why replace the CSS?  Just override it with your own.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Fri, Sep 4, 2009 at 11:07 AM, Troy Cauble  wrote:
>
>> Thanks,
>>
>> I ended up making "Palette_noOrdering.html" and overriding
>> getVariation().  It works for finding my altered html.
>>
>> But then I tried to make a small change in palette.css and can't seem
>> to get it picked up.  What's the trick to naming and placement for
>> replacing the css?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-04 Thread Pedro Santos
Great Igor! I'm feeling like Homer Simpson

On Fri, Sep 4, 2009 at 3:04 PM, Igor Vaynberg wrote:

> or you can request commit access and eat your own donuts :)
>
> -igor
>
> On Fri, Sep 4, 2009 at 10:43 AM, Johannes
> Schneider wrote:
> > Hi,
> >
> > I really love the work that has been put into WicketStuff. The world is
> > much better *with* WicketStuff.
> > But unfortunately several files are outdated and many releases are
> missing.
> >
> > So at first I want to say thank you to everybody who has put work into
> > that project. Then I want to motivate those with commit rights to update
> > the projects and release some of the modules...
> > I am offering some donuts ;-)
> >
> >
> > Thanks,
> >
> > Johannes
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicketstuff really needs some updates

2009-09-04 Thread Igor Vaynberg
or you can request commit access and eat your own donuts :)

-igor

On Fri, Sep 4, 2009 at 10:43 AM, Johannes
Schneider wrote:
> Hi,
>
> I really love the work that has been put into WicketStuff. The world is
> much better *with* WicketStuff.
> But unfortunately several files are outdated and many releases are missing.
>
> So at first I want to say thank you to everybody who has put work into
> that project. Then I want to motivate those with commit rights to update
> the projects and release some of the modules...
> I am offering some donuts ;-)
>
>
> Thanks,
>
> Johannes
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicketstuff really needs some updates

2009-09-04 Thread Pedro Santos
Hi Johannes,

recently I develop an jmx panel, to view and operate the applications
mbeans. And latter I discover that the wicket stuff already has one!
I rememer that, because in the ocasion I was afraid to start use the jmx
wicket stuff panel, due it has the wicket 1.3.1 on classpath, and the
project was using 1.4.1


On Fri, Sep 4, 2009 at 2:43 PM, Johannes Schneider
wrote:

> Hi,
>
> I really love the work that has been put into WicketStuff. The world is
> much better *with* WicketStuff.
> But unfortunately several files are outdated and many releases are missing.
>
> So at first I want to say thank you to everybody who has put work into
> that project. Then I want to motivate those with commit rights to update
> the projects and release some of the modules...
> I am offering some donuts ;-)
>
>
> Thanks,
>
> Johannes
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicketstuff really needs some updates

2009-09-04 Thread Johannes Schneider
Hi,

I really love the work that has been put into WicketStuff. The world is
much better *with* WicketStuff.
But unfortunately several files are outdated and many releases are missing.

So at first I want to say thank you to everybody who has put work into
that project. Then I want to motivate those with commit rights to update
the projects and release some of the modules...
I am offering some donuts ;-)


Thanks,

Johannes

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Palette rendering issue

2009-09-04 Thread Jeremy Thomerson
Why replace the CSS?  Just override it with your own.

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Sep 4, 2009 at 11:07 AM, Troy Cauble  wrote:

> Thanks,
>
> I ended up making "Palette_noOrdering.html" and overriding
> getVariation().  It works for finding my altered html.
>
> But then I tried to make a small change in palette.css and can't seem
> to get it picked up.  What's the trick to naming and placement for
> replacing the css?
>
> Also, I couldn't follow the references to "sourcePath" on the wiki page
> (below) or in the referenced javadoc.  Can someone explain how that
> alternative works?
>
> Thanks again,
> -troy
>
> On Wed, Sep 2, 2009 at 4:53 AM, Martijn
> Dashorst wrote:
> > Or create a foo_companystyle.html markup file in the specific place
> > and set the style. Then you're independent of classloading issues (and
> > it is a bit nicer imo).
> >
> > See
> http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
> > for more information
> >
> > Martijn
> >
> > On Wed, Sep 2, 2009 at 5:10 AM, Jeremy
> > Thomerson wrote:
> >> If you want to replace any html for a component, simply put it in your
> >> source tree at the same location it would appear in Wicket's jar.  As
> long
> >> as your jar takes precedence on your classpath (which is usually the
> case
> >> since you build yours into the war and wicket goes in the lib dir), then
> >> your file will be loaded instead.
> >>
> >> --
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >>
> >>
> >>
> >> On Tue, Sep 1, 2009 at 8:25 PM, Troy Cauble 
> wrote:
> >>
> >>> When "rows" is small, say 4, and "allowOrder" is false, Palette
> >>> renders less than perfectly.
> >>>
> >>> I think it's due to a couple of extra  s left in the buttons panel
> >>> when the order buttons are made invisible.
> >>>
> >>> Is there any way I could replace that Palette.html without replacing
> >>> the whole component?  Or maybe CSS "magic" could work around this?
> >>>
> >>> Thanks,
> >>> -troy
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >>
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.4 increases type safety for web applications
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: calendar or room/time reservation components?

2009-09-04 Thread Troy Cauble
Thanks, timeline looks very slick for time-lines.
But it doesn't appear to give you control of the non-time-axis.
For a room reservation system you might get

[room 1 ] [ room 2] [room 7]
 [room 3]
  [room 1]
8am 10am  12 am

(It'd be much better to see "room 1" own a row.)
Maybe if I use (abuse?) "bands" for rooms?

-troy


On Thu, Aug 27, 2009 at 6:07 AM, Tomasz Dziurko wrote:
> If you need some calendar-like component with time duration and multi-events
> presentation I suggest
> http://www.simile-widgets.org/timeline/
>
> and it's Wicket child (didn't use it, but functionality should is similar to
> your needs):
>
> http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-simile-timeline
>
> --
> Pozdrawiam,
> Tomasz Dziurko
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form FileUploadField maxSize does not work

2009-09-04 Thread nytrus

Yes igor, below there is the code, even if is not very short.
The issue is that when I click on upload1 button the submitting form is
form0 instead of simpleUpload.
Maybe I've bad-coded some part.

/** the upload panel, very similar to the wicket example **/
public class UploadFilePanel extends Panel {
/**
 * Form for uploads.
 */
private class FileUploadForm extends Form implements
IFormVisitorParticipant{
private FileUploadField fileUploadField;
public FileUploadForm(String name, IModel model, Bytes
maxSize){
super(name);
// set this form to multipart mode
setMultiPart(true);
// Add one file input field
add(fileUploadField = new FileUploadField("fileInput", model));
setMaxSize(maxSize);
}

@Override
protected void onSubmit(){
final FileUpload upload = fileUploadField.getFileUpload();
if (upload != null){
// Create a new file
File newFile = new File(getUploadFolder(),
upload.getClientFileName());
try{
// Save to new file
newFile.createNewFile();
upload.writeTo(newFile);
FileUploadForm.this.info("saved file: " +
upload.getClientFileName());
}
catch (Exception e){}
}
}
}

public UploadFilePanel(String id, Bytes maxSize) {
super(id);

// Add simple upload form, which is hooked up to its feedback panel
by
// virtue of that panel being nested in the form.
if (maxSize==null) maxSize = Bytes.kilobytes(100);
final FileUploadForm simpleUploadForm = new
FileUploadForm("simpleUpload", new Model(null), maxSize);
add(simpleUploadForm);

final FeedbackPanel uploadFeedback = new
FeedbackPanel("uploadFeedback", new ContainerFeedbackMessageFilter(this));
add(uploadFeedback);
}
}
/** the panel html **/




  




  

/** the test page **/
public class TestPage extends WebPage {
Form form0 = new Form("form0");
UploadFilePanel upload0 = new UploadFilePanel("upload0",
Bytes.kilobytes(100));
form0.add(upload0); /*** this upload DOES NOT check max size ***/
add(form0);

UploadFilePanel upload1 = new UploadFilePanel("upload1",
Bytes.kilobytes(100));
add(upload1); /*** this upload DOES check max size ***/
}
/** test page html **/










igor.vaynberg wrote:
> 
> perhaps if you showed your code it would be more clear.
> 
> -igor
> 

-- 
View this message in context: 
http://www.nabble.com/Form-FileUploadField-maxSize-does-not-work-tp25293039p25297271.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Palette rendering issue

2009-09-04 Thread Troy Cauble
Thanks,

I ended up making "Palette_noOrdering.html" and overriding
getVariation().  It works for finding my altered html.

But then I tried to make a small change in palette.css and can't seem
to get it picked up.  What's the trick to naming and placement for
replacing the css?

Also, I couldn't follow the references to "sourcePath" on the wiki page
(below) or in the referenced javadoc.  Can someone explain how that
alternative works?

Thanks again,
-troy

On Wed, Sep 2, 2009 at 4:53 AM, Martijn
Dashorst wrote:
> Or create a foo_companystyle.html markup file in the specific place
> and set the style. Then you're independent of classloading issues (and
> it is a bit nicer imo).
>
> See 
> http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
> for more information
>
> Martijn
>
> On Wed, Sep 2, 2009 at 5:10 AM, Jeremy
> Thomerson wrote:
>> If you want to replace any html for a component, simply put it in your
>> source tree at the same location it would appear in Wicket's jar.  As long
>> as your jar takes precedence on your classpath (which is usually the case
>> since you build yours into the war and wicket goes in the lib dir), then
>> your file will be loaded instead.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Tue, Sep 1, 2009 at 8:25 PM, Troy Cauble  wrote:
>>
>>> When "rows" is small, say 4, and "allowOrder" is false, Palette
>>> renders less than perfectly.
>>>
>>> I think it's due to a couple of extra  s left in the buttons panel
>>> when the order buttons are made invisible.
>>>
>>> Is there any way I could replace that Palette.html without replacing
>>> the whole component?  Or maybe CSS "magic" could work around this?
>>>
>>> Thanks,
>>> -troy
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Question regarding file uploading

2009-09-04 Thread Daniel Dominik Holúbek
thanks, that is exactly what i was looking for :)

On Fri, Sep 4, 2009 at 5:10 PM, Igor Vaynberg wrote:

> there is a page on our wiki that demonstrates eaxctly this
>
> -igor
>
> On Fri, Sep 4, 2009 at 7:11 AM, Daniel Dominik
> Holúbek wrote:
> > thanks,and can you give me a hint on storing images in database?
> > i can't quite imagine that :)
> >
> > On Fri, Sep 4, 2009 at 9:34 AM, Igor Vaynberg  >wrote:
> >
> >> store the uploaded images in a permanent store such as a database or a
> >> dir on the server.
> >>
> >> -igor
> >>
> >> On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
> >> Holúbek wrote:
> >> > Hello,i've got just one question.
> >> > I would like to make a photo gallery, and thus I need to let users
> upload
> >> > their images.
> >> > But if I redeploy my webapp afterwards, would I loose those images?
> >> > If yes, is there any workaround?
> >> >
> >> > Thanks :)
> >> >
> >> > --
> >> > -danoh-
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > -danoh-
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
-danoh-


Re: Setting th

2009-09-04 Thread Igor Vaynberg
you have to go low level and most likely override your form's
process() method to do this.

you can get the value by calling formcomponent.getinput() which will
give you the raw unprocessed value from the http request.

-igor

On Fri, Sep 4, 2009 at 8:28 AM,  wrote:
> I have a form with a RadioChoice component. I'd like to use the value
> selected in that component ("yes" or "no") to set the isRequired property of
> another component. Wondering what method I need to call on the RadioChoice
> component that will allow me to get the value that the user selected?
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Setting th

2009-09-04 Thread jpalmer1026





I have a form with a RadioChoice component. I'd like to use the value selected in that component ("yes" or "no") to set the isRequired property of another component. Wondering what method I need to call on the RadioChoice component that will allow me to get the value that the user selected? 







Re: Question regarding file uploading

2009-09-04 Thread Igor Vaynberg
there is a page on our wiki that demonstrates eaxctly this

-igor

On Fri, Sep 4, 2009 at 7:11 AM, Daniel Dominik
Holúbek wrote:
> thanks,and can you give me a hint on storing images in database?
> i can't quite imagine that :)
>
> On Fri, Sep 4, 2009 at 9:34 AM, Igor Vaynberg wrote:
>
>> store the uploaded images in a permanent store such as a database or a
>> dir on the server.
>>
>> -igor
>>
>> On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
>> Holúbek wrote:
>> > Hello,i've got just one question.
>> > I would like to make a photo gallery, and thus I need to let users upload
>> > their images.
>> > But if I redeploy my webapp afterwards, would I loose those images?
>> > If yes, is there any workaround?
>> >
>> > Thanks :)
>> >
>> > --
>> > -danoh-
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> -danoh-
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form FileUploadField maxSize does not work

2009-09-04 Thread Igor Vaynberg
perhaps if you showed your code it would be more clear.

-igor

On Fri, Sep 4, 2009 at 4:50 AM, Nicola Tucci wrote:
> I'm working with a file upload, using
> http://www.wicket-library.com/wicket-examples/upload/single as example.
>
> I've created an UploadPanel very similar to UploadPage.java of the example
> (with the FileUploadForm form).
> Well I've maxsize set to 100K and this check work if I add my uploadpanel to
> the WebPage.
>
> But If I add the upload panel to a form, the check does not work anymore.
> The difference is that without outer form, the submit button of the upload
> panel belong to FileUploadForm (with maxSize set).
> With the outer form, the resulting submitting form correspond to the outer
> form. I don't understand this as I'm still clicking the same submit button
> of FileUploadForm. In this way, the maxsize is the one set in the outer form
> (which I don't want to set! I want to have my UploadPanel component with
> maxsize passed as parameter).
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Question regarding file uploading

2009-09-04 Thread Edward Zarecor
See BlobImageResource.

http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/image/resource/BlobImageResource.html

Ed.


On Fri, Sep 4, 2009 at 10:18 AM, Daniel Dominik Holúbek <
dankodo...@gmail.com> wrote:

> yes,but what i can't imagine is how to retrieve those objects from db.
> what to use? Resource? ResourceReference?
>
>
> On Fri, Sep 4, 2009 at 4:15 PM, Edward Zarecor 
> wrote:
>
>> Google your database of choice and blob (binary large objects), e.g.,
>> postgres blob; oracle blob, etc.
>>
>> Ed.
>>
>>
>> On Fri, Sep 4, 2009 at 10:11 AM, Daniel Dominik Holúbek <
>> dankodo...@gmail.com> wrote:
>>
>> > thanks,and can you give me a hint on storing images in database?
>> > i can't quite imagine that :)
>> >
>> > On Fri, Sep 4, 2009 at 9:34 AM, Igor Vaynberg > > >wrote:
>> >
>> > > store the uploaded images in a permanent store such as a database or a
>> > > dir on the server.
>> > >
>> > > -igor
>> > >
>> > > On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
>> > > Holúbek wrote:
>> > > > Hello,i've got just one question.
>> > > > I would like to make a photo gallery, and thus I need to let users
>> > upload
>> > > > their images.
>> > > > But if I redeploy my webapp afterwards, would I loose those images?
>> > > > If yes, is there any workaround?
>> > > >
>> > > > Thanks :)
>> > > >
>> > > > --
>> > > > -danoh-
>> > > >
>> > >
>> > > -
>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > For additional commands, e-mail: users-h...@wicket.apache.org
>> > >
>> > >
>> >
>> >
>> > --
>> > -danoh-
>> >
>>
>
>
>
> --
> -danoh-
>


Re: Question regarding file uploading

2009-09-04 Thread Daniel Dominik Holúbek
yes,but what i can't imagine is how to retrieve those objects from db.
what to use? Resource? ResourceReference?

On Fri, Sep 4, 2009 at 4:15 PM, Edward Zarecor wrote:

> Google your database of choice and blob (binary large objects), e.g.,
> postgres blob; oracle blob, etc.
>
> Ed.
>
>
> On Fri, Sep 4, 2009 at 10:11 AM, Daniel Dominik Holúbek <
> dankodo...@gmail.com> wrote:
>
> > thanks,and can you give me a hint on storing images in database?
> > i can't quite imagine that :)
> >
> > On Fri, Sep 4, 2009 at 9:34 AM, Igor Vaynberg  > >wrote:
> >
> > > store the uploaded images in a permanent store such as a database or a
> > > dir on the server.
> > >
> > > -igor
> > >
> > > On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
> > > Holúbek wrote:
> > > > Hello,i've got just one question.
> > > > I would like to make a photo gallery, and thus I need to let users
> > upload
> > > > their images.
> > > > But if I redeploy my webapp afterwards, would I loose those images?
> > > > If yes, is there any workaround?
> > > >
> > > > Thanks :)
> > > >
> > > > --
> > > > -danoh-
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > -danoh-
> >
>



-- 
-danoh-


Re: Question regarding file uploading

2009-09-04 Thread Edward Zarecor
Google your database of choice and blob (binary large objects), e.g.,
postgres blob; oracle blob, etc.

Ed.


On Fri, Sep 4, 2009 at 10:11 AM, Daniel Dominik Holúbek <
dankodo...@gmail.com> wrote:

> thanks,and can you give me a hint on storing images in database?
> i can't quite imagine that :)
>
> On Fri, Sep 4, 2009 at 9:34 AM, Igor Vaynberg  >wrote:
>
> > store the uploaded images in a permanent store such as a database or a
> > dir on the server.
> >
> > -igor
> >
> > On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
> > Holúbek wrote:
> > > Hello,i've got just one question.
> > > I would like to make a photo gallery, and thus I need to let users
> upload
> > > their images.
> > > But if I redeploy my webapp afterwards, would I loose those images?
> > > If yes, is there any workaround?
> > >
> > > Thanks :)
> > >
> > > --
> > > -danoh-
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> -danoh-
>


Re: Question regarding file uploading

2009-09-04 Thread Daniel Dominik Holúbek
thanks,and can you give me a hint on storing images in database?
i can't quite imagine that :)

On Fri, Sep 4, 2009 at 9:34 AM, Igor Vaynberg wrote:

> store the uploaded images in a permanent store such as a database or a
> dir on the server.
>
> -igor
>
> On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
> Holúbek wrote:
> > Hello,i've got just one question.
> > I would like to make a photo gallery, and thus I need to let users upload
> > their images.
> > But if I redeploy my webapp afterwards, would I loose those images?
> > If yes, is there any workaround?
> >
> > Thanks :)
> >
> > --
> > -danoh-
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
-danoh-


Re: SV: ajax - navigate to new location

2009-09-04 Thread Leo . Erlandsson
This seems to work fine:

new AjaxLink("ajaxlink") {

public void onClick(AjaxRequestTarget target) {
getRequestCycle().setRequestTarget(new 
RedirectRequestTarget("http://www.google.com";));
}
});






Wilhelmsen Tor Iver  
2009-09-04 15:47
Sänd svar till
users@wicket.apache.org


Till
"users@wicket.apache.org" 
Kopia

Ärende
SV: ajax - navigate to new location






> target.prependJavascript("window.location.href=google.com");
> 
> Is there a better way of doing this?

Doubtful; Ajax is primarily concerned with NOT replacing the whole page. 
If you always replace the page use a "normal" link instead which lets you 
set a RedirectRequestTarget for instance.

- Tor Iver

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




SV: ajax - navigate to new location

2009-09-04 Thread Wilhelmsen Tor Iver
> target.prependJavascript("window.location.href=google.com");
> 
> Is there a better way of doing this?

Doubtful; Ajax is primarily concerned with NOT replacing the whole page. If you 
always replace the page use a "normal" link instead which lets you set a 
RedirectRequestTarget for instance.

- Tor Iver

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: radio and radiogroup default "checked" not working?

2009-09-04 Thread Seven Corners

I have a similar issue, but I don't know which radio should be checked until
runtime.  So I can't hard-code it in the HTML; I have to determine it from
my DAO in the radiogroup's parent panel constructor.  I'm using the model to
determine which radio to select, and it works fine once you click, but my
problem is that nothing is selected when the page first loads.  Here is the
code:

// This sets up the radiobuttons
private enum eContentTypeControl { TEXTFIELD, DROPDOWN };
private class ContentTypeControlBean implements Serializable
{
private static final long serialVersionUID = 1L;
private eContentTypeControl m_control = null;

public ContentTypeControlBean( eContentTypeControl control )
{
m_control = control;
}

public eContentTypeControl getControl()
{
return m_control;
}

public void setControl( eContentTypeControl control )
{
m_control = control;
}
}

// Figure out which radiobutton should be selected
List mimeTypeList = model.getCommonMimeTypes();
eContentTypeControl contentTypeControl = null;
if ( mimeTypeList.contains(
model.getCachedDefaults().getContentType() ) )
{
contentTypeControl = eContentTypeControl.DROPDOWN;
}
else
{
contentTypeControl = eContentTypeControl.TEXTFIELD;
}

// Create the radiogroup with the right 
m_ContentTypeRadioGroupBean = new ContentTypeControlBean(
contentTypeControl );
RadioGroup contentTypeRadioGroup = 
new RadioGroup( 
"contentTypeRadioGroup", 
new PropertyModel(
m_ContentTypeRadioGroupBean, "control" ) );
...
m_rbUseTextFieldContentType = 
new Radio( 
"textfieldContentType", 
new Model( new
ContentTypeControlBean( eContentTypeControl.TEXTFIELD ) ),
contentTypeRadioGroup );
contentTypeRadioGroup.add( m_rbUseTextFieldContentType );

m_rbUseDropDownContentType = 
new Radio( 
"dropdownContentType", 
new Model( new
ContentTypeControlBean( eContentTypeControl.DROPDOWN ) ),
contentTypeRadioGroup );
contentTypeRadioGroup.add( m_rbUseDropDownContentType );

and here is the HTML:

 

 

The dropdown radio is checked when the page loads if I have "checked =
'true'" in the HTML but since I don't know whether it should be checked at
compile time, I can't do that.  I tried using an AttributeModifier in the
parent panel's constructor but it has no effect:

if ( contentTypeControl == eContentTypeControl.TEXTFIELD )
{
m_rbUseTextFieldContentType.add( new AttributeModifier(
"checked", new Model( "true" ) ) );
m_rbUseDropDownContentType.add( new AttributeModifier(
"checked", new Model( "false" ) ) );
}
else
{
m_rbUseTextFieldContentType.add( new AttributeModifier(
"checked", new Model( "false" ) ) );
m_rbUseDropDownContentType.add( new AttributeModifier(
"checked", new Model( "true" ) ) );
}

Any ideas?

-- 
View this message in context: 
http://www.nabble.com/radio-and-radiogroup-default-%22checked%22-not-working--tp22248204p25294447.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Flash/ExternalInterface does not work in IE if movie is fetched via Wicket/Ajax

2009-09-04 Thread Mikko Pukki
Hi,

This example demonstrates that ExternalInterface fails with IE only if movie is 
fetched via Wicket/Ajax.

ajaxtest.zip:
(http://download.syncrontech.com/public/ajaxtest.zip)

Page "first.html" fetches "second.html" page via Ajax. Second.html has Flash 
movie
that calls JavaScript methods with ExternalInterface and produces output
"Start..."
"ExternalInterface.available:true"
"ExternalInterface.objectID:testId"
"fromJs:text from js (first.html)"

This works both FF 3.5 and IE 7/IE8


quickstart_noname.zip:
(http://download.syncrontech.com/public/quickstart_noname.zip)

Same demonstration with wicket. This fails with IE

"Start..."
"ExternalInterface.available:true"
"ExternalInterface.objectID:null"
"fromJs:null"

ObjectId is null and JavaScript call does not return any value.

We are aware about EI/IE problems in past, but any of those does not seem to 
fit here.

Wicket 1.4.1, Flash Player 10, IE 7/8, FF 3.5

Has anyone encountered any similar behavior and/or has found any workaround?
Should I create a Jira issue?


--
Mikko Pukki
Syncron Tech Oy
Laserkatu 6
53850 Lappeenranta
+358 400 757 178


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Changing position of WicketAjaxDebug panel

2009-09-04 Thread Tomek Sniadach
Of course! Thanks a lot John.
Tomek

2009/9/3 John Krasnay 

> !important is your friend...
>
> a#wicketDebugLink {
>  background-color:#44 !important;
>  border:medium none !important;
>  bottom:0 !important;
>  color:white !important;
>  opacity:0.8 !important;
>  right:0 !important;
>  text-decoration:none;
>  text-transform:lowercase !important;
> }
>
> jk
>
> On Thu, Sep 03, 2009 at 04:47:36PM +0200, Tomek Sniadach wrote:
> > Hi,
> > is there a possibility to change the position of opener panel? It is
> fixed
> > on the right side with embedded style attributes, so i cannot override it
> > with my own css. Unfortunately this is the place, where I have my submit
> > button. My workaround is firebug, but it's annoying. Have someone an
> idea?
> >
> > Regards
> > Tomek
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: DropDownChoice and hibernate entities

2009-09-04 Thread Martin Makundi
Hi!

I have good experience from decouping hibernate and wicket. With this
I mean that what ever happens in wicket, should not logically affect
persitence.

This means that when I select something from a ddc, it is the primary
key that counts. If I need the actual object then I have a locking
mechanism in Hibernate to handle the different race conditions that
might occur.

And ofcourse, when I set  a foreign key I never automatically update
the foreign row. This reduces the amount of race situations.

**
Martin

2009/9/4 Iain Reddick :
> I'm having difficulty in seeing the best-practice way of handling DDCs who's
> choices are hibernate persisted entities.
>
> Obviously the selection in this case would be a reference to a persisted
> entity, which is inherently bad, as this would put the entity into the
> session and also result in a "stale" entity reference on the next request
> (assuming you are using OSIV filter).
>
> I'm aware that on form submit, the HTML selection results in a "fresh"
> object being pulled from the DDC choice list and set as the selection. As
> long as the choices are loaded dynamically, this works (although the
> selected entity will end up in the session).
>
> However, I am using a wizard in the app that I am working on and want to
> pre-select a choice from a list of persisted entities. This DDC is used in
> step 3, which gives a hibernate "no session" exception when when the step is
> reached. This is understandable, as wicket's rendering needs will cause an
> attempted initialization of the proxy, which is attached to an old session.
>
> The obvious solution is for the selection to be the entity's id.
>
> What is the best way of handling this situation?
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DropDownChoice and hibernate entities

2009-09-04 Thread Iain Reddick
I'm having difficulty in seeing the best-practice way of handling DDCs 
who's choices are hibernate persisted entities.


Obviously the selection in this case would be a reference to a persisted 
entity, which is inherently bad, as this would put the entity into the 
session and also result in a "stale" entity reference on the next 
request (assuming you are using OSIV filter).


I'm aware that on form submit, the HTML selection results in a "fresh" 
object being pulled from the DDC choice list and set as the selection. 
As long as the choices are loaded dynamically, this works (although the 
selected entity will end up in the session).


However, I am using a wizard in the app that I am working on and want to 
pre-select a choice from a list of persisted entities. This DDC is used 
in step 3, which gives a hibernate "no session" exception when when the 
step is reached. This is understandable, as wicket's rendering needs 
will cause an attempted initialization of the proxy, which is attached 
to an old session.


The obvious solution is for the selection to be the entity's id.

What is the best way of handling this situation?



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Form FileUploadField maxSize does not work

2009-09-04 Thread Nicola Tucci
I'm working with a file upload, using
http://www.wicket-library.com/wicket-examples/upload/single as example.

I've created an UploadPanel very similar to UploadPage.java of the example
(with the FileUploadForm form).
Well I've maxsize set to 100K and this check work if I add my uploadpanel to
the WebPage.

But If I add the upload panel to a form, the check does not work anymore.
The difference is that without outer form, the submit button of the upload
panel belong to FileUploadForm (with maxSize set).
With the outer form, the resulting submitting form correspond to the outer
form. I don't understand this as I'm still clicking the same submit button
of FileUploadForm. In this way, the maxsize is the one set in the outer form
(which I don't want to set! I want to have my UploadPanel component with
maxsize passed as parameter).


Re: Dynamic Optgroups in Wicket

2009-09-04 Thread gary black
Thanks Mike and everyone who responded.

I did manage to find a working solution by creating a OptGroup component by 
extending WebMarkupContainer and using fragments...
But was then was disheartened as it appears that you cannot nest optgroups 
inside one another in html - To represent the multiple levels within my list 
hierarchy.
If there is such a way to nest optgroups within one another, then I would very 
much appreciate the info but I suspect you can't from what I've read.
My final solution was just to use a select component and replace the labels 
using hyphens before the text to represent the current level:
Item1---Item1-1---Item1-2---Item1-3Item2---Item2-1---Item2-2--Item2-2-1--Item2-2-2---Item2-3Item3
Thanks
Gary
--- On Tue, 9/1/09, Michael O'Cleirigh  wrote:

From: Michael O'Cleirigh 
Subject: Re: Dynamic Optgroups in Wicket
To: users@wicket.apache.org
Date: Tuesday, September 1, 2009, 12:03 PM

Hi Gary,

> Hi,I am kind of new to Wicket and am having a difficult time finding some 
> decent info on creating optgroups within selects.I basically have a 
> structured list in my DB which in turn has children - perfect solution would 
> be to use dynamically generated optgroups with their children which will of 
> course be option tags.All the examples containing optgroups seem to have the 
> optgroups fixed in markup with no wicket:ids.Any thoughts would be most 
> welcomed.Gary
>   

I created a custom implementation of SelectOptions and SelectOption (in 
wicket-extensions) that I use to render the optgroups.  What I do is use a 
wrapping object that contains the business object and the name of the optgroup 
and if it is the first or last wrapping object with that particular optgroup 
name.

Then I override the SelectOptions.newOption(...) to wire in my custom 
CustomSelectOption.  Note that newOption() is called in order for each option 
in the list so tracking the last optiongroup name can be used to determine if 
its changed or not. i.e. if the Custom.SlectOption.startOptionGroup or the 
CustomSelectOption.endOptionGroup parameter should be true or false.

This is the only change in the selectOption:

 �...@override
   protected void onRender(MarkupStream markupStream) {

       /*
        * Write out the option group wrappings if this is the first or last 
option in a particular group.
        */
       if (startOptionGroup) {
           getResponse().write("" + 
optionGroupName + "\n");
       }
       super.onRender(markupStream);
             if (endOptionGroup) {
           getResponse().write("\n");
       }
   }

The setting of the start and end flags are handled in 
SelectOptions.newOption(...) and then the above code is used to render the 
options into optiongroups.

Let me know if you need more details,

Regards,

Mike


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




  

Re: Question regarding file uploading

2009-09-04 Thread Igor Vaynberg
store the uploaded images in a permanent store such as a database or a
dir on the server.

-igor

On Fri, Sep 4, 2009 at 12:25 AM, Daniel Dominik
Holúbek wrote:
> Hello,i've got just one question.
> I would like to make a photo gallery, and thus I need to let users upload
> their images.
> But if I redeploy my webapp afterwards, would I loose those images?
> If yes, is there any workaround?
>
> Thanks :)
>
> --
> -danoh-
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to render part of component's markup and the very end of HTML document?

2009-09-04 Thread Peter Thomas
Hi,

I'm guessing that the markup you are trying to render just before the body
tag is a 

Question regarding file uploading

2009-09-04 Thread Daniel Dominik Holúbek
Hello,i've got just one question.
I would like to make a photo gallery, and thus I need to let users upload
their images.
But if I redeploy my webapp afterwards, would I loose those images?
If yes, is there any workaround?

Thanks :)

-- 
-danoh-