Change boolean value in a method

How could the following be done:
I have an object file deserialized and I want to call its methods. I want one of the methods to return a boolean. When I call this method I want the value of boolean to be set to true. So when I want to call this method again I want the boolean to be set to true. Therfore I will be unable to call this method.
Below is the code that I have used.
Thanks in advance
public interface Call
  public void execute();
  public boolean test();
import java.util.*;
public class Example implements java.io.Serializable,Call
  public void execute()
  System.out.println("Example has printed out");
   public boolean test()
     System.out.println("The test method has been called");
}Should I provide all of the code? Or is the above enough

I'm glad you've bought a book, I hope you find it enlightening. Incidentally, I'm not annoyed, only amused, but either way if we don't understand your questions, we can't help you can we ?
Do try to remember that we don't know what you're trying to achieve here - we don't have the big picture.
So in your update, I still don't know, really, what you're getting at. I particularly don't understand what (if any) relevance you think Serialization has to this problem. However, here is my best guess:
import java.util.*;
import java.io.*;
public class Example
   implements Serializable,Call
   public void execute()
      if(!test())
         System.out.println("Will not do the work");
      else
         System.out.println("Will do the work");
         doWork();
   public void doWork()
      // This method will ONLY get called the first time you
      // call execute() and never again.
   public boolean test()
      System.out.println("The test method has been called");
      if( m_status == true )
         m_status = false;
         return true;
      return false;
   // The status of the test - initially true
   private boolean m_status = true;
}

Similar Messages

  • How to generate pulse during changing boolean value?

    I need to generate short pulse during changing boolean value from 0 to 1. This pulse is needed to reset counter. 
    I was trying with Event Structure with Value Change but I think that I did something wrong.
    Maybe sambody can give me some tips to do it in other way?
    Thank you in advance.
    Regards
    Solved!
    Go to Solution.

    Rogal wrote:
    I need to generate short pulse during changing boolean value from 0 to 1. This pulse is needed to reset counter. 
    I was trying with Event Structure with Value Change but I think that I did something wrong.
    Maybe sambody can give me some tips to do it in other way?
    Thank you in advance.
    Regards
    We assumed you wanted a pulse when a front panel button (boolean) was clicked.
    I am still not sure just what it is you want.
    Do you want a single pulse when x is greater than 4?
    You don't need an event structure for that.
    Omar

  • How to change screen combo box value from a method?

    Hi,
    I have a screen that has a combo box and an ALV.
    the combo box has the line numbers of the data in the ALV.
    you can select the line item and then the ALV changes...
    I fill the combo with function VRM_SET_VALUE.
    all is good once the user changes the combo box.
    I want to enable the user to click (hotspot) on ALV and then to ... and to change the value of the combo box to the line number he clicked on.
    I couldn't change the value inside that box.
    The combo box is declared as global parameter.
    when I assign a value to it inside the method, it is good. but once back to PAI, it is the old value.
    Do you have any idea how to set up that value?
    Thanks.

    Itay,
    When you load the combo box, you should be setting a "key" for each entry in the combo box.
    See below:
      move '2010FY' to Value-Key.
      move '2010 - Full Year' to Value-Text.
      append value to list.
      move '2010Q1' to Value-Key.
      move '2010 - Q1' to Value-Text.
      append value to list.
      move '2010Q2' to Value-Key.
      move '2010 - Q2' to Value-Text.
      append value to list.
      move '2010Q3' to Value-Key.
      move '2010 - Q3' to Value-Text.
      append value to list.
      move '2010Q4' to Value-Key.
      move '2010 - Q4' to Value-Text.
      append value to list.
      move 'COMBO1' to name.  "name of Combo box in the screen
      call function 'VRM_SET_VALUES'
        exporting
          id = name
          values = list.
    So add these "keys" to a hidden column in the ALV grid.  Then .... when the user presses a hotspot, pass the value of the hidden column (for the selected row) into the COMBO1 box.
      move '2010'FY' into Combo1.  " if they selected Full Year of 2010

  • Change variable values in a class without acessing it's methods?

    I have the following scenery, a main class with:
    -ArrayList of strings.
    -Class frame (with textfield and button) supposed to add strings to that Array.
    Ok, in main class i set the frame to run, but how to make the frame to change the ArrayList of the main class in a easy way? What is the easiest solution and the best without hurting the paradigm?
    1-One solution would be to make a method in frame that returns the string and IN MAIN CLASS add it. But is this too straightforward? Like, if i had to manage 7,8 frames that must acess 7, 8 ArrayLists of main class as well as other frames recursively (Example: main class start running frame 1, then if button1 pressed go to frame 2, if button 2 pressed get textfield and chang ArrayList)
    2-Another solution would be to set all ArrayLists as static variables so i can change them freely? Is this a good paradigm?
    3-Pass the own main class as parameter throughout the frames? Is it possible? If so please post a 10, 15 line code in which i could do that.
    4- Put the main class as mother and all frames as son and put all arraylists as protected?
    I feel like im lacking one good paradigm, it should exist some concept in which the created object could change the value of the variable passed as parameter in the class that created it.
    Thank you very much.

    Thank you for your reply Kayaman, but i think you should help me.
    I tried to pass a simple variable (a string) as parameter through the constructor to one frame, like any other class.
    public class TelaLogin extends javax.swing.JFrame {
    String a;
    public TelaLogin(String a) {
    this.a=a;
    initComponents();
    But it returns a compilation error, maybe is something in it's main method? I didn't change it:
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new TelaLogin().setVisible(true);
    The main class has a 'new TelaLogin' that looks very suspicious. Is it that?
    This looks very simple.
    What must i change here? Please Kayaman help me.

  • Changing a boolean value based on two buttons

    I know that this is a ridiculously simple question, but I've been having trouble with it.
    How would you set a boolean value based on the input from two other boolean values? Essentially what I want, in pseudocode, is this:
    boolA = true
    if (boolB)
         boolA = false
    if (boolC)
         boolA = true
    It should be really simple to do, but I can't figure it out. The problem is getting it to stay false, for example, after boolB goes back to false, and not just to have it only momentarily go to false. I want it to stay false until boolC goes to true, regardless of what boolB does after that. Any advice?
    Thanks,
    Logan Williams

    I would say implies is close to what was asked for.  However, the only issue is that for the case where both B and C are false, the logic shows that there is no change to A.  It is initially True, but if it happens to be False because of further changes, there is nothing in the If statements to change the logic.  And that is what is asked for.  That the Result stays False even when B goes back to False.  But the Implies function says that  F and F must be True.
    As described
    B         C         Result A
    T          T          T (because C is evaluated 2nd)
    T          F          F
    F          T          T
    F          F          x (initially T, but the code shown and what is asked for is actually no change from previous state)
       Implies Truth Table
    B         C         Result A
    T          T          T
    T          F          F
    F          T          T
    F          F          T

  • UCCX 10.5 Scripting: Allowing a CAD Task Button to Change A Boolean Value to Skip a Screen Pop

    Good Morning All...
    I've found some wonderful information on here in the past and I'm hoping you all can assist me now.
    I have a CCX Script (10.5(1)SU1) that is working beautifully. Within the CAD integration there is a screen pop which sends an ANI value to a corporate application to bring up customer information, this is also working with no issue. I've been given a request from the call center manager to put a task button on the agents' CAD instance to allow them to turn off these screen pops in the event that they need to be on the same screen for longer than the work/wrap-up time between calls.
    My Questions Are These:
    1. I know I can use a task button to set an Enterprise Data value i.e. skip_pop = true (skip_pop being tied to the Boolean value in the script). That being said, I can't change the value until the call reaches the agent and that is too late in the process to stop the prompt from running. Is there a better/different way that I am not thinking off to allow the agent to interact with Boolean value before the call arrives to the agent?
    2. Am I completely off base? Is there a much better way that I can do this in general?
    I am at your mercy and your help is greatly appreciated.
    Thank you
    Justin

    Hey Aaron:
    So I'm in the midst of working through this mess for a button push and I've hit a wall. Perhaps you'll have some insight? In my CDA (see screen shot) I've configured an HTTP action that is in theory sending the agent ID and a value of true.
    In my child script (attached) I have a Get HTTP contact info where I am looking for "Agent_ID" and "sPopState" when I do a test run with a reactive debug I am getting success but the database is basically adding lines but with no information in either column (I have verified that my DB is working correctly).
    Do you by chance have any idea what I might be missing? I'd like to think I'm close but I'm getting into dark territory for my experience level.
    As always, your help and expertise are greatly appreciated.
    Thanks,
    Justin

  • Boolean-valued method

    In the textbook, it says that boolean-methods are:
    public Boolean equals(DemoSpecies otherObject)
    return ((name.equalsIgnoreCase(otherObject.name))
    &&(population==otherObject.population);
    &&(growthRate==otherObject.growthRate);
    }But it also says that these are also boolean-method:
    Species s1 = new Species(), s2 = new Species();
    <Some code to set the values of s1 and s2.>
    boolean areEqual;
    areEqual = s1.equals(s2);
    <Some more code.>
    if (areEqual)
    System.out.println("They are equal.")
    else
    System.out.println("They are not equal.")Which one is a boolean valued method? Are they both the same thing? If I want to test an inequality between class variable name and a variable (such as numberOfStudents), which one would I use?
    Thanks in advance.

    I'm still not sure what the question is... I guess autoboxing might be confusing you... autoboxing automagically transmutes a parameter from it's fundamental type to it's wrapper-class equivalent... which allows you to write code which treats Boolean and boolean as equivalent, except for those nasty nulls.
    For example, the code:
    package forums;
    class AutoBoxTesterator
      public static void main(String[] args) {
        int i = 1;
        System.out.println("i="+method1(i));
        Integer jj = 2;
        System.out.println("jj="+method2(jj));
        Integer kk = null;
        System.out.println("kk="+method1(kk));
        try {
          System.out.println("kk="+method2(kk));
        } catch (NullPointerException e) {
          System.out.print("method1(null) caused: ");
          e.printStackTrace();
        boolean b = method3();
        System.out.println("b="+b);
      private static String method1(Integer ii) {
        return ""+ii;
      private static String method2(int j) {
        return ""+j;
      private static Boolean method3() {
        return true;
    }produces:
    i=1
    jj=2
    kk=null
    method2(null) caused: java.lang.NullPointerException
            at forums.AutoBoxTesterator.main(AutoBoxTesterator.java:16)
    b=trueThe above code behaves this way because:
    1. int i is "auto-boxed" into Integer ii as it's passed to method1.
    2. Integer jj is "auto-unboxed" into int j as it's passed to method2.
    3. Integer kk remains unmodified as it's passed to method1.
    4. Integer kk throws a runtime NullPointerException when we attempt to unbox null to pass it to method2.
    5. In method3() "true" is auto-boxed to a Boolean (ie method3's declared return type), which is them immediately unboxed back to a raw boolean to be stored in b; Again this will cause a NPE if method3 happens to return null.
    So what does that mean?... Well it means that as of 1.6 you can be pretty fast and loose with "wrapper vs fundamendal types", so long as you're mindful of null's.

  • Validation error while trying to change a value in a request scope bean

    - JBoss 4.2.3.GA
    - JSF 1.2_09-b01-BETA1 (Mojarra)
    - Java 5 Update 17
    Hello, everybody!
    I'm having the following problem in my JSF web application:
    I have a request scope backing bean. The first time this bean is loaded (I check
    this with the ResponseStateManager.isPostBack() method) I fill a list of SelectItem
    instances that are to be displayed in the JSF page in a +<h:selectOneMenu>+ component.
    The list goes, of course, to the +<h:selectOneMenu>+'s +<f:selectItems>+ facet child
    component. In the constructor I also define the value that goes to the value property
    of the +<h:selectOneMenu>+ component. This value is a property in the backing bean, as
    is the list of SelectItem instances. Until now we have something like this:
    The backing bean declaration in faces-config.xml:
    <managed-bean>
        <managed-bean-name>solicitacaoGeral</managed-bean-name>
        <managed-bean-class>br.urca.solicitacoes.web.PaginaSolicitacaoGeral</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    The relevant parts of the JSF page:
    <h:form id="form">
        <h:selectOneMenu value="#{solicitacaoGeral.setorOrigem}" id="foco">
            <f:selectItems value="#{solicitacaoGeral.setoresOrigem}" />
        </h:selectOneMenu>
    </h:form>
    The relevant parts of the backing bean class:
    public class PaginaSolicitacaoGeral
        private final List<SelectItem> fSetoresOrigem = new ArrayList<SelectItem>();
        private Setor fSetorOrigem;
        public PaginaSolicitacaoGeral()
            if (primeiraExibicao()) // First load (!ResponseStateManager.isPostBack())
                // Fill fSetoresOrigem...
                fSetorOrigem = ...
            else // Page submitted
                // Read below...
        public List<SelectItem> getSetoresOrigem()
            return fSetoresOrigem;
        public Setor getSetorOrigem()
            return fSetorOrigem;
        public void setSetorOrigem(Setor setorOrigem)
            fSetorOrigem = setorOrigem;
        private boolean primeiraExibicao()
            String idFerramentaExibicao =
                FacesContext.getCurrentInstance().getViewRoot().getRenderKitId();
            ResponseStateManager gerenciadorEstadoResposta =
                RenderKitUtils.getResponseStateManager(
                FacesContext.getCurrentInstance(), idFerramentaExibicao);
            return !gerenciadorEstadoResposta.isPostback(
                FacesContext.getCurrentInstance());
    }But when the user submits the form and the bean constructor is called again
    (this time the method ResponseStateManager.isPostBack() returns true ),
    in the else block in the constructor above, I need to fill fSetoresOrigem with
    other values and also the fSetorOrigem field because, of course, the fSetorOrigem
    field has to be a valid value that exists in the new fSetoresOrigem list.
    JSF is not complaining about the change to the list items, but it is complaining
    to the change to the fSetorOrigem field (the list value), even though it is a
    valid value present in the list. So I'm getting this error message:
    08:23:54,312 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
    sourceId=form:foco[severity=(ERROR 2), summary=(form:foco: Validation Error: Value is not valid), detail=(form:foco: Validation Error: Value is not valid)]I suppose that JSF is comparing the new value of the field fSetorOrigem with the value
    it has in the view state. As the value is different it is raising the error. That's
    what I suppose. But am I not able the change the value in the postback? I've already
    checked and the value is valid. It corresponds to a value that exists in the list.
    I really need a solution to this problem as I'm stuck with this and can't proceed until
    I find a solution to this. What I am doing wrong and how can I solve this?
    Thank you very much.
    Marcos

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • Re: Express Query on boolean values

    Hi Simon,
    When the model is run, however, I am able to enter values in the
    other fields and query on them, but I am unable to change the value
    of the checkbox that Express generates for the boolean attribute. If
    the query is run, the data returned is for both true and false values
    of this field.
    Why am I unable to query on this field?The literal answer to your question is: Because Express does not
    support doing queries on Boolean fields.
    The reason is that it is difficult to know how to interpret a
    ToggleField when it comes to search criteria. If "off" means
    find records where this value is FALSE and "on" means find records
    where this value is TRUE, how does one specify to find all records
    regardless of the field value? With DataFields, leaving the field
    blank specifies just this.
    If you want to override this behavior, you'll need to know the
    following:
    Express uses a special widget state to allow users to enter search
    criteria operators (<, >, and so forth) in fields that otherwise
    would not accept these operators (DataFields displaying integers
    or dates). This widget state is called FS_QUERY. What you are
    seeing is that when ToggleFields are in the FS_QUERY state, they
    do not allow the user to change their value.
    The SetWidgetState method is what sets the widget state to FS_QUERY
    when the window enters search mode. So to one step you must take
    to override this behavior is to write a custom SetWidgetState method
    that sets the widget state to FS_UPDATE if the passed widget is a
    toggle field and the passed widget is a ToggleField.
    But this will only allow you to change the state of the ToggleField
    while in Search mode. The next problem is that the window will ignore
    the value of the ToggleField regardless of what it is!
    This time the method of interest is SetSearchConstraint. It looks at
    the widget to get the search constraint. It will only look at DataField
    and ListField widgets, however, and ignore all others. You need to
    create a custom version that looks at the ToggleField and interprets
    the value (look in the Customizing Express applications doc for more
    info on modifying the search criteria).
    Also, the checkbox is highlighted in yellow during the entry of
    search criteria, even though I have set its colour in the window
    workshop customization.
    Where is this colour being set?This is being set in the ExpressWindows.ArrayDesc.SelectRow method.
    This is more difficult to override, as Express is not set up for
    users to override this class with a custom superclass.
    However, you can try setting the ToggleField color in
    DisplayCurrentRecord
    and SetResultSetFromData with code like the following:
    super.DisplayCurrentRecord();
    ArrayWidget.GetField( 1, "MyBooleanFieldName", FALSE ).FillColor =
    C_RED;
    and
    super.SetResultSetFromData();
    ArrayWidget.GetField( 1, "MyBooleanFieldName", FALSE ).FillColor =
    C_RED;
    I haven't tried this, however, and I'm not certain it will work, but
    it's worth a shot. ArrayWidget, in this case, is an attribute of type
    ExpressWindows.ArrayDesc that is defined on
    ExpressWindows.ExpressArrayWindow.
    GetField is defined on this class. Take a peek at it to get a better
    understanding of what it does.
    Good luck!
    Kerry

    Hi Pankaj,
    thank you for the detailed description. I tried to reproduce the issue but in my system I get the results that you are expecting.
    01.04.2010     10.04.2010     91.560,00
    11.04.2010          106.820,00
    Which release, support package level for EA-APPL is implemented in your system?
    Regards, Franz

  • SetProperty giving error with boolean values

    I created a boolean property in the property sets. When I try to change the
    value using setProperty, I keep getting the following error.
    \_full_disclaimer.java:134: cannot resolve symbol
    symbol : method setValue (boolean)
    location: class com.beasys.commerce.user.jsp.tags.SetPropertyTag
    umsetProperty0.setValue(trueValue);
    ile://[ /portals/repository/full_disclaimer.jsp; Line: 19]
    ^
    1 error
    JSP Code snippit:
    <%
    // Check for submit parameter
    String strSubmit = request.getParameter("submit"); if (strSubmit==null)
    strSubmit="";
    if (strSubmit.equalsIgnoreCase("Accept")) {
    boolean trueValue = true;
    %>
    <um:setProperty propertyName="legaldisclaimer"
    propertySet="<%=portalName%>" value="<%=trueValue%>" />
    <jsp:forward page="<%=createURL(request, "portal.jsp", null)%>"/>
    <%
    %>
    Any ideas why this is happening, and more importantly, what do I need to do
    so I get the desired results????
    Thanks,
    Ken Lee
    [email protected]

    Ken,
    Use a Boolean Object instance.
    Sincerely,
    Daniel Selman
    "Kenneth Lee" <[email protected]> wrote in message
    news:[email protected]..
    I created a boolean property in the property sets. When I try to changethe
    value using setProperty, I keep getting the following error.
    \_full_disclaimer.java:134: cannot resolve symbol
    symbol : method setValue (boolean)
    location: class com.beasys.commerce.user.jsp.tags.SetPropertyTag
    umsetProperty0.setValue(trueValue);
    ile://[ /portals/repository/full_disclaimer.jsp; Line: 19]
    ^
    1 error
    JSP Code snippit:
    <%
    // Check for submit parameter
    String strSubmit = request.getParameter("submit"); if (strSubmit==null)
    strSubmit="";
    if (strSubmit.equalsIgnoreCase("Accept")) {
    boolean trueValue = true;
    %>
    <um:setProperty propertyName="legaldisclaimer"
    propertySet="<%=portalName%>" value="<%=trueValue%>" />
    <jsp:forward page="<%=createURL(request, "portal.jsp", null)%>"/>
    <%
    %>
    Any ideas why this is happening, and more importantly, what do I need todo
    so I get the desired results????
    Thanks,
    Ken Lee
    [email protected]

  • Sorting a datatable with a boolean value

    Hi all,
    I have a datatable and one of the columns is just a true or false field.
    I'm using the DTOComparator from the BalusC (here: http://balusc.xs4all.nl/srv/dev-jep-dat.html) server but I'm getting the error:
    Error 500: java.lang.RuntimeException: Getter getInclude cannot be invoked.
    It comes from this line of code:
    try {
                c1 = (Comparable) o1.getClass().getMethod(getter, null).invoke(o1, null);
                c2 = (Comparable) o2.getClass().getMethod(getter, null).invoke(o2, null);
            } catch (Exception e) {
                // Obvious. Check if method names are correct.
                throw new RuntimeException("Getter " + getter + " cannot be invoked.");
    Can you not use boolean values with this?
    Thanks for any help!
    Illu

    Instead of a primivive, use a wrapper objects as DTO property which represents a DB entry. Remember, DB2 fields can contain null values.
    So use Boolean instead of boolean. Or just change the comparator to make it compatible with primitives.

  • Best way to check boolean value

    Hi!
    I have a schema defining an XML element with a boolean attribute. The document related to this schema use true/false literal boolean values, eg:
    <myelement myattribute="false"/>....<myelement myattribute="true"/>
    The data is stored in binary xml storage.
    I query the db on the boolean attribute with an xpath condition like this:
    ..../myelement[@myattribute=false()]
    Querying the db with this method:
    SELECT XMLQuery('....' returning content) from dual
    all works as expected.
    Instead, using:
    SELECT XMLQuery('....' ' PASSING OBJECT_VALUE RETURNING CONTENT)
    FROM "myxmltable"
    WHERE XMLExists('....' PASSING OBJECT_VALUE);
    I get the error: ORA-31038: Invalid hexBinary value: "false"
    To get the second query method working, I have to change the xpath condition, forcing a string comparison:
    ..../myelement[string(@myattribute)="false"]
    Can someone explain me this behaviour? What is the best way to check a boolean value? I'd like to write the same xquery working in both methods!
    Thank you.
    Bye
    Mirko

    Hi Geoff
    here the schema:
    <xs:schema xmlns:tns="http://OracleTest" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" targetNamespace="http://OracleTest" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="MyComplexType">
    <xs:sequence>
    <xs:element minOccurs="0" name="FirstChild">
    <xs:complexType>
    <xs:attribute name="A" type="xs:string" />
    <xs:attribute name="B" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="SecondChild">
    <xs:complexType>
    <xs:attribute name="S" type="xs:string" />
    <xs:attribute name="B" type="xs:boolean" />
    <xs:attribute name="I" type="xs:integer" />
    </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="ThirdChild">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="ThirdChildA">
    <xs:complexType>
    <xs:attribute name="A" type="xs:string" />
    <xs:attribute name="B" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element minOccurs="0" name="ThirdChildB">
    <xs:complexType>
    <xs:attribute name="C" type="xs:string" />
    <xs:attribute name="D" type="xs:string" />
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="ID" type="xs:string" />
    </xs:complexType>
    <xs:element xdb:defaultTable="MyElement" name="MyElement" type="tns:MyComplexType" />
    </xs:schema>
    and here two sample XML documents:
    <tns:MyElement ID="ID1" xmlns:tns="http://OracleTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://OracleTest http://OracleTest.xsd">
    <tns:FirstChild A="a" B="b" />
    <tns:SecondChild S="s" B="true" I="1" />
    <tns:ThirdChild>
    <tns:ThirdChildA A="aa" B="bb" />
    <tns:ThirdChildB C="cc" D="dd" />
    </tns:ThirdChild>
    </tns:MyElement>
    <tns:MyElement ID="ID2" xmlns:tns="http://OracleTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://OracleTest http://OracleTest.xsd">
    <tns:FirstChild A="aa" B="bb" />
    <tns:SecondChild S="ss" B="false" I="2" />
    <tns:ThirdChild>
    <tns:ThirdChildA A="aaaa" B="bbbb" />
    <tns:ThirdChildB C="cccc" D="dddd" />
    </tns:ThirdChild>
    </tns:MyElement>
    I registered the schema using Enterprise Manager. The "Show SQL" function returned this script:
    BEGIN
    DBMS_XMLSCHEMA.REGISTERSCHEMA(
    schemaurl => 'http://OracleTest.xsd',
    schemadoc => sys.UriFactory.getUri('/Testing/test.xsd'),
    local => FALSE,
    gentypes => FALSE,
    genbean => FALSE,
    gentables => TRUE,
    force => FALSE,
    owner => 'EMILIAROMAGNABUY',
    OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
    END;
    This is my test script:
    -- This works fine: returns only the requested row.
    SELECT XMLQuery('declare default element namespace "http://OracleTest"; collection("/Testing")/MyElement/SecondChild[@B=true()]' returning content) from dual;
    -- This raises the error = SQL Error: ORA-31038: Invalid hexBinary value: "true"
    select xmlquery('declare default element namespace "http://OracleTest"; /MyElement/SecondChild[@B=true()]' passing object_value returning content).getclobval() from "MyElement";
    -- This doesn't work correctly: returns the requested row and two empty rows ?!? I don't like this cast, anyway.
    select xmlquery('declare default element namespace "http://OracleTest"; /MyElement/SecondChild[string(@B)="true"]' passing object_value returning content).getclobval() from "MyElement";
    Thank you
    Mirko

  • Bindable for boolean values

    Hi,
    i have a class with the property deployed as boolean
    [Bindable]
    public var deployed:Boolean;
    i change this value according to my httpservice result in
    afunction
    public function isDeployedResult(event:ResultEvent):void{
    var deployedResult:String = event.result.toString();
    if((deployedResult.localeCompare("true")) == 1)
    deployed = true;
    else if((deployedResult.localeCompare("false")) == 1)
    deployed = false;
    Alert.show("in deployment service== "+deployed);//this shows
    the correct value
    but outside this function the value of deployed is always
    false;
    thanks
    chandana

    Thanks everybody
    I solved the problem.
    i have a component with creationComplete calling following
    method : checkDeployed()
    public function checkDeployed():void{
    this.clsname = (this.parentDocument as
    QueuesComponent).classname;
    deploymentService = new
    MittoDeploymentService(clsname,queue.id);
    deploymentService.isDeployed();
    this.showButtons();
    public function showButtons():void{
    this.deployed = deploymentService.deployed;
    if(this.deployed)
    this.redeployqueue.visible=true;
    this.updatequeue.visible=false;
    this.deployqueue.visible=false;
    this.undeploy.visible=true;
    else
    this.redeployqueue.visible=false;
    this.updatequeue.visible=true;
    this.deployqueue.visible=true;
    this.undeploy.visible=false;
    and the deployment service has the isDeployed method like
    this
    public function isDeployed():void{
    mittohttpRequest = new
    MittoBackendRequest("deploymentservice");
    var action:String = "isdeployed";
    mittohttpRequest.setRequest({action:action,classname:this.classname,checkdeploy:this.enti tyid});
    mittohttpRequest.addEventListener(ResultEvent.RESULT,isDeployedResult);
    mittohttpRequest.send();
    public function isDeployedResult(event:ResultEvent):void{
    var deployedResult:String = event.result.toString();
    if((deployedResult.localeCompare("true")) == 1)
    deployed = true;
    else if((deployedResult.localeCompare("false")) == 1)
    deployed = false;
    the boolean deployed in [bindable]
    here..show buttons is being called even before the result was
    obtained from the httpservice..and so the value is always false
    (default value of boolean) ..
    so i changed the calling of methods like this :
    initialize = "checkDeployed()" ,creationComplete =
    "showButtons()"
    and now the boolean deployed is correct with binded value in
    my component..
    hope the explanation is clear..
    thanku all
    chandana

  • In webdynpro ,Passing field symbols as values to class methods

    Hi
    Please tell me the ways of accessing database in webdynpro abap(not directly). I am calling Class method for accessing database. As currently I am directly accessing database in my webdynpro application. I have created a class and method for the same.
    In my method I want to use select statement which will return table with values to webdynpro application. So for select statement(Calling Method) I need to use my field symbol values as where in clause .
    Could anyone please help with example code?
    Thanks,
    Ujjwal

    data: in_line type ref to data.
    CREATE DATA in_line LIKE LINE OF <dyn_tab>.
      ASSIGN in_line->* TO <dyn_wa>.
    You can create a data reference and assign it to a field symbol and change the values. direclty passing field symbols is not possible.
    Abhi

  • Changing the value of a control in a subvi

    I think the answer is out there somewhere but I've read through many threads found with searches similar to this topic so sorry to repost...
    I would like to change the value of a top-level VI control from a sub-vi.  The data is being used as a parameter, I was thinking about using a local/global but I've seen this discouraged.  Is there a way I can do it with references, property, or invoke nodes (or some other suggested method) ?
    I am guessing that if I am not using globals I will need to wire into the sub-vi?
    Dave

    I'd like to clarify what I am trying to do a bit more...
    The sub-vi has a control of the same type as the top-level vi.  The inital control value is being passed into the sub-vi from the top-level vi.  The sub-vi uses the control value in several places through local variables (reading and writing to it)
    I would like to modify the vi so the top-level vi control value changes whenever the sub-vi changes the control value that is passed to it.
    My last attempt was to make a refnum control in the sub-vi (by dragging from top-level block diagram to sub front panel) and then creating a property node from that refnum control.  Using the property node "value" did not give me the value of the control from the top-level vi as I had hoped.  Wiring it to a terminal that was expecting the same type of control (a cluster of two numerics) caused a wiring conflict.
    I noticed elsewhere in the code that the programmer used a text file to save options (unfortunately the control I am working on was not originially included in the options).  There is a vi that, when called, either reads or writes to the text file.  From a C/C++ programming perspective it seems quite odd to me not to just keep all this data in memory and pass it around.  Is using a file to store variables a typical practice in LV programming (even when they are retrieved multiple times during program execution) ?

Maybe you are looking for

  • [HELP] Reading PNG Problem?

    Hello, I got a PNG image in my game: http://img211.imageshack.us/img211/4742/effectquestgate10sb3.png When it is rendered in java, it appears like this: http://img381.imageshack.us/img381/6696/glitcheddb3.jpg Why is that? It also looks like that in p

  • RFC destination exception

    I am working in CE 7.2.  I am not able run my application importing RFCs in CAF Core proj, if I import webservices, it is working fine. I have created provided systems in nwa -> soa ->technical confi -> system connections I also created a Destination

  • May have figured it out but, "don't quote me".

    Hello : Disgruntled ipoder's, after being on all morning and evening, I have figured it out. Listen to this. I only have had my ipod 7 months. After watching the products be introduce to the public, decided to download new itunes. I think there is a

  • Looking for the holy grail of action script code

    OK, I'm working on a Flash file and have created a button that I want to click on to open the following page: http://www.wcrf.org/ in a new browser window, window name: WCRF, width: 450, height: 450. I have seached the forums and this seems to be bot

  • Airport Express - green light, no connection to net, but Windows cabled OK

    Hi all, For 2 days I've been having a strange problem: Suddenly I don't get a valid internet connection through my airport express (AX), although the whole setup has worked for 3 years. I am connected that way: a DSL modem from my network provider is