You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by javax <ja...@gmail.com> on 2010/11/22 09:05:18 UTC

Example of Ajax DataView update

Hi!
Can you show me an example of Ajax update of a paging table (I use DataView
for it)?

Thank you!
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-Ajax-DataView-update-tp3053204p3053204.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: SV: Example of Ajax DataView update

Posted by javax <ja...@gmail.com>.
I added a container, but no update happens.
What I'm doing wrong?

I have a container and a DataView, which is binded to a
SortableDataProvider.
When AjaxButton is pressed I take a value from my text field, change the
internal state of the provider and add to a target DataView's container

AjaxButton show = new AjaxButton("Show") {

			@Override
			protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
				String selected = field.getModelObject();
				if (selected!=null) {
					provider.setPersonString(selected);
				}
				target.addComponent(container);
			}
		};

However, the view remains empty. It looks like I should say him that his
provider changed and it should refresh.

How I do this?
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-Ajax-DataView-update-tp3053204p3053427.html
Sent from the Users forum mailing list archive at Nabble.com.

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


SV: Example of Ajax DataView update

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> Which container can I use to put DataView inside?

A WebMarkupContainer tied to a <div> surrounding it is the easiest.

- Tor Iver

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


Re: Example of Ajax DataView update

Posted by javax <ja...@gmail.com>.
I have exception

java.lang.IllegalArgumentException: Component
org.haploblock.components.ImportsDataView has been added to the target. This
component is a repeater and cannot be repainted via ajax directly. Instead
add its parent or another markup container higher in the hierarchy.


Which container can I use to put DataView inside?

Thank you
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-Ajax-DataView-update-tp3053204p3053395.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Example of Ajax DataView update

Posted by javax <ja...@gmail.com>.
Thank you!
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-Ajax-DataView-update-tp3053204p3053237.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Example of Ajax DataView update

Posted by alex shubert <al...@gmail.com>.
final DefaultDataTable<Group> view;

        AjaxButton deleteSelected = new AjaxButton("delete-selected") {
            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
....
target.addComponent(view);
}


On 22 November 2010 11:05, javax <ja...@gmail.com> wrote:
>
> Hi!
> Can you show me an example of Ajax update of a paging table (I use DataView
> for it)?
>
> Thank you!
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Example-of-Ajax-DataView-update-tp3053204p3053204.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
--
Best regards
Alex

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