0

I want to make some slight modifications to the visualforce page display for an application that was installed via a managed package.

The manage package allows me to view the VisualForce code for the pages (but not components) but does not allow editing.

I can replicate the page by copying and pasting the code to a new page but can't save it because a component its trying to reference is in a different namespace. The code that is failing to load the component correctly is:

    <c:Taskboard boardId="{!$CurrentPage.parameters.boardId}" 
                recordId="{!$CurrentPage.parameters.recordId}" 
                relationshipName="{!$CurrentPage.parameters.relationshipName}" 
                showHeader="false" 
                showFilters="true"
                showBoardSwitcher="true"
                embeddedIframesAllowed="true"
                touchScope="{!if($CurrentPage.parameters.touchScope=='true',true,false)}" >
    </c:Taskboard>

I need to be able to access the component in the Namespace either from a page not in the namespace (not sure what the syntax would be to add the namespace to this component)

OR

I need to designate that my VF page is part of that namespace so it will have access to the same components without a change in the component syntax.

Are either of these two things possible?

2

Your approach of creating your own page which references the Taskboard component may be viable, there are however a few limiting factors which could affect this approach.

  1. Component definition - The Taskboard component will need to have been defined as global to allow you to call this component from outside the installed managed package.
  2. Component Attribute definition - To access the attributes on the taskboard component such as the boardId="" element each of these will also need to have been defined as global.
  3. License issues for the package - If you create an unmanaged page which references a component in a licensed managed package you may run into issues if the viewing user does not have a license assigned.

To find out if a component is global you can navigate to the component via Setup -> Develop -> Visualforce Components -> then either create a list view to filter the results down or find the component in question manually. If you are looking at a managed component then you will see a breakdown of the elements defined as global and therefore should be useable.


Regarding your question about the two possible options you would like to know about, the first option of the two would be possible.

I need to be able to access the component in the Namespace either from a page not in the namespace (not sure what the syntax would be to add the namespace to this component)

This can be achieved by replacing the c: part of the component call with the namespace of the package that the taskboard is in followed by the : then the component name.

E.g. if the taskboard was installed as part of a package with the namespace "abcd" the syntax to call the component within your visualforce page would be:

<abcd:taskboard boardId="{!$CurrentPage.parameters.boardId}" 
            recordId="{!$CurrentPage.parameters.recordId}" 
            relationshipName="{!$CurrentPage.parameters.relationshipName}" 
            showHeader="false" 
            showFilters="true"
            showBoardSwitcher="true"
            embeddedIframesAllowed="true"
            touchScope="{!if($CurrentPage.parameters.touchScope=='true',true,false)}" >
</abcd:Taskboard>`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.