Tapestry
  1. Tapestry
  2. TAPESTRY-1274

Document alternative form support implementation

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.5
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      JDK6, Ubuntu, Glassfish V1, tapestry 4.1.2 from SVN

      Description

      I have two forms on my page and both have a subcomponent. The subcomponent has a text input with specified tapestry ID.
      The output input HTML elements have the same id.

      Ids generated fine inside a form but it fails across them.

      A minimal source to demonstrate the problem (in the output there are 2 input tags with "text" id):

      My "container" template:
      <form jwcid="@Form"><div jwcid="@SubComponent"/></form>
      <form jwcid="@Form"><div jwcid="@SubComponent"/></form>

      The subcomponent template:
      <div>
      <input jwcid="text@TextField" value="ognl:text"/>
      <input jwcid="@Submit" value="Enter" action="listener:doSubmit"/>
      </div>

      The subcomponent source:
      @ComponentClass()
      public abstract class SubComponent extends BaseComponent {
      public String text;
      public void doSubmit()

      {System.out.println("text = " + text); }

      }

        Activity

        Hide
        Andreas Andreou added a comment -

        There's an alternative form support implementation for those cases.

        Use
        <implementation service-id="tapestry.form.FormSupportFactory">
        <create-instance class="org.apache.tapestry.form.MultipleFormSupportFactory"/>
        </implementation>

        I'll leave this open for a while until we document this - if you see any more issues, comment here directly.

        Show
        Andreas Andreou added a comment - There's an alternative form support implementation for those cases. Use <implementation service-id="tapestry.form.FormSupportFactory"> <create-instance class="org.apache.tapestry.form.MultipleFormSupportFactory"/> </implementation> I'll leave this open for a while until we document this - if you see any more issues, comment here directly.
        Hide
        Jesse Kuhnert added a comment -

        Should we really be making people do a special hivemind configuration for stuff like this? Ie - is it possible or is there some reason for this not to be the default?

        Show
        Jesse Kuhnert added a comment - Should we really be making people do a special hivemind configuration for stuff like this? Ie - is it possible or is there some reason for this not to be the default?
        Hide
        Andreas Andreou added a comment -

        Yea, we'll make it the default till the next release.
        I just need to finish working on its tests...

        The only thing against this, is that (perhaps) people would prefer smaller ids - but since they dont
        have to work directly with them (since Tap provides clientId) this shouldn't really affect them.

        Show
        Andreas Andreou added a comment - Yea, we'll make it the default till the next release. I just need to finish working on its tests... The only thing against this, is that (perhaps) people would prefer smaller ids - but since they dont have to work directly with them (since Tap provides clientId) this shouldn't really affect them.
        Hide
        Andreas Andreou added a comment -

        Jesse's recent checkins handle this transparently

        Show
        Andreas Andreou added a comment - Jesse's recent checkins handle this transparently

          People

          • Assignee:
            Andreas Andreou
            Reporter:
            József Börcsök
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development