re-redner > re-render

On Sat, Jun 9, 2012 at 10:01 PM, Sebastien <[email protected]> wrote:

> Hi,
>
> It's to late to have
> searchResultPanel.setOutputMarkupId(true);
> in onSubmit()
>
> You need to set this before the first rendering, because ajax need it in
> order to know how to re-redner the panel.
>
> Regards,
> Sebastien.
>
>
> On Sat, Jun 9, 2012 at 9:56 PM, kshitiz <[email protected]> wrote:
>
>> Hi,
>>
>> I want to refresh a panel :
>>
>> *public SearchResultPanel(String id, SearchDomain searchDomain, final
>> WebMarkupContainer searchContainer) {
>> *                super(id);
>>
>>                List<UserDomain> userDomainList = new
>> ArrayList<UserDomain>();
>>                List<OrganizationDomain> organizationDomainList = new
>> ArrayList<OrganizationDomain>();
>>
>>                userDomainList = searchDomain.getUserDomainList();
>>
>>                organizationDomainList =
>> searchDomain.getOrganizationDomainList();
>>
>>                int numberOfUsers = searchDomain.getNumberOfUsers();
>>
>>                Label userLabel = new Label("userLabel", "List of Users");
>>                Label numberOfUserLabel = new Label("numberOfUserLabel",
>> new
>> Integer(
>>                                numberOfUsers).toString());
>>
>>                final PageableListView<UserDomain> userDomainListView = new
>> PageableListView<UserDomain>(
>>                                "user", userDomainList, resultsPerPage) {
>>                        private static final long serialVersionUID = 1L;
>>
>>                        @Override
>>                        protected void populateItem(final
>> ListItem<UserDomain> listItem) {
>>
>>                                listItem.add(userName);
>>                        }
>>
>>                };
>>
>>                add(userLabel);
>>                add(userDomainListView);
>>                add(numberOfUserLabel);
>>
>>                int numberOfOrganization =
>> searchDomain.getNumberOfOrganizations();
>>
>>                Label organizationLabel = new Label("organizationLabel",
>>                                "List of Organizations");
>>                Label numberOfOrganizationLabel = new Label(
>>                                "numberOfOrganizationLabel",
>>                                new
>> Integer(numberOfOrganization).toString());
>>
>>                final ListView<OrganizationDomain>
>> organizationDomainListView = new ListView<OrganizationDomain>(
>>                                "organization", organizationDomainList) {
>>                        private static final long serialVersionUID = 1L;
>>
>>                        @Override
>>                        protected void populateItem(
>>                                        final ListItem<OrganizationDomain>
>> listItem) {
>>
>>                        }
>>
>>                };
>>
>>                add(organizationLabel);
>>                add(organizationDomainListView);
>>                add(numberOfOrganizationLabel);
>>
>>                add(new AjaxPagingNavigator("navigator",
>>                                userDomainListView) {
>>
>>                        /**
>>                                 *
>>                                 */
>>                        private static final long serialVersionUID = 1L;
>>
>>                        @Override
>>                        protected void onAjaxEvent(AjaxRequestTarget
>> target)
>> {
>>                                target.addComponent(searchContainer);
>>                        }
>>                });
>>        }
>>
>> }
>>
>> I am refreshing it like this:
>>
>> AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton(
>>                                "searchButton", searchForm) {
>>                        @Override
>>                        public void onSubmit(AjaxRequestTarget target,
>> final Form<?> form) {
>>
>>                                if (target != null) {
>>
>>                                        try {
>>
>> searchResultPanel.setOutputMarkupId(true);
>>
>>  target.add(searchResultPanel);
>>                                        } catch (Exception exception) {
>>
>>  error(exception.getMessage());
>>                                                error = true;
>>                                        }
>>
>>                                }
>>                        }
>>
>>                };
>>
>>                searchForm.add(ajaxSearchButton);
>>
>>                searchContainer.add(searchForm);
>>                searchContainer.add(searchResultPanel);
>>                add(searchContainer);
>>
>>
>> *But panel is not getting refreshed..what can be the problem?? Is it
>> because
>> I am passing searchDomain in panel class and forming 2 views from that
>> object domain ??*
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

Reply via email to