use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.
the class PWResetServlet method onRequestHandlerNotFound.
/**
* Forwards to invalid URL view bean, in case of an invalid target
* request handler (page).
*
* @param requestContext request context
* @param handlerName name of handler
* @throws ServletException
*/
protected void onRequestHandlerNotFound(RequestContext requestContext, String handlerName) throws ServletException {
ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
ViewBean targetView = viewBeanManager.getViewBean(PWResetInvalidURLViewBean.class);
targetView.forwardTo(requestContext);
throw new CompleteRequestException();
}
use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.
the class AMPropertySheet method restoreStateData.
/**
* Automates the restoring of store data in some children. This is required
* for some special children such as <code>CCAddRemvoe</code>.
*
* @throws ModelControlException if cannot get model of property sheet.
*/
public void restoreStateData(Collection participatingChildren) throws ModelControlException {
ViewBean parent = getParentViewBean();
String[] names = parent == null ? null : parent.getChildNames();
if ((names != null) && (names.length > 0)) {
for (int i = 0; i < names.length; i++) {
String name = names[i];
if (participatingChildren.contains(name)) {
View child = parent.getChild(name);
if (CCAddRemove.class.isInstance(child)) {
((CCAddRemove) child).restoreStateData();
} else if (CCUnOrderedList.class.isInstance(child)) {
((CCUnOrderedList) child).restoreStateData();
} else if (CCMapList.class.isInstance(child)) {
((CCMapList) child).restoreStateData();
} else if (CCEditableList.class.isInstance(child)) {
((CCEditableList) child).restoreStateData();
} else if (CCOrderedList.class.isInstance(child)) {
((CCOrderedList) child).restoreStateData();
} else if (CCActionTable.class.isInstance(child)) {
((CCActionTable) child).restoreStateData();
}
}
}
}
}
use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.
the class DSAMEResBundleTag method doStartTag.
/**
* performs start tag
*
* @return EVAL_BODY_INCLUDE always
* @throws JspException if request context is null
*/
public int doStartTag() throws JspException {
reset();
ViewBean vb = getParentViewBean();
java.util.Locale locale;
if (vb instanceof AuthViewBeanBase) {
AuthViewBeanBase ab = (AuthViewBeanBase) vb;
locale = ab.getRequestLocale();
} else {
locale = java.util.Locale.getDefault();
}
String rbName = (String) getValue("BundleName");
String resKey = (String) getValue("ResourceKey");
String resValue;
ResourceBundle rb = AMResourceBundleCache.getInstance().getResBundle(rbName, locale);
try {
resValue = rb.getString(resKey);
} catch (MissingResourceException ex) {
resValue = resKey;
}
writeOutput(resValue);
return SKIP_BODY;
}
use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.
the class DSAMEFormTag method doEndTag.
public int doEndTag() throws JspException {
ViewBean vb = getParentViewBean();
NonSyncStringBuffer buffer = new NonSyncStringBuffer();
buffer.append("<input type=\"hidden\" name=\"");
buffer.append(AuthViewBeanBase.PAGE_ENCODING).append("\" value=\"").append(vb.getDisplayFieldValue("gx_charset")).append("\"/>").append("</form>");
writeOutput(buffer);
return EVAL_PAGE;
}
use of com.iplanet.jato.view.ViewBean in project OpenAM by OpenRock.
the class DSAMEFormTag method setTilePrefix.
public void setTilePrefix(String name) throws JspException {
ViewBean vb = getParentViewBean();
if (vb instanceof AuthViewBeanBase) {
AuthViewBeanBase ab = (AuthViewBeanBase) vb;
setValue("name", name + ab.getTileIndex());
} else {
setValue("name", name);
}
}
Aggregations