MDS persistence for column within a loop

Hello,
I am trying out basic setup of MDS. I was able to make it work for most of my columns except for a column within a loop. I also tried using the ADF Read Only Dynamic table and it is not persisting any of the columns of the table, since it is inside the loop.
I would like to know if this is a bug when you apply MDS to component that has id that is dynamically incremented/generated.
mds customization file - c18 i s missing which should correspond to the dynamic column
<?xml version = '1.0' encoding = 'UTF-8'?>
<mds:customization version="11.1.1.60.13" xmlns:mds="http://xmlns.oracle.com/mds">
<mds:modify element="c17">
<mds:attribute name="displayIndex" value="1"/>
</mds:modify>
<mds:modify element="c21">
<mds:attribute name="displayIndex" value="2"/>
</mds:modify>
<mds:modify element="c16">
<mds:attribute name="displayIndex" value="3"/>
</mds:modify>
<mds:modify element="c20">
<mds:attribute name="displayIndex" value="4"/>
</mds:modify>
<mds:modify element="c19">
<mds:attribute name="displayIndex" value="5"/>
</mds:modify>
<mds:modify element="c28">
<mds:attribute name="displayIndex" value="6"/>
</mds:modify>
<mds:modify element="c27">
<mds:attribute name="displayIndex" value="11"/>
</mds:modify>
<mds:modify element="c22">
<mds:attribute name="displayIndex" value="12"/>
</mds:modify>
<mds:modify element="c15">
<mds:attribute name="displayIndex" value="0"/>
</mds:modify>
</mds:customization>
jspx related to the display, just to show the component id. In blue is the logic/code for dynamically displaying a column and the dropdown and contents of the dropdown
<af:forEach
items="#{pageFlowScope.SearchRules.filterBeans}" varStatus="index" var="def">
*<af:column id="c18" headerText="#{def.parameterDisplayName}">*
<af:selectOneChoice value="#{row.dataProvider.ruleColumns[index.index].attributeId}"
disabled="#{!(sessionScope.usersession.ruleAuth.isRoleForCreateEditRule and row.dataProvider.ruleColumns[index.index].isEdit)}"
clientComponent="true"
helpTopicId="#{row.dataProvider.ruleColumns[index.index].ruleTypeParameterID}"
autoSubmit="true" shortDesc="#{row.message}"
id="soc4445" valuePassThru="true"
valueChangeListener="#{pageFlowScope.SearchRules.ccsChange}">
<af:forEach items="#{bindings.Rule.rangeSet}" varStatus="att" >
<af:selectItem label="#{row.dataProvider.ruleColumns[index.index].attributes[att.index].assignedAttributeValue}"
value="#{row.dataProvider.ruleColumns[index.index].attributes[att.index].assignedAttributeID}"
rendered="#{row.dataProvider.ruleColumns[index.index].attributeSize > att.index}"
id="si4"/>
</af:forEach>
<!--f:selectItems value="#{row.dataProvider.ruleColumns[index.index].attributes}"
id="si4"/-->
</af:selectOneChoice>
</af:column>
</af:forEach>
Thanks,
Catherine

Hi,
the problem actually is that the id is the same for all of the occurences. So the forEach loop should create unique IDs for each occurence of a component.
Frank

Similar Messages

  • Column alias for spatial column within cursor loop using dynamic SQL

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

  • Getting problem to generate loop for column of dataTable

    Hi everyone, I am trying to generate loop for column of my <h:dataTable rows="1" width="1500" value="#{HeadWiseCrimeMngBean.distName}" styleClass="font-right" var="drow" border="1" >
    <c:forEach begin="0" end="#{HeadWiseCrimeMngBean.vectSize}" items="#{HeadWiseCrimeMngBean.counter}" var="index">
    <h:column>
    <h:panelGrid border="0" cellpadding="0" cellspacing="0" width="100" columns="1" >
    <h:outputText value="#{drow[index]}"/>
    </h:panelGrid>
    </h:column>
    </c:forEach>
    </h:dataTable>
    but I am getting java.lang.NumberFormatException: exception
    my bean file is
    * HeadWiseCrimeMngBean.java
    * Created on August 27, 2007, 3:10 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package gov.nic.cipa.cipaweb.dto;
    import gov.nic.cipa.cipaweb.bo.HeadWiseCrimeReportBO;
    import gov.nic.cipa.cipaweb.bo.Utility;
    import java.sql.Date;
    import java.util.Vector;
    * @author cipa
    public class HeadWiseCrimeMngBean {
    /** Creates a new instance of HeadWiseCrimeMngBean */
    public HeadWiseCrimeMngBean() {
    private Date startDate = Utility.getDatabaseDate(Utility.getDateFromDateString("01-07-2007"));
    private Date endDate = Utility.getDatabaseDate(Utility.getDateFromDateString("10-07-2007"));
    private String statCode = "08";
    private String recp = "ps";
    private String distCode="173";
    private String type="w";
    private Vector vec = new Vector();
    public Date getStartDate() {
    return startDate;
    public void setStartDate(Date startDate) {
    this.startDate = startDate;
    public String getStateCode() {
    return statCode;
    public void setStateCode(String statCode) {
    this.statCode = statCode;
    public String getRecp() {
    return recp;
    public void setRecp(String recp) {
    this.recp = recp;
    public Date getEndDate() {
    return endDate;
    public void setEndDate(Date endDate) {
    this.endDate = endDate;
    public String getDistCode() {
    return distCode;
    public void setDistCode(String distCode) {
    this.distCode = distCode;
    public String getType() {
    return type;
    public void setType(String type) {
    this.type = type;
    public int getVectSize() {
    Vector ver=null;
    int size=0;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    if(recp.equals("dist"))
    try {
    ver=hcrbo.districtVect(getStateCode());
    } catch (Exception ex) {
    ex.printStackTrace();
    }else if(recp.equals("ps"))
    try {
    ver=hcrbo.psVect(getDistCode());
    } catch (Exception ex) {
    ex.printStackTrace();
    size=ver.size();
    return size;
    public int getCurrentYear()
    int year=0;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    try {
    year=hcrbo.getCurrentYear(getStartDate());
    } catch (Exception ex) {
    ex.printStackTrace();
    return year;
    public int getPreviousYear()
    int year=0;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    try {
    year=hcrbo.getPreviousYear(getStartDate());
    } catch (Exception ex) {
    ex.printStackTrace();
    return year;
    public Vector getDistName() throws Exception
    Vector distName=null;
    HeadWiseCrimeReportBO hcrbo=new HeadWiseCrimeReportBO();
    try {
    distName=hcrbo.districtVect(getStateCode());
    } catch (Exception ex) {
    ex.printStackTrace();
    return distName;
    public int getCounter() throws Exception
    int c=0;
    return c++;
    public Vector getDetails() throws Exception{
    HeadWiseCrimeReportBO bo = new HeadWiseCrimeReportBO();
    vec = bo.reterive(getStartDate(),getEndDate(),getStateCode(),getDistCode(),getType(),getRecp()) ;
    return vec;
    public static void main(String ar[])
    Vector v=new Vector();
    int p;
    HeadWiseCrimeMngBean a=new HeadWiseCrimeMngBean();
    try{
    p=a.getVectSize();
    System.out.println(p);
    }catch(Exception e)
    {e.printStackTrace();}
    can anyone please tell me what is wrong here.............
    Message was edited by:
    mayank_mca

    I've been able to create all of these except the profile. It works for non DEFAULT named profiles. For instance we have a profile named DBA_PROF that I can create the DDL for.

  • Popup Key LOV, NULL and "Invalid numeric value undefined for column"

    Hello.
    I've created an item based on database column of NUMBER type and set the following properties:
    Display As = Popup Key LOV (Displays description, returns key value)
    List of values definition=select 'display_value' d, 1 r from dual
    Null display value=%
    Null return value=
    Display Null=Yes
    When I select "%" in the LOV and try to apply changes to database I get error:
    ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
    Error Unable to process row of table TTT.
    If I set Display As = Select List, all works fine. But I need Popup Key LOV.
    Could anybody help me?
    I use Application Express 2.2.1.00.04

    Hi all,
    I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
    Here's what I did:
    1. Create an Application Process.
    Name: RemoveNulls
    Sequence: 0
    Point: On Submit: After Page Submission - Before Computations and Validations
    Process Text:
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
               AND LOV_NULL_VALUE   IS NULL
        LOOP
            IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Error Message: #SQLERRM#Condition: None
    2. You should be able to submit a Popup Key LOV with a NULL value now.
    Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
    Georger

  • Student lost ability to audition loops within the loop browser

    Colleagues,
    My students were composing songs using GarageBand 3.0.4 in our Mac Lab.
    Two of my students showed me that, after they'd laid down three or four tracks by dragging loops into the main window, they could no longer get loops to play inside the loop browser. They would click on a loop, and nothing would happen.
    The loop would play once it was clicked and dragged into the window, but it would not play from inside the loop browser.
    Does anyone have any idea what my students might have done that could cause them to be unable to audition loops from within the loop browser?
    Thanks in advance for any insight you might be able to provide.
    Paul Daniels
    Pennridge Central MS
    144 North Walnut Street
    Perkasie, PA 18944

    Just drop them on the Loop Browser and the rest should be taken care of.

  • How to create a fixed-width column within an APEX 4 interactive report?

    This thread is a follow-up to {message:id=9191195}. Thanks fac586.
    Partial success: The following code provided by fac586 limits the column width of the Apex 4 interactive report column as long as the column data contains whitespace within a Firefox 3.6 browser:
    <pre class="jive-pre">
    <style type="text/css">
    th#T_DESCRIPTION {
    width: 300px;
    td[headers="T_DESCRIPTION"] {
    width: 300px;
    word-wrap: break-word;
    </style>
    </pre>
    Notes:
    1. The code above is put into the HTML header section for the page.
    2. T_DESCRIPTION is defined as VARCHAR2(2000).
    3. The code above works within the Firefox 3.6.12 browser but does not work within the Internet Explorer 7.0.5730.13 browser.
    I tried adding "float: left;":
    <pre class="jive-pre">
    <style type="text/css">
    th#T_DESCRIPTION {
    width: 300px;
    td[headers="T_DESCRIPTION"] {
    width: 300px;
    word-wrap: break-word;
    <font color="red"> float: left;</font>
    </style>
    </pre>
    Notes:
    1. "float: left;" does not require whitespace and successfully splits the column between characters in lieu of whitespace.
    2. "float: left;" shrinks the cell height and allows the page background to show through... couldn't determine how to fix this.
    3. The code above works within the Firefox 3.6.12 browser but does not work within the Internet Explorer 7.0.5730.13 browser.
    I've done some more research, but I still haven't discovered how to create a fixed-width column within an APEX 4 interactive report that displays properly within an Internet Explorer 7 browser.
    Any ideas and help will be appreciated.

    Thanks for your help with this!
    <pre class="jive-pre">
    what theme are you using?
    </pre>
    A customized version of theme 15.
    <pre class="jive-pre">
    Floating a table cell makes no sense (to me anyway).
    </pre>
    You are correct. I was just trying a different approach ... trying to think out of the box.
    <pre class="jive-pre">
    Think you'll need to create an example on apex.oracle.com with sample data
    if there are any further problems.
    </pre>
    Great suggestion! The code your provided works in the Firefox 3.6.12 browser, but still doesn't work within my Internet Explorer 7.0.5730.13 browser.
    UPDATE:
    I have recreated the problem at apex.oracle.com, you can use the following information to check it out:
    URL: http://apex.oracle.com/pls/apex/f?p=43543:100::::::
    Workspace: IR_FIXED_WIDTH_COLS
    Username: GUEST
    Password: Thx4help
    Application: 43543 - CM_RANDY_SD
    Note: Table name is TEST_DATA
    The following code provided by fac586 works in both Firefox 3.6 and IE7 using default theme "21. Scarlet" at apex.oracle.com; however, it doesn't work when I use a copy of our customized theme "101. Light Blue":
    <pre class="jive-pre">
    <style type="text/css">
    .apexir_WORKSHEET_DATA {
    th#T_DESCRIPTION {
    width: 300px;
    max-width: 300px;
    td[headers="T_DESCRIPTION"] {
    max-width: 300px;
    word-wrap: break-word;
    </style>
    <!--[if lt IE 8]>
    <style type="text/css">
    /* IE is broken */
    th#T_DESCRIPTION,
    td[headers="T_DESCRIPTION"] {
    width: 300px;
    </style>
    <![endif]-->
    </pre>
    Any idea what in the theme could be causing the fixed width column to be ignored in IE 7?
    Edited by: CM Randy SD on Dec 7, 2010 11:22 AM

  • How do i change the number of columns within a text box?  I need to go from three columns to one.

    How do I change the number of columns within a text box?  I need to go from 3 columns to 1.  The insert column is highlighted and column break does not work for this.

    Pages '09 does not seem to allow layout breaks in Textboxes.
    Pages 5.2 has the same limitation.
    Use multiple linked Textboxes in Pages '09 to get the layout you want or create your layout in a Word Processing template in the document layer.
    Peter

  • Add a for each script to loop through HTTPService?

    I'm using Flash Builder 4 with the Flex 4.1 SDK.  I want to add a "for each" script to loop through my HTTPService XML file so only each nepName displays only once in my dropdown list.  In my XML file I have multiple records associated with nepName.  I would like ALL the records associated with each nepName to populate in my datagrid when it is selected from the dropdown.  Currently in my dropdown there is a nepName entry for each XML tag.  I hope I was able to explain that well enough. I'll try to put my code below so you can see everything I'm working with.
    MXML:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:esri="http://www.esri.com/2008/ags"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="nepInfo.send()">
        <s:layout>
            <s:VerticalLayout horizontalAlign="center" paddingTop="25"/>
        </s:layout>
        <fx:Declarations>
            <s:HTTPService id="nepInfo" url="http://www.epa.gov/owow/estuaries/nep_info.xml"/>
            <!--s:RadioButtonGroup id="optiongroup"/-->
        </fx:Declarations>
        <s:Panel title="NEP Project Information">
            <s:layout>
                <s:VerticalLayout/>
            </s:layout>
            <s:HGroup verticalAlign="middle">
        <mx:Form x="188" y="34" width="338">
        <mx:FormItem label="Search for NEP Information:">
        <s:DropDownList enabled="true" id="dropDownList" prompt="Select NEP" dataProvider="{nepInfo.lastResult.records.record}" labelField="nepName">
        </s:DropDownList>
        </mx:FormItem>
        </mx:Form>       
            </s:HGroup>   
            <mx:DataGrid id="resultsGrid"
                         dataProvider="{dropDownList.selectedItem}"
                         visible="{dropDownList.selectedItem != null}" x="20" y="62" width="1166" height="620">
                <mx:columns>
                    <mx:DataGridColumn dataField="projectName" headerText="Project Name" wordWrap="true"/>
                    <mx:DataGridColumn dataField="projectDescription" headerText="Project Description" wordWrap="true"/>
                    <mx:DataGridColumn dataField="acres" headerText="Acres" wordWrap="true"/>
                    <mx:DataGridColumn dataField="habitatDescription" headerText="Habitat Description" wordWrap="true"/>
                    <mx:DataGridColumn dataField="neportCategory" headerText="Habitat Category" wordWrap="true"/>
                    <mx:DataGridColumn dataField="restorationType" headerText="Restoration Type" wordWrap="true"/>
                    <mx:DataGridColumn dataField="leadPartner" headerText="Lead Partner" wordWrap="true"/>
                </mx:columns>
            </mx:DataGrid>
        </s:Panel>
    </s:Application>
    XML: http://www.epa.gov/owow/estuaries/nep_info.xml
    Thank you in advance for your help!
    -Alison

    ($file, pwd);Assuming "pwd" is meant as the current directory, here a small example :
    TEST@db102 SQL> create or replace procedure test_proc (p1 varchar2, p2 varchar2)
      2  is
      3  begin
      4     dbms_output.put_line (p1||' '||p2);
      5  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ ls -l /tmp/test/*.sql
    -rw-r--r--  1 ora102 dba  69 Apr 18 23:23 /tmp/test/file1.sql
    -rw-r--r--  1 ora102 dba 112 Apr 18 23:23 /tmp/test/file2.sql
    -rw-r--r--  1 ora102 dba 120 Apr 18 23:23 /tmp/test/file3.sql
    $ cat test_proc.sh
    DIR=/tmp/test
    cd $DIR
    ls *.sql | while read file
    do
            echo "Processing file $file"
            sqlplus -s test/test << EOF
    set feed off
    set pages 0
    set serveroutput on
    exec test_proc('$file', '`pwd`');
    exit
    EOF
    done
    $ ./test_proc.sh
    Processing file file1.sql
    file1.sql /tmp/test
    Processing file file2.sql
    file2.sql /tmp/test
    Processing file file3.sql
    file3.sql /tmp/test
    $

  • EXEC SQL Error: ORA-01401: Inserted value too large for column

    Getting this SQL Error: ORA-01401: Inserted value too large for column..on an EXEC SQL Insert statement when writing to an
    external Oracle DB from SAP.
    On further analysis..it appears that this happens to the fields..when the string length matches the field length.
    Example:  Plant field is defined as char(4) on the SAP side and it is a Varchar2(4) on the Oracle side.
    When a value like '1015' is passed thru a variable in the insert statement then this ORA-01401 error pops up.
    No error:
       - if the value '1015' is passed directly in the insert statement to the external table  (or)
       - when a value with 3 chars or less(like the first three chars..101) is passed thru a variable  defined as 'Plant(4) type c'.
       - when using EXEC sql within SAP
       - when reading from the external db table
    This was working ok until the  Oracle Patch P9147110 was installed recently.
    Any suggestions !

    Hello Dvas,
    what's the characterset of your external database?
    What's the column definition in your external database (byte or character based)?
    If you use a characeterset like UTF8 it is possible, that one character needs more than one byte and then you will run into such kind of issues if the definition is too small.
    Regards
    Stefan

  • Inserted value too large for column Error

    I have this table:
    CREATE TABLE SMt_Session
         SessionID int NOT NULL ,
         SessionUID char (36) NOT NULL ,
         UserID int NOT NULL ,
         IPAddress varchar2 (15) NOT NULL ,
         Created timestamp NOT NULL ,
         Accessed timestamp NOT NULL ,
         SessionInfo nclob NULL
    and this insert from a sp (sp name is SMsp_SessionCreate):
         Now := (SYSDATE);
         SessionUID := SYS_GUID();
         /*create the session in the session table*/
         INSERT INTO SMt_Session
                   ( SessionUID ,
                   UserID ,
                   IPAddress ,
                   Created ,
                   Accessed )
         VALUES           ( SMsp_SessionCreate.SessionUID ,
                   SMsp_SessionCreate.UserID ,
                   SMsp_SessionCreate.IPAddress ,
                   SMsp_SessionCreate.Now ,
                   SMsp_SessionCreate.Now );
    It looks like the param SessionUID is the one with trouble, but the length of sys_guid() is 32, and my column has 36.
    IPAddress is passed to the sp with value '192.168.11.11', so it should fit.
    UserID is 1.
    I am confused, what is the column with problem ?

    CREATE OR REPLACE PROCEDURE SMsp_SessionCreate
         PartitionID IN      INT ,
         UserID IN      INT ,
         IPAddress IN      VARCHAR2 ,
         SessionID IN OUT      INT,
         SessionUID IN OUT      CHAR,
         UserName IN OUT      VARCHAR2,
         UserFirst IN OUT      VARCHAR2,
         UserLast IN OUT      VARCHAR2,
         SupplierID IN OUT      INT,
         PartitionName IN OUT      VARCHAR2,
         Expiration IN      INT ,
         RCT1 OUT      GLOBALPKG.RCT1
    AS
         Now DATE;
         SCOPE_IDENTITY_VARIABLE INT;
    BEGIN      
         Now := SYSDATE;
         -- the new Session UID      
         SessionUID := SYS_GUID();
         /*Cleanup any old sessions for this user*/
         INSERT INTO SMt_Session_History
                   ( UserID ,
                   IPAddress ,
                   Created ,
                   LastAccessed ,
                   LoggedOut )
         SELECT
                   UserID,
                   IPAddress,
                   Created,
                   Accessed,
                   TO_DATE(Accessed + (1/24/60 * SMsp_SessionCreate.Expiration))
         FROM SMt_Session
         WHERE     UserID = SMsp_SessionCreate.UserID;
         --delete old     
         DELETE FROM SMt_Session
         WHERE UserID = SMsp_SessionCreate.UserID;
         /*create the session in the session table*/
         INSERT INTO SMt_Session
                   ( SessionUID ,
                   UserID ,
                   IPAddress ,
                   Created ,
                   Accessed )
         VALUES           ( SMsp_SessionCreate.SessionUID ,
                   SMsp_SessionCreate.UserID ,
                   SMsp_SessionCreate.IPAddress ,
                   SMsp_SessionCreate.Now ,
                   SMsp_SessionCreate.Now );
         SELECT SMt_Session_SessionID_SEQ.CURRVAL INTO SMsp_SessionCreate.SessionID FROM dual;
         --SELECT SMt_Session_SessionID_SEQ.CURRVAL INTO SCOPE_IDENTITY_VARIABLE FROM DUAL;
         --get VALUES to return
         SELECT u.AccountName INTO SMsp_SessionCreate.UserName FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.SupplierID INTO SMsp_SessionCreate.SupplierID FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.FirstName INTO SMsp_SessionCreate.UserFirst FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.LastName INTO SMsp_SessionCreate.UserLast FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         BEGIN
              FOR REC IN ( SELECT
                   u.AccountName,
                   u.SupplierID,
                   u.FirstName,
                   u.LastName FROM SMt_Users u
         WHERE     UserID = SMsp_SessionCreate.UserID
              LOOP
                   SMsp_SessionCreate.UserName := REC.AccountName;
                   SMsp_SessionCreate.SupplierID := REC.SupplierID;
                   SMsp_SessionCreate.UserFirst := REC.FirstName;
                   SMsp_SessionCreate.UserLast := REC.LastName;
              END LOOP;
         END;
         BEGIN
              FOR REC IN ( SELECT PartitionName FROM SMt_Partitions
         WHERE     PartitionID = SMsp_SessionCreate.PartitionID
              LOOP
                   SMsp_SessionCreate.PartitionName := REC.PartitionName;
              END LOOP;
         END;
         /*retrieve all user roles*/
         OPEN RCT1 FOR
         SELECT RoleID     FROM SMt_UserRoles
         WHERE     UserID = SMsp_SessionCreate.UserID;
    END;
    this is the exact code of the sp. The table definition is this:
    CREATE TABLE SMt_Session
    SessionID int NOT NULL ,
    SessionUID char (36) NOT NULL ,
    UserID int NOT NULL ,
    IPAddress varchar2 (15) NOT NULL ,
    Created timestamp NOT NULL ,
    Accessed timestamp NOT NULL ,
    SessionInfo nclob NULL
    The sp gets executed with this params:
    PARTITIONID := -2;
    USERID := 1;
    IPADDRESS := '192.168.11.11';
    SESSIONID := -1;
    SESSIONUID := NULL;
    USERNAME := '';
    USERFIRST := '';
    USERLAST := '';
    SUPPLIERID := -1;
    PARTITIONNAME := '';
    EXPIRATION := 300;
    if I ran the code inside the procedure in sql+ (not the procedure), it works. when i call the sp i get the error
    inserted value too large for column
    at line 48

  • Can I perform persistence activities from within a JPA lifecycle event

    I have a question about what is valid while inside JPA lifecycle events like @PrePersist or even Eclipselink lifecycles like postBuild. I would like to perform persist and delete operations from within these lifecycles, however they seem to get lost when the commit finally happens at the end of the transaction.
    Is this not valid...and if not how to I perform persistence operations from within these lifecycles. For example I may want to delete objects from a @PostDelete.
    Thanks.

    I don't see any reason why doing a persist() or remove() from instead a JPA PrePersist or PostRemove event would not work. What is your code for your event? Make sure you use the same EntityManager.
    For the EclipseLink events, most of the write events are raised during the commit, so it is too late to perform a JPA operation such as persist(). You can however use EclipseLink DatabaseQuery to insert or delete objects, but you need to be careful doing this. In general it may be better to put this logic in your application instead of events.
    James : http://www.eclipselink.org

  • Varying number of columns within same text box

    I am reposting this here as suggested. This has been submitted to the feature request. If you are also interested in this feature, please also submit it there.
    here is original posting with replies:
    http://www.adobeforums.com/webx?224@@[email protected]
    One feature still missing (correct me if I am wrong) is to have number of columns applied to paragraphs not text boxes.
    This is a constant hassal having to interupt the text box with a new text box and then another one after that just because you want a paragraph to be in muliple columns to save space for instance, or using some other work around like inline text boxes.
    This is useful when trying to save space on a page, if you have short bullets, such as a list of items which if just left in a single column would leave a lot of white space to the right side of the column. Use this paragraph as an example. Pretend this is the lead in paragraph referring to the followng list. Include these items in your recycling:
    -plastic bottles
    -paper cups
    -styrofoam
    -tires
    -fruit
    -vegetables
    -glass jars
    -batteries
    -cans
    -drink boxes
    -bones
    -dairy products
    -pet hair
    -newspapers
    -magazines
    As you can see the list can get very long, and so breaking the list across a number of columns would really save space, as the bullets are just single words.
    I have this situation everyday in the work I do and it is a real pain to have to redraw a new text box for each instance, and then another one to follow it.
    And of course there is the whole headings that span multiple columns issue too.
    I could forsee a feature where you would simply select the number of paragraphs and then change the number of columns. If it went to another page, then the number of comumns would still be applied as it is applied now to a text box.

    Thanks for your suggestions, Eugene. That's what users helping users is all
    about!
    However, we build the document (a book with hundreds of pages)
    automatically, importing and autoflowing tagged text. Manual intervention
    doesn't meet the need.
    It's silly that a title or introduction should have to be in a different
    frame from the rest of the text, just because the title/intro is
    single-column and the text is multi-column. Ventura Publisher supported
    paragraphs spanning columns 20 years ago. Adobe, get with the times!
    Darrel Eppler
    Global Publishing Services
    SIL International
                                                                                    Eugene Tyson                                             
                 <[email protected]                                        
                 >                                                          To
                                           DARREL EPPLER                  
                 05/21/2009 03:18          <[email protected]>        
                 AM                                                         cc
                                                                                    Subject
                 Please respond to         varying
                 clearspace-118700         number of columns within same text
                 4112-1NVP-2-8iM2@         box                            
                 mail.forums.adobe                                        
                       .com                                                                               
    If you need to make it go from 1 column into multiple columns in a layout
    then it stands to reason that you also need the content to remain in the
    multiple columns.
    There are various ways to do this.
    1. Using Tables: You can have as many columns and rows as you like. The con
    about this is that tables cannot break over pages, so you have to manually
    split the cell so that the content fits.
    2. Use Tabs: This can be awkward if your text is already in a list format,
    it involves cut and paste and isn't "that" easy to implement. If the text
    is already in a layout format that suits then putting in tabs would work
    fine. The advantage is that this can break easily over pages/columns etc.
    It's flexible to adjust the spacing etc. But it can be awkward to setup,
    especially if there is a long list that needs to be in 2 or columns...
    so then you have this option:
    3. Use an anchored text frame: If you cut the content from your text frame
    and paste it into a new text frame: Then anchor the new text frame into the
    layout. You can specify the amount of columns in the anchored text frame.
    The frame will move with the text, but just like tables, they won't split
    over pages.
    I've used all 3 on many occasions depending on what scenario came up -
    different layouts need different workarounds.
    But they shouldn't be work arounds, it should be just select this text and
    put it into x amount of columns, and it should all flow without having to
    do much else.

  • Multiple Columns within tableview column

    Hi All,
    I need to display a tableview which will have multiple columns within a column. It is much like using 'fixedColumn' attribute in tableviewcolumn for rows.
    Can a similar functionality be implemented for multiple columns?
    Thanks in advance,
    Rohit

    hi
    One method is already told you here is another method of doing this:
    let say you want your third column to be another table do it like this with out using iterator
    even you can control its display by embedding if... endif on layout
    simply write this:
    <htmlb:tableView id                  = "tbl"
                               table               = "<%= itab %>"
                               selectionMode       = "LINEEDIT"
                               columnHeaderVisible = "TRUE"
                               allRowsEditable     = "FALSE" >
    <htmlb:tableViewColumn columnName = "PERNR" title="Personnal No"/>
    <htmlb:tableViewColumn columnName = "REQID" title="Request id"/>
    <htmlb:tableViewColumn columnName = "user" type= "USER" title="another table">
                  <htmlb:tableView id                  = "tbl"
                                   table               = "<%= itab2 %>"
                                   selectionMode       = "LINEEDIT"
                                   columnHeaderVisible = "TRUE"
                                   allRowsEditable     = "FALSE" />
                </htmlb:tableViewColumn>
              </htmlb:tableView>
    where itab1 is main table and itab2 is another table displayed at column3.
    itab1 and itab2 both are filled up internal tables.
    if you want itab2(column3) to be displayed on some condition put if... endif condition prior to it.
    remember giving type attribute of a tableviewcolumn = "USER" embeds next htmlb to that column as per defined.
    Revert back for any problem or help,
    regards.

  • Sending E-mail with attachment within a loop not working.

    Hi,
    I'm trying to send e-mails with attachment to multiple users with "subject & an attachment" within an ITAB loop.
    SUBJECT for each mail to corresponding user is being sent properly.
    But ATTACHMENT contents are not being sent properly.
    1st ATTACHMENT contents are going to 2nd user(supposed to go to 1st user) & 2nd ATTACHMENT contents are going to 3rd user etc..
    in almost all attempts, last ATTACHMENT contents within the loop were delivered properly to the last user.
    As a test, I'm debugging by sending with same "SUBJECT" & "ATTACHMENT CONTENTS". still it's not working.
    Following is the code for sending mail with same "SUBJECT" & "ATTACHMENT CONTENTS".
    I even refreshed the file contents for each record within the ITAB. Greatly appreciate any help.
    assume that ITAB has a field GROUP with values 501, 502, 503 & 504.
    SUBJECT is the subject of e-mail & DIST_LIST is the e-mail id of the corresponding user.
    DATA:
        MAIL_FILE(20) TYPE C,
        MAIL_TEXT(200) TYPE C,
        COMMAND(512) TYPE C,
        DIST_LIST(425) TYPE C,
        SUBJECT(60) TYPE C.
    DATA: BEGIN OF ITAB  OCCURS 0.
            DATA GROUP LIKE /BI0/PGRP-GRP.
    DATA: END OF ITAB.
    LOOP AT ITAB.
    SUBJECT = ITAB-GROUP.
    IF ITAB-GROUP = '501'.
    DIST_LIST = '[email protected]'.
    ENDIF.
    IF ITAB-GROUP = '502'.
    DIST_LIST = '[email protected]'.
    ENDIF.
    IF ITAB-GROUP = '503'.
    DIST_LIST = '[email protected]'.
    ENDIF.
    IF ITAB-GROUP = '504'.
    DIST_LIST = '[email protected]'.
    ENDIF.
    clear MAIL_FILE.
    clear MAIL_TEXT.
    UNASSIGN <FILE1>.
    CONCATENATE '/tmp/' SY-UNAME '.txt' INTO MAIL_FILE.
    TRANSLATE MAIL_FILE TO LOWER CASE.
    OPEN DATASET MAIL_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      MAIL_TEXT = ITAB-GROUP.
      TRANSFER MAIL_TEXT TO MAIL_FILE LENGTH 200.
    CLOSE DATASET MAIL_FILE.
    clear MAIL_TEXT.
      CONCATENATE '< ' MAIL_FILE INTO MAIL_TEXT SEPARATED BY SPACE.
      ASSIGN MAIL_TEXT TO <FILE1>.
    *Create UNIX MAIL Command
      CONCATENATE 'mailx -s'
      '"' SUBJECT '"' '"'  DIST_LIST  '"' <FILE1>
        INTO COMMAND SEPARATED BY SPACE.
    Send the E-mail
      CALL FUNCTION 'RFC_REMOTE_EXEC'
        DESTINATION 'SERVER_EXEC'
        EXPORTING
          COMMAND = COMMAND
        EXCEPTIONS
          OTHERS  = 04.
    ENDLOOP.

    Hi Zhenglin,
    thanks for your reply.
    Now, it's working after I changed attachment file name (user name) with ITAB-GROUP.
    but, I'm not clear on why it was not working even if the file name is same in every loop, as I'm unassigning the file contents and loading new contents at the start of each loop.
    anyhow, it's working and many thanks for your help.

  • How to move a column within a table?

    Hi All!
    Is it possible in Oracle 9i to move a column within a table? For instance, I have a table
    ID1 ID2 ID3 SRC_ID1 SRC_ID2 SRC_ID3
    and I want to add one more column ID4. So, I can do it like this:
    ALTER TABLE MY_TABLE
    ADD ID4 NUMBER(18);
    In this case, the column will be added to end of the table but I want to move the column on the position after ID3. So, my question is, is it possible to move a column within a table? And if yes, how I can do it?.
    Any help will be appreciate.
    With best regards,
    Andrej Litowka.

    Hi,
    Actually speaking it makes no difference where a column is placed in the table. The select clause is the one that decides on how to display the data. But still if you want to store it next to a particular column then there are 2 options...
    1. Rename &lt;tname&gt; to &lt;tname_1&gt;;
    Create view &lt;tname&gt; as select &lt;cols&gt; from &lt;tname_1&gt;;
    The above option is useful in case of selects. In case of DMLs it will have to do a little more work by going and firing the same on the actual underlying table.
    2. Rename &lt;tname&gt; to &lt;tname_1&gt;;
    Create table &lt;tname&gt; (&lt;new col order with the new col&gt;);
    Insert into &lt;tname&gt; (select &lt;col order&gt; from &lt;tname_1&gt;);
    This option seems to be better than the first one.
    Hope this helps you.
    Regards,
    DJ

Maybe you are looking for

  • What has happend to Adobe Media Encoder in CS4?

    I have been making short (5min to 10min) movies for the web for several years. I have used Premiere Pro CS3 and exported to FLV using the CS3 Adobe Media Encoder. The results have been excellent using 800kb/s at 25fps. I then upgraded to Premiere Pro

  • Reg: Base value in Excise tab in MIGO for imports po

    Hi All. I have a doubt how is the base value claculated in excise tab while doing MIGO for imports PO does this value is picked up from the materila master ?!!!1 regards, Abilash V

  • Upgrade grdi infrastructure 11.2.0.1

    Hello gurus. I have Grid Infrastructure version 11.2.0.1 with ASM running on linux vm and 3 stand alone databases version 11.2.0.1. I need to know if it's possible to upgrade both Grid Infrastructure and databases to version 11.2.0.3. I researched an

  • Retrieving value from a parent of a parent

    Hi! I need to retrive a value to an entity member from its parents parent. fix("E2117","PPMP") "APVOL"= @PARENT (@PARENT (@CURRMBR ("Entity")))->"AMVOL"->"Product"->"ICP"*"A702020"; ENDFIX I need to get value from "grandparent" of e2117 (entity). It

  • I use cs6 and am trying to get my photos to look good on a web site with a 4meg limit

    have a bunch of photos I am shareing on a web site. I regulary see chrystal clear photos in the 30-50k range but by the time I convert my Nikon raw files to jepg  then reduce them to the 4meg limit they look sorry what am I doing wrong?