cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dev at weitling <d...@weitling.net>
Subject Re: Using Variables/attributes in CForm/Ajax/Jexl
Date Thu, 09 Aug 2007 17:35:23 GMT

>> - The "form" variable is available in the flow as well as in the
>> template, but not in the definition. At the latter place I have to go
>> via event.source.form.
> I think it is not that big deal, isn't it?

Nothing making sleepless night ;-)

>> - When I have access to the variable "form", I should also have access
>> to any variable defined in the flow e.g. myCat. So no need to go via
>> set/getAttribute.
>> - My ${}'s in the template are either in the second run (Ajax) not
>> evaluated or are filtered and therefore not redisplayed in the browser.
>>
>> The last point is heavy weight for me. Hm, I could circumvent it by
>> doing without Ajax, but it's soooo cool.
>
> Does suggestion from Jason helps you already or there is still a problem?

Yes and no, as written below. Sorry for the delay, but my wife reminds
me that we are on holiday (Balconia :-)

> I must admit that I lost "big picture" and forgot what exactly you
> want to achieve. Could you remind us?
> It would be much easier to suggest solution.

Well, make yourself comfortable...
I want to create an editor component where a question along with a bunch
of possible answers can be created and/or edited. Each question is
localized in one or more languages, e.g. german, english, french.
According to the role of the user or his task he may have complete
rights (edit questions and answers, add or delete answers), may only
translate from one language to another or may only view some languages.
The user may hide some languages for convenience.
So my solution approaches (not exhaustive):
a) a html table hiding a column (= a language) via Ajax and
WidgetState.INVISIBLE for each affected cell. This seems to be the best
solution for accessibility but suffers from a bug [1] returning span's
instead of td's.
b) a html table where the hiding is done via deleting and adding rows.
There's a problem reloading the data when the user wants to see a hidden
language again and with preventing deletion of database entries.
c) a html table where the hiding is done via client-side javascript and
manipulating css styles (one class per column). I have repressed the
problems with this.
d) a table made of div's instead of a classical table. Is a work-around
for a) but is bad for screenreaders. And I didn't test if span's are
returned or div's.

In the mind's eye I have something like tabs for each language, variable
in width depending on the number of languages displayed. The optimum
would be a scrollable area for the answer cells - displaying 10
languages would result in rather narrow columns otherwise. And with 40
possible answers the questions should be visible, too, as seen in
Excel's "fix window" feature.
Additionally when a language is hidden you may redisplay it by choosing
it from a drop-down-menu.
Reordering columns aka languages is also one of my dreams.

> I would pronounce 'Grszegorsz' differently thant Polish Grzegorz. I
> could write my name as Gżegoż and from pronouncing point of view there
> would be no difference. Actually my name is not that hard, what about
> Grzegorz Brzęczyszczykiewicz or Andrzej Stypiczyński? :-P
> Ok, I believe that there are other languages with strange 
> pronunciation, only most English names happen to be quite simple. :-)

:-)

BTW: It seems TeeTransformer has a bug - tags like <br/> are converted
in the output to <br> missing the closing element.

Florian
_____
[1]
http://www.nabble.com/Bug-(-!)-in-Html-table-Ajax-combination-t4112294.html


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


Mime
View raw message