ICEfaces
  1. ICEfaces
  2. ICE-6830

icecore:config configuration is propogated to included xhtmls

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 3.1.0.BETA1, 3.1
    • Component/s: Bridge, ICE-Components
    • Labels:
      None
    • Environment:
      Liferay 6, Portlet developed using Icefaces 2.0 + JSF 2.0, Windows XP

      Description

      To give a little background, what we are trying to achieve is create a portlet using icefaces 2.0(portletfaces bridge 2.0), deploy the same in Liferay 6 portal server. And achieve Interportlet communication using publish-supported-publishing-event and supported-processing-event elements(which is supported by the bridge only if the view is completely in JSF, and works like a charm).

      Raised the issue with portletfaces. Pl find here what Neil Griffin has to say:
      http://www.portletfaces.org/community/forums/-/message_boards/message/56588

      Problem Description more in context of icefaces:

      To give a brief idea on my view:
      a.xhtml - i require icefaces components
      a.xhtml includes b.xhtml using ui:include
      in b.xhtml again i require some of ice components but this is something i'm willing to change to all JSF components.
      b.xhtml contains <icecore:config render="false"/>

      When i do not include b.xhtml, then all is well, a.xhtml renders.

      But fails the moment a.xhtml is incuded because it does not find a renderer for icefaces components.

      Obtained error is:
      14:41:34,200 SEVERE [DOMContext] ICEfaces rendering required by icefaces-compat.jar components. Enable via <icecore:config render="true" />.
      14:41:34,200 SEVERE [application] Error Rendering View[/xhtml/patientsearch/patientSearch.xhtml]
      java.lang.UnsupportedOperationException: ICEfaces rendering required.
              at com.icesoft.faces.context.DOMContext.getDOMContext(DOMContext.java:235)

        Activity

        Hide
        Pawel Lewandowski added a comment -

        I have similar problem. In portal environment standard command components rendered by IceFaces (e.g. h:commandLink, h:CommandButton) generate portlet ResourceRequest's and ResourceResponse's (AJAX request/response). But sometimes there is a need to have ActionRequest, ActionResponse objects, for example when portlet mode or portlet window state must be changed. Standard components rendered by default JSF HTML render kit generate such request/response (non AJAX). The possibility of disabling IceFaces rendering for whole page (<icecore:config render="false"/> ) is not good enaugh, because when ActionRequest/ActionResponse is needed there must not be any IceFaces component on the page - if components are present "ICEfaces rendering required" exception is thrown.

        In my opinion standard JSF component rendering (e.g. h:commandLink) should be delegated to standard JSF HTML renderer and IceFaces components (e.g. ice:commandLink) should be rendered by IceFaces DOM renderer kit. Developer decides what behaviour is expected.

        Rashmi, have you found any solution or workaround for problem you have described?

        Show
        Pawel Lewandowski added a comment - I have similar problem. In portal environment standard command components rendered by IceFaces (e.g. h:commandLink, h:CommandButton) generate portlet ResourceRequest's and ResourceResponse's (AJAX request/response). But sometimes there is a need to have ActionRequest, ActionResponse objects, for example when portlet mode or portlet window state must be changed. Standard components rendered by default JSF HTML render kit generate such request/response (non AJAX). The possibility of disabling IceFaces rendering for whole page (<icecore:config render="false"/> ) is not good enaugh, because when ActionRequest/ActionResponse is needed there must not be any IceFaces component on the page - if components are present "ICEfaces rendering required" exception is thrown. In my opinion standard JSF component rendering (e.g. h:commandLink) should be delegated to standard JSF HTML renderer and IceFaces components (e.g. ice:commandLink) should be rendered by IceFaces DOM renderer kit. Developer decides what behaviour is expected. Rashmi, have you found any solution or workaround for problem you have described?
        Hide
        Ted Goddard added a comment - - edited

        Pawal,

        Your issue is different from the one the JIRA is for. icecore:config render="#

        {bean.useICEfaces}

        " /> may be used in some inclusion cases described above.

        If distinct portlets are inheriting the property from each other, a test case is required.

        Please create a new JIRA for your specific issue.

        Show
        Ted Goddard added a comment - - edited Pawal, Your issue is different from the one the JIRA is for. icecore:config render="# {bean.useICEfaces} " /> may be used in some inclusion cases described above. If distinct portlets are inheriting the property from each other, a test case is required. Please create a new JIRA for your specific issue.
        Hide
        Rashmi Rajappa added a comment -

        Pawel,

        I have not found a wrokaround. We ended up buying IcefacesEE for 1.8. But still many issues we faced persist

        Ted,Ken,Deryk,
        Pawel n me are facing similar issue. Even i require a actionrequest/response to perform IPC as per JSR286. But icefaces decorates JSF lifecycle, depriving us of ActionRequest/Response, we always receive ResourceRequest/Response.

        Show
        Rashmi Rajappa added a comment - Pawel, I have not found a wrokaround. We ended up buying IcefacesEE for 1.8. But still many issues we faced persist Ted,Ken,Deryk, Pawel n me are facing similar issue. Even i require a actionrequest/response to perform IPC as per JSR286. But icefaces decorates JSF lifecycle, depriving us of ActionRequest/Response, we always receive ResourceRequest/Response.
        Hide
        Ken Fyten added a comment -

        Rashmi, if you are have and ICEfaces EE 1.8 support subscription, please contact product support with this issue.

        Show
        Ken Fyten added a comment - Rashmi, if you are have and ICEfaces EE 1.8 support subscription, please contact product support with this issue.
        Hide
        Rashmi Rajappa added a comment -

        Ken,

        Yes we have approached Icefaces EE 1.8 support.

        But the topic of this issue is with Icefaces 2.0. We bought 1.8 as a temporary solution till we can get 2.0 working.
        If you could help us with a solution here it would be very beneficial.

        Show
        Rashmi Rajappa added a comment - Ken, Yes we have approached Icefaces EE 1.8 support. But the topic of this issue is with Icefaces 2.0. We bought 1.8 as a temporary solution till we can get 2.0 working. If you could help us with a solution here it would be very beneficial.
        Hide
        Deryk Sinotte added a comment -

        From what we can tell from the descriptions, there are two different issues here:

        #1) As I understand of the original JIRA description, there is a desire to have ICEfaces rendering be configurable for only some parts of a View and not others. This isn't necessarily a portlet issue. Any page that had includes as described would have the same behaviour. However, because the icecore:config tag is scoped to the entirety of the current view, it's not currently possible to have the rendering constrained to only some parts of the component tree. The work to be able to support this as a new feature would be fairly substantial. We can open a separate JIRA for this as a new feature but can't promise when it might be considered for inclusion for a future release.

        #2) With two separate ICEfaces portlets on a page (and therefore 2 separate Views), it should theoretically be possible to have separate icecore:config settings so that one portlet can be set to false and one true without them overriding each other. The tag information is stored as an attribute of the View. We'll take a look to ensure that there isn't a bug here and try and fix it for the next release. This is more of a portlet-specific problem in that 2 separate and distinct views are on a single page at the same time and therefore each can support their own value for ICEfaces rendering.

        Show
        Deryk Sinotte added a comment - From what we can tell from the descriptions, there are two different issues here: #1) As I understand of the original JIRA description, there is a desire to have ICEfaces rendering be configurable for only some parts of a View and not others. This isn't necessarily a portlet issue. Any page that had includes as described would have the same behaviour. However, because the icecore:config tag is scoped to the entirety of the current view, it's not currently possible to have the rendering constrained to only some parts of the component tree. The work to be able to support this as a new feature would be fairly substantial. We can open a separate JIRA for this as a new feature but can't promise when it might be considered for inclusion for a future release. #2) With two separate ICEfaces portlets on a page (and therefore 2 separate Views), it should theoretically be possible to have separate icecore:config settings so that one portlet can be set to false and one true without them overriding each other. The tag information is stored as an attribute of the View. We'll take a look to ensure that there isn't a bug here and try and fix it for the next release. This is more of a portlet-specific problem in that 2 separate and distinct views are on a single page at the same time and therefore each can support their own value for ICEfaces rendering.
        Hide
        Jack Van Ooststroom added a comment -

        I tested the second part as mentioned by Deryk in the previous comment.

        Using the ICEfaces 2.0.2 release I added a PhaseListener which prints the blockUIOnSubmit value for the current context:

        public void afterPhase(final PhaseEvent event) {
        if (event.getPhaseId() == PhaseId.RENDER_RESPONSE)

        { LOGGER.log( Level.INFO, "Render [Get]: " + FacesContext.getCurrentInstance().getViewRoot().getViewMap().get(EnvUtils.BLOCK_UI_ON_SUBMIT)); }

        }

        public void beforePhase(final PhaseEvent event) {
        }

        public PhaseId getPhaseId()

        { return PhaseId.ANY_PHASE; }

        Then I took two portlets and changed its contents by adding the icecore config as well as a config tag containing the blockUIOnSubmit attribute with two different values:

        <ice:panelGroup styleClass="componentBox"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ice="http://www.icesoft.com/icefaces/component"
        xmlns:icecore="http://www.icefaces.org/icefaces/core">

        <icecore:config blockUIOnSubmit="true" />

        Using Liferay 6.0.6 I created a portal page containing these two portlets. Interacting with either portlet shows the expected values.

        Show
        Jack Van Ooststroom added a comment - I tested the second part as mentioned by Deryk in the previous comment. Using the ICEfaces 2.0.2 release I added a PhaseListener which prints the blockUIOnSubmit value for the current context: public void afterPhase(final PhaseEvent event) { if (event.getPhaseId() == PhaseId.RENDER_RESPONSE) { LOGGER.log( Level.INFO, "Render [Get]: " + FacesContext.getCurrentInstance().getViewRoot().getViewMap().get(EnvUtils.BLOCK_UI_ON_SUBMIT)); } } public void beforePhase(final PhaseEvent event) { } public PhaseId getPhaseId() { return PhaseId.ANY_PHASE; } Then I took two portlets and changed its contents by adding the icecore config as well as a config tag containing the blockUIOnSubmit attribute with two different values: <ice:panelGroup styleClass="componentBox" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:icecore="http://www.icefaces.org/icefaces/core"> <icecore:config blockUIOnSubmit="true" /> Using Liferay 6.0.6 I created a portal page containing these two portlets. Interacting with either portlet shows the expected values.
        Hide
        Jack Van Ooststroom added a comment -

        Using ICEfaces 3 I confirmed again that two separate portlets on a portal page can have their own icecore:config configuration. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - Using ICEfaces 3 I confirmed again that two separate portlets on a portal page can have their own icecore:config configuration. Marking this one as FIXED.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Rashmi Rajappa
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: