I'm not sure that the FckEditer allows you to disable the value editing by 
default.  However, you can very easily extend the FckEditor control to 
conditionally render a static field instead of the regular control.  

i.e.
[code]
@TabFactory("TableOfContents")
public void tableOfContents(TabBuilder tab, DialogCreationContext 
dialogCreationContext) {
     DialogControlImpl fckEditorDialogCustomized = 
tab.addControl("customControlNodeName", FckEditorCustomized.JCR_NODE_VALUE_NAME 
, "title 1", "description 1");
    fckEditorDialogCustomized .setConfig("readOnly", foo());
}

private String foo(){
   return "true";  //obviously you will need to figure out your logic
}

[/code]
[code]
public FckEditorCustomized extends FckEditorDialog{
    public static final String JCR_NODE_VALUE_NAME = "fooBar";



    @Override
    public void drawHtml(Writer out) throws IOException {
       if((new Boolean (this.getConfigValue("readOnly")).booleanValue()){
           DialogStatic s = new DialogStatic();
           s.setValue(this.getValue());
           s.drawHtml(out);
       }else{
           super.drawHtml(out);
       }
    }

}
[/code]

You'll also need to declare this custom control in Magnolia, and for this I 
refer you to the documentation here: 
http://documentation.magnolia-cms.com/use-cases/creating-a-custom-control.html

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=f74e558d-d557-4cf9-98e2-97743f177f6a


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to