You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Adriaan Joubert (Jira)" <ji...@apache.org> on 2020/03/24 11:29:00 UTC

[jira] [Created] (TAP5-2622) Update of a zone inside a form element

Adriaan Joubert created TAP5-2622:
-------------------------------------

             Summary: Update of a zone inside a form element
                 Key: TAP5-2622
                 URL: https://issues.apache.org/jira/browse/TAP5-2622
             Project: Tapestry 5
          Issue Type: Bug
    Affects Versions: 5.4.5, 5.5.0
            Reporter: Adriaan Joubert


Hi,

we've encountered the following problem:

 
*1)  Updating a zone that contains a textfield/dropdown/checkbox* 
*java*
    @Property
    private String textfieldValue_;

    @Inject
    private AjaxResponseRenderer ajaxRenderer_;

    @InjectComponent
    private Zone testZone_;

    void onTestLink() {
        ajaxRenderer_.addRender(testZone_.getClientId(), testZone_.getBody());
    }
 
*tml*
 
    <t:eventlink event="testLink" async="true">Test</t:eventlink>
    <t:form>
        <t:zone t:id="testZone" id="testZone">
            <t:textfield value="textfieldValue"/>
        </t:zone>    
    </t:form>
 
*error when you click on the link:*
 
Caused by: java.lang.RuntimeException: Component ******.textfield must be enclosed by a Form component.
    at org.apache.tapestry5.corelib.base.AbstractField.setup(AbstractField.java:192)
    at org.apache.tapestry5.corelib.base.AbstractField.setupRender(AbstractField.java)
    at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
    at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
    ... 110 more
 
*2) Updating a zone that contains a button*
*java*
    @Inject
    private AjaxResponseRenderer ajaxRenderer_;

    @InjectComponent
    private Zone testZone_;

    void onTestLink() {
        ajaxRenderer_.addRender(testZone_.getClientId(), testZone_.getBody());
    }
 
*tml*
    <t:eventlink event="testLink" async="true">Test</t:eventlink>
    <t:form>
        <t:zone t:id="testZone" id="testZone">
            <t:submit/>
        </t:zone>    
    </t:form>



*error when you click on the link:*
Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: No object of type org.apache.tapestry5.services.FormSupport is available from the Environment.
    at org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:96)
    at $Environment_a20d0056aee.peekRequired(Unknown Source)
    at $Environment_a20d00556d4.peekRequired(Unknown Source)
    at org.apache.tapestry5.internal.transform.EnvironmentalWorker$EnvironmentalConduit.get(EnvironmentalWorker.java:59)
    at org.apache.tapestry5.corelib.components.Submit.conduit_get_formSupport(Submit.java)
    at org.apache.tapestry5.corelib.components.Submit.beginRender(Submit.java:155)
    at org.apache.tapestry5.corelib.components.Submit.beginRender(Submit.java)
    at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
    at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
 
 Thanks,
 
Adriaan
 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Re: [jira] [Created] (TAP5-2622) Update of a zone inside a form element

Posted by Andreas Ernst <ae...@ae-online.de>.
Am 24.03.20 um 12:29 schrieb Adriaan Joubert (Jira):
> Adriaan Joubert created TAP5-2622:
> -------------------------------------
> 
>               Summary: Update of a zone inside a form element
>                   Key: TAP5-2622
>                   URL: https://issues.apache.org/jira/browse/TAP5-2622
>               Project: Tapestry 5
>            Issue Type: Bug
>      Affects Versions: 5.4.5, 5.5.0
>              Reporter: Adriaan Joubert
> 
> 
> Hi,
> 
> we've encountered the following problem:
> 
>   
> *1)  Updating a zone that contains a textfield/dropdown/checkbox*
> *java*
>      @Property
>      private String textfieldValue_;
> 
>      @Inject
>      private AjaxResponseRenderer ajaxRenderer_;
> 
>      @InjectComponent
>      private Zone testZone_;
> 
>      void onTestLink() {
>          ajaxRenderer_.addRender(testZone_.getClientId(), testZone_.getBody());
>      }
>   
> *tml*
>   
>      <t:eventlink event="testLink" async="true">Test</t:eventlink>
>      <t:form>
>          <t:zone t:id="testZone" id="testZone">

Maybe the issue is, that you have 2x id="" (one with t).

-- 
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
ae@ae-online.de | www.ae-online.de
www.tachyon-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org