Example usage for org.apache.wicket Page getDefaultModelObject

List of usage examples for org.apache.wicket Page getDefaultModelObject

Introduction

In this page you can find the example usage for org.apache.wicket Page getDefaultModelObject.

Prototype

public final Object getDefaultModelObject() 

Source Link

Document

Gets the backing model object.

Usage

From source file:org.efaps.esjp.ui.print.UserInterface_Base.java

License:Apache License

/**
 * Get the html for the columns field.//from  www  .j  a v a  2 s  .co  m
 *
 * @param _parameter Parameter as passed form the eFaps API
 * @return html snipplet
 * @throws EFapsException on error
 */
public Return getColumnsFieldValueUI(final Parameter _parameter) throws EFapsException {
    final Return ret = new Return();
    final StringBuilder html = new StringBuilder();
    html.append("<span id=\"eFapsColumns4Report\">");

    final IRequestHandler handler = RequestCycle.get().getRequestHandlerScheduledAfterCurrent();
    if (handler instanceof AjaxRequestHandler) {
        final Page page = ((AjaxRequestHandler) handler).getPage();
        final PageReference reference = page.getPageReference();
        Context.getThreadContext().setSessionAttribute(UserInterface_Base.UIOBJECT_CACHEKEY, reference);
        final AbstractUIPageObject uiObject = (AbstractUIPageObject) page.getDefaultModelObject();
        html.append(updateColumns(uiObject));
    }
    html.append("</span>");
    ret.put(ReturnValues.SNIPLETT, html.toString());
    return ret;
}