Re: Mailbox component

2014-08-07 Thread Maxim Solodovnik
I have implemented something like this in our project (I'm afraid it might
be not optimally written due to lack of time)
the demo is available here: http://demo.dataved.ru/openmeetings (register
then go to "Contacts and Messages")
The source code is here:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessagesContactsPanel.java?view=markup

hopefully will rework it one day


On 8 August 2014 12:08, Ernesto Reinaldo Barreiro 
wrote:

> Hi,
>
> On Fri, Aug 8, 2014 at 2:06 AM, Paul Bors  wrote:
>
> > Suppose you take the jQuery Table and style it something like this (in a
> > responsive web 'theamable' manner):
> >
> >
> http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/
> >
> > Suppose you integrate it in Wicket and have it functional and suppose you
> > want the following basic features implemented:
> > * SMTP/POP and IMAP support
> >   * Properties or settings screen to configure the basics
> > * Add Star / Unstar Messages
> > * Delete Single Message
> > * Delete Multiple Messages
> > * Mark as Read
> > * Mark as Unread
> >
>
> Yes all of that...
>
> >
> > One would have to handle a pretty good abstraction of the actual
> > interaction with the mail server which might or might not support all
> those
> > features. And if a feature is not supported it should be disabled.
> >
> > Yes that's what I meant by "I'm not sure how configurable/complete it is
> at the moment". It should be a matter of providing abstraction via
> interfaces for all operations... The actual source/sink for messages do not
> even need to be an e-mail server... In my case it is just a database.
>
>
> > I think this is at least a week's effort.
>
>
> That's more or less the effort it took me to roll out it ;-)
>
>
> > On Wed, Jul 30, 2014 at 1:35 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Pierre,
> > >
> > > Hi,
> > >
> > > I have rolled out something like that for a private application. I'm
> not
> > > sure how configurable/complete it is at the moment. I would not be
> > against
> > > open sourcing it.
> > >
> > >
> > > On Wed, Jul 30, 2014 at 3:43 AM, Pierre Goupil  >
> > > wrote:
> > >
> > > > Good evening,
> > > >
> > > > Does anyone know about a mailbox component, please?
> > > >
> > > > I'm looking for something to allow my users send and browse private
> > > > messages through my webapp. And I'd be surprised that there is no
> good
> > > > open-source components to do that out there.
> > > >
> > > > Any suggestion?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Pierre
> > > >
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
WBR
Maxim aka solomax


Re: Mailbox component

2014-08-07 Thread Ernesto Reinaldo Barreiro
Hi,

On Fri, Aug 8, 2014 at 2:06 AM, Paul Bors  wrote:

> Suppose you take the jQuery Table and style it something like this (in a
> responsive web 'theamable' manner):
>
> http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/
>
> Suppose you integrate it in Wicket and have it functional and suppose you
> want the following basic features implemented:
> * SMTP/POP and IMAP support
>   * Properties or settings screen to configure the basics
> * Add Star / Unstar Messages
> * Delete Single Message
> * Delete Multiple Messages
> * Mark as Read
> * Mark as Unread
>

Yes all of that...

>
> One would have to handle a pretty good abstraction of the actual
> interaction with the mail server which might or might not support all those
> features. And if a feature is not supported it should be disabled.
>
> Yes that's what I meant by "I'm not sure how configurable/complete it is
at the moment". It should be a matter of providing abstraction via
interfaces for all operations... The actual source/sink for messages do not
even need to be an e-mail server... In my case it is just a database.


> I think this is at least a week's effort.


That's more or less the effort it took me to roll out it ;-)


> On Wed, Jul 30, 2014 at 1:35 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > Pierre,
> >
> > Hi,
> >
> > I have rolled out something like that for a private application. I'm not
> > sure how configurable/complete it is at the moment. I would not be
> against
> > open sourcing it.
> >
> >
> > On Wed, Jul 30, 2014 at 3:43 AM, Pierre Goupil 
> > wrote:
> >
> > > Good evening,
> > >
> > > Does anyone know about a mailbox component, please?
> > >
> > > I'm looking for something to allow my users send and browse private
> > > messages through my webapp. And I'd be surprised that there is no good
> > > open-source components to do that out there.
> > >
> > > Any suggestion?
> > >
> > > Thanks in advance,
> > >
> > > Pierre
> > >
> >
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: HTML headings

2014-08-07 Thread Paul Bors
I can’t view your HTML in my email client, but here’s a quick example of what I 
think you’re asking for:

HTML:
http://wicket.apache.org";>

[[label]]



Java:
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.OnChangeAjaxBehavior;
import 
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings;
import 
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;

public class LabeledEditTextField extends Panel {
private boolean editable;
private Label label;
private TextField textField;

public LabelEditTextField(String id, IModel labelModel, IModel 
textFieldModel) {
this(id, labelModel, textFieldModel, false);
}

/**
 * Create a {@link Label} that can turn into an {@link 
AutoCompleteTextField}
 * if the autoCompleteChoices is not null.
 * 
 * @param id{@link Component} id
 * @param labelModel{@link IModel} to use for the {@link Label}
 * @param textFieldModel{@link IModel} to use for the {@link 
AjaxTextField} or the {@link AutoCompleteTextField}
 * @param autoCompleteTextField true if an {@link 
AutoCompleteTextField} is to be used in which case you
 *  must override {@link 
#getAutoCompleteChoices(String)}. false is a simple
 *  {@link AjaxTextField} is to be used.
 */
public LabelEditTextField(String id, IModel labelModel, IModel 
textFieldModel, boolean autoCompleteTextField) {
super(id);
label = new Label("label", labelModel);
textField = (autoCompleteTextField) ?
new AutoCompleteTextField("textField", textFieldModel, new 
AutoCompleteSettings().setPreselect(false)) {
@Override
protected Iterator getChoices(String input) {
return getAutoCompleteChoices(input);
}
} : 
new AjaxTextField("textField", textFieldModel) {
@Override
public void doAjaxUpdates(AjaxRequestTarget target) {
LabelEditTextField.this.ajaxCallback(target);
}
@Override
public void doAjaxUpdatesOnError(AjaxRequestTarget target) {
LabelEditTextField.this.ajaxCallbackOnError(target);
}
};
if(autoCompleteTextField) {
textField.add(new OnChangeAjaxBehavior() {
@Override
public void onUpdate(AjaxRequestTarget target) {
LabelEditTextField.this.ajaxCallback(target);
}
@Override
public void onError(AjaxRequestTarget target, RuntimeException 
re) {
LabelEditTextField.this.ajaxCallbackOnError(target);
}
});
}
adjustVisibility();
add(label);
add(textField);
}

/**
 * Provides list of auto-complete choices for the AutoCompleteTextField.
 * 
 * @param   input User input
 * @return  Iterator to the list of auto-complete choices based on the user 
input.
 */
protected Iterator getAutoCompleteChoices(String userInput) {
List emptyList = Collections.emptyList();
return emptyList.iterator();
}

private void adjustVisibility() {
if(isEditable()) {
label.setVisible(false);
textField.setVisible(true);
} else {
label.setVisible(true);
textField.setVisible(false);
}
}

/**
 * Toggle between the view mode and the edit mode.
 * 
 * @param editable  false by default if the Label 
is to be displayed,
 *  true if the Text Field is to 
be displayed.
 */
public void setEditable(boolean editable) {
this.editable = editable;
adjustVisibility();
}

public TextField getEditComponent() {
return this.textField;
}

public boolean isEditable() {
return this.editable;
}

public void ajaxCallback(AjaxRequestTarget target) {
// Optionally overridden by subclasses
}

public void ajaxCallbackOnError(AjaxRequestTarget target) {
// Optionally overridden by subclasses
}
}

I advise you take the common functionality like the setEditable(), isEditable() 
and getEditComponent() place them into an interface that returns only 
FormComponents so that you can have other types of LabelledEdit***Component but 
the

Re: wicket-select2 - adding sub categories seen in select2

2014-08-07 Thread Paul Bors
Your question is better asked on that project’s mailing list at:
https://groups.google.com/forum/#!forum/select2

Or if you prefer on the wicket-select2 project mailing list at:
https://github.com/ivaynberg/wicket-select2/issues (this is actually the bug 
tracker)

~ Thank you,
   Paul Bors

On Jul 7, 2014, at 6:43 AM, Vishal Popat  wrote:

> Hi,
> 
> Is it possible to add categories to the lists in wicket-select2 like seen in 
> http://ivaynberg.github.io/select2/#basics (The Time Zone labels)?
> Also is it possible to add functionality like the flag images as well?
> 
> Regards
> Vishal



Re: Mailbox component

2014-08-07 Thread Paul Bors
Suppose you take the jQuery Table and style it something like this (in a
responsive web 'theamable' manner):
http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/

Suppose you integrate it in Wicket and have it functional and suppose you
want the following basic features implemented:
* SMTP/POP and IMAP support
  * Properties or settings screen to configure the basics
* Add Star / Unstar Messages
* Delete Single Message
* Delete Multiple Messages
* Mark as Read
* Mark as Unread

One would have to handle a pretty good abstraction of the actual
interaction with the mail server which might or might not support all those
features. And if a feature is not supported it should be disabled.

I think this is at least a week's effort.


On Wed, Jul 30, 2014 at 1:35 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Pierre,
>
> Hi,
>
> I have rolled out something like that for a private application. I'm not
> sure how configurable/complete it is at the moment. I would not be against
> open sourcing it.
>
>
> On Wed, Jul 30, 2014 at 3:43 AM, Pierre Goupil 
> wrote:
>
> > Good evening,
> >
> > Does anyone know about a mailbox component, please?
> >
> > I'm looking for something to allow my users send and browse private
> > messages through my webapp. And I'd be surprised that there is no good
> > open-source components to do that out there.
> >
> > Any suggestion?
> >
> > Thanks in advance,
> >
> > Pierre
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: FileUpload not working

2014-08-07 Thread mohallo
Thanks for your help that worked out.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileUpload-not-working-tp4666920p4666950.html
Sent from the Users forum 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: Migration to wicket 7

2014-08-07 Thread Martin Grigorov
this is the change:
https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commit;h=2f87d0b
it seems we forgot to add a migration entry about it. I'll update it soon
the idea is to use i18n. now Wicket uses #getString() to find the value.
check the latest master for the keys

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Thu, Aug 7, 2014 at 7:31 PM, Maxim Solodovnik 
wrote:

> OK, I was searching the page for the name, and was unable to find it :(
>
> Any example on how to customize AjaxFallbackOrderByBorder without
> CssProvider
> ?
>
>
> On 8 August 2014 00:27, Martin Grigorov  wrote:
>
> >
> >
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0#MigrationtoWicket7.0-AllIXyzSettingsareremovedWICKET-5410
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> >
> > On Thu, Aug 7, 2014 at 7:21 PM, Maxim Solodovnik 
> > wrote:
> >
> > > and IPageSettings
> > >
> > > sorry for multiple emails :(
> > >
> > >
> > > On 8 August 2014 00:19, Maxim Solodovnik  wrote:
> > >
> > > > The guide also missing to
> > > > mention org.apache.wicket.protocol.ws.IWebSocketSettings
> > > >
> > > >
> > > > On 8 August 2014 00:18, Maxim Solodovnik 
> wrote:
> > > >
> > > >> Hello All,
> > > >>
> > > >> I'm currently trying to migrate to wicket 7.0.0 and currently stuck
> on
> > > >> replacing
> > > >>
> > > >>
> > >
> >
> org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.CssProvider
> > > >> it seems to be removed and Migration guide [1] contains no
> replacement
> > > :(
> > > >>
> > > >> I'm trying to use it in custom class extending
> > AjaxFallbackOrderByBorder
> > > >>
> > > >> Thanks in advance
> > > >>
> > > >> [1]
> > > >>
> > >
> >
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
> > > >>
> > > >> --
> > > >> WBR
> > > >> Maxim aka solomax
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > WBR
> > > > Maxim aka solomax
> > > >
> > >
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Re: Migration to wicket 7

2014-08-07 Thread Maxim Solodovnik
OK, I was searching the page for the name, and was unable to find it :(

Any example on how to customize AjaxFallbackOrderByBorder without CssProvider
?


On 8 August 2014 00:27, Martin Grigorov  wrote:

>
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0#MigrationtoWicket7.0-AllIXyzSettingsareremovedWICKET-5410
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Thu, Aug 7, 2014 at 7:21 PM, Maxim Solodovnik 
> wrote:
>
> > and IPageSettings
> >
> > sorry for multiple emails :(
> >
> >
> > On 8 August 2014 00:19, Maxim Solodovnik  wrote:
> >
> > > The guide also missing to
> > > mention org.apache.wicket.protocol.ws.IWebSocketSettings
> > >
> > >
> > > On 8 August 2014 00:18, Maxim Solodovnik  wrote:
> > >
> > >> Hello All,
> > >>
> > >> I'm currently trying to migrate to wicket 7.0.0 and currently stuck on
> > >> replacing
> > >>
> > >>
> >
> org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.CssProvider
> > >> it seems to be removed and Migration guide [1] contains no replacement
> > :(
> > >>
> > >> I'm trying to use it in custom class extending
> AjaxFallbackOrderByBorder
> > >>
> > >> Thanks in advance
> > >>
> > >> [1]
> > >>
> >
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
> > >>
> > >> --
> > >> WBR
> > >> Maxim aka solomax
> > >>
> > >
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>



-- 
WBR
Maxim aka solomax


Re: Migration to wicket 7

2014-08-07 Thread Martin Grigorov
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0#MigrationtoWicket7.0-AllIXyzSettingsareremovedWICKET-5410

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Thu, Aug 7, 2014 at 7:21 PM, Maxim Solodovnik 
wrote:

> and IPageSettings
>
> sorry for multiple emails :(
>
>
> On 8 August 2014 00:19, Maxim Solodovnik  wrote:
>
> > The guide also missing to
> > mention org.apache.wicket.protocol.ws.IWebSocketSettings
> >
> >
> > On 8 August 2014 00:18, Maxim Solodovnik  wrote:
> >
> >> Hello All,
> >>
> >> I'm currently trying to migrate to wicket 7.0.0 and currently stuck on
> >> replacing
> >>
> >>
> org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.CssProvider
> >> it seems to be removed and Migration guide [1] contains no replacement
> :(
> >>
> >> I'm trying to use it in custom class extending AjaxFallbackOrderByBorder
> >>
> >> Thanks in advance
> >>
> >> [1]
> >>
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
> >>
> >> --
> >> WBR
> >> Maxim aka solomax
> >>
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Re: Migration to wicket 7

2014-08-07 Thread Maxim Solodovnik
and IPageSettings

sorry for multiple emails :(


On 8 August 2014 00:19, Maxim Solodovnik  wrote:

> The guide also missing to
> mention org.apache.wicket.protocol.ws.IWebSocketSettings
>
>
> On 8 August 2014 00:18, Maxim Solodovnik  wrote:
>
>> Hello All,
>>
>> I'm currently trying to migrate to wicket 7.0.0 and currently stuck on
>> replacing
>>
>> org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.CssProvider
>> it seems to be removed and Migration guide [1] contains no replacement :(
>>
>> I'm trying to use it in custom class extending AjaxFallbackOrderByBorder
>>
>> Thanks in advance
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax


Re: Migration to wicket 7

2014-08-07 Thread Maxim Solodovnik
The guide also missing to
mention org.apache.wicket.protocol.ws.IWebSocketSettings


On 8 August 2014 00:18, Maxim Solodovnik  wrote:

> Hello All,
>
> I'm currently trying to migrate to wicket 7.0.0 and currently stuck on
> replacing
>
> org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.CssProvider
> it seems to be removed and Migration guide [1] contains no replacement :(
>
> I'm trying to use it in custom class extending AjaxFallbackOrderByBorder
>
> Thanks in advance
>
> [1]
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax


Migration to wicket 7

2014-08-07 Thread Maxim Solodovnik
Hello All,

I'm currently trying to migrate to wicket 7.0.0 and currently stuck on
replacing
org.apache.wicket.extensions.markup.html.repeater.data.sort.OrderByLink.CssProvider
it seems to be removed and Migration guide [1] contains no replacement :(

I'm trying to use it in custom class extending AjaxFallbackOrderByBorder

Thanks in advance

[1]
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+7.0

-- 
WBR
Maxim aka solomax


Re: Foundation integrated in wicket

2014-08-07 Thread vp143
I am not sure I understand what you are after... I do not have anything on
GitHub.

I used SASS to install and compile my sass files and put my js files in my
webapp directory.

Let me know if you have any specific questions.

Regards
Vishal

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Foundation-integrated-in-wicket-tp4666792p4666936.html
Sent from the Users forum 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: FileUpload not working

2014-08-07 Thread Martin Grigorov
re ByteArrayResource - you need to set Content-Disposition response header
to tell the browser whether to show it (INLINE) or to save it (ATTACHMENT).

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Thu, Aug 7, 2014 at 4:03 PM, mohallo  wrote:

> Hi thanks for your reply .I want the user to select a xls file on their
> local
> pc and upload the contents of the screen to that file .The file has to be
> local to their system .
> The examples i have seen all upload the file to the server with the method
> "FileUpload.writeTo(file).
> In the past I have used ByteArrayResource which worked pretty good but
> since
> moving to Wicket 6 I get a popup asking if I want to save or open the file
> which locks up the application .I am trying a new approach which I hope
> will
> work better .
> I have been through all the examples but they dont meet my needs .should I
> be doing something with FileUpload getInputStream .
> Thanks again for you help .
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/FileUpload-not-working-tp4666920p4666934.html
> Sent from the Users forum 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: FileUpload not working

2014-08-07 Thread mohallo
Hi thanks for your reply .I want the user to select a xls file on their local
pc and upload the contents of the screen to that file .The file has to be
local to their system .
The examples i have seen all upload the file to the server with the method
"FileUpload.writeTo(file).
In the past I have used ByteArrayResource which worked pretty good but since
moving to Wicket 6 I get a popup asking if I want to save or open the file
which locks up the application .I am trying a new approach which I hope will
work better .
I have been through all the examples but they dont meet my needs .should I
be doing something with FileUpload getInputStream .
Thanks again for you help .



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileUpload-not-working-tp4666920p4666934.html
Sent from the Users forum 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: Form.findSubmittingButton throws exceptions

2014-08-07 Thread Martin Grigorov
I think that it should return the found submitter.
If the caller cares whether the submitter is visible/enabled then it can do
its own check for this.
I'll raise the question in the dev@ mailing list.
If no one objects then I'll modify it.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Thu, Aug 7, 2014 at 3:24 PM, Jack Berg  wrote:

> Wouldn't it return null, if the form was not submitted by a
> IFormSubmittingComponent?
>
> I have attached a quickstart to show my current situation. The exception is
> always thrown after submitting.
> testfindsubmit.zip
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4666926/testfindsubmit.zip
> >
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Form-findSubmittingButton-throws-exceptions-tp4666910p4666926.html
> Sent from the Users forum 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: Form.findSubmittingButton throws exceptions

2014-08-07 Thread Jack Berg
Wouldn't it return null, if the form was not submitted by a
IFormSubmittingComponent?

I have attached a quickstart to show my current situation. The exception is
always thrown after submitting.
testfindsubmit.zip
  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-findSubmittingButton-throws-exceptions-tp4666910p4666926.html
Sent from the Users forum 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: Unit testing FormComponentPanel

2014-08-07 Thread Martin Grigorov
Do you fire an Ajax call
with org.apache.wicket.util.tester.BaseWicketTester#executeBehavior(a
jaxFormChoiceComponentUpdatingBehavior) ?
This will simulate the click event on the radio element.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Thu, Aug 7, 2014 at 10:03 AM, lucast  wrote:

> Thank you, Martin,
>
> I have implemented the solution, as suggested:
>
> wicketTester.getRequest().setParameter(""formComponentPanel:radioChoice"",
> ""value"")
>
>
> However, AjaxFormChoiceComponentUpdatingBehavior.onUpdate() (which I have
> added to radioChoice) does not behave as expected during test.
>
> Normally, inside of onUpdate() I obtain the value from radioChoice by
> calling radioChoice.getModelObject().
>
> However, when I execute
>
> radioChoice.getModelObject() returns null.
>
> From inside the test, the only way I can obtain a value from inside
> AjaxFormChoiceComponentUpdatingBehavior.onUpdate() is by calling
> radioChoice.getInput() which only returns a string.
>
> How can I get radioChoice.getModelObject()  to return a value from inside
> the test?
>
> I fear I am missing something really obvious in my tests.
>
> Thanks, once more,
> Lucas
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Unit-testing-FormComponentPanel-tp4666900p4666923.html
> Sent from the Users forum 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: Unit testing FormComponentPanel

2014-08-07 Thread lucast
Thank you, Martin,

I have implemented the solution, as suggested:

wicketTester.getRequest().setParameter(""formComponentPanel:radioChoice"",
""value"")


However, AjaxFormChoiceComponentUpdatingBehavior.onUpdate() (which I have
added to radioChoice) does not behave as expected during test.

Normally, inside of onUpdate() I obtain the value from radioChoice by
calling radioChoice.getModelObject().

However, when I execute

radioChoice.getModelObject() returns null. 

>From inside the test, the only way I can obtain a value from inside
AjaxFormChoiceComponentUpdatingBehavior.onUpdate() is by calling
radioChoice.getInput() which only returns a string.

How can I get radioChoice.getModelObject()  to return a value from inside
the test?

I fear I am missing something really obvious in my tests.

Thanks, once more,
Lucas


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unit-testing-FormComponentPanel-tp4666900p4666923.html
Sent from the Users forum 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