[11.1.1.1.0] question valueChangeListener

Hello

In a page jspx, I had three components SelectOneChoice. The first will determine which one will be visible between the last 2. If the first item is selected, then number 2 soc is visible (#3 isn't), and if the second item is selected then soc number 3 is visible (#2 is not).

If the first is a static, having two items coded hard and method valuechangelistener and auto submit to true:
< af:selectOneChoice label = "Client or group.
ID = "socRadioClientOuGroupe".
value = "#{backingBeanScope.backing_statistiques.radioClientOuGroupe} '"
valueChangeListener = "#{backingBeanScope.backing_statistiques.changeListenerClientGroupe} '"
autoSubmit = "true" >
< af:selectItem label = 'Standard customer' value = 'standard '.
ID = "si8" / >
< af:selectItem label = "Client group" value = "group".
ID = "si9" / >
< / af:selectOneChoice >

The two other soc, I'll play with visible attributes and the partialtriggers will do the job.

< af:selectOneChoice value = "#{bindings." ClientFiltreEmetteur.inputValue}.
label = "name of the customer.
required = "#{bindings." ClientFiltreEmetteur.hints.mandatory}.
shortDesc = "#{bindings." ClientFiltreEmetteur.hints.tooltip}.
ID = "socClientDetailConsoClient".
Binding = "#{backingBeanScope.backing_statistiques.socClientDetailConsoClient} '"
visible = "#{backingBeanScope.backing_statistiques.visibleClient} '"
partialTriggers = "socRadioClientOuGroupe" >
< f: selectItems value = "#{bindings." ClientFiltreEmetteur.items}.
ID = "si4" / >
< / af:selectOneChoice >
< af:selectOneChoice value = "#{bindings." GrpClientsFacturation.inputValue}.
required = "#{bindings." GrpClientsFacturation.hints.mandatory}.
shortDesc = "#{bindings." GrpClientsFacturation.hints.tooltip}.
ID = "socGroupeDetailConsoClient" label = "Client Group"
visible = "#{backingBeanScope.backing_statistiques.visibleGroupe} '"
partialTriggers = "socRadioClientOuGroupe" >
< f: selectItems value = "#{bindings." GrpClientsFacturation.items}.
ID = "i5" / >
< / af:selectOneChoice >


This is method changelistener my backing bean where I change the visible attribute of honey:

{} public void changeListenerClientGroupe (ValueChangeEvent valueChangeEvent)
If (valueChangeEvent.getNewValue () .equals ("standard")) {}
setVisibleClient (true);
setVisibleGroupe (false);
}
else {}
setVisibleClient (false);
setVisibleGroupe (true);
}
}

The first CTP is initialized to the first value. When I change the choice to the second value, it works fine, the second disappears soc and the 3rd is displayed. So for so good, but when I went back to the first, the change event is not raised, the listener method is not executed and the visible properties of my CPS are not changed which is not good.

It seems that the event is raised only when the value is changed compared to the original, not the other. Is this a bug or is this a normal behavior?
Workaround that I found which confirm this, is to not initialize the component, so that each change is always different initial value and the event is always thrown. But I have an uninitialized element that is not perfect for me.

Thanks for any info on this or any better solution.

Concerning

The following thread might give you a hint: Re: ADF Faces/RC: issue PPR unchecked selectBooleanCheckbox

CM.

Tags: Java

Similar Questions

  • ADF InputText Disabled = True, ValueChangeListener do not call

    Hello

    I use JDev 11.1.1.7

    There is a text of entry in my jsff and he disabled = true property with the property value change listener and it is not the call. But if I set disabled = false, it works.

    Why this is happening?

    < af:inputText label = "#{portalextensionBundle.TOPLAM_MIKTAR} '"

    ID = "it10.

    contentStyle = "width: 100px;"

    Binding = "#{pageFlowScope.MainBean.itToplam} '"

    partialTriggers = 'it5 it9.

    disabled = "true".

    autoSubmit = 'true '.

    autoSubmit valueChangeListener = "#{pageFlowScope.SeyahatMasrafBean.valueChangeListenerToplam}" = "true" > "

    "< af:convertNumber pattern =" #. ## »

    messageDetailConvertPattern = "#{portalextensionBundle.L_U00FCTFEN_FORMATA_UYGUN_GIRI}" / >

    < / af:inputText >

    Thank you

    I know that it cannot be changed by the user; but I'm updating value by entering text with sum other values. So he has a partial trigger. My question was why it isn't working valuechangelistener, because the value is changing.

    Value change events should be fired only on the evolution of the direct value by the user (Yes, there is a way to trigger this event programmatically from code, or as some "side effect", but there is generally bad practices that indicate that something is wrong with your code)

    If you want to run the code in several places (in your example, when the value is changed in inputText1 or inputText2), then move this code to the procedure and call this procedure from two places.

    Dario

  • Question about the use of the custom component class define what declarative component

    12.1.3 jdev

    I'm trying to define a declarative component with my custom component class.

    This is the code for my component jsf declarative. I'm trying to use the label on selectManyListbox attribute to pass queryClass for my component class name. It does not work. I also try to use f: attribute to my component class. It does not work too. Question 1: how to move my declarative component attribute to my class of component?

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "namingp1" simple = "true" label = "#{attrs.queryClass}" "

    ' autoSubmit Binding = "#{dropListComp.selectManyListBox}" = "true" valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < f: attribute name = "queryClass" value = "#{attrs.queryClass}" / >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "sl_2" simple = "true" label = "#{attrs.queryClass} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    That's how I try to retrieve the label or f: attribute queryClass in my component class. I get null for both directions.

    {} public void setSelectManyListBox (RichSelectManyListbox selectManyListBox)
    this.selectManyListBox = selectManyListBox;
    If (this.selectManyListBox.getChildCount () == 0) {}
    queryClass = (String) this.selectManyListBox.getLabel ();
    System.out.println (".. queryClass of the label..." + queryClass);
    If (queryClass is nothing)
    {
    queryClass = (String) this.selectManyListBox.getAttributes () .get ("queryClass");
    System.out.println (".. queryClass of attr..." + queryClass);
    }
    If (queryClass is nothing)
    queryClass = "glog.server.query.powerdata.InvolvedPartyQualQuery";
    this.selectManyListBox.getChildren () .addAll (buildDropListSelectItems (queryClass));
    }
    }

    Thank you.

    Hello

    If your declarative component has a defined class of request attribute then #{attrs.name_of_attribute} called from Java should be able to solve

    Frank

  • question for blocks partially merged into a page that indeed a block another entrance block

    Hi all

    I use JDEV11.1.2.4.0 and Trinidad, I have a page that dynamically generates some blocks something like this screen:

    4-2.png

    in each block, the autoSubmit = "true" is defined for the checkbox, which triggers the display of the radio and the entry date and the radio has also autoSubmit = 'true' game to trigger the entry date to display. And for the input (< tr:inputDate >) date field, I have javascript to validate the input for the "onchange" event value/format Here's the question/confusion:

    When the entry is invalid format, the correct error is displayed with Javascript, but when I try another box

    (not the one in the same block that the date of entry in format not valid), the the other checkbox click valueChangeListener pulled, but the radios and the date of entry in the field in this block not displayed any (all the attributes that make radio buttons to display are correctly initialized in the valueChangeListener). I have to fix a date for previous input to a valid format/value, then, by clicking on the other box works. I do not expect the date of entry into a single block partially melted in the page will impact on entry (check the box in this case) at all. I tried different immediate combination for attribute in the checkbox and the date of entry in the following table:

    checkbox

    Date.MinValue

    T

    T

    T

    F

    F

    T

    F

    F

    all produce the same result.

    If I hit the Refresh button of the browser, the selection of the other checkbox disappeared and the invalid entry went as well. It seems therefore that the selection of the other checkbox is not really updated at all. (Omitted Update_Model phase). My understanding is that the other block by selecting another box isn't only partially returned, not any page rendering, how could the entry invalid in the first block will affect the rendering of the second block?

    Thank you

    Shawn

    Well well, even partial submit will trigger all lifecycle JSF.

    And, if there are validation error, model will not be updated.

    Maybe this can help: The BalusC Code: reset input components unprocessed on ajax update

    Dario

  • Calling a method in ValueChangeListener

    Hello

    I need to do the following:

    After the entry of a value, I need to call a pl/sql function. If this function returns true, the value entered is valid.

    If this function returns false, the value is not valid and the user is shown an alert.

    I did the following:

    (1) bind this inputText.

    (2) created a * bean.java

    (3) the input text valueChangeListener calls a method.

    My question is how to call a pl/sql function in this method? I wrote the following code:

    public void validateformula (ValueChangeEvent valueChangeEvent)

    {

    System.out.println ("test!");

    CallableStatement cs2 = null;

    try {}

    System.out.println ("inside the 2nd test");

    CS2 = getDBTransaction () .createCallableStatement ("start?: = funcionName (?);") end; ", 0) ;

    System.out.println ("after");

    CS2.registerOutParameter (1, Types.BOOLEAN);

    System.out.println ("here");

    CS2. SetString (2, it4);

    CS2. ExecuteUpdate();

    Boolean retvalue2 = cs2.getBoolean (1);

    If (retvalue2)

    {

    throw new local ("Invalid Value!");

    }

    else {}

    System.out.println ("valid value");

    }

    } catch (SQLException f) {}

    throw new Aexception.getLocalizedMessage (f);

    }

    }

    I get the following errors:

    Error (321,16): cannot find getDBTransaction() method

    Error (325,15): cannot find setString (int, oracle.adf.view.rich.component.rich.input.RichInputText) method

    Any help please?

    twinklin_girl, you totally driving me crazy ;-)

    As I said earlier, you can not call DB function that returns boolean Java. What you need, it's a wrapper function:

    Re: Convert date format timestamp format

    And you need to call that, wrapped in stored function.

    Let's say you wrapped function DB return varchar2 (or let me know what you want to return)

    Then, your java function AppModuleImpl/ViewImpl that calls this function encapsulated (ValFormula) returns a String, for example "Y" or "N".

    Only what you need to do is:

    String result = (String) operationBinding1.execute ();.

    If (Y".equalsIgnoreCase (result)) {" "}

    Add FacesMessage as in my previous message

    }

  • Could not access the value of the component off ValueChangeListener

    In many cases, I need to use the value of some UIComponent during execution in many places in the application. But the problem is that I could not access the value of the component outside the ValueChangeListener of this component. I tried to store this value in a temporary local variable, I also tried to use the opportunity to link , but it did not work.

    This thread changes made on the ValueChangeListener can't think where else

    said I should go ahead everything in the ValueChangeListener but is not useful in my case and it's really limit my choice later.

    So question is: How to access the value of the element external ValueChangeListener?

    I use Jdeveloper with ADF 11.1.2.3 technology

    Hello

    You can create a bean (depending on the application, choose the scope), add a variable with accessors and then use it in the 'value' property of the component.

    Arun-

  • SelectOneChoice: valueChangeListener called that one only twice

    Hello.

    My version of JDeveloper is 11.1.1.7.0

    I drag and drop a notice from the DataControls, as a SelectOneChoice (SOC).

    My question is valueChangeListener (vCL) is one called twice. So, I change the value of the COS and vCL is called and works well, then I change the value new and vCL is not called. Then I change again and vCL is called, then no, then Yes, then no... and so on.

    What could be the problem? Here's the code SOC and vCL

    <af:selectOneChoice value="#{bindings.MyTableView1.inputValue}"
                        label="My label"
                        shortDesc="#{bindings.MyTableView1.hints.tooltip}"
                        binding="#{backingBeanScope.myBean.soc7}"
                        id="soc7"
                        valueChangeListener="#{backingBeanScope.myBean.myListener}"
                        autoSubmit="true"
                        valuePassThru="true">
      <f:selectItems value="#{bindings.MyTableView1.items}"
                     binding="#{backingBeanScope.myBean.si14}"
                     id="si14"/>
    </af:selectOneChoice>
    

    public void myListener(ValueChangeEvent event) {
        event.getComponent().processUpdates(FacesContext.getCurrentInstance());
      
        JSFUtils.setExpressionValue("#{bindings.MyTableView1.inputValue}", event.getNewValue());
      
        Integer resultAttValue = (Integer)JSFUtils.resolveExpression("#{bindings.MyTableView1.selectedIndex}");
      
        // My stuff...
      }
    

    Any ideas would be very useful.

    Thanks in advance. Best regards

    Finally, he worked creating the SelectOneChoice of an LOV.

    There is an id attribute, which includes descriptions in the main view, other opinions.

    Creating a LOV for the attribute id and drag and drop to this id works.

    When I associate the listener in my question, that works very well. Otherwise, I Don t know why, but it does not work well.

    Finally, as Jacques has said, valuePassThru is not necessary. Thank you.

    I hope this helps.

    Concerning

  • valueChangeListener not refreshing Popup correctly

    I use JDeveloper 11.1.1.6

    My use case has a screen with a table of the ADF. In this table, the user clicks a button to add a row to the table. A pop-up form is presented. The primary key of the new line is a field that is formatted based on certain attributes selected by the user. The user will choose a value from a menu of selectOneChoice. The intention is to application to generate, and then display the value of the primary key from the context menu. The user will continue to enter the rest of their shareholdings in the popup and then submit the context menu to add the line to the DB. The selectOneChoice of the screen field is as follows. Note it does not value change listener and autosubmit:


    < af:selectOneChoice value = "#{bindings." Field1.inputValue}.
    label = "#{bindings." Field1.label}.
    required = "#{bindings." Field1.hints.mandatory}.
    shortDesc = "#{bindings." Field1.hints.ToolTip}.
    Binding = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.soc9} '"
    ID = "soc9" autoSubmit = 'true '.
    valueChangeListener = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.onField1Change} '"
    valuePassThru = "true" >
    < f: selectItems value = "#{bindings." Field1.items}.
    Binding = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.si9} '"
    ID = "si9" / >
    < / af:selectOneChoice >



    The primary key field is updated via a partial trigger. It is defined in the following form:


    < af:inputText value = "#{bindings." PrimaryKeyField.inputValue}.
    label = "#{bindings." PrimaryKeyField.hints.label}.
    required = "#{bindings." PrimaryKeyField.hints.mandatory}.
    columns = "#{bindings." PrimaryKeyField.hints.displayWidth}.
    maximumLength = "#{bindings." PrimaryKeyField.hints.precision}.
    shortDesc = "#{bindings." PrimaryKeyField.hints.tooltip}.
    Binding = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.IT4} '"
    ID = "it4" partialTriggers = "soc9" readOnly = "true" >
    < f: validator binding = "#{bindings." PrimaryKeyField.validator} "/ >"
    < / af:inputText >



    The code in my grain of the value change listener support is as follows:


    public void onField1Change (ValueChangeEvent valueChangeEvent) {}

    BindingContainer links = getBindings();

    DCIteratorBinding = dciter
    (DCIteratorBinding) bindings.get ("Container1Iterator");

    ContainerVORowImpl = containerDispatchRow
    (ContainerVORowImpl) dciter.getCurrentRow ();

    ........................................................


    Integer =
    ValueChangeEvent.getNewValue (integer) ();

    Number of field1Number =
    new Number (number.intValue ()); * /

    String primaryKey1Number = calculated value of another method

    containerDispatchRow.setPrimaryKeyField (primaryKey1Number);


    System.out.println ("onField1Change () - reservation number: '+")
    containerDispatchRow.getPrimaryKeyField ());
    }



    I have 2 problems with the above mentioned components.

    First of all the 'valueChangeEvent.getNewValue ()' returns the index number of the selected record in the selectOneChoice as opposed to the actual value of the line. The selectOneChoice contains a drop down of numbers (which may or may not start at 1).

    The second question I have, is that the primaryKeyField not display properly when updating from the pop-up window. My method calculates the correct value and the System.out.println correctly displays my value. For some reason when the popup is updated rather than show my newly calculated primaryKeyField, it displays the primaryKeyField associated with the first record in the binding of Interator (dciter)

    Instead of setting the value of the line, you can set the value in the attribute "PrimaryKeyField" binding as

    String primaryKey1Number = computed value from another method
    ...
    // get the binding container
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    // get an ADF attributevalue from the ADF page definitions
    AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("PrimaryKeyField");
    attr.setInputValue(primaryKey1Number);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.it4);
    ...
    

    Then you should see the value in the user interface.

    Timo

  • Question for adf inputText component when the required value true attribute

    Hello

    The JDev version that I used in 11.1.2.0.0

    I have an ADF form that contains 3 components EmployeeName (inputText), EmployeeAddress (inputText) and EmployeeType (lov selectOneChoice), when I select an lov EmployeeType value, I need the EmployeeAddress to change automatically, this is implemented via the valueChangeListener and autoSubmit attributes in the attribute of component and partialTriggers of selectOneChoice on the employaddress inputText as the code below, when debugging backing bean I saw the logic is complete. But since the EmployeeName has a required attribute is set to true, the page then to issue me an error message that "EmployeeName is required field" and I do not see the employaddress updated correctly. My question is if I can skip the check required for EmployeeName at this time when I just changed selectOneChoice value rather than clicking the button submit on the page?

    < af:panelFormLayout id = "pfl1" >
    < af:inputText value = "#{bindings." EmployeeName.inputValue}.
    label = "#{bindings." EmployeeName.hints.label}.
    required = "#{true}".
    ID = "it2" >
    < f: validator binding = "#{bindings." EmployeeName.validator} "/ >"
    < / af:inputText >
    < af:inputText value = "#{bindings." EmailAddr.inputValue}.
    label = "#{bindings." EmailAddr.hints.label}.
    ID = "it1.
    "partialTriggers =": soc4 ".
    Binding = "#{EmployeeBean.emailAddrBinding}" >
    < f: validator binding = "#{bindings." EmailAddr.validator} "/ >"
    < / af:inputText >
    < af:selectOneChoice value = "#{bindings." EmployeeType.inputValue}.
    label = "#{bindings." EmployeeType.label}.
    ID = "soc4".
    autoSubmit = 'true '.
    valueChangeListener = "#{EmployeeBean.changeEmpTypeListener}" >
    < f: selectItems value = "#{bindings." EmployeeType.items}.
    ID = "si1" / >
    < / af:selectOneChoice >
    < / af:panelFormLayout >

    Try setting immediate = "true" on the selectOneChoice component.

  • browsing event valueChangeListener &lt; af:selectOneChoice &gt;

    Hello
    I want to provide options for the user to navigate to different pages (screen) using < af:selectOneChoice > (drop-down). On valueChangeListener I call a method that returns a string value based on the value selected in the drop down. I have the mapping in faces-config .xml to the values returned by the method (called changeValueListener).


    I tried with < af:selectOneChoice > component but it do not navigate the user to a different page, but it remains on the same page. When I used the command instead of < af:selectOneChoice > button and returned the value of the method (mapped in faces - config.xml for navigation) then he navigates the user to another page.

    My question is: when valueChangeListener < af:selectOneChoice > event calls the method and then he will always remain on the same page or can I navigate the user to another page according to the method returns the value (return value would be mapped with a few jsp in faces-config. XML)

    Thank you. !

    ContextPath = string
    FacesContext.getCurrentInstance () .getExternalContext () .getRequestContextPath ();

    FacesContext.getCurrentInstance () .getExternalContext () .redirect (contextPath + "abc.jspx");

  • iOS 10 people record problem/question

    Hello

    I have a couple of "faces" in the issue of people who are coming in white, but acknowledged same 'face' of many times.  Is anyway to update it for photo comes actually?  At a few faces, I don't know that facial recognition found since it is coming from white.

    Hi JohnP007,

    Congratulations on your iPhone 7 more running iOS 10! I understand that some of your faces in the album of people pull up as a draft and you want to refresh. You can try to use the steps below to fix the faces on the thumbnails in albums.

    Difficulty faces and names mixed-up

    If you notice that there is a photo of someone in a collection that is poorly identified, you can remove it.

    1. Tap the person you want to remove in the album of people > select.
    2. Type Show done face to emphasize his face in every photo.
    3. Press on each photo that is not the person.
    4. Type > not this person.

    Hide people

    You can hide the people or groups that you don't want in your album of people.

    1. Open the album people and press Select.
    2. Touch the people you don't want to see.
    3. Click Hide.

    If you want to see the people that you have hidden, press on show hidden people.

    People in the Photos on your iPhone, iPad or iPod touch

    This should be corrected without delay faces. Please use the Apple Support communities to post your question. Good day.

  • Questions - and answers forgotten

    How to get my 'secret' answers to the questions that I have noted the way back when?

    If you forgot the answers to your questions of security of Apple ID - Apple Support

  • I can't reset the security questions. We received notice as below:

    Hello world

    I can't reset the security questions. We received notice as below:

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    Please help me as soon as possible! Thank you very much.

    Hello

    You will need to contact the Apple Support.

    The information is available here:

    Contact Apple for assistance with the security of the Apple ID - Apple Support accounts

    (I'm afraid that no one here can solve the problem for you - this is a user-based community).

  • Question of cloning for SSD upgrade on 12 Macbook Pro

    Previously, I did an upgrade to SSD on my Macbook Air to 2012 according to the instructions of JetDrive transcend. Basically connection via USB 3 and using Mac OS X to clear (and format) disc utilities new SSD, then restore again SSD and then remove the original 128 GB SSD and insert the new 480 GB SSD.  For about a month and so far without problem.

    Now I'm trying to 2012 Macbook upgrade my Pro partner (on 10.11.6).  I got a Crucial SSD MX300 to replace his HARD drive.  Crucial comes with (or recommend) Acronis software.  And a lot of the messages of the forum recommend Carbon Copy Clone.

    My question is if I can use the same method for the cloning of the HD as my Macbook Air (just restore disk of Mac OS X utilities)?  This time, I'm upgrading HARD drive and I don't know if something is different.  At the same time, if I got lucky the first time, I don't not ruin Macbook Pro my spouse this time.

    Thank you.

    Yes, you can use disk utility to clone your MBP wives, but unlike CCC, it will not clone the recovery and Partition.

  • Question about resolution movie downloads

    If I buy a movie at a certain resolution (780p for example), but I want more later re - download at a higher or lower resolution (SD or 1080 p), can I do so and how?

    Same question perhaps for music. Some of my songs have been bought before the latest Apple codecs.

    Any help is appreciated!

    THX!

    Once you have made a purchase on the iTunes store, you will see your purchased items in the menu under accounts bar > bought. You can simply select the item purchased and re-upload.

    With regard to the resolution of the film for films that are offered, and you select the resolution, you can download it again and select a different resolution. For movies that are available as separate download to SD, 780, or 1080 points, you would be limited to the original resolution you selected.

Maybe you are looking for

  • IPhone 5 can't active

    I have iphone 5 when I update ios 10 it no service and can not active to use

  • Is it possible to cut the warning you get when you delete a photo?

    Is it possible to cut the warning you get when you delete a photo?  It slows down the process so when you have thousands of pass by...

  • Parachuting on MBP does not

    AirDrop does not see my (4th gen) iPad or iPhone 6 - AirDrop connects between these devices.  When I open the drop in finder on my MBP he sees nothing.  I do not see the options "allow me to be discovered by:" or "do not see that you are looking?  Th

  • reminder of report options

    This issue was discussed by different threads before. However, I am still not able to make it work properly. I have attached a simple sequence containing a single step and a report options reminder. I don't get a report named ".xml". Dynamic name is

  • Fixed HP D7360 0xc18a0001 ink system failure

    0xc18a0001 ink system failure D7360 HP fixed I'm DELIGHTED to say thank you! I believed in my chest, either disconnect OR remove the battery Board would solve my problem. Of course, the first worked, and I didn't have to pull the battery. I had to st