Setting row modifier to STATUS_MODIFIED

Hi,
I have a View Object that is populated manually. Some populated rows are already found in the database, so I need to mark them as MODIFIED, not NEW.
How can I do it?
I have already tried rowForInsert.setNewRowState(Entity.STATUS_MODIFIED), but this doesn't work.
Thanks a lot,
Goran

Hi,
I have a View Object that is populated manually. Some populated rows are already found in the database, so I need to mark them as MODIFIED, not NEW.
How can I do it?
I have already tried rowForInsert.setNewRowState(Entity.STATUS_MODIFIED), but this doesn't work.
Thanks a lot,
Goran

Similar Messages

  • Issue with the functions "add matching sets" and "modify matching sets"

    Hi,
    Though 'None' access permission is set for the functions 'Add Matching Sets' and 'Modify Matching Sets', they are accessible.
    Is this a bug with the tool? or am I missing something?
    Thanks in advance,
    Madan

    sorry, missed the version details.
    I'm using MDM 5.5 SP6.

  • Set row - permanent link possible?

    Hello,
    I need to find I way to link to a page with a spry data set displaying a specific content, I need this link to be permanent.
    This is the page URL:
    http://www.stefanoreboli.com/index.html
    I can call this URL displaying a specific Content A using set row (SpryURLUtils.js):
    http://www.stefanoreboli.com/index.html?row=2
    The problem is that I'm adding and deleting datas so that Content A tomorrow will be no more at row=2.
    Can I link to this content in a permanent way with set row or another method, ex. passing other XML parameters?
    Thanks
    This is the XML node:
    <item>
    <type>photo</type>
    <code>1002_in_kus</code>
    <projectcode>kumbh</projectcode>
    <cathegory>feature</cathegory>
    <year>2010</year>
    <link><![CDATA[naga sadhus <em>kumbh mela</em>]]></link>
    <title><![CDATA[<h1><strong>naga sadhus</strong> kumbh mela 2010 haridwar</h1>]]></title>
    <project><![CDATA[kumbh mela]]></project>
    <text><![CDATA[]]></text>
    <display><![CDATA[
    <embed src="works/photography/main.swf" FlashVars="xmlPath=works/photography/nagasadhus/settings.xml" width="540" height="540" type="application/x-shockwave-flash" bgcolor="#FFFFFF" allowscriptaccess="always">
    ]]></display>
    <thumbnail><![CDATA[<img src="works/photography/nagasadhus/thumb.jpg">]]></thumbnail>
    <info><![CDATA[]]></info>
    <client><![CDATA[]]></client>
    <background><![CDATA[]]></background>
    </item>

    What about using an onclick event that changes the Xpath as follwos
    /* select xpath when link is clicked */
    function newXPath(thepath){
        stefanoreboli.setXPath(thepath);
        stefanoreboli.loadData();
    the onlcick event calls newXPath(/items/item[type = 'photo' and code= '1002']) or similar. This will immediately change the data for the detail area without refreshing the page or having URL variables.
    I hope this helps.
    Ben

  • Set row select

    Hello.
    How I can set row select from PLSQL process handler after commit.In more detail  I have some set of field in my filter. I need to select all report rows which match this filter.
    Thanks in advance Andrii.

    Hi Andrii,
    I'm not sure if I understand you correct, but if your report has checkboxes, which you want to set checked when they match your filter, you could try the following:
    In your report query, where you define your apex_item.checkbox add a case stement.
    SELECT case when <your_filter_condition> then APEX_ITEM.CHECKBOX(1,<your_column>,'CHECKED')
                          else   APEX_ITEM.CHECKBOX(1,<your_column>)
                  end case as " "
    , <other_columns>
    FROM <your_table>
    regards,
    Vincent Deelene

  • How to set  row height  for  each row

    Hi
    i am trying to set rowheight of row in a JTable using setRowHeight(row,rowheight)
    it is not affecting on Table.but if i use setRowheight(rowheight) it applying
    entire table ,please help me to solve this problem
    after setRowHeight(row,rowheight), i am calling firechanged() method also ,i t will not affecting please hemp me
    how to set row height at runtime in a JTable

    Ok fine... do one thing... post ur code here let me check and tell u....
    Ciya.....

  • Set row as header using applescript

    I am new to AppleScript and I am writing my first script to crunch some data in numbers. I am trying to figure out how to set row one as the header row in sheet 1 using the script. Can anyone help?

    Here is a script a bit more powerful that what you asked for but it's of more general use.
    --{code}
    --[SCRIPT set_count_of_Xers]
    Enregistrer le script en tant que Script : set_count_of_Xers.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Aller au menu Scripts , choisir Numbers puis choisir “set_count_of_Xers”
    En fonction des paramètres passés, le script fixera le nombre de Rangs d’en-tête, Colonnes d’en-tête ou Rangs de bas de tableau dans le tableau table_name de la feuille sheet_name du document doc_name.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Save the script as a Script: set_count_of_Xers.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Go to the Scripts Menu, choose Numbers, then choose “set_count_of_Xers”
    According to the defined parameters, the script will set the count of HEADer ROWs, HEADer COLUMNs or FOOTer ROWS in the table table_name of the sheet sheet_name in the document doc_name.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/09/21
    --=====
    property forTests : false
    true may be useful for tests. It triggers the handler select_SubMenu which list the UI elements.
    false is the setting to apply when the script is finished because it runs faster.
    --=====
    on run
              my activateGUIscripting()
    This script is a general one allowing to treat the defined table
              set doc_name to 1
              set sheet_name to "Feuille 2"
              set table_name to "Tableau 1"
              set which_item to 10
              set nb_Xers to 1
              my setNbXers(doc_name, sheet_name, table_name, which_item, nb_Xers) (* to set 1 HEADer ROW *)
    end run
    --=====
    which = 10 --> set count of HEADer ROWs
              my setNbXers(1, "Feuille 2", "Tableau 1", 10, 1) (* to set 1 HEADer ROW *)
    which = 11 --> set count of HEADer COLUMNs
              my setNbXers("my doc.numbers", "Sheet 5", "Table aux", 11, 4) (* to set 4 HEADer COLUMNs *)
    which = 14 --> set count of FOOTer ROWs
              my setNbXers("ASCII.numbers", "Sheet of paper", "TableTop", 14, 3) (* to set 3 FOOTer ROWs *)
    on setNbXers(docName, sheetName, tableName, whichItem, nbXers)
              my selectTable(docName, sheetName, tableName)
              if forTests then
                        my select_SubMenu("Numbers", 6, whichItem, nbXers + 1)
              else
                        my selectSubMenu("Numbers", 6, whichItem, nbXers + 1)
              end if
    end setNbXers
    --=====
    set { dName, sName, tName,  rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    on get_SelParams()
              local d_name, s_name, t_name, row_num1, col_num1, row_num2, col_num2
              tell application "Numbers" to tell document 1
                        set d_name to its name
                        set s_name to ""
                        repeat with i from 1 to the count of sheets
                                  tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
                                  if maybe is not 0 then
                                            set s_name to name of sheet i
                                            exit repeat
                                  end if -- maybe is not 0
                        end repeat
                        if s_name is "" then
                                  if my parleAnglais() then
                                            error "No sheet has a selected table embedding at least one selected cell !"
                                  else
                                            error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
                                  end if
                        end if
                        tell sheet s_name to tell (first table where selection range is not missing value)
                                  tell selection range
                                            set {top_left, bottom_right} to {name of first cell, name of last cell}
                                  end tell
                                  set t_name to its name
                                  tell cell top_left to set {row_num1, col_num1} to {address of its row, address of its column}
                                  if top_left is bottom_right then
                                            set {row_num2, col_num2} to {row_num1, col_num1}
                                  else
                                            tell cell bottom_right to set {row_num2, col_num2} to {address of its row, address of its column}
                                  end if
                        end tell -- sheet…
                        return {d_name, s_name, t_name, row_num1, col_num1, row_num2, col_num2}
              end tell -- Numbers
    end get_SelParams
    --=====
    on parleAnglais()
              local z
              try
                        tell application "Numbers" to set z to localized string "Cancel"
              on error
                        set z to "Cancel"
              end try
              return (z is not "Annuler")
    end parleAnglais
    --=====
    on decoupe(t, d)
              local oTIDs, l
              set oTIDs to AppleScript's text item delimiters
              set AppleScript's text item delimiters to d
              set l to text items of t
              set AppleScript's text item delimiters to oTIDs
              return l
    end decoupe
    --=====
    on activateGUIscripting()
      (* to be sure than GUI scripting will be active *)
              tell application "System Events"
                        if not (UI elements enabled) then set (UI elements enabled) to true
              end tell
    end activateGUIscripting
    --=====
    ==== Uses GUIscripting ====
    on selectTable(theDoc, theSheet, theTable)
              local maybe, targetSheetRow, rowIndex, r
              try
                        tell application "Numbers"
      activate
                                  set theDoc to name of document theDoc (* useful if the passed value is a number. Checks also that we passed the name of an open doc *)
                        end tell -- Numbers
              on error
                        if my parleAnglais() then
                                  error "The spreadsheet “" & theDoc & "” is not open !"
                        else
                                  error "Le tableur « " & theDoc & " » n’est pas ouvert ! "
                        end if -- my parleAnglais
              end try
              try
                        tell application "Numbers" to tell document theDoc
                                  set theSheet to name of sheet theSheet (* useful if the passed value is a number and check the availability of theSheet if it’s a string *)
                        end tell -- Numbers
              on error
                        if my parleAnglais() then
                                  error "The sheet “" & theSheet & "” is unavailable in the spreadsheet “" & theDoc & "” !"
                        else
                                  error "La feuille « " & theSheet & " » n’existe pas dans le tableur « " & theDoc & " » ! "
                        end if -- my parleAnglais
              end try
              try
                        tell application "Numbers" to tell document theDoc to tell sheet theSheet
                                  set theTable to name of table theTable (* useful if the passed value is a number and check the availability of theSheet if it’s a string *)
                        end tell -- Numbers
              on error
                        if my parleAnglais() then
                                  error "The table “" & theTable & "” is unavailable in the sheet “" & theSheet & "”  of the spreadsheet “" & d & "” !"
                        else
                                  error "La table « " & theTable & " » n’existe pas dans la feuille « " & theSheet & " »  du tableur « " & d & " » ! "
                        end if -- my parleAnglais
              end try
              set maybe to 5 > (system attribute "sys2")
              tell application "System Events" to tell application process "Numbers"
                        tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window theDoc
                                  if maybe then (* macOS X 10.4.x
    '(value of attributes contains 0)': '(value of attribute "AXDisclosureLevel" is 0)' sometimes works in Tiger, sometimes not.
    The only possible instances of 0 amongst the attributes are the disclosure level of a sheet row and the index of the first row, which represents a sheet anyway.
    Another possibility is '(value of attribute -1 is 0)', which makes me uneasy. *)
                                            set targetSheetRow to first row where ((value of attributes contains 0) and (value of first static text is theSheet))
                                  else (* macOS X 10.5.x or higher *)
                                            set targetSheetRow to first row where ((value of attribute "AXDisclosureLevel" is 0) and ((groups is {}) and (value of first static text is theSheet)) or (value of first group's first static text is theSheet))
                                  end if -- maybe
                                  tell targetSheetRow to set {value of attribute "AXSelected", value of attribute "AXDisclosing"} to {true, true}
      -- Get the sheet row's 0-based index + 2 for the following row's 1-based index.
                                  set r to (value of attribute "AXIndex" of targetSheetRow) + 2
                                  repeat until (value of first static text of row r is theTable)
                                            set r to r + 1
                                  end repeat
                                  set value of attribute "AXSelected" of row r to true
                        end tell -- outline 1 …
              end tell -- System Events
    end selectTable
    --=====
    my selectSubMenu("Pages",6, 4, 26)
    ==== Uses GUIscripting ====
    on selectSubMenu(theApp, mt, mi, ms)
              tell application theApp
      activate
                        tell application "System Events" to tell process theApp to tell menu bar 1 to ¬
                                  tell menu bar item mt to tell menu 1 to tell menu item mi to tell menu 1 to click menu item ms
              end tell -- application theApp
    end selectSubMenu
    --=====
    useful to get the indexs of the triggered item
    my select_SubMenu("Numbers", 6, 10, 1+1) (* Table > Header rows > 1 *)
    on select_SubMenu(theApp, mt, mi, ms)
              tell application theApp
      activate
                        tell application "System Events" to tell process theApp to tell menu bar 1
                                  get name of menu bar items
    01 - "Apple",
    02 - "Numbers",
    03 - "Fichier",
    04 - "Édition",
    05 - "Insertion",
    06 - "Tableau",
    07 - "Format",
    08 - "Disposition",
    09 - "Présentation",
    10 - "Fenêtre",
    11 - "Partage",
    12 - "Aide"}
                                  get name of menu bar item mt
      -- {"Tableau"}
                                  tell menu bar item mt to tell menu 1
                                            get name of menu items
    01 - "Insérer un rang d’en-tête au-dessus"
    02 - "Insérer un rang d’en-tête en dessous"
    03 - missing value
    04 - "Insérer une colonne d’en-tête avant"
    05 - "Insérer une colonne d’en-tête après"
    06 - missing value
    07 - "Supprimer le rang"
    08 - "Supprimer la colonne"
    09 - missing value
    10 - "Rangs d’en-tête"
    11 - "Colonnes d’en-tête"
    12 - "Bloquer les rangs d’en-tête"
    13 - "Bloquer les colonnes d’en-tête"
    14 - "Rangs de bas de tableau"
    15 - missing value
    16 - "Ajuster les rangs au contenu"
    17 - "Ajuster les colonnes au contenu"
    18 - missing value
    19 - "Afficher tous les rangs"
    20 - "Afficher toutes les colonnes"
    21 - "Activer toutes les catégories"
    22 - missing value
    23 - "Fusionner les cellules"
    24 - "Diviser en rangs"
    25 - "Diviser en colonnes"
    26 - missing value
    27 - "Répartir les rangs uniformément"
    28 - "Répartir les colonnes uniformément"
    29 - missing value

  • EL expression to set row at particular index as selected row

    Hi,
    What should be the EL expression to set row at index 'i' as selected row in a tree binding.
    I tried *#{bindings.treeBinding.collectionModel.selectedRow[i]}* . But it doesn't work.
    I also want to make the selected row as current. Will *#{bindings.treeBinding.collectionModel.makeCurrent}* work?
    Thanks
    KK

    Hi,
    create a managed bean that returns the selected RowKeys for the tree. See this example:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/61search-in-rendered-trees-177577.pdf
    It searches for a specific label in a tree and marks it as selected
    Frank

  • If plugin is not already set, then modify the line "plugin="

    Hi,
    I'm installing Autoconfig by applying patch 5107107.
    It is said :
    1.5 If plugin is not already set, then modify the line "plugin="
    to "plugin=jinit". Save the changes.
    My question is :
    How can I know if plugin is already set or not set ?
    Many thanks.

    1.5 If plugin is not already set, then modify the line "plugin="to "plugin=jinit". Save the changes.
    The line above this one in the README should answer your question
    1.4 Open the $OA_HTML/bin/appsweb.cfg
    Sam
    http://www.appsdbablog.com

  • Why does a reboot set the modified-date of the server certificate?

    I was inspecting my certificates and noticed that the certificate I use for my server had a modified date of Dec 12, whereas it was created around April of this year.
    Dec 12 saw a reboot of my server and adding the `uptime` to the 'modified date' of the certificate gets me to 'now'. So, it seems a reboot sets the modified date of the server certificate. Can someone confirm this and does anybody know wht this is the case?

    Yes, I found the same tricks but if I only set pereferred width. the result is not that I expected. so I use the following code to do it:
             tc.setPreferredWidth(maxsize+5);
             tc.setMaxWidth(maxsize+5);I don't know why must I add 5 point to display the string completely.

  • Setting row attribute doesn't

    Creating a new row under a view I'm getting an expception indicating the key field isn't set (at commit time).
            public void save(ProductsViewRowImpl pRow) {
                pRow.setProductCode(this.code);
                String c = pRow.getProductCode();this.code is a string. I've traced into setProductCode and it's valid. No question of not it not being the variable I thought it was or anything.
    c is null.
    ProductsViewRowImpl is generated by JDeveloper and hasn't been modified in any way. It calls the appropriate internal attribute stuff with index 1 (which seems correct).
    I've tried setAttribute("ProductCode", code); with the same results.

    Hi,
    It looks ok. Can you provide the code for createVideoElement as well?
    This is the snipet that works for me:
    var resource:URLResource = new URLResource("http://mediapm.edgesuite.net/strobe/content/test/AFaerysTale_sylviaApostol_640_500_short.f lv");
    // Create the MediaElement and add it to our container class.
    var videoElement:VideoElement =  new VideoElement(resource);
    container.addMediaElement(videoElement);
    var mediaPlayer:MediaPlayer = new MediaPlayer();
    mediaPlayer.autoPlay = false;
    mediaPlayer.media = videoElement;
    Gelu

  • How to set "Date Modified" as default tab in Open File window

    Photoshop CS5.1
    When I click on Open File, the window that comes up has several default columns (FileName, Date, Size, etc).
    I can right-click on the tab bar and add "Date Modified" to the tabs, but I would like to have "Date Modified" be a default column whenever I open the file selector (and no matter which folder I open up).
    I cannot find a way to do this. I want to know the last date I modified a file, not when it was created.
    Is there a way to universally set this column as a default?

    Date modified always shows for me in Details view.
    I believe what columns are showing has to do with what columns you've set in Windows Explorer...
    Here's an excerpt paraphrased from my Configure the Windows 7 "To Work" Options book that may cover what you need:
    Open Windows Explorer...
    Navigate to a folder of the type you want to see (e.g., one containing your Photoshop images) and set Details view. 
    Make the window look the way you'd like future Explorer windows to look.  Reorganize Details view columns, e.g., to Name, Size, Type, Date Created, Date Modified, Attributes, etc. and size them so they fit.
    Choose Tools - Folder options, then click the View tab.
    Click [ Apply to Folders ] to apply the above settings to all folders.
    [ OK ] to exit.
    Hope this helps. 
    If the Date modified still doesn't stick for you, there are some other things I've done (and documented) to tweak the configuration of my systems that may help make my seeing the columns being set as shown in the attached image when I choose File - Open in Photoshop.
    -Noel

  • Setting row level field in table using jQuery

    Hi,
    I'm utilising the following to read and then set values in the same row within a report.
    Re: Referencing a row level field value in an Interactive Report using jquery
    Consider the following snippet
    // read information eg
    var row = $x_UpTill(this.triggeringElement, 'TR');
    var dateCompleted = $('input[name="f03"]', row)[0];
    console.log(dateCompleted.value);
    // write information eg
    var dateBooked = $('input[name="f02"]', row)[0];
    //dateBooked.value = 'xyz'; // sets to xyz, as expected
    dateBooked.value = return_date; // sets the actual code, not returning stringAll works as I'd expect except the last line. I have a js function returning a formatted string (Set Date With Javascript but in this case my field now contains the actual code definition, not the date string the function actually returns.
    I'm thinking I'm just misunderstanding a simple concept for JavaScript here?
    A simple workaround could be to create field P0_SYSDATE, calculated to TO_CHAR(SYSDATE,:F_DATE_FORMAT), then apply
    dateBooked.value = $v('P0_SYSDATE');but I'm trying to improve my understanding of javascript/jQuery...
    Cheers,
    Scott

    So are you saying that return_date is an actual javascript function that returns the formated string/date you want?
    If so, then I think you simply need parenthesis to run the function:
    dateBooked.value = return_date();Or... am I missing something here?
    Thanks
    -Jorge

  • Problem with setting Created, Modified, Author, Editor on file i Site Collection from Client SDK

    Hello,
    I have a piece of code that is used for converting files from a shared file area to SharePoint for customers that move to SharePoint and Dynamics CRM. The relation to Dynamics CRM calls for using custom code an not existing conversion tools.
    The code I wrote works fine if the file sent to a regular site in SharePoint, but if I try to use the same code for files in the Site Collection. If I use the address for the site collection in the constructor for the ClientContext, and the relative URL
    from that for the file, both the upload and the setting of the attributes fails (I do make sure the file is there before trying to set the attributes).
    After some experimentation I am able to upload the file, by creating the client context with the main site URL, and adding the site collection path elements ("/sites/crm") to the path for the file, but using the same the setting of the attributes
    fails.
    I have tried some other variant where the site collection elements are in the path for both the ClientContext and the file path. Then the upload fails, the file retrival (GetFileByServerRelativeUrl) works, but the retrival of the attributes then fails.
    The code below illustrates the variations.
    Can someone please explain what I am doing wrong, or is this a bug in the SDK?
    Regards
    Anders
    using System;
    using System.IO;
    using System.Security;
    using Microsoft.SharePoint.Client;
    using File = System.IO.File;
    using SP = Microsoft.SharePoint.Client;
    namespace TestSharePointDocumentAttributes
        class DocumentAttributeTester
            public void Execute(string[] args)
                string userId = args[0];
                string password = args[1];
                string filePath = @"C:\work\TestCV1.docx";
                string siteUrl;
                string documentPath;
                string clientContextUrl;
                string serverRelativeUrl;
                DateTime createdDate = new DateTime(2013, 2, 1, 11, 20, 45);
                DateTime modifiedDate = new DateTime(2013, 3, 1, 11, 40, 45);
                string fileName = Path.GetFileName(filePath);
                SecureString securePassword = new SecureString();
                foreach (char c in password.ToCharArray())
                    securePassword.AppendChar(c);
                // Pass 1, no site collection
                Console.WriteLine("Pass 1");
                clientContextUrl = "https://losangas.sharepoint.com";
                serverRelativeUrl = "/crmn_candidate/TestSPAttributes" + '/' + fileName;
                upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
                setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
                Console.WriteLine();
                // Pass 2, site collection, parameters as expected, both upload and set attributes fails (even if file exists)
                Console.WriteLine("Pass 2");
                clientContextUrl = "https://losangas.sharepoint.com/sites/crm";
                serverRelativeUrl = "/kontakter/N/Test1" + '/' + fileName;
                upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
                setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
                Console.WriteLine();
                // Pass 3, site collection, parameters adjusted. Upload works and set attributes fails.
                Console.WriteLine("Pass 3");
                clientContextUrl = "https://losangas.sharepoint.com";
                serverRelativeUrl = "/sites/crm/kontakter/N/Test1" + '/' + fileName;
                upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
                setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
                Console.WriteLine();
                // Pass 4, site collection, parameters adjusted. Upload works fails, but GetFileByServerRelativeUrl succeds and load items fails
                Console.WriteLine("Pass 4");
                clientContextUrl = "https://losangas.sharepoint.com";
                serverRelativeUrl = "/sites/crm/kontakter/N/Test1" + '/' + fileName;
                upload(clientContextUrl, serverRelativeUrl, userId, securePassword, filePath);
                setVariables(clientContextUrl, serverRelativeUrl, userId, securePassword, createdDate, modifiedDate);
                Console.WriteLine();
            private void upload(string clientContextUrl, string serverRelativeUrl, string userId, SecureString securePassword, string filePath)
                try
                    byte[] fileContents = File.ReadAllBytes(filePath);
                    string fileName = Path.GetFileName(filePath);
                    ClientContext clientContext = new ClientContext(clientContextUrl);
                    clientContext.Credentials = new SharePointOnlineCredentials(userId, securePassword);
                    SP.File.SaveBinaryDirect(clientContext, serverRelativeUrl, new MemoryStream(fileContents), true);
                    Console.WriteLine("Upload successful.");
                catch (Exception ex)
                    Console.WriteLine(string.Format("Upload error: {0}", ex.Message));
            private void setVariables(string clientContextUrl, string serverRelativeUrl, string userId, SecureString securePassword, DateTime createdDate, DateTime modifiedDate)
                try
                    ClientContext clientContext = new ClientContext(clientContextUrl);
                    clientContext.Credentials = new SharePointOnlineCredentials(userId, securePassword);
                    Microsoft.SharePoint.Client.File uploadedFile = clientContext.Web.GetFileByServerRelativeUrl(serverRelativeUrl);
                    clientContext.ExecuteQuery();
                    ListItem listItem = uploadedFile.ListItemAllFields;
                    List list = listItem.ParentList;
                    clientContext.Load(uploadedFile.ListItemAllFields);
                    clientContext.ExecuteQuery();
                    FieldUserValue author = FieldUserValue.FromUser("Elisabeth Skaane");
                    FieldUserValue editor = FieldUserValue.FromUser("Elisabeth Skaane");
                    listItem["Created"] = createdDate.ToString("MM.dd.yyyy HH:mm:ss"); // i.e. "6/5/2012 10:19" 
                    listItem["Modified"] = modifiedDate.ToString("MM.dd.yyyy HH:mm:ss"); // i.e. "6/5/2012 10:19" 
                    listItem["Author"] = author;
                    listItem["Editor"] = editor;
                    listItem.Update();
                    clientContext.ExecuteQuery();
                    Console.WriteLine("Set attributes successful.");
                catch (Exception ex)
                    Console.WriteLine(string.Format("Set attributes error: {0}", ex.Message));

    Hello,
    Thanks for your effort, but you are not addressing the problem.
    As I tried to explain, setting the date works fine in the case where there is no site collection involved. There is no reason to believe that this will be different when in a site collection. Also the logon works fine in borth cases. The FieldUserValue.FromUser
    can take either an email, or a prefered name. I tested both.
    Anders

  • Setting row color in REUSE_ALV_GRID_DISPLAY_LVC

    Hi,
    I'm not sure if this function perhaps is not released or has bugs?  I didn't see any OSS notes.  I've read several sources on how to set the color for a given line and I'm not sure why I don't see it.  I see the values in my internal table in the ROWCOLOR column.
    We are on 4.6C and I wanted to use the LVC function to move toward the ECC versions of the structures ( LVCS_LAYO instead of SLIS_S_LAYOUT).  Perhaps this function module is not really supported???
    Could the ZEBRA parameter throw it off?
    Could it be a buffer issue?  I've tried it alternate ways and don't see a difference.
    Thanks for any suggestions,
    Ray
    Here is the code I'm using to set the layout and define the table.:
    gs_alv-callback_pf_status    = 'PF_STATUS_SET'.
      gs_alv-callback_user_command = 'USER_COMMAND'.
      gs_alv-callback_program      = sy-repid.
      gs_alv-structure_name        = 'ZHUS_ST_SP_REPORT'.
      gs_alv-itabname              = 'GT_DATA'.
      gs_alv-itabwaname            = 'GS_DATA'.
      gs_layo-zebra                = 'X'.
      gs_layo-cwidth_opt           = 'X'.
      gs_layo-box_fname            = 'SELECTED'.  " Checkbox
      gs_layo-info_fname           = 'ROWCOLOR'.
      gs_layo-sel_mode             = 'B'. "Default - multiple rows
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name             = gs_alv-structure_name
        CHANGING
          ct_fieldcat                  = gt_fcat.
    I set the color in my list table:
    ls_data-rowcolor = 'C600'.
          APPEND ls_data TO gt_data.
    This is how I call the grid:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_buffer_active                   = 'X'
          i_callback_program                = gs_alv-callback_program
          i_callback_pf_status_set          = gs_alv-callback_pf_status
          i_callback_user_command           = gs_alv-callback_user_command
          i_structure_name                  = gs_alv-structure_name
          i_grid_title                      = gs_alv-grid_title
          i_grid_settings                   = gs_glay
          is_layout_lvc                     = gs_layo
          it_fieldcat_lvc                   = gt_fcat
          it_excluding                      = gt_excluding
          i_default                         = gs_alv-default
          i_save                            = gs_alv-save
          is_variant                        = gs_disvariant
          it_events                         = gt_event
          it_event_exit                     = gt_event_exit
          is_print_lvc                      = gs_prnt
        TABLES
          t_outtab                          = <gfs_t>
    Edited by: Raymond Mannion on Jun 30, 2009 8:09 PM
    Edited by: Raymond Mannion on Jun 30, 2009 8:10 PM

    THis should help you:
    Re: 'Reuse_alv_grid_display' : making a specific row bold
    [ALV] Text in color and bold

  • Setting row and column constraints in FXML

    I've set the column and row constraints in my FXML controller like this:
    RowConstraints row1 = new RowConstraints();
    row1.setVgrow(Priority.ALWAYS);
    RowConstraints row2 = new RowConstraints();
    row2.setMaxHeight(150);
    row2.setVgrow(Priority.NEVER);
    pane.getRowConstraints().addAll(row1, row2);
    ColumnConstraints column1 = new ColumnConstraints();
    column1.setMaxWidth(250);
    column1.setHgrow(Priority.NEVER);
    ColumnConstraints column2 = new ColumnConstraints();
    column2.setHgrow(Priority.ALWAYS);
    pane.getColumnConstraints().addAll(column1, column2);and it works fine but what I can't figure out is how I'll do that using only FXML?

    Hi,
    Try the following:
        <?import javafx.scene.layout.*?>
        <GridPane>
            <rowConstraints>
                <RowConstraints vgrow="ALWAYS" />
                <RowConstraints maxHeight="150" vgrow="NEVER" />
            </rowConstraints>
            <columnConstraints>
                <ColumnConstraints maxWidth="250" hgrow="NEVER"/>
                <ColumnConstraints hgrow="ALWAYS"/>
            </columnConstraints>
            <children>
            </children>
        </GridPane>Basically 'rowConstraints' and 'columnConstraints' are attributes on GridPane of type Collection.
    Hope that helps,
    zonski
    Did you find this answer useful? If so, please mark as 'correct' or 'helpful'.

Maybe you are looking for