Skip to main content
7-Bedrock
May 16, 2024
Solved

Issue with primary attachment component not displaying properly

  • May 16, 2024
  • 2 replies
  • 835 views
Hello, I'm currently practicing Windchill Customization by referring to the Windchill Customization Guide. 
I'm trying to attach a Primary Attachment to a Pet, but even when I refer to the guide's examples, the primary attachment component doesn't appear. 
Other attributes, includeing the attachment wizard step, are displayed correctly. 
Here's my code. 
 
-------------------------------
petCreate.jsp : 
<%@taglib prefix="jca" uri="http://www.ptc.com/windchill/taglib/components"%>
<%@taglib prefix="attachments" 
<%@include file="/netmarkets/jsp/components/beginWizard.jspf"%>
<%@include file="/netmarkets/jsp/components/includeWizBean.jspf"%>
<jca:initializeItem 
baseTypeName="com.Pet" 
operation="${createBean.create}" 
attributePopulatorClass="com.ptc.core.components.forms.DefaultAttributePopulator"/>
 
<jca:wizard formProcessorController="com.form.TestFormProcessorController">
   <jca:wizardStep action="petDefineItemAttributesWizStep" type="pet"/>
   <jca:wizardStep action="attachments_step" type="attachments"/>
</jca:wizard>
 
<%@include file="/netmarkets/jsp/util/end.jspf"%>
-------------------------------
 
-------------------------------
pet-actions.xml : 
<objecttype name="pet" class="com.Pet" resourceBundle="com.jca.testManagerResource">
 
<action name="create">
<command class="com.form.CreatePetFormProcessor" url="jsp/ootb/petCreate.jsp" method="execute" windowType="popup"/>
</action>
 
<action name="modify">
<command class="com.ptc.core.components.forms.DefaultEditFormProcessor" url="jsp/ootb/petModify.jsp" windowType="popup"/>
</action>
 
<action name="petDefineItemAttributesWizStep" afterVK="setAttributesWizStep" preloadWizardPage="true" required="true">
<command url="jsp/ootb/petCreateAttrWizStep.jsp" windowType="wizard_step"/>
</action>
 
</objecttype>
-------------------------------
 
 
-------------------------------
petCreateAttrWizStep.jsp :
<%@taglib uri="http://www.ptc.com/windchill/taglib/mvc" prefix="mvc"%>
<%@include file="/netmarkets/jsp/util/begin_comp.jspf"%>
<%@taglib prefix="attachments" 
 
<jsp:include page="${mvc:getComponentURL('com.builder.PetSetAttributePanelBuilder')}"/>
<attachments:primaryAttachment/>       <------- Where I want the component to appear, but noting happened.
 
<%@include file="/netmarkets/jsp/util/end_comp.jspf"%>
-------------------------------
 
If there's anywhere I've made a mistake, please let me know. Thank you.
Best answer by HK_9132704


The issue was resolved.

While debugging the source of com.ptc.windchill.enterprise.tags.attachments.PrimaryAttachmentsTag, I found that the Tag was not working because the "createType" attribute value was missing in the servlet request object.

2 replies

Community Moderator
May 20, 2024

Hi HK_9132704,

Thank you for your question. 
I’d like to recommend to bring more details and context to your initial inquiry
 

It also helps to have screenshot(s) to better understand what you are trying to do in your process. 

This will increase your chances to receive meaningful help from other Community members. 

Regards,

Community Moderation Team.

HK_91327047-BedrockAuthorAnswer
7-Bedrock
June 3, 2024


The issue was resolved.

While debugging the source of com.ptc.windchill.enterprise.tags.attachments.PrimaryAttachmentsTag, I found that the Tag was not working because the "createType" attribute value was missing in the servlet request object.