diff --git a/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertiesStep.java b/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertiesStep.java
index da1b5bf03..7f84fb093 100755
--- a/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertiesStep.java
+++ b/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertiesStep.java
@@ -29,8 +29,8 @@ import com.arsdigita.cms.contenttypes.ui.LinkTable;
*/
public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
- protected static String s_linkListName = "genericLink";
- protected static ContentType s_contentType = null;
+ protected String linkListName;
+ protected ContentType contentType;
/**
* Constructor. Creates a RelatedLinkPropertiesStep given an
@@ -41,19 +41,20 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
* @param parent The AuthoringKitWizard to track the
* current link
*/
- public RelatedLinkPropertiesStep( ItemSelectionModel itemModel,
- AuthoringKitWizard parent ) {
+ public RelatedLinkPropertiesStep(ItemSelectionModel itemModel,
+ AuthoringKitWizard parent) {
super(itemModel, parent);
}
/**
* Sets a RelatedLinkSelectionModel as the
- * LinkSelectionModel for this authoring step.
+ * LinkSelectionModel for this authoring step.
+ * Also, set the linkListName and contentType if neccessary
*/
@Override
protected void setLinkSelectionModel() {
- setLinkSelectionModel(
- new RelatedLinkSelectionModel(getLinkParam()));
+ linkListName = "NONE";
+ setLinkSelectionModel(new RelatedLinkSelectionModel(getLinkParam()));
}
/**
@@ -67,12 +68,12 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
SimpleContainer container = new SimpleContainer();
LinkTable table;
if (ContentSection.getConfig().isHideAdditionalResourceFields()) {
- table = new LinkTable(getItemSelectionModel(), getLinkSelectionModel());
- table.setModelBuilder(new RelatedLinkTableModelBuilder(getItemSelectionModel(), s_linkListName));
+ table = new LinkTable(getItemSelectionModel(), getLinkSelectionModel());
+ table.setModelBuilder(new RelatedLinkTableModelBuilder(getItemSelectionModel(), linkListName));
} else {
- table = new RelatedLinkTable(getItemSelectionModel(), getLinkSelectionModel(), s_linkListName);
+ table = new RelatedLinkTable(getItemSelectionModel(), getLinkSelectionModel(), linkListName);
}
-
+
container.add(table);
return container;
}
@@ -84,10 +85,9 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep {
*/
@Override
protected FormSection getEditSheet() {
- return new RelatedLinkPropertyForm(getItemSelectionModel(),
- getLinkSelectionModel(),
- s_linkListName,
- s_contentType);
+ return new RelatedLinkPropertyForm(getItemSelectionModel(),
+ getLinkSelectionModel(),
+ linkListName,
+ contentType);
}
}
-
diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertiesStep.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertiesStep.java
index 4e33662f7..bd247ebb9 100755
--- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertiesStep.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertiesStep.java
@@ -37,13 +37,12 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedContainer;
* role on ContentItem.
*/
public abstract class LinkPropertiesStep extends ResettableContainer {
-
+
private AuthoringKitWizard m_parent;
-
private ItemSelectionModel m_itemModel;
private BigDecimalParameter m_linkParam = new BigDecimalParameter("link");
private LinkSelectionModel m_linkModel = new LinkSelectionModel(m_linkParam);
-
+
/**
* Constructor. Creates a LinkPropertiesStep given an
* ItemSelectionModel and an
@@ -53,17 +52,17 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
* @param parent The AuthoringKitWizard to track the
* current link
*/
- public LinkPropertiesStep( ItemSelectionModel itemModel,
- AuthoringKitWizard parent ) {
+ public LinkPropertiesStep(ItemSelectionModel itemModel,
+ AuthoringKitWizard parent) {
m_itemModel = itemModel;
m_parent = parent;
- setLinkSelectionModel();
+ setLinkSelectionModel();
add(getDisplayComponent());
-
+
Form form = new Form("linkEditForm");
form.add(getEditSheet());
-
+
WorkflowLockedContainer edit = new WorkflowLockedContainer(itemModel);
edit.add(form);
add(edit);
@@ -74,7 +73,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
* should override this method if a custom LinkSelectionModel is desired.
*/
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
*/
protected void setLinkSelectionModel(LinkSelectionModel linkModel) {
- m_linkModel = linkModel;
+ m_linkModel = linkModel;
}
/**
@@ -94,7 +93,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
* the authoring step
*/
protected LinkSelectionModel getLinkSelectionModel() {
- return m_linkModel;
+ return m_linkModel;
}
/**
@@ -104,7 +103,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
* the authoring step
*/
protected ItemSelectionModel getItemSelectionModel() {
- return m_itemModel;
+ return m_itemModel;
}
/**
@@ -114,7 +113,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
* the authoring step
*/
protected BigDecimalParameter getLinkParam() {
- return m_linkParam;
+ return m_linkParam;
}
/**
@@ -135,7 +134,7 @@ public abstract class LinkPropertiesStep extends ResettableContainer {
* @return The edit form
*/
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);
}
}
-