Hi,
I am creating a file downloader component in magnolia 4.5.9 to create download
links for documents inside the repository.
I am using blossoms 2 for my development.
For this purpose I created a DownloadComponent.java class which is a component.
[code]@Controller
@Template(id = "myBlossomModule:components/dwnldLink", title = "DwnldLink")
@TemplateDescription("Simple Download link Block")
public class DownloadComponent {
....
....
}[/code]
To get the dms downloader in my dialog i used the following code.
[code]try {
DialogDAM control =
Classes.getClassFactory().newInstance(DialogDAM.class);
control.setName("fileUpload");
control.setLabel("FileUpload");
control.setDescription("Upload your file");
DialogCreationContext context = tab.getContext();
control.init(context.getRequest(), context.getResponse(),
context.getWebsiteNode(), null);
control.setConfig("i18nBasename",
"info.magnolia.module.templatingkit.messages");
control.getStorageNode();
tab.getTab().addSub(control);
} catch (RepositoryException e) {
throw new RuntimeRepositoryException(e);
}[/code]
Now I am not sure [b]how to display the selected document as a link in my jsp
page[/b].
If I am using the below, I get a link as dms which is invalid
[code]<cmsold:out nodeDataName="fileUpload" uuidToLinkRepository="dms"
uuidToLink="absolute" var="imageUrl" />
<a href="${pageContext.request.contextPath}${imageUrl}">
Link
</a>[/code]
Please help....
Regards,
Probal
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=9f04a5ff-e34f-4c98-a35a-7f05b6d56c0f
You are invited to Magnolia Conference. Less than a month to go! Register now:
http://www.magnolia-cms.com/conference/register.html
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------