问题是,在我删除重复添加按钮中唯一剩下的行后,没有longers工作。
用额外的东西填充我的帖子以便接受问题
<html xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Movie Review Selector</title>
<model xmlns="http://www.w3.org/2002/xforms">
<instance id="movies">
<movies xmlns="">
<movie id=""></movie>
</movies>
</instance>
<submission id="save" action="echo.xq" method="post" includenamespaceprefixes="" serialization="application/xml" ref="instance('movies')"/>
</submission>
</model>
</head>
<body>
<group xmlns="http://www.w3.org/2002/xforms" ref="instance('movies')">
<repeat nodeset="movie" id="idx">
<input ref="@id">
<label>Movie Id</label>
</input>
<trigger>
<label>Delete</label>
<delete nodeset="." ev:event="DOMActivate"></delete>
</trigger>
</repeat>
<trigger>
<label>Add</label>
<action ev:event="DOMActivate">
<insert nodeset="movie"></insert>
<setvalue ref="movie[last()]/@id" value=""></setvalue>
</action>
</trigger>
<submit submission="save">
<label>Submit</label>
</submit>
</group>
</body>
</html>
答案 0 :(得分:1)
您有两种选择:
HTH!