You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2007/09/05 14:58:55 UTC

CForms and C2.2

hi all, hi Greg...


I try to use CocoonForms in C2.2 environments.But i still have some 
problems.

There is no information about migration of css or js ressrouces.
How can i handle that ?

forms_showTab is not defined

function onclick(event) {
    forms_showTab("N10017", 1, 2, "");
}

thanks


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr




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


Re: CForms and C2.2

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Sébastien Geindre pisze:
> Thank you Grzegorz, so up to you, if i need complex design with C2.2, i
> should use dojo instead of old C2.1 home made solution.
> It sounds good.
> 
> Do we have any samples of the use of dojo component with C2.2 ??

Actually, Dojo is already used in Forms (especially when Ajax is enabled) in C2.2 so you might want
to take a look at cocoon-forms-sample[1] module. In order to run it, just checkout whole Cocoon's
trunk[2] and follow instructions in README.txt.

To make it clear: you don't need to get rid of <ft:group/> and <fi:styling layout="tabs"/> (typing
from memory), you just need to modify Forms XSL files so they take advantage of Dojo's functionality
instead of forms-lib.js.

[1] http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/
[2] http://svn.apache.org/repos/asf/cocoon/trunk/

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

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


Re: CForms and C2.2

Posted by Sébastien Geindre <se...@meteo.fr>.
Thank you Grzegorz, so up to you, if i need complex design with C2.2, i 
should use dojo instead of old C2.1 home made solution.
It sounds good.

Do we have any samples of the use of dojo component with C2.2 ??


Grzegorz Kossakowski a écrit :
> Sébastien Geindre pisze:
>   
>> hi all, hi Greg...
>>     
>
> Hi, if you addressed your greetings to me it would be better to call me Grzegorz or Grek.
>   
>   
>> I try to use CocoonForms in C2.2 environments.But i still have some
>> problems.
>>
>> There is no information about migration of css or js ressrouces.
>> How can i handle that ?
>>     
>
> You don't need to alter most of your CSS and JS files because there are no incompatible changes
> there. All that has changed is that CForms in C2.2 are just a true Cocoon block so loading and
> referencing to its resources changed.
>
>   
>> forms_showTab is not defined
>>
>> function onclick(event) {
>>    forms_showTab("N10017", 1, 2, "");
>> }
>>     
>
> Function forms_showTab is defined in forms-lib.js[1] file that most probably is not loaded by
> browser for some reason. I hope that you will be able to easily find out what's wrong, now.
>
> BTW. As you may read in forms-lib.js file:
> /**
>  * Runtime JavaScript library for Cocoon forms.
>  * NOTE: This file will be trimmed down to contain only the necessary
>  *       features for dynamic behaviour on non Ajax-capable browsers.
>  *       Advanced widgets such as double selection list and multivalue
>  *       field will be refactored as Dojo widgets.
>  * NOTE: (2.1.11) moving support for non-ajax forms to cocoon.forms.common and the SimpleForm Widget.
>
> it's clear that our direction is to move from home-grown solutions that forms-lib.js files contains
> to Dojo,  completely. Dojo 0.4.x already has support for tab layout[2] so it would be a good idea to
> use that functionality.
> If you have spare time and would like to help us making Forms better consider migrating Forms tabs
> to Dojo and provide us a patch in JIRA.
>
> [1]
> http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/forms-lib.js
> [2] http://www.dojotoolkit.org/book/dojo-book-0-4/part-4-more-widgets/layout
>
>   


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr




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


Re: CForms and C2.2

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Sébastien Geindre pisze:
> hi all, hi Greg...

Hi, if you addressed your greetings to me it would be better to call me Grzegorz or Grek.

> I try to use CocoonForms in C2.2 environments.But i still have some
> problems.
> 
> There is no information about migration of css or js ressrouces.
> How can i handle that ?

You don't need to alter most of your CSS and JS files because there are no incompatible changes
there. All that has changed is that CForms in C2.2 are just a true Cocoon block so loading and
referencing to its resources changed.

> forms_showTab is not defined
> 
> function onclick(event) {
>    forms_showTab("N10017", 1, 2, "");
> }

Function forms_showTab is defined in forms-lib.js[1] file that most probably is not loaded by
browser for some reason. I hope that you will be able to easily find out what's wrong, now.

BTW. As you may read in forms-lib.js file:
/**
 * Runtime JavaScript library for Cocoon forms.
 * NOTE: This file will be trimmed down to contain only the necessary
 *       features for dynamic behaviour on non Ajax-capable browsers.
 *       Advanced widgets such as double selection list and multivalue
 *       field will be refactored as Dojo widgets.
 * NOTE: (2.1.11) moving support for non-ajax forms to cocoon.forms.common and the SimpleForm Widget.

it's clear that our direction is to move from home-grown solutions that forms-lib.js files contains
to Dojo,  completely. Dojo 0.4.x already has support for tab layout[2] so it would be a good idea to
use that functionality.
If you have spare time and would like to help us making Forms better consider migrating Forms tabs
to Dojo and provide us a patch in JIRA.

[1]
http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/forms-lib.js
[2] http://www.dojotoolkit.org/book/dojo-book-0-4/part-4-more-widgets/layout

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

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