All Downloads are FREE. Search and download functionalities are using the official Maven repository.

be.personify.iam.frontend.wicket.pages.common.ScreenUtils Maven / Gradle / Ivy

There is a newer version: 1.5.2.RELEASE
Show newest version
package be.personify.iam.frontend.wicket.pages.common;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxChannel;
import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
import org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel;

import be.personify.util.StringUtils;

public class ScreenUtils {
	 
	public static final String COMPONENT_ID_CONTENT = "content";
	
	public static AjaxLazyLoadPanel getLazyLoadPanel( String id, Component zz ) {
		AjaxLazyLoadPanel lazyLoadPanel = new AjaxLazyLoadPanel(id) {
            
         	private static final long serialVersionUID = -3987845073768036167L;

         	@Override
         	public Component getLazyLoadComponent(String id) {
         		return zz;
         	}
         	
         	@Override
         	public void updateAjaxAttributes(AjaxRequestAttributes attributes){
         		attributes.setChannel(new AjaxChannel(StringUtils.EMPTY_STRING + System.currentTimeMillis()));
         	}
         	

		};
		lazyLoadPanel.setOutputMarkupId(true);
		return lazyLoadPanel;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy