Re: TextField updated via AJAX not sent in form?

2016-01-27 Thread Viktor Micskó
Hi,


Thank you, this was the reason indeed.

Just for the archive: forms in tables seem to work fine as long as you
don't update form fields via AJAX, but Labels are updated correctly.


Kind Regards,
Viktor Micsko

On Wed, Jan 27, 2016 at 9:33 AM, Thomas Matthijs  wrote:

> > o) I also found that this only happens when the markup looks like this,
> > i.e. the form is inside the table (See HomePage.html):
> >
> > 
> >   
> >...
> >   
> > 
> >
> > ...but not when the form is outside (see WorkingPage.html)
> >
> > 
> >
> >...
> >
> > 
> >
> > The first markup would be preferred so that the existing values line up
> > nicely with the form fields.
>
>  is not allowed to be in table, see
> https://developer.mozilla.org/en/docs/Web/HTML/Element/table
>
> You are still building html, it has to be (mostly) valid
>
> Kind regards
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: TextField updated via AJAX not sent in form?

2016-01-27 Thread Martin Grigorov
Hi,

Wicket behaves the same way in both cases.
It is just that the browser doesn't send request parameter for "price" when
the HTML is invalid. That's why it is null at the server side.

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

On Wed, Jan 27, 2016 at 11:13 PM, Viktor Micskó  wrote:

> Hi,
>
>
> Thank you, this was the reason indeed.
>
> Just for the archive: forms in tables seem to work fine as long as you
> don't update form fields via AJAX, but Labels are updated correctly.
>
>
> Kind Regards,
> Viktor Micsko
>
> On Wed, Jan 27, 2016 at 9:33 AM, Thomas Matthijs  wrote:
>
> > > o) I also found that this only happens when the markup looks like this,
> > > i.e. the form is inside the table (See HomePage.html):
> > >
> > > 
> > >   
> > >...
> > >   
> > > 
> > >
> > > ...but not when the form is outside (see WorkingPage.html)
> > >
> > > 
> > >
> > >...
> > >
> > > 
> > >
> > > The first markup would be preferred so that the existing values line up
> > > nicely with the form fields.
> >
> >  is not allowed to be in table, see
> > https://developer.mozilla.org/en/docs/Web/HTML/Element/table
> >
> > You are still building html, it has to be (mostly) valid
> >
> > Kind regards
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


TextField updated via AJAX not sent in form?

2016-01-27 Thread Viktor Micskó
Hi,


I found an interesting behavior, which finally I avoided in this project
due to changing requirements, but it still bothers me, so I thought I'd ask
anyways, perhaps I'm missing something trivial.

The basic idea is that there is list of sales data in a table (think of it
like a sales receipt), with a form having a list of products to add in a
DropDownChoice, and a price in a TextField. Each product has a default
price, which the user can accept or enter another one (e.g. discounts): you
choose a product in the DropDownChoice, its default price gets populated
into the TextField via AJAX, and then the user may or may not change this
price before submit.

So the DropDownChoice has an AjaxFormComponentUpdatingBehavior("change")
which calls target.add(priceField).

I uploaded a quickstart here: http://micsko.com/example.zip


This is what I found:

o) The problem is that if I choose a product first, and then enter a
different price, the model object of the TextField will be null, not the
default nor the entered price. It seems like the browser doesn't even send
the price field in the form, but it does send the product field. After
submit the TextField will be reset to empty, this seems to be correct given
that the model object is now null for some reason. If I enter another value
and submit the form again, the price is now being sent. But not on the
first submit.

o) If, on the other hand, I don't choose a product, just enter a price,
then the model object of the TextField will contain the entered value, as
expected.

o) For this behavior to happen, it's not even required to change the price
model object, it's enough that I add the TextField to the AjaxRequestTarget
(see PriceForm.java line 71).

o) I also found that this only happens when the markup looks like this,
i.e. the form is inside the table (See HomePage.html):


  
   ...
  


...but not when the form is outside (see WorkingPage.html)


   
   ...
   


The first markup would be preferred so that the existing values line up
nicely with the form fields.


Any ideas what I'm missing?

Thanks,
Viktor Micsko


[ANNOUNCE] WicketStuff 7.2.0 Released

2016-01-27 Thread Martin Grigorov
WicketStuff core 7.2.0 based on Apache Wicket 7.2.0 is released and available
at Maven Central.

The changelog since 7.1.0 is:

Martin Tzvetanov Grigorov (40):
  Bump version to 7.2.0-SNAPSHOT
  Bump version of sub-modules to 7.2.0-SNAPSHOT
  [select2] Use proper JS and CSS ResourceReferences so that the
content-type is specified
  [select2] Minor code style improvements
  [tinymce3] Move dependencies from the parent pom to tinymce3/pom.xml
  [parent pom] JUnit 4.11 -> 4.12
  [tinymce3] Move TinyMceInitializer from wicket.properties to
META-INF/services/org.apache.wicket.IInitializer
  [tinymce3] Add slf4j-simple as dependency for the tests
  [tinymce4] Move dependencies from the parent pom to tinymce4/pom.xml
  [tinymce4] Move wicket.properties to
META-INF/services/org.apache.wicket.IInitializer
  Unignore 'META-INF' folder and add all of them
  [push] Move wicket.properties to META-INF/services/
  [poi] Move wicket.properties to META-INF/services/
  [annotationeventdispatcher] Move wicket.properties to
META-INF/services
  [gae] Move wicket.properties to META-INF/services/
  [selectize] List the Maven modules in the parent pom
  [selectize] Do not deploy wicketstuff-selectize-examples in Maven
  [select2] Update Select2 to v4.0.1
  [selectize] Revert the introduction of generics for Selectize
component
  [selectize] Add Jetty started for Selectize examples
  [fast2] Update fast serializer to 2.43
  [datatables] Migrate the Datatables code from wicket-6.x branch
  [datatables] Add support for infinite scrolling and styling/skining
  [datatables] Add support for "rowId" - i.e. to set a unique id to
each row (tr) in the table
  [datatables] Add support for IStyledColumn
  [datatables] Add support for column definitions
  [datatables] Add support for 'retrieve' option
  [datatables] Add support for 'pageLength'
  [datatables] Add #repaint(AjaxRequestTarget) - a method that could be
used to repaint the JS widget
  [datatables] Add support for the Select extension
  [datatables] Fix the generation of the CSS plugin resources
  [datatables] Add a demo showing how to send the ids of the selected
rows when using OS selection
  [datatables] Add support for marking a column as not orderable
  [datatables] Rename 'renderFunction' to 'render' as per DataTables
documentation
  [datatables] Make it possible to not contribute CSS resources
  [datatables] Introduce abstract resource reference for virtual
scrolling data providing
  [datatables] Make AbstractVirtualScrollResourceReference's constants
public
  [datatables] Contribute the JavaScript that initializes DataTables
only when the component is enabled in hierarchy
  [datatables] Add constants for the search parameters for "serverSide"
  Release 7.2.0

Maxim Solodovnik (16):
  Select2 works as expected, tests for multiselect are broken
  More work on issue #411: settings are now chainable, allowClear works
as expected; Ajax example is added and tested
  more work on #411: Previous tests are fixed
  All versions are bumped to be 7.2.0-SNAPSHOT
  Null check for the 'term' is removed
 Additional example is added
  Merge pull request #436 from selckin/master
  decebals/wicket-dashboard 7.0 is moved to wicketstuff
  All Boolean settings were replaced with boolean
  Code was updated to use jetty 8, build is fixed
  Load more records if available is fixed
  Some of the select2 options are fixed
  Merge pull request #443 from reiern70/master
  Merge pull request #453 from reiern70/master
  White-spaces are fixed
  Merge pull request #454 from PhantomYdn/master

René Dieckmann (13):
  Jamon API integration.
  Build configuration: added properties for build control
  Reduced memory footprint on JamonAdminPage.
  Refactoring: Removed unnessecary markup id assignment.
  Refactoring: Removed unnessecary custom requestcycle.
  Increased relevant statistics in admin page.
  Illustrated intent on JamonAdminPage Tests.
  Increased testability of jamon repository components.
  Increased relevant statistics in admin page on reset.
  Filtered monitor statistics to record only explicit executed
workflows.
  Guarantee logger-api configurable by host system.
  Verbose application statements.
  Refactoring: Save some http requests by using bookmarkable page links.

reiern70 (12):
  Behavior that adds a select2 to a dropdown choice (to be used with a
normal drop down choice)
  stateless mode that allows to read JSON from a mounted resource
  fix generation of results
  needed to be able override the class on Scala
  fix @martin-g and @solomax remarks
  call close in its own try catch
  close web response
  no need to close ByteArrayOutputStream
  in stateless case we still need to 

Re: Wicket Presentation

2016-01-27 Thread Martijn Dashorst
I'm still considering it. Unfortunately it falls right in a very busy
period for me. What kind of presentation would you like to go to? What
kind of subjects should be covered?

Martijn

On Tue, Jan 26, 2016 at 7:20 PM, Jered Myers
 wrote:
> Is anybody planning any Wicket presentations at ApacheCon North America in
> May?
>
> --
> Jered



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

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



Re: TextField updated via AJAX not sent in form?

2016-01-27 Thread Thomas Matthijs
> o) I also found that this only happens when the markup looks like this,
> i.e. the form is inside the table (See HomePage.html):
>
> 
>   
>...
>   
> 
>
> ...but not when the form is outside (see WorkingPage.html)
>
> 
>
>...
>
> 
>
> The first markup would be preferred so that the existing values line up
> nicely with the form fields.

 is not allowed to be in table, see
https://developer.mozilla.org/en/docs/Web/HTML/Element/table

You are still building html, it has to be (mostly) valid

Kind regards

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