You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2012/08/27 18:56:36 UTC

Rendering form submit button inside ProgressiveDisplay component exception

Hello, I have a list of tapestry submit buttons I'm trying to load inside my
progressive display component, however I'm getting the following exception. 

Render queue error in BeginRender[Purchase_Request:submit]: No object of
type org.apache.tapestry5.services.FormSupport is available from the
Environment.

Is this a component limitation?

code 

    <t:ProgressiveDisplay t:id="showActionButtons" update="show"/>

    <t:Block t:id="actionButtons">
        <t:If test="actionManager.actions">
            <div class="subnav">
                <ul class="nav nav-pills">
                    <t:Loop source="actionManager.actions" value="workflow">
                        ${workflow.applicationAction.name}
                        <li class="active">
                                <t:Submit 
                                    t:mixins="jquery/button,confirm" 
                                   
t:confirm="${workflow.applicationAction.confirmation}" 
                                   
t:message="${workflow.applicationAction.confirmationText}" 
                                   
title="${workflow.applicationAction.name} Action" 
                                   
t:context="workflow.applicationAction.id" 
                                   
value="prop:workflow.applicationAction.name" 
                                    defer="false" 
                                    class="${actionRequirement} 
                                    btn"
                                />
                            </li>
                    </t:Loop>
                </ul>
            </div>
        </t:If>
    </t:Block> 

    Block onProgressiveDisplayFromShowActionButtons() {
        return actionButtons;
    }



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by Dragan Sahpaski <dr...@gmail.com>.
A submit button must be included in a form.
Seems like you are missing a surrounding form.

Cheers,
Dragan Sahpaski


On Mon, Aug 27, 2012 at 6:56 PM, George Christman
<gc...@cardaddy.com> wrote:
> Hello, I have a list of tapestry submit buttons I'm trying to load inside my
> progressive display component, however I'm getting the following exception.
>
> Render queue error in BeginRender[Purchase_Request:submit]: No object of
> type org.apache.tapestry5.services.FormSupport is available from the
> Environment.
>
> Is this a component limitation?
>
> code
>
>     <t:ProgressiveDisplay t:id="showActionButtons" update="show"/>
>
>     <t:Block t:id="actionButtons">
>         <t:If test="actionManager.actions">
>             <div class="subnav">
>                 <ul class="nav nav-pills">
>                     <t:Loop source="actionManager.actions" value="workflow">
>                         ${workflow.applicationAction.name}
>                         <li class="active">
>                                 <t:Submit
>                                     t:mixins="jquery/button,confirm"
>
> t:confirm="${workflow.applicationAction.confirmation}"
>
> t:message="${workflow.applicationAction.confirmationText}"
>
> title="${workflow.applicationAction.name} Action"
>
> t:context="workflow.applicationAction.id"
>
> value="prop:workflow.applicationAction.name"
>                                     defer="false"
>                                     class="${actionRequirement}
>                                     btn"
>                                 />
>                             </li>
>                     </t:Loop>
>                 </ul>
>             </div>
>         </t:If>
>     </t:Block>
>
>     Block onProgressiveDisplayFromShowActionButtons() {
>         return actionButtons;
>     }
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by George Christman <gc...@cardaddy.com>.
Do you have any work around suggestions?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715828.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by Dragan Sahpaski <dr...@gmail.com>.
Well the problem is that the form is surrounding the
progressiveDisplay but not the block.
The block is rendered in runtime using ajax as the content of the
progressive display, so when the block is actually rendered on the
server the submit is not surrounded by a form during render time. So
the submit really isn't inside a form it's just rendered in runtime in
the client form.

Cheers,
Dragan Sahpaski


On Mon, Aug 27, 2012 at 7:08 PM, George Christman
<gc...@cardaddy.com> wrote:
> I rendered the form without the use of a button, but with the button's text
> and checked the source with firebug. The text was rendered within the form
> where it was suppose to be. Only when I use a button inside of the
> progressive display does this become an issue.
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715826.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by George Christman <gc...@cardaddy.com>.
I rendered the form without the use of a button, but with the button's text
and checked the source with firebug. The text was rendered within the form
where it was suppose to be. Only when I use a button inside of the
progressive display does this become an issue. 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715826.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by George Christman <gc...@cardaddy.com>.
Thanks Dragan. 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715831.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by Dragan Sahpaski <dr...@gmail.com>.
One small mistake
... you can't move the form in the progressive display ...
should be
... you can't move the form in the block ...

Cheers,
Dragan Sahpaski


On Mon, Aug 27, 2012 at 7:24 PM, Dragan Sahpaski
<dr...@gmail.com> wrote:
> Well yes. It seems that you can't move the form in the progressive
> display because you're just loading it's header. Jsut replace the
> tapestry submit button with an ordinary submit. Later if you want to
> submit the form with the button just to this.form.submit() on the
> submit's click event for non ajax submit or trigger
> Tapestry.FORM_PROCESS_SUBMIT_EVENT on the form for an ajax submit.
> For example with prototype if the form id is 'my_form' you can do it like this.
> $('my_form').fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT). In jQuery
> similar just look it up.
>
> Cheers,
> Dragan Sahpaski
>
>
> On Mon, Aug 27, 2012 at 7:04 PM, George Christman
> <gc...@cardaddy.com> wrote:
>> Hi, my submit button is contained within a form. Further code sample
>>
>>     <t:Form t:id="pr" autocomplete="off" autofocus="false"
>> class="form-horizontal">
>>         <header>
>>             <t:ProgressiveDisplay t:id="showActionButtons" update="show"/>
>>         </header>
>>
>>        body code
>> </t:Form>
>>
>>
>>
>> --
>> View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715825.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by Dragan Sahpaski <dr...@gmail.com>.
Well yes. It seems that you can't move the form in the progressive
display because you're just loading it's header. Jsut replace the
tapestry submit button with an ordinary submit. Later if you want to
submit the form with the button just to this.form.submit() on the
submit's click event for non ajax submit or trigger
Tapestry.FORM_PROCESS_SUBMIT_EVENT on the form for an ajax submit.
For example with prototype if the form id is 'my_form' you can do it like this.
$('my_form').fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT). In jQuery
similar just look it up.

Cheers,
Dragan Sahpaski


On Mon, Aug 27, 2012 at 7:04 PM, George Christman
<gc...@cardaddy.com> wrote:
> Hi, my submit button is contained within a form. Further code sample
>
>     <t:Form t:id="pr" autocomplete="off" autofocus="false"
> class="form-horizontal">
>         <header>
>             <t:ProgressiveDisplay t:id="showActionButtons" update="show"/>
>         </header>
>
>        body code
> </t:Form>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715825.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by George Christman <gc...@cardaddy.com>.
Hi, my submit button is contained within a form. Further code sample

    <t:Form t:id="pr" autocomplete="off" autofocus="false"
class="form-horizontal">
        <header>
            <t:ProgressiveDisplay t:id="showActionButtons" update="show"/>
        </header>

       body code
</t:Form>



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822p5715825.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Rendering form submit button inside ProgressiveDisplay component exception

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 27 Aug 2012 13:56:36 -0300, George Christman  
<gc...@cardaddy.com> wrote:

> Render queue error in BeginRender[Purchase_Request:submit]: No object of
> type org.apache.tapestry5.services.FormSupport is available from the
> Environment.
> Is this a component limitation?

Form field components should be declared inside a Form component, and  
that's not the case in your template.

>
> code
>
>     <t:ProgressiveDisplay t:id="showActionButtons" update="show"/>
>
>     <t:Block t:id="actionButtons">
>         <t:If test="actionManager.actions">
>             <div class="subnav">
>                 <ul class="nav nav-pills">
>                     <t:Loop source="actionManager.actions"  
> value="workflow">
>                         ${workflow.applicationAction.name}
>                         <li class="active">
>                                 <t:Submit
>                                     t:mixins="jquery/button,confirm"
> t:confirm="${workflow.applicationAction.confirmation}"
> t:message="${workflow.applicationAction.confirmationText}"
> title="${workflow.applicationAction.name} Action"
> t:context="workflow.applicationAction.id"
> value="prop:workflow.applicationAction.name"
>                                     defer="false"
>                                     class="${actionRequirement}
>                                     btn"
>                                 />
>                             </li>
>                     </t:Loop>
>                 </ul>
>             </div>
>         </t:If>
>     </t:Block>
>
>     Block onProgressiveDisplayFromShowActionButtons() {
>         return actionButtons;
>     }
>
>
>
> --
> View this message in context:  
> http://tapestry.1045711.n5.nabble.com/Rendering-form-submit-button-inside-ProgressiveDisplay-component-exception-tp5715822.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


-- 
Thiago H. de Paula Figueiredo

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