Select namespace attributes from xmlns:

How do I select this information?
<data>
  <element xmlns:mynamespace="http://my.namespace.com" >mynamespace:Stuff</element>
  <element xmlns:mynamespace="http://other.namespace.com" >mynamespace:Stuff2</element>
</data>I want to come up with an xpath (using Jdom) that selects the http://my.namespace.com and http://other.namespace.com
This is a "local" namespace declaration, which I don't know beforehand, so I can't add the namespace programmatically.
the xmlns:.. part is almost an attribute, but since it's not a regular attribute, I have no way selecting it.
Any tips?
/Tom

To select a node with a namespace, add a namespace to an XPath:
org.jdom.Document jdomDocument ;
XPath xpath =
   XPath.newInstance( "/data/element/xmlns:mynamespace");
  xpath.addNamespace("mynamespace", "http://my.namespace.com");Select a node with a namespace prefix:
org.jdom.Attribute attr
= (org.jdom.Attribute)
    xpath.selectSingleNode(jdomDocument);

Similar Messages

  • Selecting custom attributes from the default helpdesk screen?

    Can i select and see custom attributes from the default helpdesk screen?  I dont want to have to click through to the details tab as things can and have been missed.  See picture attached.
    This topic first appeared in the Spiceworks Community

    I have worked out the issue. I was attempting to access attributes from the BOR Object "WorkItem" as opposed to elements in the workflow container. When I created a custom container element called "ReferenceID" (as the element name) and used this in my XML it worked successfully.
    I hope this helps someone else in the future.

  • How to paste attributes from one photo to a selection of photos?

    When I try to copy attributes (i.e: white balance, etc) from one photo and paste to a group of other photos, the attributes are only pasted to the most selected (first) photo of the group. The result is the same whether I use the menu or keyboard shortcuts for the copy and paste. Does anyone know how to paste the attributes to the entire group in one fell swoop?

    Are you selecting the group of images from the grid view or from the filmstrip at the bottom of the library module?  I have found that many operations are only applied to the first image in a selection if the selection was made from the filmstrip at the bottom of the library module.  If the group of images is selected from the grid view, then the operation applies to all the images selected.
    I hope that helps.
    Walt
    B & B Photography

  • Retrieve namespace  declarations from unmarshalled object

    Hi,
         I hope this is a beginner's question:
    Still working on a web service, that uses an EJB for implementation. I'm using types/classes that were derived automatically from a WSDL (top-down/outside-in/what have you), or rather the corresponding schemata. I'm trying to retrieve namespace declarations from the unmarshalled object/element, but  they are not contained in the "otherAttributes" [Map<QName, String>] member field of the respective object. However, I can retrieve any other attribute, qualified and non qualified, as long as the namespace isn't that of xmlns (http://www.w3.org/2000/xmlns/). For example:
    Client:
                MyElement my_element = new MyElement();
                Map<QName, String> atts = my_element.getOtherAttributes();
                QName ns_att = new QName("http://www.w3.org/2000/xmlns/", "a");
                atts.put(ns_att, "http://www.example.com/");
                QName test_att = new QName("test-att");
                atts.put(test_att, "http://www.example2.com");
    Service:
                MyElement my_element = parent.getMyElement(); // ...
                Map<QName, String> atts = my_element.getOtherAttributes();
                for (QName qn :  atts.keySet()) {
                    System.out.println("qn: ["+qn+"] value["+atts.get(qn)+"]");
    This would print:
    qn: [test-att] value[http://www.example2.com]
    What am I missing? How do I get the namespace declaration? Thanks for your help in advance.
    Cheers,
    Felix

    I'll try to explain in a better way ...
    I have a server with 2 different client and each client communicate to the server with a different interface.
    My needs are to recognize from the server, the type of the client that are operating, and to do this I was thinking to recognize the interface used from the client to interact with the server
    An other option is that, from the client, after retrieving the server and it's cast, a can call a method to pass to the server object, the type of the interface actually used.
    But I think this makes a bit of nonsense because When I receive the marshalled object in my opinion doesn't make sense that i have to say the object it's type (the interface used).
    the object is already alive and I think it has to know the interface used to refer it even if is on another VM
    The cast operation doesn't store nothing into the current object instance?
    local code example (I don't know if with JRMI the situation is different because the different JVM)
    Map foo = new HashTable();
    I need a method like
    foo.curretUsedInterface() ... that return "Map"
    instead of
    foo.getClass().getName() that return "HashMap"
    It's possible to obtain this information or I have to try another idea to make the server distinguish the client type?
    thank you very much for your comprehension

  • Appending namespaces attributes

    Hi there,
    We have a proxy service (pswsdl) and business service (bswsdl)
    I am currently working on transforming xml payload from proxy service (pswsdl) to the xml as compliant with business service (bswsdl).
    I grab the payload from the proxy service via Xquery using $body/subject/person and store it in a variable.
    I need to pass Person object to the business service (bswsdl) which points to a live web service deployed.
    The Person object is the input to Bswsdl web service.
    Now Person element contains a deep level of child nodes. Here is how the fetched object looks like
    <Person xsi:type="imy:com_sample_app_model_PersonInput" xmlns:imy="http://com.sample.app.facade/IMyWebService1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Details>
    <name>Tom</name>
    <age>29</age>
    <address> 11 Park St</address>
    <Details>
    </Person>
    Now when I run the composite I run into an error No Deserializer found to deserialize using encoding style 'null'. [java.lang.IllegalArgumentException] for the Details object. As in the sample payload above the namespace attribute info for the Details object is missing.
    Is there a way in OSB11g Xquery functions to provide an instruction to set the namespace to xml elements automatically. Like in the above case the Person object automatically gets the namespace attributes without any configuration from my side. How can I set this for all the containing xml elements
    Let me know your thoughts.
    Thanks,

    THe xsd for Person does have the type defined for Details object. Since we have developed the web services using the bottom-up approach.
    I tried manually adding the type in the xml elements like this (Details xsi:type="imy:com_sample_app_model_DetailsInput") but still the same error.
    Here is what I tried to do. I have a business service(testBS) based out of live webservice (wsdl). I have a proxy service(testPS) defined using the same wsdl but in the body of the proxy service we delegate the call to testBS. This scenario works perfectly fine.
    Now I have combined two wsdl's (one of them being the same as used for TestBS) and created a proxy service based out of this comined wsdl.
    In the body of the proxy service we make a call to the testBS passing it the only the xml node expected by its operation but this fails though the xml node contains the right xsd type. The top root element gets passed correctly as mentioned in my initial post (the Person node) but its the inner node that fails.
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382500</con:errorCode>
    <con:reason>
    OSB Service Callout action received SOAP Fault response
    </con:reason>
    <con:details>
    <con1:ReceivedFaultDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:faultcode>soapenv:Client</con1:faultcode>
    <con1:faultstring>
    No Deserializer found to deserialize a ':Details' using encoding style 'null'. [java.lang.IllegalArgumentException]
    </con1:faultstring>
    <con1:http-response-code>500</con1:http-response-code>
    </con1:ReceivedFaultDetail>
    </con:details>
    Let me know your thoughts.
    Thanks,

  • How to select multiple rows from List Of Values

    Hello,
    I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't.
    so how i can select many rows to set them in my adf table.
    Thank in advance

    Hi,
    LOV is map to an attribute in the viewObject so it will return only one value or more values from selected row. You can't select multiple rows from LOV.
    But you can do this by using popup which you can select multiple rows and insert the selected rows to another table.
    This blog post explain how to achieve this :
    http://husaindalal.blogspot.com/2009/11/search-from-popup-and-add-to-new-table.html#comments
    Sameh Nassar

  • Is there a way to copy attributes from one composition to another?

    I'm using After Effects 7.0
    I'd like to copy the same Zoom attributes from one composition to 30 photographs.
    In Final Cut, you can copy attributes from one clip to another. Or from one still photo to another.
    Is there a way to do that in AE 7?
    Thanx
    Mike

    EDIT: I see you edited your question, so I am editing my reply.
    To copy the scale of a layer, open the main twirl of that layer and you'll see the Transform properties group. Open the twirl for that, and you'll see Anchor Point, Position, Scale, etc. Click on "Scale" and copy it (Edit > Copy, or Control+C on Windows/Command+C on Mac). Then select the other layers and just paste (Edit > Paste, or Control+C on Win/Command+V on Mac).
    Such a broad question
    Anytime you add a new item you imported to the timeline or composition panels, it becomes a new layer.
    Anytime you duplicate an existing layer (Edit > Duplicate), you get a new layer.
    Anytime you split a layer (Edit > Split) you get a new layer.
    Anytime you copy a whole layer (target the name in the timeline panel) and paste it, you get a new layer.
    You also create layers when you use the Shape tools, text tools, or create a new solid layer, etc.
    This list could go on and on, so instead, I invite you to read the After Effects Help section on Creating layers specifically, and the whole chapter on Layers and properties, in general. If anything isn't clear for you, then let us know.

  • Display attributes from "global" and other entities in a single screen

    As far as I know, in OPM attributes of only one type of entity can be added to any given screen.
    As per of functional requirements of my current project Ihave to display attributes from more than one type of entity in some of the screens.
    I found a workaround for entities which has only one instance (singleton entity in version 10.1), but couldn’t figure out how to display attributes of entities which has multiple instances.
    For example:
    We have an entity called <b>“the child”</b> which has many attributes. There can be more than one child instances defined in a given assessment session.
    This particular screen should have attributes which belong to the <b>"global"</b> and <b>"the child"</b> instances.
    (The names of all the children should be displayed on the screen as <b>check boxes</b> so the user can select the children who are affected by the global attributes displayed on the screen.)
    Is this achievble in OPM 10.1?
    SP1D3R MAN

    Displaying Global attributes and nested entity level attributes on the same question screen cannot be done in OPM 10.1 with out-of-the-box functionality. It would have to be a custom screen. (FYI, I'm not a programmer so I can't advise on how to build such a custom screen.)
    Before building customisations, you should also consider whether you really need to use an old version of the product. OPA 10.1 was released early last year; the current version is 10.3.

  • How can i select view attribute in a method

    hi how can i select view attribute in method and pass that attribute to procedure
        public void DeleteAgr(Integer agrid) {
                     ViewObject svo = this.findViewObject("AGR");
                     //select current view id from agr and link id with agrid          
                    callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new Object[] { agrid });
    }Edited by: Tshifhiwa on 2012/06/30 1:01 PM
    Edited by: Tshifhiwa on 2012/06/30 1:22 PM
    Edited by: Tshifhiwa on 2012/06/30 1:24 PM

    hi i use your sample but now am geting this errror (oracle.jbo.JboException) JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
    ----- Level 1: Detail 0 -----
    (java.lang.NullPointerException) null check the code below
                              public String getCurrentagrid(String currentagrId) {
                            if (currentagrId != null && currentagrId.length() > 0) {
                                ViewObjectImpl agrVO =
                                    this.getAGR1();
                                if (agrVO != null) {
                                    Key key = new Key(new Object[] { currentagrId });
                                    //Searching for the row with key
                                    //getRow(key) will search in the cache which contain atmost
                                    //2000 records Becoz the MaxFetchSize of EmpVO is 2000
                                    AGRRow agrRow =
                                        (AGRRow)agrVO.getRow(key);
                                    //if the record with key is not present in the cache
                                    if (agrRow == null) {
                                        //Searching for the row with key in the DataBase
                                        //findByKey() searches in DB
                                        Row[] agrRows = agrVO.findByKey(key, 1);
                                        if (agrRows != null && agrRows.length != 0) {
                                            //agrRows = (AGRRow)agrRows[0];
                                    if (agrRow  != null) {
                                        //currentagrId = (String)agrRow.getAttribute("id");
                                        //agrVO.executeQuery();
                                        //agrRow = agrVO.first();
                                        callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new  Object[] { currentagrId });
                            return currentagrId ;
                        }Edited by: Tshifhiwa on 2012/07/01 10:51 AM
    Edited by: Tshifhiwa on 2012/07/01 11:38 AM

  • How to Select a value from DropDownByIndex -Urgent

    Hi All,
    I have dropdownbyindex UI elements in my Views, I get values from BAPI. When click records in a table, It goes to another view to display full record. Here i have dropdownbyIndexes So it should select one of appropriate value in dropdownbyindex based on record(Value) in table.
    Example:
    <u><i><b>In Table View</b></i></u>
    id                  title                 status          priority
    10000      webDynPro            New              Low
    <i><u><b>Detail View:</b></u></i>
    id                   10000
    title                 webDynPro
    Status             New                  [New,Old,Open,Closed]---DropDownbyIndex
    Priority            Low                   [High,Low,Medium]---DropDownByIndex..4m BAPI
    How to select Appropriate Values from DropdownbyIndex. if any one has sample code, that will be helpful.
    Note: I am using Model Nodes
    Thanks and Regards
    Ravi Golla

    Hi Ravi,
    In details view, you will have corresponding context node created for Status and priority dropdown fields.
    Let suppose, context node for Status is, StatusNode.
    value attribute inside this is,
    StatusNode
      |_ StatusAttrib
    Now, you need to write following code to set l_status ="LOW" value in it.
    wdContext.nodeStatusNode().moveFirst();
    for(int i=0; i<wdContext.nodeStatusNode().size(); i++)
        if(wdcontext.currentStatusNodeElement().getStatusAttrib().equals(l_status)
              wdContext.nodeStatusNode().setLeadselection(i);
              break;
    wdContext.nodeStatusNode().moveNext();
    write same code for priority also.
    Let me know if it is not working with you.
    regards,
    Bhavik

  • Manager attribute from AD and to AD

    Hello Experts,
    I am working with AD-IDM implementation.
    I am facing two problems here:
    1. Issue in getting Manager attribute of the users from HR system onto IDM via initial load and
    2. Issue in assigning the Manager attribute to a user from IDM while creating a new user on AD
    In case 1, I am simply trying to pass the manager in HR system to attribute MX_MANAGER as
    in pass 'to identity store' ->  MX_MANAGER = %manager%
    For this, the IDM throws an error as "Entry reference value is not numeric when storing attribute MX_MANAGER=xyz"
    In case 2, while creating a new identity assigning the AD privilege, I am trying to assign the manager to that new AD user. But it fails to create a user on AD as the manager attribute value comes with an error "CONSTRAINT_ATT_TYPE"
    I know that the manager value on AD resides in DN format, but not sure how to resolve that to use the same for purposes.
    Could you please suggest on the above issues.
    FYKI - Version: IDM 7.2
    Many thanks in advance!
    Naveen

    Hi Naveen,
    In order to start writing scripts, you should know what are the tables/views to query for getting the required information.
    I strongly recommend you to go through the the blog IDM SQL Basics #1: Queries against the Identity Store by  Per Krabsetsve
    Anyways I am writing down the sample scripts for your reference, which you can make use of.
    Let me know for any further queries.
    1. For getting the MSKEY of the user from MSKEYVALUE
    // Main function: z_sap_getMskeyForMskeyvalue
    function z_sap_getMskeyForMskeyvalue(Par)
      var msKey = "";
      msKey = "select distinct mcMSKEY from idmv_entry_simple where mcMSKEYVALUE='"+Par+"'";
      msKey = uSelect(msKey);
      return msKey;
    2.  For gettting the DN of the Manager with MSKey as the input to the script.
    // Main function: z_sap_getManagerADDN
    function z_sap_getManagerADDN(Par)
       var msKey = Par;
      var managerADDN = "";
      managerADDN = "select avalue from idmv_value_basic where MSKEY="+Par+" and AttrName='ACCOUNTIDECAD'";
      // in the above select query ACCOUNTIDECAD is my AD account attribute. In your case it is ACCOUNT<AD Rep Name>
      managerADDN = uSelect(managerADDN);
      return managerADDN;
    All the best !!
    ~ Krishna.

  • How to remove namespace prefix from target payload when using HTTP in PI7.0

    Hi,
    i have a requirement to remove namespace prefix from target payload when receiver receives the payload by an HTTP request.
    i am not able to use XML Anonymizer Bean as in HTTP channel its not possiile.
    Target structure after mapping now is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns3:Order xmlns:ns3="urn:xxx-com:pi:project">
    fields
    </ns3:Order>
    i need the target structure after mapping should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Order xmlns:="urn:xxx-com:pi:project">
    fields
    <Order>
    i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Please reply if anyone has solved this problem before.
    Thanks

    Hi ,
    >>>i removed namespace from source and target Message Type of message mapping but still getting "ns3" prefix. My requirement is to just have this ns3 removed.
    Which process you've used for removing namespace...java/xslt mapping. In case of java mapping plese remove ns3 while creating the target element. Please go through the below blog it may help you.
    Quick Tips: Dealing with Namespaces in XI/PI
    Regards,
    Priyanka

  • I have a table with info and would like to select an item from that table

    Hi
    I have a table with info (course info that I searched for) and would like to select an item from that table to use for further use in my application.
    It must work more or less like the tree structure where I can use an On Action select.
    In other words; let say I am looking for all courses with "Advisor" it its descriptin / name, I want to click on one of the names and use it lets say to book people on.
    Could some please assist me with this.
    Regards
    Debbie

    Hi
    The datasource for my table is the node searchcatalog.  Under this node there is an attribute calles description where the items found are displayed.
    I changed my code as follow:
    data: ls_table type wd_This->Elements_searchcatalog,
          lr_element type ref to if_wd_context_element.
      DATA lo_nd_searchcatalog TYPE REF TO if_wd_context_node.
      DATA lo_el_searchcatalog TYPE REF TO if_wd_context_element.
      DATA ls_searchcatalog TYPE wd_this->element_searchcatalog.
    navigate from <CONTEXT> to <SEARCHCATALOG> via lead selection
      lo_nd_searchcatalog = wd_context->get_child_node( name = wd_this->wdctx_searchcatalog ).
    @TODO handle not set lead selection
      IF lo_nd_searchcatalog IS INITIAL.
      ENDIF.
    get element via lead selection
      lo_el_searchcatalog = lo_nd_searchcatalog->get_element(  ).
    @TODO handle not set lead selection
      IF lo_el_searchcatalog IS INITIAL.
      ENDIF.
    get all declared attributes
      lo_el_searchcatalog->get_static_attributes(
        IMPORTING
          static_attributes = ls_searchcatalog ).
    lo_nd_searchcatalog->get_lead_selection->( exporting index = wdevent->index importing
    element = lr_element ).
    lr_element->get_static_attributes->( importing static_attributes = ls_table ).
    wd_context->set_attribute( exporting name = 'SELECTED' value = ls_table-description ).
    When I try to activate it errors with: List elements that take up more than one line is not allowed.  This error at the sentence: lo_el_searchcatalog->get_static_attributes(
    If you cannot assist me further I will understand.  Thank you.

  • When selecting a row from a view with a nested table I want just ONE entry returned

    Does a nested table in a view "EXPLODE" all values ALWAYS no matter the where clause for the nested table?
    I want to select ONE row from a view that has columns defined as TYPE which are PL/SQL TABLES OF other tables.
    when I specify a WHERE clause for my query it gives me the column "EXPLODED" with the values that mathc my WHERE clause at the end of the select.
    I dont want the "EXPLODED" nested table to show just the entry that matches my WHERE clause. Here is some more info:
    My select statement:
    SQL> select * from si_a31_per_vw v, TABLE(v.current_allergies) a where a.alg_seq
    =75;
    AAAHQPAAMAAAAfxAAA N00000 771 223774444 20 GREGG
    CADILLAC 12-MAY-69 M R3
    NON DENOMINATIONAL N STAFF USMC N
    U
    E06 11-JUN-02 H N
    05-JAN-00 Y Y
    USS SPAWAR
    353535 USS SPAWAR
    SI_ADDRESS_TYPE(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NUL
    L, NULL)
    SI_ADDRESS_TAB()
    SI_ALLERGY_TAB(SI_ALLERGY_TYPE(69, 'PENICILLIN', '11-JUN-02', NULL), SI_ALLERGY
    TYPE(74, 'SHELLFISH', '12-JUN-02', NULL), SIALLERGY_TYPE(68, 'PEANUTS', '13-J
    UN-02', NULL), SI_ALLERGY_TYPE(75, 'STRAWBERRIES', '13-JUN-02', NULL))
    SI_ALLERGY_TAB()
    75 STRAWBERRIES 13-JUN-02
    *******Notice the allergy entry of 75, Strawberries, 13-JUN-02 at the
    end. This is what I want not all the other exploded data.
    SQL> desc si_a31_per_vw
    Name Null? Type
    ........ Omitted uneeded previous column desc because of metalink
    character limit but the view is bigger then this.......
    DEPT_NAME VARCHAR2(20)
    DIV_NAME VARCHAR2(20)
    ADDRESSES SI_ADDRESS_TAB
    CURRENT_ALLERGIES SI_ALLERGY_TAB
    DELETED_ALLERGIES SI_ALLERGY_TAB
    SQL> desc si_allergy_tab
    si_allergy_tab TABLE OF SI_ALLERGY_TYPE
    Name Null? Type
    ALG_SEQ NUMBER
    ALG_NAME VARCHAR2(50)
    START_DATE DATE
    STOP_DATE DATE
    SQL> desc si_allergy_type
    Name Null? Type
    ALG_SEQ NUMBER
    ALG_NAME VARCHAR2(50)
    START_DATE DATE
    STOP_DATE DATE

    Can you explain what do you mean by the following?
    "PL/SQL tables (a.k.a. Index-by tables) cannot be used as the basis for columns and/or attributes"There are three kinds of collections:
    (NTB) Nested Tables
    (VAR) Varrying Arrays
    (IBT) Index-by Tables (the collection formerly known as "PL/SQL tables")
    NTB (and VAR) can be defined as persistent user defined data types, and can be used in table DDL (columns) and other user defined type specifications (attributes).
    SQL> CREATE TYPE my_ntb AS TABLE OF INTEGER;
    SQL> CREATE TABLE my_table ( id INTEGER PRIMARY KEY, ints my_ntb );
    SQL> CREATE TYPE my_object AS OBJECT ( id INTEGER, ints my_ntb );
    /IBT are declared inside stored procedures only and have slightly different syntax from NTB. Only variables in stored procedures can be based on IBT declarations.
    CREATE PROCEDURE my_proc IS
       TYPE my_ibt IS TABLE OF INTEGER INDEX BY BINARY_INTEGER;  -- now you see why they are called Index-by Tables
       my_ibt_var my_ibt;
    BEGIN
       NULL;
    END;That sums up the significant differences as it relates to how they are declared and where they can be referenced.
    How are they the same?
    NTB and VAR can also be (non-persistently) declared in stored procedures like IBTs.
    Why would you then ever use IBTs?
    IBTs are significantly easier to work with, since you don't have to instantiate or extend them as you do with NTB and VAR, or
    Many other highly valuable PL/SQL programs make use of them, so you have to keep your code integrated/consistent.
    There's a lot more to be said, but I think this answers the question posed by Sri.
    Michael

  • How to select an item from a jspx file from a bean

    Hi all,
    I have a creation.jspx page that create / modify employee infos. I selected an employee from a table and then, I want to be able to modify some attributes. So, I need to enable a "save" button in the jspx page when I select an employee.
    I created a : +selectionListener="#{selectedColumn.t1_selectionListener}"+
    and a bean to control it:
    +package Bean;+
    +import org.apache.myfaces.trinidad.event.AttributeChangeEvent;+
    +import org.apache.myfaces.trinidad.event.SelectionEvent;+
    +public class selectedColumn {+
    +public selectedColumn() {+
    +}+
    +public void t1_selectionListener(SelectionEvent selectionEvent) {+
    *What code do I put in there to access a button element of the jspx page?*
    +}+
    +}+
    The button is in the page, *but not* in the component that calls this event.
    Thanks :)

    Hi Maxime.
    Easy way to achieve it:
    - Go to Property Inspector of your "save" button.
    - In Advanced -> Binding, create a binding to your button in your Backing Bean where is your selectedColumn method.
    - Now you have in your Backing Bean your button accesible and now you can enable or disable it with next code:
    this.myButton.setDisabled(false);
    AdfFacesContext.getCurrentInstance().addPartialTarger(myButton);Regards.

Maybe you are looking for