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

com.talk2object.plum.interaction.viewbuilder.SelfViewBuilder Maven / Gradle / Ivy

package com.talk2object.plum.interaction.viewbuilder;

import com.talk2object.plum.interaction.viewgeneneration.AbstractViewBuilder;
import com.talk2object.plum.interaction.viewgeneneration.ViewBuildContext;
import com.talk2object.plum.interaction.viewgeneneration.ViewContextNotMatchException;
import com.talk2object.plum.interaction.viewgeneneration.Visible;
import com.talk2object.plum.view._abstract.window.UIComponent;

public class SelfViewBuilder extends AbstractViewBuilder {

	@Override
	public UIComponent build(Object model, String viewClass, ViewBuildContext context,
			UIComponent parentView) {

		Visible visible = (Visible) model;
		try {
			return visible.toView(viewClass, context, parentView);
		} catch (ViewContextNotMatchException e) {
			return super.build(model, viewClass, context, parentView);
		}

	}

	@Override
	public Class getModelClass() {

		return null;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy