Il giorno 04/feb/2013, alle ore 18.39, Colm O hEigeartaigh ha scritto:

> Hi all,
> 
> Perhaps this is extremely obvious...
> 
> I'm running into a problem with a fix for SYNCOPE-215. Essentially there is
> a drop down list of Virtual attribute names, and I want to make the
> corresponding text field "read-only" if the Virtual attribute that is
> selected is "read-only".
> 
> The DropDownChoice object in VirtualAttributesPanel already has an "onblur"
> component that allows me to see what was selected. The problem is that the
> "Panel" object corresponding to the text field, is passed through to a
> MultiValueSelectorPanel object, which clones it:
> 
> final FieldPanel fieldPanel = panelTemplate.clone();
> 
> So even if I call "setReadOnly" on the panel in VirtualAttributesPanel, the
> text field does not turn read-only. Is there an obvious way to solve this
> problem?

Hi Colm, I think that setReadOnly method on the field panel template should 
solve your problem.
The clone method is overridden into FildPanel class. This method set the read 
only value explicitly:

panel.setReadOnly(isReadOnly());

Have you already tried by calling the setReadOnly method on the field panel 
template?

Best regards,
F.

Reply via email to