You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Mathias P.W Nilsson" <ma...@snyltarna.se> on 2008/04/01 03:28:50 UTC

Re: Variation for a page

Thanks! I'm using Fragment right now but I have some difficulties in
updateing the fragment.

I have 3 private classes in my Wicket page for each fragment.

	private final class ThumbnailFragment extends Fragment
	{
		private static final long serialVersionUID = 0L;

		public ThumbnailFragment( final String panel , final String id,
ListDataProvider provider )
		{
			super(panel, id, TDSSearch.this );
			
			
			final DataView view = new DataView( "view",  provider ) {
				private static final long serialVersionUID = 1L;

				public void populateItem( Item item) {
	                Sheet sheet = (Sheet) item.getModelObject();
					item.add( new Label( "documentid" , sheet.getDocumentId().toString()
));
					item.add( new Label( "name" , sheet.getIdentifier() ));
					
					item.add( new ListView("languages" ,
getCultureDao().getOrderableCultures( new Long( 2 ))){

						@Override
						protected void populateItem(ListItem item ) {
							CultureDTO culture = (CultureDTO) item.getModelObject();
							item.add( new Label( "language" , culture.getName() ));
						}
						
					});
					
	            }
				
				
	        };
	        view.setItemsPerPage(1);
	        add(view);
	        add(new PagingNavigator("navigator", view));
		}
	}


Every fragment has a PageNavigator. I would first like this navigator to be
in the page and not in the fragment. The second question is how do I switch
Fragment?
-- 
View this message in context: http://www.nabble.com/Variation-for-a-page-tp16396032p16404502.html
Sent from the Wicket - User 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