cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: [Forms] Bug in Ajax when changing widget state?
Date Sun, 30 Dec 2007 12:38:59 GMT
Carlos pisze:
> Hi People,

Hi Carlos,

I found your e-mail little bit broken (weird characters in author field for example) that
made my
Thunderbird gone crazy. Is it your e-mail program issue?

> I found the message above that it's an old message, but that still being an
> issue on CForms.
> 
> I found that the label field is not visible again because we only sent the
> <bu:replace> <span id="..."> ...</span> </bu:replace> for the
input field
> but for the label we don't have anything similar.
> 
> When we show the form that initially have a field invisible and the field
> it's on a <fi:group> ... we sent a placeholder for the field and this
> generate this:
> 
> <label class="forms placeholder" id="field2:label" for="field2:input"
> title=""/>
> 
> and
> 
> <span id="field2"/>
> 
> for example for a field "field2" (that is because the XSLT, now we only
> generate the SAX's event only for the input, the label tag is generate
> because the XSLT)

Do you use some non-standard XSLT files? In normal situation it's a template duty to generate
fi:label tags and XSLT only transforms them into HTML. Isn't it a case for you?

> Now, when we got visible the field, the <bu:replace> <span id="..."> it's
> just only for the field, we don't manage in anyway the label tag.
> 
> This is similar if the field it's initially visible, when we got invisible
> the input field is gone, but the label still there because we don't manage
> the label on the ajax update.
> 
> This is similar too when we use the <widget-label id="..."> ... tag, this
> generate the raw text of the label it does not generate the html tag
> <label ...> and i think we should generate and we should add ad "id"
> attribute to the <label> tag, so some how we can manage the label tag on a
> ajax replace.
> 
> Now, I'm not sure how we can manage the label, we don't generate the label
> on the SAX events, we generate the label on the XSLT, the thing is how can
> we know that the ajax update should contains the label replacement? we can
> generate always and the ajax update try to find the label, but don't
> generate any error if we don't find, but looks like a hack.
> 
> any thoughts ?

My gut feeling is that it's a bug in macros responsible for handling form template and generating
fi:* tags. Before we dig into details of Forms implementation I would really like to see form
definition and form template exhibiting behavior you are talking about.


Also, have you tried following construct:
<ft:widget id="...">
  <ft:widget-label id="..."/>
</ft:widget>

I'm not sure how it will work but it is worth trying :-)

-- 
Grzegorz Kossakowski

Mime
View raw message