Validation Model

Hi,
I�m on the final project of my degrees. I have to develop a system to generate client side validations and server side validations for n-tiers Java applications. The principal objective of the project is: write the validations rules ones and use it for validations in the client side (JavaScript) and the server side (Java).
I�m over the research stage and searching for the possible solutions that the Java technologies proposes for this problem. I know that JSF has a �Validation Model� that maybe resolve the problem, probably only part of it. I need to evaluate the possibilities to integrate this existing solution with my work, but first y have to make sure that I�m not fighting with JSF Validation Model, this is not the idea.
The problem that I found was the poor official information that explain how the validations works, probably because JSF is in a very early realize. I mean, I find a lot of information in the Internet but I need an official voice, so I can justify why I will not use the standard solution (JSF) or why I�ll use it.
1)     The validation model generate client side validations (for example JavaScript) ?. If not, do you think that a feature like this can be included in the next release of JSF?.
2)     The validations runs on the server side. Do they run on the web-tier or on the business-tier?
3)     I need to now the plans for the future, what do I�ll expect for JSF Validation Model now to 6-8 months?
4)     Is there a way to make validation rules using different fields, for example, validate one field based on the value of another field.
Thanks, Elena.

I'll try to answer your questions;
1) The validation model generate client side validations (for example JavaScript) ?. If not, do you think that a feature like this can be included in the next release of JSF?.
This is unlikely to change for the RI, however the spec does not care where the validations take place so long as they follow the spec. So I could see some JSF vendor suppling an implemenation that did generate JavaScript for client side validations but also performed the Web Tier validations as described in the spec.
2) The validations runs on the server side. Do they run on the web-tier or on the business-tier?
JSF only addresses the web-tier.
3) I need to now the plans for the future, what do I�ll expect for JSF Validation Model now to 6-8 months?
I susspect that things in the validation area will not changes much in the next 6 months.
4) Is there a way to make validation rules using different fields, for example, validate one field based on the value of another field.
You could fairly easily write a custom validator that validated several fields in relation to each other. In the JSP I could see something like this.
<h:input_number ......
<f:validator type="foo.bar.MyValidator>
<f:attribute name="attrOne" value="propertyReference.one"/>
<f:attribute name="attrTwo" value="propertyReference.two"/>
</f:validator>
</h:input_number>
Then the MyValidator could use the attributes (attrOne and attrTwo) set on the component (a UIInput in this case) to lookup the values to validate against.
This thread has info on how to use the property references to get at the actual values;
http://forum.java.sun.com/thread.jsp?forum=427&thread=427896&message=1908077#1908077
From what it sounds like that you want to do I'd suggest perhaps writing an extension to XDoclet that would allow you to specify the validation once and have XDoclet generate the code for a custom renderer that would generate JavaScript as well as making java code that you could invoke from your validator and your back-end business logic. Extending XDoclet is supposed to be easy (although I have not done it personally yet) the hard part would be defining the proper semantics in your 'constraint language' so that you could generate propery JavaScript and Java.
Good luck,
-bd-
http://bill.dudney.net

Similar Messages

  • Error (Data mining): The specified mining structure does not contain a valid model for the current task.

    I'm trying to run the Cross validation report on a mining structure that contains just Microsoft Association Rules mining model. In Target Attribute, I've tried:
    Actual(Service Description).SE value
    Actual([Service Description]).[SE value]
    Actual(Service Description)
    Actual([Service Description])
    just because i don't know what is the exact correct format, but none of them worked, and I always get the following error:
    Error (Data mining): The specified mining structure does not contain a valid model for the current task.
    the following is my mining model structure

    Association rules does not allow for cross-validation
    Mark Tabladillo PhD (MVP, SAS Expert; MCT, MCITP, MCAD .NET) http://www.marktab.net

  • How does XML DB handle XML Schema Validation ?

    In order to validate an XML document against an XML Schema using Oracle XML DB the XML Schema must first be registered with XML DB using the method registerSchema provided by the package DBMS_XMLSCHEMA.
    XDB provides two types of schema validation, 'Lax' Validation and 'Strict' Validation.
    'Lax' validation takes place whenever a schema based document is converted from it's textual representation into the XML DB internal object model. Errors caught by this validation will be prefixed with 'ORA'.
    'Stict' validation takes place when the XMLType methods schemaValidate() or isSchemaValid() are invoked.
    The schemaValidate() method throws an exception with an error message indicating what is wrong it encounteres an invalid document. The error message associated with the exception will be prefixed with LSX.
    The isSchemaValid() method returns true or false, depending on whether or not the document is valid. It cannot return any information about why the document is invalid.
    The reason for having both the Lax and Strict validation models is that Strict validation is much more expensive in terms of CPU and memory usage than Lax validation.

    Here are some examples of what is caught by Lax validation (ORA errors) and what is only caught by Strict validation (LSX errors).
    SQL> begin
      2     dbms_xmlschema.registerSchema('test',xmltype(
      3  '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.co
    eFormDefault="unqualified">
      4     <xs:complexType name="RootType">
      5             <xs:sequence>
      6                     <xs:element name="Mandatory"/>
      7                     <xs:element name="Enumeration">
      8                             <xs:simpleType>
      9                                     <xs:restriction base="xs:string">
    10                                             <xs:enumeration value="A"/>
    11                                             <xs:enumeration value="B"/>
    12                                             <xs:enumeration value="C"/>
    13                                     </xs:restriction>
    14                             </xs:simpleType>
    15                     </xs:element>
    16                     <xs:element name="MinLength">
    17                             <xs:simpleType>
    18                                     <xs:restriction base="xs:string">
    19                                             <xs:minLength value="4"/>
    20                                             <xs:maxLength value="20"/>
    21                                     </xs:restriction>
    22                             </xs:simpleType>
    23                     </xs:element>
    24                     <xs:element name="MaxLength">
    25                             <xs:simpleType>
    26                                     <xs:restriction base="xs:string">
    27                                             <xs:minLength value="1"/>
    28                                             <xs:maxLength value="4"/>
    29                                     </xs:restriction>
    30                             </xs:simpleType>
    31                     </xs:element>
    32                     <xs:element name="MaxOccurs" type="xs:string" maxOccurs="2"/>
    33                     <xs:element name="MinOccurs" minOccurs="2" maxOccurs="2"/>
    34                     <xs:element name="Optional" type="xs:string" minOccurs="0"/>
    35             </xs:sequence>
    36     </xs:complexType>
    37     <xs:element name="Root" type="RootType" xdb:defaultTable="ROOT_TABLE"/>
    38  </xs:schema>'));
    39  end;
    40  /
    PL/SQL procedure successfully completed.
    SQL> --
    SQL> -- Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    1 row created.
    SQL> --
    SQL> -- Undefined element 'Illegal'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Illegal>Hello World</Illegal>
      5     <Enumeration>A</Enumeration>
      6     <MinLength>ABCD</MinLength>
      7     <MaxLength>WXYZ</MaxLength>
      8     <MaxOccurs>1</MaxOccurs>
      9     <MaxOccurs>2</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30937: No schema definition for 'Illegal' (namespace '##local') in parent
    '/Root'
    SQL> --
    SQL> -- Multiple occurences of 'Optional'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (1) of 'Optional' XML node elements exceeded
    SQL> --
    SQL> -- Missing element 'Manadatory'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Enumeration>A</Enumeration>
      4     <MinLength>ABCD</MinLength>
      5     <MaxLength>WXYZ</MaxLength>
      6     <MaxOccurs>1</MaxOccurs>
      7     <MaxOccurs>2</MaxOccurs>
      8     <MinOccurs>1</MinOccurs>
      9     <MinOccurs>2</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> --
    SQL> -- Invalid Enumeration Value
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>Z</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31038: Invalid enumeration value: "Z"
    SQL> --
    SQL> -- MinLength Violation
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABC</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  --
    15  -- MaxLength Violation
    16  --
    17  /
    1 row created.
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>VWXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30951: Element or attribute at Xpath /Root/MaxLength exceeds maximum length
    SQL> --
    SQL> -- Missing element Optional - Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> --
    SQL> -- Too many instances of 'MaxOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MaxOccurs>3</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (2) of 'MaxOccurs' XML node elements exceeded
    SQL> --
    SQL> -- Too few instances of 'MinOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> create trigger validateSchema
      2  before insert on ROOT_TABLE
      3  for each row
      4  begin
      5     :new.object_value.schemaValidate();
      6  end;
      7  /
    Trigger created.
    SQL> --
    SQL> -- Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    1 row created.
    SQL> --
    SQL> -- Undefined element 'Illegal'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Illegal>Hello World</Illegal>
      5     <Enumeration>A</Enumeration>
      6     <MinLength>ABCD</MinLength>
      7     <MaxLength>WXYZ</MaxLength>
      8     <MaxOccurs>1</MaxOccurs>
      9     <MaxOccurs>2</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30937: No schema definition for 'Illegal' (namespace '##local') in parent
    '/Root'
    SQL> --
    SQL> -- Multiple occurences of 'Optional'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (1) of 'Optional' XML node elements exceeded
    SQL> --
    SQL> -- Missing element 'Manadatory'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Enumeration>A</Enumeration>
      4     <MinLength>ABCD</MinLength>
      5     <MaxLength>WXYZ</MaxLength>
      6     <MaxOccurs>1</MaxOccurs>
      7     <MaxOccurs>2</MaxOccurs>
      8     <MinOccurs>1</MinOccurs>
      9     <MinOccurs>2</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00213: only 0 occurrences of particle "Mandatory", minimum is 1
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at "XDBTEST.VALIDATESCHEMA", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.VALIDATESCHEMA'
    SQL> --
    SQL> -- Invalid Enumeration Value
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>Z</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31038: Invalid enumeration value: "Z"
    SQL> --
    SQL> -- MinLength Violation
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABC</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  --
    15  -- MaxLength Violation
    16  --
    17  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00221: "ABC" is too short (minimum length is 4)
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at "XDBTEST.VALIDATESCHEMA", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.VALIDATESCHEMA'
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>VWXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11     <Optional>Goodbye</Optional>
    12  </Root>'
    13  ))
    14  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30951: Element or attribute at Xpath /Root/MaxLength exceeds maximum length
    SQL> --
    SQL> -- Missing element Optional - Valid Document
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <MinOccurs>2</MinOccurs>
    11  </Root>'
    12  ))
    13  /
    1 row created.
    SQL> --
    SQL> -- Too many instances of 'MaxOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MaxOccurs>3</MaxOccurs>
    10     <MinOccurs>1</MinOccurs>
    11     <MinOccurs>2</MinOccurs>
    12     <Optional>Goodbye</Optional>
    13  </Root>'
    14  ))
    15  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-30936: Maximum number (2) of 'MaxOccurs' XML node elements exceeded
    SQL> --
    SQL> -- Too few instances of 'MinOccurs'
    SQL> --
    SQL> insert into ROOT_TABLE values (xmltype(
      2  '<Root>
      3     <Mandatory>Hello World</Mandatory>
      4     <Enumeration>A</Enumeration>
      5     <MinLength>ABCD</MinLength>
      6     <MaxLength>WXYZ</MaxLength>
      7     <MaxOccurs>1</MaxOccurs>
      8     <MaxOccurs>2</MaxOccurs>
      9     <MinOccurs>1</MinOccurs>
    10     <Optional>Goodbye</Optional>
    11  </Root>'
    12  ))
    13  /
    insert into ROOT_TABLE values (xmltype(
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00213: only 1 occurrences of particle "MinOccurs", minimum is 2
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at "XDBTEST.VALIDATESCHEMA", line 2
    ORA-04088: error during execution of trigger 'XDBTEST.VALIDATESCHEMA'
    SQL>

  • Can we use Boolean or Validations in HFM Rules

    Hi Gurus
    Can we use Boolean or Validations for input cells in HFM?
    Example:
    1. I want to restrict the user to enter only single digit (0 or 1 are valid) in to a cell for a special purpose. (in smartview or webform)
    2. I want to restrict the user to enter only single Character (Y or N are valid) in to a cell for a special purpose.(in smartview or webform)
    After submitting the data, If the data does not matches to the given condition it has to through an Error message or validation message to the end user.
    Can we write these kind of rules in HFM?
    Regards
    Smilee

    Hi Smilee,
    HFM's model of validation and error checking is not as you describe. Data cannot be validated at the form/data-entry level. Instead, HFM's validation model goes like this:
    1. You must provide with a validation account for each validation you need, with a common parent usually declared in the validation accounts in the ApplicationSettings. A zero (or within tolerance limits) in the validation account means correct, any other value means error.
    2. You must write a normal calculation rule, which checks the user's input for valid data entry and place a zero or other value to the validation account.
    3. The user inputs her values (via form, or data load, FDM, SmartView etc.), saves her data and calculates.
    4. As soon as all the validation calculations write zeros to the to validation account during calculations, the user can submit successfully (submission is part of process management). However, if any of the validations fail (meaning non zero value to the top validation account) the user cannot submit until she corrects the error value. Errors can be traced easily, judging by the exact validation account which fails.
    Another observation regarding your point 2 is that only numeric values can be written in HFM cells, no alphabetic characters are allowed. You should replace Y/N logic to 0/1.
    Regards,
    Kostas

  • Validator is called many times

    I defined an validator for my inputdate. I use it in a popup window. If I get an error first time it works fine,
    but if I close the popup, reopen it and get an error again my validator is called twice. if I repeat this sequence 10 times,
    my validator is called 10 times and it prints the error 10 times. Since the validator method is called automatically I have no idea how to solve it.
    <af:inputDate binding="#{model.guiEndDate}" label="#{bundle._END_DATE}" value="#{model.endDate}" id="id2" required="true"
    validator="#{model.validateInputDate}"/>
    public void validateInputDate(javax.faces.context.FacesContext facesContext, UIComponent uIComponent,
    Object object) throws Exception {
    Date start = (Date)getGuiStartDate().getValue();
    RichInputDate inputDate = (RichInputDate)uIComponent;
    Date end = (Date)object;
    if (start != null && end != null && start.compareTo(end) >= 0) {
    inputDate.setValid(false);
    throw new Exception("start later than end date");
    } else {
    inputDate.setValid(true);
    Studio Edition Version 11.1.2.0.0

    Hi,
    Call following scripts when you are closing the popups
        function clearMsgForComponent(evt){
            AdfPage.PAGE.clearAllMessages();
            evt.cancel();
    <af:commandButton text="Close">
       <af:clientListener method="clearMsgForComponent" type="click"/>
    </af:commandButton>

  • Iphone with wired Model number

    hello there
    so i bought an iphone 6 from craigslist and yes a checked the ESN
    the problem is at the back cover it says the model number is A1549
    and at the settings>general>about it says the model number is NG502LL/A and that is not listed under any U.S carrier
    Note* the Att model for A1549 is MG502LL/A
    so my question is did i got cloned or the iphone is fine ? if so for what company belong that model?
    please help

    That is a valid model number. See: http://leimobile.com/iphone-6-model-numbers/
    I believe I recently saw another discussion that indicated it was a factory refurbished phone.

  • RE: [iPlanet-JATO] Href click & tiled view display

    Srinivas,
    I hope that I am not oversimplifying your first question; repost if I do not
    answer your question. Independent of JATO, HTML Form button sumbits will
    include the scraping of data off the form input fields; the data will passed
    as part of the body of the HTTP request. Therefore, you would expect to
    receive all your inputs during the Button submit. In the case of a button,
    a HTTP POST request is invoked. Href clicks, only submit the NVPs which are
    encoded on the HREF URL. Therefore, it is impossible (under normal
    circumstances) to retrieve the inputs from the FORM during the Href click.
    In the case of a Href, a HTTP GET request is invoked. Some customers have
    used a pattern in which Javascript is used to capture the Href onClick()
    event to perform some runtime modifications to the HREF URL before the HTTP
    GET request is submitted. I recommend to always have the LogProxy2 utility
    running during development so that the HTTP requests and repsonses can be
    debugged. If you setup the LogProxy2 (downloadable from this Group's Files
    repository) then you would see the HTTP requests in the LogProxy2's console
    window.
    TiledView question: Remember, each TiledView requires a "primary
    DatasetModel" which it uses for iteration of the tiles. It can be
    confusing, but the API call of
    <ContainerView>.getDefaultModel()
    has no relation to the implementation class called DefaultModel. See the
    Javadoc (excerp below)
    /migtoolbox-1.1.1/doc/jato/api/com/iplanet/jato/view/ContainerView.html#getD
    efaultModel()
    "Returns this view's default model. The default model is typically used by
    DisplayField children for default value storage (if they are not bound to
    any other model). This method should always return a valid model instance.
    Note that the default model need not be an actual instance of DefaultModel,
    although this is usually the case."
    Both of your TiledView's (inner and outer) are ContainerViews, each having
    their own property for [get/set]DefaultModel(). Likewise, the ViewBean
    parent of the outer TiledView is a ContainerView as well. With these facts
    in mind, consider the behavior of the ModelManager. The ModelManager will
    ensure that only once instance of specifically named model will be provided
    during a request scope. Therefore, everytime that you make a call to
    <ModelManager>.getModel(SomeModel.class)
    no matter how many times you make this call during a request, the
    ModelManager will ensure that you get the same object reference back.
    Implicitly, you are asking for a Model with the exclusive name of
    <ModelManager>.getDefaultModelInstanceName(SomeModel.class)
    I believe that your problem is that you have the Primary Model of both the
    inner and outer TiledView's set to the same instance of the DefaultModel
    class. Therefore, the TiledViews are tripping over each other because they
    are using the same Primary model. What I would do is change the constructor
    of each TiledView to set an exclusive Primary model
    // add to constructor of outer TileView
    setPrimaryModel(getModelI(DefaultModel.class,"outer")
    // add to constructor of inner TileView
    setPrimaryModel(getModelI(DefaultModel.class,"inner")
    remember to set the "size" of the Primary Model appropriately in the
    beginDisplay() event of each TiledView before calling super.beginDisplay()
    matt
    -----Original Message-----
    From: Srinivas Chikkam [mailto:<a href="/group/SunONE-JATO/post?protectID=061212020185082096169232190043244089032032196034013195172049230091142254099102">srinivas.chikkam@w...</a>]
    Sent: Tuesday, July 17, 2001 7:36 AM
    Subject: [iPlanet-JATO] Href click & tiled view display
    Hi,
    I'm facing the following two problems in JATO. Your help will be
    appreciated.
    1) Clicking a HREF.
    I have a button and a href in a page. When I submit the page by
    clicking the button, I'm able to
    get all the user entered data (form elements) in handler method.
    However, when I click
    the href and I try to retrieve the data entered by the user in my
    corresponding handler method, I'm
    getting blank values.
    How would I be able to get the user entered data upon clicking of a href
    ? I'm copying the sample
    code for your reference.
    // This returns me 5 values entered in the 5 tiles by the user.
    public void handleBButtonRequest(RequestContext req)
    throws ServletException, IOException
    try
    System.out.println("button clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    // This returns me 0 tiles and doesn't get into for loop
    public void handleLinkModifyDistributionRequest(RequestContext req )
    throws ServletException, IOException
    try
    System.out.println("href clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    2) Tiled view display
    I have tiled view inside another tiled view. Based upon the data
    retrieved from the database, lets say, the outer tile needs to be
    displayed twice and the inner tile 3 times and 1 time.
    For Ex: Lets say, the desired output from these tiled views is as
    follows
    STOCK INVESTMENT
    stock name1
    stock name2
    stock name3
    OTHER INVESTMENT
    other investment1
    The outer tiled view displays the investment type headings (STOCK
    INVESTMENT or OTHER INVESTMENT) and inner tile
    displays the actual stock names or the other investment names. Both
    the tile views are bound to a default model. In the begin display
    of these tiled view I'm setting the size of the model as
    getPrimaryModel.setSize(requiredsize).
    If i display 3 records in the inner tiled view in the first iteration
    and i try to display 1 record in the second iteration, it displays 3
    records
    properly the first time but it doesn't display any records second
    time. super.nextTile() returns false right away second time.
    But If I try to display 1 record in the first iteration and 3 records in
    the second iteration as below, it works fine.
    STOCK INVESTMENT
    stock name1
    OTHER INVESTMENT
    other investment1
    other investment2
    other investment3
    Please let me know what could be the problem.
    Thanks
    ~ Srinivas
    The Information contained and transmitted by this E-MAIL is
    proprietary to
    Wipro Limited and is intended for use only by the individual or
    entity to which
    it is addressed, and may contain information that is privileged,
    confidential or
    exempt from disclosure under applicable law. If this is a
    forwarded message,
    the content of this E-MAIL may not have been sent with the
    authority of the
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information
    to the named
    recipient, you are notified that any use, distribution,
    transmission, printing,
    copying or dissemination of this information in any way or in any
    manner is
    strictly prohibited. If you have received this communication in
    error, please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]
    [email protected]

    should read
    // add to constructor of outer TileView
    setPrimaryModel(getModel(DefaultModel.class,"outer");
    // add to constructor of inner TileView
    setPrimaryModel(getModel(DefaultModel.class,"inner");
    matt
    -----Original Message-----
    From: Matthew Stevens [mailto:<a href="/group/SunONE-JATO/post?protectID=029166114165042198028082000056130080177026031196061123241150194211220076086020224">matthew.stevens@e...</a>]
    Sent: Tuesday, July 17, 2001 9:25 AM
    Subject: RE: [iPlanet-JATO] Href click & tiled view display
    Srinivas,
    I hope that I am not oversimplifying your first question; repost
    if I do not
    answer your question. Independent of JATO, HTML Form button sumbits will
    include the scraping of data off the form input fields; the data
    will passed
    as part of the body of the HTTP request. Therefore, you would expect to
    receive all your inputs during the Button submit. In the case of
    a button,
    a HTTP POST request is invoked. Href clicks, only submit the
    NVPs which are
    encoded on the HREF URL. Therefore, it is impossible (under normal
    circumstances) to retrieve the inputs from the FORM during the Href click.
    In the case of a Href, a HTTP GET request is invoked. Some customers have
    used a pattern in which Javascript is used to capture the Href onClick()
    event to perform some runtime modifications to the HREF URL
    before the HTTP
    GET request is submitted. I recommend to always have the
    LogProxy2 utility
    running during development so that the HTTP requests and repsonses can be
    debugged. If you setup the LogProxy2 (downloadable from this
    Group's Files
    repository) then you would see the HTTP requests in the
    LogProxy2's console
    window.
    TiledView question: Remember, each TiledView requires a "primary
    DatasetModel" which it uses for iteration of the tiles. It can be
    confusing, but the API call of
    <ContainerView>.getDefaultModel()
    has no relation to the implementation class called DefaultModel. See the
    Javadoc (excerp below)
    /migtoolbox-1.1.1/doc/jato/api/com/iplanet/jato/view/ContainerView
    .html#getD
    efaultModel()
    "Returns this view's default model. The default model is typically used by
    DisplayField children for default value storage (if they are not bound to
    any other model). This method should always return a valid model instance.
    Note that the default model need not be an actual instance of
    DefaultModel,
    although this is usually the case."
    Both of your TiledView's (inner and outer) are ContainerViews, each having
    their own property for [get/set]DefaultModel(). Likewise, the ViewBean
    parent of the outer TiledView is a ContainerView as well. With
    these facts
    in mind, consider the behavior of the ModelManager. The ModelManager will
    ensure that only once instance of specifically named model will
    be provided
    during a request scope. Therefore, everytime that you make a call to
    <ModelManager>.getModel(SomeModel.class)
    no matter how many times you make this call during a request, the
    ModelManager will ensure that you get the same object reference back.
    Implicitly, you are asking for a Model with the exclusive name of
    <ModelManager>.getDefaultModelInstanceName(SomeModel.class)
    I believe that your problem is that you have the Primary Model of both the
    inner and outer TiledView's set to the same instance of the DefaultModel
    class. Therefore, the TiledViews are tripping over each other
    because they
    are using the same Primary model. What I would do is change the
    constructor
    of each TiledView to set an exclusive Primary model
    // add to constructor of outer TileView
    setPrimaryModel(getModelI(DefaultModel.class,"outer")
    // add to constructor of inner TileView
    setPrimaryModel(getModelI(DefaultModel.class,"inner")
    remember to set the "size" of the Primary Model appropriately in the
    beginDisplay() event of each TiledView before calling super.beginDisplay()
    matt
    -----Original Message-----
    From: Srinivas Chikkam [mailto:<a href="/group/SunONE-JATO/post?protectID=061212020185082096169232190043244089032032196034013195172049230091142254099102">srinivas.chikkam@w...</a>]
    Sent: Tuesday, July 17, 2001 7:36 AM
    Subject: [iPlanet-JATO] Href click & tiled view display
    Hi,
    I'm facing the following two problems in JATO. Your help will be
    appreciated.
    1) Clicking a HREF.
    I have a button and a href in a page. When I submit the page by
    clicking the button, I'm able to
    get all the user entered data (form elements) in handler method.
    However, when I click
    the href and I try to retrieve the data entered by the user in my
    corresponding handler method, I'm
    getting blank values.
    How would I be able to get the user entered data upon clicking of a href
    ? I'm copying the sample
    code for your reference.
    // This returns me 5 values entered in the 5 tiles by the user.
    public void handleBButtonRequest(RequestContext req)
    throws ServletException, IOException
    try
    System.out.println("button clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    // This returns me 0 tiles and doesn't get into for loop
    public void handleLinkModifyDistributionRequest(RequestContext req )
    throws ServletException, IOException
    try
    System.out.println("href clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    2) Tiled view display
    I have tiled view inside another tiled view. Based upon the data
    retrieved from the database, lets say, the outer tile needs to be
    displayed twice and the inner tile 3 times and 1 time.
    For Ex: Lets say, the desired output from these tiled views is as
    follows
    STOCK INVESTMENT
    stock name1
    stock name2
    stock name3
    OTHER INVESTMENT
    other investment1
    The outer tiled view displays the investment type headings (STOCK
    INVESTMENT or OTHER INVESTMENT) and inner tile
    displays the actual stock names or the other investment names. Both
    the tile views are bound to a default model. In the begin display
    of these tiled view I'm setting the size of the model as
    getPrimaryModel.setSize(requiredsize).
    If i display 3 records in the inner tiled view in the first iteration
    and i try to display 1 record in the second iteration, it displays 3
    records
    properly the first time but it doesn't display any records second
    time. super.nextTile() returns false right away second time.
    But If I try to display 1 record in the first iteration and 3 records in
    the second iteration as below, it works fine.
    STOCK INVESTMENT
    stock name1
    OTHER INVESTMENT
    other investment1
    other investment2
    other investment3
    Please let me know what could be the problem.
    Thanks
    ~ Srinivas
    The Information contained and transmitted by this E-MAIL is
    proprietary to
    Wipro Limited and is intended for use only by the individual or
    entity to which
    it is addressed, and may contain information that is privileged,
    confidential or
    exempt from disclosure under applicable law. If this is a
    forwarded message,
    the content of this E-MAIL may not have been sent with the
    authority of the
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information
    to the named
    recipient, you are notified that any use, distribution,
    transmission, printing,
    copying or dissemination of this information in any way or in any
    manner is
    strictly prohibited. If you have received this communication in
    error, please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]
    [email protected]
    [email protected]

  • How to get rid of the Exceptions

    When I tried to open the client i.e User interface which is MainMenuApp received NO_PERMISSION CORBA exception while attempting to get an initial reference to the mvcf_ControllerFactory from the FactoryFinder. Software defect that should be addressed is that the UI did not recover after catching the exception and required a restart of the UI to connect.
    The problem is that cleanWorkspace() in CorbaAdapter doesn't have any failover logic in it at all. The adapter is assumed to be good and if it is not cleanWorkspace() attempts to use a factory that doesn't exist. This throws an uncaught NullPointerException that blows out to MainMenuApp where it is interpreted as a fatal exception and prevents the main menu from starting. So please help me in writing the failover logic in CorbaAdapter
    The code for cleanWorkspace is
    * Cleans up the entire logical positions workspace.
    * @throws AdapterException UserError or Error occured
    public synchronized void cleanWorkspace() throws AdapterException
    cut_ContextInitData cid = getContextInitData();
    cid.clientId = "*";
    MVC2CleanWorkspaceCmd cmd = new MVC2CleanWorkspaceCmd(cid);
    execute(cmd);
    I am giving the whole logic of Corba Adapter. This might help:
    package com.ge.trans.tms.comm;
    import java.util.*;
    import org.omg.CORBA.CompletionStatus;
    import com.beasys.Tobj.FactoryFinder;
    import com.ge.trans.tms.ui.util.ExceptionHandler;
    import com.ge.trans.tms.util.Log;
    import com.ge.trans.tms.util.StringUtils;
    import com.ge.trans.tms.forms.mainmenu.Globals;
    import pds.cut_IDLCommon.cut_ContextInitData;
    import pds.cut_IDLCommon.cut_ValidationResult;
    import pds.cut_IDLContainers.cut_KeyValuePair;
    import pds.cut_IDLContainers.cut_KeyValueSequenceHolder;
    import pds.cut_IDLContainers.cut_StringSeqSeqHolder;
    import pds.cut_IDLContainers.cut_StringSequenceHolder;
    import pds.cut_IDLExceptions.cut_Error;
    import pds.cut_IDLExceptions.cut_InternalError;
    import pds.cut_IDLExceptions.cut_UserError;
    import pds.cut_IDLExceptions.cut_ModelNotFoundError;
    import pds.cut_IDLExceptions.cut_DBDeadlockError;
    import pds.mvct.mvct_ParentTableInfo;
    import com.ge.trans.tms.util.BM;
    import pds.mvcs_ControllerFactory;
    import pds.mvcs_ControllerFactoryHelper;
    import pds.mvcs_ControllerProxy;
    * Title: CorbaAdapter Description: This class provides a generic, 100% java
    * interface for its clients (UI for example) to create, query, and modify
    * remote data models. The methods in this class foward client requests through
    * calls on generated Java/Corba client stubs with disregard to the server-side
    * controller/model objects location or language implementation. This is
    * currently the only portal for the clients to communicate with the
    * server-side model/controller framework. Therefore, this class should mirror
    * the complete model/controller interface as provide in the mvcs_Controller
    * idl. This class provides constructors that hide all Corba initialization and
    * messaging implementation from its clients.
    public class CorbaAdapter extends AbstractAdapter
    protected String factoryDomainSuffix = "MVC";
    private mvcs_ControllerFactory factory;
    private mvcs_ControllerProxy controller;
    public synchronized mvcs_ControllerProxy getController()
    return controller;
    protected String getFactoryDomainSuffix() {
    return _factoryDomainSuffix;
    * Constructor Initializes the connection and generic factory finder. This
    * constructor should be used when the cleint does not want to immediately
    * create a new handle (controller) to a new or existing model. <p>
    * Preconditions: none
    * @param domain
    * @param listener <p>
    * Postconditions: If domain is null, then
    * AdapterConstants.DEFAULT_DOMAIN will be used as the domain name. If
    * listener is null, neither the caller or any other client will
    * receive error messages
    public CorbaAdapter(
    String domain,
    MessageListener listener,
    ConnectionListener connectionListener,
    boolean uniqueConnection ) throws AdapterException
    this(domain, listener, connectionListener, uniqueConnection, true);
    public CorbaAdapter(
    String domain,
    MessageListener listener,
    ConnectionListener connectionListener,
    boolean uniqueConnection,
    boolean geoAdapter ) throws AdapterException
    super( listener );
    setDomain( domain );
    _geoPartitioned = geoAdapter;
    //flag to stop retrying after failure to find factory
    this.uniqueConnection = uniqueConnection;
    String param = System.getProperty(AdapterConstants.POOLED_CONNECTION);
    if((param != null) && (param.equals("true"))) {
    this.pooledConnection = true;
    initialize();
    protected Connection makeConnection() throws Exception
    Connection connection = null;
    if( !pooledConnection )
    connection = (CorbaConnection)ConnectionFactory.getDefaultConnection(
    new ConnectionListener[] { this, additionalConnectionListener } );
    else
    String tempDomain = "";
    if(domain.equals("LOGICAL_POSITION")) {
    tempDomain = "MVC_LOGICAL_POSITION";
    } else {
    tempDomain = domain;
    connection = (CorbaConnection)
    PooledConnectionFactory.instance().getPooledConnection(tempDomain);
    if(connection != null) {
    connection.addConnectionListeners(
    new ConnectionListener[] { this, additionalConnectionListener } );
    return connection;
    * clients should never call this method as this is a the destructor for
    * this class and should only be called by the system before the garbage
    * collector sweeps away this object NOTE: there is no guarantee when the
    * system will call this method, so if a resource is in short supply,
    * manage that resource another way
    protected void finalize()
    if(Log.isEnterEnabled())Log.enter( CorbaAdapter.class, "Entering finalize..." );
    // cannot enusre all clients call cleanup fromt their code
    // so do this is defensive programming
    cleanup();
    if(Log.isLeaveEnabled())Log.leave( CorbaAdapter.class, "Leaving finalize..." );
    /** This should only be called when the adapter knows that it's
    * current connection has been repaired and the adapater's current
    * workspace (remote stub) needs to be initialized using the new connection
    * (IOR for new server).
    * This method should only be called from another which has a lock on the
    * current connection. Currently this method is only called from
    * verifyConnectionStatus().
    private boolean convertController()
    if ( controller == null ) {
    Log.error(CorbaAdapter.class, "convertController()",
    "CONVERT_CONTROLLER CALLED WITH CONTROLLER == NULL",
    new Exception("Fix Me"));
    MVC2ConvertControllerCmd cmd = new MVC2ConvertControllerCmd();
    execute(cmd);
    return (((String) cmd.getReturnValue()).equals(AdapterConstants.SUCCESS));
    * Initializes an existing adapter to a new controller/model.
    * @return AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String setController()
    AbstractCmd cmd = new MVC2SetControllerCmd();
    execute(cmd);
    Log.debug (getClass (), "returning from set controller :"+(String) cmd.getReturnValue());
    return ((String) cmd.getReturnValue());
    * Initializes an existing adapter to a new controller/existing model using
    * the current domain name and user data <p>
    * Preconditions:
    * @param domainName must represent a valid domain name
    * @param businessKey must represent a valid business key of an existing
    * model in the database. <p>
    * Postconditions: If the adapter has a initailized controller it is
    * uninitialized notifies registered MessageListener if businessKey
    * does not represent a valid model that already exists in the
    * database. notifies registered UIIFatalMessageListener of all fatal
    * server errors
    * @return Description of the Return Value
    * @returns AdapterConstants.SUCCESS or AdapterConstants.ERROR
    public synchronized String setController(Map businessKey)
    AbstractCmd cmd = new MVC2SetControllerCmd(businessKey);
    execute(cmd);
    Log.debug (getClass (), "returning from set controller bus key:"+(String) cmd.getReturnValue());
    return ((String) cmd.getReturnValue());
    private boolean clientInitialized()
    return clientInitialized( true );
    private boolean clientInitialized( boolean remoteStub )
    forceConnectionChange = false;
    if(getController()==null)
    Log.info(CorbaAdapter.class,
    "clientInitialized()",
    "(getController()==null):'"+(getController()==null)+"'");
    // obtain lock on used by this adapter and its' connection
    // before checking any values that could be changed by a shared
    // connection in another thread
    synchronized( this.adapterConnectionMonitor )
    if( !this.connectionRepaired && !this.connectionBroken )
    if( !healthyConnection )
    Log.debug(CorbaAdapter.class,
    "clientInitialized()",
    "connectionRepaired:'"+connectionRepaired+"' "+
    "connectionBroken:'"+connectionBroken+"' "+
    "healthyConnection:'"+healthyConnection+"' "+
    "calling fireFatalErrorHandler with 'AdapterConstants.NULL_CONNECTION'");
    fireFatalErrorHandler( AdapterConstants.NULL_CONNECTION );
    return false;
    else if( !healthyRemoteFactory )
    Log.debug(CorbaAdapter.class,
    "clientInitialized()",
    "connectionRepaired:'"+connectionRepaired+"' "+
    "connectionBroken:'"+connectionBroken+"' "+
    "healthyRemoteFactory:'"+healthyRemoteFactory+"' "+
    "calling fireFatalErrorHandler with 'AdapterConstants.NULL_REMOTE_FACTORY'");
    fireFatalErrorHandler( AdapterConstants.NULL_REMOTE_FACTORY );
    return false;
    else if( remoteStub && !healthyRemoteStub )
    Log.debug(CorbaAdapter.class,
    "clientInitialized()",
    "connectionRepaired:'"+connectionRepaired+"' "+
    "connectionBroken:'"+connectionBroken+"' "+
    "remoteStub:'"+remoteStub+"' "+
    "healthyRemoteStub:'"+healthyRemoteStub+"' "+
    "calling fireFatalErrorHandler with 'AdapterConstants.NULL_REMOTE_STUB'");
    fireFatalErrorHandler( AdapterConstants.NULL_REMOTE_STUB );
    return false;
    return true;
    } // release lock on used by this adapter and its' connection
    * This method should be called when the client has finished working with
    * the controller. <p>
    * Preconditions: controller (domain specific remote stub) must be
    * initialized. <p>
    * Postconditions: Cleans up any session state and removes the client's
    * workspace from existence. After this method is called, the client will
    * no longer be able to make calls on the controller without obtaining
    * another controller reference and re-initializing. Any changes made by
    * the client since calling commitChanges() are lost (i.e., the client is
    * responsible for calling commitChanges() before exiting).
    * @return AdapterConstants.SUCCESS or AdapterConstants.ERROR
    public synchronized String exit()
    AbstractCmd cmd = new MVC2ExitCmd();
    execute(cmd);
    String returnValue = (String) cmd.getReturnValue();
    if(returnValue.equals(AdapterConstants.SUCCESS))
    controller = null;
    healthyRemoteStub = false;
    return returnValue;
    * Reports whether adapters controller is currently initialized
    * @return The active value
    public synchronized boolean isActive()
    // obtain lock used by this adapter so that another method can NOT be
    // called on this adapter instance from another thread at the same
    // time
    synchronized( this.adapterConnectionMonitor )
    return ( controller != null );
    * Preconditions: the controller is initialized Postconditions: Returns the
    * domain name from the model we are controlling. <p>
    * notifies registered UIIFatalMessageListener of all fatal server errors
    * @return The domainName value or AdapterConstants.ERROR
    public synchronized String getDomainName() // throws cut_InternalError
    AbstractCmd cmd = new MVC2GetDomainNameCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller is initialized Postconditions: Returns a
    * "user context," set by the user of this controller and otherwise not
    * used by the mvc2 framework. Context is data only kept in the controller
    * (if at all) and not the model. <p>
    * notifies registered UIIFatalMessageListener of all fatal server errors
    * @return The context value or AdapterConstants.ERROR
    public synchronized String getContext() // throws cut_InternalError
    AbstractCmd cmd = new MVC2GetContextCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller is initialized
    * @param value saved as a "user context," set by the user of this
    * controller and used by domain or customer derived controllers. <p>
    * notifies registered UIIFatalMessageListener of all fatal server
    * errors
    * @return AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String setContext( String value )
    AbstractCmd cmd = new MVC2SetContextCmd(value);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Sets a key on the server.
    * @param property key to set
    * @param value value
    * @return String retruned by service provider or Adapter.ERROR
    public synchronized String setValue( String key, String value )
    AbstractCmd cmd = new MVC2SetValueCmd(key, value);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized
    * @param property is a valid property of the model <p>
    * Postconditions: notifies registered UIMessageListeners if property
    * is not valid notifies registered UIIFatalMessageListener(s) of any
    * fatal server errors
    * @return The value value
    * @returns the current value of the specified property or
    * AdapterConstants.ERROR
    public synchronized String getValue( String property ) // throws cut_InternalError
    AbstractCmd cmd = new MVC2GetValueCmd(property);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized and propertyValueMap
    * is not null All properties given is propertyValueMap are valid
    * properties of the model.
    * Postconditions: All values for the properties in the map are added to
    * the map.
    * @param propertyValueMap each KeyValuePair element will have its value
    * set based on its key notifies registered UIMessageListeners if any
    * property given in the map is not a valid property of the model. If
    * this happens, the map is unchanged. notifies registered
    * UIIFatalMessageListener(s) of any fatal server errors
    * @return The values value
    * @returns AdapterConstants.SUCCESS or
    * AdapterConstants.ERROR
    public synchronized String getValues( Map propertyValueMap )
    AbstractCmd cmd = new MVC2GetValuesCmd(propertyValueMap);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: controller has been initialized and propertyValueMap is
    * not null <p>
    * Postconditions: All properties and their associated values are added to
    * the propertyValueMap. Prior contents of the map are NOT erased.
    * @param propertyValueMap will be cleared then filled with KeyValuePair
    * object references notifies registered UIIFatalMessageListener(s) of
    * any fatal server errors <p>
    * @return The allValues value
    * @returns AdapterConstants.SUCCESS or
    * AdapterConstants.ERROR NOTE: The actual definition of what "all
    * values" mean is left to the designers of the UI and the Controller
    * but should reflect what is in the models' metamodel
    public synchronized String getAllValues( Map propertyValueMap )
    AbstractCmd cmd = new MVC2GetAllValuesCmd(propertyValueMap);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Invoke a method on controller.
    * @param method Method to invoke on controller
    * @param values input/output values sent and returned from controller
    * @return String from service on success or AdapterConstrants.ERROR
    public synchronized String invokeMethod( String method, List values )
    AbstractCmd cmd = new MVC2InvokeMethodCmd(method, values);
    execute(cmd);
    return (String) cmd.getReturnValue();
    * Preconditions: the controller has been initialized Postconditions:
    * Validates the state of the model for committing, copies the transient
    * model to the persistent model, and commits it to the database. <p>
    * reports a user error(s) to registered MessageListener s if the state of
    * the model is not a valid one for commiting. reports all fatal server
    * errors to registered UIIFatalMessageListener s <p>
    * @return Description of the Return Value
    * @returns AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String commitChanges()
    AbstractCmd cmd = new MVC2CommitChangesCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized. Postconditions:
    * Aborts all changes to the model since commitChanges() was last called.
    * <p>
    * reports all fatal server errors to registered UIIFatalMessageListener s
    * <p>
    * @return Description of the Return Value
    * @returns AdapterConstants.ERROR or AdapterConstants.SUCCESS
    public synchronized String abortChanges()
    AbstractCmd cmd = new MVC2AbortChangesCmd();
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized and columnName is not
    * null
    * @param tableName must be a valid table of the model.
    * @param columnName is a valid column in the table of the model.
    * @param rowNum is a valid row in the table of the model.
    * @param parents used if the table is a subtable of another table, its
    * parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty. <p>
    * Postconditions: <p>
    * asserts columnName or rowNum have valid values for the table asserts
    * the information in parents is valid and complete; reports to
    * registered MessageListener s if the table is not a table of the
    * model
    * @return The tableValue value
    * @todo talk to Kelly because an invalid table name should
    * not be a user error but a programming error reports all fatal server
    * errors to registered UIIFatalMessageListener s <p>
    * @returns the value of the table element located in the
    * specified column at the specified row or AdapterConstants.ERROR
    public synchronized String getTableValue(
    String tableName,
    String columnName,
    int rowNum,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2GetTableValueCmd(tableName, columnName, rowNum, parents);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * @param tableId The new tableValue value
    * @param columnName The new tableValue value
    * @param row The new tableValue value
    * @param value The new tableValue value
    * @return Description of the Return Value
    * @see setTableValue(String tableName, String columnName,
    * int rowNum, String value, ParentTableInfo[] parents) for method
    * contract
    public synchronized String setTableValue(
    String tableId,
    String columnName,
    int row,
    String value )
    return setTableValue( tableId, columnName, row, value,
    ( ( ParentTableInfo[] ) null ) );
    * Preconditions: asserts the controller has been initialized and
    * columnName is not null
    * @param tableName must be a valid table of the model.
    * @param columnName is a valid column in the table of the model.
    * @param rowNum is a valid row in the table of the model.
    * @param value is a valid value of the tables column and row (cell)
    * @param parents used if the table is a subtable of another table, its
    * parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty. <p>
    * Postconditions: Sets the value of the table cell located in the
    * specified column at the specified rowNum to the new value. <p>
    * asserts both the columnName or rowNum have valid values for the
    * table asserts the information in parents is valid and complete
    * reports to registered MessageListener s if the table is not a table
    * of the model and if the value is not a valid value for the cell of
    * the table reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return Description of the Return Value
    * @returns the value that the table cell is set to or
    * AdapterConstants.ERROR
    public synchronized String setTableValue(
    String tableName,
    String columnName,
    int rowNum,
    String value,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2SetTableValueCmd(tableName, columnName,
    rowNum, value, parents);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * Preconditions: the controller has been initialized and tableName is not
    * null
    * @param tableName must be a valid table of the model.
    * @param parents used if the table is a subtable of another table, its
    * parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty. <p>
    * Postconditions: <p>
    * asserts the information in parents argument is valid and complete.
    * reports to registered MessageListener s if table is not a valid
    * table reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return The numberOfRows value
    * @returns the number of rows in the table if successful, else -1
    public synchronized int getNumberOfRows(
    String tableName,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2GetNumberOfRowsCmd(tableName, parents);
    execute(cmd);
    Object returnValue = cmd.getReturnValue();
    if(returnValue.equals(AdapterConstants.ERROR))
    return -1;
    return ((Integer) cmd.getReturnValue()).intValue();
    * Preconditions: the controller has been initialized and tableName is not
    * null
    * @param tableName must be a valid table of the model.
    * @param parents used if the table is a subtable of another table,
    * its parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty.
    * @param rowPosition represents the (zero-based) position where you want
    * the new row <p>
    * Postconditions: Adds one row to the table at the specified position.
    * <p>
    * asserts that the rowPosition is within range to add to the table
    * asserts that the information in parents is valid and complete.
    * reports to registered MessageListener s if table is not a valid
    * table and if it is not valid to add the row to the specified
    * position reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return Description of the Return Value
    * @returns the new row number of the inserted row if
    * successful, else -1
    public synchronized int addRow(
    String tableName,
    int rowPosition,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2AddRowCmd(tableName, rowPosition, parents);
    execute(cmd);
    return ((Integer) cmd.getReturnValue()).intValue();
    * Preconditions: the controller has been initialized, tableName is not
    * null, and rowsToDelete is not null or empty
    * @param tableName must be a valid table of the model.
    * @param parents used if the table is a subtable of another table,
    * its parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty.
    * @param rowsToDelete all rows specified in this container must exist in
    * the table 'tableName' <p>
    * Postconditions: Deletes all rows specified in rowsToDelete from the
    * table. <p>
    * asserts all row indexes in rowsToDelete are valid asserts the
    * information in parents argument is valid and complete reports to
    * registered MessageListener s if the 'tableName' is not a valid table
    * of the model and if it is not valid to delete the rows at the
    * specified positions reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return Description of the Return Value
    * @returns AdapterConstants.SUCCESS or AdapterConstants.ERROR
    public synchronized String deleteRows(
    String tableName,
    int[] rowsToDelete,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2DeleteRowsCmd(tableName, rowsToDelete, parents);
    execute(cmd);
    return ((String) cmd.getReturnValue());
    * This method retrieves all values for a specified row. The value in each
    * column is retrieved and stored in the row container. The row container
    * is column ordered. Prior contents in the row container are lost as the
    * container is initialized within this method. <p>
    * Preconditions: the controller has been initialized and the container
    * 'row' is not null
    * @param tableName must be a valid table of the model.
    * @param rowPosition represents a valid row in the table.
    * @param parents used if the table is a subtable of another table,
    * its parent table(s) info must be specified and must be valid. If the
    * table is not a subtable, then parents should be empty.
    * @param row container which will be filled with the specified
    * table rows values <p>
    * Postconditions: asserts that rowPosition is valid (i.e not out of
    * range) asserts the information in parents argument is valid and
    * complete asserts that the container row is a valid as an
    * input/output parameter (i.e. not null) reports to registered
    * MessageListener s if tableName is not a valid table of the model
    * reports all fatal server errors to registered
    * UIIFatalMessageListener s
    * @return The row value
    * @returns AdapterConstants.SUCCESS or AdapterConstants.ERROR
    * <p>
    * NOTE: All columns and all rows have zero-based indices.
    public synchronized String getRow(
    String tableName,
    int rowPosition,
    List row,
    ParentTableInfo[] parents )
    AbstractCmd cmd = new MVC2GetRowCmd(tableName, rowPosition, row, paren

    Please can u answer it fast

  • [SOLVED] Asus 900 : ALSA plays sound, but microphone doesn't work

    Hi,
    This week I installed Arch Linux (kernel 3.1.8-1-ARCH) on my Asus 900 with HDA Intel Realtek ALC662 rev1 sound card. The wiki and google and existing forum posts have been good for most issues, but I'm stumped on ALSA configuration. So here's my first forum post for advice.
    I configured sound OK following advice in the wiki and twiddling settings with alsamixer, through both the internal speaker and through the headphones, but I can't get internal or external microphone to work. I'm testing with:
    arecord -d 3 junk.wav
    then when I play back via:
    aplay junk.wav
    there is only soft static (with audible soft clicks at the start and end).
    (Other files like /usr/share/sounds/alsa/Front_Center.wav play fine.)
    alsamixer recognizes and reports my HDA Intel card, Realtek ALC662 rev1.
    https://wiki.archlinux.org/index.php/Alsa has several suggestions of options for the snd-hda-intel module.
    Different pages suggest different places, which was confusing until I discovered that they can go in any file in /etc/modprobe.d so I'm putting them in /etc/modprobe.d/snd-hda-intel.conf .
    I added
    options snd-hda-intel enable_msi=1
    with no luck.
    I have tried various model=XXX parameters (based on many suggestions found googling for Asus 900, alsa, ALC662, etc problems):
    options snd-hda-intel model=auto
    options snd-hda-intel model=asus
    options snd-hda-intel model=asus-laptop
    options snd-hda-intel model=laptop
    options snd-hda-intel model=ref
    options snd-hda-intel model=asus-mode1
    options snd-hda-intel model=asus-mode2
    options snd-hda-intel model=asus-mode8
    and I do
    rmomd snd-hda-intel && modprobe snd-hda-intel
    after each modification, which makes a little click in the speakers as the module is restarted.
    I don't know what the differences between asus-mode1, asus-mode2 etc are supposed to be - I've failed to find clear documentation about them, but AFAIK they seem to be the only valid model choices, unlike stuff like laptop, asus, etc.
    I find asus-mod1 etc at https://github.com/torvalds/linux/blob/ … _realtek.c and various other webpages.
    I found they vary the items presented by alsamixer but none of the 8 asus-modeN values helped me get the mic working. (The only obvious change was asus-mode8 made my headphone stop working, unlike asus-mod1 through asus-mod7.)
    I looked at /var/log/kernel.log when doing the snd-hda-intel module reload for various values of model= and they all look similar to this:
    snd_hda_intel 0000:00:1b.0: PCI INT A disabled
    snd_hda_intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
    snd_hda_intel 0000:00:1b.0: irq 43 for MSI/MSI-X
    snd_hda_intel 0000:00:1b.0: setting latency timer to 64
    hda_code: ALC662 rev1: BIOS auto-probing
    input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input24
    input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input25
    input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input26
    (Note the emphasized line about BIOS auto-probing only comes up when not using model= or when trying various suggested model values that don't seem to be actually defined for ALC662, e.g. stuff like model=asus, etc.)
    Here's a list of alsamixer settings I used for various models. (Note I also tried muting and raising various higher boost levels, and when there's an Internal Mic or F-Mic item I tried various combinations. The following are just what seem the most plausible settings to me.)
    model=asus
    model=asus-auto
    model=auto
    alsamixer presents 14 items (boosts are paired) :
    Master 100 (dB gain: 0.00)
    Headphone 00
    Speaker 100 (dB gain: 0.00, 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    Mic Boost 22 (dB gain: 10.00, 10.00)
    Mic Boost 22 (dB gain: 10.00, 10.00)
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Auto-Mute Mode Enabled
    Digital 25 (dB gain: 0.50, 0.50)
    Internal Mic 56 (dB gain: 0.00, 0.00)
    Internal Mic Boost 22 (dB gain: 10.00, 10.00)
    Internal Mic Boost 22 (dB gain: 10.00, 10.00)
    model=asus-mode1
    alsamixer [All] presents 8 items:
    Master 100 (dB gain: 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    S/PDIF mute
    S/PDIF Default PCM 00
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Digital 25 (dB gain: 0.50, 0.50)
    speaker & headphones work, neither mic works
    model=asus-mode2
    alsamixer [All] presents 11 items:
    Master 100 (dB gain: 0.00)
    Headphone 00
    Speaker 100 (dB gain: 0.00, 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    S/PDIF mute
    S/PDIF Default PCM 00
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Digital 25 (dB gain: 0.50, 0.50)
    F-Mic 56 (dB gain: 0.00, 0.00)
    model=asus-mode3
    alsamixer [All] presents 9 items:
    Master 100 (dB gain: 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    S/PDIF mute
    S/PDIF Default PCM 00
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Digital 25 (dB gain: 0.50, 0.50)
    F-Mic 56 (dB gain: 0.00, 0.00)
    model=asus-mode4
    alsamixer presents 9 items
    Master 100 (dB gain: 0.00, 0.00)
    Headphone 100 (dB gain: 0.00, 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    S/PDIF mute
    S/PDIF Default PCM 00
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Digital 25 (dB gain: 0.50, 0.50)
    model=asus-mode5
    alsamixer presents same 9 items as asus-mode4
    model=asus-mode6
    alsamixer [All] presents 9 items same as asus-mode3
    model=asus-mode7
    alsamixer [All] presents 12 items:
    Master 100 (dB gain: 0.00, 0.00)
    Headphone1 00
    Headphone2 00
    Speaker 100 (dB gain: 0.00, 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    S/PDIF mute
    S/PDIF Default PCM 00
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Digital 25 (dB gain: 0.50, 0.50)
    IntMic 56 (dB gain: 0.50, 0.50)
    model=asus-mode8
    alsamixer [All] presents 11 items:
    Master 100 (dB gain: 0.00, 0.00)
    Headphone1 00
    Headphone2 00
    Speaker 100 (dB gain: 0.00, 0.00)
    PCM 100 (dB gain: 0.00, 0.00)
    Mic 56 (dB gain: 0.00, 0.00)
    S/PDIF mute
    S/PDIF Default PCM 00
    Beep MM
    Capture 14 (dB gain: 0.00, 0.00)
    Digital 25 (dB gain: 0.50, 0.50)
    No headphone output for asus-mode8!?
    I'm not interested in doing anything fancy (e.g. mixing multiple sources or whatever), I just want basic mic functionality.
    Finally here's some info requested from the archlinux.org/index.php/Alsa:
    $ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    $ lsmod|grep snd
    snd_hda_intel 19325 0
    snd_hda_codec_realtek 211044 1
    snd_hda_codec 69829 2 snd_hda_intel,snd_hda_codec_realtek
    snd_hwdep 4942 1 snd_hda_codec
    snd_pcm 60207 2 snd_hda_intel,snd_hda_codec
    snd_timer 15438 1 snd_pcm
    snd 43817 6 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
    soundcore 5018 1 snd
    snd_page_alloc 5869 2 snd_hda_intel,snd_pcm
    $ ls -l /dev/snd
    total 0
    drwxr-xr-x 2 root root 60 Jan 11 20:43 by-path
    crw-rw---T 1 root audio 116, 5 Jan 11 20:43 controlC0
    crw-rw---T 1 root audio 116, 4 Jan 11 20:43 hwC0D0
    crw-rw---T 1 root audio 116, 3 Jan 11 21:01 pcmC0D0c
    crw-rw---T 1 root audio 116, 2 Jan 11 21:01 pcmC0D0p
    crw-rw---T 1 root audio 116, 1 Jan 11 15:23 seq
    crw-rw---T 1 root audio 116, 33 Jan 11 15:23 timer
    Has anyone got sound recording working on an Asus 900 with HDA Intel Realtek ALC662 rev1 ...?
    Thanks for any help! (And for feedback whether this post gave too much info or not enough, or other suggestions for posting such requests. Sorry if this was too long, but it seemed better to err on the side of too much info...)
    Last edited by goulo (2012-01-13 18:30:13)

    Hello,
    I don't have your soundcard but maybe the following information is helpful, though:
    Install the linux-docs package, then you have some information about your soundcard drivers in "/usr/src/linux-*/Documentation/sound/alsa/". Exspecially "HD-Audio.txt" and "HD-Audio-Models.txt" might be important. In the Models file it is stated that just the "asus-mode*" are legitimate model parameters for your soundcard and in the HD-Autio.txt file it is more or less said that trial and error the modules is the way to go to find the "correct module". Further there is a section
    Capture Problems
    ~~~~~~~~~~~~~~~~
    The capture problems are often because of missing setups of mixers.
    Thus, before submitting a bug report, make sure that you set up the
    mixer correctly.  For example, both "Capture Volume" and "Capture
    Switch" have to be set properly in addition to the right "Capture
    Source" or "Input Source" selection.  Some devices have "Mic Boost"
    volume or switch.
    When the PCM device is opened via "default" PCM (without pulse-audio
    plugin), you'll likely have "Digital Capture Volume" control as well.
    This is provided for the extra gain/attenuation of the signal in
    software, especially for the inputs without the hardware volume
    control such as digital microphones.  Unless really needed, this
    should be set to exactly 50%, corresponding to 0dB -- neither extra
    gain nor attenuation.  When you use "hw" PCM, i.e., a raw access PCM,
    this control will have no influence, though.
    It's known that some codecs / devices have fairly bad analog circuits,
    and the recorded sound contains a certain DC-offset.  This is no bug
    of the driver.
    So check your mixer,  here and here are nice tutorials.
    Greetings
    matse
    Last edited by matse (2012-01-12 16:30:09)

  • XML file not readable

    Hi all,
    we have a xml file found in the internet delivering actual currency rates (http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml). After downloading this file I tried to create a Data Server. But when testing the Data Server the following error is raised:
    java.sql.SQLException: ODI-40750: The model generated by the model mapper was not accepted by a validator: Model not accepted: ODI-40817: Namespace not found:
    I used the JDBC Url: jdbc:snps:xml?f=c:\temp\eurofxref-daily.xml. Is this sufficient?
    Other xml files work well but this one creates problems.
    any ideas?
    best regards
    Thomas

    Try This URL
    jdbc:snps:xml?f=D:\oracle\product\11.1.1\Oracle_ODI_1\demo\xml\GEO_DIM.xml&re=GEOGRAPHY_DIM&ro=false&case_sens=true
    Just change the parameters and test it.
    Bhabani
    http://dwteam.in

  • How can I stop a task sequence if a custom HTA preflight check fails?

    In our currently deployment method, we launch an HTA program before initiating the OSD process. This is only when run from the RAP menu, not via PXE.  When a user initiates OSD through that menu, they get a message prompting them to close Outlook, and
    a countdown of 5 mins, then OSD starts.  They also have the ability to click on an 'OK' button to proceed on their own.
    I've created a new script which checks WMI if Outlook and/or OCS are open, and if the machine is running on battery, spit out a "Failed" response and stop the HTA.  I've also added a "recheck" button to re-do the check, and an 'OK
    button if people jsut want to continue.  
    I'm curious if there is a way to prevent the task sequence from continuing if any of those conditions arent met.  Currently it just pops up and says "Failed, Cannot conitue", but if they close the window, the task sequence thinks the program
    has run, and the OSD migration starts.  I'd like to be able and get the script to cancel the OSD process if a check fails.
    Has anyone had success with this, using WINXP? I'd use the MS pre-flight check but it's only for WIN7.

    Interesting. Thanks for the response.  Is there anybody out there that can assist with VBS part of the solution?
    Here's the code I'm working with.  Currently the battery piece isnt working as it should but I can figure that our, eventually.  I'd like to get Jason's proposed solution in the code.  If this isn't the right place, I'll take this somewhere
    else.
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>OSD Preflight checks</title>
    <HTA:APPLICATION
    APPLICATIONNAME="OSD Preflight checks"
    ID="objOSDPreReqChecks"
    SCROLL="no"
    CONTEXTMENU="no"
    SINGLEINSTANCE="no"
    MAXIMIZEBUTTON="no"
    MINIMIZEBUTTON="no"
    WINDOWSTATE="normal"/>
    <!-- #region STYLEs-->
    <style type="text/css">
    H1{color:Black;text-align:center;font-family: Arial, Helvetica, sans-serif;font-size: 26px;}
    p{font-family:"Arial";font-size:10px;}
    fail{color:Red;text-align:center;}
    .Version {float:left; font-size:1.0em;font-style:italic;color:#888888;font-weight:bold;}
    .Header1 {width: 180px; text-align: right;font-weight:bold;}<!-- '1st column heading -->
    H2 {font-family: Arial, Helvetica, sans-serif; text-align: center;}
    H3 {font-style: italic;}
    .style2 {width: 180px; text-align: left;}
    .Header2 {width: 150px; text-align: right;font-weight:bold;}<!-- '2nd column heading -->
    .style4 {width: 410px; text-align: left;}
    .StatusBar
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    .hidden {display: none; visibility: hidden;}
    </style><!-- #endregion -->
    </head>
    <script language="VBScript" type="text/vbscript">
    '======================================================================================
    ' Script
    ' Version
    ' Purpose To check a machine is suitable for taking an OS deployment
    '======================================================================================
    'Features
    ' Modular design
    ' Verbose "Debug Mode"
    ' In-built data validation
    ' Custom error handling
    ' Custom error codes - 90x0
    ' Generic WMI handler
    'BUGfix: Change CLng to CDbl to avoid overflow (in GetRAM)
    'fixed - moved head section to top to become head > script > body
    'fixed - fCheckModel display with leading ,
    'fixed - fgetmodels dictionary list
    Option Explicit
    ' #region GLOBAL DECLARATIONS: Persistent fold region
    '======================================================================================
    'GLOBAL Vars
    'Things to just display (in GUI)
    Dim strRAM
    Dim strCPUInfo
    Dim strCPUName
    Dim strCPUDesc
    Dim iCPUCount
    Dim iCPUCoreCount
    Dim iRAM
    Dim strBIOSver, strBIOSDate, strBIOSInfo
    'Time related
    Dim TimerInterval 'timer to refresh HTA at start
    Dim iTimer 'abort timer
    Const iAbortTimeout=300000 'delay before window closes (in milliseconds)
    Dim pbTimerID
    Dim pbHTML
    Dim pbWaitTime
    Dim pbHeight
    Dim pbWidth
    Dim pbBorder
    Dim pbUnloadedColor
    Dim pbLoadedColor
    Dim pbStartTime
    'Dictionary
    Dim objModelsDict,colKeys,strKey 'models
    Dim objApprovedMakesDict
    'Misc GLOBAL vars
    Dim blnDebug 'set TRUE to trigger debug mode
    Dim bAbortBuild 'Boolean flag to abort or not abort
    Dim strTemp 'throwaway/scratch
    Dim strNamespace 'wmi default namespace for ANY machine
    Dim strComputer 'wmi reference to current machine, just .
    Dim strService 'WMI service
    Dim strQuery 'custom WQL
    Dim ErrMsg 'custom error messages
    Dim iErrMode 'State machine for error mode
    Dim lFlags 'WMI flag
    Dim strDisks
    'Pre-requisites - things that will cause build to abort if values do not meet spec
    Dim strHTAVendor 'Make of hardware
    Dim strHTAVendorState
    Dim strHTAModel 'Model of hardware
    Dim strHTAModelState 'Model state
    Dim strHTARAM 'RAM
    Dim strHTARAMState 'RAM state
    Dim strHTACPUSpeed 'Processor speed
    Dim strHTACPUCores 'Number of cores
    Dim strHTACPUFullInfo 'CPU + cores
    Dim strHTAHDD 'Disk info
    Dim strHTAHDDState 'Disk state
    Dim strHTACheckRAW 'NTFS check
    Dim strHTAArchitecture 'Processor support
    Dim strHTAProduct 'Product ID
    Dim strHTAOutlook 'Outlook running
    Dim strHTAOutlookState 'Outlook state
    Dim strHTABattery 'Battery check
    Dim strHTABatteryState 'Battery state
    'for WQL filters
    Dim strWQLPCInfo 'Pre-req - (1) for various inc. domain role (servers)
    Dim strWQLRAM 'Pre-req - (2) RAM
    Dim strWQLCPU 'Pre-req - CPU speed string (not int)
    Dim strWQLBootOrder 'Pre-req - Boot order string
    Dim strWQLSATAMode 'Pre-req - HDD mode
    Dim strWQLGenericBIOS
    Dim strWQLCPUCount 'Pre-req - how many CPUs
    Dim strWQLCPUInfo
    Dim strWQLFSType 'Pre-req - Check HDD not RAW (i.e. is NTFS)
    Dim strWQLDisks 'Disks
    Dim strWQLChassis 'Machine type
    Dim strWQLID 'Unique code from OEM
    Dim strWQLProc 'is Outlook running = False
    Dim strWQLBattery 'is on Battery = False
    'State
    Const cProblem = " Problem!"
    Const cRunAgain =" RunCheck: Run System Check Again"
    Const cSuccess = " Success!"
    Const cPassed=" Pass"
    Const cFail=" Fail"
    'Pre-requisite to check: SET VALUES HERE vvvvvvvvvvvvvvvv
    Const cApprovedOEM="Hewlett-Packard"
    Const LegacyOEM1="Dell Inc."
    Const LegacyOEM2="IBM"
    Const cMinimumMemoryMB = 1000 'RAM in MB
    'Const cMinimumMemoryMB = 1000000 'force fail test data RAM in MB
    Const cMinFS="NTFS"
    ' Const cMinFS="HPFS" 'force fail test data
    Const iMinCores=1
    'Const iMinCores=10099 'force fail cores test data
    Const iMinCPUSpeed=2 '20 'in GHz
    'Const iMinCPUSpeed=90000 'in GHz
    Const iMinCPUArch=32
    'Const iMinCPUArch=64
    ' #endregion
    ' To hide anything use ID.className = "hidden", to show set to "", e.g. NotFoundArea.className = "hidden"
    Sub Window_Onload
    Err.Clear
    VersionSpan.InnerText = objOSDPreReqChecks.Version 'Get version
    self.focus
    self.moveTo 100,100 'Move window top left
    StatusBar.InnerText="Validating machine..."
    document.body.style.cursor = "wait" 'hourglass cursor
    'Call PreflightChecks 'use for testing as a VBS only, otherwise HTA timer will call below
    TimerInterval = window.setInterval("PreflightChecks",10)
    End Sub
    Function PreflightChecks
    ' #region HEADER NOTES: Persistent fold region
    'Version history
    'ver 5 OCTOBER 2011 - added error handler
    'ver 3rd Nov - removed HPonly queries
    '// Solution: Custom Script for use with MDT - Adapted from hardwareinfo.vbs Mikael Nystrom – http://deploymentbunny.com
    'Typical BIOS content
    'Processor Speed = 2133/1066 MHz
    'Boot Order = Network Controller,ATAPI CD-ROM Drive,USB device,Hard Drive,Diskette Drive,PnP Device #2,PnP Device #3,PnP Device #4,PnP Device #5,PnP Device #6,PnP Device #7,PnPe #8,PnP Device #9,PnP Device #10,PnP Device #11
    'SATA (disk) mode: *IDE,--,RAID,-- or IDE,*AHCI,RAID
    'On Error Resume Next
    ' #endregion
    ' #region CONSTANTS: Persistent fold region
    '======================================================================================
    'Fields available in HP BIOS
    Const sAsset = "Notebook Asset Tag"
    Const sOwner = "Notebook Ownership Tag"
    Const sMan = "Manufacturer"
    Const sNoteModel = "Notebook Model"
    Const sCPU = "Processor Type"
    Const sCPUSpeed = "Processor Speed"
    Const sRAM = "Memory Size"
    Const sModel = "Product Name"
    Const sBIOSName ="System BIOS"
    Const sBIOSVer = "BIOS Version"
    Const sBIOSDate = "BIOS Date"
    'Other BIOS stuff you could use too
    'Const sOwnerTag = "Enter Ownership Tag"
    'Const sBIOS = "PCID"
    'Const sBIOS = "Define Custom URL"
    'Const sBIOS = "Set Alarm Time"
    'Const sBIOS = "PCID Version"
    Const TextMode="1" 'text case sensitive for dict obj
    'WMI core constants
    Const wbemFlagReturnImmediately = 16 'wmi - Causes the call to return immediately.
    Const wbemFlagForwardOnly = 32 'wmi - Causes a forward-only enumerator to be returned.
    'Forward-only enumerators are generally much faster and
    'use less memory than conventional enumerators, but don't allow calls to SWbemObject.Clone_
    'Advisory config values - as in "you want to the change these"
    Dim strHTABootOrder
    Dim strHTASATAMode
    'Dim strHTACPU
    ' #endregion
    '======================================================================================
    ' #region WQL: Persistent fold region
    lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly
    'Queries of things to check (HP)
    strWQLBootOrder = "select Name, value from HP_BIOSSetting where Name='Boot order'"
    strWQLSATAMode = "select Name, value from HP_BIOSSetting where (Name='SATA emulation' or name='SATA device mode')"
    strWQLDisks ="SELECT * FROM Win32_DiskDrive where mediatype like 'Fixed%hard disk%'" 'win32_disk only avail after W7
    strWQLFSType ="SELECT * from Win32_LogicalDisk where DriveType='3'" 'only bother with HDDs
    'Generic WMI query strings
    strWQLGenericBIOS="SELECT Manufacturer,SMBIOSBIOSVersion,ReleaseDate FROM Win32_BIOS WHERE PrimaryBIOS = True"
    strWQLCPUCount= "SELECT NumberOfProcessors,NumberOfLogicalProcessors from Win32_ComputerSystem"
    strWQLCPUInfo="SELECT Name,DataWidth,description,MaxClockSpeed,NumberofCores,NumberOfLogicalProcessors from Win32_Processor"
    strWQLPCInfo="SELECT Domain,DomainRole,SystemType,Manufacturer,Model,TotalPhysicalMemory FROM Win32_ComputerSystem"
    ' strWQLPCInfo="SELECT Domain,DomainRole,SystemType,Manufacturer FROM Win32_ComputerSystem"
    strWQLChassis="SELECT ChassisTypes from Win32_SystemEnclosure"
    strWQLID="SELECT IdentifyingNumber,UUID from Win32_ComputerSystemProduct"
    strWQLRAM="SELECT * FROM Win32_PhysicalMemory"
    strWQLProc="SELECT * FROM Win32_Process"
    strWQLBattery="SELECT * FROM BatteryStatus Where Voltage > 0"
    ' #endregion
    ' #region MAIN algorithm
    '=====================================================================================================
    ' MAIN
    'Algorithm
    '1) Check make (vendor)
    '2) Check model (in list)
    '3) Check RAM >x
    '4) Check HDD TYPE (HDD is not RAW)
    '5) Check CPU architecture
    '6) Check outlook
    '7) Check battery
    '=====================================================================================================
    'Initialise
    window.clearInterval(TimerInterval) 'Reset timer to 0
    ' blnDebug=True
    blnDebug=False
    bAbortBuild=False 'default to DON'T abort
    ' bAbortBuild=True
    'Build list of approved vendors
    Set objApprovedMakesDict = CreateObject("Scripting.Dictionary")
    objApprovedMakesDict.comparemode=VBTextCompare
    objApprovedMakesDict.add cApprovedOEM,"OK"
    objApprovedMakesDict.add LegacyOEM1,"OK"
    objApprovedMakesDict.add LegacyOEM2,"OK"
    objApprovedMakesDict.add "Lenovo","Testdata"
    If blnDebug Then Stop
    '1) all machines check make
    strHTAVendor=fCheckVendor(strWQLGenericBIOS) 'check vendor in BIOS - if vendor not approved ABORT without proceeding
    If bAbortBuild=True Then
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - goodbye cruel world"
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Else
    StatusBar.InnerText="Vendor: " & strHTAVendor & vbTab & " " & strHTAVendorState
    '2) Discover current Model
    strHTAModel=fGetModelName(strWQLPCInfo) 'get model name from WMI
    strHTAModel=fUniversalCheckData(strHTAModel,"'Discover Model - fGetModelName'") 'validate
    Call fGetModels 'get list of all valid models (from text file)
    strHTAModel=fCheckModel(strHTAModel)
    '2a) Model number (optional)
    strHTAProduct=fGetComputerSystemProdIDNumber(strWQLID) 'manufacturer's product ID
    strHTAProduct=fUniversalCheckData(strHTAProduct,"'Discover ID - fGetComputerSystemProdIDNumber'")
    ' StatusBar.InnerText=StatusBar.InnerText & VbCrLf & vbTab & "Product Code: " & vbTab & strHTAProduct
    '3) Check installed Memory
    strHTARAM=fGetRAM(strWQLRAM) 'find RAM size
    strHTARAM=fUniversalCheckData(strHTARAM,"'Detect RAM - fCheckRAM'")
    strHTARAM=fCheckRAM(strHTARAM) 'check RAM meets req
    If strHTARAMState=cFail Then Exit Function
    '4) Disk format IS NTFS
    strDisks=fGetDrives(strWQLFSType) 'Get formatting info for all drives
    strHTACheckRAW=fUniversalCheckData(strDisks,"'Detect filesystem - fCheckNTFS'") 'Validate data
    strHTACheckRAW=fCheckNTFS(strDisks) 'Check FS format is acceptable (not RAW)
    If strHTACheckRAW=cFail Then Exit Function
    'Generic CPU calls
    strHTACPUFullInfo="CPUs:" & fGetCPUInfo(strWQLCPUInfo) & " with CPU cores:" & iCPUCoreCount
    strBIOSInfo="BIOS version: " & strBIOSver & ", dated " & strBIOSDate
    '5a) CPU Speed check (info from http://www.robvanderwoude.com/wmiexamples.php)
    strCPUInfo=WMI(strWQLCPUInfo,strNamespace) 'Get CPU details
    strTemp=split(strCPUInfo,"@"): strHTACPUSpeed=strTemp(1)
    strHTACPUSpeed=fUniversalCheckData(strHTACPUSpeed,"'Check processor - fCheckCPUSpeed'") 'Validate data
    strHTACPUSpeed=fCheckCPUSpeed(strHTACPUSpeed) 'Check CPU clock speed
    '5b) cores check
    strHTACPUCores=fUniversalCheckData(iCPUCoreCount,"Check core count - fCheckCores") 'Validate data
    iCPUCoreCount=fCheckCores(iCPUCoreCount) 'pass or fail?
    '5c) CPU address width
    strHTAArchitecture=fUniversalCheckData(strHTAArchitecture,"Check core count - fCheckCores") 'Validate data
    strHTAArchitecture=fCheckCPUArch(strHTAArchitecture)
    '6) Check outlook
    strHTAOutlook=fCheckProcess(strWQLProc)
    '7) Check Battery
    strHTABattery=fCheckBattery(strWQLBattery)
    'end checkss
    document.body.style.cursor = "default"
    'Display hardware values in GUI (in table)
    Vendor.innerhtml = strHTAVendor 'Use str...var..STATE if you want Pass/fail text instead
    Model.innerhtml = strHTAModel
    Product.innerhtml = strHTAProduct
    RAM.innerhtml = strHTARAM
    CPUspeed.innerhtml = strHTACPUSpeed
    CPUInfo.innerhtml = strHTACPUFullInfo
    HDDFS.innerhtml = strHTACheckRAW
    CapableArchitecture.innerhtml=strHTAArchitecture
    BIOSversion.innerhtml = strBIOSver
    BIOSDate.innerhtml = strBIOSDate' CPUName.innerhtml = strCPUDesc 'GetCPUName
    End If
    '======================================================================================
    ' #endregion
    End Function
    'generic WMI queries, by field and namespace
    Function WMI(strQuery,strNameSpace)
    'Aim: generic WMI calls
    'return value of BIOS
    On Error Resume Next
    Dim colItems,objItem
    Dim objWMI
    Const strService = "winmgmts:{impersonationlevel=impersonate}//" 'binding to WMI
    Const strComputer = "." 'this machine
    Set objWMI = GetObject(strService & strComputer & strNamespace) 'GLOBAL wmi
    Set colItems = objWMI.ExecQuery(strQuery,,lFlags)
    For Each objItem In colItems
    If Err Then
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "WMI query: " & strQuery & " in " & strNamespace & objItem.Name
    Call ErrHandler("WMI error " & strQuery,1)
    Else
    WMI=objItem.Name 'Return value
    End If
    Next
    End Function
    Function fGetModelName(strWQLPCInfo)
    'Aim: Get model name from BIOS - WMI field sometimes varies if laptop, so try two
    'Return STRING: Model string from BIOS or "UNKNOWN" if null
    On Error Resume Next
    Dim colPCInfo,objPCItem
    Dim strModel
    Set colPCInfo = GetObject("winmgmts:").ExecQuery(strWQLPCInfo,"WQL",lFlags)
    If Err Then
    Call ErrHandler("fGetModelName: Error querying WMI " & strWQLPCInfo,2)
    Else
    For Each objPCItem In colPCInfo
    If Not IsNull(objPCItem.Model) Then
    strModel=objPCItem.Model
    ' iRAM=objPCItem.TotalPhysicalMemory
    Else
    If (strHTAVendor=cApprovedOEM And IsLaptop = True) Then ' resort to HP specific query for older laptops
    'Notebook
    strModel=QueryHPBIOS(sNoteModel)
    if strModel="" then strModel=QueryHPBIOS(sModel) 'try alt value
    Else
    strModel=QueryHPBIOS(sModel)
    End If
    End If
    Next
    End If
    If strModel = "" Then
    fGetModelName = "UNKNOWN"
    Model.style.visibility="hidden"
    Else
    fGetModelName=strModel
    End If
    End Function
    '====================================================
    '====================================================
    Function fGetRAM(strQuery)
    'Aim: get RAM installed. NB Win32_ComputerSystem::TotalPhysicalMemory may not be accurate
    'Return integer
    On Error Resume Next 'equiv to Err.Clear
    Dim colItems, item
    Dim iTotalMemory
    Set colItems = GetObject("winmgmts:").ExecQuery(strQuery,"WQL",lFlags)
    If Err Then
    Call ErrHandler("fGetRAM: Error querying " & strQuery,2)
    Else
    iTotalMemory = 0
    For Each item In colItems
    iTotalMemory = iTotalMemory + CDBL(item.Capacity)/(1024^2)
    Next
    End If
    If iTotalMemory = "" Then
    fGetRAM = "RAM UNKNOWN"
    RAM.style.visibility="hidden"
    Else
    fGetRAM=iTotalMemory
    End If
    End Function
    '====================================================
    '====================================================
    Function fGetCPUInfo(strQuery)
    'Aim: query WMI for CPU info - number and number of cores
    'Return: function=CPU count, var for the cores: iCPUCoreCount, strHTAArchitecture, strCPUDesc
    On Error Resume Next
    Dim colItems, objItem
    Dim NumberOfProcessors
    Set colItems = GetObject("winmgmts:").ExecQuery(strQuery,"WQL",lFlags)
    If Err Then
    Call ErrHandler("GetCPUInfo: Error querying " & strQuery,2)
    Else
    For Each objItem In colItems
    If Err Then
    Else
    If Not IsNull(objItem.NumberOfCores) Then
    NumberOfProcessors = Trim(objItem.NumberOfCores) 'NumberOfProcessors
    End If
    If Not IsNull(objItem.NumberOfLogicalProcessors) Then
    iCPUCoreCount = Int(Trim(objItem.NumberOfLogicalProcessors))
    End If
    If Not IsNull(objItem.DataWidth) Then
    strHTAArchitecture=Trim(objItem.DataWidth) & "-bit"
    End If
    If Not IsNull(objItem.description) Then
    strCPUDesc = Trim(objItem.description) 'cpu name
    End If
    End If
    Next
    If NumberOfProcessors = "" Then
    NumberOfProcessors = "UNKNOWN"
    End If
    fGetCPUInfo = Int(NumberOfProcessors)
    ' iCPUCoreCount = Int(NumberOfLogicalProcessors)
    End If
    End Function
    '====================================================
    '====================================================
    Function fGetComputerSystemProdIDNumber(strWQLID)
    'Aim: Get UUID from Win32_ComputerSystemProduct
    'Return: great big integer
    Dim colSys,objSys
    Dim strUUID
    On Error resume next
    Set colSys = GetObject("winmgmts:").ExecQuery(strWQLID,"WQL",lFlags)
    If Err then
    Call ErrHandler("fGetComputerSystemProdIDNumber: Error querying " & strWQLID,2)
    Else
    For Each objSys In colSys
    If Not IsNull(objSys.IdentifyingNumber) Then
    strUUID = Trim(objSys.IdentifyingNumber)
    End If
    Next
    If strUUID = "" Then
    fGetComputerSystemProdIDNumber = "UNKNOWN"
    Else
    fGetComputerSystemProdIDNumber = strUUID
    End If
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fGetDrives(strQuery)
    Dim colDisks,objHDD
    Dim strDriveType, strDiskSize, strDisk
    Dim strDiskFSType
    Dim iGBUnits
    On Error Resume Next
    iGBUnits=1073741824
    Dim iRAW
    iRAW=0
    Set colDisks = GetObject("winmgmts:").ExecQuery(strQuery)
    For Each objHDD In colDisks
    Select Case objHDD.DriveType
    Case 1 strDriveType = "Drive could not be determined."
    Case 2 strDriveType = "Removable Drive"
    Case 3 strDriveType = "Local hard disk."
    Case 4 strDriveType = "Network disk."
    Case 5 strDriveType = "Compact disk (CD)"
    Case 6 strDriveType = "RAM disk."
    Case Else strDriveType = "Drive type Problem."
    End Select
    strDiskFSType = objHDD.FileSystem
    'Find C
    If objHDD.Name="C:" Then
    If isNull(objHDD.FreeSpace) Then
    If blnDebug=True then Call ErrHandler("ALERT!! Volume " & objHDD.Name & "is RAW",1) 'Abort/clean
    fCheckDrives="ALERT!! Volume " & objHDD.Name & "is RAW"
    End If
    End If
    strDiskSize = Int(objHDD.Size /iGBUnits) & "GB" 'calc size of disk
    strDisk = strDisk & VbCrLf & "Vol " & objHDD.Name & " (" & strDriveType & ") size: " & strDiskSize & " (free: " & Int(objHDD.FreeSpace /iGBUnits) & "GB), " & strDiskFSType
    fGetDrives=strDisk
    Next
    If (Err.Number <>0) Then
    Call ErrHandler("WMI Property Query Error: [" & Err.Number & "]",2)
    fGetDrives = -1
    Exit Function
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fUniversalCheckData(varData,strStage) 'template
    'Aim: Check value passed...
    'is not blank
    'is in range x..y
    'spelt OK
    'is in a list
    'format is text, numeric
    'return: string: the original value
    On Error Resume Next
    Dim Err
    if blnDebug Then StatusBar.InnerText = StatusBar.InnerText & VbCrLf & "Validating " & strStage & " data..."
    If Err Then
    Call ErrHandler("WARNING: Error discovering value in " & strStage,2) '1=Quit,2=Warn
    strHTAModel="Unknown"
    Else
    Select Case varData
    Case IsEmpty(varData) Or IsNull(varData)
    Call ErrHandler("WARNING: Error in "& strStage,2) '1=Quit,2=Warn
    fUniversalCheckData="Unknown"
    Case IsNumeric(varData)
    If varData<0 Then
    Call ErrHandler("WARNING: Value negative"& strStage,2) '1=Quit,2=Warn
    fUniversalCheckData="Unknown"
    End if
    ' & varData &
    Case IsDate(varData)
    Case Else
    fUniversalCheckData=varData 'Data OK - return value unchanged
    End Select
    End If
    End Function
    '=================================================================================
    'Checks - follow if true DO, if false warn/abort
    '=================================================================================
    Function fCheckBattery(strQuery)
    'Aim: Find if battery is running
    'Return pass/fail
    On Error Resume Next 'equiv to Err.Clear
    Const wbemFlagReturnImmediately = &h10
    Const wbemFlagForwardOnly = &h20
    Dim colItems, item
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
    Set colItems = objWMIService.ExecQuery("SELECT * FROM BatteryStatus Where Voltage > 0", "WQL", _
    wbemFlagReturnImmediately + wbemFlagForwardOnly)
    For Each item In colItems
    if objItem.PowerOnline = True Then
    strHTABattery=objItem.PowerOnline
    strHTABatteryState = cFail
    Err.Raise 9010,"fCheckBattery",strHTABattery & " Laptop running on battery. OSD Cannot continue."
    Call ErrHandler(ucase(strHTABatteryState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - Laptop on Battery. Please plug into an outlet before proceeding."
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Else
    strHTABatteryState = cPassed
    End if
    Next
    fCheckBattery=strHTABattery
    End Function
    '====================================================
    Function fCheckProcess(strQuery)
    'Aim: Find if outlook is running
    'Return pass/fail
    On Error Resume Next 'equiv to Err.Clear
    Dim colItems, item
    Set colItems = GetObject("winmgmts:").ExecQuery(strQuery,"WQL",lFlags)
    For Each item In colItems
    if item.Name = "OUTLOOK.EXE" Then
    strHTAOutlook=item.Name
    strHTAOutlookState = cFail
    Err.Raise 9010,"fCheckOutlook",strHTAOutlook & " running. OSD Cannot continue."
    Call ErrHandler(ucase(strHTAOutlookState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - Outlook Running, please close outlook before proceeding."
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Elseif item.Name = "communicator.exe" Then
    strHTAOutlook=item.Name
    strHTAOutlookState = cFail
    Err.Raise 9010,"fCheckOutlook",strHTAOutlook & " running. OSD Cannot continue."
    Call ErrHandler(ucase(strHTAOutlookState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "FATAL ERROR - Communicator Running, please close OCS before proceeding."
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript")
    Else
    strHTAOutlookState = cPassed
    End if
    Next
    fCheckProcess=strHTAOutlook
    End Function
    '====================================================
    '1 - Make
    Function fCheckVendor(strVendor)
    'Aim: Check make is one the OS/build is designed For
    'Return: STRINGS for "Make", BIOS version and BIOS date (generic): strHTAVendorState pass or fail
    On Error Resume Next
    Dim colItems,objItem
    Set colItems = GetObject("winmgmts:").ExecQuery(strVendor, "WQL", lFlags)
    For Each objItem In colItems
    strHTAVendor=objItem.Manufacturer
    if objApprovedMakesDict.exists(strHTAVendor) then
    strBIOSver=objItem.SMBIOSBIOSVersion
    strBIOSDate=Mid( objItem.ReleaseDate, 5, 2 ) & "/" & Mid( objItem.ReleaseDate, 7, 2 ) & "/" & Left( objItem.ReleaseDate, 4 )
    strHTAVendorState=cPassed
    Else
    strHTAVendorState=cFail
    Err.Raise 9010,"fCheckVendor",strHTAVendor & " found. The build will not work on this make of hardware"
    Call ErrHandler(ucase(strHTAVendorState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    bAbortBuild=True
    end if
    Next
    fCheckVendor=strHTAVendor
    End Function
    '=================================================================================
    '=================================================================================
    '2 - Models check
    Function fCheckModel(strThisModel)
    'Aim Check target machine is in list of models
    'Return string
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking model..." & VbCrLf
    If objModelsDict.exists(trim(strThisModel)) then ' if current model in objDict then huzzah
    strHTAModelState=cPassed
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "Model detected: " & vbTab & strHTAModelState
    Else
    strHTAModelState=cFail
    Err.Raise 9010,"fCheckModel",strThisModel & " found. The build will not work on this model of hardware"
    Call ErrHandler(ucase(strHTAModelState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1)
    end if
    fCheckModel=strHTAModel
    End Function
    '=================================================================================
    '=================================================================================
    '3 - RAM
    Function fCheckRAM(strRAM)
    'Aim: Check installed RAM > x
    'Return string digits with units, e.g. 4GB
    'use strHTARAM for value
    '==================================================================
    ' Memory Preflight Check (from MDT2012)
    '==================================================================
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking RAM..."
    If Err.Number <> 0 Then
    Call ErrHandler("Error occurred while calculating computer's memory.",2)
    End If
    fCheckRAM = Int(strRAM/1024) & "GB" 'format in GB
    If Int(strRAM) > cMinimumMemoryMB Then
    strHTARAMState=cPassed 'Sufficient memory - show whole number in GB"
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "RAM installed: " & vbTab & strHTARAMState
    Else
    strHTARAMState=cFail
    Err.Raise 9030 ,"fCheckRAM","Not enough memory in this machine!" & " Required physical memory is: " & cMinimumMemoryMB & " MB."
    Call ErrHandler(ucase(strHTARAMState) & ": " & Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1) 'abort build
    End If
    End Function
    '=================================================================================
    '=================================================================================
    '4 - NTFS disk
    Function fCheckNTFS(strDiskFS)
    'Aim: Check HDD is NTFS
    'Return string
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking file system is not RAW..."
    If Instr(1,strDiskFS,cMinFS,VBTextCompare)<>0 Then
    fCheckNTFS=cMinFS 'disk format is OK (NTFS)
    StatusBar.InnerText=StatusBar.InnerText & vbTab & " File system: " & cPassed
    Else
    fCheckNTFS=cFail
    Err.Raise 9040 ,"fCheckNTFS","WARNING: Disk not correct file-system. Type required is: " & cMinFS & "." & VbCrLf & _
    "The deployment will fail unless you reformat the target disk immediately."
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",2) 'halt build
    End If
    End Function
    '====================================================
    '=================================================================================
    '5 - CPU checks
    '=================================================================================
    Function fCheckCPUSpeed(strCPU) 'any HW
    'Aim: Check CPU speed
    'Return string = number + appropriate units, e.g. 5HGz (strCPU)
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking CPU spec..."
    Select Case Right(strCPU,3) 'check units
    Case "MHz"
    strCPU=Left(strCPU,4)/1000 'reformat to GHz
    Case "GHz"
    strCPU=strCPU 'unit already OK
    Case Else
    Call ErrHandler("CPU units are unknown",2)
    End Select
    'Check clock speed
    If Int(Left(trim(strCPU),1))>=iMinCPUSpeed Then
    fCheckCPUSpeed=strHTACPUSpeed 'CPU is fine i.e don't change value
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "CPU Speed: " & cPassed
    Else
    fCheckCPUSpeed=cFail 'already in GHz
    Err.Raise 9050,"fCheckCPUSpeed","CPU speed pre-requisite failed. Minimum processor clock speed is: " & iMinCPUSpeed
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1) 'halt build
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fCheckCPUArch(strCPUArch) 'any HW
    'Aim: Check CPU width
    'Return string
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking CPU bus width..."
    'Check clock speed
    If Int(Left(trim(strCPUArch),2))>=iMinCPUArch Then
    fCheckCPUArch=strHTAArchitecture 'CPU is fine i.e don't change value
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "CPU width: " & cPassed
    Else
    fCheckCPUArch=cFail 'already in GHz
    Err.Raise 9052,"fCheckCPUArch","CPU width pre-requisite failed. Minimum processor width required is: " & iMinCPUArch
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",1) 'abort build
    End If
    End Function
    '=================================================================================
    Function fCheckCores(iCores)
    'Aim: Check hardware (CPU) has a minimum number of cores
    'Return Integer
    On Error Resume Next
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & "Checking CPU cores..."
    If iCores>=iMinCores Then
    fCheckCores=iCores
    StatusBar.InnerText=StatusBar.InnerText & vbTab & "Core count: " & vbTab & cPassed
    'StatusBar.InnerText=StatusBar.InnerText & vbTab & "CPU cores: " & cPassed
    Else
    fCheckCores=cFail
    Err.Raise 9051,"fCheckCores","WARNING: Not enough cores on the CPU to support the build. Minimum CPU cores is: " & iMinCores
    Call ErrHandler(Err.Description & " (Code: " & Err.Number & " - " & Err.Source & ")",2) 'halt build
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fCheckHPCPUSpeed 'HP ONLY
    'Aim: Check CPU speed
    'return: string
    'Check CPU speed
    On Error Resume Next
    strWQLCPU = "processor speed"
    strTemp=QueryHPBIOS(strWQLCPU,"")
    Select Case Right(strTemp,3)
    Case "MHz"
    strTemp=Left(strTemp,4)/1000 'reformat to GHz
    Case "GHz"
    strTemp 'is OK
    Case Else
    Call ErrHandler("CPU is unknown",2)
    End Select
    'Check clock speed
    If strTemp>=iMinCPUSpeed Then
    fCheckCPUSpeed= strTemp & "GHz"
    Else
    Err.Raise 9050,,"CPU speed pre-requisite failed"
    Call ErrHandler("CPU is too slow",1)
    fCheckCPUSpeed=cFail 'already in GHz
    End If
    End Function
    '=================================================================================
    '=================================================================================
    Function fGetModels
    'Aim: Read external text file
    'return: dictionary object - models as key, integer as value e.g. Dell Optiplex,12
    'On Error Resume Next
    Dim objFSO
    Dim objFile
    Dim strFile
    Dim strEntry
    Dim n
    Dim strfilepath
    Dim iLineCount 'count lines to avoid listing first item with ,.
    Set objModelsDict = CreateObject("Scripting.Dictionary")
    set objFSO=CreateObject("Scripting.FileSystemObject")
    Const ForReading=1
    strfilepath = Left(window.location.pathname,InStrRev(window.location.pathname,"\"))
    strFile=strfilepath & "Models.txt"
    set objFile=objFSO.OpenTextFile(strFile,ForReading)
    iLineCount=0
    'read in each line of data until you reach the end of the file
    do While objFile.AtEndOfStream<>True
    strEntry=objFile.ReadLine
    'you can now do what ever you want with the line as referenced with the strEntry variable such as
    'echoing it back (e.g. wscript.Echo strEntry) or passing it as a variable to a function of subroutine (e.g. MyFunction strEntry)
    objModelsDict.comparemode=VBTextCompare
    objModelsDict.Add strEntry,iLineCount
    iLineCount=iLineCount+1
    If blnDebug then
    If iLineCount=1 Then
    StatusBar.InnerText=trim(strEntry)
    Else
    StatusBar.InnerText=StatusBar.InnerText & ", " & trim(strEntry) 'list models
    End If
    End If
    Loop
    objFile.Close
    End Function
    '=================================================================================
    '=================================================================================
    '====================================================
    Function ErrHandler(strErrorMsg,iErrMode)
    'Aim: to handle error states
    ' 1 = Abort
    ' 2 = Warn
    'Return 'Appropriate text message explaining the error
    '====================================================
    Const msgTitle="SCCM Deployment Preflight Checklist"
    'On Error Resume Next '< don't use that as we want to KEEP the error properties
    'Abort=1
    If iErrMode=1 Then
    StatusBar.InnerText=strErrorMsg 'overwrite status with Error message
    ' StatusBar.InnerText=StatusBar.InnerText & VbCrLf & " " & strHTAOutlook & " " & strHTAVendor & " " & strHTAVendorState & _
    ' VbCrLf & " " & strHTAModel & strHTAModelState & _
    ' VbCrLf & " " & strHTARAM & strHTARAMState & _
    ' VbCrLf & " " & strHTAHDD & strHTAHDDState
    iTimer = window.setTimeout("Abort", iAbortTimeout, "VBScript") 'Abort (close) after n seconds
    'MsgBox strErrorMsg,vbExclamation,msgTitle
    'ErrBar.class=""
    ElseIf iErrMode=2 Then
    'Warning
    StatusBar.InnerText=StatusBar.InnerText & VbCrLf & strErrorMsg & " " '& "(" & Err.Description & " :" & Err.Number & ")"',vbExclamation,msgTitle
    Err.Clear
    End If
    End Function
    '====================================================
    Sub Abort
    'Aim: Quit gracefully
    window.close()
    End Sub
    </script>
    <!-- #region BODY -->
    <body>
    <br />
    <div>
    <span style="version"> <span id="VersionSpan"></span></div>
    <div style="text-align: center;">
    <H1 style="font-family: Arial, Helvetica, sans-serif; font-size: large; text-align: center; color: #000000; text-transform: capitalize">System information</H1>
    <span>
    <table border="1" cellspacing="0" cellpadding="0" style="width: 912px"
    id="SysInfoTable">
    <tr class="h1">
    <td align="right" class="Header1" style="width: 76px; height: 18px">
    </td>
    <td align="right" class="Header1" style="height: 18px"><em id="VendorCaption">Vendor</em></td>
    <td align="left" class="style2" style="height: 18px"><span id="Vendor"></span></td>
    <td align="right" class="Header2" style="height: 18px"><em id="ModelCaption">Model</em></td>
    <td align="center" class="style4" style="width: 400px; height: 18px"><span id="Model"></span></td>
    </tr>
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="ProductCaption">Product ID</em></td>
    <td align="left" class="style2"><span id="Product"></span></td>
    <td align="right" class="Header2"><em id="RAMCaption">Memory(in MB)</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="RAM"></span></td>
    </tr>`
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="CPUCaption">CPU speed (in GHz)</em></td>
    <td align="left" class="style2"><span id="CPUspeed"></span></td>
    <td align="right" class="Header2"><em id="CPUInfoCaption">No: CPU\Cores</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="CPUInfo"></span></td>
    </tr>
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="DiskFSCaption">Filesystem info</em></td>
    <td align="left" class="style2"><span id="HDDFS"></span></td>
    <td align="right" class="Header2"><em id="CapableArchCaption">Architecture</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="CapableArchitecture"></span></td>
    </tr>
    <tr>
    <td align="right" class="Header1" style="width: 76px">
    </td>
    <td align="right" class="Header1"><em id="BIOSVerCaption">BIOS version</em></td>
    <td align="left" class="style2" ><span id="BIOSVERSION"></span></td>
    <td align="right" class="Header2"><em id="BIOSDateCaption">BIOS Date</em></td>
    <td align="left" class="style4" style="width: 400px"><span id="BIOSDate"></span></td>
    </tr>
    </table>
    </span>
    </div>
    <div class="StatusBar">
    <br />
    <Span id="StatusBar">Loading...please wait.</Span>
    </div> <br><br>
    <div align="center">
    <input type="button" name="btnStop" id="btnStop" value="Continue" onclick="Abort">
    <input type="Button" value="Re-Scan Machine" name="button1" onClick="Window_Onload" class="button">
    </div>
    </body><!-- #endregion -->
    </html>

  • Satellite L555-D- 7005

    Turned machine on, got black and white screen stating boot failure...press (key) to reformat and reset to factory default. Did that...Restarted machine and looked ok. Attempted to run MS Word, asked for key. Entered key which was on the bottom of machine, came back as invalid key. Turned machine off. Couple of days later, turned it on and now a black screen-no response from keyboard. Couple days later - today - turned machine on, black screeen no help with "0" or F keys. Did that a couple of times and it finally booted up.
    Not being that familiar with current tech...any guess what's going on.....and why didi restore wipe out all the programs that were installed at time of purchase and replace programs with something other than the original programs that do not acknowledge the "key" from date of purchase?
    Any info would be appreciated.

    Hi First thing: that is not a valid model number which can be found on the botton of your lap top. Next  thing; when you restore back to factory setting, the computer is restored back like it was the first day you turned it on. Any thing you added will be gone. Windows up dates will need to be installed. Did you purchase MS word?
    Dokie!!
    I Love my Satellite L775D-S7222 Laptop. Some days you're the windshield, Some days you're the bug. The Computer world is crazy. If you have answers to computer problems, pass them forward.

  • How to control the processing of the request?

    I have something like this:
    <h:inputText value="#{sessionController.currentRowData.settlementId}"/>
    <h:inputText value="#{sessionController.currentRowData.remark}"/>
    <h:inputText value="#{sessionController.currentRowData.fromDate}">
         <f:convertDateTime pattern="yyyy-MM-dd"/>
    </h:inputText>
    The currentRowData object is the currently selected row of a data model.
    Problem is, the model is updated with the value of the components whenever the form is submitted,
    and regardless of whether the value of the components has changed or not.
    (Actually, the behaviour depends on the type of the property, as ie. Date is treated differently from String or int.)
    This causes unwanted changes to the model, and, if a new row is selected, it will at once
    be updated with the values of the previous row (from the current state of the components).
    I want the above components to update the model only if the user wants to, ie. only if a
    specific command button is pressed.
    How to control this?
    Let a PhaseListener check the request, and do renderResponse on the FacesContext if
    the "selectRow" request is found in the request parameter map?
    This is not very elegant, and it does not seem to work either. If setting PhaseId to APPLY_REQUEST_VALUES, the action itself (selecting row)
    will not be executed, and if using UPDATE_MODEL_VALUES, the value of the components is set from the request (even if unchanged), and not updated according the the new data in the model (the rendered values does not reflect the values of the properties of the object the components are bound to)
    Another solution might be to let the "disabled"-attribute of the inputText tags be dependent on whether
    a specific "edit"-button has been pressed (disabled inputText tags are rendered correctly after a row change).
    But a better solution would to have the ability to control the behaviour, something like
    "for these components, no updating of state should be done unless the condition c is true"
    (I'm not sure what condition this could be, though).
    Whatever solution I may end up with, the real problem seems to be that the state (and hence the model)
    is updated from the request also in the case where the value in the request is the same as the current value of the component.
    Or maybe there is something I have missed here?
    erik

    This one is a tricky problem - a side-effect of JSF doing a lot of things automatically is that sometimes it does too much.
    I don't have a great solution, but here's a couple of ideas:
    (1) Try using multiple <h:form>s on your page (not nested one inside the other, but separate). Data will only get updated in the form that contains the button that got pressed.
    (2) Use an intermediate model layer, and discard updates as appropriate.
    Neither of these are beautiful solutions - the second is way ugly - but they might help. Long-range, I'd love to see something like "subforms" supported in JSF that can provide finer grained control over what gets processed (validations, model pushes, etc.) and what doesn't without resorting to the blunt hammer of multiple HTML forms.
    I'm a little confused about "the model is updated with the value of the components whenever the form is submitted, and regardless of whether the value of the components has changed or not.", because JSF is checking the old value and using ".equals()" to see if its changed. Note, however, that it's not caching the old value across the request, but simply going back to the model on the subsequent request, which may (or may not) explain the behavior you're seeing.
    -- Adam Winer (EG member)

  • How can i find out what country a iphone 4s comes from?

    i have a 4s but its in reset mode and i tried all sim cards (at&t and verizon) i have to activate, but it does not activate. i am also using wifi but it says " this sim is not supported". does anyone know how to activate or which country or carrier it comes from?

    xx at the end is not a valid model number and those two letters give us some clue as to which market the laptop was sold in. It should be dv or ea or something like that. 

  • Namespace not found error when creating data server for xml with namespace

    Hi
    I tried creating XML data server in ODI with namespace in xml file. I followed the below steps but could not success in creating the dataserver. however when I remove the namespace in xml file I am able to reverse engineer the xml file.
    1) Create xml data server
    2) select xml driver - com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    3) Provide the jdbc url - jdbc:snps:xml?f=D:/xmlnew/sample_namespace.xml&s=xmlns&d=D:/xmlnew/sample_namespace.dtd
    xml content
    <f:root xmlns:f="http://www.w3.org/TR/html4/">
    <table>
    <name>African Coffee Table</name>
    <width>80</width>
    <length>120</length>
    </table>
    </f:root>
    DTD content
    <!ELEMENT f:root ( table ) >
    <!ELEMENT length ( #PCDATA ) >
    <!ELEMENT name ( #PCDATA ) >
    <!ELEMENT table ( name, width, length ) >
    <!ELEMENT width ( #PCDATA ) >
    when I test connection it shows the following error.
    java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Model not accepted: Namespace not found:
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1100)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:371)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:794)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:754)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:137)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:133)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$IvjEventHandler.actionPerformed(SnpsDialogTestConnet.java:87)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Model not accepted: Namespace not found:
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:389)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:421)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.<init>(SnpsXmlDTD.java:150)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchema.<init>(SnpsXmlSchema.java:478)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.createNewSchema(SnpsXmlSchemaManager.java:292)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.getSchemaFromProperties(SnpsXmlSchemaManager.java:270)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDriver.connect(SnpsXmlDriver.java:114)
         at oracle.odi.jdbc.datasource.DriverManagerUtils$DriverProxy.connect(DriverManagerUtils.java:23)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:368)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:352)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:316)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:275)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:99)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ConnectionProcessor.run(LoginTimeoutDatasourceAdapter.java:217)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)

    Hi,
    Thans for your reply.
    This is the DTD for my xmldoc.
    <!ELEMENT Data (Department+)>
    <!ELEMENT EmployeeID (#PCDATA)>
    <!ATTLIST EmployeeID col (EMPID) #IMPLIED>
    <!ELEMENT Education (EmployeeID, Sequence, Dgree)>
    <!ATTLIST Education table NMTOKEN #IMPLIED>
    <!ELEMENT Employee (EmployeeName, EmployeeID, DepartmentID, Education*)>
    <!ATTLIST Employee table NMTOKEN #IMPLIED>
    <!ELEMENT EmployeeName (#PCDATA)>
    <!ATTLIST EmployeeName col NMTOKEN #IMPLIED>
    <!ELEMENT DepartName (#PCDATA)>
    <!ATTLIST DepartName col NMTOKEN #IMPLIED>
    <!ELEMENT Table (Column+)>
    <!ATTLIST Table importType NMTOKEN #IMPLIED>
    <!ATTLIST Table parentTable NMTOKEN #IMPLIED>
    <!ATTLIST Table tag NMTOKEN #IMPLIED>
    <!ATTLIST Table columns NMTOKEN #IMPLIED>
    <!ATTLIST Table name NMTOKEN #IMPLIED>
    <!ELEMENT DepartID (#PCDATA)>
    <!ATTLIST DepartID col NMTOKEN #IMPLIED>
    <!ELEMENT MetaData (Table+)>
    <!ELEMENT Sequence (#PCDATA)>
    <!ATTLIST Sequence col NMTOKEN #IMPLIED>
    <!ELEMENT Dgree (#PCDATA)>
    <!ATTLIST Dgree col NMTOKEN #IMPLIED>
    <!ELEMENT Export (MetaData, Data)>
    <!ELEMENT DepartmentID (#PCDATA)>
    <!ATTLIST DepartmentID col NMTOKEN #IMPLIED>
    <!ELEMENT Column (#PCDATA)>
    <!ATTLIST Column deleteKey NMTOKEN #IMPLIED>
    <!ATTLIST Column isKey NMTOKEN #IMPLIED>
    <!ELEMENT Department (DepartName, DepartID, Employee+)>
    <!ATTLIST Department table NMTOKEN #IMPLIED>
    Thanks again!
    Yan

Maybe you are looking for