CommandButton's rendered attribute doesn't work inside dataTable

Hi,
I don't know if anyone could help me...
I need to access a list of "alarms" in my jsp file (which is rendered by "alarmHandler.sortedGenericDataModel"). For each "alarm" of the list, I test the "alarm.alarmStatus" and I want to create the desired button depending on the it. I'm trying to use the "rendered" attribute to manage the fact the button will be created or not. Note that when I use the "disabled" attribute, everything works fine, but I don't want to use the disabling option, I prefer to don't show the button at all.
I have a NullPointerException when I run this code (the stack trace of this exception is show at the buttom of this message):
<h:dataTable value="#{alarmHandler.sortedGenericDataModel}" var="alarm"
rows="#{alarmHandler.noOfRows}"
first="#{alarmHandler.firstRowIndex}"
styleClass="tablebg" rowClasses="oddRow, evenRow"
columnClasses="left, left, left, right, left" width="100%">
     <h:column>
<f:facet name="header">
<h:outputText value="#{labels['alarm.label.action']}" />
</f:facet>
          <h:commandButton value="#{labels['alarm.label.toActivate']}"
          rendered="#{alarm.alarmStatus != '3'}"
          action="#{alarmHandler.activate}" immediate="true" />
          <h:commandButton value="#{labels['alarm.label.toAcknowledge']}"
          disabled="#{alarm.alarmStatus != '1'}"
          action="#{alarmHandler.acknowledge}" immediate="true" />
          <h:commandButton value="#{labels['alarm.label.toClose']}"
               disabled="#{alarm.alarmStatus != '2'}"
               action="#{alarmHandler.close}" immediate="true" />          
</h:column>
</h:dataTable>
*** Here is the stack trace of the error:
2004-08-30 11:33:13,902 13307343 ERROR [org.jboss.web.localhost.Engine] (http-0.0.0.0-8643-Processor5:) ApplicationDispatcher[abox] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: java.lang.NullPointerException
     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
     at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:307)
     at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:838)
     at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:470)
     at com.sun.faces.taglib.html_basic.CommandButtonTag.doStartTag(CommandButtonTag.java:469)
     at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_commandButton_0(viewAlarmsTemplate_jsp.java:588)
     at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_column_1(viewAlarmsTemplate_jsp.java:505)
     at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_dataTable_1(viewAlarmsTemplate_jsp.java:445)
     at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_form_0(viewAlarmsTemplate_jsp.java:202)
     at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspService(viewAlarmsTemplate_jsp.java:125)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
     at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
     at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
     at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
     at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
     at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
     at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
     at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
     at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_tiles_insert_3(template_jsp.java:382)
     at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_f_subview_3(template_jsp.java:346)
     at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_f_view_0(template_jsp.java:146)
     at org.apache.jsp.JSP.generic.template_jsp._jspService(template_jsp.java:80)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
     at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
     at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
     at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
     at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
     at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
     at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
     at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
     at org.apache.jsp.JSP.alarm.viewAlarmsLayout_jsp._jspx_meth_tiles_insert_0(viewAlarmsLayout_jsp.java:100)
     at org.apache.jsp.JSP.alarm.viewAlarmsLayout_jsp._jspService(viewAlarmsLayout_jsp.java:74)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
     at org.apache.struts.faces.application.FacesTilesRequestProcessor.doForward(FacesTilesRequestProcessor.java:144)
     at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
     at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
     at org.apache.struts.faces.application.FacesTilesRequestProcessor.processForwardConfig(FacesTilesRequestProcessor.java:260)
     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at com.thevco.abox.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:166)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
     at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
     at org.apache.struts.faces.application.PropertyResolverImpl.getValue(PropertyResolverImpl.java:146)
     at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
     at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
     at com.sun.faces.el.impl.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:165)
     at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)

mleblanc77:
Thanks for your interest.
I've modified one of our internal demos to try to reproduce your problem
and cannot do so. Here is the operative JSP:
<!-- ... -->
<h:dataTable binding="#{UIDataBean.data}"
value="#{list}"
var="customer">
<h:column>
     <h:commandButton id="press"
               action="#{UIDataBean.press}"
               rendered="#{customer.accountId != '123456'}"
               immediate="true"
               value="#{UIDataBean.pressLabel}"
               type="SUBMIT"/>
</h:column>
</h:dataTable>
<!-- ... -->
Here's the customer bean
public class CustomerBean implements Serializable {
public CustomerBean() {
this(null, null, null, 0.0);
public CustomerBean(String accountId, String name,
String symbol, double totalSales) {
System.out.println("Created CustomerBean");
this.accountId = accountId;
this.name = name;
this.symbol = symbol;
this.totalSales = totalSales;
private String accountId = null;
public String getAccountId() {
return (this.accountId);
This seems to work fine. Can you try the latest weekly build from
https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList
Thanks,
Ed (JSF Co-spec lead)

Similar Messages

  • One reason why commandLink doesn't work in dataTable

    Ok, so I think I've got an explanation why commandLink doesn't work in dataTable when the model bean is request scoped. Maybe somebody can tell me if I'm wrong.
    I have a model bean that generates table rows based on some input criteria (request parameters).
    So, we validate the inputs, apply them to the bean and render the page. Once the inputs have been applied to the bean, a request for table rows returns rows, no problem.
    However, we put a commandLink in each row, so we can expand the details. Maybe we even get smart and repeat the input row-generating criteria as a hidden field in the page.
    Unfortunately, when the user hits the commandLink, the list page simply refreshes, maybe even w/out table rows. The user doesn't get the details page as expected.
    Why not?
    Because: in the DECODE phase (even before validation and before "immediate" values have had their valueChangeListeners called), we ask the model bean for the table rows, so we can decode the commandLinks. Unfortunately, in "decode" phase, the request-scoped model bean has not had its row-generating criteria updated (that happens in the "update model" normally, or at the END of the decode phase if we got cute by (1) setting the "immediate" attribute on the row-generating criteria to "true" AND (2) set a valueChangeListener to allow us to update the model bean early. The END of the decode phase isn't good enough -- in the middle of that phase, when we're attempting to deocde commandLinks, the model bean has no citeria, so there's no row data. No row data means no iteration over commandLinks to decode them and queue ActionEvents. So, we march through the rest of the phases, process no events, and return to the screen of origin (the list screen) with no errors.
    So, what's the solution?
    One solution is to make the model bean session-scoped. Fine, maybe we can store a tiny bit of data in it (the search criteria), so it's not such a memory drag to have it live in the session forever. How do we get that data in? A managed property in faces-config.xml with value #{param.PARENT_KEY} won't work because it's assigning request-scoped data to a session-scoped holder. JBoss balks, and rightly so. Do we write code in the model bean that pulls the request parameter out of thin air? (FacesContext.getExternalContext()....) I don't really like to code the name of a specific http request parameter into the bean, I think it's the job of the JSP or faces-config.xml to achieve that binding (request parameter to model propery). Plus, I'd be sad to introduce a dependency on Faces in what was previously just a bean.
    Is there a better way?
    In my particular situation, we're grafting some Faces pages onto an already-existing non-Faces application. I don't get the luxury of presenting the user an input field and binding it to a bean. All I've got to work with is a request parameter.
    Hmm, I guess I just answered my own question. if all I've got to work with is a request parameter, some ugliness is inevitable, I guess.
    I guess the best fix is to cheat and have the bean constructor look for a request parameter. If it finds it, it initializes the criteria field (which, in my case, is the key of an object that has a bunch of associated objects (the rows data), but could be more-general d/b search criteria).
    (I looked at the "repeater" example code in the RI, but it basically statically-generates its data and then uses 100% Faces (of course) to manage the paging (where "page number" is essentially the "criteria").
    Comments? Did I miss something obvious?
    John.

    ...or I could just break down and do the thing I was hoping to avoid (outputLink instead of commandLink):
    <h:outputLink value="/faces/Detail.jsp">
      <f:param name="PARENT_KEY" value="#{bean.parentKey}"/>
      <h:outputText value="#{bean.label}"/>
    </h:outputLink>It's still a "hardcoded" parameter name, but at least the binding is in the JSP and faces-config.xml, not the bean Java code.

  • Movieclip(root) doesn't work inside a function

    Hey everyone,
    I'm having this problem.
    In fact, when i publish my FLA with player 9, there is no prob.
    When i publish with selecting player 10, there is this problem.
    I paste my code :
    var leng:int = MovieClip(root).program.websiteXML.pages.titlePage.length();
    trace ("leng"+leng);
    setInterval(function () : void {
              if (MovieClip(root).program.autoCh==true){
               trace("CHANGE");
              MovieClip(root).allContent.controllMenu2['itemButton_' + MovieClip(root).program.linkPic].gotoAndPlay("s4");
              if (MovieClip(root).program.linkPic < int(leng-1)){
                        MovieClip(root).program.linkPic++;
                           }else{
                               //MovieClip(root).allContent.play ();
                             MovieClip(root).program.autoCh=false;
                             MovieClip(root).program.linkPic=1;
                             MovieClip(root).allContent.controllMenu2['itemButton_' + MovieClip(root).program.linkPic].gotoAndPlay("s4");
                             for (var z:uint=1; z<(MovieClip(root).program.linkPic+1); z++) {
                                  var tempMC:MovieClip = MovieClip(MovieClip(root).allContent.controllMenu2)["itemButton_"+z];
                                  Tweener.addTween(tempMC, { x:(z-1)*(45+1)-353, time:1} );     
                             for (var j:uint=(MovieClip(root).program.linkPic+1); j<7; j++) {
                                  var tempMC2:MovieClip = MovieClip(MovieClip(root).allContent.controllMenu2)["itemButton_"+j];
                                  Tweener.addTween(tempMC2, { x:(j-1)*(45+1)+352, time:1} );     
                             MovieClip(root).allContent.controllMenu2['itemButton_' + MovieClip(root).program.linkPic].gotoAndPlay("s3");
                       }}, 4000);
    For leng variable, there is no problem, the value is taken.
    But it's inside SetIntervall, at
    MovieClip(root).program.autoCh
    it tells me that :
    TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
        at Function/<anonymous>()[main6_cs3_fla._00button_136::frame1:32]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at SetIntervalTimer/onTimer()
        at flash.utils::Timer/_timerDispatch()
        at flash.utils::Timer/tick()
    And if I put the value outside the function :
    var autoChtest = MovieClip(root).program.autoCh;
    And use it :
    if (autoChtest==true)
    There is no errors but my function doesn't work correctly, as autoCh can be "false" in another action.
    Well, I hope this will not scare you, and someone will try to help me, please.
    If someone know anything about this issue or having same problem please tell me.
    Thanks!

    Ok i see more clearly, you know it's diificult for me to understand it because i'm into flash AS since a few weeks.
    And what you say about the way setInterval is use, with the function in it, i'm totally agree with that, it's difficult to read.
    The truth is that this is a template that I bought and it was like that, so to do what i've got to do i needed to change some AS3 code.
    This is how it is now :
    var rootvar = MovieClip(root).root;
    function diapodebut (e:TimerEvent) : void {
        if (rootvar.program.autoCh==true){
            trace("CHANGE");       
            rootvar.allContent.controllMenu2['itemButton_' + rootvar.program.linkPic].gotoAndPlay("s4");
            if (rootvar.program.linkPic < int(leng-1)){
                rootvar.program.linkPic++;
            }else{
                  //MovieClip(root).allContent.play ();
                rootvar.program.autoCh=false;
                rootvar.program.linkPic=1;
            rootvar.allContent.controllMenu2['itemButton_' + rootvar.program.linkPic].gotoAndPlay("s4");
            for (var $z:uint=1; $z<(rootvar.program.linkPic+1); $z++) {
                var tempMC:MovieClip = MovieClip(rootvar.allContent.controllMenu2)["itemButton_"+$z];
                Tweener.addTween(tempMC, { x:($z-1)*(45+1)-353, time:1} );   
            for (var j:uint=(rootvar.program.linkPic+1); j<7; j++) {
                var tempMC2:MovieClip = MovieClip(rootvar.allContent.controllMenu2)["itemButton_"+j];
                Tweener.addTween(tempMC2, { x:(j-1)*(45+1)+352, time:1} );   
            rootvar.allContent.controllMenu2['itemButton_' + rootvar.program.linkPic].gotoAndPlay("s3");
        else
            timerSynchro.stop( );
    var leng:int = MovieClip(root).program.websiteXML.pages.titlePage.length();
    trace ("leng"+leng);
    var timerSynchro:Timer = new Timer( 4000, 6) ;
    timerSynchro.addEventListener( TimerEvent.TIMER, diapodebut);
    timerSynchro.start() ;
    You can see that I use Timer class, i've seen on another website just what you say : use Timer instead of setInterval with AS3.
    If you still find something wrong to you, tell me!
    Thanks again for your help !

  • IPhone 4 doesn't work inside buildings

    My iPhone 4 rarely picks up calls inside my house or other buildings. My husband has no problem at all with his phone a Motorola Atrix 2. Even outdoors it doesn't work correctly when trying to make/receive calls or connect to Safari.

    What did your phone carrier say when you contacted them about the issue?

  • CommandButton's Action method doesn't  work

    Hi all
    My English isn't very good
    I use jdeveloper 11.1.1.3.0
    I have SelectOneRadio with two options. When I select each option two PanelGroupLayouts' visible should change:
    <af:selectOneRadio id="sor1" layout="horizontal"
    binding="#{Bean1.sor_Value}"
    valueChangeListener="#{Bean1.chg_sor}"
    autoSubmit="true">
    <af:selectItem label="1" value="1" id="si1"/>
    <af:selectItem label="2" value="2" id="si2"/>
    </af:selectOneRadio>
    public void chg_sor(ValueChangeEvent valueChangeEvent) {       
    if (sor_Value.getValue().toString().equals("1")) {
    pgl_1.setVisible(true);
    pgl_2.setVisible(false);
    } else {
    pgl_1.setVisible(false);
    pgl_2.setVisible(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pgl_1);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pgl_2);
    In each pgl I have a commandButton with a method related to theirs' action property. but When I click each button nothing happen and their related method don't run.
    but when I use rendered instead of visible in method: "chg_sor" , buttons' action method work well but in this case another error occurs because I can't ppr components that are not rendered.
    I don't know how solve this problem?
    Habib

    Thanks Frank
    In each pgl I have inputText with required=True. and if required field is null and pgl become invisible(visible = false) so the button's Action method on the other pgl(visible = true) doesn't run.
    why this happen?
    Habib
    Edited by: Habib Eslami on Feb 19, 2013 10:00 PM

  • Oracle Maps doesn't work inside a table cell?

    Hello everyone,
    I have been using Oracle Maps without a table, but now I need to put the display (&lt;div&gt;) inside a table cell for organization purposes. I noticed that it simply doesn't display the map if I put it there.
    This works and displays the map:
    <body onLoad="loadMainMap()">
          <div id="map_div" style="left:0px; top:0px; width:100%; height:100%; border:2px solid"></div>
    </body>This doesn't display the map (The table and div are there, but no map is shown):
    <body onLoad="loadMainMap()">
        <table>
            <tr>
            <td>
                    <div id="map_div" style="left:0px; top:0px; width:100%; height:100%; border:2px solid"></div>
            </td>
            </tr>
        </table>
    </body>Am I doing something wrong?
    Thanks in advance,
    ~Ruben Jorge

    Hi Ruben,
    That's related to DIV and the inline style you've selected.
    You can try to change the div style with, for example :
    <!--
    <table border=1>
    <tr>
    <td>
    </td>
    <td>
    <div id="map" style="position:absolute;top:100px;bottom:400px;right:150px;left:150px;visibility:visible;overflow:hidden;border:1px"></div>
    </td>
    </tr>
    </table>
    -->
    Or give a try with DIV tables :
    <!--
    <body onload=javascript:showMap();>
    <h3> Exemplo Oracle Maps example - Display de um mapa utilizando DIVs</h3>
         <div id="container">
    <div id="row">
         <div id="left">
              <h4>Left Col</h4>
              <p>...</p>
         </div>
         <div id="map" style="width: 800x; height: 400px">
              <h4>Middle Col</h4>
         </div>
         <div id="right">
         <h4>Right Col</h4>
         <p>...</p>
         </div>
         </div>
    </div>
    </body>
    </html>
    -->
    I've used the following styles :
    <style type="text/css">
    /* <![CDATA[ */
         body {
              margin:0; padding:0;
              font-size:80%;
              font-family: sans-serif;
    #header {
    display: block;
    width: 80%;
    margin: auto;
         #container {
         width: 80%;
         margin: auto;
              padding:0;
              display: table;
              border: 1px solid black;
    #row {
    display: table-row;
         #left {
              width:150px;
              padding:1em;
              background: #EEF;
              display: table-cell;
         #right {
              width:150px;
              padding:1em;
              background:#FEE;
    display: table-cell;
         #middle {
              padding: 1em;
              background:yellow;
    display: table-cell;
    /* ]]> */
    </style>
    Hope it helps!
    Cheers,
    pedro
    Edited by: plopes on May 11, 2009 2:46 PM
    Edited by: plopes on May 11, 2009 4:40 PM

  • After EFI firmware update the scrolling with two fingers doesn't work inside the browsers (both safari and chrome)

    I've got a new MacBook Pro Retina from october 2013 13" (8 gb Ram and 256 gb SSD).
    I had the "freezing" issue that was solved with the firmware EDI update.
    But after this update i have now another problem: often during web browsing the scroll with 2 fingers up and down the page stops working (but the trackpad is ok for everything else and if i go in other programs the scroll works as usual). The only solution is to restart the browser but the problem happens again and again.
    Both on Chrome and Safari. Especially on Safari everything freeze if i try to scroll on the right to go back to the previous page.
    Does anybody else have this issue?

    macmattia wrote:
    I've got a new MacBook Pro Retina from october 2013
    Does anybody else have this issue?
    Doesn't matter if anybody else has this issue. 
    You are still under warranty.  Call Apple Care. Make sure you get a case number as all repairs have an additional 90 days of warranty. 
    #1 - You have 14 days from the date of purchase to return your computer with no questions asked.
    #2 - You have 90 days of FREE phone tech support.
    #3 - You have the standard one year Apple warranty.
    #4 - If you've purchased an AppleCare Protection Plan, your warranty last for 3 years.   You can obtain AppleCare anytime up to the first year of the purchase of your computer.
    Take FULL advantage of your warranty.  Posting on a message board should be done as a last resort and if you are out of warranty or Apple Care has expired.

  • Link action (CommandLink): target attribute doesn't work

    I want to use a link action to pop up another JSF page, so I set its target attribute to _blank, and in its event handler,  I return the other jsf page.  However, the other jsf page doesn't open in a new window, it just replaces the current page in the existing window.  Why?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    The way to open a new window is to make use of the javascript function window.open. This can be used on click event for the hyperlink action. The link action does not allow the usage of the above mentioned method.
    Thanks,
    RK

  • Copy and Paste doesn't work inside compound clips

    If I have two compound clips, when I try to copy some clips from inside one, then open the other compound clip and paste, nothing happens.
    However, if I try the same on a project timeline paste works.
    This is really annoying as I cannot move a clip from one scene to another when I have set up my scenes as compound clips.

    They were created in 10.0.8.
    Are you definitely going into two separate compound clips?
    For example, If I explode one of the compound clips on a timeline then paste works again. That still means I need separate projects for each scene which is a pain.
    What I would like in FCP X, is to be able to have more than one timeline open simulataneously, so I can drag relevant clips between them. I am finding with a documentary that I am editing, where the story is not obvious and scripted in advance, that developing story idea sections as compound clips is really incovenient. I often realise that clips there were in one section work better in another. This was much easier in FCP 7 where you can open two timelines and drag between them.
    I hope apple add the ability to open multiple timelines.

  • Rendering Previews doesn't work

    I'm trying to render standard previews for my catalogue but it just  hangs on 1 of 8810, it worked before I reinstalled my OS, I have tried a  new catalogue and tried deleting the prefs file but it's still the  same, do I need to install an older version of LR first before  installing the latest for this to work?
    It works on the other machine that uses the same catalogue file.

    I believe (don't use windows myself) on XP you need some sort of RAW extension from Microsoft installed to see the previews for RAW files from many cameras. Others probably know more about this.
    A quick google shows this. That might be it but it appears old (as XP is of course)

  • Rendered Attribute

    I have a CommandButton with rendered attribute to display it depend of the step in a bussines process.
    The JSF Page have a request scope then all flags need to be recalculate each request (The page is reloaded severla times to complete the process, the actions return null).
    Well, my problem is that when I render the Commandbutton and make click on it the form be submitted but the action never be executed.
    I think the problem is that when the request be processed maybe the flags to render the button be fasle and the actionevent never be queue.
    Anybody have idea ?
    Some suggest to resolve this problems.
    Thank you in advanced.

    loboEsa wrote:
    I have a CommandButton with rendered attribute to display it depend of the step in a bussines process.
    The JSF Page have a request scope then all flags need to be recalculate each request (The page is reloaded severla times to complete the process, the actions return null).
    Well, my problem is that when I render the Commandbutton and make click on it the form be submitted but the action never be executed.
    I think the problem is that when the request be processed maybe the flags to render the button be fasle and the actionevent never be queue.
    This is exactly right. Some options include:
    1) Storing the rendered attribute value in the session instead of the request.
    2) Making the rendered attribute depend on a request parameter which can be added as a hidden input.

  • Cfdocument doesn't work with my font size

    Hi All,
    My font size doesn't work inside my cfdocument using css
    Here is my code:
    In My css file I have this:
    body {     font-family:"times new roman";     font-size: 18px;     line-height: 20px; } 
    The font is a TTF and it shows in my cfadmin as:
    Font Family Font Face Postscript Name Font Type Useable In Path
    times new roman
    Times New Roman
    TimesNewRomanPSMT
    TRUETYPE
    PDF/FlashPaper
    c:\windows\fonts\times.ttf
    I try using postscript name and the same issue. If I increase the font size it actually reduce the size on the screen.
    I'm using windows 2008 with CF8 with the latest hotfix 8,0,1,195765
    Any ideas?
    Thanks in advance.
    Johnny

    Don't know why didn't show my code.
    Here is the code:
    <cfdocument format="flashpaper" pagetype="letter" fontembed="yes" margintop="0.3" marginbottom="1.25" marginleft="1" marginright="1.25" unit="in">
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
    <head>
        <style type="text/css" media="screen">
            @import url(assets/css/preview.css);
        </style>
    </head>

  • CommandButton with conditional-rendered doesn't work???

    Hi,
    My problem:
    I just would like to show the Submit-Button (commandButton) after I change the value of the "selectOneMenu ". So for that I set the boolean variable for the rednerer to true. After that the Submit-Button is shown. But when I click on that Submit-Button, the action is not invoked?
    But when I remove the "rendered="#{bean.rendered}" attribute from the commandButton, the action is invoke!
    What do I wrong?
    Would be great if someone could help me!
    <h:form id="choose2">
      <h:panelGrid columns="2" rowClasses="panelChooseRow" columnClasses="panelChooseCol">
        <h:outputText value="#{msgs.beanUserName}" />
        <h:panelGroup>
          <h:selectOneMenu id="userMenu" value="#{bean.userName}" onchange="submit()" required="true">  
             <f:selectItems id="userItems" binding="#{bean.userItems}" />
          </h:selectOneMenu>
          <h:message for="userMenu" errorClass="errMsg" />
        </h:panelGroup>
        <h:outputText value="" rendered="#{bean.rendered}"/>
        <h:commandButton id="send" value="#{msgs.beanSave}" action="#{bean.actionModify}" rendered="#{bean.rendered}"/>
      </h:panelGrid>
    </h:form>
    Bean-Code:
      public void setUserName( String newValue )
        _userName = newValue;
        _bRendered = true;
    public String actionModify()
        System.out.println("actionModify");
        return null;
      public boolean isRendered()
        return _bRendered;
      }

    Hi,
    well, I don't see what could be wrong in your code, but I have an example working.
    So I will just post my code and you can compare.
    Some code snipped off my JSF Site:
    <h:commandButton id="upload"  rendered="#{uploadFileBean.check}" onclick="submit()" action="#{uploadFileBean.upload}" value="#{messages.upload}" styleClass="bgTextBright" tabindex="4"/>
    <h:commandButton id="correct" rendered="#{not uploadFileBean.check}" onclick="submit()" action="#{uploadFileBean.correct}" value="#{messages.correct}" styleClass="bgTextBright" tabindex="4"/>Here the code in my uploadFileBean:
    private boolean check;
        public boolean isCheck()
            return check;
        public void setCheck(boolean b)
            this.check = b;
    public String upload()
            String retVal = Constants.UPLOAD_OK;
            return retVal;
    public String correct()
            String retVal = Constants.CORRECT_OK;
            return retVal;
        }There is only one commandButton shown (depending on my check property) and if I press it, the associated action method is called.
    Did you have a look, if you call the right method? Meaning, does the method exist in the given bean? Do you have your bean declared in the faces-config.xml?
    As I can tell you, the posted code works fine, so hope this could help you.

  • CommandLink doesn't work with rendered-attribute

    Hello,
    I have quite a strange problem.
    I have a commanLink, which has a rendered attribute. The link is rendered conditionally, so the rendered-value comes from a bean.
    <h:commandLink rendered="#{Bean.canEdit}" action="#{Bean.selectDocumentToEdit}" >
               <h:outputText value="Edit doc" />
                              <f:param name="param" value="#{Bean.doc.id}"/>
    </h:commandLink>Showing the link is working like it should, but commandLink is not working with this. When I change rendered="true", commandLink works ok. But now it doesn't call the commandLink action at all.
    Any help would be appreciated

    rendered="true", commandLink works ok. But now it
    doesn't call the commandLink action at all.I meant it doesn't call the commandLink action method when retrieving rendered-value from bean.
    I'm using RI 1.1.01

  • Rendered attribute of commandButton preventing action method from executing

    When I add a rendered tag to my commandButton it'll only execute the method intermittantly. After a lot of testing, I've narrowed down the problem so I now know when it does and does not work properly.
    If rendered="true" it always works fine
    If rendered="#{issue.update}" and isUpdate() is simply "return true;" it'll always work correctly
    If rendered="#{issue.update}" and isUpdate() is simply "return this.getId() != 0;" it will not execute the action specifiied, however the page does refresh.
    It's also interesting to note that on the rendered page, the button is always shown only when it should be. So when the action fails to execute, the button is shown on the screen.
    In the case that doesn't work, I debugged through and noticed that isUpdate() is called six times for a single page refresh. By printing a stacktrace for each call, I discovered that it's called once in the ApplyRequestValues stage of the lifecycle and the other five times are from RenderResponse (I have the stacktraces, let me know if they'd be worth posting). This method is only referenced once and only on the jsf page, never in the java code... but I'll go back and try to understand why it's calling it so many times later.
    The first time isUpdate() is called, it will retrun false because the value for id has not yet been assigned, which makes sense. This causes a "false" to be returned from isUpdate() and this is what is causing the action to not be executed. If I debug through and change the return value to be true here (only the first time) the action is updated. So my question is, what's going on here? I don't understand why is isUpdate() called so many times, why is it called so early in the lifecycle, and why the call in the apply request values stage determines whether or not it executes the action?
    Now, as a workaround, I put a binding on the id, and tried to use that value. That exposed another problem with my page which requires some explanation... Here are the relevent sections of the page and backing bean...
    issue.jsp
    <h:outputText value="#{issue.init}" />
    there's a datatable here which displays all issues and has a commandLink to edit the issues (immediate="true"). It posts back to this page and passes an ID on the URL.
    <h:inputHidden id="id" value="#{issue.id}" binding="#{issue.idBinding}" />
    <h:inputText id="name" value="#{issue.name}" required="true" />
    <h:commandButton id="updateIssue" value="Update" action="#{issue.updateIssue}" rendered="#{issue.update}" />
    Issue.java
    getInit() will get the id from the FacesContext (specifically, the URL) and load the data from the database.
    On the rendered page in my web browser:
    After clicking on an edit link, the page is loaded and the name is filled in, the update button is on the screen, and everything looks good.
    When I view source, I see that the hidden input for id is set to zero. I'm still trying to figure out why this is the case since all the other parameters are set properly. I stepped through getInit() and it is, indeed setting the id property properly.
    So when I added the binding to get the value from there instead of via the local values, I found that it always got zero (presumedly because that's what is rendered in the HTML code). This means that isUpdate() still returns false on the first call, and my attempt at a workaround fails! So, just as a test, I used some "javascript on the URL" trickory to set the id field to "10". That worked just fine. So the root of the problem is that issue.id is not loading. I put code in the getId() method to always look at the binding and then faces context and put the id into this.id if it found a non-null and non-zero value. It now returns the correct value all of the time but the HTML produced still says the value is zero.
    I've spent about 4 hours on this issue and I'm to the point where I need advice from someone who is more educated on how JSF works. I know the inputHidden get the vaule for the HTML tag it produces from getId() because when I hard code that to always return 10, it works. But when I leave it to return the proper value, the debug statements say it's returning the proper value, but the HTML always says it's zero. This isn't an acceptable solution anyway because I use getId() in the datatable to display the IDs of each of the issues; I just wanted to see if it'd work and it didn't.
    Here's my latest getInit() method (which returns the value from the URL when called from the datatable, but not when called from the inputHidden.
        public int getId() {
            if(getIdBinding() != null && !getIdBinding().isLocalValueSet()) {
                if(getIdBinding().getSubmittedValue() != null) {
                    int temp = Integer.parseInt((String)getIdBinding().getSubmittedValue());
                    if(temp != 0) {
                        this.id = temp;
                        log.info("Got binding value of "+this.id);
            FacesContext ctx = FacesContext.getCurrentInstance();
            if(ctx != null) {
                Map<String, String> map = ctx.getExternalContext().getRequestParameterMap();
                    if(map != null) {
                    String given_id = map.get("id");
                    if(given_id != null) {
                        // if given an ID and no action, we load the data
                        try {
                            log.info("Got value from FacesContext of "+given_id);
                            int temp = Integer.parseInt(given_id);
                            if(temp != 0)
                                this.id = temp;
                        } catch(NumberFormatException e) {
                            // if what's passed in isn't an integer, we leave everything at default values
            return this.id;
        }Thanks in advance,
    Adam

    I'm clicking a link which will load data into a form. In the form there is a field called "id" which has a value of something other than zero. I press the update button (which is only rendered when the id is non-zero), it submits the form. When the restore view happens, the id is the default value of 0 because it has not yet applied the values from the form to the backing bean. Therefore the rendered attribute of update button (isUpdate()) will return false, and the update() method does not get queued.
    When I switch my backing bean to session level, the restore view already has the id loaded, even before the values from the form are applied, so everything works as expected. The problem was that I needed to have the correct return values before any values have been loaded into the member variables.
    As a solution to this, I made some private boolean variables called isNew and isUpdate. Both of them are true by default. This makes sure that the isNew() and isUpdate() methods (attached to the render attribute of my command buttons) return true in the restore view phase. When I read in the id from the URL or hidden input, it'll update the boolean values accordingly, which makes sure the buttons are rendered properly. This allowed me to set the backing bean back to the request scope, which make me happy. <img class="emoticon" src="images/emoticons/grin.gif" border="0" alt="" />
    Thank you Mr. De Campo. You gave me exactly what I was looking for... a better understanding of how thigns work, and (indirectly) a clean solution to my problem.

Maybe you are looking for