JSF Databinding

Hi All,
I have a questions regarding the databinding of objects on a JSF page. I come from the world of .Net and have to redesign our intranet in Java using the webcenter framework and a little confused about how this works?
In .NET I have a page let's say Default.aspx, associated with that page is a codebehind file called Default.aspx.cs (CSharp)
Now lets say that I drop a .NET Gridview onto the page and bind it to a datasource which is a list of employees in a database table.
So far so good, I managed to do this in Java
What if I wanted this grid of employees to recognize the current user and bold their name?
In .NET in the code behind page I have access to a method called GridViewOnDatabind() and in that method I can evaluate the results of the data source for each record and look for the current username, when I find the username I am after I can apply some style to it.
For example, here is a snippet to try and explain what I mean
public void GridViewOnDatabind(eventargs e, sender s)
if(s.getColumn["lastName"].toString().Equals("Ragsdale"))
s.getColumn["lastName"].style.add("font-weight", "bold");
The nice thing about this is that .NET allows me to separate this kind of logic from the view page and keeps it in a source file. Please tell me that Java can do something similar without putting code inside the page itself?
If anyone could explain how this would be done that would be awesome, I use this sort of logic everyday in most of my applications. Also if anyone could recommend a good book or tutorial for someone coming from .NET that would be great as well.
Thanks a ton in advance.

You can write this code in a JSF managed bean that has access to your component.
But a simpler way of doing it would be to use an expression language in your item definition to conditionally highlight it:
http://stegemanoracle.wordpress.com/2007/06/03/conditionally-showing-fields-based-upon-attribute-value-part-deux/
http://thepeninsulasedge.com/frank_nimphius/2008/04/10/adf-faces-conditionally-color-table-cell-background-2/

Similar Messages

  • Issues deploying to Glassfish - Cast exceptions (DefinitionContextAgeable)

    Hi there, hope you can help me
    JDev 11.2.3.0 with Glassfish 3.1.2.2
    I used ADF Essentials and all works fine for a small fast application I made.
    But I'm working on a bigger project (without using features not included in ADFE). All is configured as my small project but I have an Exception even before my first page appears:
    [#|2013-01-16T10:28:02.318+0100|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=250;_ThreadName=Thread-2;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.ClassCastException: oracle.jbo.mom.DefinitionContextAgeable cannot be cast to oracle.jbo.mom.DefinitionContext
         at oracle.jbo.mom.DefinitionManager.getCurrentDefinitionContext(DefinitionManager.java:2809)
         at oracle.jbo.mom.DefinitionManager.findLoadedObject(DefinitionManager.java:2639)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.findCpx(JUMetaObjectManager.java:637)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:695)
         at oracle.adf.model.BindingContext.initialize(BindingContext.java:361)
         at oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:234)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:171)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    |#]
    And when trying to access it a second time I face another cast exceptions:
    [#|2013-01-16T10:39:14.665+0100|WARNING|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.context.RichExceptionHandler|_ThreadID=274;_ThreadName=http-thread-pool-8888(1);|ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RESTORE_VIEW 1
    java.lang.ClassCastException: oracle.adf.model.servlet.HttpBindingContext cannot be cast to oracle.adf.model.BindingContext
    at oracle.adf.controller.binding.BindingUtils.getBindingContext(BindingUtils.java:47)
    at oracle.adf.controller.binding.BindingUtils.getBindingContext(BindingUtils.java:66)
    at oracle.adfinternal.controller.util.model.AdfmUtil.getBindingContext(AdfmUtil.java:42)
    at oracle.adfinternal.controller.util.model.AdfmInterfaceImpl.createDCFrame(AdfmInterfaceImpl.java:58)
    at oracle.adfinternal.controller.state.RootViewPortContextImpl.<init>(RootViewPortContextImpl.java:105)
    at oracle.adfinternal.controller.state.ControllerState.newRootViewPort(ControllerState.java:2391)
    at oracle.adfinternal.controller.state.ControllerState.initializeRootViewPort(ControllerState.java:645)
    at oracle.adfinternal.controller.state.ControllerState.synchronizeStatePart1(ControllerState.java:302)
    at oracle.adfinternal.controller.application.SyncNavigationStateListener.beforePhase(SyncNavigationStateListener.java:219)
    at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:550)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchBeforePagePhaseEvent(LifecycleImpl.java:147)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchBeforePagePhaseEvent(ADFPhaseListener.java:119)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:63)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.beforePhase(ADFLifecyclePhaseListener.java:44)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:327)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
    |#]
    [#|2013-01-16T10:39:14.668+0100|SEVERE|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.context.RichExceptionHandler|_ThreadID=274;_ThreadName=http-thread-pool-8888(1);|ADF_FACES-30179:For more information, please see the server's error log for an entry beginning with: The UIViewRoot is null. Fatal exception during PhaseId: RESTORE_VIEW 1.
    java.lang.ClassCastException: oracle.adf.model.servlet.HttpBindingContext cannot be cast to oracle.adf.model.BindingContext
    at oracle.adf.controller.binding.BindingUtils.getBindingContext(BindingUtils.java:47)
    at oracle.adf.controller.binding.BindingUtils.getBindingContext(BindingUtils.java:66)
    at oracle.adfinternal.controller.util.model.AdfmUtil.getBindingContext(AdfmUtil.java:42)
    at oracle.adfinternal.controller.util.model.AdfmInterfaceImpl.createDCFrame(AdfmInterfaceImpl.java:58)
    at oracle.adfinternal.controller.state.RootViewPortContextImpl.<init>(RootViewPortContextImpl.java:105)
    at oracle.adfinternal.controller.state.ControllerState.newRootViewPort(ControllerState.java:2391)
    at oracle.adfinternal.controller.state.ControllerState.initializeRootViewPort(ControllerState.java:645)
    at oracle.adfinternal.controller.state.ControllerState.synchronizeStatePart1(ControllerState.java:302)
    at oracle.adfinternal.controller.application.SyncNavigationStateListener.beforePhase(SyncNavigationStateListener.java:219)
    at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:550)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.dispatchBeforePagePhaseEvent(LifecycleImpl.java:147)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.dispatchBeforePagePhaseEvent(ADFPhaseListener.java:119)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.beforePhase(ADFPhaseListener.java:63)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.beforePhase(ADFLifecyclePhaseListener.java:44)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:327)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
    |#]
    I dont understand the problem. I made changes to the application (Connections, descriptors aso.) and always facing this error...
    It seams it fails before beginning to load the page and I dont know how to find where can I resolve this
    Does smeone have any idea?

    I set the logger to CONFIG and noticed some warnings that may be the cause of the deployment's fail
    [#|2013-01-16T14:57:35.524+0100|INFO|oracle-glassfish3.1.2|org.glassfish.admingui|_ThreadID=72;_ThreadName=admin-thread-pool-4848(6);| *uploadFileName=GlassMRI.ear* |#]
    [#|2013-01-16T14:57:42.350+0100|WARNING|oracle-glassfish3.1.2|global|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *Error in annotation processing: java.lang.NoClassDefFoundError: weblogic/servlet/http/AbstractAsyncServlet* |#]
    [#|2013-01-16T14:57:42.368+0100|WARNING|oracle-glassfish3.1.2|global|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *Error in annotation processing: java.lang.NoClassDefFoundError: weblogic/servlet/http/AbstractAsyncServlet* |#]
    [#|2013-01-16T14:57:42.514+0100|WARNING|oracle-glassfish3.1.2|global|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *Error in annotation processing: java.lang.NoClassDefFoundError: weblogic/servlet/http/AbstractAsyncServlet* |#]
    [#|2013-01-16T14:57:42.567+0100|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|DPL8027: Ignore WEB-INF/weblogic.xml in archive /home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/mriGlassWar_war/, as GlassFish counterpart runtime xml WEB-INF/glassfish-web.xml is present in the same archive.|#]
    [#|2013-01-16T14:57:42.573+0100|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|DPL8007: Unsupported deployment descriptors element schemaLocation value http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.1/weblogic-application.xsd|#]
    [#|2013-01-16T14:57:42.573+0100|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|DPL8007: Unsupported deployment descriptors element listener-class value oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener|#]
    [#|2013-01-16T14:57:42.573+0100|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|DPL8007: Unsupported deployment descriptors element listener-class value oracle.mds.lcm.weblogic.WLLifecycleListener|#]
    [#|2013-01-16T14:57:42.574+0100|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|DPL8007: Unsupported deployment descriptors element library-name value adf.oracle.domain|#]
    [#|2013-01-16T14:57:48.637+0100|INFO|oracle-glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/com.dbiservices.capacityplanning.mri'|#]
    [#|2013-01-16T14:57:50.141+0100| *SEVERE* |oracle-glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *JSF1051: Service entry 'org.glassfish.faces.integration.GlassFishInjectionProvider' does not extend DiscoverableInjectionProvider.  Entry will be ignored.* |#]
    [#|2013-01-16T14:57:50.143+0100|INFO|oracle-glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.|#]
    [#|2013-01-16T14:57:51.308+0100|CONFIG|oracle-glassfish3.1.2|oracle.adf.share.http.ServletADFContext|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|Jar Path,Oracle-Version,Oracle-Label,Oracle-Builder,Oracle-BuildTimestamp,Specification-Version,Implementation-Version
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/mriGlassWar_war/WEB-INF/lib/adf-pageflow-dtrt.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 08:36:03 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/mriGlassWar_war/WEB-INF/lib/mriGlassJar.jar,,,,,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/mriGlassWar_war/WEB-INF/lib/jewt4.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official
    Builder,2012-09-18 07:23:00 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/jdev-cm.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 07:26:10 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adflibfilter.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 08:33:12 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adftransactionsdt.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 07:59:42 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adfm-sqldc.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 09:19:55 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adf-share-glassfish.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 08:06:03 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adf-sec-idm-dc.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 08:11:20 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adf-runtime-mbean.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 08:11:14 -0700,,
    file:/home/oracle/cpdeploy/glassfish3/glassfish/domains/domain1/applications/GlassMRI/lib/adf-controller-schema.jar,11.1.2.3.39.62.76.1,JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1,Official Builder,2012-09-18 07:17:29 -0700,,|#]
    [#|2013-01-16T14:57:56.192+0100|CONFIG|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|ADFv: ADF JSF databinding support installed.|#]
    [#|2013-01-16T14:57:56.218+0100|CONFIG|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.config.rich.FacesDatabindingConfigurator|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|ADFv: ADF JSF databinding support for BC4J installed.|#]
    [#|2013-01-16T14:57:56.371+0100|WARNING|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.partition.FeatureUtils|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *Ignoring feature-dependency on feature "AdfDvtCommon".  No such feature exists.* |#]
    [#|2013-01-16T14:57:56.372+0100|WARNING|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.partition.FeatureUtils|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *Ignoring feature-dependency on feature "AdfDvtCommon".  No such feature exists.* |#]
    [#|2013-01-16T14:57:56.372+0100|WARNING|oracle-glassfish3.1.2|oracle.adfinternal.view.faces.partition.FeatureUtils|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);| *Ignoring feature-dependency on feature "DvtDiagram".  No such feature exists.* |#]
    [#|2013-01-16T14:57:56.599+0100|SEVERE|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|WebModule[/com.dbiservices.capacityplanning.mri]PWC1270: Exception starting filter ADFLibraryFilter
    java.lang.InstantiationException
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:124)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4685)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5377)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
    at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)
    at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:207)
    at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
    at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
    at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: javax.servlet.ServletException: java.lang.RuntimeException: java.lang.ClassCastException: oracle.adf.share.common.rc.util.impl.LoaderUtilImpl cannot be cast to oracle.adf.share.common.rc.util.LoaderUtil$NewJRLClassLoader
    at oracle.adf.library.webapp.LibraryFilter.init(LibraryFilter.java:126)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:264)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:120)
    ... 64 more
    Caused by: java.lang.RuntimeException: java.lang.ClassCastException: oracle.adf.share.common.rc.util.impl.LoaderUtilImpl cannot be cast to oracle.adf.share.common.rc.util.LoaderUtil$NewJRLClassLoader
    at oracle.adf.share.common.rc.util.LoaderUtil.newJRLClassLoader(LoaderUtil.java:219)
    at oracle.adf.share.common.rc.util.LoaderUtil.justGetLoader(LoaderUtil.java:86)
    at oracle.adf.share.common.rc.util.LoaderUtil.getLoader(LoaderUtil.java:54)
    at oracle.adf.library.webapp.LibraryFilter.initClassLoader(LibraryFilter.java:458)
    at oracle.adf.library.webapp.LibraryFilter.init(LibraryFilter.java:102)
    ... 66 more
    Caused by: java.lang.ClassCastException: oracle.adf.share.common.rc.util.impl.LoaderUtilImpl cannot be cast to oracle.adf.share.common.rc.util.LoaderUtil$NewJRLClassLoader
    at oracle.adf.share.common.rc.util.LoaderUtil.newJRLClassLoader(LoaderUtil.java:214)
    ... 70 more
    |#]
    [#|2013-01-16T14:57:59.192+0100|INFO|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|WEB0671: Loading application [GlassMRI#mriGlassWar.war] at [com.dbiservices.capacityplanning.mri]|#]
    [#|2013-01-16T14:57:59.488+0100|INFO|oracle-glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=207;_ThreadName=admin-thread-pool-4848(16);|GlassMRI was successfully deployed in 23,937 milliseconds.|#]
    Edited by: Jikai on 16 janv. 2013 14:14

  • JSF/ADF Faces - ADF-BC example/howto?

    Hi,
    Background:
    ==========
    I know that ADF-BC databinding is not included in the JDev 10.1.3 preview.
    I read and searched nearly all howto's, examples, blogs on ADF-Faces available on the net.
    For the past months I learned how to use the ADF-BC with JClient.
    This convinced me to use the ADF-BC and it's binding features (a fantastic framework!!!!) for my model layer.
    I'm developping a web application.
    Most of the examples on ADF-Faces/JSF are on the View Layer.
    My question:
    ===========
    I read somewhere that JDev 10.1.3 production with drag and drop of ADF-BC databinding will be available only in the summer.
    Question 1:
    ==========
    I suppose that meanwhile it is still possible to use the ADF-BC as the model layer for JSF or ADF-Faces, but the databinding must be done manually, is this correct?
    Question 2:
    ==========
    If answer to 1) is yes.
    Where can I find a howto/best practice document that explains how to use ADF-BC with JSF/ADF-Faces in the backing beans?
    My purpose is to develop my code so that it will be "standard" / "compatible" with the production version of JDev 10.1.3.
    I prefer to use the de-facto JSF standard and code the bindings manualy instead of using Struts with available drag'n drop ADF-BC databinding.
    Your advice will be apreciated
    Frederic

    There is no such document for (1) because we are in the process of delivering design time support for ADF BC integration with ADF Faces, as you mentioned.
    Therefore, you could either continue with ADF UIX, ADFm, ADF BC for the time being, or else try out ADF Faces with session scope Managed Beans. In either case, you'll want to convert this later on, when JDev 10.1.3 completes its support for ADF Faces / ADF BC drag-and-drop integration.
    Kind Regards.

  • Use combination context param, EL of databinding in a EL.

    Hi. I have a image tag(ADF Faces.General Controls). I add into source attribute at common of property palette a EL #{resource['images:bakery.jpg']} with bakery.jpg is a image locate directy in images directory. Now, I want to change images directory by a context param that i added and bakery.jpg by a EL of databinding, as #{bindings.Name.inputValue}. Purpose is to change dynamically image displayed. How to do that? Thanks.

    Hi,
    using Google to search for : EL JSF context parameter brings up
    http://stackoverflow.com/questions/6523193/jsf-2-how-can-i-get-a-context-param-value-from-web-xml-using-jsf-el
    For the image name, if it is in an ADF attribute you use
    #{bindings.attributeName.inputValue}
    So concatenating it
    #{initparam El as in link above}/#{bindings.attributeName.inputValue}
    or, to read it from HTTP and not through the faces servlet
    /#{initparam El as in link above}/#{bindings.attributeName.inputValue}
    Frank

  • UIX or JSF

    Hi,
    I know pretty little of Java so forgive me if this should turn out to be a beginner question.
    Could some one please shed some light on the difference between UIX and JSF? I am just starting to make my own "Pet Shop" application and was wondering if I should be implementing it with UIX or JSF prerelease?
    JSF seems to have pretty many controlls and it is a standard. On the other hand UIX is heres since over a year or two, it should be more stable. Is Oracle going to support both on the long run? If yes then why and when should I use UIX and when JSF? If no, then will there be an automatic migration utility or I better start using right away the JSF contolls? As far as I know the event handling of UIX and JSF is different so why learn both?
    Every help is highly appreciated.
    Regards,
    Tamas Szecsy

    Well start by reading the UIX roadmap document:
    http://www.oracle.com/technology/products/jdev/collateral/papers/9.0.5.0/adfuix_roadmap/adfuix_roadmap.html
    Then consider your options - UIX actually has more components today than JSF, it has a visual editor in JDeveloper and it has databinding.
    JSF is still new, you can use it in JDeveloper but you'll be missing the visual editing and drag and drop data binding right now. ADF Faces adds many of the components that UIX has to JSF. And future versions of JDeveloper will have visual editing and databinding for JSF also.
    More on JSF in JDeveloper today here:
    http://www.oracle.com/technology/products/jdev/jsf.html
    The next issue of the Oracle Java Newsletter has more on JSF so register now to make sure you'll get it:
    http://www.oracle.com/go/?&Src=1952635&Act=34

  • ModelReference vs DataBinding

    When I try to use the components provided by SUN jsf ri, I always have a question: Can I use modelReference here and what the modelReference means to this component ? look at following components:
    UISelectItem, UISelectItems, UIForm, UICommand, UIGraphics,
    is modelReference really meaningful to them ?
    From the other hand, if think about the ton of attributes of HTML element, I would like to ask : is one modelReference enough to represent the nature of a HTML component ? I was very confused.
    In MS .NET's web control, it provides a DataBinding feature, which allow you to binding each Bindable attribute to data model, I think this is more meaningful than a single modelReference.
    Are you guys agreed?

    Yes, I completely agree. As a matter of facts, a lot of terms used in JSF are confusing for UI designers. Now that JSF is close to completion, I believe that the spec team will look at the terms used and replace them by more meaningful and user-friendly ones.

  • JSF or UIX = Land of confusion

    Does anyone have any suggestions for a framework to begin a migration to from an existing asp app? There is a requirement for some Oracle Portal leveraging and one of these two technologies is going to be utilized. I am reading documents such as this;
    http://www.oracle.com/technology/products/jdev/collateral/papers/9.0.5.0/adfuix_roadmap/adfuix_roadmap.html
    and the only result is additional confusion. This JSF specification only seems like a fledgling attempt to compete with asp.net. Any comments appreciated.

    The basic things to take into account:
    in favour of UIX:
    A complete set of HTML components.
    Support for visual editing in 9.0.5
    Support for easy databinding in 9.0.5
    in favour of JSF:
    Part of the J2EE standard so you are not "locked" to Oracle.
    Is the direction for Oracle - UIX is becoming JSF in the next release - see ADF Faces.
    The problem is timing - While UIX now offers visual development and data binding, JSF will only have this in the next release of JDeveloper (You can see the visual editing in the 10.1.3 preview today).
    We are going to have some level of migration from UIX to ADF Faces.
    Now you have the basic decision factors - it is up to you to decide which way you want to go. At least unlike in .NET - in Java you have options :-)

  • Is Creator + JSF the way forward ?

    Hi
    First post to forum ...
    Is Creator + JSF the way forward, or would you use some else for a new project ?
    I have developed a number of small sized web apps. Typically < 20 jsps + supporting classes for db access, all using a simple hard coded MVC servlet scheme.
    However I have become accutely aware that while this is fine for small stuff, it does not provide any short cuts for saving development time and probably does not scale all that well either.
    Hence I am looking for a single technology to speed up design/coding, and I want to move up a level in terms of professional best practice for java web app development.
    Two attractive technologies appear to be Struts and JSF. My current preference is for JSF over Struts, almost entirely because Creator "looks" like such a good IDE for rapid devel. Is this a good enough reason for going with JSF, or should I look again at Struts or another IDE.
    Also I have noticed that Creator on my win pc is "dog slow" no doubt it needs more memory. But this sort of issue concerns me because I am left wondering what other problems I will run into only after I have spent valuable time on the project. Will I be left thinking that choosing JSF because of Creator was a not such a good idea.
    Finally my next app will a web based custom cms system. I would very much appreciate all of your thoughts based on past experiences on which way I should go for time saving java web app devel. JSF, Struts, Creator, JDev...
    Many thanks
    Paul

    I share your concerns. I'm also new at enterprise java development. I've found, however, that Creator has been an excellent tool for cutting my learning curve in half. It helped me to better understand the relationships between the various java components.
    Having said that, however, I (and others I know) have experienced the frustration with the slow responses and code generation. I presume this is because the IDE may also be written in Java rather than C. It does NOT affect its run time environment when your application is deployed, however. Your application will run great when deployed to a "real" server.
    My only other problem has to do with the jdbc drivers. Some if not all of Creators databinding relies on jdbc method calls. Where I work we use a Sybase database and while Sun and BEA have perfectly fine Sybase jdbc drivers, the folks I work for insist that we use Jconnect and the jdbc Sybase provides. This jdbc is lacking in a number of methods and, when forced to use it, ALL your databinding goes out the window. This means I have to spend just as much time, if not more, writing my own code to populate the Creator objects (specifically table objects) or learning and implementing more tools like Hibernate or whatever. I'm trying to make my life SIMPLER, y'knowwhatamean?
    So while the tool is great, well integrated, well thought out, etc., be carefull of your actual deployment environment.

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • How to get security roles in a JSF portlet

    I need to get the LDAP user-roles available in the Sun Portal Server 7 in my JSF-168 portlet.
    I've added the mapping file, updated the portlet.xml and web.xml, deployed the portlet (psconsole). But the portlet shows the "content not available" error with javax....title title.
    I've probably messed up the descriptors, but I don't see what is wrong. Here they are:
    roleMaps.properties
    cn\=VSM.Administrator,dc\=neco,dc\=cz=Administrator
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4">
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
      </context-param>
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xml</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
      </context-param>
      <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.rave.web.ui.util.UploadFilter</filter-class>
        <init-param>
          <description>
              The maximum allowed upload size in bytes.  If this is set
              to a negative value, there is no maximum.  The default
              value is 1000000.
            </description>
          <param-name>maxSize</param-name>
          <param-value>1000000</param-value>
        </init-param>
        <init-param>
          <description>
              The size (in bytes) of an uploaded file which, if it is
              exceeded, will cause the file to be written directly to
              disk instead of stored in memory.  Files smaller than or
              equal to this size will be stored in memory.  The default
              value is 4096.
            </description>
          <param-name>sizeThreshold</param-name>
          <param-value>4096</param-value>
        </init-param>
      </filter>
      <filter-mapping>
        <filter-name>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
          <param-name>errorHost</param-name>
          <param-value>localhost</param-value>
        </init-param>
        <init-param>
          <param-name>errorPort</param-name>
          <param-value>25444</param-value>
        </init-param>
      </servlet>
      <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.rave.web.ui.theme.ThemeServlet</servlet-class>
      </servlet>
      <servlet>
        <description>Generated By Sun Java Studio Creator</description>
        <display-name>CreatorPortlet Wrapper</display-name>
        <servlet-name>VSMPortal</servlet-name>
        <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
        <init-param>
          <param-name>portlet-class</param-name>
          <param-value>com.sun.faces.portlet.FacesPortlet</param-value>
        </init-param>
        <init-param>
          <param-name>portlet-guid</param-name>
          <param-value>VSMPortal.VSMPortal</param-value>
        </init-param>
      </servlet>
      <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>VSMPortal</servlet-name>
        <url-pattern>/VSMPortal/*</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
        <welcome-file>faces/null</welcome-file>
      </welcome-file-list>
      <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <error-page>
        <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
      </error-page>
      <jsp-config>
        <jsp-property-group>
          <url-pattern>*.jspf</url-pattern>
          <is-xml>true</is-xml>
        </jsp-property-group>
      </jsp-config>
         <security-role>
              <role-name>Administrator</role-name>
         </security-role>          
    </web-app>
    portlet.xml
    <?xml version='1.0' encoding='UTF-8' ?>
    <portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd                         http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd' version='1.0'>
         <portlet>
              <description>Created By Java Studio Creator</description>
              <portlet-name>VSMPortal</portlet-name>
              <display-name>VSMPortal Portlet</display-name>
              <portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>
              <init-param>
                   <name>com.sun.faces.portlet.INIT_VIEW</name>
                   <value>/Uctarna.jsp</value>
              </init-param>
              <expiration-cache>0</expiration-cache>
              <supports>
                   <mime-type>text/html</mime-type>
                   <portlet-mode>VIEW</portlet-mode>
              </supports>
              <supported-locale>en</supported-locale>
              <portlet-info>
                   <title>VSMPortal</title>
                   <short-title>VSMPortal</short-title>
                   <keywords>Creator</keywords>
              </portlet-info>
              <security-role-ref>
                   <role-name>Administrator</role-name>
                   <role-link>Administrator</role-link>
              </security-role-ref>          
         </portlet>
    </portlet-app>If I don't use the security-role and security-role-ref tags, the portlet works, and the isUserInRole method obviously doesn't.

    Nobody uses the LDAP roles in a portlet? Anybody knows other thread discussing similar issue (I can't find anything)?

  • JSF Pages are not rendering correctly when  loaded using Non JSF actions

    Hi All,
    This problem is irritating me and I am posting the same query for the third time here.
    When I come from non jsf actions such as page submitting using Javascript, clicking anchor link, clicking normal Html submit button and so on my page is not rendering correctlly .
    In other words, My first GET method/Post method works perfectly for the first time when the page is loaded.
    But when we try to access the page for the second time, although logical work is perfect in bean, I am getting same old page.
    How to resolve this issue?
    or
    Is this Bug of Sun's Implementation of JSF Framework.
    Thanks,
    Sudhakar

    Hi Sudhakar,
    There is a discussion about refreshing a page, Take a look at the below thread
    http://swforum.sun.com/jive/thread.jspa?threadID=55660
    Hope this what you are looking for
    MJ

  • Any way (event) to call Java method after view created in JSF 2.0

    Hi,
    I am using JSF 2.0 Mojarra's implementation.
    I am interested to know if there is a way to call Java methods before and/or after view has been restored.
    I wanted to initialize data for my page in this Java method.
    I could see there is an event class PostRestoreStateEvent added in JSF 2.0. How to use it?
    I tired to use f:event element as below, but it does not work. Can anyone share anyother idea to achieve this behaviour?
    <f:metadata>
    <f:event type="postRestoreState" listener="#{employeeLoadBean.loadAfterRestoreView}"/>
    </f:metadata>
    Regards,
    Kishore K S

    Hi,
    The problem is solved as below.
    <f:metadata>
    <f:event type="javax.faces.event.PostRestoreStateEvent" listener="#{employeeViewEventListener.postRestoreState}"/>
    </f:metadata>
    The above calls the Java method #{employeeViewEventListener.postRestoreState} whenever View has been restored.
    It was not working when shortName of the event (ie., postRestoreState) is given and throwing ClassNotFound exception.
    Regards,
    Kishore K S

  • Can't reference methods in a Bean from a Composite JSF Component.

    I have the following composite component TestCC.xhtml:
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:cc="http://java.sun.com/jsf/composite" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <cc:interface>
    <cc:attribute name="manager" method-signature="java.lang.String helloTest()" required="true"/>
    </cc:interface>
    <cc:implementation>
    Hello #{cc.attrs.manager} !!!!!!!!!!!!!!!!!!!!!
    </cc:implementation>
    </html>
    When I try to call it in a JSFF file:
    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:icc="http://java.sun.com/jsf/composite/IchipComponent">
    <icc:TestCC manager="#{viewScope.PatientClinicalBean.helloTest}"/>
    The page crashes at my composite tag with the following message in the console:
    javax.el.ELException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11.1.2.3.39.62.76.1/o.j2ee/drs/iCHIP/ViewControllerWebApp.war/WEB-INF/classes/META-INF/resources/IchipComponent/TestCC.xhtml: javax.el.PropertyNotFoundException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11.1.2.3.39.62.76.1/o.j2ee/drs/iCHIP/ViewControllerWebApp.war/Patient/Profile/Clinical.jsff @13,86 manager="#{viewScope.PatientClinicalBean.helloTest}": The class 'patient.profile.PatientClinicalBean' does not have the property 'helloTest'.
    But my managed bean does have a public String helloTest() method, as well as other methods that work fine elsewhere in my JSFF page:
    public class PatientClinicalBean{
    String test = "TESTING";
    public String helloTest() {
    return test;
    I have tried this many times with different methods, all with the same result. Yet if my composite component outputs just a string and I enter the expression <icc:TestCC manager="#{viewScope.PatientClinicalBean.test}"/> to access the String test field directly it executes properly. I can't seem to reference any of the methods in PatientClinicalBean from only my composite component, when other method calls work fine in the same JSFF page. All other examples I've seen on the web have no problems doing this the same way I have, am I missing something?!
    Edited by: tnology on 24-Oct-2012 14:13
    Edited by: tnology on 24-Oct-2012 14:14
    Edited by: tnology on 24-Oct-2012 14:16

    What if you change the method in the class like this?
    public String getHelloTest() {
      return test;
    }If you attempt to read a property call abc from a bean, you need to have a method called getAbc(). If you attempt to set a property called abc, you need to have a method called setAbc(...). This is JavaBeans convention.

  • I can't view dataTable in JSF

    Hi, anyone who can help me with java server faces, i want to put data from a resultset to dataTable, i made everithing but my table is not visible.
    My code is:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>Consultas</title>
    </head>
    <body><h:form binding="#{backing_Consultas.form1}" id="form1">
    <h:commandButton value="commandButton1"
    binding="#{backing_Consultas.commandButton1}"
    id="commandButton1"
    action="#{backing_Consultas.commandButton1_action}"/>
    </p>
    <p>
    <h:dataTable border="1" var="#{backing_Consultas.dataTable1}"
    id="dataTable1">
    <h:column binding="#{backing_Consultas.column1}"/>
    <h:column binding="#{backing_Consultas.column2}"/>
    <h:column binding="#{backing_Consultas.column3}"/>
    <h:column binding="#{backing_Consultas.column4}"/>
    </h:dataTable>
    </h:form></body>
    </html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Consultas-->
    </jsp:root>
    This es a JSPX page.
    Please any idea
    thanks
    alex

    Try to disable the hardware acceleration in the Flash Player.
    See [[Cannot view full screen Flash videos]]
    Flash "Display settings" window:
    * http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html

Maybe you are looking for

  • Hi Experts, need an example for abap unit test(ABAP OO)?

    Hi Experts, I want to do abap unit test for the developed programs, could anyone please give me an example program of development(a simple is ok, just use it to test)? and an abap unit test example for the program, what I want is to use object orient

  • IBook Author EULA

    We sell software to support our products. If I produce an ibook of a software manual (which we freely distribute in pdf format) do I have to go through the Apple store or can my customers just download it from our website? Thanks David

  • Bridge 5 32 & 64 bit cash compatible?

    If you run both 32bit and 64bit Bridge 5, are the cache files compatible or do you have to have separate cache files for each system???

  • Web pages from one computer to another

    Hi, While in Italy for two months I made a large number of web pages on .mac from over 1000 pictures. These pages are on my MacBook. When I returned I successfully transferred the pictures from my MacBook to my iMac. HOWEVER, neither the smart albums

  • Older illustrator files are 72 resolution when opened in new version

    Hi, My high resolution illustrator work wants to save as 72 pixels per inch in IllustratorCS5, is there a setting somewhere to only go to 72 if I want a save for web gif? Also, I have a hard time getting from sign in to the forum. Is there a more rea