1 24 package org.riotfamily.riot.editor; 25 26 import org.riotfamily.riot.editor.ui.EditorReference; 27 28 public class IntermediateDefinition extends AbstractObjectEditorDefinition { 29 30 private static final String TYPE_NONE = "none"; 31 32 private ListDefinition nestedListDefinition; 33 34 public IntermediateDefinition(ListDefinition parentListDefinition, 35 ListDefinition nestedListDefinition) { 36 37 setParentEditorDefinition(parentListDefinition); 38 this.nestedListDefinition = nestedListDefinition; 39 nestedListDefinition.setParentEditorDefinition(this); 40 setEditorRepository(parentListDefinition.getEditorRepository()); 41 } 42 43 public String getEditorType() { 44 return TYPE_NONE; 45 } 46 47 public ListDefinition getNestedListDefinition() { 48 return this.nestedListDefinition; 49 } 50 51 public EditorReference createPathComponent(Object bean, String parentId) { 52 EditorReference reference = super.createPathComponent(bean, parentId); 53 reference.setEnabled(false); 54 return reference; 55 } 56 57 protected String getEditorUrlWithinServlet(String objectId, String parentId) { 58 return null; 59 } 60 } 61 | Popular Tags |