Disabling a button based on attribute value

Hi,
I have written a function in ViewObjectImpl. I need to call it on a specific condition,that is, if a particular value for an attribute doesn't exist in the table. How can I achieve this?
Thanks & Regards

Hi,
There are couple ways to achieve this.
1. Enable the button only when there is a specific value exist in table.
You can write a method in your impl, that check if there are any matching rows in table and return true or false. Bind the disabled property to an attribute in your backing bean, execute the impl method in backing bean and let the property (which you bound to the disabled property of the button) hold the return value (true or false). Call this method appropriately based on your need.
2. Execute the method always and check the matching row in button.
In the impl method itself, you can check the table if the matching rows exist or not. If exists, then continue the execution of the method, else do nothing.
-Arun

Similar Messages

  • Enable / Disable a button Based on a value

    Hi all,
    How can i enable or Disable a Button Based on some input Text value.
    Here is the ADF Code fragment:
    *<af:switcher id="customActionButtons"*
    *facetName="#{actionAvailable.isCustomActionButtons}">*
    *<f:facet name="true">*
    *<af:panelGroupLayout layout="horizontal" id="pgl10">*
    *<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"*
    *text="#{wf:getResourceValue('APPROVE', 'bindings.customActions')}"*
    *disabled="#{!bindings.APPROVE.enabled}"*
    *action="#{invokeActionBean.invokeOperation}"*
    *partialSubmit="false"*
    *visible="#{wf:isCustomActionAvailable('APPROVE', 'bindings.customActions')}"*
    *id="ctb2">*
    *<f:attribute name="DC_OPERATION_BINDING"*
    *value="bindings.APPROVE"/>*
    *</af:commandToolbarButton>*
    *<af:inputText value="#{bindings.input.inputValue}"*
    *label="#{bindings.input.hints.label}"*
    *required="#{bindings.input.hints.mandatory}"*
    *columns="#{bindings.input.hints.displayWidth}"*
    *maximumLength="#{bindings.input.hints.precision}"*
    *shortDesc="#{bindings.input.hints.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{bindings.input.validator}"/>*
    *</af:inputText>*
    I have highlighted the Button and Input text in Bold.
    Any suggestions,
    Thanks,
    karthik

    you need to set the autosubmit property for the text field to true. and set the partial trigger for the the button to that input text id.
    and set the rendered property for the button based on the input text value.
    same idea is exist in this link:
    http://groundside.com/blog/GrantRonald.php?title=conditional_rendering_of_jsf_fields_depe&more=1&c=1&tb=1&pb=1
    Edited by: M.Jabr on Feb 7, 2011 1:26 AM

  • Is it possible to regroup data based on attribute value of a tag?

    is it possible to regroup data based on attribute value of a tag?

    Hi Rajeev,
    You can filter records during import if one of the Matching field is of type Lookup.
    In your case if you create City as flat lookup table in MDM & maintain lookup values in DM(Just as an example), then you can import only records where city is HYD.
    Map Name & City, Then in Match Records tab select both the fields (Combination)
    then right click on it & select Filter.. option.
    Now new pop up will open where you be able to see ur Lookup table values, from there select HYD and Add
    Now in default Import Action, set Create Action for None/None (All other will be skip)
    This way you will import only HYD records.
    But this is possible only on Lookup fields & not foe Text fields
    Hope this will help you
    Thanks & Regards,
    Mahi

  • Invoke different Summary Screen based on attribute value

    Hi Experts,
    I have a requirement to show different OPA landing summary page based on attribute value received from Siebel application. Is that possible?
    For e.g.: Create 2 summary screen
    Siebel field value opa_attr1 = A or B, if A I want to display summary screen 1 otherwise display summary screen 2.
    Thanks,
    Vinay

    Thanks you for your reply. The link is not what I want. My case is that I already have a map stored in Oracle database under obiee_navteq schema. I want to use OBIEE to display map by adding different image/icon at different cities based on the value of an attribute column. All the examples I can find is to use measure column as an condition, not by attribute column.
    Thanks

  • How to realize Checkbox and Radio Buttons based on Attributes in JHeadstart

    Hy@ all,
    I try to redevelop the Summit Forms Demo in ADF.
    The module "ORDER" contains, among other things, a checkbox and radio buttons based on database columns(VARCHAR2).
    The column(checkbox) named PAYMENT_TYPE contains the values CASH and CREDIT and the column(radio button) called ORDER_FILLED contains the values Y and N.
    After creating the business components, I set in JHeadstarts Application Definition the Display Type of these two attributes to checkBox and radio-horizontal.
    I created a dymanic domain for the radio-horizontal and a static domain for the checkBox.
    The radio-horizontal within the dymanic domain works nearly correct.
    I set the Data Collection in this dynamic domain to the required Group and the Value and Meaning Attribute to the necessary Attribute.
    Within the JSF- Page the values are shown right but unfortunately there are too many radio buttons available. Instead of displaying the two radio buttons CASH and CREDIT were many CASH and CREDIT radio buttons shown.
    I can´t find any solution for this case.
    The problem with the checkBox is that therfore a static domain is required but I want to show the value of the checkBox based on the described attribute, like the handling of the radio horizontal.
    But I don´t know how to implement this, if it is possible.
    I´m using JHeadstart v10.1.3.2 and I´m pleased about any reply or solution.
    Best regards
    Chris

    Chris,
    If you run the application module tester, and query the view object usage underlying your dynamic domain, how many rows does it return? It should return only two rows, one for CASH and one for CREDIT. If more than two rows are returned, your query is wrong.
    What is the problem with using a static domain for the checkbox?
    Steven Davelaar,
    JHeadstart Team.

  • Multiple keyfigure from different planning area based on attribute value

    Multiple keyfigure from different planning area based on the attribute value of Cost element charac.
    I need to obtain the value of the attribute in a fox function. Let me explain it further.
    Background :
    Planning area -
    Charac----
    KF
    area1 -
    Payscale group--- Amount
    Cost element------AmountVR
    area2--Payscalegroup----KF1
    KF2
    KF3
    Cost Element has an attribute "Type"
    Value for attribute "Type" = 1,2,3
    Based on the value of the attribute, the corresponding KF needs to be multiplied.
    Logic :
    If type = 1.
    AmountVR = Amount * KF1.
    elseif type = 2.
    AmountVR = Amount * KF2.
    elseif type = 3.
    AmountVR = Amount * KF3.
    endif.
    The problem I'm facing is that I'm not able to read the data of attribute "Type". None of the below statement retrieve the value of the "Type".
    TYPE = ATRV(Attribute,COSTELEMENT,CO_AREA)
    or
    TYPE = ATRV(Attribute,COSTELEMENT)
    Could you please help me in reading from a time dependent compounding InfoObject?
    Regards,
    Raghu

    Hi..
    Thanx Bindu..
    I have actual data for Month days..if i am craeting in same layout it is too large.
    that's why i am creating two layouts.
    below example for better undersatnding.
    Actual:
    D1 :D2: D3  :D4 : D5  :D6 : D7   :  FULLACT (sume of C(1)  sum of d1 to d7))
    10  :8  :12 :  10 : 14   : 6  : 10    :  70     
    Plan:
    D1EST : D2EST: D3EST :D4EST :D5EST: D6EST: D7EST:  FULLEST (sum of d1 to d7)
    10         :10        :  10      :  10      :10       :    10    :     10  :         70
    How can i read FULLACT value and that value i have to distribute  equally in planing layout and always FULLEST is equal to FULLACT.if not equal i have to throug error message hoe can i setup if you have sample code can you send it to me.
    what is your idea....
    Edited by: Eyda rose on Jun 4, 2008 4:59 PM

  • Sum on child nodes based on attribute value in xslt

    Hi all,
    Any one can post helpful code to calculate the sum of child nodes based on the attribute value of other child node.
    Let's say for example.
    I have one child element has attribute value let's say Tax so I have to put condition on child element having value of "Tax" I need to calcualte sum of Invoice amount that element is also child node
    After calculating sum I have to apply that sum at the header level of the Invoice. For each Invoice I have calculate sum and apply at the header level.

    It isn't working :(.Got the following error:
    An error was reported compiling the XPath expression: error: XPath expression invalid, not a selection: declare namespace ws = 'http://www.bea.com/wli/sb/transports/ws';
    declare namespace tuxedo = 'http://www.bea.com/wli/sb/transports/tuxedo';
    declare namespace wsa = 'http://schemas.xmlsoap.org/ws/2004/08/addressing';
    declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
    declare namespace xsi = 'http://www.w3.org/2001/XMLSchema-instance';
    declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
    declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
    declare namespace xsd = 'http://www.w3.org/2001/XMLSchema';
    declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope';
    declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
    declare namespace sftp = 'http://www.bea.com/wli/sb/transports/sftp';
    declare namespace sb = 'http://www.bea.com/wli/sb/transports/sb';
    declare namespace soap-enc = 'http://schemas.xmlsoap.org/soap/encoding/';
    declare namespace ejb = 'http://www.bea.com/wli/sb/transports/ejb';
    declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/';
    declare namespace jpd = 'http://www.bea.com/wli/sb/transports/jpd';
    declare namespace email = 'http://www.bea.com/wli/sb/transports/email';
    declare namespace tp = 'http://www.bea.com/wli/sb/transports';
    declare namespace dsp = 'http://www.bea.com/dsp/transport/sb';
    declare namespace ctx = 'http://www.bea.com/wli/sb/context';
    declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-encoding';
    declare namespace wsu = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
    declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms';
    declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
    fn:string(./xml-fragment/@IntObjectName).

  • Get element based on attribute value

    Hi,
    I need to locate an element based on its unique
    attribute value. There are lots of elements in the
    hierarchy, I only show relavant ones here.
    code:
    <myElement myAttribute="attValue">
    <childElement>child value</childElement>
    </myElement>
    If "attValue" is unique for all elements, and I want to
    locate myElement and then get childElement value.
    I did the following, but it does not work:
    <xsl:value-of select="//*[myAttribute='attValue']/childElement"/>
    Could any one see what I did wrong?
    regards,

    Thanks for spotting the error. I was too careless.
    What if I want to use a xsl:variable to do the testing, can I do the following:
    <xsl:variable name="uniqueAttValue" <xsl:value-of select="..."/></xsl:variable>
    <xsl:value-of select="//*[@myAttribute={$uniqueAttValue}]/childElement"/>
    I used either {$uniqueAttValue} or '{$uniqueAttValue}', but neither works.

  • Using jQuery to hide a button (wrapped in td tag) based on attribute value (name in this case)

    I have simulated what I'm trying to do here:
    http://jsfiddle.net/dayjuuk5/
    Let me know if you can't see it for any reason.
    My question- I'm not sure I understand why this method of hiding this td tag doesn't work. I'm looking for a way to hide this button on page load (not click driven).
    Thank you for your time.
    Samir

    Hi Samir,
    Thanks for your sharing.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • RESOLVED - iExpense: Disable Submit Button based on checkbox not working

    Hi,
    We have a requirement for a checkbox in iExpense Review form(FinalReviewPG) where there should be a checkbox stating the terms and policies are met etc. Unless the user checks the checkbox the SUBMIT button shouldnt be enabled. I am creating the custom checkbox using personalisation in the page with initial/unchecked value as N and checked value as Y. This is created at SITE level.
    Now I have also created a custom controller extension xxButtonCO to extend the standard ButtonsCO controller which should do the disable/enable of the button OIESubmit. I ported this controller to the custom top and have extended the controller to both OIE Expenses Entry Flow function and Internet Expenses responsibility. But the checkbox though visible is not affecting the SUBMIT button. Also funnily, I save the controller class as xx.oracle.apps.ap.oie.webui.xxlcButtonCO and click apply only to see this concatenated to apps.ap.oie.webui.xxlcButtonCO / Function.
    Is that causing an issue? Also, sometimes I just run into an arbitrary NULL pointer exception and other times it says oracle.apps.fnd.framework.OAException: Could not create Java class. I have verified the class file not java file is in correct directory and has right permissions.
    What could possibly be wrong here?
    Edited by: 865082 on Jun 15, 2011 5:33 AM
    Edited by: 865082 on 20/06/2011 22:21

    Hi Kali,
    Many thanks for your response. I have quit trying to run this page directly from the instance and am now trying to do this firsly from the JDeveloper. The same issue is occuring from that end as well. My checkbox value is not getting recognised in the code. The checkbox is added to the Business Expenses tab and the intial/unchecked value is N while the checked value is Y. I am trying to control the submit button in the buttonbar based on the checkbox value using the following command
    OAMessageCheckBoxBean cbbean = (OAMessageCheckBoxBean)webBean.findChildRecursive("XXReviewCheck");
    where XXReviewCheck is the checkbox ID. However the print statements show that the cbbean is null. It is definitely calling the controller and trying to figure out the value. The value is just not coming to this section. Any ideas?

  • How do i show a button based on the value of another button (value is greater then 0)

    I'm am building a form in indesign, and just want to add a visual icon next to buttons when they are filled out... check mark next to a drop down list... so the list have values and i want the check mark (button) to show only when the value of the drop list is greater then 0... can this be done?... easily?....
    thank you!

    Hey Gilad D,
    its been a while since i have been back to this project…..
    now i have time to dedicate to this to get it done….
    if you don't mind i really could use a little help..
    i want to start again and give you the full scope of what i am trying to do, i don't have any real hard files yet...
    its pretty simple (in theory)..
    So i don't know what you do for work, but i work in an environment that has some pretty lazy sales people,
    so i want to create a pdf that steps them through a bunch of questions that they have to answer...
    my thought was, lets break this out into sections…
    so section one has three questions, if they answer all three, then they get a checkmark and section 2 appears
    which would have a few questions in it… etc….
    there would be some easy cross referencing and excel type calculations,… and a few, if you answer yes then another field gets auto filled..etc….
    can acrobat handle this?… or am i wasting time thinking it can?...
    i primarily work on mac's but we do have a PC with live cycle...
    thoughts?….
    thank you,
    ely

  • XSD Validation based on attribute type value

    Hi,
    Can any one tell me how to validate xml element value based on attribute value.
    Ex:-
    my xml has the elements like this.
    <channel>
    <meta type="VideoTitle">Harding Park Golf Club</meta>
    <meta type="ReleaseDate">Wed, 03 Jan 2018 15:00:00 GMT</meta> </channel> I want to validate the xml based on meta type value using xsd. For "VideoTitle" i would like check for String type and for ReleaseDate" i want to check for date format. Thanks, Raj

    Try the below statement in “Competitor Lost To” picklist (IndexedPick2)
    IIf (([<ReasonWonLost>] = 'Lost to Competition' AND [<IndexedPick2>] IS NULL), N, [<IndexedPick2>])
    after you enter this do sign out and then sign in, then check
    PS: You need not change it to lookupvalue, the above statement will work as it is

  • How do I format based on the value of the @status attribute?

    Example: I use the @status attribute to indicate that a step in a procedure is new or that a paragraph in a concept is new.
    For review purposes, I want to format new text as green - preferably a green highlight, but green text will do.
    Example: I use the @status attribute to indicate that a step in a procedure has been deleted or that a paragraph in a concept has been deleted.
    For review purposes, I want to format new text as crossed out.
    Can this be done? If so, where do I set up the formatting for attribute values?
    Thanks in advance.
    Marsha

    Hi Marsha,
    If you want the formatting to be "locked in," that is, driven by the EDD, then Lynne's advice is the way to go. If instead it would be sufficient to temporarily color the desired elements as a format override, you could use the AXCM plugin:
    http://www.weststreetconsulting.com/WSC_AXCM.htm
    This plugin can do any nature of coloring, strikethrough, etc. based on attribute values and other markup. The coloring is applied as a format override and easily removed by a refresh of the EDD. The coloring features were mainly designed for conditional text purposes, but it would work in this case too.
    AXCM is completely free. Disclaimer... I own West Street Consulting and this plugin.
    Russ

  • Disabling button depending on the Value of a field in a standard page

    Hi,
    How can I disable a button depending on the value selected in a particular field of the same page? Is it possible to do so in a Oracle standard page? Please guide me in resolving this requirement.
    Thanks,
    Swagatika

    Swagatika,
    You can attach PPR event to the textinput field and use method
    pageContext.ForwardImmediatelyToCurrentPage().As process request method will be called again,here you can use method setDisabled(boolean) in OAsubmitButtonBean, to enable or disable your button!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to Disable a Button Using JavaScript

    Hi,
    I want to disable a button based on a condition. I am using a template based button (button Alternate 3). I am using Theme 3. I have created buttons of type item but when I view the source there is no button name populated in the html. My javascript is not disabling the button.
    Please advice.
    Thanks
    sukarna

    Hi,
    You can't disable an A tag (FireFox, for example, will still let you click the "link").
    What you could do would be to create a second button that doesn't work and only show one of these at a time.
    I have done that here: [http://apex.oracle.com/pls/otn/f?p=35917:30]
    The Button has been based on a custom Button Template. The definition for this is:
    &lt;table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="" id="#BUTTON_ATTRIBUTES#"&gt;
    &lt;tr&gt;
    &lt;td class="t10L"&gt;&lt;a href="#LINK#"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;td class="t10C"&gt;&lt;a href="#LINK#"&gt;#LABEL#&lt;/a&gt;&lt;/td&gt;
    &lt;td class="t10R"&gt;&lt;a href="#LINK#"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /&gt;&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;table class="t10Button" cellspacing="0" cellpadding="0" border="0"  summary="" id="#BUTTON_ATTRIBUTES#_DISABLED" style="display:none"&gt;
    &lt;tr&gt;
    &lt;td class="t10L"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_left.gif" alt="" width="4" height="24" /&gt;&lt;/td&gt;
    &lt;td class="t10C" style="padding:1px 4px;"&gt;#LABEL#&lt;/td&gt;
    &lt;td class="t10R"&gt;&lt;img src="#IMAGE_PREFIX#themes/theme_10/button_right.gif" width="4" height="24" alt="" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;This actually creates two buttons - the first one, which actually has the link, is visible to start with. The second one, which has no link at all, starts off as invisible.
    Both buttons use the #BUTTON_ATTRIBUTES# setting to get the button name into the ID - though the second button adds "_DISABLED" to this so that it has a unique, but known, ID
    Then it is just a case of calling a function to show one button and hide the other or vice versa:
    &lt;script type="text/javascript"&gt;
    function disableButton()
    document.getElementById('P30_TEST_BUTTON').style.display = "none";
    document.getElementById('P30_TEST_BUTTON_DISABLED').style.display = "block";
    function enableButton()
    document.getElementById('P30_TEST_BUTTON').style.display = "block";
    document.getElementById('P30_TEST_BUTTON_DISABLED').style.display = "none";
    &lt;/script&gt;Another possibility is to add the #BUTTON_ATTRIBUTES# to the TABLE tag instead of the A tag in a new button template (based on a copy of the normal Button template). Then, the ID value would be applied to entire "button". You can then make this invisible using:
    $x('BUTTON_ID').style.visibility = 'hidden';The button will be removed from the page as far as the user is concerned, so they can not click the link.
    Andy

Maybe you are looking for

  • No SQL Data sources in Essbase 11 EAS on Linux  -- ODBC help

    Hi all, Oracle Enterprise Linux 64-bit, Oracle 10.2.0.4 64-bit, Oracle Application Server 10.1.3.1 32-bit, Hyperion 11.1.1.3 32-bit While in the Data Prep Editor, I'm trying to create a rules file. however, when I go to File > Open SQL and enter my s

  • Apple TV doesn't show all pictures in photo stream

    I have about 1000 pictures in my photo stream, but my Apple TV doesn't show all of them. It shows only 304 photos. How can I get all my photos to my Apple TV via photo stream? I have the latest Apple TV and the latest operating system on it. Edit: An

  • Repairing permissions on PPC iMac20 after upgrade

    Hi All Upgrading an iMac20 PPC (dome) to 10.5 . repaired permissions and all fine. after running software update, installing one at a time in the order of release date and running disk utility after each update.. I'm getting the following msgs. *Repa

  • Transfer Posting - Very Urgent.

    Dear gurus I need help against to transfer stock from one plant to another plant through STO in SAP (Further STN (313 & 315)). Could anybody pl send me T-Code for that & further postings required to place that material in unrestricted are of other pl

  • Create ASM disks on Solarix X64 fails with ORA-15031

    I am trying to create a ASM disk group on SOLARIS x64 using a NETAPP LUN. Below are the disks which are configured SQL> show parameter asm; NAME TYPE VALUE asm_diskgroups string DATA asm_diskstring string /dev/rdsk/c2t9* asm_power_limit integer 1 asm