You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dev at weitling <de...@weitling.net> on 2007/05/18 07:18:32 UTC

Hide/show columns in an ajaxified table cform

Hi,

I want to hide or show columns in a table on an action. I've implemented
this in a fd:on-action/fd:javascript event listener setting the
appropriate states (invisible/active) on the column cells. This approach
lacks a bit of beauty (mainly in rendering) so here my questions:
- Any idea to get it working via the html colgroup elements and css?
- Can I initiate the redisplay by re-rendering the template?
- How can I call a row- or repeater-action programmatically (there seem
to be differences between just removing/adding a row via flowscript and
action)
- In the last question I want on removing/adding a row on repeater A do
the same on repeaters B and C

Thank your for any ideas,
Florian

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


Re: Hide/show columns in an ajaxified table cform

Posted by Dev at weitling <de...@weitling.net>.
Hi Bart,

as noticed in the thread "Presumed bug in Dojo/Cocoon integration" I
started, you may download a zip archive containing the code at
www.weitling.net/Zip4Cocooners.zip.
Just drop a line about your thoughts :-)

Bye,
Florian

bart remmerie wrote:
> Hi Florian
>
> Maybe the following can help:
>
>
> What I've tried before is to set the state of a widget to invisble
> and trigger an update on the repeater from flow. (something like the
> snippet
> below)
> using an action button that triggers the flow-code
>
> In a repeater, I would place an action-button or a widget with an event
> listener (checkbox ?)
> that triggers the code, but you might have to iterate over all
> repeater-rows
> to set the state per row for the widget
>
> widget.setState(org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE)
> form.addWidgetUpdate(repeaterWidget)
>
> I would be happy to find out how you manage to solve your problem
>
> Bart
>
>
> 2007/5/18, Dev at weitling <de...@weitling.net>:
>>
>> Hi,
>>
>> I want to hide or show columns in a table on an action. I've implemented
>> this in a fd:on-action/fd:javascript event listener setting the
>> appropriate states (invisible/active) on the column cells. This approach
>> lacks a bit of beauty (mainly in rendering) so here my questions:
>> - Any idea to get it working via the html colgroup elements and css?
>> - Can I initiate the redisplay by re-rendering the template?
>> - How can I call a row- or repeater-action programmatically (there seem
>> to be differences between just removing/adding a row via flowscript and
>> action)
>> - In the last question I want on removing/adding a row on repeater A do
>> the same on repeaters B and C
>>
>> Thank your for any ideas,
>> Florian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
>

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


Re: Hide/show columns in an ajaxified table cform

Posted by bart remmerie <re...@gmail.com>.
Hi Florian

Maybe the following can help:


What I've tried before is to set the state of a widget to invisble
and trigger an update on the repeater from flow. (something like the snippet
below)
using an action button that triggers the flow-code

In a repeater, I would place an action-button or a widget with an event
listener (checkbox ?)
that triggers the code, but you might have to iterate over all repeater-rows
to set the state per row for the widget

widget.setState(org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE)
form.addWidgetUpdate(repeaterWidget)

I would be happy to find out how you manage to solve your problem

Bart


2007/5/18, Dev at weitling <de...@weitling.net>:
>
> Hi,
>
> I want to hide or show columns in a table on an action. I've implemented
> this in a fd:on-action/fd:javascript event listener setting the
> appropriate states (invisible/active) on the column cells. This approach
> lacks a bit of beauty (mainly in rendering) so here my questions:
> - Any idea to get it working via the html colgroup elements and css?
> - Can I initiate the redisplay by re-rendering the template?
> - How can I call a row- or repeater-action programmatically (there seem
> to be differences between just removing/adding a row via flowscript and
> action)
> - In the last question I want on removing/adding a row on repeater A do
> the same on repeaters B and C
>
> Thank your for any ideas,
> Florian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 
Bart Remmerie