RelatedLink
Nun aber. Der LinkListName wird auf "NONE" gesetzt. Die Variabeln linkListName und contentType sind nun wieder normale Instanz-Variablen, die mit null initialisiert werden. Wenn die Werte für diese Variablen überschrieben werden sollen, muß das in der Methode setLinkSelectionModel() passieren. git-svn-id: https://svn.libreccm.org/ccm/trunk@831 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
baa2f1d2a5
commit
95284248cc
|
|
@ -29,8 +29,8 @@ import com.arsdigita.cms.contenttypes.ui.LinkTable;
|
||||||
*/
|
*/
|
||||||
public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
|
public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
|
||||||
|
|
||||||
protected static String s_linkListName = "genericLink";
|
protected String linkListName;
|
||||||
protected static ContentType s_contentType = null;
|
protected ContentType contentType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor. Creates a <code>RelatedLinkPropertiesStep</code> given an
|
* Constructor. Creates a <code>RelatedLinkPropertiesStep</code> given an
|
||||||
|
|
@ -41,19 +41,20 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
|
||||||
* @param parent The <code>AuthoringKitWizard</code> to track the
|
* @param parent The <code>AuthoringKitWizard</code> to track the
|
||||||
* current link
|
* current link
|
||||||
*/
|
*/
|
||||||
public RelatedLinkPropertiesStep( ItemSelectionModel itemModel,
|
public RelatedLinkPropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent ) {
|
AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a RelatedLinkSelectionModel as the
|
* Sets a RelatedLinkSelectionModel as the
|
||||||
* LinkSelectionModel for this authoring step.
|
* LinkSelectionModel for this authoring step.
|
||||||
|
* Also, set the linkListName and contentType if neccessary
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void setLinkSelectionModel() {
|
protected void setLinkSelectionModel() {
|
||||||
setLinkSelectionModel(
|
linkListName = "NONE";
|
||||||
new RelatedLinkSelectionModel(getLinkParam()));
|
setLinkSelectionModel(new RelatedLinkSelectionModel(getLinkParam()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -67,10 +68,10 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
|
||||||
SimpleContainer container = new SimpleContainer();
|
SimpleContainer container = new SimpleContainer();
|
||||||
LinkTable table;
|
LinkTable table;
|
||||||
if (ContentSection.getConfig().isHideAdditionalResourceFields()) {
|
if (ContentSection.getConfig().isHideAdditionalResourceFields()) {
|
||||||
table = new LinkTable(getItemSelectionModel(), getLinkSelectionModel());
|
table = new LinkTable(getItemSelectionModel(), getLinkSelectionModel());
|
||||||
table.setModelBuilder(new RelatedLinkTableModelBuilder(getItemSelectionModel(), s_linkListName));
|
table.setModelBuilder(new RelatedLinkTableModelBuilder(getItemSelectionModel(), linkListName));
|
||||||
} else {
|
} else {
|
||||||
table = new RelatedLinkTable(getItemSelectionModel(), getLinkSelectionModel(), s_linkListName);
|
table = new RelatedLinkTable(getItemSelectionModel(), getLinkSelectionModel(), linkListName);
|
||||||
}
|
}
|
||||||
|
|
||||||
container.add(table);
|
container.add(table);
|
||||||
|
|
@ -85,9 +86,8 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
|
||||||
@Override
|
@Override
|
||||||
protected FormSection getEditSheet() {
|
protected FormSection getEditSheet() {
|
||||||
return new RelatedLinkPropertyForm(getItemSelectionModel(),
|
return new RelatedLinkPropertyForm(getItemSelectionModel(),
|
||||||
getLinkSelectionModel(),
|
getLinkSelectionModel(),
|
||||||
s_linkListName,
|
linkListName,
|
||||||
s_contentType);
|
contentType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedContainer;
|
||||||
public abstract class LinkPropertiesStep extends ResettableContainer {
|
public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
|
|
||||||
private AuthoringKitWizard m_parent;
|
private AuthoringKitWizard m_parent;
|
||||||
|
|
||||||
private ItemSelectionModel m_itemModel;
|
private ItemSelectionModel m_itemModel;
|
||||||
private BigDecimalParameter m_linkParam = new BigDecimalParameter("link");
|
private BigDecimalParameter m_linkParam = new BigDecimalParameter("link");
|
||||||
private LinkSelectionModel m_linkModel = new LinkSelectionModel(m_linkParam);
|
private LinkSelectionModel m_linkModel = new LinkSelectionModel(m_linkParam);
|
||||||
|
|
@ -53,12 +52,12 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* @param parent The <code>AuthoringKitWizard</code> to track the
|
* @param parent The <code>AuthoringKitWizard</code> to track the
|
||||||
* current link
|
* current link
|
||||||
*/
|
*/
|
||||||
public LinkPropertiesStep( ItemSelectionModel itemModel,
|
public LinkPropertiesStep(ItemSelectionModel itemModel,
|
||||||
AuthoringKitWizard parent ) {
|
AuthoringKitWizard parent) {
|
||||||
|
|
||||||
m_itemModel = itemModel;
|
m_itemModel = itemModel;
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
setLinkSelectionModel();
|
setLinkSelectionModel();
|
||||||
add(getDisplayComponent());
|
add(getDisplayComponent());
|
||||||
|
|
||||||
Form form = new Form("linkEditForm");
|
Form form = new Form("linkEditForm");
|
||||||
|
|
@ -74,7 +73,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* should override this method if a custom LinkSelectionModel is desired.
|
* should override this method if a custom LinkSelectionModel is desired.
|
||||||
*/
|
*/
|
||||||
protected void setLinkSelectionModel() {
|
protected void setLinkSelectionModel() {
|
||||||
setLinkSelectionModel(new LinkSelectionModel(m_linkParam));
|
setLinkSelectionModel(new LinkSelectionModel(m_linkParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -84,7 +83,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* the authoring step
|
* the authoring step
|
||||||
*/
|
*/
|
||||||
protected void setLinkSelectionModel(LinkSelectionModel linkModel) {
|
protected void setLinkSelectionModel(LinkSelectionModel linkModel) {
|
||||||
m_linkModel = linkModel;
|
m_linkModel = linkModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,7 +93,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* the authoring step
|
* the authoring step
|
||||||
*/
|
*/
|
||||||
protected LinkSelectionModel getLinkSelectionModel() {
|
protected LinkSelectionModel getLinkSelectionModel() {
|
||||||
return m_linkModel;
|
return m_linkModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -104,7 +103,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* the authoring step
|
* the authoring step
|
||||||
*/
|
*/
|
||||||
protected ItemSelectionModel getItemSelectionModel() {
|
protected ItemSelectionModel getItemSelectionModel() {
|
||||||
return m_itemModel;
|
return m_itemModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,7 +113,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* the authoring step
|
* the authoring step
|
||||||
*/
|
*/
|
||||||
protected BigDecimalParameter getLinkParam() {
|
protected BigDecimalParameter getLinkParam() {
|
||||||
return m_linkParam;
|
return m_linkParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -135,7 +134,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
* @return The edit form
|
* @return The edit form
|
||||||
*/
|
*/
|
||||||
protected FormSection getEditSheet() {
|
protected FormSection getEditSheet() {
|
||||||
return new LinkPropertyForm(m_itemModel, m_linkModel);
|
return new LinkPropertyForm(m_itemModel, m_linkModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -149,4 +148,3 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
|
||||||
p.addComponentStateParam(this, m_linkParam);
|
p.addComponentStateParam(this, m_linkParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue