You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ricardo Veloso <ri...@flowinn.biz> on 2016/04/08 16:45:47 UTC

Paged grid with checkbox's fails when switching page

I've a very simple page with a t:form within a t:grid that has a column
with a checkbox to select rows.
When switching page it raises an exception *Component
 ProcessDetail:datalist.selected must be enclosed by a Form component* even
with a t:form surrounding the t:grid

<form t:type="form" t:id="dataform">

<t:submit t:id="submit" />


<div t:type="zone" t:id="datazone" id="datazone">

<t:grid t:id="datalist" t:source="data" row="row"
inplace="true" add="actions">

<p:actionsCell>

<input t:id="selected" t:type="checkbox" value="selected" />

</p:actionsCell>

</t:grid>

</div>

</form>

What am I doing wrong?
I think the problem is that with inplace="true" the component generates a
zone surrounding the pager.
And I can't force the name of the zone in the component. It references ^.

Best regards,
Ricardo Veloso

Re: Paged grid with checkbox's fails when switching page

Posted by Chris Poulsen <ma...@nesluop.dk>.
You can roll your own version of the grid. We have done this to support
filters, include context in pagination links, have better control over the
zone updates etc. I do not think the built in grid/tree components was ever
intended to handle all possible cases.

-- 
Chris

On Thu, Apr 14, 2016 at 4:08 AM, JumpStart <
geoff.callender.jumpstart@gmail.com> wrote:

> I have a lateral suggestion that you might not like. My design “rule of
> thumb” is to use a paged grid for display only. I find it ambiguous to use
> for create/update/delete because when you change pages, or click on a
> column to re-sort the grid, or change the value of a filter field (if you
> have one), then it is not at all clear that it should remember the changes
> you’ve made to fields.
>
> Just my two cents worth.
>
> Geoff
>
> > On 13 Apr 2016, at 9:12 PM, Thiago H de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
> >
> > On Tue, 12 Apr 2016 08:32:29 -0300, Ricardo Veloso <
> ricardo.veloso@flowinn.biz> wrote:
> >
> >> Obrigado! :)
> >
> > De nada! É um prazer ajudar!
> >
> > Translating from Portuguese to English:
> >
> >> Thanks!
> >
> > You're welcome! It's a plasure to help!
> >
> >> Issue opened: TAP5-2542 <
> https://issues.apache.org/jira/browse/TAP5-2542>
> >
> > Thanks!
> >
> >> Meanwhile I will try to get a workaround for this, simulating a checkbox
> >> with images and trigger an event when is checked, in order to get things
> >> done on time.
> >
> > You can use an ordinary HTML checkbox (<input type="checkbox">, without
> a t:type attribute), so you don't need to use images. Or maybe you could
> use some AJAX, keeping the checkbox or changing it to an EventLink.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > 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: Paged grid with checkbox's fails when switching page

Posted by JumpStart <ge...@gmail.com>.
I have a lateral suggestion that you might not like. My design “rule of thumb” is to use a paged grid for display only. I find it ambiguous to use for create/update/delete because when you change pages, or click on a column to re-sort the grid, or change the value of a filter field (if you have one), then it is not at all clear that it should remember the changes you’ve made to fields.

Just my two cents worth.

Geoff

> On 13 Apr 2016, at 9:12 PM, Thiago H de Paula Figueiredo <th...@gmail.com> wrote:
> 
> On Tue, 12 Apr 2016 08:32:29 -0300, Ricardo Veloso <ri...@flowinn.biz> wrote:
> 
>> Obrigado! :)
> 
> De nada! É um prazer ajudar!
> 
> Translating from Portuguese to English:
> 
>> Thanks!
> 
> You're welcome! It's a plasure to help!
> 
>> Issue opened: TAP5-2542 <https://issues.apache.org/jira/browse/TAP5-2542>
> 
> Thanks!
> 
>> Meanwhile I will try to get a workaround for this, simulating a checkbox
>> with images and trigger an event when is checked, in order to get things
>> done on time.
> 
> You can use an ordinary HTML checkbox (<input type="checkbox">, without a t:type attribute), so you don't need to use images. Or maybe you could use some AJAX, keeping the checkbox or changing it to an EventLink.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
> 
> ---------------------------------------------------------------------
> 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: Paged grid with checkbox's fails when switching page

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 12 Apr 2016 08:32:29 -0300, Ricardo Veloso  
<ri...@flowinn.biz> wrote:

> Obrigado! :)

De nada! É um prazer ajudar!

Translating from Portuguese to English:

> Thanks!

You're welcome! It's a plasure to help!

> Issue opened: TAP5-2542 <https://issues.apache.org/jira/browse/TAP5-2542>

Thanks!

> Meanwhile I will try to get a workaround for this, simulating a checkbox
> with images and trigger an event when is checked, in order to get things
> done on time.

You can use an ordinary HTML checkbox (<input type="checkbox">, without a  
t:type attribute), so you don't need to use images. Or maybe you could use  
some AJAX, keeping the checkbox or changing it to an EventLink.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


Re: Paged grid with checkbox's fails when switching page

Posted by Ricardo Veloso <ri...@flowinn.biz>.
Obrigado! :)

Issue opened: TAP5-2542 <https://issues.apache.org/jira/browse/TAP5-2542>

Meanwhile I will try to get a workaround for this, simulating a checkbox
with images and trigger an event when is checked, in order to get things
done on time.

Cumprimentos / Best regards,
Ricardo Veloso







ricardo.veloso@flowinn.biz


(+351) 926 728 741


www.flowinn.biz


facebook.com/grupoflowinn <https://www.facebook.com/grupoflowinn>

AVISO LEGAL A informação presente nesta mensagem, bem como em qualquer dos
seus anexos é confidencial e destinada exclusivamente ao(s)
destinatário(s). Qualquer utilização desta informação que não esteja de
acordo com o seu objectivo, qualquer disseminação ou divulgação, total ou
parcial, é proibida excepto se formalmente aprovada. A Internet não garante
a integridade desta mensagem, a qual poderá ter sido interceptada,
corrompida, perdida, atrasada ou acrescida de vírus. Assim, a Flowinn não
se responsabiliza pela mensagem se modificada.

DISCLAIMER The information in this e-mail and in any attachments is
confidential and intended exclusively for the named addressee(s). Any use
of this information not in accordance with its purpose, any dissemination
or disclosure, either whole or partial, is prohibited except if formally
approved. The Internet cannot guarantee the integrity of this message, as
it could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete or have viruses added to it. Flowinn will not therefore be
liable for the message if modified.

2016-04-08 21:08 GMT+01:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Fri, 08 Apr 2016 14:31:03 -0300, Ricardo Veloso <
> ricardo.veloso@flowinn.biz> wrote:
>
> Thank you Thiago.
>>
>
> De nada! :D
>
> So it is not possible to achieve this with T5.4?
>>
>
> Not with AJAX updates.
>
> Why zone attribute of Grid is not exposed as @Parameter instead of force
>> "^" if inplace="true"? This way one could identify the zone to be updated.
>>
>
> You can file a Jira ticket with this suggestion:
> https://issues.apache.org/jira/browse/TAP5.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Paged grid with checkbox's fails when switching page

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 08 Apr 2016 14:31:03 -0300, Ricardo Veloso  
<ri...@flowinn.biz> wrote:

> Thank you Thiago.

De nada! :D

> So it is not possible to achieve this with T5.4?

Not with AJAX updates.

> Why zone attribute of Grid is not exposed as @Parameter instead of force
> "^" if inplace="true"? This way one could identify the zone to be  
> updated.

You can file a Jira ticket with this suggestion:  
https://issues.apache.org/jira/browse/TAP5.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


Re: Paged grid with checkbox's fails when switching page

Posted by Ricardo Veloso <ri...@flowinn.biz>.
Thank you Thiago.

So it is not possible to achieve this with T5.4?
Why zone attribute of Grid is not exposed as @Parameter instead of force
"^" if inplace="true"? This way one could identify the zone to be updated.

I'm trying to place a pagerPosition="none" and put an outer t:gridPager and
give t:zone="literal:datazone" but the pager is not updated. The grid is
updated fine.
This involves a huge tuning and deal with internal services like:

void onInPlaceUpdate() throws IOException {

componentEventResultProcessor.processResultValue(datalist);

}




Cumprimentos / Best regards,
Ricardo Veloso







ricardo.veloso@flowinn.biz


(+351) 926 728 741


www.flowinn.biz


facebook.com/grupoflowinn <https://www.facebook.com/grupoflowinn>

AVISO LEGAL A informação presente nesta mensagem, bem como em qualquer dos
seus anexos é confidencial e destinada exclusivamente ao(s)
destinatário(s). Qualquer utilização desta informação que não esteja de
acordo com o seu objectivo, qualquer disseminação ou divulgação, total ou
parcial, é proibida excepto se formalmente aprovada. A Internet não garante
a integridade desta mensagem, a qual poderá ter sido interceptada,
corrompida, perdida, atrasada ou acrescida de vírus. Assim, a Flowinn não
se responsabiliza pela mensagem se modificada.

DISCLAIMER The information in this e-mail and in any attachments is
confidential and intended exclusively for the named addressee(s). Any use
of this information not in accordance with its purpose, any dissemination
or disclosure, either whole or partial, is prohibited except if formally
approved. The Internet cannot guarantee the integrity of this message, as
it could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete or have viruses added to it. Flowinn will not therefore be
liable for the message if modified.

2016-04-08 17:54 GMT+01:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> Hi!
>
> On Fri, 08 Apr 2016 11:45:47 -0300, Ricardo Veloso <
> ricardo.veloso@flowinn.biz> wrote:
>
> I think the problem is that with inplace="true" the component generates a
>> zone surrounding the pager.
>>
>
> That's correct. So, when the AJAX request is done, the form isn't rendered
> again, so the checkbox rendering throws an exception because form field
> components cannot be rendered unless a Form is rendered surrounding them.
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Paged grid with checkbox's fails when switching page

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
Hi!

On Fri, 08 Apr 2016 11:45:47 -0300, Ricardo Veloso  
<ri...@flowinn.biz> wrote:

> I think the problem is that with inplace="true" the component generates a
> zone surrounding the pager.

That's correct. So, when the AJAX request is done, the form isn't rendered  
again, so the checkbox rendering throws an exception because form field  
components cannot be rendered unless a Form is rendered surrounding them.
-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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