You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Sven Homburg (JIRA)" <ji...@apache.org> on 2014/05/19 14:55:38 UTC

[jira] [Commented] (TAP5-2274) AjaxFormLoop dont work well inside a table tag

    [ https://issues.apache.org/jira/browse/TAP5-2274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14001655#comment-14001655 ] 

Sven Homburg commented on TAP5-2274:
------------------------------------

testing with TAP54-6beta

here the page class
{code:title=Test.java|borderStyle=solid}
public class Test
{
	@Property
	private List<String> phoneList;

	@Property
	private String phoneNumber;
}
{code}

... and here the page template
{code:title=Test.tml|borderStyle=solid}
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd" xmlns="http://www.w3.org/1999/xhtml">
<body>
        <form t:type="form" class="form-horizontal" role="form">
            <table>
                <thead>
                <tr>
                    <th>Phone</th>
                </tr>
                </thead>
                <tbody>
                <tr t:type="AjaxFormLoop" source="phoneList" value="phoneNumber">
                    <td><input t:type="TextField" value="phoneNumber"/></td>
                </tr>
                </tbody>
            </table>
            <input t:type="submit" type="submit"/>
        </form>
</body>
</html>
{code}


> AjaxFormLoop dont work well inside a table tag
> ----------------------------------------------
>
>                 Key: TAP5-2274
>                 URL: https://issues.apache.org/jira/browse/TAP5-2274
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Sven Homburg
>
> if i use AjaxFormLoop inside a table tag, like this:
>     <t:form>
>         <table>
>             <thead>
>             <tr>
>                 <th>Name 1</th>
>                 <th>Name 2</th>
>             </tr>
>             </thead>
>             <tbody>
>             <tr t:type="AjaxFormLoop" source="personHolderList" encoder="personHolderEncoder" value="personHolder">
>                 <td><input t:type="TextField" value="personHolder.person.name1"/></td>
>                 <td><input t:type="TextField" value="personHolder.person.name2"/></td>
>             </tr>
>             </tbody>
>         </table>
>     </t:form>
> there is no javascript error thrown.
> here the code rendered by tapestry:
> <form data-validate="submit" action="/tap54test/start.form" method="post" id="form">
>     <input value="cYCR+e8VnfSZyMMIKGcs2cKU1F0=:H4sIAAAAAAAAAFvzloEVAN3OqfcEAAAA" name="t:formdata" type="hidden">
>     <div data-inject-row-url="/tap54test/start.ajaxformloop:injectrow?t:formcomponentid=Start:form&amp;t:formid=form" data-remove-row-url="/tap54test/start.ajaxformloop:triggerremoverow" data-container-type="core/AjaxFormLoop">
>         
>     </div>
>     <a class="btn btn-default btn-sm" data-afl-trigger="add" href="#">
>         <span class="glyphicon glyphicon-plus-sign"></span>Add row
>     </a>
>     <table>
>         <thead>
>         <tr>
>             <th>Name 1</th>
>             <th>Name 2</th>
>             <th>Birthday</th>
>         </tr>
>         </thead>
>         <tbody>
>         <tr data-afl-behavior="insert-before" data-container-type="core/ajaxformloop-fragment"></tr>
>         </tbody>
>     </table>
> </form>



--
This message was sent by Atlassian JIRA
(v6.2#6252)