Oracle ADF: Scheduled Gantt Chart Non-Working Days — oracle-tech

    Forum Stats

  • 3,681,448 Users
  • 2,238,014 Discussions
  • 7,831,224 Comments

Discussions

Oracle ADF: Scheduled Gantt Chart Non-Working Days

Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon
edited October 2 in JDeveloper and ADF

Hello Techs,

Can anyone help me in below

I am using JDeveloper IDE Version, Oracle IDE 12.2.1.0.42.170105.1157

I have created a Schedule Gantt chart using Oracle ADF technology. I am trying to specify and show non-working days in a different color.

The problem is that when I specify non-working days using the backing bean below method:

public int[] getNonWorkingDaysOfWeek(){ 
    return new int[] {Calendar.SATURDAY, Calendar.SUNDAY};
}

I face below error when loading the page:

The content of this page failed to load as expected because data transmission was interrupted. Please try again, or contact your system administrator.

When I specify sun in the NonWorkingDaysOfWeek property, then the page loads the error:

Error 500--Internal Server Error


Tagged:

Answers

  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond
    edited October 2

    Have you tested this in the current version (12.2.1.4)?

    Your version is quite old and this problem might be already fixed.

    By the way, the doc (https://docs.oracle.com/middleware/12213/adf/tag-reference-dvt/tagdoc/dvt_schedulingGantt.html) states that the nonWorkingDayOfWeek is of type String[]. Your bean method returns int[] which results in the error (i guess, Ive not tested this).


    Timo


  • dvohra21dvohra21 Posts: 13,964 Gold Crown

    Is a popup displayed with error message? Please post detailed error message. While the issue Timo indicated could also be the issue, the error message could be due to some other issue.

  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon

    Please see below


  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond

    The new software prevents the posting of links to external pages if you don't have user level 4, at least (see https://community.oracle.com/tech/apps-infra/kb/articles/9-what-are-power-ups). I'm not aware of a limit of characters or lines a post can have. I'll ask an admin about this. Sorry for the inconvenience.


    Have you read my comments about the nonWorkingDayOfWeek?

    Or did you try to reproduce this in the current JDev version?


    Timo


  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon
    edited October 5

    Dear Tim,

    I have read your comments and modified my java bean code accordingly. But problem is still there. See below screen shots.

    Bean Code


    Gantt Properties

    Error When I run page.

    Attached is my complete project I am trying to work on. This sample application is connected with SCOTT schema.


    Thank You

  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon

    I have corrected Date Formatting.

    Now error is gone but Gantt chart do not display colors of non-Working days.


    Below is Output


    Attached is Latest Sample Apps


    Thanks

  • dvohra21dvohra21 Posts: 13,964 Gold Crown

    Seems like a permission issue as sys admin is directed to.

  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond

    @dvohra21 What are you talking about?

    I don't see any 'sys admin' directed to.


    Timo


  • dvohra21dvohra21 Posts: 13,964 Gold Crown

    Timo, The dialog in one of the screenshots indicates "Please try again, or contact your system administrator".

  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond

    @dvohra21 When you read hte thread, you'll notice that this error is gone after using the right data type

    Timo


  • dvohra21dvohra21 Posts: 13,964 Gold Crown

    Thanks Timo. The TaskType determines the color; red for Exclusion and green for inclusion. What is TaskType?

  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon

    Dear All,


    Can anyone help me?

  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond
  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon

    Dear Timo,


    I have attached a test case in my previous replies. This test case is based on scott schema instead of HR.


    Thanks

  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond

    The sample uses the scot schema which I don't have and can't install anyway (company rule).

    Any chance to make a sample using the HR schema?


    Timo


  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond

    I made a small test with the component demo using 12.2.1.4 as this is the only version I have up and running at the moment.

    I got this output from

                        <dvt:schedulingGantt id="schedulingGant" startTime="2006-12-21 01:00" endTime="2006-12-22 23:00"
                                             value="#{schedulingGantt.model}" var="resourceObj"
                                             dataChangeListener="#{schedulingGantt.handleDataChanged}"
                                             actionListener="#{schedulingGantt.handleAction}"
                                             binding="#{extEditor.component}"
                                             tooltipKeyLabels="#{schedulingGantt.tooltipLabels}"
                                             tooltipKeys="#{schedulingGantt.tooltipKeys}" summary="Scheduling Gantt Demo"
                                             taskbarFormatManager="#{schedulingGantt.taskbarFormatManager}"
                                             nonWorkingDaysOfWeek="sat sun" nonWorkingDaysColor="#ff1083">
    

    So it work for me.

    Timo


  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon

    Timo,

    Kindly also confirm if it is working with Managed Bean as well when we pass specific dates as non-Working Days.

    When I am doing the same which you did I face below problem



  • Waseem AbbasWaseem Abbas Posts: 8 Blue Ribbon

    When I use enumerated day of week above error goes but when I run the page it ends up with below error.


    Cannot convert tue of type class java.lang.String to class 
    


    Error 500--Internal Server Error

    javax.el.ELException: //C:/Users/Waseem Abbas/AppData/Roaming/JDeveloper/system12.2.1.0.42.170105.1157/o.j2ee/drs/hr/ViewControllerWebApp.war/untitled1.jsf @11,91 nonWorkingDaysOfWeek="tue": java.lang.IllegalArgumentException: Cannot convert tue of type class java.lang.String to class [I
    	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
    	at oracle.adfinternal.view.faces.bi.taglib.gantt.BaseGanttTag.setDaysOfWeekHelper(BaseGanttTag.java:683)
    	at oracle.adfinternal.view.faces.bi.facelets.gantt.rules.GanttRule$NonWorkingDaysOfWeekMetaData.applyMetadata(GanttRule.java:102)
    	at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:81)
    	at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:129)
    	at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:102)
    	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.doNewComponentActions(ComponentTagHandlerDelegateImpl.java:491)
    	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:178)
    	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
    	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    	at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
    	at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    	at oracle.adfinternal.view.faces.facelets.rich.RichDocumentHandler.applyNextHandler(RichDocumentHandler.java:68)
    	at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:202)
    	at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    	at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:225)
    	at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    	at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:87)
    	at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:161)
    	at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:1006)
    	at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.buildView(ViewDeclarationLanguageWrapper.java:94)
    	at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.buildView(ViewDeclarationLanguageWrapper.java:94)
    	at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:322)
    	at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager._processViewDefinitionLanguage(ResponseRenderManager.java:105)
    	at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView(ResponseRenderManager.java:41)
    	at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1228)
    	at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeRenderResponse(LifecycleImpl.java:1040)
    	at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:332)
    	at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:254)
    	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:651)
    	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
    	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
    	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
    	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
    	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    	at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:194)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    	at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
    	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)
    	at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)
    	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:354)
    	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:232)
    	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    	at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:141)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    	at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:649)
    	at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:124)
    	at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:232)
    	at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    	at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:224)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    	at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
    	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3654)
    	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3620)
    	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
    	at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:196)
    	at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
    	at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
    	at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2423)
    	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2280)
    	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2258)
    	at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1626)
    	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1586)
    	at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)
    	at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
    	at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
    	at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
    	at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
    	at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617)
    	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:397)
    	at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
    Caused by: javax.el.ELException: java.lang.IllegalArgumentException: Cannot convert tue of type class java.lang.String to class [I
    	at com.sun.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:87)
    	at javax.el.ELContext.convertToType(ELContext.java:478)
    	at com.sun.el.lang.EvaluationContext.convertToType(EvaluationContext.java:166)
    	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:229)
    	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
    	... 78 more
    Caused by: java.lang.IllegalArgumentException: Cannot convert tue of type class java.lang.String to class [I
    	at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:428)
    	at com.sun.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:85)
    	... 82 more
    


  • Timo HahnTimo Hahn Senior Principal Technical Consultant Moderator Posts: 36,256 Red Diamond
    edited October 19

    You can ignore this message, I see the same. It's an bug in the dtd behind the audit which doesn't allow space delimited day values as the doc describes. However, running the page will show the right result as you see in my image.

    And keep in mind that I used JDev 12.2.1.4 as I don't have a 12.2.1.0 version available.


    Timo


Sign In or Register to comment.