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);
}
}
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("&") && !tmpStr.endsWith("?")) {
buffer.append("&");
}
}
} 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;
}
}
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());
}
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());
}
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());
}
Aggregations