Data type not applied as CSS attribute to xf:input inside a xf:group

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

Data type not applied as CSS attribute to xf:input inside a xf:group

Philipp Wagner
Hi,

usually the xf:input elements get the data type they're bound to applied
as CSS class (like xforms-type-integer). I use this feature to style
inputs bound to integers differently (with smaller width) and it usually
works great.

Now I have a xf:input inside a xf:group which is "disabled" by default
(bound to an expression which evaluates to false). I also have a
xf:input which can change the node that the xf:group is bound to to true
so that the contents of the group should be shown when the user clicks a
checkbox.
The xf:group's contents are now shown, but the data type is not applied
as CSS attribute to the now-shown xf:input element.

I have attached a minimized testcase that shows this problem hopefully
better than I'm able to describe it.

Is this a bug or a limitation somewhere?

Thanks!

Philipp


--
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

schema.xsd (1K) Download Attachment
view.xhtml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Data type not applied as CSS attribute to xf:input inside a xf:group

Philipp Wagner
Am 30.11.2012 16:44, schrieb Philipp Wagner:

> Hi,
>
> usually the xf:input elements get the data type they're bound to applied
> as CSS class (like xforms-type-integer). I use this feature to style
> inputs bound to integers differently (with smaller width) and it usually
> works great.
>
> Now I have a xf:input inside a xf:group which is "disabled" by default
> (bound to an expression which evaluates to false). I also have a
> xf:input which can change the node that the xf:group is bound to to true
> so that the contents of the group should be shown when the user clicks a
> checkbox.
> The xf:group's contents are now shown, but the data type is not applied
> as CSS attribute to the now-shown xf:input element.
>
> I have attached a minimized testcase that shows this problem hopefully
> better than I'm able to describe it.
>
> Is this a bug or a limitation somewhere?
I tried a couple more things and think this is actually a bug. I
reported it at https://github.com/orbeon/orbeon-forms/issues/659

Philipp


--
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: Data type not applied as CSS attribute to xf:input inside a xf:group

Alessandro  Vernet
Administrator
Hi Philipp,

For an explanation of why that is, see Erik's comment linked below. In
essence, we generate those classes when the page is generated, but not
later when the page is updated through an Ajax request.  Do you have a
workaround for this?

https://github.com/orbeon/orbeon-forms/issues/659#issuecomment-11361761

Alex

On Thu, Dec 13, 2012 at 1:27 AM, Philipp Wagner <[hidden email]> wrote:

> Am 30.11.2012 16:44, schrieb Philipp Wagner:
>
>> Hi,
>>
>> usually the xf:input elements get the data type they're bound to applied
>> as CSS class (like xforms-type-integer). I use this feature to style
>> inputs bound to integers differently (with smaller width) and it usually
>> works great.
>>
>> Now I have a xf:input inside a xf:group which is "disabled" by default
>> (bound to an expression which evaluates to false). I also have a
>> xf:input which can change the node that the xf:group is bound to to true
>> so that the contents of the group should be shown when the user clicks a
>> checkbox.
>> The xf:group's contents are now shown, but the data type is not applied
>> as CSS attribute to the now-shown xf:input element.
>>
>> I have attached a minimized testcase that shows this problem hopefully
>> better than I'm able to describe it.
>>
>> Is this a bug or a limitation somewhere?
>
>
> I tried a couple more things and think this is actually a bug. I reported it
> at https://github.com/orbeon/orbeon-forms/issues/659
>
> Philipp
>
>
> --
> 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
>


--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Data type not applied as CSS attribute to xf:input inside a xf:group

Philipp Wagner
Am 18.12.2012 02:28, schrieb Alessandro Vernet:
> Hi Philipp,
>
> For an explanation of why that is, see Erik's comment linked below. In
> essence, we generate those classes when the page is generated, but not
> later when the page is updated through an Ajax request.  Do you have a
> workaround for this?
>
> https://github.com/orbeon/orbeon-forms/issues/659#issuecomment-11361761

Thanks Alex, I've seen that comment. I didn't have time to take a closer
look at it yet, but it seems I should be able to patch AjaxServer.js to
properly set the classes.

Philipp


--
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: Re: Data type not applied as CSS attribute to xf:input inside a xf:group

Alessandro  Vernet
Administrator
Hi Philipp,

As I was looking at the code to tell you where you could do this, I
noticed that the JavaScript adding the class was already there, just
not running for xf:input, for some reason. I shuffled things around,
and it should now be working. I pushed the fix to GitHub, and it will
be in the next nightly and milestone builds.

https://github.com/orbeon/orbeon-forms/issues/659

You'll let us know if this works for you,

Alex

On Mon, Dec 17, 2012 at 11:19 PM, Philipp Wagner
<[hidden email]> wrote:

> Am 18.12.2012 02:28, schrieb Alessandro Vernet:
>
>> Hi Philipp,
>>
>> For an explanation of why that is, see Erik's comment linked below. In
>> essence, we generate those classes when the page is generated, but not
>> later when the page is updated through an Ajax request.  Do you have a
>> workaround for this?
>>
>> https://github.com/orbeon/orbeon-forms/issues/659#issuecomment-11361761
>
>
> Thanks Alex, I've seen that comment. I didn't have time to take a closer
> look at it yet, but it seems I should be able to patch AjaxServer.js to
> properly set the classes.
>
> Philipp
>
>
> --
> 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
>


--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet