| Author |
how to obtain skin name programmatically in portlet
|
|
|
| Does anyone know how programmatically u can obtain the skin name from within a JSR168 portlet?
| |
|
| I don't know if there is a way to programatically query the Model SPI for that information, but I'm curious as to what you're trying to accomplish overall. Maybe we can help you come up with another process, as I think the need to query the skin indicate
s a possible design issue.
| |
|
|
thanks much!!
We are having one of the portlets doing lazy loading over bus.
So we kept it in an Iframe Skin.
We need to find if this skin is iframe or not primarily so that it can accordingly process the request in processAction(). This is a programming design we want to keep.
| |
|
| to add onto my last post iframe portlets have major limitations in terms of propert broker messaging and other things. So we need to check whether this is using iframe skin or not in processAction
| |
|
| >
> thanks much!!
> We are having one of the portlets doing lazy loading
> over bus.
> So we kept it in an Iframe Skin.
> We need to find if this skin is iframe or not
> primarily so that it can accordingly process the
> request in processAction(). This is a programming
> design we want to keep.
ok, let's think about this for a minute. This one portlet performs in two different ways according to which skin it has, is that correct? What happens if the portlet is NOT in an iFrame skin? How does the functionality differ?
| |
|
| yes . For example in case it is not using iframe the portlet can send message using broker .it is a limitation with broker not working with iframe
| |
|
| > yes . For example in case it is not using iframe the
> portlet can send message using broker .it is a
> limitation with broker not working with iframe
I'm still having trouble visualising the setup and your need to see the skin, but here's what one option:
In the portlet.xml file, portlet page, add a new instance of your portlet and parameterise it with sendMessage=true. In your portlet code, check to see if you're in the "message sendable" portlet instance or not by querying to see if that initialisation
parameter exists. Put the "message not-sendable" portlet instance in an iFrame skin.
| |
|
| hell there,thanks for thinking about the problem
well as far as requirement goes there are things which iframe portlet can do which normal portal cant and also there are things which normal portlet can do and iframe cant.
Examples of things not possible for Iframe cant do is messaging using Property Broker. So we needed a way to know in processAction() whether its iframe portlet or not and do things based on that.
I will get back to you with you with the solution you have suggested.
thanks much
|
|
|
|