Generate Command Button Dynamically

Hi All
I'm developing a web app using jd 11.1.1.3
I want to generate command buttuns dynamically,
The no of buttons to be generated based on a integer value that is stored in the DB.
Pls tell me a way to do this.
Tx

Hi,
and then, what arethe buttons supposed to do - or do you need them as decoration only ?
Frank

Similar Messages

  • Command button hiding based on roles

    Hi,
    I was following the section 29.6 -Performing Authorization Checks in a Fusion Web Application, in the following link :
    http://st-doc.us.oracle.com/review/AS11/web.1111/b31974/toc.htm.
    I was able to implement page level authorizations. However, I want to set the rendered property for an ADF command button dynamically based on a role. The ADF command button does not even have a binding in the pagedef, because, its purpose is just to provide a navigation to some other page. What I see in the tutor is for task flow, page, method, and attribute.
    Please let me know what is the manual setting I should be doing for the rendered property for an ADF command button.
    Best Regards,
    nattu

    Hi,
    Thanks for the reply. I tried something like this :
    <af:commandButton text="Add"
    action="createincident"
    rendered="#{controllerContext.security.CreateIncidentPageDef.isViewAuthorized}"/>
    This button is defined in a page A.jspx, and the navigation is to a page called CreateIncident.jspx. But during the page launch of A.jspx, I get an exception:
    un 6, 2008 10:17:12 PM oracle.security.jazn.oc4j.JAZNFilter doFilter
    WARNING: The class 'oracle.adfinternal.controller.security.ControllerSecurityManagerImpl' does not have the property 'CreateIncidentPageDef'.
    javax.el.PropertyNotFoundException: The class 'oracle.adfinternal.controller.security.ControllerSecurityManagerImpl' does not have the property 'CreateIncidentPageDef'.
    at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:561)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
    at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
    at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:70)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.getBooleanProperty(UIXComponentBase.java:1160)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.isRendered(UIXComponentBase.java:400)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:606)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:622)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:622)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:622)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.ShowDetailFrameRenderer.encodeContent(ShowDetailFrameRenderer.java:806)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.ShowDetailFrameRenderer.encodeAll(ShowDetailFrameRenderer.java:453)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.CellFormatRenderer.encodeAll(CellFormatRenderer.java:96)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeChild(RowLayoutRenderer.java:110)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeAll(RowLayoutRenderer.java:88)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.TableLayoutRenderer.encodeAll(TableLayoutRenderer.java:87)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.CellFormatRenderer.encodeAll(CellFormatRenderer.java:96)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeChild(RowLayoutRenderer.java:110)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeAll(RowLayoutRenderer.java:88)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.TableLayoutRenderer.encodeAll(TableLayoutRenderer.java:87)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:294)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:634)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:608)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:200)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer._encodeAllWithSideFacets(PanelBorderLayoutRenderer.java:198)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer.encodeAll(PanelBorderLayoutRenderer.java:82)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:64)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:294)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:441)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1287)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:769)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:633)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:244)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:204)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
    at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:646)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:614)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:405)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:168)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:149)
    at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Jun 6, 2008 10:17:12 PM com.evermind.server.ServerBase log
    WARNING: Demo13-ViewController-webapp: Servlet error
    oracle.security.jazn.JAZNRuntimeException: The class 'oracle.adfinternal.controller.security.ControllerSecurityManagerImpl' does not have the property 'CreateIncidentPageDef'.
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
    at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:646)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:614)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:405)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:168)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:149)
    at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.el.PropertyNotFoundException: The class 'oracle.adfinternal.controller.security.ControllerSecurityManagerImpl' does not have the property 'CreateIncidentPageDef'.
    at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:561)
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
    at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
    at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
    at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:70)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.getBooleanProperty(UIXComponentBase.java:1160)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.isRendered(UIXComponentBase.java:400)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:606)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:622)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:622)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.FrameBaseRenderer._getMaximizedChildComponent(FrameBaseRenderer.java:622)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.ShowDetailFrameRenderer.encodeContent(ShowDetailFrameRenderer.java:806)
    at oracle.adfinternal.view.faces.renderkit.rich.customizable.ShowDetailFrameRenderer.encodeAll(ShowDetailFrameRenderer.java:453)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.CellFormatRenderer.encodeAll(CellFormatRenderer.java:96)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeChild(RowLayoutRenderer.java:110)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeAll(RowLayoutRenderer.java:88)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.TableLayoutRenderer.encodeAll(TableLayoutRenderer.java:87)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.CellFormatRenderer.encodeAll(CellFormatRenderer.java:96)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeChild(RowLayoutRenderer.java:110)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.RowLayoutRenderer.encodeAll(RowLayoutRenderer.java:88)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at org.apache.myfaces.trinidadinternal.renderkit.html.TableLayoutRenderer.encodeAll(TableLayoutRenderer.java:87)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:294)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:634)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:608)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:200)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:299)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer._encodeAllWithSideFacets(PanelBorderLayoutRenderer.java:198)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelBorderLayoutRenderer.encodeAll(PanelBorderLayoutRenderer.java:82)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:69)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:64)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:294)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:316)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:441)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:947)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:220)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:749)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1287)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:769)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:178)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:633)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:244)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:204)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:74)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
    ... 13 more
    Please let me know, if I am missing anything here.
    In the expression,      
    #{controllerContext.security.myTaskFlow.isViewAuthorized},
    please advice, what should be the entry for 'myTaskFlow'.
    Best Regards,
    nattu

  • Dynamic Text preparation for Command button in ADF (Tr component)

    We have one command link and our requirement is to preapre the command button text dynamicaly .?
    Details are givin below :
    I need to get the button text value form the UCMS file based on the dynamic preparation .
    The key value of UCMS is "setupfamily_group_1-8FAM4".
    In the above mentioned key value the part 1 is "*setupfamily_group*_" is static text and part 2 "*1-8FAM4*" is dynamic which i will get throuth the List of Objects.
    i.e managedServices.product.productId. here managedSercies is varible contains the Objects from the list.
    please let me know how to append the part1 and part 2 as mentioned above in Command button text field ?
    <tr:forEach items="#{pageFlowScope.myExtrasBean.managedServicesExtras}"
    var="managedServices">
    <tr:commandButton text="#{myExtrasBundle.setupfamily_group_+#managedServices.product.productId}" id="setup_service"
    actionListener="#{pageFlowScope.myExtrasBean.manageMyFamilyProducts}"
    action="vfFamilyFlow">
    <f:attribute name="productId" value="#{managedServices.product.productId}"/>
    </tr:commandButton>
    </forEach>
    We not getting how to append the Static and dynamic text for command button text filed ? pleas let me know the syntax .
    Thanks

    HI
    We have tried with above both options .its issues not resolved .
    for the first one we are getting the compile time error
    and for the second option ,when we run the dynamic value its self printing in the JSF .
    We are trying to prepare the command button text as some part dynamically and some part static and its will act as key in the XML and get the corresponding value from the UCMS .
    Thanks

  • How to retrive value of a Button that is assigned in the Button Dynamically

    Hi All,
    I am searching the user from LDAP on the basis of the first name ( eg. abc ) Entered of the user to be searched and on the click of the Search Button I have displayed the First_Name, Last_Name, & other Info also, & One Button Having the value as the "uid" for all the users having the First Name as ( abc ) in the Form inside a Table using a loop for loop. Now if there are 10 user having the First_name as abc then there are 10 Buttons which has been displayed Now I want that If I click on the Button corresponding to the 3rd User then his all the details which was displayed on the previous page will be passed in the different editable text fields.
    The major problen which I am facing in this is that as I am generating all these buttons dynamically & all the buttons have same name but all the buttons have the diffrent values, I am able the generate Different names to all the buttons dynamicall & pass their reference dynamically to the Workflow in a transiction condition dynamically.

    if you want some default value in LOV. you go to edit list of value wizard-> UI hint->include no selection Item checkbox -checked.use labeled item first of list- and beside that put the label. but when you try to get value, it will show null.but you can manipulate in ur java , if it default value

  • Command button remains disabled after a request redirect to a PDF Servlet

    Hi All,
    I've a command button to generate PDF on the fly and used to work in JDev 10.1.3.3.
    When we migrated to 11g, it works for the first time on a page, and the file Open/Save dialog will come up.
    But then the command button remains grayed out, and clicking doesn't generate a server call.
    If I do something on the page which does a partial or full submit, then the button will get enabled again.
    Any suggestions?
    Thanks,
    Jaimon
    Sample code:
    Facelets:
    <af:commandButton text="Create PDF" action="#{fs02.createPDF}" />
    Java:
    public String createPDF() {
    //Validation checks here. If there are any errors, it gets added to FacesMessages to display on the same page.
    if(!validate()) {
    //sf.addInfoMessage('message here..');
    }else {
    FacesContext ctx = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();
    HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse();
    RequestDispatcher rd = request.getRequestDispatcher("/pdfdownloader");
    rd.forward(request, response);
    ctx.responseComplete();
    return null;
    pdfdownloader is mapped as a servlet, which writes the actual PDF content as a stream.

    Herewith the code which is triggered with the post-forms-commit trg. As far as I can see it, there is no code to disable/enable the save button in the menubar.
    ===
    PROCEDURE validate_enbr_records IS
    CURSOR c_enbr
    IS
    SELECT exlb.exlb_length
    , enbr.enbr_ind_break
    FROM dog_envelop_breaks enbr
    , dog_extrnl_labels exlb
    WHERE enbr_appl_cod = :flow_appl_cod
    AND enbr_flow_cod = :flow_cod
    AND enbr_sort_seqnr <> :enbr_sort_seqnr
    AND enbr_appl_cod = exlb_appl_cod
    AND enbr_exlb_cod = exlb_cod;
    CURSOR c_exlb
    IS
    SELECT exlb_length
    FROM dog_extrnl_labels
    WHERE exlb_appl_cod = :flow_appl_cod
    AND exlb_cod = :enbr_exlb_cod;
    l_lengte_break_label NUMBER := 0;
    l_lengte_sort_label NUMBER := 0;
    l_length NUMBER := 0;
    l_aant NUMBER := 0;
    r_enbr c_enbr%ROWTYPE;
    mi_id MenuItem;
    BEGIN
    FOR r_enbr in c_enbr LOOP
    IF r_enbr.enbr_ind_break = 'Y'
    THEN
    l_lengte_break_label := l_lengte_break_label + r_enbr.exlb_length;
    ELSE
    l_lengte_sort_label := l_lengte_sort_label + r_enbr.exlb_length;
    END IF;
    l_aant := l_aant + 1;
    END LOOP;
    OPEN c_exlb;
    FETCH c_exlb INTO l_length;
    CLOSE c_exlb;
    IF :enbr_ind_break = 'Y' THEN
    l_lengte_break_label := l_lengte_break_label + l_length;
    ELSE
    l_lengte_sort_label := l_lengte_sort_label + l_length;
    END IF;
    IF l_lengte_break_label > 48
    THEN
    qms$errors.show_message('DOG-10194');
    END IF;
    IF l_lengte_sort_label > 50
    THEN
    qms$errors.show_message('DOG-10195');
    --set_record_property(3,'enbr',status,changed_status);
    END IF;
    IF :system.record_status = 'CHANGED' THEN
    set_menu_item_property('FILE_MENU.SAVE',ENABLED,'YES');
    END IF;
    END;
    ===
    After the message has been throughn and the OK-button has been clicked, the code is never reaching the code:
    IF :system.record_status = 'CHANGED' THEN
    set_menu_item_property('FILE_MENU.SAVE',ENABLED,'YES');
    END IF;
    The save-button remains disabled.
    Best regards
    John.

  • How to open an pdf report On click of some command button in adf

    Hi,
    I have to generate some pdf report or some pdf document on click of some command button .Could any one please tell me how to achieve this.
    suggestion would be appreciated,
    Regards
    Vinay kumar

    So what you're saying is the PDF already exists on your web server, and all you want to do is navigate in the browser from your ADF application to the PDF, yes? If that's correct, let's assume you're PDF exists at:
    http://www.acme.com/someCustomPath/myFantasticReport.pdf
    Consider the <af:goButton> or <af:goLink> controls, which include the destination attribute. As such you'd do something like this:
    <af:goButton destination="http://www.acme.com/someCustomPath/myFantasticReport.pdf"/>As you can see the "go" controls are for navigating to resources not inside your ADF application, while the "command" controls are reserved for navigation among resources in your application.
    In order to generate the destination URL, just replace the destination attribute with an EL expression that retrieves it's value from a backing bean:
    <af:goButton destination="#{myBean.giveMeTheUrl}"/>Regards,
    CM.

  • ADF JSF 10.13 how do you reference a binding from a command button?

    I have developed the following code as a model as I am trying to utilise ADF JSF without using a database.
    I have a collection called School. This has the appropriate operations that populate the school with a number of Child. A Child simply has a firstname and a surname.
    I have generated data controls for these collections and created two JSP pages and added a navigation link as follows:
    index.jsp --> goToSchool (navigation) --> school.jsp
    I have then added a command button to the index.jsp page. When the button is then pressed the school.jsp page is displayed. This works correctly.
    I would like to override the action of the button though so that before the navigation is executed I can get a handle on the school collection and populate it so that it will be displayed on the school.jsp page.
    I have previously done this in 10.12 when I had the following setup:
    index.jsp --> getSchool (dataAction) --> school.jsp
    by overriding the getSchool dataAction.
    I have looked through the 10.13 ADF user guides and tried various different things but have not managed to successfully acheive my goal of populating the school collection when the button is pressed prior to navigating to the school.jsp page.
    I would appreciate it if you could offer any advice, and if possible let me know the recommended best practices to acheive this.
    Thanks in advance for your help
    David

    Check out the ADF Tutorial (TopLink edition) chapter 5 has a section called:
    Adding a Drilldown Link
    I think this is what you are looking for.
    http://www.oracle.com/technology/obe/ADF_tutorial_1013/ADF_tutorial.pdf

  • How can LabVIEW press a command button in access form?

    Situation: access database with a command button, who generate a code after pushing
    Task: LabVIEW open the access database, pressed the command button and read out the code
    Status:
    use activeX to open the access database - ready
    press the command button - open
    read out the code - open
    Problem: Is there a possibility that LabVIEW press automatically the command button in the access form?
    Solved!
    Go to Solution.

    First off, you are confusing your terms. Access is not a database. It's an development environment for creating applications that use databases. By default, Access uses a DBMS called Jet that is built into Windows, but it can use others like SQL Server or even Oracle.
    Second, in terms of pushing the button, that is totally dependent upon what functionality Access' ActiveX interface chooses to expose to external applications.
    Third, what does the button actually do? The statement, "..generate a code.." is meaningless. Does it perform a query? Does it generate a report? Does it modify records?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Authorization object for Command Button

    Hi all,
    How can I create the Authorization object for command button which is on application server.
    if you do not have auth when you click on that command button, it should be say 'you dont have auth'.
    please help me in this.
    regards,
    Ajay reddy

    Hi,
    Tcode for Authorization Objects are,
    su20----> for defineing authorization field ,
    su21-----> for authorization class,
    su22------> for assignement authorization object
    To create an authorization object:
    1) Execute transaction SU21
    2) Double-click an Object Class to select a class that should contain
    your new auth object
    3) Click on CREATE (F5)
    4) (If creating custom field) - Click the 'Field Maintenance' button -->
    Click on CREATE (Shift+F1)
    5) Enter the Name for the New Authorization field and the corresponding
    Data Element and SAVE
    6) Confirm the Change Request data for the new Authorization Field
    7) Go back two screens (F3-->F3)
    8) Enter the Authorization field name and document the object:
    9) SAVE and ACTIVATE the documentation
    10) Save the new Authorization Object
    11) Confirm the change request data for the Authorization Object and
    EXIT SU21
    12) Finally, the SAP_ALL profile must be re-generated
    Regards,
    hema.

  • Command Button action is bean method.How to pass parameter or reference ID?

    JDEV11gR1PS1/ADF
    A command button action's is bean method, as follows:
    <af:commandMenuItem id="gbl_cmi_1" action="#{tbBean.action1}"/> Bean code is something like
    public String action1() throws IOException {
    if (id.equals.("gbl_cmi_1"))...
    }Therefore, I'd like to be able to find out what the commandButton's ID is, for use in evaluation, etc.
    The reason being is that multiple commandButtons are actually being built dynamically as well, and the action may be a URL redirect. Therefore, I'm using the id to lookup what URL to redirect to.
    Ideas?
    Thanks.

    Hi,
    I think you can use f:attribute inside your commandButton.
    We use f:attribute inside button or link which hold a name/ value and we can read the value from backing bean as :
    public void addItemToCart(ActionEvent evt) {// this the actionListener of button or link
    Map attributes = evt.getComponent().getAttributes();
    String productId = attributes.get("attributeName");
    } Sameh Nassar

  • Controlling the desableing of command buttons

    I have been having a great deal of trouble trying to work out how to control the command button such that if the rowset is null then the button is disabled. The trick is that the rowset is not defined by the view where the command button is located. The rowset is defined by a view which has a "view" command button which displays the specific row selected, then this view has a command button that will display the detail rowset of the selected master row, but if there are no detail records I want the button to be disabled. How can I do this in ADF JSF? If I use a backing bean to make the determination prior to the page rendering then how does the backing mean method set the parameter necessary to disable the command button? Any advice or tutorial that I can use is most appreciated. My goal with using ADF JSF effort was to demonstrate that a complex app could be generated with minimum coding, I would like to keep to this concept if possible. Thanks,
    Michael

    Wrong forum. You need the ADF or JDeveloper forums.

  • HELP using command button in J2ME

    Hi
    I am trying to create a simple code using the command button, but when i try 2 run my program, it gives the following error:
    java.lang.ClassCastException
         at test1.startApp(+81)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+266)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    Could anyone tell me where the problem could be? Im attaching my code below.
    Thanks in advance
    Regards
    Shikha
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.lcdui.*;
    import java.util.*;
    public class test1 extends MIDlet {
         Random generator;
         Form basicForm;
         Command appendCommand;
         public test1() {
              super();
              System.out.println("Constructor: test1()");
              // TODO Auto-generated constructor stub
         protected void startApp() throws MIDletStateChangeException {
              System.out.println("StartApp()");
              //create and seed a new Random generator with the current time.
              generator = new Random( System.currentTimeMillis() );
              //get the display for this MIDlet
              Display display = Display.getDisplay( this );
              //create a new Form with the title "Form Title"
              basicForm = new Form("Form Title");
              //append the string "My basic Form" to the new Form
              basicForm.append("My basic Form");
              //Create a new Command to catch user input
              appendCommand = new Command("Random", Command.SCREEN, 1);
              //adds the appendCommand to the basicForm
              basicForm.addCommand( appendCommand );
              try{
              //set the Forms CommandListener to this instance. so all Command
              //events are passed to us.
              basicForm.setCommandListener((CommandListener)this);
              }catch(Exception e){
                   System.out.println("Exception is->"+e.toString());
                   e.printStackTrace();
              // set the current Displayable to the new Form
              display.setCurrent( basicForm );
         public void commandAction( Command c, Displayable d )
              //check if the commandAction event is triggerd by our appendCommand
              if( c == appendCommand )
                   //append a String to the form with a random number between 0 and 50.
                   basicForm.append("Random: " + ( Math.abs( generator.nextInt() ) %50 ) + "\n");
         protected void pauseApp() {
              // TODO Auto-generated method stub
         protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
              // TODO Auto-generated method stub
              System.out.println("destroyApp()");
    }

    basicForm.setCommandListener((CommandListener)this);You're trying to cast your MIDlet subclass (aka, "this") to a CommandListener, but you haven't specified that it implements that interface. So you need to declare the class as follows:
    public class test1 extends MIDlet  implements CommandListener {shmoove

  • Set JSF Command Button Disabled

    Hello,
    I have a JSF command button, I would like to dynamically change button disabled based on certain condition.
    I tried in the actionListener code in my managedbean
    like
    UIComponent component = event.getComponent();
    component.setRendered(false);However it makes button not visible, couldn't find setDisabled.
    How can I do this?
    Regards

    Hi,
    Basically, you can change the button status: enabled/didasled from JavaScript by changing the button css.
    You can also do this from JSF.
    The commandButton element has the disabled attribute and you can change the status depending on your condition.
    -- <h:commanButton disabled=""
    Please find an example: http://www.roseindia.net/jsf/EnableDisableButton.shtml
    If you use AJAX (ex. a4j) there is the same principle. In backing bean you can check your condition and in jsp you'll change to disabled.
    Hope this helps,
    Sergiu

  • How can I control the enable/disable of command buttons in ADF JSF

    I have been having a great deal of trouble trying to work out how to control the command button such that if the rowset is null then the button is disabled. The trick is that the rowset is not defined by the view where the command button is located. The rowset is defined by a view which has a "view" command button which displays the specific row selected, then this view has a command button that will display the detail rowset of the selected master row, but if there are no detail records I want the button to be disabled. How can I do this in ADF JSF? If I use a backing bean to make the determination prior to the page rendering then how does the backing mean method set the parameter necessary to disable the command button? Any advice or tutorial that I can use is most appreciated. My goal with using ADF JSF effort was to demonstrate that a complex app could be generated with minimum coding, I would like to keep to this concept if possible. Thanks,
    Michael

    Hi Michael,
    You can probably set the Enabled property of the command button using an EL that would evaluate and return true or false based on your requirement.
    Check out these links for more information on using the EL.
    http://radio.weblogs.com/0118231/2006/11/10.html
    http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_dcp006.htm
    -Arun

  • I need to create Buttons dynamically Please Help

    I am currently developing a card game. I represent my cards as buttons. But as the player draws more cards from the deck I have to generate buttons dynamically at run-time. I could use arrays of buttons and store new buttons inside that arrays of buttons. But the only problem is I need ActionListener for each of my buttons. How do you create ActionListener for each different dynamically created buttons? Please Help.

    Here is my code. I just do not understand how to create those functions dynamically that functions different each time.
    Here is my code please take a look.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class run108{
    JButton setbutton;
    JButton ButtonUp;
    JButton ButtonDeal;     
    JButton slot1;
    JButton slot2;
    JButton slot3;
    JButton slot4;
    JButton slot5;
    JButton slot6;
    JButton slot7;
    cards[] card = new cards[55];
    public static void main(String[] argv)
         run108 startgui = new run108();
         startgui.createframe();     
    void createframe()
         //Standard of way of creating Frame
         JFrame frame = new JFrame("108");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.setLocation(300,200);// Tells the startup position;
         //Adding Panels to the framework
         JPanel panelA = new JPanel();
         panelA.setBackground(Color.white);
         panelA.setLayout(new BoxLayout(panelA,BoxLayout.Y_AXIS));
         JPanel panelB = new JPanel();
         JPanel panelC = new JPanel();
         //Adding buttons with card images
         JLabel label1 = new JLabel("       Set of Cards");
         panelA.add(label1);
         ImageIcon pic1 = new ImageIcon("cards/backd.png");
         setbutton = new JButton(pic1);          
        panelA.add(setbutton);
        ImageIcon picdeal = new ImageIcon("cards/deal.png");
         ButtonDeal = new JButton(picdeal);
         panelA.add(BorderLayout.CENTER, ButtonDeal);
        ButtonDeal.addActionListener(new DealListener());
         JLabel label2 = new JLabel("       Your Target");
         panelA.add(label2);
         ButtonUp = new JButton(pic1);          
        panelA.add(BorderLayout.CENTER, ButtonUp);
        frame.add(BorderLayout.WEST,panelA);
        // Adds 7 initial card slots.
         ImageIcon pic2 = new ImageIcon("cards/backc.png");
         slot1 = new JButton(pic2);
        panelB.add(slot1);          
        slot1.addActionListener(new Slot1Listener());
        slot2 = new JButton(pic2);
        panelB.add(slot2);
        slot2.addActionListener(new Slot2Listener());
         slot3 = new JButton(pic2);
        panelB.add(slot3);
        slot3.addActionListener(new Slot3Listener());
         slot4 = new JButton(pic2);
        panelB.add(slot4);
        slot4.addActionListener(new Slot4Listener());
         slot5 = new JButton(pic2);
        panelB.add(slot5);
        slot5.addActionListener(new Slot5Listener());
         slot6 = new JButton(pic2);
        panelB.add(slot6);
        slot6.addActionListener(new Slot6Listener());
         slot7 = new JButton(pic2);
        panelB.add(slot7);
        slot7.addActionListener(new Slot7Listener());
        frame.add(BorderLayout.CENTER,panelB);
        // This has to be added @ the end to show the components
        //that were added after on. If it is placed before the components
        //the components shall not appear since they sit on the frame
         frame.setSize(600,500);
         frame.setVisible(true);
    class DealListener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot1Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot2Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot3Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot4Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot5Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot6Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot7Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    }

Maybe you are looking for

  • Can't capture video with FCP 5.1

    Hi All, Here is the case. I'm trying to capture the video from my newly baught Sony HDR FX7. Here are the specs: I've connected it thru Firewire 400 on the back of my G5. G5 660GB HD, 5.5Gb RAM In Easy set up I've selected HDV-1080i60 When I go to fi

  • Incomplete Sales Order requirement to MRP

    How to stop transferring Blocked Sales Order requirement to MRP? We have scenario there we entered 100 line on orders, due to one or other reason we need to block the orders and do not want to transfer the requirement to MRP till the time the particu

  • Function module description

    Is there any website link where I can get information about all the functions used in ABAP... EX: I want to know the export,import,...parametes of the function "ALSM_EXCEL_TO_INTERNAL_TABLE"....?

  • ORA-00936:missing expression Error

    I have what I would think was a simple SQL for Excel; but for some reason I keep getting the ORA-00936 missing expression error message. The SELECT AND FROM of the SQL are no problem. It's the Where portion of the SQL statement where it messes up. I

  • Risks for ongoing Dev-Transports during SP & EhP Upgrade

    Hello together, We are planning at the moment a Support and EhP upgrade for our whole SAP system landscape. We have one centrally ERP 6.0 System where at the moment all affiliates will be migrated into one client. So we have ongoing Roll-Out projects