Re: Datatable with drop down choice
You put the drop down choice in a panel and override populateItem to add that panel. On Fri, Nov 11, 2016 at 2:03 PM, ganea iulia <superbiss...@gmail.com> wrote: > Hello, > > Could you please advise what would be the best option to have in my > DataTable, a column, where the cells contain a drop down choice? > > > Thank you > -- Regards - Ernesto Reinaldo Barreiro
Datatable with drop down choice
Hello, Could you please advise what would be the best option to have in my DataTable, a column, where the cells contain a drop down choice? Thank you
Re: Drop Down Choice default value
Hi, when using a drop down as follows, always the whole page is reloaded on drop down change. How is it possible to update only a specific component via ajax? Thanks, Chris DropDownChoice tag = new DropDownChoiceString(tags, new PropertyModelString(this, selectedCategory), displayCategories) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(String newSelection) { super.onSelectionChanged(newSelection); selectedCategory = newSelection; } @Override protected String getNullValidDisplayValue() { return All; } }; tag.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.add(...); } }); Am 12.05.2015 um 23:49 schrieb Chris chris...@gmx.at: Marcel, Sven, thanks a lot for your answers! Chris Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto marcel.po...@gmail.com: Another way is to provide a value on your .properties file. For instance: nullValid=Please choose myFieldId.nullValid=Please choose a value for ${label} On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote: Hi, you have to override #getNullValidDisplayValue(), #getNullKeyDisplayValue() is for cases where null is *not* valid. Regards Sven On 12.05.2015 12:44, Chris wrote: Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Marcel Barbosa Pinto 55 11 98255 8288 - 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: Drop Down Choice default value
Hi, see http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/AjaxEventBehavior.html use change event. kind regards Tobias Am 18.05.2015 um 00:03 schrieb Chris chris...@gmx.at: Hi, when using a drop down as follows, always the whole page is reloaded on drop down change. How is it possible to update only a specific component via ajax? Thanks, Chris DropDownChoice tag = new DropDownChoiceString(tags, new PropertyModelString(this, selectedCategory), displayCategories) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(String newSelection) { super.onSelectionChanged(newSelection); selectedCategory = newSelection; } @Override protected String getNullValidDisplayValue() { return All; } }; tag.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.add(...); } }); Am 12.05.2015 um 23:49 schrieb Chris chris...@gmx.at: Marcel, Sven, thanks a lot for your answers! Chris Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto marcel.po...@gmail.com: Another way is to provide a value on your .properties file. For instance: nullValid=Please choose myFieldId.nullValid=Please choose a value for ${label} On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote: Hi, you have to override #getNullValidDisplayValue(), #getNullKeyDisplayValue() is for cases where null is *not* valid. Regards Sven On 12.05.2015 12:44, Chris wrote: Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Marcel Barbosa Pinto 55 11 98255 8288 - 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: Drop Down Choice default value
Hi, On Mon, May 18, 2015 at 12:03 AM, Chris chris...@gmx.at wrote: Hi, when using a drop down as follows, always the whole page is reloaded on drop down change. How is it possible to update only a specific component via ajax? Thanks, Chris DropDownChoice tag = new DropDownChoiceString(tags, new PropertyModelString(this, selectedCategory), displayCategories) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } This is what is triggering page reload... Do not override it and everything should work. Use the source Luke /** * Whether this component's onSelectionChanged event handler should be called using javascript * ttwindow.location/tt if the selection changes. If true, a roundtrip will be generated * with each selection change, resulting in the model being updated (of just this component) and * onSelectionChanged being called. This method returns false by default. If you wish to use * Ajax instead, let {@link #wantOnSelectionChangedNotifications()} return false and add an * {@link AjaxFormComponentUpdatingBehavior} to the component using the ttonchange/tt event. * * @return True if this component's onSelectionChanged event handler should called using * javascript if the selection changes */ protected boolean wantOnSelectionChangedNotifications() { return false; } @Override protected void onSelectionChanged(String newSelection) { super.onSelectionChanged(newSelection); selectedCategory = newSelection; } @Override protected String getNullValidDisplayValue() { return All; } }; tag.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.add(...); } }); Am 12.05.2015 um 23:49 schrieb Chris chris...@gmx.at: Marcel, Sven, thanks a lot for your answers! Chris Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto marcel.po...@gmail.com: Another way is to provide a value on your .properties file. For instance: nullValid=Please choose myFieldId.nullValid=Please choose a value for ${label} On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote: Hi, you have to override #getNullValidDisplayValue(), #getNullKeyDisplayValue() is for cases where null is *not* valid. Regards Sven On 12.05.2015 12:44, Chris wrote: Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Marcel Barbosa Pinto 55 11 98255 8288 - 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 -- Regards - Ernesto Reinaldo Barreiro
Re: Drop Down Choice default value
Marcel, Sven, thanks a lot for your answers! Chris Am 12.05.2015 um 15:24 schrieb Marcel Barbosa Pinto marcel.po...@gmail.com: Another way is to provide a value on your .properties file. For instance: nullValid=Please choose myFieldId.nullValid=Please choose a value for ${label} On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote: Hi, you have to override #getNullValidDisplayValue(), #getNullKeyDisplayValue() is for cases where null is *not* valid. Regards Sven On 12.05.2015 12:44, Chris wrote: Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Marcel Barbosa Pinto 55 11 98255 8288 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Drop Down Choice default value
Hi, you have to override #getNullValidDisplayValue(), #getNullKeyDisplayValue() is for cases where null is *not* valid. Regards Sven On 12.05.2015 12:44, Chris wrote: Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Drop Down Choice default value
Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris
Re: Drop Down Choice default value
Another way is to provide a value on your .properties file. For instance: nullValid=Please choose myFieldId.nullValid=Please choose a value for ${label} On Tue, May 12, 2015 at 8:26 AM, Sven Meier s...@meiers.net wrote: Hi, you have to override #getNullValidDisplayValue(), #getNullKeyDisplayValue() is for cases where null is *not* valid. Regards Sven On 12.05.2015 12:44, Chris wrote: Hi all, I have a Drop down choice field and would like to override the default select value. I have made following settings but the default value is empty. Is there sth missing? setNullValid(true); @Override protected String getNullKeyDisplayValue() { return Please choose; } Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Marcel Barbosa Pinto 55 11 98255 8288
Re: Drop Down Choice
Hi.. If you want only the selected value, you could create a hidden field to mirror the dropdown's value. Em 10/05/2015 14:48, Sebastien seb...@gmail.com escreveu: Hi Chris, AFAIK no. I don't know if such request feature has already been discussed... Otherwise, I think this could be integrated in wicket-kendo-ui http://demos.telerik.com/kendo-ui/dropdownlist/index If you are interested with, please open a ticket here: https://github.com/sebfz1/wicket-jquery-ui/issues Thanks best regards, Sebastien. On Sun, May 10, 2015 at 7:10 PM, Chris chris...@gmx.at wrote: Hi all, is it possible to have a drop-down box without a list of choices (the list is directly coded in html as select and only the selected value should be read)? Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Drop Down Choice
Hi Chris, AFAIK no. I don't know if such request feature has already been discussed... Otherwise, I think this could be integrated in wicket-kendo-ui http://demos.telerik.com/kendo-ui/dropdownlist/index If you are interested with, please open a ticket here: https://github.com/sebfz1/wicket-jquery-ui/issues Thanks best regards, Sebastien. On Sun, May 10, 2015 at 7:10 PM, Chris chris...@gmx.at wrote: Hi all, is it possible to have a drop-down box without a list of choices (the list is directly coded in html as select and only the selected value should be read)? Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Drop Down Choice
Hi all, is it possible to have a drop-down box without a list of choices (the list is directly coded in html as select and only the selected value should be read)? Thanks, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket form with AJAX drop down choice and AJAX button not process POST data
Hi, If you are able to reproduce the problem in a quickstart application then please attach it to a ticket in Jira. But I guess the problem is related to the custom prefix you use (# getInputNamePrefix()). In FormComponent#getInputAsArray() check what is the inputName and compare it against the ones shown by Firebug. On Thu, Jan 3, 2013 at 1:56 AM, Behrooz Nobakht nob...@gmail.com wrote: Hello, I'm trying to have a simple widget in Apache Wicket 6.4.0 using Form http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/Form.html , DropDownChoice http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/DropDownChoice.html ,AjaxButton http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/markup/html/form/AjaxButton.html along with AjaxFormComponentUpdatingBehavior http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html . The model (an inner class) that is used is as follows: private class SampleModel implements IClusterable { private static final long serialVersionUID = 1L; private String value; public void setValue(String value) { this.value = value; } public String getValue() { return value; } @Override public int hashCode() { return value.hashCode(); } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof SampleModel == false) { return false; } return hashCode() == obj.hashCode(); } } The form is another class as: private class TheForm extends FormSampleModel { private static final long serialVersionUID = 1L; // This form is to be used several times in a single large page private final String prefix = form_ + (counter++) + _; public TheForm(String id, SampleModel model) { super(id, new CompoundPropertyModel(model)); ListString choices = getChoices(); final DropDownChoiceString select = new DropDownChoiceString(value, choices); select.setOutputMarkupId(true); select.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }); AjaxButton action1 = new AjaxButton(action, Model.of(Ajax Action)) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }; action1.setOutputMarkupId(true); add(select); add(action1); } @Override protected String getInputNamePrefix() { return prefix; } } And putting it all together in a simple widget class: public class SampleFormDropDownWidget extends Panel { private static final long serialVersionUID = 1L; private static int counter = 1; private SampleModel model = new SampleModel(); public SampleFormDropDownWidget(String id) { super(id); model.setValue(C); TheForm form = new TheForm(form, model); add(form); } private ListString getChoices() { return Lists.newArrayList(A, B, C, D, E, F, G); }} And the markup HTML is: wicket:panel form class=form-horizontal wicket:id=form div class=control-group label class=control-labelChoices/label div class=controls select class=input-xlarge wicket:id=value/select /div /div div class=form-actions input class=btn wicket:id=action / /div /form/wicket:panel Using a client debugging tool such as FireBug, I can trace that the AJAX request actually carries POST data, e.g.: form_1_formb1_hf_0=form_1_value=5form_1_action=Ajax+Actionform_1_action=1 However, in both cases of onUpdate for the select component and onSubmit for the button, I getnull values. Additionally, I debugged the code until Wicket's FormComponent#getInputAsArray()and there actually I can see that RequestCycle.getRequest().getRequestParameters().getParameterValues(VALUE_SELECT)does not find any data on the request parameters. Is there a chance that this could be bug in Wicket to ignore AJAX request payload? Or, what am I
Re: Wicket form with AJAX drop down choice and AJAX button not process POST data
Hi, I've also tested without the prefix input name and it's still the same. Thanks, Behrooz On Thu, Jan 3, 2013 at 9:08 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, If you are able to reproduce the problem in a quickstart application then please attach it to a ticket in Jira. But I guess the problem is related to the custom prefix you use (# getInputNamePrefix()). In FormComponent#getInputAsArray() check what is the inputName and compare it against the ones shown by Firebug. On Thu, Jan 3, 2013 at 1:56 AM, Behrooz Nobakht nob...@gmail.com wrote: Hello, I'm trying to have a simple widget in Apache Wicket 6.4.0 using Form http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/Form.html , DropDownChoice http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/DropDownChoice.html ,AjaxButton http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/markup/html/form/AjaxButton.html along with AjaxFormComponentUpdatingBehavior http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html . The model (an inner class) that is used is as follows: private class SampleModel implements IClusterable { private static final long serialVersionUID = 1L; private String value; public void setValue(String value) { this.value = value; } public String getValue() { return value; } @Override public int hashCode() { return value.hashCode(); } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof SampleModel == false) { return false; } return hashCode() == obj.hashCode(); } } The form is another class as: private class TheForm extends FormSampleModel { private static final long serialVersionUID = 1L; // This form is to be used several times in a single large page private final String prefix = form_ + (counter++) + _; public TheForm(String id, SampleModel model) { super(id, new CompoundPropertyModel(model)); ListString choices = getChoices(); final DropDownChoiceString select = new DropDownChoiceString(value, choices); select.setOutputMarkupId(true); select.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }); AjaxButton action1 = new AjaxButton(action, Model.of(Ajax Action)) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }; action1.setOutputMarkupId(true); add(select); add(action1); } @Override protected String getInputNamePrefix() { return prefix; } } And putting it all together in a simple widget class: public class SampleFormDropDownWidget extends Panel { private static final long serialVersionUID = 1L; private static int counter = 1; private SampleModel model = new SampleModel(); public SampleFormDropDownWidget(String id) { super(id); model.setValue(C); TheForm form = new TheForm(form, model); add(form); } private ListString getChoices() { return Lists.newArrayList(A, B, C, D, E, F, G); }} And the markup HTML is: wicket:panel form class=form-horizontal wicket:id=form div class=control-group label class=control-labelChoices/label div class=controls select class=input-xlarge wicket:id=value/select /div /div div class=form-actions input class=btn wicket:id=action / /div /form/wicket:panel Using a client debugging tool such as FireBug, I can trace that the AJAX request actually carries POST data, e.g.: form_1_formb1_hf_0=form_1_value=5form_1_action=Ajax+Actionform_1_action=1 However, in both cases of onUpdate for the select component and onSubmit for the button, I getnull values.
Re: Wicket form with AJAX drop down choice and AJAX button not process POST data
Hi again, I tried the quick start application and tracked down the issue to this. When a selection is changed (using FireBug/Chrome), * in the quick start application, I see that of the request is Content-Type: application/x-www-form-urlencoded; charset=UTF-8 * in my application, I see that the content-type of the request is text/plain This is why in my application, the request POST data is actually ignored. I verified that all my HTML files start with !DOCTYPE html html xmlns:wicket=http://wicket.apache.org; So, can you please let me know how to fix this? Thanks, Behrooz On Thu, Jan 3, 2013 at 5:42 PM, Behrooz Nobakht nob...@gmail.com wrote: Hi, I've also tested without the prefix input name and it's still the same. Thanks, Behrooz On Thu, Jan 3, 2013 at 9:08 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, If you are able to reproduce the problem in a quickstart application then please attach it to a ticket in Jira. But I guess the problem is related to the custom prefix you use (# getInputNamePrefix()). In FormComponent#getInputAsArray() check what is the inputName and compare it against the ones shown by Firebug. On Thu, Jan 3, 2013 at 1:56 AM, Behrooz Nobakht nob...@gmail.com wrote: Hello, I'm trying to have a simple widget in Apache Wicket 6.4.0 using Form http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/Form.html , DropDownChoice http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/DropDownChoice.html ,AjaxButton http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/markup/html/form/AjaxButton.html along with AjaxFormComponentUpdatingBehavior http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html . The model (an inner class) that is used is as follows: private class SampleModel implements IClusterable { private static final long serialVersionUID = 1L; private String value; public void setValue(String value) { this.value = value; } public String getValue() { return value; } @Override public int hashCode() { return value.hashCode(); } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof SampleModel == false) { return false; } return hashCode() == obj.hashCode(); } } The form is another class as: private class TheForm extends FormSampleModel { private static final long serialVersionUID = 1L; // This form is to be used several times in a single large page private final String prefix = form_ + (counter++) + _; public TheForm(String id, SampleModel model) { super(id, new CompoundPropertyModel(model)); ListString choices = getChoices(); final DropDownChoiceString select = new DropDownChoiceString(value, choices); select.setOutputMarkupId(true); select.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }); AjaxButton action1 = new AjaxButton(action, Model.of(Ajax Action)) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }; action1.setOutputMarkupId(true); add(select); add(action1); } @Override protected String getInputNamePrefix() { return prefix; } } And putting it all together in a simple widget class: public class SampleFormDropDownWidget extends Panel { private static final long serialVersionUID = 1L; private static int counter = 1; private SampleModel model = new SampleModel(); public SampleFormDropDownWidget(String id) { super(id); model.setValue(C); TheForm form = new TheForm(form, model); add(form); } private ListString getChoices() { return Lists.newArrayList(A, B, C, D, E, F, G); }} And the markup HTML is: wicket:panel form class=form-horizontal wicket:id=form
Re: Wicket form with AJAX drop down choice and AJAX button not process POST data
Hi again, Just wanted to update that the issue is resolved. There was a custom script that sets the content type of AJAX on jQuery.$ to be text/plain and it had a side effect. Sorry for the inconvenience. Regards, Behrooz On Thu, Jan 3, 2013 at 9:01 PM, Behrooz Nobakht nob...@gmail.com wrote: Hi again, I tried the quick start application and tracked down the issue to this. When a selection is changed (using FireBug/Chrome), * in the quick start application, I see that of the request is Content-Type: application/x-www-form-urlencoded; charset=UTF-8 * in my application, I see that the content-type of the request is text/plain This is why in my application, the request POST data is actually ignored. I verified that all my HTML files start with !DOCTYPE html html xmlns:wicket=http://wicket.apache.org; So, can you please let me know how to fix this? Thanks, Behrooz On Thu, Jan 3, 2013 at 5:42 PM, Behrooz Nobakht nob...@gmail.com wrote: Hi, I've also tested without the prefix input name and it's still the same. Thanks, Behrooz On Thu, Jan 3, 2013 at 9:08 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, If you are able to reproduce the problem in a quickstart application then please attach it to a ticket in Jira. But I guess the problem is related to the custom prefix you use (# getInputNamePrefix()). In FormComponent#getInputAsArray() check what is the inputName and compare it against the ones shown by Firebug. On Thu, Jan 3, 2013 at 1:56 AM, Behrooz Nobakht nob...@gmail.com wrote: Hello, I'm trying to have a simple widget in Apache Wicket 6.4.0 using Form http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/Form.html , DropDownChoice http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/html/form/DropDownChoice.html ,AjaxButton http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/markup/html/form/AjaxButton.html along with AjaxFormComponentUpdatingBehavior http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.html . The model (an inner class) that is used is as follows: private class SampleModel implements IClusterable { private static final long serialVersionUID = 1L; private String value; public void setValue(String value) { this.value = value; } public String getValue() { return value; } @Override public int hashCode() { return value.hashCode(); } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof SampleModel == false) { return false; } return hashCode() == obj.hashCode(); } } The form is another class as: private class TheForm extends FormSampleModel { private static final long serialVersionUID = 1L; // This form is to be used several times in a single large page private final String prefix = form_ + (counter++) + _; public TheForm(String id, SampleModel model) { super(id, new CompoundPropertyModel(model)); ListString choices = getChoices(); final DropDownChoiceString select = new DropDownChoiceString(value, choices); select.setOutputMarkupId(true); select.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }); AjaxButton action1 = new AjaxButton(action, Model.of(Ajax Action)) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { String m1 = select.getModelObject(); String m2 = TheForm.this.getModelObject().getValue(); System.out.println(m1 + = + m2); } }; action1.setOutputMarkupId(true); add(select); add(action1); } @Override protected String getInputNamePrefix() { return prefix; } } And putting it all together in a simple widget class: public class SampleFormDropDownWidget extends Panel { private static final long serialVersionUID = 1L; private static int counter = 1; private SampleModel model = new SampleModel(); public SampleFormDropDownWidget(String id) {
Forcing a No Selection Option in Drop Down Choice
Is there a way to make DropDownChoice offer no selection as the first option, even if the input model matches one of the selections? Perhaps a property to set, or method to override? Can't find this issue covered in the material I've looked at. I'm looking for some technique I can apply against the drop down class (or an extension to it) rather than adding dummy data to the model. Has someone already invented this wheel? ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
Re: Forcing a No Selection Option in Drop Down Choice
setNullValid(true) -igor On Thu, Dec 15, 2011 at 7:42 AM, Richard W. Adams rwada...@up.com wrote: Is there a way to make DropDownChoice offer no selection as the first option, even if the input model matches one of the selections? Perhaps a property to set, or method to override? Can't find this issue covered in the material I've looked at. I'm looking for some technique I can apply against the drop down class (or an extension to it) rather than adding dummy data to the model. Has someone already invented this wheel? ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Drop Down Choice
typing T would select Two, but typing Th would select Three. Is this possible in Wicket? This is the way well-behaved modern browsers already work :) - Tor I. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Drop Down Choice
Hi, I've been looking for a Wicket drop down widget where one can choose an item from the list by typing more than the first character. For example, if my list contains the following values: One Two Three Four Five typing T would select Two, but typing Th would select Three. Is this possible in Wicket? Thanks! Shelli - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Drop Down Choice
theres this one (though not dropdown) http://www.wicket-library.com/wicket-examples/ajax/autocompletehttp://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414790D6B5E7ACECC809CB9E9C9CEB?0 Or this one if you want a drop down: http://wicket.visural.net/examples/app/dropdown -Nino http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414790D6B5E7ACECC809CB9E9C9CEB?0 2011/3/18 Shelli Orton shelli.or...@sjrb.ca Hi, I've been looking for a Wicket drop down widget where one can choose an item from the list by typing more than the first character. For example, if my list contains the following values: One Two Three Four Five typing T would select Two, but typing Th would select Three. Is this possible in Wicket? Thanks! Shelli - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Drop Down Choice
Hi! 1. Invisible mode is always possible. 2. Maybe autocompletetextfield will be ok? 3. You can integrate pretty easily a jquery skin. ** Martin 2011/3/18 Shelli Orton shelli.or...@sjrb.ca: Hi, I've been looking for a Wicket drop down widget where one can choose an item from the list by typing more than the first character. For example, if my list contains the following values: One Two Three Four Five typing T would select Two, but typing Th would select Three. Is this possible in Wicket? Thanks! Shelli - 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: Drop Down Choice
Hi, The wicket.visural.net first example looks like exactly what I need. Thanks! Shelli -Original Message- From: nino martinez wael [mailto:nino.martinez.w...@gmail.com] Sent: 18 March 2011 11:05 AM To: users@wicket.apache.org Subject: Re: Drop Down Choice theres this one (though not dropdown) http://www.wicket-library.com/wicket-examples/ajax/autocompletehttp://w ww.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414 790D6B5E7ACECC809CB9E9C9CEB?0 Or this one if you want a drop down: http://wicket.visural.net/examples/app/dropdown -Nino http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessio nid=FE414790D6B5E7ACECC809CB9E9C9CEB?0 2011/3/18 Shelli Orton shelli.or...@sjrb.ca Hi, I've been looking for a Wicket drop down widget where one can choose an item from the list by typing more than the first character. For example, if my list contains the following values: One Two Three Four Five typing T would select Two, but typing Th would select Three. Is this possible in Wicket? Thanks! Shelli - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to set the value of a Drop Down Choice
Hi There are mistake in your code: programList.setDefaultModelObject(stringObjectModel); ...may be you want to call programList.setDefaultModel(stringObjectModel); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-set-the-value-of-a-Drop-Down-Choice-tp2303973p2304514.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
How to set the value of a Drop Down Choice
Hello, I was wondering how to set the currently selected value for a DropDownList? Currently I have a .properties file which sets the value when I have a null selection, however, I was wondering how do I change the currently selected value to a different one (e.g. if I am pulling a previous selection from a database?) Thank you, -- Eric Reagan
Re: How to set the value of a Drop Down Choice
Have you tried if setDefaultModelObject() works for you? ** Martin 2010/7/27 Eric Reagan reaga...@gmail.com: Hello, I was wondering how to set the currently selected value for a DropDownList? Currently I have a .properties file which sets the value when I have a null selection, however, I was wondering how do I change the currently selected value to a different one (e.g. if I am pulling a previous selection from a database?) Thank you, -- Eric Reagan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to set the value of a Drop Down Choice
Martin, I have the following. All I am getting is a null value. Am I setting the model object wrong? IModelString stringObjectModel = new LoadableDetachableModel String() { /** * */ private static final long serialVersionUID = 2165619560012612599L; private String text; @Override protected String load() { return text; } }; stringObjectModel.setObject(abc); DropDownChoiceString programList = new DropDownChoiceString(users,stringObjectModel, users.getAll(), new IChoiceRendererObject() { /** * Generated */ private static final long serialVersionUID = -7278851941695545331L; @Override public Object getDisplayValue(Object object) { return object.toString(); } @Override public String getIdValue(Object object, int index) { object.toString() } } ); programList.setDefaultModelObject(stringObjectModel); On Tue, Jul 27, 2010 at 2:33 PM, Eric Reagan reaga...@gmail.com wrote: Martin, I have the following. All I am getting is a null value. Am I setting the model object wrong? IModelString stringObjectModel = new LoadableDetachableModelString() { /** * */ private static final long serialVersionUID = 2165619560012612599L; private String text; @Override protected String load() { return text; } }; stringObjectModel.setObject(abc); DropDownChoiceString programList = new DropDownChoiceString(users,stringObjectModel, users.getAll(), new IChoiceRendererObject() { /** * Generated */ private static final long serialVersionUID = -7278851941695545331L; @Override public Object getDisplayValue(Object object) { return object.toString(); } @Override public String getIdValue(Object object, int index) { object.toString() } } ); programList.setDefaultModelObject(stringObjectModel); On Tue, Jul 27, 2010 at 2:05 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Have you tried if setDefaultModelObject() works for you? ** Martin 2010/7/27 Eric Reagan reaga...@gmail.com: Hello, I was wondering how to set the currently selected value for a DropDownList? Currently I have a .properties file which sets the value when I have a null selection, however, I was wondering how do I change the currently selected value to a different one (e.g. if I am pulling a previous selection from a database?) Thank you, -- Eric Reagan -- Eric Reagan -- Eric Reagan
Re: How to set the value of a Drop Down Choice
Martin, Thanks for the advice. I had a mental fart and left out the setter function. Once you add the setter...works like a charm. Thanks again. Thank you, On Tue, Jul 27, 2010 at 2:34 PM, Eric Reagan reaga...@gmail.com wrote: Martin, I have the following. All I am getting is a null value. Am I setting the model object wrong? IModelString stringObjectModel = new LoadableDetachableModel String() { /** * */ private static final long serialVersionUID = 2165619560012612599L; private String text; @Override protected String load() { return text; } }; stringObjectModel.setObject(abc); DropDownChoiceString programList = new DropDownChoiceString(users,stringObjectModel, users.getAll(), new IChoiceRendererObject() { /** * Generated */ private static final long serialVersionUID = -7278851941695545331L; @Override public Object getDisplayValue(Object object) { return object.toString(); } @Override public String getIdValue(Object object, int index) { object.toString() } } ); programList.setDefaultModelObject(stringObjectModel); On Tue, Jul 27, 2010 at 2:33 PM, Eric Reagan reaga...@gmail.com wrote: Martin, I have the following. All I am getting is a null value. Am I setting the model object wrong? IModelString stringObjectModel = new LoadableDetachableModelString() { /** * */ private static final long serialVersionUID = 2165619560012612599L; private String text; @Override protected String load() { return text; } }; stringObjectModel.setObject(abc); DropDownChoiceString programList = new DropDownChoiceString(users,stringObjectModel, users.getAll(), new IChoiceRendererObject() { /** * Generated */ private static final long serialVersionUID = -7278851941695545331L; @Override public Object getDisplayValue(Object object) { return object.toString(); } @Override public String getIdValue(Object object, int index) { object.toString() } } ); programList.setDefaultModelObject(stringObjectModel); On Tue, Jul 27, 2010 at 2:05 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Have you tried if setDefaultModelObject() works for you? ** Martin 2010/7/27 Eric Reagan reaga...@gmail.com: Hello, I was wondering how to set the currently selected value for a DropDownList? Currently I have a .properties file which sets the value when I have a null selection, however, I was wondering how do I change the currently selected value to a different one (e.g. if I am pulling a previous selection from a database?) Thank you, -- Eric Reagan -- Eric Reagan -- Eric Reagan -- Eric Reagan
Re: How to set the value of a Drop Down Choice
Why not set up a property on your page/component for the selected text and use a PropertyModelString? On Tue, Jul 27, 2010 at 3:34 PM, Eric Reagan reaga...@gmail.com wrote: Martin, I have the following. All I am getting is a null value. Am I setting the model object wrong? IModelString stringObjectModel = new LoadableDetachableModel String() { /** * */ private static final long serialVersionUID = 2165619560012612599L; private String text; �...@override protected String load() { return text; } }; stringObjectModel.setObject(abc); DropDownChoiceString programList = new DropDownChoiceString(users,stringObjectModel, users.getAll(), new IChoiceRendererObject() { /** * Generated */ private static final long serialVersionUID = -7278851941695545331L; �...@override public Object getDisplayValue(Object object) { return object.toString(); } �...@override public String getIdValue(Object object, int index) { object.toString() } } ); programList.setDefaultModelObject(stringObjectModel); On Tue, Jul 27, 2010 at 2:33 PM, Eric Reagan reaga...@gmail.com wrote: Martin, I have the following. All I am getting is a null value. Am I setting the model object wrong? IModelString stringObjectModel = new LoadableDetachableModelString() { /** * */ private static final long serialVersionUID = 2165619560012612599L; private String text; @Override protected String load() { return text; } }; stringObjectModel.setObject(abc); DropDownChoiceString programList = new DropDownChoiceString(users,stringObjectModel, users.getAll(), new IChoiceRendererObject() { /** * Generated */ private static final long serialVersionUID = -7278851941695545331L; @Override public Object getDisplayValue(Object object) { return object.toString(); } @Override public String getIdValue(Object object, int index) { object.toString() } } ); programList.setDefaultModelObject(stringObjectModel); On Tue, Jul 27, 2010 at 2:05 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Have you tried if setDefaultModelObject() works for you? ** Martin 2010/7/27 Eric Reagan reaga...@gmail.com: Hello, I was wondering how to set the currently selected value for a DropDownList? Currently I have a .properties file which sets the value when I have a null selection, however, I was wondering how do I change the currently selected value to a different one (e.g. if I am pulling a previous selection from a database?) Thank you, -- Eric Reagan -- Eric Reagan -- Eric Reagan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: color code options in drop down choice
On Sat, Aug 9, 2008 at 10:46 PM, Martin Makundi [EMAIL PROTECTED] wrote: it will also break all existing implementations of the interface out there. Well, the effort will nicely blend in with the chores of refactoring to the changes in generics... :) Or should it be made an abstract class? this refactoring did not create any actual api breaks, just added generics Another possibility would be to just enable suitable hooks in the rendering phase of xxChoices. I.e., a method String getOptionAttributes(T t) or similar would be called during the render phase of a DropDownChoice. sure, submit an RFE -igor It would then be easier for anybody to 'sugarcoat' their DropDown and it would not break the existing inplementations. There I could just check if (renderer instanceof MyChoiceRenderer) { ... and sugarcoat my option ... } ** Martin On Sat, Aug 9, 2008 at 10:21 PM, Martin Makundi [EMAIL PROTECTED] wrote: It would be pretty easy to just add a getDispayStyle method into the IChoiceRenderer interface and refactor the various classes using it to support it accordingly. Don't you think? ** Martin 2008/8/10 Igor Vaynberg [EMAIL PROTECTED]: so write a component that works the way you want. as core devs we have to maintain a hard balance between simplicity and flexibility. the more pluggable/customizable you make something, the more complicated it becomes. we do not make core components ultra pluggable because they serve as a basis and examples for users who want to see how they work and want to implement something similar. what we do concentrate on a lot is making writing your own components easy. if you look at the dropdownchoice class hiearchy you might find a base class that is a good starting point and will get you 80% of where you want to go. the other 20% are up to you. -igor On Sat, Aug 9, 2008 at 10:06 PM, Martin Makundi [EMAIL PROTECTED] wrote: Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Yes, but with Select And SelectOption you loose the benefits of dropdownchoice (automatic notnull and localization, for example). ** Martin Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
Another possibility would be to just enable suitable hooks in the rendering phase of xxChoices. I.e., a method String getOptionAttributes(T t) or similar would be called during the render phase of a DropDownChoice. sure, submit an RFE Ok, https://issues.apache.org/jira/browse/WICKET-1785 I may draft a patch soon. ** Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
On Sun, Aug 10, 2008 at 9:19 AM, Martin Makundi [EMAIL PROTECTED] wrote: I may draft a patch soon. that would be great -igor ** Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
Using Select/SelectOption/SelectOptions I loose all the other encapsulated benfits of DropDownChoice or ListChoice. Wouldn't it be a good idea to have IChoiceRenderer or a similar interface with a method getDispayStyle for each option? ** Martin 2008/4/29 Igor Vaynberg [EMAIL PROTECTED]: see Select/SelectOption/SelectOptions in wicket-extensions -igor On Tue, Apr 29, 2008 at 9:43 AM, Full-toos Geek [EMAIL PROTECTED] wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
Note that you can style option tags in Firefox, but it probably won't work in Internet Explorer, so it may not be worth even bothering with this... Alastair 2008/8/9 Martin Makundi [EMAIL PROTECTED]: Using Select/SelectOption/SelectOptions I loose all the other encapsulated benfits of DropDownChoice or ListChoice. Wouldn't it be a good idea to have IChoiceRenderer or a similar interface with a method getDispayStyle for each option? ** Martin 2008/4/29 Igor Vaynberg [EMAIL PROTECTED]: see Select/SelectOption/SelectOptions in wicket-extensions -igor On Tue, Apr 29, 2008 at 9:43 AM, Full-toos Geek [EMAIL PROTECTED] wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Yes, but with Select And SelectOption you loose the benefits of dropdownchoice (automatic notnull and localization, for example). ** Martin Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
so write a component that works the way you want. as core devs we have to maintain a hard balance between simplicity and flexibility. the more pluggable/customizable you make something, the more complicated it becomes. we do not make core components ultra pluggable because they serve as a basis and examples for users who want to see how they work and want to implement something similar. what we do concentrate on a lot is making writing your own components easy. if you look at the dropdownchoice class hiearchy you might find a base class that is a good starting point and will get you 80% of where you want to go. the other 20% are up to you. -igor On Sat, Aug 9, 2008 at 10:06 PM, Martin Makundi [EMAIL PROTECTED] wrote: Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Yes, but with Select And SelectOption you loose the benefits of dropdownchoice (automatic notnull and localization, for example). ** Martin Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
It would be pretty easy to just add a getDispayStyle method into the IChoiceRenderer interface and refactor the various classes using it to support it accordingly. Don't you think? ** Martin 2008/8/10 Igor Vaynberg [EMAIL PROTECTED]: so write a component that works the way you want. as core devs we have to maintain a hard balance between simplicity and flexibility. the more pluggable/customizable you make something, the more complicated it becomes. we do not make core components ultra pluggable because they serve as a basis and examples for users who want to see how they work and want to implement something similar. what we do concentrate on a lot is making writing your own components easy. if you look at the dropdownchoice class hiearchy you might find a base class that is a good starting point and will get you 80% of where you want to go. the other 20% are up to you. -igor On Sat, Aug 9, 2008 at 10:06 PM, Martin Makundi [EMAIL PROTECTED] wrote: Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Yes, but with Select And SelectOption you loose the benefits of dropdownchoice (automatic notnull and localization, for example). ** Martin Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
it will also break all existing implementations of the interface out there. -igor On Sat, Aug 9, 2008 at 10:21 PM, Martin Makundi [EMAIL PROTECTED] wrote: It would be pretty easy to just add a getDispayStyle method into the IChoiceRenderer interface and refactor the various classes using it to support it accordingly. Don't you think? ** Martin 2008/8/10 Igor Vaynberg [EMAIL PROTECTED]: so write a component that works the way you want. as core devs we have to maintain a hard balance between simplicity and flexibility. the more pluggable/customizable you make something, the more complicated it becomes. we do not make core components ultra pluggable because they serve as a basis and examples for users who want to see how they work and want to implement something similar. what we do concentrate on a lot is making writing your own components easy. if you look at the dropdownchoice class hiearchy you might find a base class that is a good starting point and will get you 80% of where you want to go. the other 20% are up to you. -igor On Sat, Aug 9, 2008 at 10:06 PM, Martin Makundi [EMAIL PROTECTED] wrote: Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Yes, but with Select And SelectOption you loose the benefits of dropdownchoice (automatic notnull and localization, for example). ** Martin Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: color code options in drop down choice
it will also break all existing implementations of the interface out there. Well, the effort will nicely blend in with the chores of refactoring to the changes in generics... :) Or should it be made an abstract class? Another possibility would be to just enable suitable hooks in the rendering phase of xxChoices. I.e., a method String getOptionAttributes(T t) or similar would be called during the render phase of a DropDownChoice. It would then be easier for anybody to 'sugarcoat' their DropDown and it would not break the existing inplementations. There I could just check if (renderer instanceof MyChoiceRenderer) { ... and sugarcoat my option ... } ** Martin On Sat, Aug 9, 2008 at 10:21 PM, Martin Makundi [EMAIL PROTECTED] wrote: It would be pretty easy to just add a getDispayStyle method into the IChoiceRenderer interface and refactor the various classes using it to support it accordingly. Don't you think? ** Martin 2008/8/10 Igor Vaynberg [EMAIL PROTECTED]: so write a component that works the way you want. as core devs we have to maintain a hard balance between simplicity and flexibility. the more pluggable/customizable you make something, the more complicated it becomes. we do not make core components ultra pluggable because they serve as a basis and examples for users who want to see how they work and want to implement something similar. what we do concentrate on a lot is making writing your own components easy. if you look at the dropdownchoice class hiearchy you might find a base class that is a good starting point and will get you 80% of where you want to go. the other 20% are up to you. -igor On Sat, Aug 9, 2008 at 10:06 PM, Martin Makundi [EMAIL PROTECTED] wrote: Take a look http://jweekend.com/dev/ArticlesPage/ here , at the Wicket Select And SelectOption presentation (roughly about half way through). Yes, but with Select And SelectOption you loose the benefits of dropdownchoice (automatic notnull and localization, for example). ** Martin Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk fulltoos wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == -- View this message in context: http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
color code options in drop down choice
hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos ==
Re: color code options in drop down choice
see Select/SelectOption/SelectOptions in wicket-extensions -igor On Tue, Apr 29, 2008 at 9:43 AM, Full-toos Geek [EMAIL PROTECTED] wrote: hi I want to have a dropdown choice in which some of the choices are of different color based on the model. is there any existing implementation which i can use. OR how should i go about it please suggset. full toos == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]