Hi,

I find by myself the "meanings" of these methods:


1) doAssert(boolean cond)  throws FacesException

https://mojarra.dev.java.net/source/browse/mojarra/trunk/jsf-ri/src/com/sun/faces/util/Util.java?rev=2810&view=markup

private static boolean assertEnabled = true;

public static void doAssert(boolean cond) throws FacesException {
        if (assertEnabled && !cond) {
throw new FacesException(getExceptionMessageString(ASSERTION_FAILED_ID));
        }
    }


2) Util.getExceptionMessageString(Util.NULL_PARAMETERS_ERROR_MESSAGE_ID));

replaced by String: "attributeName name must not be null"

3)  // ValueBinding vb = Util.getValueBinding(_redirect);

replaced by:

ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(_redirect);


Kind regards,
Andreas



Andreas Niemeyer schrieb:
Hi,

I need to port some com.sun.faces.util.Util method calls to MyFaces equivalent methods.


The motivation is to implement an URLPermission tag for Liferay, based
on this article:

http://www.liferay.com/web/guest/community/forums?p_p_id=19&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_19_struts_action=%2Fmessage_boards%2Fview_message&_19_messageId=531055&_19_threadView=tree


There are two custom classes (PermissionsLinkRenderer, PermissionsLinkTag) which are using the Util class and following methods:

Util.getExceptionMessageString(Util.NULL_PARAMETERS_ERROR_MESSAGE_ID));
Util.doAssert(writer != null);
Util.getValueBinding(_redirect)


Does there equivalent methods exist?


Kind regards,
Andreas








Reply via email to