Value not coming properly in the javascript

Hi Friends,
Following is the simple page I have developed. JDeveloper Version is 11.1.2.2.0
This has 1 inputText(it1), 1 button(cb1) and 3 OutputText fields(ot1, ot2, ot3).
When I enter a value in it1, ot1 and ot3 should be shown, when I dont enter then ot1 and ot2 should be shown.
However when I run the page and click the command button without entering anything then it works fine. But when I enter something in
it1 and then click the button it does not work.
Basically first time the desired functionality works but second time onwards it doesn't. Can someone please help
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="Test10.jsf" id="d1">
        <af:form id="f1">
            <af:panelFormLayout id="pfl1">
                <f:facet name="footer"/>
                <af:inputText label="Label 1" id="it1" value="#{test10.inputValue}" clientComponent="true"/>
                <af:commandButton text="commandButton 1" id="cb1">
                    <af:clientListener method="showText" type="action"/>
                </af:commandButton>
            </af:panelFormLayout>
            <af:panelGroupLayout id="pgl1">
                <af:outputText value="Entered Value is :" id="ot1"/>
                <af:spacer width="10" height="10" id="s1"/>
                <af:outputText value="No Value Entered" id="ot2" visible="false" clientComponent="true"/>
                <af:spacer width="10" height="10" id="s2"/>
                <af:outputText value="#{test10.inputValue}" id="ot3" visible="false" clientComponent="true"/>
            </af:panelGroupLayout>
        </af:form>
        <f:facet name="metaContainer">
            <af:resource type="javascript">
               function showText(actionEvent) {
               var comp = actionEvent.getSource();
               var output1 = comp.findComponent("ot2");
               var output2 = comp.findComponent("ot3");
               var input =   comp.findComponent("it1");
               alert("value : " + input.value);
               if ( input.value == null){
                   alert("Inside 1");
                   output1.setVisible(true);
               } else {
                   alert("Inside 2");
                   output2.setVisible(true)
            </af:resource>
        </f:facet>
    </af:document>
</f:view>

Hi Frank,
Firstly Thanks for the solution. It works now.
Hi Timo,
I am just practising the exercises/examples from the Developer Guide and I tried to this. I don't have a real use case yet. But it would be great if you can just let us know how this can be done in a different way. Just let me know the idea. I shall try and then and let you know.
Many Thanks

Similar Messages

  • Mouse over values not displaying properly for the Combination Chart

    Hi All,
    A Combination Chart has the following details:
    Primary Y Axis has Revenue in mn $.
    Secondary Y Axis has %.
    When the mouse over is being done, 4% is being displayed as .04
    It should be displayed 4% & not as .04
    The Mouse over values has the Number format as u201CNumericu201D.
    Sometimes, it works in u201CGeneralu201D format. (%)
    However, there is no control on the no of decimal places displayed for the value of Revenue (Primary Y Axis value).
    Whereas, in Numeric format, decimal places can be adjusted.
    Secondary vertical(value) Axis Labels has "Percent" as the Number format.
    Please suggest a solution.
    Thanks,
    Raghu Ram

    Hello.
    Look I have an idea, I donu2019t know if you already try it.
    Please give the format that you want percentage, decimals etc...
    In the Excel where the charts are being directed
    Then redirect de chart to the same cells, these with the porpoise of refreshing
    Now each serie have the format.
    Please let me now what happen with these

  • Return order value is not coming properly

    Hi All,
    In Export Pricing Procedure we manually enter value for Freight and Insurance.For both condition types in V/06 we have maintained Fixed Amount in Calculation Type.So in  the  sales order condition screen Pricing is like
    Ordered Qty 10  pc
    Price         USD 100 (Entered manually)
    Freight      USD 10 ( entered manually)
    Insurance USD 20 (entered manually)
    Total order  Value is USD 120.Here price per item is 12 USD
    Now when we create a return order for 5 pc wrt above invoice, Freight and Insurance is not calculated properly.
    The system is calculating like
    Price         USD 50
    Freight      USD 10
    Insurance USD 10
    Total Credit Memo/returm order amount is 70 USD.And return price/item is 14 USD.
    Here the system calculate Freight and Insurance value by dividing the original value(10 USD 0r 20 USD / return qty.(5pc).
    But in the above process the return order value should come 60 USD.So what settings do we need to get the value 60 USD.
    Regards
    Debasish

    Dear Raj,
    Thanks for the reply.I am giving you a brief idea abt the PP and condition types.(For Freight and Insurance ).
    For Freight  condition type
    condition class  A
    calculation type B
    Condition Category F
    No Access sequence is assigned
    For Insurance Condition Type
    Condition class A
    Calculation Type B
    Condition Category C
    No Access sequence is assigned
    In PP for both my condition types manual, mandatory and statistics has not been checked.No From To step is maintained.
    Coming to your query can you pls elaborate how did u calculate  Freight 2 + insurance 4  and the final value should be 56 usd.
    Now in my first invoice the  invoiced qty was 10 . Freight value was 10 and Insurance value was 10(for the total invoiced qty).
    Now when i create return order  for 5 qty the system should calculate proportionately.I mean Insurance value should be 5 usd and freight value should be 5 usd.So price is (for 5 qty) 50 usd + Insurance 5 usd + freight 5 usd= 60 usd
    If i am wrong then pls correct me.
    Regards
    Debasish

  • Condition value in billing not coming properly.

    Hi All,
    We have an issue wherein the condition value in billing document is not coming properly.
    When qty is multiplied by the price the value should come as 208.04 ( 54.51 * 4 qty ), but the condition value is coming as 16.77.
    We checked but could not find any proper reason for this.
    When checked in details of condition type, we can see the Condition Origin as manually entered, but we are ot ale to trace the changes and also who entered the condition manually.
    Kindly advise on the issue as it

    Hi Mr. Satish,
    I agree with Mr. Rajesh and for your 2nd question.
    We can easily track down who entered the condition type in order
    there are two possiblities
    Either user who created the order, enter that condition type, that will not recorded in the changes so you can see the user id at header level--> on sales data page "Created by"
    If some other user come in VA02 and enter the condition type then you can see it in
    Go to Menu "Enviroment" --> Click at changes --> your document number is there --> Execute and see who entered it
    Regards
    MT

  • My IPOD classic headport is not working properly.  The sound is going in and out?

    My ipod classic headport is not working properly.  The sound keeps going in and out.  I have tried changing headphones and checking the settings.  Does anyone have any ideas?

    Do a Hard Reset
    After charging till full charge, at least 2 hours (preferably 4 hours)
    Toggle the Hold switch, make sure you dont see the red mark when you do the  next step
    Reset the iPod -> Press Menu and Center button simultaneously for about 10 secs or till the Apple Logo comes ON
    Then release the buttons
    Select your preferred language.
    Here is the Apple support Article on the 5Rs
    http://www.apple.com/support/ipod/five_rs/classic/
    If the sound is still the same, but ok, coming from the bottom Dock connector, then try cleaning the headport, using a jet of air or some electronic cleaner.

  • DATA not coming properly

    Hi ,
    I have a customized report which uses the logical databse PSJ. It has project, wbs element(prps-posid) in the selection screen. When I give input to the project , the output is coming properly with the field(WBS element), but when I give the output WBS element as input in the field , it is retrieving some more data . I went into debugging and found that while retrieving posid from prps table , it is retrieving the value '############' due to which the output has more than the records that should be . Anyone has come across  this scenario, please reply .
    Thanks in advance.

    I assume that the change is present in the PSA. If so is it just one field that is changing or multiple fields. ?
    Also make sure the PSA is empty before loading.
    Asif

  • WBS element output not coming properly .

    Hi ,
    I have a customized report with , project(proj-pspid) ,wbs element( prps-posid) as selection parameters . The output is coming preperly when project is given as output but is not coming properly when wbs element is given as input. I am using PSJ logical database . Not sure why in debugging while giving only wbs element it is going to 'Conversion_exit_abpsn_input' instead of teh conversion exit 'Conversion_exit_abpsp_input' . Any idea on how it can be resolved?

    Hi,
         Please refer the WBS element to PSPNR (PRPS-PSPNR) instead of prps-posid ,
         prps-posid refers to exit 'Conversion_exit_abpsn_input' and not 'Conversion_exit_abpsp_input'.
    Regards,
    Srini.

  • Content Not Coming Properly after converting a Smartform to PDF.

    I am converting a smartform into PDF format using CONVERT_OTF .
    This smart form will be triggered from the portal at the occurance of an event .After Conversion some texts are properly outputted in the PDF but some texts which are in  arabic are not coming properly ( shows some junk data in a language other than Arabic).
    Can any give a Solution ??
    Thanks
    Chaitanya Sharma
    Edited by: chaitanya  sharma on Jan 28, 2009 2:15 PM

    hi
    try using this fm CONVERT_OTF_2_PDF
    hope this helps
    regards
    Aakash Banga

  • Theme not coming properly

    Hi Experts,
    We are having Federated Portal and the custom theme XYZ is developed in Consumer Portal. The ESS/MSS iviews are linked through Remote Role Assignment from Producer portal.
    The theme is not coming properly. From Mashead to Top level navigation the theme XYZ is coming correctly but when I opens the page having iviews then the iView Tray is showing the SAP Standard theme and the content in the iView is sometimes taking correct XYZ theme.
    I have cleared Federated cache, navigation cache and also cookies, but still it is not coming properly.
    When I view source iView then
    <html><head><LINK REL=stylesheet HREF="/irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal/sap_standard/prtl_std/prtl_std_ie6.css?7.1.6.0.0">
    Please suggest.
    Regards,
    Deep

    Try by re-starting the portal.
    This is rarely necessary when dealing with the SAP Portal theme.
    The advice from Sushil looks more like the solution as it is common to not upload the consumer portal theme in the producer portal. Because in an FPN the producer theme will be used when the consumer theme isn't found:
    [SAP Note 880482|https://service.sap.com/sap/support/notes/880482]
    http://help.sap.com/saphelp_nw04s/helpdata/en/5b/9f2d4293825333e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/46/06f6dc000a5a68e10000000a1553f7/content.htm
    "If you are using custom made themes or have modified any of the out-of-the-box themes on the consumer portal, an administrator must manually import these themes to the producer portal. "
    Next source of problems with themes is when your consumer and producer are on a different version (specifically when the producer is on a higher SPS or EHP) even when the consumer theme was imported into the producer.
    br,
    Tobias

  • Smart form -Right Alignment is not coming properly

    Hi Folks,
    While Printing Smart form for Invoice ,using right aligned Paragraphs  texts are not coming properly.....but  using left aligned paragraphs text  are coming proporly....we want both left aligned and right aligned in same table ...for print preview it showing fine but while taking the print out it comes like this
    for eg:  ---
    Net amount
    1,000.00
          750.00
    2,000.00
            40.00
          100.00
          300.00
    30,000.00
    O/P showing like this ....i have checked all the options in right aligned paragraph but no use
    Kindly help ....
    Edited by: bismilpk on Dec 26, 2010 2:31 PM

    yes .....I solved....got the answer

  • Adobe Creative Cloud (Desktop) does not work properly. The application is blocked : it could not be launch neither stopped. I'm on MAC Yosemite OS, does anyone know how to remove it properly or to force its stop. It does not appear in the launched applica

    Adobe Creative Cloud (Desktop) does not work properly. The application is blocked : it could not be launch neither stopped. I'm on MAC Yosemite OS, does anyone know how to remove it properly or to force its stop. It does not appear in the launched applications.

    I received no error message. The application was just trying to find applications unsuccessfully.
    I am using MAC OS 10.10.1
    I tried to uninstall the application  but it seems that a kind of deamon is still installed thus providing me to reinstall properly. Do you know where are the elements to remove in order to get my machine just like before ?
    Otherwise I would have to reinstall everything and this would be a pain.
    Thanks for your help.

  • When we purchase from iTunes the balance is not coming off of the gift cards. We have family sharing on but when my kids purchase songs they are credited to our credit card and not the gift card that is already in their account. What's wrong?

    When we purchase from iTunes the balance is not coming off of the gift cards. We have family sharing on but when my kids purchase songs they are credited to our credit card and not the gift card that is already in their account. What's wrong?

    Hi Angela1313,
    I see that you have a question about using gift cards with Family Sharing. Here is an article with some information that my be pertinent to this issue:
    iTunes Gift balances
    http://support.apple.com/kb/ht5035
    Learn more
    Learn how to send an iTunes Gift or redeem iTunes Gift Cards and content codes. If you're using Family Sharing, the credit you redeem will only be available to you. iTunes Store credit on your account isn't shared with other family members.
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • Cancelling the GR the excise item tab is not coming after flagging the OK

    Hi SAP Experts,
    there is one subcon PO for excisable material for depot, after its GR it have been posted from j1iex.
    Now there is a requirement to cancel the excise posting for which first of all its GRN should be cancel.
    But while cancelling the GR the excise item tab is not coming after flagging the OK.
    This problem is there only for the depot, for other plant Im able to cancel for subcon PO.
    Thanks & Regards,
    Anisha Sinha

    still not cleared

  • Footer not coming end of the page in BI Publisher

    Hi All,
    I am developing a report in which the footer output is not coming end of the page after the tabular output per group Completion.
    There is a tabular group and free form group which output coming accourding to number of lines in tabular output but after the tabular output there is one
    more group in the form of tabular which show the details sum of the first tabular output which i have to print each of the group end and end of that page but
    when i am trying to get output it coming just after the first tabular output.
    Please advice...
    Regards,
    Sushant

    you have to use the word footer and header, and put these place-holders there
    better send me the template and xml, { i guess.}i know what you are trying

  • I have Adobe Photoshop Elements 10 and I wish to upgrade with Adobe Creative Suite 3 but the option is not coming up on the drop down menu

    I have Adobe Photoshop Elements 10 and I wish to upgrade with Adobe Creative Suite 3 but the option is not coming up on the drop down menu

    The first two issues sound like a video driver problem.
    What is the make/model of your video card/chip?
    What is the installed video driver number and date?
    For the last issue, it could be many things, including the video driver. I'd look over this ARTICLE, and if there is nothing in the first part, then move on to tuning up the OS an computer in the second part. That would probably be a good time to post the full specs. of your computer, and also both your Project and Source footage. Finally, part three covers many troubleshooting tips, and furnishes many links.
    Good luck,
    Hunt

Maybe you are looking for