Re: Wicket question
Hi Fabio, That does not seem to work. I merged the common/core functionality to trunk, and attached the console patch to SYNCOPE-215 if you feel inclined to take a look ;-) Colm. On Thu, Feb 7, 2013 at 3:57 PM, Fabio Martelli fabio.marte...@gmail.comwrote: Il giorno 07/feb/2013, alle ore 16.51, Colm O hEigeartaigh ha scritto: Hi Fabio, Thanks for your reply. The problem is that the FieldPanel template is constructed and cloned before the Virtual Attribute is selected from the Drop Down list. Therefore, if it is a new attribute that is being added, we don't know at the point of cloning whether the Virtual Attribute name that will be selected will be read-only or not. Once the selection is made, I have no way of setting ReadOnly on the cloned object. Does that make sense? You are perfectly right. Please, try with getView().setEnabled(false) F. Colm. On Thu, Feb 7, 2013 at 8:54 AM, Fabio Martelli fabio.marte...@gmail.com wrote: 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. -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
Re: Wicket question
Hi Fabio, Thanks for your reply. The problem is that the FieldPanel template is constructed and cloned before the Virtual Attribute is selected from the Drop Down list. Therefore, if it is a new attribute that is being added, we don't know at the point of cloning whether the Virtual Attribute name that will be selected will be read-only or not. Once the selection is made, I have no way of setting ReadOnly on the cloned object. Does that make sense? Colm. On Thu, Feb 7, 2013 at 8:54 AM, Fabio Martelli fabio.marte...@gmail.comwrote: 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. -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
Re: Wicket question
Il giorno 07/feb/2013, alle ore 16.51, Colm O hEigeartaigh ha scritto: Hi Fabio, Thanks for your reply. The problem is that the FieldPanel template is constructed and cloned before the Virtual Attribute is selected from the Drop Down list. Therefore, if it is a new attribute that is being added, we don't know at the point of cloning whether the Virtual Attribute name that will be selected will be read-only or not. Once the selection is made, I have no way of setting ReadOnly on the cloned object. Does that make sense? You are perfectly right. Please, try with getView().setEnabled(false) F. Colm. On Thu, Feb 7, 2013 at 8:54 AM, Fabio Martelli fabio.marte...@gmail.comwrote: 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. -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
Re: Wicket question
On 04/02/2013 18:39, Colm O hEigeartaigh wrote: 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? Colm, I can understand you completely when you have such troubles. Maybe Fabio or Marco can help you, only they shouldn't be available neither today nor tomorrow. Regards. -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/
Wicket question
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? Thanks, Colm. -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com