List of usage examples for org.apache.wicket.ajax.markup.html.navigation.paging AjaxPagingNavigator setOutputMarkupId
public final Component setOutputMarkupId(final boolean output)
From source file:au.org.theark.lims.web.component.biocollectioncustomdata.BioCollectionCustomDataEditorPanel.java
License:Open Source License
public BioCollectionCustomDataEditorPanel initialisePanel() { dataViewPanel = new BioCollectionCustomDataDataViewPanel("dataViewPanel", cpModel).initialisePanel( iArkCommonService.getUserConfig(au.org.theark.core.Constants.CONFIG_ROWS_PER_PAGE).getIntValue()); customDataEditorForm = new CustomDataEditorForm("customDataEditorForm", cpModel, feedbackPanel) .initialiseForm();//from w w w . j a v a 2 s. co m AjaxPagingNavigator pageNavigator = new AjaxPagingNavigator("navigator", dataViewPanel.getDataView()) { @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.add(customDataEditorForm.getDataViewWMC()); target.add(this); } }; pageNavigator.setOutputMarkupId(true); customDataEditorForm.getDataViewWMC().add(dataViewPanel); this.add(customDataEditorForm); this.add(pageNavigator); return this; }
From source file:au.org.theark.lims.web.component.biospecimencustomdata.BiospecimenCustomDataEditorPanel.java
License:Open Source License
public BiospecimenCustomDataEditorPanel initialisePanel() { dataViewPanel = new BiospecimenCustomDataDataViewPanel("dataViewPanel", cpModel).initialisePanel( iArkCommonService.getUserConfig(au.org.theark.core.Constants.CONFIG_ROWS_PER_PAGE).getIntValue()); customDataEditorForm = new CustomDataEditorForm("customDataEditorForm", cpModel, feedbackPanel) .initialiseForm();/*from w ww . j a v a 2 s . c om*/ AjaxPagingNavigator pageNavigator = new AjaxPagingNavigator("navigator", dataViewPanel.getDataView()) { @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.add(customDataEditorForm.getDataViewWMC()); target.add(this); } }; pageNavigator.setOutputMarkupId(true); customDataEditorForm.getDataViewWMC().add(dataViewPanel); this.add(customDataEditorForm); this.add(pageNavigator); return this; }
From source file:au.org.theark.study.web.component.manageuser.UserContainerPanel.java
License:Open Source License
@Override protected WebMarkupContainer initialiseSearchResults() { SearchResultListPanel searchResultListPanel = new SearchResultListPanel("searchResults", arkCrudContainerVO, containerForm, feedBackPanel); iModel = new LoadableDetachableModel<Object>() { private static final long serialVersionUID = 1L; @Override//w w w .j a va 2 s. c o m protected Object load() { List<ArkUserVO> userResultList = new ArrayList<ArkUserVO>(); try { Long sessionStudyId = (Long) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.STUDY_CONTEXT_ID); String sessionUserName = (String) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.ARK_USERID); if (isActionPermitted()) { if (sessionStudyId != null && sessionStudyId > 0) { // Search Users must list all the users from ArkUser Group and will include all users across studies. userResultList = iUserService.searchUser(containerForm.getModelObject()); //*************Added on 2015-12-10 to stop showing all the ldap users we have to filtered them *************** // by the study. ArkUser arkUser = null; try { arkUser = iArkCommonService.getArkUser(sessionUserName); } catch (EntityNotFoundException e1) { e1.printStackTrace(); } List<ArkUser> arkUserList = iArkCommonService.getArkUserListByStudy(arkUser, iArkCommonService.getStudy(sessionStudyId)); userResultListFilterd = filterOnlyStudySpecificUsers(userResultList, arkUserList); //*************** End of work on 2015-12-10 ******************************************************** containerForm.getModelObject().setUserList(userResultListFilterd); } pageableListView.removeAll(); } } catch (ArkSystemException e) { feedBackPanel.error("A System Error has occured. Please contact support."); } return userResultListFilterd; } }; pageableListView = searchResultListPanel.buildPageableListView(iModel, arkCrudContainerVO.getSearchResultPanelContainer()); pageableListView.setReuseItems(true); AjaxPagingNavigator pageNavigator = new AjaxPagingNavigator("navigator", pageableListView); pageNavigator.setOutputMarkupId(true); searchResultListPanel.setOutputMarkupId(true); searchResultListPanel.add(pageNavigator); searchResultListPanel.add(pageableListView); arkCrudContainerVO.getSearchResultPanelContainer().add(searchResultListPanel); return arkCrudContainerVO.getSearchResultPanelContainer(); }