Search in sources :

Example 1 with DetailView

use of com.revolsys.ui.html.view.DetailView in project com.revolsys.open by revolsys.

the class HtmlUiBuilder method newDetailView.

public ElementContainer newDetailView(final Object object, final List<KeySerializer> serializers) {
    final KeySerializerDetailSerializer model = new KeySerializerDetailSerializer(serializers);
    model.setObject(object);
    final DetailView detailView = new DetailView(model, this.typeName);
    return new ElementContainer(detailView);
}
Also used : ElementContainer(com.revolsys.ui.html.view.ElementContainer) TabElementContainer(com.revolsys.ui.html.view.TabElementContainer) KeySerializerDetailSerializer(com.revolsys.ui.html.serializer.KeySerializerDetailSerializer) DetailView(com.revolsys.ui.html.view.DetailView)

Example 2 with DetailView

use of com.revolsys.ui.html.view.DetailView in project com.revolsys.open by revolsys.

the class DetailViewTag method doStartTag.

@Override
public int doStartTag() throws JspException {
    if (this.name != null) {
        try {
            final Object object = this.pageContext.findAttribute(this.name);
            if (object != null) {
                final Writer out = this.pageContext.getOut();
                Property.setSimple(this.model, "object", object);
                final DetailView view = new DetailView(this.model);
                view.serialize(out);
            }
        } catch (final Throwable t) {
            throw new JspException(t);
        }
    }
    return SKIP_BODY;
}
Also used : JspException(javax.servlet.jsp.JspException) DetailView(com.revolsys.ui.html.view.DetailView) Writer(java.io.Writer)

Aggregations

DetailView (com.revolsys.ui.html.view.DetailView)2 KeySerializerDetailSerializer (com.revolsys.ui.html.serializer.KeySerializerDetailSerializer)1 ElementContainer (com.revolsys.ui.html.view.ElementContainer)1 TabElementContainer (com.revolsys.ui.html.view.TabElementContainer)1 Writer (java.io.Writer)1 JspException (javax.servlet.jsp.JspException)1