Requirement: I want to display an image and a message or a static html content with look and feel like a webpage in an Applet.
Solution: Most of the developers will say symbolic URL is the only method to display a Web based content in an applet. This approach will give you another great option that many people do not know.
Have you ever seen Field Retrieval Type property in a Control? You might have used it for Symbolic Url. But have you got a chance to see other available options in this property. I am going to tell you about Field Retrieval Type = Service.
If you set this to Service, you need to provide a Control User Prop to the control.
Name = Field Retrieval Service : Value = ContentBase - Asset Publish Service
This is the only available service for the retrieval type. It checks the value of the control and looks up the value of Row Id of record in Administration - Content Center -> Content Assets. If it finds a record with the same id, it shows the asset content that is added in this content view.
If you click on Edit HTML in the top applet, it opens a HTML editor popup. You can enter text or links, with different fonts and other settings similar to a word document. Once you are done with editing, you can add an image also in the same applet if needed. Remember to checkout and check in the asset using buttons in top applet.
Once you are done with creating the Content Asset, you can be able to see the content in desired applet. This is documented in bookshelf.
You might get strucked up by this error. Record cannot be found or is not visible to you.(SBL-CTM-00326)
This is because we do not have access to the content Asset records. The access is group based, so add you access group in the Access Group sub view in Content Assets.
Alternatively if you need to open a popup window with the required Static HTML content with images etc, you can use SWE commands like this:
http://localhost:8080/start.swe?SWEMethod=GetPublishedContent&SWECmd=InvokeMethod&SWEService=ContentBase+-+Asset+Version+Publish+Service&&ContentIdentifier=1-282F8
Provide the content Id in the last argument in below url.
If you are looking for ways to display an image or a service level agreement or an offer that should look and behave like a webpage, this is the best way to achieve the requirement.
Solution: Most of the developers will say symbolic URL is the only method to display a Web based content in an applet. This approach will give you another great option that many people do not know.
Have you ever seen Field Retrieval Type property in a Control? You might have used it for Symbolic Url. But have you got a chance to see other available options in this property. I am going to tell you about Field Retrieval Type = Service.
If you set this to Service, you need to provide a Control User Prop to the control.
Name = Field Retrieval Service : Value = ContentBase - Asset Publish Service
This is the only available service for the retrieval type. It checks the value of the control and looks up the value of Row Id of record in Administration - Content Center -> Content Assets. If it finds a record with the same id, it shows the asset content that is added in this content view.
If you click on Edit HTML in the top applet, it opens a HTML editor popup. You can enter text or links, with different fonts and other settings similar to a word document. Once you are done with editing, you can add an image also in the same applet if needed. Remember to checkout and check in the asset using buttons in top applet.
Once you are done with creating the Content Asset, you can be able to see the content in desired applet. This is documented in bookshelf.
You might get strucked up by this error. Record cannot be found or is not visible to you.(SBL-CTM-00326)
This is because we do not have access to the content Asset records. The access is group based, so add you access group in the Access Group sub view in Content Assets.
Alternatively if you need to open a popup window with the required Static HTML content with images etc, you can use SWE commands like this:
http://localhost:8080/start.swe?SWEMethod=GetPublishedContent&SWECmd=InvokeMethod&SWEService=ContentBase+-+Asset+Version+Publish+Service&&ContentIdentifier=1-282F8
Provide the content Id in the last argument in below url.
If you are looking for ways to display an image or a service level agreement or an offer that should look and behave like a webpage, this is the best way to achieve the requirement.
Thank you for providing good information from Kexlin
ReplyDeleteYou are in the right place for a perfect solution for any app development company in hyderabad. We are well known for delivering the best quality Mobile Application Development Solutions to our clients.