SelectBooleanCheckbox in Map or Array?

Hi guys,
Anybody has example on putting selectBooleanCheckbox in a Map/Array in backing bean so that in JSP page we don't need to put it like 1 by 1. For example, if I got a list of 5 facilities for selectBooleanCheckbox, I don't need to do it like the following in JSP page:
<h:selectBooleanCheckbox id="facility1" value="#{backingBean.facility1}"/>
<h:selectBooleanCheckbox id="facility2" value="#{backingBean.facility2}"/>
<h:selectBooleanCheckbox id="facility3" value="#{backingBean.facility3}"/>
<h:selectBooleanCheckbox id="facility4" value="#{backingBean.facility4}"/>
<h:selectBooleanCheckbox id="facility5" value="#{backingBean.facility5}"/>
where I can just loop thru the boolean[] facility in backing bean will do.
thanks !

Try h:dataTable.
<h:dataTable value="#{backingBean.facilities}" var="item">
<h:column>
<h:selectBooleanCheckbox id="check" value="#{item.facility}"/>
</h:column>
<h:column>
<h:outputLabel for="check">
<h:outputText value="#{item.name}"/>
</h:outputLabel>
</h:column>
</h:dataTable>

Similar Messages

  • How to map an array to fixed fields using Biztalk mapper

    I need to remap an array of objects like this:
        <Root>
          <ListOfObjs>
            <Obj>
              <Attr1>0000</Attr1>
              <Attr2>Hello!</Attr2>
            </Obj>
            <Obj>
              <Attr1>1111</Attr1>
              <Attr2>Hello1!</Attr2>
            </Obj>
          </ListOfObjs>
        </Root>
    in an output like this:
            <Root>
                <Obj1_Attr1>0000</Obj1_Attr1>
                <Obj1_Attr2>Hello!</Obj1_Attr2>
                <Obj2_Attr1>1111</Obj2_Attr1>
                <Obj2_Attr2>Hello1!</Obj2_Attr2>
            </Root>
    So in my XSD schema I have something like this:
    Schema Input
                               <xs:element name="Root">
                                <xs:complexType>
                                 <xs:sequence>
                                  <xs:element name="ListOfObjs">
                                   <xs:complexType>
                                    <xs:sequence>
                                     <xs:element name="Obj">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
                                    </xs:sequence>
                                   </xs:complexType>
                                  </xs:element>
    Schema output
                                     <xs:element name="Root">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Obj1_Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Obj1_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr1">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
    In addiction I have to evaluate every single value because when I found some conditions (like if value=0000 output should be NULL).
    What would be the best way to do it? I'm thinking to develop a custom functoid but I'm not sure it would be the best way, probably it could be done even using XSLT inline transforms, can you point me in the best direction?
    Thank you

    Hi,
    You cannot directly map an array output to any single field in BizTalk mapper.
    Couple of options :
    1) create
    the Xslt or inline C# code
    Refer: 
    http://seroter.wordpress.com/2008/10/07/splitting-delimited-values-in-biztalk-maps/
    2) Shankycheil has
    provided a solution to similar requirement in the below link, u can also refer that.
    https://social.msdn.microsoft.com/Forums/en-US/55ec472d-4f34-4057-b1c6-0e50740f0f6e/how-to-itterate-string-array-values-in-biztalk-mapper?forum=biztalkgeneral
    Rachit
    Thank you, I already seen both posts, but I'm not sure they are what I need or I can't understand well how to use them.
    Speaking about the first solution, as I told before, in the example I should have an array already formed and delimited by a char (something like "obj1attr1-obj1attr2-ob2attr1-obj2attr2". In this situation probably this example could be a good
    point to start from, but how to transform my complex input object in a similar formatted string?
    About the second I don't understand well what is the working solution that they have adopted. Is the 4 steps solution suggested by  Shankycheil? If yes, how can I loop between all array elements and extract all their values?

  • Mapping Java Arrays

    I was given an object model generated by an apache product, Axis. The generated java files use the Java Array in the following fashion:
    Class Zoo {
    private ArrayOfAnimals animals;
    // … public get/set methods cut
    Class ArrayOfAnimals {
    private Animal animals[];
    // … public get/set methods cut
    Class Animal {
    private String name;
    // … public get/set methods cut
    I was tasked with mapping the one-to-many relationship between zoo and an array of animals using the Animal array. I can’t find a mapping in TopLink to do this type of association. I am NOT allowed to modify the generated source code. I may be able to extend the generated classes, and perhaps provide a different superclass.
    I am allowed to create the relational model for these domain classes. Can anyone help with this type of mapping?
    Thanks

    TopLink does not directly support arrays as the mapping type for a collection, only collection types that support the Collection and Map interfaces.
    In general it seems odd to use an array instead of a Java collection which would be much more efficient (in terms of adding and removing) and much more functional. I would definitely suggest changing the generated code, or the way the code is generated if at all possible.
    The easiest way to map the array in TopLink would be the use get/set methods for the 1-m mapping on the Zoo class that converted the array to/from a Collection.
    i.e. something like,
    public List getAnimalsList() {
    return new Arrays.asList(animals.animals);
    public void setAnimalsList(List list) {
    animals.animals = (Animal[]) list.toArray();
    In general TopLink uses its ContainerPolicy class to handle collections. It may also be possible (but advanced) to write a custom container policy for your 1-m mapping that handles arrays.

  • Mapping of Array Structucture

    I am trying to map SOAP response ( which is combination of an array and a separate String field) as Source Message . I need to map it to  Target Message with same structure.
    <b>Do I need to use user defined functions to map source array element to target array element?</b>
    Direct mapping ( 1-1) does not seem to do the job. It only displays and maps the string field which is not part of Array.
    Appreciate your prompt response

    Hi Prasad,
    If the source and target have the same structures then you don't need any user defined functions. Infact  you don't need any interface mapping program if it is the same  message type on both the sides while sending to the target. If these are two different message types of the similar field names then you can use the identity mapping in IR to map them.
    >>It only displays and maps the string field which is not part of Array.
    check the cardinality(occurance) of this field in the bothe structures. Also if your array field is a child element of the node then make sure that you map the parent nodes aswell.
    Check the context of the source field and you can use 'display queue' functionality while testing your mappings in IR.
    hope this helps..
    Anand

  • Mapping vertical arrays versus horizontal arrays in HP exstream

    Anyone with details on mapping vertical arrays versus horizontal arrays in HP Streak software please?

    johnsold wrote:
    Is this a bug (inconsistent behavior)? A feature? An unintended consequence of something else?
    I agree, this looks inconsistent.
    Ranjeet_Singh wrote:
    Make the index of both the array 0 then run your program. 
    Now horizontal array shows 4th element & vertical array shows 10th element. 
    What are you trying to say here? You are just repeating the instruction #1 on the front panel of the posted VI, then repeating what the image above already shows.
    LabVIEW Champion . Do more with less code and in less time .

  • Mapping 1D array of sensor data to a 3D graphical model

    does anyone have any ideas how to approach this matter in LabVIEW.
    I have a measurement that is an array of 1D values.
    I would like to display that 1D array of values as points of specific color on a 3D model of some sort.
    What is the best software to create the 3D model, what is the easiest way to map my values to the points on that model.
    Thanks,
    Maciej

    You can use a wrl file with the 3D picture control. How you map your values is optional. I have used color coded sphere at the locations of interest.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Java - AS mapping for arrays

    I've got a basic Java -> AS mapping working where my
    server-side Java "Customer" class is serialized down to my
    client-side AS "Customer" object via my use of the RemoteClass
    attribute. But when my Java object returns a Customer[] or a List,
    the items inside the collection revert back to just "Object"'s
    instead of "Customer"'s. Any idea why?
    I'm using RemoteObject.

    Doh! Ok I solved my own problem. This might be a gotcha for
    others. Originally, I had code like this in the result handler for
    my remoteobject:
    var cust:Customer = Customer(event.result);
    But when I was testing returning an array of Customer
    objects, I changed my code to this just to see what was coming
    back:
    ObjectUtil.toString(event.result);
    When I did this, I removed any references to my Customer
    class so it did not get compiled. Once I added in a dummy reference
    to my Customer class, all worked well again.

  • DMA buffer mapping to array?

    Hi all!
    I'm working with a DMA capable camera that mapps images to a DMA buffer which is accessible from the native side. What I would like to do is to get access to the buffer from the Java side (e.g. as a byte array) without performing a copy operation. So to speak "point" the byte array to a specific memory adress containing the DMA buffer. Is this possible? If yes, how do I go about it?
    Currently I'm copying data from the DMA buffer to a byte array member variable at each read. But if possible it would be nice to remove the extra overhead this operation introduces.
    Thanks in advance,
    / Anders

    Hi Hervé,
    thank you for pointing to the UG section, indeed very powerful stuff!
    By using it I will be able to structure my data according to fit any external requirement.
    Attached is the test project where you can see that a (8 bit) data structure in SW memory
    is different from the generated HDL port structure (as described in my first post here).
    Looking at the HDL output I see that one part, the R member what is set to constant,
    is mapped 4 times to the lower side of the slv120 vector followed by the variable part.
    I do not understand this mapping, it prevent effective work as it forces the user to figure out
    how the actual mapping is applied and to remap this to the required structure.
    More critical, what if in further version of the tool this mapping schema changes ???
    Any idea how I can avoid the extra work?
    Thanks,
    Ric.
    d_o_TDATA &colon; OUT STD_LOGIC_VECTOR (95 downto 0);
    d_o_TDATA <= OUTPUT_STREAM_1_data_reg;
    -- OUTPUT_STREAM_1_data_reg assign process. --
    OUTPUT_STREAM_1_data_reg_assign_proc : process(ap_clk)
    begin
    if (ap_clk'event and ap_clk = '1') then
    if (ap_rst_n_inv = '1') then
    OUTPUT_STREAM_1_data_reg(0) <= '0'; -- .data.Pix[0].R
    OUTPUT_STREAM_1_data_reg(8) <= '0'; -- .data.Pix[1].R
    OUTPUT_STREAM_1_data_reg(16) <= '0';-- .data.Pix[2].R
    OUTPUT_STREAM_1_data_reg(24) <= '0';-- .data.Pix[3].R
    OUTPUT_STREAM_1_data_reg(32) <= '0';-- .data.Pix[0].G
    OUTPUT_STREAM_1_data_reg(33) <= '0';
    OUTPUT_STREAM_1_data_reg(34) <= '0';
    OUTPUT_STREAM_1_data_reg(94) <= '0';
    OUTPUT_STREAM_1_data_reg(95) <= '0';
     

  • MD randomly dropping partition from array

    Hello, folks! I am having some trouble with MD randomly removing a partition from one of my RAID-1 arrays. So far this has happened three times over the past couple weeks, but it only happens on boot.
    I have two 3TB WD SATA hard disks containing two RAID-1 volumes set up as follows:
    /dev/sda1 FAT32 EFI System Partition (250MiB)
    /dev/sdb1 Reserved Space (250MiB)
    /dev/sda2 Disk 0 of /dev/md0 with v0.90 metadata (250MiB)
    /dev/sdb2 Disk 1 of /dev/md0 with v0.90 metadata (250MiB)
    /dev/sda3 swap partition 0 encrypted with dm-crypt mapped to /dev/mapper/swapA (8GiB)
    /dev/sdb3 swap partition 1 encrypted with dm-crypt mapped to /dev/mapper/swapB (8GiB)
    /dev/sda4 Disk 0 of /dev/md1 with v1.2 metadata (2750GiB)
    /dev/sdb4 Disk 1 of /dev/md1 with v1.2 metadata (2750GiB)
    /dev/md1 is encrypted with LUKS and mapped to /dev/mapper/root
    /dev/mapper/root is the only volume in the LVM volume group rootvg
    the volume group rootvg currently has three logical volumes
    logical volume root is mapped to /dev/mapper/rootvg-root and is the file system root
    logical volume home is mapped to /dev/mapper/rootvg-home and is mounted /home
    logical volume var is mapped to /dev/mapper/rootvg-var and is mounted /var
    I also wrote this initcpio hook (I call it 'secdec'), with a bit of help from the Arch Wiki, which decrypts /dev/mapper/root, optionally with a openssl encrypted key file on a USB memory stick:
    run_hook ()
    local keyCopyDec keyCopyEnc keyMountPoint maxTries retryDelay \
    shutdownOnFail
    # customizable ############################################################
    keyCopyDec="/crypto_keyfile.bin" # temp storage for decrypted key data
    keyCopyEnc="/crypto_keyfile.enc" # temp storage for encrypted key data
    keyMountPoint="/ckey" # key storage device mount point
    maxTries=3 # max number of decrypt attempts
    retryDelay=2 # delay in seconds between retries
    shutdownOnFail=0 # shut down computer if decrypt fails
    #+0=yes, 1=no
    # /customizable ###########################################################
    local abortMsg passPromptKey passPromptVol passWrong secdecFormat \
    shutdownMsg
    local E_NOFILE
    local KEY NOKEY SSLKEY
    local CSQUIET OIFS
    local cryptDev cryptName keyDev keyFile keyFs keyType pass passPrompt \
    success tries
    abortMsg="Aborting..."
    passPromptKey="Key passphrase: "
    passPromptVol="LUKS passphrase: "
    passWrong="Invalid passphrase."
    secdecFormat="secdec=cryptdev:dmname:keydev:keyfs:keyfile"
    shutdownMsg="Shutting down computer. You may try again later."
    E_NOFILE=66
    KEY=1
    NOKEY=0
    SSLKEY=2
    OIFS=$IFS
    [ "$(echo "${quiet}" | awk '{print tolower($0)}')" == "y" ] && \
    CSQUIET=">/dev/null 2>&1"
    askForBooleanInput ()
    # Ask the user for boolean input.
    # $1: The question to pose.
    # $2: A string containing single characters, separated by spaces, which are
    #+keys pressed that would return boolean true (0).
    # $3: A string containing single characters, separated by spaces, which are
    #+keys pressed that would return a boolean false (1).
    # Returns 0 if the user presses a key that generates a character found in
    #+$2.
    # Returns 1 if the user presses a key that generates a character found in
    #+$3.
    # Returns 2 if an incorrect number of parameters was provided.
    local keyin
    [ ${#} -ne 3 ] && return 2
    echo -n "$1"
    while true; do
    read -sn1 keyin
    case "$keyin" in
    [$2]) echo "$keyin"; keyin=0; break;;
    [$3]) echo "$keyin"; keyin=1; break;;
    *) echo -n -e "\a";;
    esac
    done
    return $keyin
    askForPass ()
    # Ask the user to enter a pass{word|phrase}.
    # $1: The prompt to display.
    # $2: The name of the variable to assign the input pass{word|phrase} to.
    #+For example, to assign to $pass, $2 should be "pass".
    # Returns 0 on success or 1 if there is a parameter error.
    [ ${#} -ne 2 ] || [ -z "${1}" ] || [ -z "${2}" ] && return 1
    read -rsp "$1" "$2"
    echo
    isSsl ()
    # Examine a file for indications that it is SSL encrypted.
    # $1: Path to the key file to examine.
    # Returns 0 if the file appears to be SSL encrypted, 1 if the file does not
    #+appear to be SSL encrypted and $E_NOFILE if $1 is not a regular file.
    [ ! -f "${1}" ] && return $E_NOFILE
    [ "$(dd if="${1}" bs=1 count=8 2>/dev/null | \
    awk '{print tolower($0)}')" == "salted__" ]
    getKey ()
    # Attempt to find and copy a key from $keyDev to $keyCopyEnc.
    # $1: Path to the device containing the key data.
    # $2: Name of file system containing the key file.
    # $3: Path to the key file, relative to $4.
    # $4: Mount point of partition containing key file.
    # $5: Path to temporary copy of key file.
    # $6: Boolean value indicating whether to allow user the opportunity to
    #+switch key devices before attempting to find a key. This is useful if
    #+a key has already been tried and failed. The user could switch memory
    #+devices before trying again. 0=true, 1=false; default is false.
    # Returns one of $KEY, $NOKEY or $SSLKEY depending on what was found.
    local result wait
    if [ -z "${6}" ] || [ ${6} -eq 1 ]; then wait=1; else wait=0; fi
    mkdir -p "$4" >/dev/null 2>&1
    while true; do
    if [ ${wait} -eq 0 ]; then
    askForBooleanInput \
    "(S)earch for key or (R)evert to LUKS passphrase? " "s S" "r R"
    if [ ${?} -eq 0 ]; then result=$KEY; else result=$NOKEY; fi
    wait=1
    else
    result=$KEY
    fi
    if [ ${result} -eq ${KEY} ]; then
    if poll_device "${1}" ${rootdelay}; then
    mount -r -t "$2" "$1" "$4" >/dev/null 2>&1
    dd if="$4/$3" of="$5" >/dev/null 2>&1
    umount "$4" >/dev/null 2>&1
    if [ -f "${5}" ]; then
    isSsl "${5}" && result=$SSLKEY
    else
    err "Key $3 not found."
    unset result
    wait=0
    fi
    else
    err "Key device $1 not found."
    unset result
    wait=0
    fi
    fi
    [ -n "${result}" ] && break
    done
    return $result
    # If the secdec kernel parameter was not specified, inform the user, but
    #+allow init to continue in case another hook will work.
    if [ -z "${secdec}" ]; then
    echo "Missing parameter: $secdecFormat"
    return 0
    fi
    # Make sure required kernel modules are available.
    if ! /sbin/modprobe -a -q dm-crypt >/dev/null 2>&1 || \
    [ ! -e "/sys/class/misc/device-mapper" ]; then
    err "Required kernel modules not available."
    err "$abortMsg"
    exit 1
    fi
    if [ ! -e "/dev/mapper/control" ]; then
    mkdir -p "/dev/mapper" >/dev/null 2>&1
    mknod "/dev/mapper/control" c \
    $(cat /sys/class/misc/device-mapper/dev | sed 's|:| |') >/dev/null 2>&1
    fi
    # Parse the secdec kernel parameter, check it's format, make sure $cryptDev
    #+is available, and that it contains a LUKS volume.
    IFS=:
    read cryptDev cryptName keyDev keyFs keyFile <<EOF
    $secdec
    EOF
    IFS=$OIFS
    if [ $(echo "${secdec}" | awk -F: '{print NF}') -ne 5 ] || \
    [ -z "${cryptDev}" ] || [ -z "${cryptName}" ]; then
    err "Verify parameter format: $secdecFormat"
    err "$abortMsg"
    exit 1
    fi
    if ! poll_device "${cryptDev}" ${rootdelay}; then
    err "Device $cryptDev not available."
    err "$abortMsg"
    exit 1
    fi
    # Inform the user that $cryptDev doesn't contain a LUKS volume, but allow
    #+init to continue, in case another hook can handle this.
    if ! /sbin/cryptsetup isLuks "${cryptDev}" >/dev/null 2>&1; then
    echo "Device $cryptDev does not contain a LUKS volume."
    return 0
    fi
    # Attempt to open the LUKS volume.
    tries=0
    unset keyType
    while true; do
    success=1
    # Attempt to copy a decryption key.
    if [ -z ${keyType} ]; then
    getKey "$keyDev" "$keyFs" "$keyFile" "$keyMountPoint" \
    "$keyCopyEnc" 1
    keyType=$?
    elif [ ${keyType} -eq ${KEY} ]; then
    getKey "$keyDev" "$keyFs" "$keyFile" "$keyMountPoint" \
    "$keyCopyEnc" 0
    keyType=$?
    elif [ ${keyType} -eq ${SSLKEY} ]; then
    if askForBooleanInput "(U)se a different key or (T)ry again? " \
    "u U" "t T"; then
    getKey "$keyDev" "$keyFs" "$keyFile" "$keyMountPoint" \
    "$keyCopyEnc" 0
    keyType=$?
    fi
    fi
    # Open the LUKS volume.
    if [ ${keyType} -eq ${NOKEY} ]; then
    askForPass "$passPromptVol" "pass"
    /sbin/cryptsetup luksOpen "$cryptDev" "$cryptName" "$CSQUIET" <<EOF
    $pass
    EOF
    success=$?
    [ ${success} -ne 0 ] && err "$passWrong"
    else
    if [ ${keyType} -eq ${SSLKEY} ]; then
    askForPass "$passPromptKey" "pass"
    /sbin/openssl aes256 -pass pass:"$pass" -d -in "$keyCopyEnc" \
    -out "$keyCopyDec" >/dev/null 2>&1
    if [ ${?} -ne 0 ]; then
    rm -f "$keyCopyDec" >/dev/null 2>&1
    err "$passWrong"
    fi
    else
    mv "$keyCopyEnc" "$keyCopyDec" >/dev/null 2>&1
    fi
    if [ -f "${keyCopyDec}" ]; then
    /sbin/cryptsetup --key-file "$keyCopyDec" \
    luksOpen "$cryptDev" "$cryptName" "$CSQUIET"
    success=$?
    fi
    fi
    [ ${success} -ne 0 ] && err "Failed to open LUKS volume."
    tries=$(( $tries + 1 ))
    [ ${tries} -ge ${maxTries} ] || [ ${success} -eq 0 ] && break
    sleep "$retryDelay"
    done
    if [ ${success} -eq 0 ]; then
    if [ ! -e "/dev/mapper/${cryptName}" ]; then
    err "LUKS volume was opened, but failed to map to $cryptName."
    err "$abortMsg"
    exit 1
    fi
    echo "LUKS volume opened."
    else
    if [ ${shutdownOnFail} -eq 0 ]; then
    echo "shutdownMsg"
    poweroff -f
    fi
    exit 1
    fi
    The failing array is /dev/md1 and mdadm is reporting the following:
    mdadm --detail /dev/md1
    /dev/md1:
    Version : 1.2
    Creation Time : Wed May 30 18:50:05 2012
    Raid Level : raid1
    Array Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Used Dev Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Raid Devices : 2
    Total Devices : 1
    Persistence : Superblock is persistent
    Update Time : Wed Sep 12 03:34:52 2012
    State : clean, degraded
    Active Devices : 1
    Working Devices : 1
    Failed Devices : 0
    Spare Devices : 0
    Name : archiso:1
    UUID : 8ad37e84:f7261906:da3d317e:24080362
    Events : 44661
    Number Major Minor RaidDevice State
    0 8 4 0 active sync /dev/sda4
    1 0 0 1 removed
    mdadm --examine /dev/sda4
    /dev/sda4:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x0
    Array UUID : 8ad37e84:f7261906:da3d317e:24080362
    Name : archiso:1
    Creation Time : Wed May 30 18:50:05 2012
    Raid Level : raid1
    Raid Devices : 2
    Avail Dev Size : 5842934631 (2786.13 GiB 2991.58 GB)
    Array Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Used Dev Size : 5842934358 (2786.13 GiB 2991.58 GB)
    Data Offset : 2048 sectors
    Super Offset : 8 sectors
    State : clean
    Device UUID : abba1dc3:3fadf7a7:be452bb5:b8bbe97b
    Update Time : Wed Sep 12 03:37:48 2012
    Checksum : aad3e44b - correct
    Events : 44729
    Device Role : Active device 0
    Array State : A. ('A' == active, '.' == missing)
    mdadm --examine /dev/sdb4/dev/sdb4:
    Magic : a92b4efc
    Version : 1.2
    Feature Map : 0x0
    Array UUID : 8ad37e84:f7261906:da3d317e:24080362
    Name : archiso:1
    Creation Time : Wed May 30 18:50:05 2012
    Raid Level : raid1
    Raid Devices : 2
    Avail Dev Size : 5842934631 (2786.13 GiB 2991.58 GB)
    Array Size : 2921467179 (2786.13 GiB 2991.58 GB)
    Used Dev Size : 5842934358 (2786.13 GiB 2991.58 GB)
    Data Offset : 2048 sectors
    Super Offset : 8 sectors
    State : clean
    Device UUID : 09a09f49:b329feaa:3341111b:47b484fe
    Update Time : Wed Sep 12 01:50:34 2012
    Checksum : 1cdc19c0 - correct
    Events : 42869
    Device Role : Active device 1
    Array State : AA ('A' == active, '.' == missing)
    cat /proc/mdstat
    Personalities : [raid1]
    md0 : active raid1 sda2[0] sdb2[1]
    204736 blocks [2/2] [UU]
    md1 : active raid1 sda4[0]
    2921467179 blocks super 1.2 [2/1] [U_]
    unused devices: <none>
    This is md log info of the first reboot after my first recovery:
    Sep 9 20:18:03 localhost kernel: [ 1.784225] md: raid1 personality registered for level 1
    Sep 9 20:18:03 localhost kernel: [ 2.552971] md: md1 stopped.
    Sep 9 20:18:03 localhost kernel: [ 2.553418] md: bind<sdb4>
    Sep 9 20:18:03 localhost kernel: [ 2.553574] md: bind<sda4>
    Sep 9 20:18:03 localhost kernel: [ 2.554080] md/raid1:md1: active with 2 out of 2 mirrors
    Sep 9 20:18:03 localhost kernel: [ 2.554093] md1: detected capacity change from 0 to 2991582391296
    Sep 9 20:18:03 localhost kernel: [ 2.566266] md1: unknown partition table
    Sep 9 20:18:03 localhost kernel: [ 2.617922] md: md0 stopped.
    Sep 9 20:18:03 localhost kernel: [ 2.618382] md: bind<sdb2>
    Sep 9 20:18:03 localhost kernel: [ 2.618525] md: bind<sda2>
    Sep 9 20:18:03 localhost kernel: [ 2.619175] md/raid1:md0: active with 2 out of 2 mirrors
    Sep 9 20:18:03 localhost kernel: [ 2.619203] md0: detected capacity change from 0 to 209649664
    Sep 9 20:18:03 localhost kernel: [ 10.933334] md0: unknown partition table
    And this is the next time I rebooted:
    Sep 10 19:59:07 localhost kernel: [ 1.780481] md: raid1 personality registered for level 1
    Sep 10 19:59:07 localhost kernel: [ 2.806037] md: md1 stopped.
    Sep 10 19:59:07 localhost kernel: [ 2.806345] md: bind<sda4>
    Sep 10 19:59:07 localhost kernel: [ 2.806888] md/raid1:md1: active with 1 out of 2 mirrors
    Sep 10 19:59:07 localhost kernel: [ 2.806898] md1: detected capacity change from 0 to 2991582391296
    Sep 10 19:59:07 localhost kernel: [ 2.820308] md1: unknown partition table
    Sep 10 19:59:07 localhost kernel: [ 2.956599] md: md0 stopped.
    Sep 10 19:59:07 localhost kernel: [ 2.957149] md: bind<sdb2>
    Sep 10 19:59:07 localhost kernel: [ 2.957269] md: bind<sda2>
    Sep 10 19:59:07 localhost kernel: [ 2.958086] md/raid1:md0: active with 2 out of 2 mirrors
    Sep 10 19:59:07 localhost kernel: [ 2.958100] md0: detected capacity change from 0 to 209649664
    Sep 10 19:59:07 localhost kernel: [ 11.742281] md0: unknown partition table
    In between these two boots there are no reports of md failures. For some reason, its just dropping the second partition.
    I just did a restoration earlier today and on the very next boot, md refuses to use /dev/sdb4. Once I booted, I checked update times (not the ones listed) and /dev/sda4 and /dev/sdb4 were about 4 minutes apart. Since it takes only about a minute for Arch to reboot, including me typing my openssl key password, Arch was running for about 3 minutes without updating. I'm assuming this is of some significance since /dev/md0 reports perfect synchronization.
    All of this has been working very well for me for about 6 months now. Both hard drives, which I bought at the same time, are about 9 months old. I checked both drives using smartctl, and both report SMART enabled and passed. SMART attribute data doesn't make a lot of sense to me and I haven't looked up the format, but the reallocation event value is the same as the day I bought the drives, so I'm kind of assuming things are ok there, or at least bad sectors aren't being created.
    I hope I've provided all required details here. Any help would be appreciated.
    Last edited by cng1024 (2012-09-13 00:02:43)

    It would seem that nobody has any ideas about why this may be happening. I've done a complete diagnostic of both hard disks and both passed. I then downloaded the latest iso, formatted and reinstalled, but that failed after one reboot.
    I have a theory as to why it may be happening, but I haven't tested it yet. Perhaps someone can tell me if I may be on the right track here. I got to wondering what happens during shutdown. The root fs remounts ro during shutdown, but it does remain mounted which means everything under that, my logical volumes, LUKS and RAID are all still open when the system halts. I saved my original configs before I reformatted and it turns out I forgot to add the shutdown hook to the initcpio image which means my RAID wasn't being stopped before halt.
    I'm going to try a few experiments to see if adding the shutdown hook makes a difference. Hopefully I'm right, and I'll update either way, but I'd still appreciate it if someone with a bit more experience could weigh in on this.

  • How i can get a array in the current page?

    Can i send a array parameters from previous page to current page?
    the coding like below:
    // the coding in the previous page
    String[] strSend = {"a", "b", "c"};
    HashMap map = new HashMap(2);
    map.put("array", strSend);
    pageContext.setForwardURL(
    "OA.jsp?OAFunc=XXFMSRHISQF",
    null,
    KEEP_MENU_CONTEXT,
    null,
    map,
    true,
    ADD_BREAD_CRUMB_NO,
    IGNORE_MESSAGES );
    //the coding in the processRequest of the current pageCO.
    String strParam = pageContext.getParameter("array");
    the problem is that the type of "strParam" is a String.
    it's not a array of String. So it is not the parameter what i need.
    can u tell me how to get the array parameter from previous page. thanks.

    This cannot be achieved directly while using the setForwardURL method, all values that are there in the Hashmap will be appended when the redirection is done, so you cannot get the values that are there in the array object directly.
    Workaround that I can think of, put all the array values in a String object, appended by a delimiter, in the second page, after you do a getParameter(String), recover the values using a StringTokenizer and the delimiter that you used while appending the string values and store the values in a Array.
    Thanks
    Tapash

  • Array Of Primitive Type (kodo3.4)

    Hello,
    I want to map an array of primitive type (double[] or double[][] or...) to
    a blob, so I specified the mapping this way:
    <extension vendor-name="kodo" key="jdbc-field-map-name" value="blob">
    <extension vendor-name="kodo" key="column" value="DATA"/>
    </extension>
    As I use MySQL and not to have an exception, I have added:
    kodo.jdbc.DBDictionary: DriverDeserializesBlobs=false
    But when I tried to refresh using kodo.jdbc.meta.MappingTool, I get:
    [refresh] Exception in thread "main" kodo.util.FatalInternalException:
    Cannot map "fr.ifp.reservoir.model.business.geostat.Lithotype.facies".
    Check the class and make sure you are using only supported types.
    [refresh] at
    kodo.jdbc.meta.DynamicMappingProvider.createFieldMapping(DynamicMappingProvider.java:336)
    [refresh] at
    kodo.jdbc.meta.DynamicMappingProvider.getFieldMapping(DynamicMappingProvider.java:118)
    [refresh] at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
    [refresh] at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:993)
    [refresh] at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:973)
    [refresh] at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:939)
    [refresh] at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:659)
    [refresh] at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:801)
    [refresh] at
    kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:341)
    [refresh] at
    kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
    [refresh] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
    [refresh] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
    [refresh] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:591)
    [refresh] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:941)
    [refresh] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:879)
    [refresh] at kodo.jdbc.meta.MappingTool.main(MappingTool.java:802)
    Thanks for your help.
    nicolas

    Hi,
    No more succes with persistence-modifier="persistent"...
    My class:
    public class ArrayWrapper {
    private String name;
    private double[] array;
    public ArrayWrapper(String name, double[] array) {
    this.name = name;
    this.array = array;
    public double[] getValues() {
    return array;
    public String getName() {
    return name;
    My metadata file:
    <jdo>
    <package name="model">
    <class name="ArrayWrapper">
    <field name="array" persistence-modifier="persistent">
    <extension vendor-name="kodo" key="jdbc-field-map-name" value="blob">
    <extension vendor-name="kodo" key="column" value="DATA"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    My StackTrace:
    refresh-mapping:
    [java] Exception in thread "main" kodo.util.FatalInternalException:
    Cannot map "model.ArrayWrapper.array". Check the class and make sure you
    are using only supported types.
    [java] at
    kodo.jdbc.meta.DynamicMappingProvider.createFieldMapping(DynamicMappingProvider.java:336)
    [java] at
    kodo.jdbc.meta.DynamicMappingProvider.getFieldMapping(DynamicMappingProvider.java:118)
    [java] at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:470)
    [java] at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:993)
    [java] at
    kodo.jdbc.meta.AbstractClassMapping.getFieldMapping(AbstractClassMapping.java:973)
    [java] at
    kodo.jdbc.meta.AbstractClassMapping.getMappings(AbstractClassMapping.java:939)
    [java] at
    kodo.jdbc.meta.AbstractClassMapping.getDeclaredFieldMappings(AbstractClassMapping.java:659)
    [java] at
    kodo.jdbc.meta.AbstractClassMapping.resolve(AbstractClassMapping.java:801)
    [java] at
    kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:341)
    [java] at
    kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:431)
    [java] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:349)
    [java] at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:177)
    [java] at kodo.jdbc.meta.MappingTool.refresh(MappingTool.java:591)
    [java] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:941)
    [java] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:879)
    [java] at kodo.jdbc.meta.MappingTool.main(MappingTool.java:802)

  • How can I create arrays through the same recursive process?

    Hello again!
    I want to create some arrays with names like array1, array2, array3 etc
    through the same for loop.
    Do you know how this can be done? Thanks!
    for (int i = 0; i < 32; i++) {
    byte[] array???=new byte[400];
    }

    I want to create some arrays with names like array1,
    array2, array3 etc
    through the same for loop.
    Do you know how this can be done? Thanks!
    for (int i = 0; i < 32; i++) {
    byte[] array???=new byte[400]; You cannot create new names during runtime (array1, array2 are names).
    You can create a map that associates Strings with byte arrays though:Map<String, byte[]>  map= new HashMap<String, byte[]>();
    for (int i= 0; i < 32; i++)
       map.put("array"+i, new byte[400]);
    // get array associated with array26:
    int j= 26;
    byte[] oneOfTheArrays= map.get("array"+j);kind regards,
    Jos

  • Invoking stored procedure that returns array(oracle object type) as output

    Hi,
    We have stored procedures which returns arrays(oracle type) as an output, can anyone shed some light on how to map those arrays using JPA annotations? I tried using jdbcTypeName but i was getting wrong type or argument error, your help is very much appreciated. Below is the code snippet.
    JPA Class:
    import java.io.Serializable;
    import java.sql.Array;
    import java.util.List;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import org.eclipse.persistence.annotations.Direction;
    import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;
    import org.eclipse.persistence.annotations.StoredProcedureParameter;
    * The persistent class for the MessagePublish database table.
    @Entity
    @NamedStoredProcedureQuery(name="GetTeamMembersDetails",
         procedureName="team_emp_maintenance_pkg.get_user_team_roles",
         resultClass=TeamMembersDetails.class,
         returnsResultSet=true,
         parameters={  
         @StoredProcedureParameter(queryParameter="userId",name="I_USER_ID",direction=Direction.IN,type=Long.class),
         @StoredProcedureParameter(queryParameter="employeeId",name="I_EMPLOYEEID",direction=Direction.IN,type=Long.class),
         @StoredProcedureParameter(queryParameter="TEAMMEMBERSDETAILSOT",name="O_TEAM_ROLES",direction=Direction.OUT,jdbcTypeName="OBJ_TEAM_ROLES"),
         @StoredProcedureParameter(queryParameter="debugMode",name="I_DEBUGMODE",direction=Direction.IN,type=Long.class)
    public class TeamMembersDetails implements Serializable {
         private static final long serialVersionUID = 1L;
    @Id
         private long userId;
         private List<TeamMembersDetailsOT> teamMembersDetailsOT;
         public void setTeamMembersDetailsOT(List<TeamMembersDetailsOT> teamMembersDetailsOT) {
              this.teamMembersDetailsOT = teamMembersDetailsOT;
         public List<TeamMembersDetailsOT> getTeamMembersDetailsOT() {
              return teamMembersDetailsOT;
    Procedure
    PROCEDURE get_user_team_roles (
    i_user_id IN ue_user.user_id%TYPE
    , o_team_roles OUT OBJ_TEAM_ROLES_ARRAY
    , i_debugmode IN NUMBER :=0)
    AS
    OBJ_TEAM_ROLES_ARRAY contains create or replace TYPE OBJ_TEAM_ROLES_ARRAY AS TABLE OF OBJ_TEAM_ROLES;
    TeamMembersDetailsOT contains the same attributes defined in the OBJ_TEAM_ROLES.

    A few things.
    You are not using a JDBC Array type in your procedure, you are using a PLSQL TABLE type. An Array type would be a VARRAY in Oracle. EclipseLink supports both VARRAY and TABLE types, but TABLE types are more complex as Oracle JDBC does not support them, they must be wrapped in a corresponding VARRAY type. I assume your OBJ_TEAM_ROLES is also not an OBJECT TYPE but a PLSQL RECORD type, this has the same issue.
    Your procedure does not return a result set, so "returnsResultSet=true" should be "returnsResultSet=false".
    In general I would recommend you change your stored procedure to just return a select from a table using an OUT CURSOR, that is the easiest way to return data from an Oracle stored procedure.
    If you must use the PLSQL types, then you will need to create wrapper VARRAY and OBJECT TYPEs. In EclipseLink you must use a PLSQLStoredProcedureCall to access these using the code API, there is not annotation support. Or you could create your own wrapper stored procedure that converts the PLSQL types to OBJECT TYPEs, and call the wrapper stored procedure.
    To map to Oracle VARRAY and OBJECT TYPEs the JDBC Array and Struct types are used, these are supported using EclipseLink ObjectRelationalDataTypeDescriptor and mappings. These must be defined through the code API, as there is currently no annotation support.
    I could not find any good examples or doc on this, your best source of example is the EclipseLink test cases in SVN,
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/plsql/
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/
    James : http://www.eclipselink.org

  • JDev 9.0.3 can't generate stored procedure wrapper for ARRAY java type

    Hi,
    I have a java stored procedure which looks like this:
    public static void CurveFit(ARRAY in_x_y, ARRAY[] in_out_param) {
    I had no problem to generate a PL/SQL wrapper using JDev 3.2 mapping the ARRAY parameters to user-defined Oracle types. Here is the code JDev 3.2 generated:
    PROCEDURE curvefit(in_x_y IN fit_data, in_out_param IN OUT fit_params) AS
    LANGUAGE JAVA
    NAME 'CurveFitWrapper.CurveFit(oracle.sql.ARRAY, oracle.sql.ARRAY[])';
    Now I use JDev 9.0.3, but it refuses to add my function to the deployment profile. "Why not?" gives the following explanation: "Parameter #1 is of type oracle.sql.ARRAY which doesn't map to any PL/SQL data type". That's wrong! If I create the wrapper myself it works just fine.
    How to get around this situation? I don't want to go back to JDev 3.2...
    Regards,
    Plamen

    I have tried a disconnect/reconnect from within Jdev without success. First, I have to choose "disconnect" twice from the file->source control menu. (The first time I click it does nothing). Then during reconnect I choose my SCM connection, then I choose my workarea and get a pop up that says, "Failed to set my_workarea as the active workarea". I click "OK". Choose my workarea again and get another popup that is blank. Then I click "OK". Now I see a list of SCM connections. I keep getting the blank popup until I hit cancel. Now the overlay icons appear and it seems that I am in fact connected. But I still get the checkin/checkout exceptions. So I have to restart Jdev to get back to normal.
    I also tried executing the sql in the exception from SQL*Plus and it works perfectly.

  • In-Band Management configuration for f5100 array from T5440 on Solaris 10

    Hi All,
    I am trying to configure in-band management for storagetek array Sun Storage F5100 from T5440 server on Solaris 10.
    OS Installed on the server: Solaris 10 10/09
    Hardware : T5440
    Array : Sun Storage F5100
    Sun Storage F5100 have 20 FMODs which can see from format output. But In-Band management don't work, i want to manage it by CAM.
    /dev/rdsk/c2t0d0s2
    /dev/rdsk/c2t1d0s2
    /dev/rdsk/c2t2d0s2
    /dev/rdsk/c2t3d0s2
    /dev/rdsk/c2t4d0s2
    /dev/rdsk/c2t5d0s2
    /dev/rdsk/c2t6d0s2
    /dev/rdsk/c2t7d0s2
    /dev/rdsk/c2t8d0s2
    /dev/rdsk/c3t0d0s2
    /dev/rdsk/c3t1d0s2
    /dev/rdsk/c3t2d0s2
    /dev/rdsk/c3t3d0s2
    /dev/rdsk/c3t4d0s2
    /dev/rdsk/c3t5d0s2
    /dev/rdsk/c3t6d0s2
    /dev/rdsk/c3t7d0s2
    /dev/rdsk/c3t8d0s2
    Below are the packages i installed:
    host_sw_solaris_6.6.0.11
    SMagent-SOL-90.01.02.05.pkg
    SMruntime-SOL-90.60.02.01.pkg
    once after i installed the above packages i am getting below error
    SANtricity Storage Manager Agent, Version 90.01.02.05
    Built Wed May 06 06:21:07 CDT 2009
    Copyright 2009 Sun Microsystems Inc. All rights reserved. Use is subject to license agreement.
    Checking device /dev/rdsk/c0t2d0s2 : Skipping
    Checking device /dev/rdsk/c0t3d0s2 : Skipping
    Checking device /dev/rdsk/c2t0d0s2 : Skipping
    Checking device /dev/rdsk/c2t1d0s2 : Skipping
    Checking device /dev/rdsk/c2t2d0s2 : Skipping
    Checking device /dev/rdsk/c2t3d0s2 : Skipping
    Checking device /dev/rdsk/c2t4d0s2 : Skipping
    Checking device /dev/rdsk/c2t5d0s2 : Skipping
    Checking device /dev/rdsk/c2t6d0s2 : Skipping
    Checking device /dev/rdsk/c2t7d0s2 : Skipping
    Checking device /dev/rdsk/c2t8d0s2 : Skipping
    Checking device /dev/rdsk/c3t0d0s2 : Skipping
    Checking device /dev/rdsk/c3t1d0s2 : Skipping
    Checking device /dev/rdsk/c3t2d0s2 : Skipping
    Checking device /dev/rdsk/c3t3d0s2 : Skipping
    Checking device /dev/rdsk/c3t4d0s2 : Skipping
    Checking device /dev/rdsk/c3t5d0s2 : Skipping
    Checking device /dev/rdsk/c3t6d0s2 : Skipping
    Checking device /dev/rdsk/c3t7d0s2 : Skipping
    Checking device /dev/rdsk/c3t8d0s2 : Skipping
    The SMagent service attempted to start but terminated. Possible causes include: [1] The access volume is disabled in NVSRAM. [2] No controllers with compatible firmware were found. [3] The default logical unit number (LUN) assigned to the access volume (typically 7 or 31) is not in the range supported by the host or is already in use by the host for another device. See your storage management documentation for more details.
    Jul 23 13:56:47 sol10 SMagent: The SMagent service attempted to start but terminated. Possible causes include: [1] The access volume is disabled in NVSRAM. [2] No controllers with compatible firmware were found. [3] The default logical unit number (LUN) assigned to the access volume (typically 7 or 31) is not in the range supported by the host or is already in use by the host for another device. See your storage management documentation for more details.
    As per sun documentation i ran the below commands, but still i am getting above error.
    # setenv LD_LIBRARY_PATH /opt/SMgr/agent
    # java -classpath /opt/SMgr/agent/SMagent.jar devmgr.versioned.agent.DeviceIdentifier | grep "Volume Access"
    But any output with above commands.
    Any help would be really help ful.
    Thanks,
    gebilong

    Make sure the mapping to Access Group has not been deleted.
    Use the command /opt/SUNWsefms/bin/lsscs list -a array mappingYou must see samething like
    Volume:Access  LUN: 31mapped.via mapped.via.default.groupmapped.target.type mapped.via.default.group  Permission: Read Only
    ...If you don't see this recreate mapping
    /opt/SUNWsefms/bin/lsscs  map -a array -l 31 volume Accessand restart agent
    /etc/init.d/SMagent start

Maybe you are looking for