gpt4 book ai didi

javascript - jquery tokeninput 不在 h :inputtext while editing 上显示数据

转载 作者:行者123 更新时间:2023-11-30 06:01:29 27 4
gpt4 key购买 nike

我使用 seam 框架,我想集成 tokeninput autocomplete plugin在我的项目中。

我成功地进行了集成并且数据保存在数据库中,但是问题是当我在验证时提交表单时数据从 h:inputtext 丢失,在编辑输入时也是如此文本为空。

<ui:define name="head">
<head>
<script type="text/javascript" src="js/jquery/jquery.tokeninput.js"></script>

<link rel="stylesheet" type="text/css" href="js/jquery/token-input.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="js/jquery/token-input-mac.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="js/jquery/token-input-facebook.css" media="screen"/>

<script>
$(document).ready(function() {
$("div.permiss input").tokenInput("http://shell.loopj.com/tokeninput/tvshows.php", {
theme: "facebook",
});
});
</script>
</head>
</ui:define>

<ui:define name="body">
<body>
<h:form id="permission" styleClass="edit">
<rich:panel>
<f:facet name="header">#{permissionHome.managed ? 'Edit' : 'Add'} Permission</f:facet>
<s:decorate id="nomPermissionField" template="layout/edit.xhtml">
<ui:define name="label">Nom permission</ui:define>
<div class="permiss">
<h:inputText id="nomPermission" required="true" value="#{permissionHome.instance.nom}"/>
</div>
</s:decorate>

<s:decorate id="targetPermissionField" template="layout/edit.xhtml">
<ui:define name="label">Target permission</ui:define>
<div class="voici1" >
<h:inputText id="targetPermission" cols="80" rows="10" required="true" value="#{permissionHome.instance.target}"/>
</div>
</s:decorate>

<s:decorate id="DiscriminatorPermissionField" template="layout/edit.xhtml">
<ui:define name="label">Discriminator permission</ui:define>
<h:selectOneMenu id="selectdisc" value="#{permissionHome.instance.discriminator}" required="true">
<f:selectItem id="si0" itemLabel=" " itemValue=" "/>
<f:selectItem id="si1" itemLabel="role" itemValue="role"/>
<f:selectItem id="si2" itemLabel="user" itemValue="user" />
</h:selectOneMenu>
</s:decorate>

<div style="clear:both">
<span class="required">*</span>
required fields
</div>
</rich:panel>

<div class="actionButtons">
<h:commandButton id="save" value="Savee" action="#{permissionHome.persist}"
oncomplete="javascript:window.parent.location.reload(true);"
disabled="#{!permissionHome.wired}"
rendered="#{!permissionHome.managed}"/>

<h:commandButton id="update" value="Save" action="#{permissionHome.update}" rendered="#{permissionHome.managed}"/>
<h:commandButton id="delete" value="Delete" action="#{permissionHome.remove}" immediate="true" rendered="#{permissionHome.managed}"/>

<s:button id="cancelEdit" value="Cancel" propagation="end" view="/Permission.xhtml" rendered="#{permissionHome.managed}"/>

<s:button id="cancelAdd" value="Cancel" propagation="end" view="/#{empty permissionFrom ? 'PermissionList' : permissionFrom}.xhtml" rendered="#{!permissionHome.managed}"/>
</div>
</h:form>
</body>
</ui:define>

最佳答案

也许从下一行中删除逗号?

主题:“ Facebook ”,

关于javascript - jquery tokeninput 不在 h :inputtext while editing 上显示数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8212871/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com