Search in sources :

Example 6 with ViewBean

use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.

the class DSAMEFormTag method setDefaultCommandChild.

public void setDefaultCommandChild(String name) {
    try {
        ViewBean vb = getParentViewBean();
        String value = (String) vb.getDisplayFieldValue(name);
        setValue("action", value);
    } catch (JspException ex) {
        setValue("action", name);
    }
}
Also used : JspException(javax.servlet.jsp.JspException) ViewBean(com.iplanet.jato.view.ViewBean)

Example 7 with ViewBean

use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.

the class DSAMEHrefTag method doStartTag.

/**
     * performs start tag
     *
     * @return EVAL_BODY_BUFFERED always
     * @throws JspException if request context is null
     */
public int doStartTag() throws JspException {
    reset();
    try {
        if (fireBeginDisplayEvent()) {
            ViewBean viewBean = getParentViewBean();
            AuthViewBeanBase dsameVB = (AuthViewBeanBase) viewBean;
            String value = (String) viewBean.getDisplayFieldValue(getName());
            /*if (debug.messageEnabled()) {
                 *  debug.message("URL value is : " + value);
                 *}
                 */
            buffer = new NonSyncStringBuffer("<a href=\"");
            String pgEncoding = (String) dsameVB.getDisplayFieldValue(AuthViewBeanBase.PAGE_ENCODING);
            int paramIdx = value.indexOf('?');
            if (paramIdx != -1) {
                buffer.append(value.substring(0, paramIdx + 1));
                String qStr = value.substring(paramIdx + 1);
                // parameter values followed by URL must be encoded
                if ((qStr != null) && qStr.length() != 0) {
                    encodeValues(buffer, pgEncoding, qStr);
                    String tmpStr = buffer.toString();
                    if (!tmpStr.endsWith("&amp;") && !tmpStr.endsWith("?")) {
                        buffer.append("&amp;");
                    }
                }
            } else {
                buffer.append(value);
                buffer.append('?');
            }
            if (getAnchor() != null) {
                buffer.append("#").append(getAnchor());
            }
            buffer.append(AuthViewBeanBase.PAGE_ENCODING).append('=').append(dsameVB.getDisplayFieldValue(AuthViewBeanBase.PAGE_ENCODING));
            // buffer.append ("&val="+getName()+"&val2="+value);
            // Append the Query String NVP's that might have been added
            // as JSP tag attributes
            appendQueryParams(buffer);
            buffer.append("\"");
            if (getTarget() != null) {
                buffer.append(" target=\"").append(getTarget()).append("\"");
            }
            if (getTitle() != null) {
                buffer.append(" title=\"").append(getTitle()).append("\"");
            }
            // Append the additional "standard" attributes
            appendCommonHtmlAttributes(buffer);
            appendJavaScriptAttributes(buffer);
            appendStyleAttributes(buffer);
            buffer.append(">");
            displayed = true;
        } else {
            displayed = false;
        }
    } catch (CompleteRequestException e) {
        // CompleteRequestException tunneling workaround:
        // Workaround to allow developers to stop the request
        // from a display event by throwing a CompleteRequestException.
        // The problem is that some containers catch this exception in
        // their JSP rendering subsystem, and so we need to tunnel it
        // through for the developer.
        // Save the exception here to rethrow later (in doEndTag)
        abortedException = e;
        return SKIP_BODY;
    }
    if (displayed) {
        return EVAL_BODY_BUFFERED;
    } else {
        return SKIP_BODY;
    }
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) NonSyncStringBuffer(com.iplanet.jato.util.NonSyncStringBuffer) AuthViewBeanBase(com.sun.identity.authentication.UI.AuthViewBeanBase) ViewBean(com.iplanet.jato.view.ViewBean)

Example 8 with ViewBean

use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.

the class AbstractEventHandlerSelectViewBean method handleButton1Request.

/**
     * Handles Next request.
     *
     * @param event Request invocation event
     */
@SuppressWarnings("unused")
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    String subSchema = (String) getDisplayFieldValue(RB_EVENT_HANDLER);
    setPageSessionAttribute(AUDIT_HANDLER_TYPE, subSchema);
    ViewBean vb = getAddViewBean();
    unlockPageTrailForSwapping();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : ViewBean(com.iplanet.jato.view.ViewBean) AMPrimaryMastHeadViewBean(com.sun.identity.console.base.AMPrimaryMastHeadViewBean) AMPostViewBean(com.sun.identity.console.base.AMPostViewBean)

Example 9 with ViewBean

use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.

the class RealmAuditConfigViewBean method handleButton3Request.

@Override
public void handleButton3Request(RequestInvocationEvent event) {
    backTrail();
    ViewBean vb = getViewBean(ServicesViewBean.class);
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : ViewBean(com.iplanet.jato.view.ViewBean) ServicesViewBean(com.sun.identity.console.realm.ServicesViewBean)

Example 10 with ViewBean

use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.

the class AbstractAuditViewBean method handleTblSubConfigButtonAddRequest.

/**
     * Called on request from the UI to add a new event handler.
     *
     * @param event Request Invocation Event.
     */
@SuppressWarnings("unused")
public void handleTblSubConfigButtonAddRequest(RequestInvocationEvent event) {
    ViewBean vb = getSelectViewBean();
    setPageSessionAttribute(PG_SESSION_PROFILE_VIEWBEANS, (Serializable) singletonList(viewBeanPath));
    unlockPageTrail();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : ViewBean(com.iplanet.jato.view.ViewBean)

Aggregations

ViewBean (com.iplanet.jato.view.ViewBean)21 CompleteRequestException (com.iplanet.jato.CompleteRequestException)7 ViewBeanManager (com.iplanet.jato.ViewBeanManager)6 AuthViewBeanBase (com.sun.identity.authentication.UI.AuthViewBeanBase)3 NonSyncStringBuffer (com.iplanet.jato.util.NonSyncStringBuffer)2 ContainerView (com.iplanet.jato.view.ContainerView)2 View (com.iplanet.jato.view.View)2 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)2 Iterator (java.util.Iterator)2 AMPostViewBean (com.sun.identity.console.base.AMPostViewBean)1 AMPrimaryMastHeadViewBean (com.sun.identity.console.base.AMPrimaryMastHeadViewBean)1 ServicesViewBean (com.sun.identity.console.realm.ServicesViewBean)1 CCMapList (com.sun.identity.console.ui.view.CCMapList)1 CCOrderedList (com.sun.identity.console.ui.view.CCOrderedList)1 CCUnOrderedList (com.sun.identity.console.ui.view.CCUnOrderedList)1 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)1 CCEditableList (com.sun.web.ui.view.editablelist.CCEditableList)1 CCRadioButton (com.sun.web.ui.view.html.CCRadioButton)1 CCActionTable (com.sun.web.ui.view.table.CCActionTable)1 HashMap (java.util.HashMap)1