You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2009/11/13 03:22:39 UTC

[jira] Created: (TRINIDAD-1637) always check for file modification if in DesignTime mode regardless of web.xml setting

always check for file modification if in DesignTime mode regardless of web.xml setting
--------------------------------------------------------------------------------------

                 Key: TRINIDAD-1637
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1637
             Project: MyFaces Trinidad
          Issue Type: New Feature
    Affects Versions:  1.2.12-core
            Reporter: Jeanne Waldman
            Assignee: Jeanne Waldman


We have the CHECK_FILE_MODIFICATION web.xml parameter. When set to true, the Skinning framework will check the skin's css files for modification, and regenerated the skin's stylesheetdocument (and rendered css file) if it has been modified.
DesignTime tools want to do this same thing, but does not want to set the user's web.xml parameter.

Add this code to StyleContextImpl:
  public boolean checkStylesModified()
  {
    if (Beans.isDesignTime())
    {
      // In Design Time mode, if we have a skin-id on the request scope,
      // then this means we want to check if the skin css files are modified.
      // This is an alternative to the initParam (CHECK_TIMESTAMP_PARAM) which
      // is set in web.xml. Design Time cannot set the web.xml file.
      FacesContext context = FacesContext.getCurrentInstance();
      Object requestSkinId = 
        ((CoreRenderingContext) _arc).getRequestMapSkinId(context);
      if (requestSkinId != null)
        return true;

    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-1637) always check for file modification if in DesignTime mode regardless of web.xml setting

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831602#action_12831602 ] 

Jeanne Waldman commented on TRINIDAD-1637:
------------------------------------------

I'm reverting this checkin and doing this a different way in TRINIDAD-1714 Mark the skin as dirty if DesignTime mode and org.apache.myfaces.trinidad.skin.id is set.

> always check for file modification if in DesignTime mode regardless of web.xml setting
> --------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1637
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1637
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>    Affects Versions:  1.2.12-core
>            Reporter: Jeanne Waldman
>            Assignee: Jeanne Waldman
>             Fix For: 1.2.13-core 
>
>         Attachments: DesignTimeFileModificationCheckPatch.patch
>
>
> We have the CHECK_FILE_MODIFICATION web.xml parameter. When set to true, the Skinning framework will check the skin's css files for modification, and regenerated the skin's stylesheetdocument (and rendered css file) if it has been modified.
> DesignTime tools want to do this same thing, but does not want to set the user's web.xml parameter.
> Add this code to StyleContextImpl:
>   public boolean checkStylesModified()
>   {
>     if (Beans.isDesignTime())
>     {
>       // In Design Time mode, if we have a skin-id on the request scope,
>       // then this means we want to check if the skin css files are modified.
>       // This is an alternative to the initParam (CHECK_TIMESTAMP_PARAM) which
>       // is set in web.xml. Design Time cannot set the web.xml file.
>       FacesContext context = FacesContext.getCurrentInstance();
>       Object requestSkinId = 
>         ((CoreRenderingContext) _arc).getRequestMapSkinId(context);
>       if (requestSkinId != null)
>         return true;
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TRINIDAD-1637) always check for file modification if in DesignTime mode regardless of web.xml setting

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeanne Waldman updated TRINIDAD-1637:
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.13-core 
           Status: Resolved  (was: Patch Available)

The best way to do this is to use the Skin.setDirty flag, but the design time team currently cannot do this.
See TRINIDAD-1687 add a Skin api that will clear the skin file(s) and reload at runtime
This will be committed soon.

> always check for file modification if in DesignTime mode regardless of web.xml setting
> --------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1637
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1637
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>    Affects Versions:  1.2.12-core
>            Reporter: Jeanne Waldman
>            Assignee: Jeanne Waldman
>             Fix For: 1.2.13-core 
>
>         Attachments: DesignTimeFileModificationCheckPatch.patch
>
>
> We have the CHECK_FILE_MODIFICATION web.xml parameter. When set to true, the Skinning framework will check the skin's css files for modification, and regenerated the skin's stylesheetdocument (and rendered css file) if it has been modified.
> DesignTime tools want to do this same thing, but does not want to set the user's web.xml parameter.
> Add this code to StyleContextImpl:
>   public boolean checkStylesModified()
>   {
>     if (Beans.isDesignTime())
>     {
>       // In Design Time mode, if we have a skin-id on the request scope,
>       // then this means we want to check if the skin css files are modified.
>       // This is an alternative to the initParam (CHECK_TIMESTAMP_PARAM) which
>       // is set in web.xml. Design Time cannot set the web.xml file.
>       FacesContext context = FacesContext.getCurrentInstance();
>       Object requestSkinId = 
>         ((CoreRenderingContext) _arc).getRequestMapSkinId(context);
>       if (requestSkinId != null)
>         return true;
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TRINIDAD-1637) always check for file modification if in DesignTime mode regardless of web.xml setting

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeanne Waldman updated TRINIDAD-1637:
-------------------------------------

    Status: Patch Available  (was: Open)

> always check for file modification if in DesignTime mode regardless of web.xml setting
> --------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1637
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1637
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>    Affects Versions:  1.2.12-core
>            Reporter: Jeanne Waldman
>            Assignee: Jeanne Waldman
>
> We have the CHECK_FILE_MODIFICATION web.xml parameter. When set to true, the Skinning framework will check the skin's css files for modification, and regenerated the skin's stylesheetdocument (and rendered css file) if it has been modified.
> DesignTime tools want to do this same thing, but does not want to set the user's web.xml parameter.
> Add this code to StyleContextImpl:
>   public boolean checkStylesModified()
>   {
>     if (Beans.isDesignTime())
>     {
>       // In Design Time mode, if we have a skin-id on the request scope,
>       // then this means we want to check if the skin css files are modified.
>       // This is an alternative to the initParam (CHECK_TIMESTAMP_PARAM) which
>       // is set in web.xml. Design Time cannot set the web.xml file.
>       FacesContext context = FacesContext.getCurrentInstance();
>       Object requestSkinId = 
>         ((CoreRenderingContext) _arc).getRequestMapSkinId(context);
>       if (requestSkinId != null)
>         return true;
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.