myfaces.JSF_JS_MODE 'minimal-modern' 未定义 submitForm()
submitForm() not defined for myfaces.JSF_JS_MODE 'minimal-modern'
我尝试使用 MyFaces 2.2.8 设置一个简单的 JSF 2.2 应用程序。
由于 MyFaces 有一些我以前从未使用过的上下文参数,因此我尝试熟悉这些参数。
所以我第一次使用 org.apache.myfaces.JSF_JS_MODE
并且 运行 遇到了 h:commandLink
的问题。
如果我将模式设置为 minimal-modern
,则 commandLink 正在尝试调用未定义的 myfaces.oam.submitForm()
。
如果我将模式设置为 minimal
或 normal
它会起作用。
通过阅读一些互联网文章,我认为这是一个错误,因为 submitForm 既不是 jsf-legacy.js 的一部分,也不是 jsf-i18n.js 或 jsf-experimental.js 的一部分,而且显然是需要的通过 h:commandLink
。
org.apache.myfaces.shared.renderkit.html.util.ResourceUtils.markScriptAsRendered(FacesContext, String, String)
的源代码注释也告诉我
oamSubmit script is included inside jsf.js
此处:
public static void markScriptAsRendered(FacesContext facesContext, String libraryName, String resourceName)
{
getRenderedScriptResources(facesContext).put(
libraryName != null ? libraryName+'/'+resourceName : resourceName, Boolean.TRUE);
if (JAVAX_FACES_LIBRARY_NAME.equals(libraryName) &&
JSF_JS_RESOURCE_NAME.equals(resourceName))
{
// If we are calling this method, it is expected myfaces core is being used as runtime and note
// oamSubmit script is included inside jsf.js, so mark this one too.
getRenderedScriptResources(facesContext).put(
MYFACES_LIBRARY_NAME+'/'+MYFACES_JS_RESOURCE_NAME, Boolean.TRUE);
}
}
我在这里错过了什么?提前致谢!
我可以确认这是一个错误。已在 MYFACES-4034 中解决 2.2.10
我尝试使用 MyFaces 2.2.8 设置一个简单的 JSF 2.2 应用程序。 由于 MyFaces 有一些我以前从未使用过的上下文参数,因此我尝试熟悉这些参数。
所以我第一次使用 org.apache.myfaces.JSF_JS_MODE
并且 运行 遇到了 h:commandLink
的问题。
如果我将模式设置为 minimal-modern
,则 commandLink 正在尝试调用未定义的 myfaces.oam.submitForm()
。
如果我将模式设置为 minimal
或 normal
它会起作用。
通过阅读一些互联网文章,我认为这是一个错误,因为 submitForm 既不是 jsf-legacy.js 的一部分,也不是 jsf-i18n.js 或 jsf-experimental.js 的一部分,而且显然是需要的通过 h:commandLink
。
org.apache.myfaces.shared.renderkit.html.util.ResourceUtils.markScriptAsRendered(FacesContext, String, String)
的源代码注释也告诉我
oamSubmit script is included inside jsf.js
此处:
public static void markScriptAsRendered(FacesContext facesContext, String libraryName, String resourceName)
{
getRenderedScriptResources(facesContext).put(
libraryName != null ? libraryName+'/'+resourceName : resourceName, Boolean.TRUE);
if (JAVAX_FACES_LIBRARY_NAME.equals(libraryName) &&
JSF_JS_RESOURCE_NAME.equals(resourceName))
{
// If we are calling this method, it is expected myfaces core is being used as runtime and note
// oamSubmit script is included inside jsf.js, so mark this one too.
getRenderedScriptResources(facesContext).put(
MYFACES_LIBRARY_NAME+'/'+MYFACES_JS_RESOURCE_NAME, Boolean.TRUE);
}
}
我在这里错过了什么?提前致谢!
我可以确认这是一个错误。已在 MYFACES-4034 中解决 2.2.10