我无法在h:selectOneMenu
不验证其他输入的情况下立即提交.这是代码:
<h:selectOneMenu value="#{a.avalue}" onchange="submit()" immediate="true">
<f:selectItems value="#{b.bvalue}" var="k" itemLabel="#{k.asdad}"
itemValue="#{k.asdad}"/>
</h:selectOneMenu>
<h:inputText id="sada" value="#{c.cvalue}" required="true"
requiredMessage="*asdadadadasd"
validatorMessage="*asdsadadadadad">
<f:validateLength maximum="80"/>
</h:inputText>
Run Code Online (Sandbox Code Playgroud)
当我更改菜单值时,其他输入的验证器仍然会激活.我怎么能否认呢?
<ui:define name="description" rendered="false">
<meta name="description" content="do not render" />
</ui:define>
Run Code Online (Sandbox Code Playgroud)
我在我的xhtml页面中使用此代码,当我运行应用程序时,元描述仍在渲染.我想根据某些条件使用元描述标签.主布局:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<ui:insert name="description" />
</h:head>
...........
</html>
Run Code Online (Sandbox Code Playgroud)
网页:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
template="/templates/masterLayout.xhtml">
<ui:define name="description" rendered="false">
<meta name="description" content="do not render" />
</ui:define>
...........
</ui:composition>
Run Code Online (Sandbox Code Playgroud) 我在那里读过,但我不能从primefaces datatable cellEditor获取编辑值,它给了我未经编辑的值.我正在使用jpa.xhtml页面:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
template="/templates/masterLayout.xhtml">
<ui:define name="windowTitle">
learn
</ui:define>
<ui:define name="content">
<h:form>
<p:dataTable value="#{lesson.lessonValue}" var="l" style="width: 400px">
<p:ajax event="rowEdit" listener="#{lesson.onEditRow}"/>
<p:column headerText="Lessons" style="width: 300px">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{l.lessonName}"/>
</f:facet>
<f:facet name="input">
<p:inputText value="#{l.lessonName}" style="width: 100%"/>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Options">
<p:rowEditor />
</p:column>
</p:dataTable>
</h:form>
</ui:define>
</ui:composition>
Run Code Online (Sandbox Code Playgroud)
lesson.java:
public class lesson implements Serializable {
private String name;
protected EntityLesson[] lessonList;
public String getName() { return name; } …
Run Code Online (Sandbox Code Playgroud)