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 5c3c337cd..2546ec287 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 @@ -18,6 +18,7 @@ import com.arsdigita.bebop.Component; import com.arsdigita.bebop.FormSection; import com.arsdigita.bebop.SimpleContainer; import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ContentType; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.contenttypes.ui.LinkPropertiesStep; @@ -29,6 +30,7 @@ import com.arsdigita.cms.contenttypes.ui.LinkTable; public class RelatedLinkPropertiesStep extends LinkPropertiesStep { protected String m_linkListName = ""; + protected ContentType m_contentType = null; /** * Constructor. Creates a RelatedLinkPropertiesStep given an @@ -48,6 +50,7 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep { * Sets a RelatedLinkSelectionModel as the * LinkSelectionModel for this authoring step. */ + @Override protected void setLinkSelectionModel() { setLinkSelectionModel( new RelatedLinkSelectionModel(getLinkParam())); @@ -83,7 +86,8 @@ public class RelatedLinkPropertiesStep extends LinkPropertiesStep { protected FormSection getEditSheet() { return new RelatedLinkPropertyForm(getItemSelectionModel(), getLinkSelectionModel(), - m_linkListName); + m_linkListName, + m_contentType); } } diff --git a/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java b/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java index 3099bbf38..b3985c4f3 100755 --- a/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java +++ b/ccm-cms-assets-relatedlink/src/com/arsdigita/cms/contentassets/ui/RelatedLinkPropertyForm.java @@ -67,13 +67,14 @@ public class RelatedLinkPropertyForm extends LinkPropertyForm { public RelatedLinkPropertyForm(ItemSelectionModel itemModel, LinkSelectionModel link, String linkListName) { - super(itemModel, link); + this(itemModel, link, linkListName, null); } public RelatedLinkPropertyForm(ItemSelectionModel itemModel, - LinkSelectionModel link, ContentType contentType) { + LinkSelectionModel link, String linkListName, ContentType contentType) { super(itemModel, link, contentType); + m_linkListName = linkListName; } @Override diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertyForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertyForm.java index a3c053618..45b864c09 100755 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertyForm.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/LinkPropertyForm.java @@ -173,7 +173,7 @@ public class LinkPropertyForm extends FormSection add(m_targetURI); add(new Label("Content Item:")); - m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, m_itemModel.getContentType()); + m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, m_contentType); m_itemSearch.getSearchButton().setOnFocus("toggle_link_fields(true)"); m_itemSearch.getClearButton().setOnFocus("toggle_link_fields(true)"); add(m_itemSearch);