Changing XFORMS_SEPARATOR_1 - was Re: Adding unique IDs in xforms with JS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing XFORMS_SEPARATOR_1 - was Re: Adding unique IDs in xforms with JS

Inigo Surguy
Hi,

A related question - is it possible to change the special character
that's being used as a separator? The middle-dot character · is
causing problems for me when I'm trying to use the CKeditor 3 - I've
raised it as a CKeditor bug, but it would be nice to have a workaround
in the meantime.

Incidentally, CKeditor 3 works well with Orbeon, after a bit of
fiddling. It's much faster than using FCK 2.x with Orbeon. I'll write
up docs on doing it once I've got the last few minor issues sorted
out.

Cheers

Inigo

On Tue, Oct 27, 2009 at 1:52 AM, Alessandro Vernet <[hidden email]> wrote:

> Stephanie,
>
> On Mon, Oct 26, 2009 at 1:22 PM, Stephanie Hall (TT)
> <[hidden email]> wrote:
>>                                                 <div id=”div_3”>…</div>
>
> You can just keep your div as is, and each iteration will
> automatically have the id you specified followed by a separator,
> followed by the index of the iteration (starting with 1). The
> separator is a special character, and I recommend you use
> XFORMS_SEPARATOR_1. So in JavaScript to access fourth iteration, you'd
> write: "div_3" + XFORMS_SEPARATOR_1 + "4".
>
> Alex
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> My Twitter: http://twitter.com/avernet
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Changing XFORMS_SEPARATOR_1 - was Re: Adding unique IDs in xforms with JS

Erik Bruchez-3
You could change it, but you will have to recompile Orbeon Forms. This constant is defined in two places:

* xforms.js
* XFormsConstants.java

You just need to make sure you are changing it to a character unlikely to be used by a form author. That's why we picked the funny "dot" (or multiplication) character.

-Erik

On Tue, Oct 27, 2009 at 1:00 AM, Inigo Surguy <[hidden email]> wrote:
Hi,

A related question - is it possible to change the special character
that's being used as a separator? The middle-dot character · is
causing problems for me when I'm trying to use the CKeditor 3 - I've
raised it as a CKeditor bug, but it would be nice to have a workaround
in the meantime.

Incidentally, CKeditor 3 works well with Orbeon, after a bit of
fiddling. It's much faster than using FCK 2.x with Orbeon. I'll write
up docs on doing it once I've got the last few minor issues sorted
out.

Cheers

Inigo

On Tue, Oct 27, 2009 at 1:52 AM, Alessandro Vernet <[hidden email]> wrote:
> Stephanie,
>
> On Mon, Oct 26, 2009 at 1:22 PM, Stephanie Hall (TT)
> <[hidden email]> wrote:
>>                                                 <div id=”div_3”>…</div>
>
> You can just keep your div as is, and each iteration will
> automatically have the id you specified followed by a separator,
> followed by the index of the iteration (starting with 1). The
> separator is a special character, and I recommend you use
> XFORMS_SEPARATOR_1. So in JavaScript to access fourth iteration, you'd
> write: "div_3" + XFORMS_SEPARATOR_1 + "4".
>
> Alex
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> My Twitter: http://twitter.com/avernet
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Changing XFORMS_SEPARATOR_1 - was Re: Adding unique IDs in xforms with JS

Inigo Surguy
Thanks Eric,

I've changed it to ~ in my local build, and that's fixed the problem.

The issue was that if you use CKeditor 3 inside an XForms repeat in
Orbeon, then the content of that editor is always the value
"undefined" in IE (Firefox is fine). This is a CKeditor bug, which
I've raised as
http://dev.fckeditor.net/ticket/4581

Cheers

Inigo

On Tue, Oct 27, 2009 at 11:52 PM, Erik Bruchez <[hidden email]> wrote:

> You could change it, but you will have to recompile Orbeon Forms. This
> constant is defined in two places:
> * xforms.js
> * XFormsConstants.java
> You just need to make sure you are changing it to a character unlikely to be
> used by a form author. That's why we picked the funny "dot" (or
> multiplication) character.
> -Erik
>
> On Tue, Oct 27, 2009 at 1:00 AM, Inigo Surguy <[hidden email]>
> wrote:
>>
>> Hi,
>>
>> A related question - is it possible to change the special character
>> that's being used as a separator? The middle-dot character · is
>> causing problems for me when I'm trying to use the CKeditor 3 - I've
>> raised it as a CKeditor bug, but it would be nice to have a workaround
>> in the meantime.
>>
>> Incidentally, CKeditor 3 works well with Orbeon, after a bit of
>> fiddling. It's much faster than using FCK 2.x with Orbeon. I'll write
>> up docs on doing it once I've got the last few minor issues sorted
>> out.
>>
>> Cheers
>>
>> Inigo
>>
>> On Tue, Oct 27, 2009 at 1:52 AM, Alessandro Vernet <[hidden email]>
>> wrote:
>> > Stephanie,
>> >
>> > On Mon, Oct 26, 2009 at 1:22 PM, Stephanie Hall (TT)
>> > <[hidden email]> wrote:
>> >>                                                 <div id=”div_3”>…</div>
>> >
>> > You can just keep your div as is, and each iteration will
>> > automatically have the id you specified followed by a separator,
>> > followed by the index of the iteration (starting with 1). The
>> > separator is a special character, and I recommend you use
>> > XFORMS_SEPARATOR_1. So in JavaScript to access fourth iteration, you'd
>> > write: "div_3" + XFORMS_SEPARATOR_1 + "4".
>> >
>> > Alex
>> > --
>> > Orbeon Forms - Web forms, open-source, for the Enterprise
>> > Orbeon's Blog: http://www.orbeon.com/blog/
>> > My Twitter: http://twitter.com/avernet
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the [hidden email]
>> > mailing list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > OW2 mailing lists service home page: http://www.ow2.org/wws
>> >
>> >
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Changing XFORMS_SEPARATOR_1 - was Re: Adding unique IDs in xforms with JS

Erik Bruchez-3
Inigo,

Glad to see that did it!

-Erik

On Wed, Oct 28, 2009 at 3:42 AM, Inigo Surguy <[hidden email]> wrote:

> Thanks Eric,
>
> I've changed it to ~ in my local build, and that's fixed the problem.
>
> The issue was that if you use CKeditor 3 inside an XForms repeat in
> Orbeon, then the content of that editor is always the value
> "undefined" in IE (Firefox is fine). This is a CKeditor bug, which
> I've raised as
> http://dev.fckeditor.net/ticket/4581
>
> Cheers
>
> Inigo
>
> On Tue, Oct 27, 2009 at 11:52 PM, Erik Bruchez <[hidden email]> wrote:
>> You could change it, but you will have to recompile Orbeon Forms. This
>> constant is defined in two places:
>> * xforms.js
>> * XFormsConstants.java
>> You just need to make sure you are changing it to a character unlikely to be
>> used by a form author. That's why we picked the funny "dot" (or
>> multiplication) character.
>> -Erik
>>
>> On Tue, Oct 27, 2009 at 1:00 AM, Inigo Surguy <[hidden email]>
>> wrote:
>>>
>>> Hi,
>>>
>>> A related question - is it possible to change the special character
>>> that's being used as a separator? The middle-dot character · is
>>> causing problems for me when I'm trying to use the CKeditor 3 - I've
>>> raised it as a CKeditor bug, but it would be nice to have a workaround
>>> in the meantime.
>>>
>>> Incidentally, CKeditor 3 works well with Orbeon, after a bit of
>>> fiddling. It's much faster than using FCK 2.x with Orbeon. I'll write
>>> up docs on doing it once I've got the last few minor issues sorted
>>> out.
>>>
>>> Cheers
>>>
>>> Inigo
>>>
>>> On Tue, Oct 27, 2009 at 1:52 AM, Alessandro Vernet <[hidden email]>
>>> wrote:
>>> > Stephanie,
>>> >
>>> > On Mon, Oct 26, 2009 at 1:22 PM, Stephanie Hall (TT)
>>> > <[hidden email]> wrote:
>>> >>                                                 <div id=”div_3”>…</div>
>>> >
>>> > You can just keep your div as is, and each iteration will
>>> > automatically have the id you specified followed by a separator,
>>> > followed by the index of the iteration (starting with 1). The
>>> > separator is a special character, and I recommend you use
>>> > XFORMS_SEPARATOR_1. So in JavaScript to access fourth iteration, you'd
>>> > write: "div_3" + XFORMS_SEPARATOR_1 + "4".
>>> >
>>> > Alex
>>> > --
>>> > Orbeon Forms - Web forms, open-source, for the Enterprise
>>> > Orbeon's Blog: http://www.orbeon.com/blog/
>>> > My Twitter: http://twitter.com/avernet
>>> >
>>> >
>>> > --
>>> > You receive this message as a subscriber of the [hidden email]
>>> > mailing list.
>>> > To unsubscribe: mailto:[hidden email]
>>> > For general help: mailto:[hidden email]?subject=help
>>> > OW2 mailing lists service home page: http://www.ow2.org/wws
>>> >
>>> >
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing
>>> list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws