Re: Check Group selected items called from other form loses the checked values

2016-10-26 Thread ganea iulia
Thank you so much for these examples.
This is great.

On Thu, Oct 20, 2016 at 2:22 PM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Hi,
>
> Use a ListView.
>
> The model of the second form is not updated until the form is submitted.
> You need to perform a submit if you want to see this model updated, and
> the correct value for tst.getCheckedTestBeans().size().
>
> If you want to avoid the manual submit phase, you need to use Ajax.
>
> Please find here your code slightly modified.
>
> TestPage
> http://pastebin.com/DYNpeZLt
> TestPage.html
> http://pastebin.com/gFa6Z5ZS
> ModelForForm
> http://pastebin.com/EhjezBWJ
> Wrapper
> http://pastebin.com/8B7n68VH
>
>
> François
>
>
>
>
> > Le 20 oct. 2016 à 08:38, ganea iulia  a écrit :
> >
> > Hello, Thank you for the samples.
> > But I will explain again what I have:
> >
> > I have two forms on my page.
> > In the bottom form I have a RefreshingView component, with check all
> > checkbox in the header, and check components for each items.
> > In the top form there is a link, where I need to get the checked items
> from
> > the second form (the bottom form);
> >
> > This is what I have done:
> > For checkAll and the individual checks I have used CheckGroup,
> > CheckGroupSelector and Check.
> >
> > The issue is that because the refreshing view refreshes the model at
> every
> > server roundtrip, when I check on item, the check doesn't maintain it's
> > value, because it receives every time a new model.
> >
> > So this bit from the RefreshingView always returns a new model which
> makes
> > the checks to dissapera:
> > @Override
> > protected Iterator> getItemModels() {
> > List lst = SpringCtx.getAppDB(TestBeanDao.class).selectAll();
> > List> models = new ArrayList>();
> > for (TestBean tstSN:lst) {
> > IModel modTst = new Model(tstSN);
> > models.add(modTst);
> > }
> > return models.iterator();
> > }
> >
> >
> > Isn;t there any way that I can still use the CheckGroup and Check
> > components? As this comes easy when it is needed a CheckAll
> functionality.
> >
> > Thank you
> >
> > Here is the code:
> >
> > =Java code=
> >
> > private static final long serialVersionUID = 311508940740808005L;
> > private static final Logger logger = LogManager.getLogger(TestPage.
> class);
> > private TestForm tst;
> > public TestPage(IModel model) {
> > super(model);
> >
> > TestForm0 tst0 = new TestForm0("testForm0");
> > tst0.setOutputMarkupId(true);
> > add(tst0);
> > tst = new TestForm("testForm", model);
> > tst.setOutputMarkupId(true);
> > add(tst);
> >
> >
> > }
> >
> > class TestForm0 extends Form {
> >
> > /**
> > *
> > */
> > private static final long serialVersionUID = 1L;
> >
> > public TestForm0(String id) {
> > super(id);
> >
> > Link print = new Link("print") {
> > private static final long serialVersionUID = 15L;
> >
> > @Override
> > public void onClick() {
> > System.out.println("size=" + tst.getCheckedTestBeans().size());
> > }
> > };
> > add(print);
> > }
> > }
> > class TestForm extends Form {
> > /**
> > *
> > */
> > private static final long serialVersionUID = 1L;
> >
> > private List checkedTestBeans;
> > public List getCheckedTestBeans() {
> > return checkedTestBeans;
> > }
> >
> > public void setCheckedTestBeans(List checkedTestBeans) {
> > this.checkedTestBeans = checkedTestBeans;
> > }
> >
> > public TestForm(String id, IModel model) {
> > super(id, model);
> >
> > checkedTestBeans = new ArrayList();
> > TextField txtName = new TextField("txtName", new
> > PropertyModel(getModelObject(), "name"));
> > add(txtName);
> > txtName.setOutputMarkupId(true);
> > txtName.add(new AjaxFormComponentUpdatingBehavior("change") {
> > private static final long serialVersionUID = 1654345477970524731L;
> >
> > @Override
> > protected void onUpdate(AjaxRequestTarget target) {
> > target.add(txtName);
> > }
> >
> > });
> >
> > ///
> > CheckGroup group = new CheckGroup("group1",
> > checkedTestBeans);
> > group.setOutputMarkupId(true);
> > group.add(new AjaxFormChoiceComponentUpdatingBehavior() {
> > private static final long serialVersionUID = 1654345477970524731L;
> >
> > @Override
> > protected void onUpdate(AjaxRequestTarget target) {
> > target.add(group);
> > }
> >
> > });
> > CheckGroupSelector cgs = new CheckGroupSelector("allCheck1");
> > group.add(cgs);
> > final WebMarkupContainer itemsContainer = new
> > WebMarkupContainer("itemsContainer1");
> > itemsContainer.setOutputMarkupId(true);
> > itemsContainer.add(new RefreshingView("forEachItem1") {
> > /**
> > *
> > */
> > private static final long serialVersionUID = 1L;
> > @Override
> > protected Iterator> getItemModels() {
> > List lst = SpringCtx.getAppDB(TestBeanDao.class).selectAll();
> > List> models = new ArrayList>();
> > for (TestBean tstSN:lst) {
> > IModel modTst = new Model(tstSN);
> > models.add(modTst);
> > }
> > return models.iterator();
> > }
> >
> > @Override
> > protected void populateItem(Item item) {
> >
> >  item.add(new Label("itemName", new
> > PropertyModel(item.getModel(), 

New window blocked by popup blocker

2016-10-26 Thread Pratibha
Hi team, 
I need to open window using Ajax Target

The below code opens url in new tab but is blocked by pop up

target.appendJavaScript("window.open('"+url.toString()+"','_blank');");
getRequestCycle().scheduleRequestHandlerAfterCurrent(target);


Thankyou



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/New-window-blocked-by-popup-blocker-tp4675878.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: New window blocked by popup blocker

2016-10-26 Thread Richard W. Adams
If you control the popup blocker, just disable it.

If you DON'T control the popup blocker,  you need to (1) Train users to 
allow popups for your app or (2) re-design the app to not use use popups.
_

“Measuring software productivity by lines of code is like measuring 
progress on an airplane by how much it weighs.”
Bill Gates 



From:   Pratibha 
To: users@wicket.apache.org
Date:   10/26/2016 05:14 AM
Subject:New window blocked by popup blocker



This email originated from outside of the company.  Please use discretion 
if opening attachments or clicking on links.

Hi team, 
I need to open window using Ajax Target

The below code opens url in new tab but is blocked by pop up

target.appendJavaScript("window.open('"+url.toString()+"','_blank');");
getRequestCycle().scheduleRequestHandlerAfterCurrent(target);


Thankyou



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/New-window-blocked-by-popup-blocker-tp4675878.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





**

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.
**


how to call modal window on link

2016-10-26 Thread Pratibha
Hi,

is it possible to call modal window on simple link without Ajax Request?
public void onClick() {
}

Thanks


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-call-modal-window-on-link-tp4675882.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: how to call modal window on link

2016-10-26 Thread Ernesto Reinaldo Barreiro
http://stackoverflow.com/questions/4765790/how-to-open-modaldialog-on-pageload

and

https://cwiki.apache.org/confluence/display/WICKET/Modal+Windows

Hope it still works as it did a few years ago!


On Wed, Oct 26, 2016 at 3:15 PM, Pratibha 
wrote:

> Hi,
>
> is it possible to call modal window on simple link without Ajax Request?
> public void onClick() {
> }
>
> Thanks
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/how-to-call-modal-window-on-link-tp4675882.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


[ANNOUNCE] Apache Wicket 8.0.0-M2 Released

2016-10-26 Thread Martijn Dashorst
The Apache Wicket PMC is proud to announce Apache Wicket 8.0.0-M2!

Apache Wicket is an open source Java component oriented web application
framework that powers thousands of web applications and web sites for
governments, stores, universities, cities, banks, email providers, and
more. You can find more about Apache Wicket at https://wicket.apache.org

This release marks another milestone release of Wicket 8. We
use semantic versioning for the development of Wicket. As this is pre-release
software, API breaks are allowed between 7.x and 8, and between milestone
releases.

Using this release
--

With Apache Maven update your dependency to (and don't forget to
update any other dependencies on Wicket projects to the same version):


org.apache.wicket
wicket-core
8.0.0-M2


Or download and build the distribution yourself, or use our
convenience binary package

 * Source: http://www.apache.org/dyn/closer.cgi/wicket/8.0.0-M2
 * Binary: http://www.apache.org/dyn/closer.cgi/wicket/8.0.0-M2/binaries

Upgrading from earlier versions
---

If you upgrade from 8.y.z this release is a drop in replacement. If
you come from a version prior to 8.0.0, please read our Wicket 8
migration guide found at

 * http://s.apache.org/wicket8migrate

Have fun!

— The Wicket team




The signatures for the source release artefacts:


Signature for apache-wicket-8.0.0-M2.zip:

-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iEYEABECAAYFAlgHzXgACgkQJBX8W/xy/UU4+ACgxCcY0zPKiw3x7n0rizY9CkiN
3tkAmwYX0hrkfkSYJKkkBaMSrI+z/zSf
=9mFS
-END PGP SIGNATURE-

Signature for apache-wicket-8.0.0-M2.tar.gz:

-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iEYEABECAAYFAlgHzXgACgkQJBX8W/xy/UU+GQCgsvsRwloc9JSMB1ieJT+6aoqR
CWsAnAmmb+z3Exzbn2bT8zE3IrY6wUHw
=LVj6
-END PGP SIGNATURE-



CHANGELOG for 8.0.0-M2:

** Sub-task

* [WICKET-6243] - ResourceReferenceAutolink component resolved by
AutoLinkResolver ignores session locale changes

** Bug

* [WICKET-5836] - Update the version of clirr-maven-plugin (current 2.6.1)
* [WICKET-5972] - Datepicker "Close" text overlays 'x' icon.
* [WICKET-6041] - Nested forms / parent FormComponents do not
reflect updated model when nested form submitted
* [WICKET-6136] - AutoCompleteTextField issue in Android 5.1.1
* [WICKET-6161] - SecuritySettings.setEnforceMounts() should be
applicable for all kind of pages
* [WICKET-6192] - Remove recreateBookmarkablePagesAfterExpiry
check in AbstractBookmarkableMapper#mapHandler
* [WICKET-6196] - CheckingObjectOutputStream broken in Wicket 7
* [WICKET-6198] - Unable to disable a MultiFileUploadField
* [WICKET-6202] - Guide: 26.1 Page storing, section
HttpSessionDataStore - example code is not correct
* [WICKET-6204] - Copy only the provided attributes for Ajax link inclusion
* [WICKET-6209] - requesting focus on disabled field fails with error in IE8
* [WICKET-6214] - ModalWindow broken on IE
* [WICKET-6215] - Test fail when non empty model is set to PasswordTextField
* [WICKET-6216] - Problem with queued components and border
* [WICKET-6217] - Enclosure broken within Border/Panel
* [WICKET-6219] - Fragment fails to report an error in development mode
* [WICKET-6220] - TagTester incomplete support for void elements
* [WICKET-6221] - WicketTester - missing border path
* [WICKET-6222] - renderHead not called with anonymous inner Border class
* [WICKET-6225] - Button wrongly sets its model object as 'value' attribute
* [WICKET-6227] - CharSequenceResource calculates wrong length
when there are unicode symbols
* [WICKET-6230] - Infinite redirection when using
UrlPathPageParametersEncoder
* [WICKET-6231] - wicket:enclosure and getVariation().
* [WICKET-6232] - When sending binary data from server to client,
wicket-websocket-jquery.js throws error "message.indexOf is not a
function"
* [WICKET-6235] - TableTree#updateNode() fails if no corresponding
node is visible
* [WICKET-6236] - Files.remove() causes a 5 seconds delay instead
of 500ms as was intended
* [WICKET-6237] - PageRequestHandlerTracker doesn't work with
IRequestHandlerDelegate
* [WICKET-6238] - pub2 Wicket example isn't switching the beer images
* [WICKET-6241] - CheckingObjectOutputStream should track the
original instance, before writeReplace()
* [WICKET-6242] - Weak concurrency management in
AuthenticatedWebSession#signedIn
* [WICKET-6244] - Palette does not list unselected options
* [WICKET-6245] - Open up CsrfPreventionRequestCycleListener for extension
* [WICKET-6249] - Invalid state of LoadableDetachableModel with
exception during load()
* [WICKET-6250] - FileUploadField does not deteach models and
fails to null th

[ANNOUNCE] Apache Wicket 7.5.0 Released

2016-10-26 Thread Martijn Dashorst
The Apache Wicket PMC is proud to announce Apache Wicket 7.5.0!

Apache Wicket is an open source Java component oriented web application
framework that powers thousands of web applications and web sites for
governments, stores, universities, cities, banks, email providers, and
more. You can find more about Apache Wicket at https://wicket.apache.org

This release marks another minor release of Wicket 7. We
use semantic versioning for the development of Wicket, and as such no
API breaks are present breaks are present in this release compared to
7.0.0.

Using this release
--

With Apache Maven update your dependency to (and don't forget to
update any other dependencies on Wicket projects to the same version):


org.apache.wicket
wicket-core
7.5.0


Or download and build the distribution yourself, or use our
convenience binary package

 * Source: http://www.apache.org/dyn/closer.cgi/wicket/7.5.0
 * Binary: http://www.apache.org/dyn/closer.cgi/wicket/7.5.0/binaries

Upgrading from earlier versions
---

If you upgrade from 7.y.z this release is a drop in replacement. If
you come from a version prior to 7.0.0, please read our Wicket 7
migration guide found at

 * http://s.apache.org/wicket7migrate

Have fun!

— The Wicket team




The signatures for the source release artefacts:


Signature for apache-wicket-7.5.0.zip:

-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iEYEABECAAYFAlgHyLgACgkQJBX8W/xy/UVtJQCfazMNKzMMG5y+GTnCNg0YloBB
IB0Amwdp/H6z78kXds8kTJNBXJAVlCVc
=yXrI
-END PGP SIGNATURE-

Signature for apache-wicket-7.5.0.tar.gz:

-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iEYEABECAAYFAlgHyLgACgkQJBX8W/xy/UUVtgCgx2kALIRDUGdXHjl1hQwOPhzW
NVYAn0VNdt96cd5VmIW7nIFSb0PidYbH
=ob3v
-END PGP SIGNATURE-



CHANGELOG for 7.5.0:

** Sub-task

* [WICKET-6243] - ResourceReferenceAutolink component resolved by
AutoLinkResolver ignores session locale changes

** Bug

* [WICKET-5972] - Datepicker "Close" text overlays 'x' icon.
* [WICKET-6136] - AutoCompleteTextField issue in Android 5.1.1
* [WICKET-6192] - Remove recreateBookmarkablePagesAfterExpiry
check in AbstractBookmarkableMapper#mapHandler
* [WICKET-6209] - requesting focus on disabled field fails with error in IE8
* [WICKET-6214] - ModalWindow broken on IE
* [WICKET-6215] - Test fail when non empty model is set to PasswordTextField
* [WICKET-6216] - Problem with queued components and border
* [WICKET-6217] - Enclosure broken within Border/Panel
* [WICKET-6219] - Fragment fails to report an error in development mode
* [WICKET-6221] - WicketTester - missing border path
* [WICKET-6222] - renderHead not called with anonymous inner Border class
* [WICKET-6225] - Button wrongly sets its model object as 'value' attribute
* [WICKET-6227] - CharSequenceResource calculates wrong length
when there are unicode symbols
* [WICKET-6230] - Infinite redirection when using
UrlPathPageParametersEncoder
* [WICKET-6231] - wicket:enclosure and getVariation().
* [WICKET-6232] - When sending binary data from server to client,
wicket-websocket-jquery.js throws error "message.indexOf is not a
function"
* [WICKET-6235] - TableTree#updateNode() fails if no corresponding
node is visible
* [WICKET-6236] - Files.remove() causes a 5 seconds delay instead
of 500ms as was intended
* [WICKET-6237] - PageRequestHandlerTracker doesn't work with
IRequestHandlerDelegate
* [WICKET-6238] - pub2 Wicket example isn't switching the beer images
* [WICKET-6241] - CheckingObjectOutputStream should track the
original instance, before writeReplace()
* [WICKET-6242] - Weak concurrency management in
AuthenticatedWebSession#signedIn
* [WICKET-6244] - Palette does not list unselected options
* [WICKET-6245] - Open up CsrfPreventionRequestCycleListener for extension
* [WICKET-6249] - Invalid state of LoadableDetachableModel with
exception during load()
* [WICKET-6250] - FileUploadField does not deteach models and
fails to null the reference to the transient fileUploads field if
forceCloseStreamsOnDetach is false
* [WICKET-6254] - Wicket WebSockets problem behind HTTP proxy
without servlet context

** Improvement

* [WICKET-5866] - Reconsider generics of IConverterLocator#getConverter()
* [WICKET-6206] - Allow to use custom anticache parameter value
for Image component
* [WICKET-6210] - FileUpload does not support files of zero size
* [WICKET-6211] - PasswordTextField should clear password by default
* [WICKET-6226] -  DOCTYPE URL in properties.xml example in wicket
documentation won't work.
* [WICKET-6229] - Introduce a new setting in ExceptionSettings to
control whether to throw exception or log a WARN when r

[ANNOUNCE] Apache Wicket 6.25.0 Released

2016-10-26 Thread Martijn Dashorst
The Apache Wicket PMC is proud to announce Apache Wicket 6.25.0!

Apache Wicket is an open source Java component oriented web application
framework that powers thousands of web applications and web sites for
governments, stores, universities, cities, banks, email providers, and
more. You can find more about Apache Wicket at https://wicket.apache.org

This release marks another minor release of Wicket 6. We
use semantic versioning for the development of Wicket, and as such no
API breaks are present breaks are present in this release compared to
6.0.0.

Using this release
--

With Apache Maven update your dependency to (and don't forget to
update any other dependencies on Wicket projects to the same version):


org.apache.wicket
wicket-core
6.25.0


Or download and build the distribution yourself, or use our
convenience binary package

 * Source: http://www.apache.org/dyn/closer.cgi/wicket/6.25.0
 * Binary: http://www.apache.org/dyn/closer.cgi/wicket/6.25.0/binaries

Upgrading from earlier versions
---

If you upgrade from 6.y.z this release is a drop in replacement. If
you come from a version prior to 6.0.0, please read our Wicket 6
migration guide found at

 * http://s.apache.org/wicket6migrate

Have fun!

— The Wicket team




The signatures for the source release artefacts:


Signature for apache-wicket-6.25.0.zip:

-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iEYEABECAAYFAlgH0UkACgkQJBX8W/xy/UXmgQCfUwVfCDkCU1ZNdFnf32HSeUs4
tFYAoJYkHA4eO4IvKeq8OIV19MBTNdvL
=qs0y
-END PGP SIGNATURE-

Signature for apache-wicket-6.25.0.tar.gz:

-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iEYEABECAAYFAlgH0UkACgkQJBX8W/xy/UXO/QCgs4t/TD3K7XQWmOi0Q0BHYUY4
o3MAoKiK1OWSjev2vG9T0xH9j7/QkQ48
=bH45
-END PGP SIGNATURE-



CHANGELOG for 6.25.0:

** Sub-task

* [WICKET-6218] - backport fix for WICKET-6172 to Wicket 6.x

** Bug

* [WICKET-5972] - Datepicker "Close" text overlays 'x' icon.
* [WICKET-6136] - AutoCompleteTextField issue in Android 5.1.1
* [WICKET-6209] - requesting focus on disabled field fails with error in IE8
* [WICKET-6214] - ModalWindow broken on IE
* [WICKET-6219] - Fragment fails to report an error in development mode
* [WICKET-6225] - Button wrongly sets its model object as 'value' attribute
* [WICKET-6227] - CharSequenceResource calculates wrong length
when there are unicode symbols
* [WICKET-6230] - Infinite redirection when using
UrlPathPageParametersEncoder
* [WICKET-6232] - When sending binary data from server to client,
wicket-websocket-jquery.js throws error "message.indexOf is not a
function"
* [WICKET-6235] - TableTree#updateNode() fails if no corresponding
node is visible
* [WICKET-6236] - Files.remove() causes a 5 seconds delay instead
of 500ms as was intended
* [WICKET-6237] - PageRequestHandlerTracker doesn't work with
IRequestHandlerDelegate
* [WICKET-6245] - Open up CsrfPreventionRequestCycleListener for extension
* [WICKET-6246] - WebSocket request while Ajax request leads to
error regarding HtmlHeaderCotnainer

** Improvement

* [WICKET-6206] - Allow to use custom anticache parameter value
for Image component
* [WICKET-6210] - FileUpload does not support files of zero size
* [WICKET-6226] -  DOCTYPE URL in properties.xml example in wicket
documentation won't work.
* [WICKET-6233] - Add component info in the error messages related
to WicketTester#assertComponentOnAjaxResponse()
* [WICKET-6234] - Log the decrypted url in CryptoMapper for
debugging purposes
* [WICKET-6239] - Use Response#addHeader() instead of #setContentLength()

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