Copy contents of af: inputText to af:outputText webcenter underway

Hello!

I am completely new to oracle webcenter portal and oracle ADF.

I want to copy the content entered AF: to af:outText inputText component when I press on enter key. I have helped my PPR and put the autoSubmit and partialTrigger at the entrances and exits respectively.

I don't know how to copy the value entry and exit. What should I use Expression EL, if yes then how to create a...?

Concerning
Shoaib

Published by: Shoaib Mujawar on May 27, 2012 21:30

Use as the bean:

public class YourBean {
   private String yourValue;

   public void setYourValue(String value){this.yourValue = value;)
   public String getYourValue(){return yourValue;}
}

Use this solution in your JSF:



This should work and is a bit easier than your code :)

If you want to use your code, you must set the binding attribute:



and the bean:

private RichInputText inputText;
private RichInputText anotherText;

public void SetInput(ValueChangeEvent valueChangeEvent) {
       anotherText.setValue(inputText.getValue());
}

Published by: Yannick Ongena on May 28, 2012 11:25

Tags: Fusion Middleware

Similar Questions

  • Error message "unable to copy the file"hiberfil", it is used by another person or program." Problem copying content from your PC to external hard drive.

    Original title: problem to copy content from your PC to external hard drive.

    I use Windows XP 2000 and am trying to restore my pc to factory settings as it is continuously 'stick '. When you try to copy my drive "c" on an external drive I get a message saying "unable to copy the file"hiberfil", it is used by another person or program." Close any program that might be using the file and try again "." What is 'hiberfil' and how do I close it down as I am not aware that I use?

    Concerning

    Pete

    The hiberfil.sys will be created every time that you start... If you put in hibernation enabled in your control panel, Power Options and the file is 'open' to think that you can actually choose to Hibernate at any given time.  When you Hibernate XP gives a note of it and will write a hiberfil.sys sometimes important in the c:\ folder so that when XP fires again upwards and returns from hibernation, XP will read the hiberfil.sys file and return to the situation that you were in when you put into hibernation.

    I use to be a chronic hibernant because it takes less time to return after hibernation as a cold start.  Sometimes, it can actually be slower that a cold so start your system based on the amount of RAM has.  The more RAM you have, the more your hiberfil.sys will, if sometimes it's faster to move with just a cold start if you Hibernate (26,03 seconds for me).

    If hiberfil.sys is giving you a hard time (you would not in any way copy it) disable hibernation in your Power Options and the file will be deleted immediately since it would be is no longer necessary.  That would solve this, but if you are trying to copy the entire C drive, you will have other files to complain after that.

    It is certainly possible to make a complete copy of the C drive, if you want, but you will have to initialize on something next to your drive hard if you want to do this so the XP files are not used - then you can copy anything and everything.  You can get some imaging software of disc that will also help you.

    It depends on what the problem is you want to solve and what you wand to end up with when you're done (so far, unspecified).

    I would work on figure our why your XP is paste and fix it in place.  XP should not be sticky.

  • How to disable the copy - paste in af:inputText

    Hello

    I had an obligation to disable a user of the operation to copy - paste into an af:inputText field.
    How can do us?

    Thank you
    Amit

    Hi Amit,

    Welcome to OTN.

    You disable the control keys and right mouse click on the text entry using javascript and the client listener.

    For ex.

            
              
              
              
                function disableCtrlKey(e) {
                  if (!e) {
            var e = window.event;
        }
                  characterCode = e.getKeyCode();
                  if (characterCode == 17 ) alert('Control Keys are not allowed');
                  else event.cancel();
    
                }
                            function disableContextMenu(e) {
                  if (!e) {
            var e = window.event;
        }
                  alert('Cannot invoke context menu');
                  e.cancel();
                }
    
              
            
    

    Will give the user a warning when they use the CTRL / right mouse click on the text field.

    But what happens if the user selects the browser-> copy edit and modify-> menu Paste?

    Arun-

  • printing page is shruken and I need to copy content and paste

    Suddenly, after years of success printing from my browser, that I can't! Printing on one of my computers about 20% of the right size and I copy and paste into Word or download in another format for print. That tells me that it certainly comes to Firefox and I spent more than 2 months to try to diagnose the change?

    Two months! You must be a very patient person.

    When you go to the overview screen by using either:

    • button '3-bar' menu > print
    • (menu bar) File > print preview

    You can test with 100% instead of shrink scale to adjust the value. Puts these changes what is displayed in print preview mode?

    Firefox learns your paper by default/current size by extracting the information from the printer driver. Occasionally Firefox will get it wrong and think that your printer uses small sizes of paper and the will to reduce printing to adapt, for example, in the upper left quarter of the page. If this sounds like what you set, you may need to reset the printer data saved in Firefox. This article offers suggestions on how to do: solve the printing problems in Firefox (point 4).

  • question of content repository of data control when the webcenter applications running.

    Hi all

    I created the content repository connection in my local jdeveloper and
    exposed as a data control.
    data control I display some path and name based on some search criteria.

    Whenever I am runnig this application I get following exceptions and no data is displayed.
    Since I have set the connection to the server content locally on my jdeveloper do I need to create some jndi
    the server-side.
    TestContentServer is the content repository connection, that I created in jdeveloper.
    If yes tell me how can I do and how it will port to my data control.

    *************************************************************************************

    [2010-10 - 05T 09: 34:39.245 - 07:00] [wc_custom] [WARNING] [] [oracle.adf.controller.faces.lifecycle.Utils] [tid: [ASSETS].] [ExecuteThread: '3' for the queue: "(self-adjusting) weblogic.kernel.Default"] [userId: anonymous] [ecid: 0000IhxFdvi4ulWpTwp2ic1CemrZ0000fT, 0:1] [WEBSERVICE_PORT.name: WSRP_v2_Markup_Service] [APP: application1] [J2EE_MODULE.name: TestContentService-ViewController-context-root] [WEBSERVICE.name: WSRP_v2_Service] [J2EE_APP.name: application1] ADF: addition of the following JSF error: TestContentServer []
    javax.naming.NameNotFoundException: TestContentServer; another name 'TestContentServer '.

    ********************************************************************************

    Thank you
    Arun

    Fixed it :)
    I had to put the following parameter: IntradocServerPort = 4444

    When I ran my program I saw results in my table. Also, I do not see the warning...

    I used the search instead of getItems operation.
    I need to set the path to "/" and recursive to true in order to see the results in my table.

    When I use the getItems operation and set the path to "/" and run the file, I get a single record with the record of the contribution.

    I notice in your links, you use links to set the path, so I think you want the user to go through the files and update the list when the user selects a folder, correct?

    To test your connection, set the path in your links to the getItems operation to / instead to your EL expression.
    If you have a result, that there is something wrong with your logic. If you do not see a result, there is something else wrong.

    For example, here are my links:

    
    
      
      
        
        
      
      
        
          
          
        
        
          
            
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
            
          
        
      
    
    

    If you do not see results when "code you" the path to /.
    What type of connection do you use? What is your type of socket RIDC in your area? Web, sleeve or socketssl?

  • Creating layout of the phone is not copying desktop contents

    Hello

    I am trying to create a layout of the phone and a Tablet presentation based on the layout of my office.  When I create a new presentation of the phone, he asks if I want to copy everything on. I choose the 2 boxes and click Desktop, but I get a blank white page.

    How can I get Muse to copy content and settings more?

    It is by default, set creation in different page does not copy the content but only fill browser, structure of page etc..

    You must manually copy the content.

    Thank you

    Sanjit

  • [CS3 JS] Copy the content with styles

    What is the best way to copy content and keeping styles (and other attributes)?

    In this case, it's the content of a table cell, I want to enter a block of text, with its intact style information.

    (Do not use the Clipboard).

    Best regards

    Andreas Jansson

    Text.Duplicate)

    (CS3 and CS4)

    Substances

  • document.execCommand ('copy') does not

    I am trying this little piece of code:

    < textarea onselect = "document.execCommand('copy'); "> Hello I am a text < / textarea >

    It seems to work for Chrome, but not Firefox. Firefox does not provide a feature to copy content to the Clipboard. I have fyes, what they are because I'm definitely missing them.

    I get this error on the console of the browser: 20:43:49.409 NS_ERROR_FAILURE: 1 try1.html:1:0

    All solutions for copying text to the Clipboard in firefox browsers?

    Hi bansal5575, did you follow the link to the bug tracking system? He will appear in Firefox 41, which is about 8-9 weeks before release.

    https://developer.Mozilla.org/Firefox/releases/41#InterfacesAPIsDOM

    You can test Firefox 41 in its current form at the beginning to see if it meets your needs: https://www.mozilla.org/firefox/developer/

    Probably should make a backup of your Firefox profile first. This article has tips on it: back up and restore the information contained in the profiles of Firefox.

  • WebCenter Portal &amp; UCM integration via content Presenter Taskflow

    Hello

    I am trying to integrate and to display the data files of definition of Site Studio area through model using content Presenter. I followed the steps closely based on the links below, but when rendered, contributor data file is rendered as a hyperlink instead of the content rendered on (text/html)

    I use Oracle WebCenter Application Portal Framework 11.1.1.6

    Can someone advise?

    https://rahulganesh.WordPress.com/2014/08/29/WebCenter-content-a-k-a-UCM-integration-with-WebCenter-portal-via-content-p...

    http://www.Ateam-Oracle.com/content-presenter-CMIS-complete/

    Hello

    For a test case, I followed a team blog and get a perfect result, as shown in the screenshot.

    Can you please provide what model code content presenter you are using?

    Below the code display the contents of the CDF that is IMAGE (region def: RD_NEWS and item Def: IMAGE) on the browser.

    <af:outputTextvalue="#{node.propertyMap['RD_NEWS:IMAGE'].asTextHtml}"

                                 escape="false"id="ot1"

                                 inlineStyle="max-width:100px;"/>

    Do you use the result of the query or the content under folder in the content presenter taskflwo data source?

    Thank you
    Amey

  • inputText and ouputText does not display the same value

    Hello

    JDev 11.1.2.4

    On my page, I have an inputText and outputText bound to the same link of the attribute. The bind value is defined in a value change listener, and then the two components are updated. Say I put in 2009 for the PeriodFrom, the inputText remains empty, but the outputText shows the 2009. How is possible that the two items related to the same link does not show the same value.

    < af:inputText value = "#{bindings." PeriodFrom.inputValue}"required =" #{bindings. " PeriodFrom.hints.mandatory}.

    columns = "#{bindings." PeriodFrom.hints.displayWidth}"shortDesc =" #{bindings. " PeriodFrom.hints.tooltip}"id ="id1 ".

    autoSubmit = "true" simple = "true" >

    < f: validator binding = "#{bindings." PeriodFrom.validator} "/ >"

    < / af:inputText >

    < af:outputText value = "#{bindings." PeriodFrom.inputValue}"id ="ot3"clientComponent ="true"/ >

    Furthermore, I tried to get the RichInputText component and call a getValue on it, and the value returned is 2009. I'm completely lost.

    Thank you

    I made the fragment of page from scratch. I discovered why the update does not work. This is because the selectOneChoice is inside an af:subform. If I remove the subform, the update works correctly.

    shortDesc = "#{bindings." StdcntyCode.hints.tooltip}"id ="soc2"simple ="true"autoSubmit = 'true '.

    valueChangeListener = "#{pageFlowScope.identificationSessionEditBean.countryValueChangeListener}" > "

    columns = "#{bindings." PeriodFrom.hints.displayWidth}"shortDesc =" #{bindings. " PeriodFrom.hints.tooltip}"id ="id1 ".

    autoSubmit = "true" simple = "true" >

    columns = "#{bindings." PeriodTo.hints.displayWidth}"shortDesc =" #{bindings. " PeriodTo.hints.tooltip}"id ="id2 ".

    autoSubmit = "true" simple = "true" >

  • Copy layer contained more docs open - crash inDesign

    Hello world

    As part of my workflow, I wrote a script which meant to copy the contents of a particular layer (in this case "the palette") of any document that you currently have active during any open document that start with the same name (IE. "order 2341 - big" would copy and replace the contents of the Layer palette in "order 2341 - small, but the script ignores all documents that do not begin with 'order 2341')."

    The problem is that the pasteInPlace(); component of my script crashes inDesign (I'm under CS 5.5). Curiously, if I stop the script before this point and paste the content manually it works fine, so it seems that it is only the script component that has the problem. Anyone would be able to take a look and see if there is something I am doing wrong, or if it's just a strange bug IDS?

    //script to copy contents of a specific layer over to all other opened documents that begin with the same name
    //written by Steve Eberhardt
    var myDocument = app.activeDocument;
    var docName = myDocument.name.match(/[^-]+/);
    var paletteLayer = null;
    var count = 0;
    
    
    paletteLayer = app.activeDocument.layers.itemByName("palette");
    var paletteObjects = app.activeDocument.layers.itemByName("palette").allPageItems;
    app.select(paletteObjects);
    app.copy();
    
    
    var docs = new Array();
    for (var i = app.documents.length - 1; i >= 0; i--) {
        docs.push(app.documents[i].name);
    }
    
    
    for (var i = 0; i < docs.length; i++) {
        app.activeDocument = app.documents.itemByName(docs[i]);
        var otherDoc = app.activeDocument.name.match(/[^-]+/);
        if (docName.toSource() == otherDoc.toSource() && app.activeDocument != myDocument) {
            paletteLayer = app.activeDocument.layers.itemByName("palette");
            app.select(paletteLayer.allPageItems);
            try {
                var paletteGroup = new Array;
                paletteGroup = app.selection;
                app.activeDocument.groups.add(paletteGroup);
            } catch (_) {}
            paletteLayer.groups[0].remove();
            app.pasteInPlace();//this action crashes indesign
        }
    }
    
    
    app.activeDocument = myDocument;
    alert("Copied " + myDocument.name.replace(/.indd$/, '') + " palette to " + count + " documents");
    

    Thank you!

    Hello

    I suggest using the method duplicate() instead of the user interface select - copy - paste

    Something like:

    var
      myDocument = app.activeDocument,
      docName = myDocument.name.match(/[^-]+/),
      paletteLayer = app.activeDocument.layers.itemByName("palette"),
      paletteObjects = paletteLayer.pageItems.everyItem(),
      docs = app.documents.everyItem().getElements(),
      i, otherDoc;
    for ( i = docs.length - 1; i >= 0; i-- ) {
        app.activeDocument = docs[i];
        otherDoc = docs[i].name.match(/[^-]+/);
        if (docName.toSource() == otherDoc.toSource() && app.activeDocument != myDocument) {
           paletteLayer = app.activeDocument.layers.itemByName("palette");
           paletteLayer.pageItems.everyItem().remove();
           paletteObjects.duplicate(paletteLayer);
           }
      }
    app.activeDocument = myDocument;
    

    Jarek

  • Copy of varchar2 to text

    Hello

    What is the best way to copy the contents of the in text data type varchar data type when mixing pro * c and OIC.
    #define UNAME_LEN 30
    varchar username[UNAME_LEN];
    
    text            *uname ;
    strncpy((char *) username.arr, argv[1], UNAME_LEN);
    username.len = (unsigned short) strlen((char *) username.arr);
    
    
    strncpy (uname, username.arr,30);
    printf ("username is %s",uname);
    I'm unable to copy content using strncpy.

    uname is just a pointer, allocate memory and then copy to the username.arr
    BTW you get an error when you tried to run strncpy or when you feel.

  • Copy to another form textarea

    As with text fields, and radio buttons, I need a textarea synchronized with textareas on four other forms in mode onChange. I searched on the net for days to find an answer, but the best I could find is scripts to copy content to the Clipboard. This isn't what I need.

    Hey Jens, it's a little tricky how do you deal

  • inputText refresh

    Hello
    There is a CommandButton, an inputText and an outputText page. Then click on the button, I want to skip the validation and set a new value #{pageFlowScope.i}.
    But the inputText may not display the correct value as outputText. Its value is always the same. For example, click once on the button, display outputText '1', inputText display nothing. Double click on the button, display outputText '2', inputText display nothing.
    How to solve it?
    <af:commandButton text="commandButton 1" immediate="true" id="cb1">
            <af:setPropertyListener from="#{pageFlowScope.i + 1}" to="#{pageFlowScope.i}" type="action"/>
    </af:commandButton>
    
    <af:inputText value="#{pageFlowScope.i}" id="it1" >
            <af:validateLength minimum="5"/>
    </af:inputText>
    
    <af:outputText value="#{pageFlowScope.i}" id="ot1"/>

    Hello

    He has reason immediate = "true" the button control.
    You can use the following:

            
              
            
              
                
              
              
    
    // and in test backing bean
    
        public void test(ActionEvent event) {
            Long i = (Long)AdfFacesContext.getCurrentInstance().getPageFlowScope().get("i");
            ((RichInputText)((UIComponent)event.getSource()).findComponent("it1")).setSubmittedValue(i);
        }
    

    Pedja

  • Have an impact on changes in copy/change/return index?

    Hello

    I use the latest version of Berkeley DB XML (2.4.16).
    I use it to store relevant xml of .docx files archives... you can consider them as models in a document-generation application.

    The transformation of copy/change/return is used in several places.
    I also added the clues which can improve the queries that I am trying to make.

    I am interested in finding if index impact when using the transformations of copy/modify/back (it does not seem they help on the tests I've done).

    Here is the XQuery script that I use (I also wrote an xpath evaluation function that deals with simple XPath expressions that may contain attributes or the index... but it doesn't have an impact on the overall execution time):
    declare variable $productView as node() external;
    declare variable $templateName as xs:string external;
    declare variable $expressionValues as node() external;
    declare variable $docxMetadata as node() := doc('dbxml:/docxTemplates/templates.dbxml/metadata.xml')/templates;
    declare variable $customIdentifier as xs:string := fn:data($docxMetadata/template[name = $templateName]/dsStoreItemId) cast as xs:string;
    
    declare function local:getCustomXmlBlocksNode($template as xs:string) 
    {
         doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $template, '_blocks.xml'))/*
    };
    
    declare function local:if-absent( $arg as item()* ,
        $value as item()* )  as item()* {
           
        if (exists($arg))
        then $arg
        else $value
    };
     
    declare function local:replace-multi($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string? 
    {
         if (count($changeFrom)>0)
         then local:replace-multi
         (
              replace($arg, $changeFrom[1], local:if-absent($changeTo[1],'')), 
              $changeFrom[position() > 1], 
              $changeTo[position() > 1]
         )
            else $arg
    };
    
    declare function local:copy-attributes($copyTo as element(), $copyFrom as element())  as element() 
    {
         element { node-name($copyTo)}
                    { $copyTo/@*[not(node-name(.) = $copyFrom/@*/node-name(.))],
                  $copyFrom/@*,
                  $copyTo/node() }
     };
     
    declare function local:add-attributes 
      ( $elements as element()* ,
        $attrNames as xs:QName* ,
        $attrValues as xs:anyAtomicType* )  as element()? {
           
       for $element in $elements
       return element { node-name($element)}
                      { for $attrName at $seq in $attrNames
                        return if ($element/@*[node-name(.) = $attrName])
                               then ()
                               else attribute {$attrName}
                                              {$attrValues[$seq]},
                        $element/@*,
                        $element/node() }
    };
    
    declare function local:getEvaluation($expr as xs:string) as xs:string
     {
          fn:string($expressionValues/expressions/expression[name eq $expr]/value)
     };
    
    declare function local:renderSelectionParts($selPartName as xs:string*) as element()*
    {
         for $name in $selPartName
         return local:renderDocumentPart($name)
    };
    
    declare function local:evalPath($path as xs:string, $xml as node()*) as node()*
    {
       local:evalPathImpl(tokenize($path, "/"), $xml)
    };
    
    declare function local:evalPathImpl($steps as xs:string*, $xml as node()*) as node()*
    {
       if(empty($steps)) then $xml
       else if($steps[1] = "") then local:evalPathImpl(subsequence($steps, 2), $xml/root())
       else if(starts-with($steps[1], "@")) then local:evalPathImpl(subsequence($steps, 2), $xml/@*[name() = substring($steps[1], 2)])
       else if(ends-with($steps[1], "]")) then local:evalPathImpl(subsequence($steps, 2), $xml/*[name() = substring-before($steps[1],  "[")][fn:string(position()) = substring-before(substring-after($steps[1], "["), "]" )])
       else local:evalPathImpl(subsequence($steps, 2), $xml/*[name() = $steps[1]])
    };
    
    declare function local:renderRepeater($docPartName as xs:string, $blockNode as node(), $content as node(), $indexNames as xs:string*, $indexValues as xs:string*) as node()*
    {
         let $count := fn:count(local:evalPath(local:replace-multi(fn:string($blockNode/iw:ProductViewXPath), $indexNames, $indexValues), $productView))
         for $index in 1 to $count
              return local:renderRepeaterI($docPartName, $blockNode/iw:CCId, $content, ($indexNames, $blockNode/iw:KIdx/text()), ($indexValues, fn:string($index)))
    };
    
    declare function local:renderRepeaterI($docPartName as xs:string, $parentCCId as xs:string, $content as node(), $indexNames as xs:string*, $indexValues as xs:string*) as node()*
    {
         copy $c := $content
         modify (
              for $ccBlock in local:getCustomXmlBlocksNode($docPartName)/iw:Block[fn:string(iw:ParentContentControlId) eq $parentCCId]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'CalculatedControl') then 
                        insert node local:getDataBindingNode(local:replace-multi(fn:string($ccBlock/iw:ProductViewXPath), $indexNames, $indexValues)) into $cc/w:sdtPr
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($docPartName, $ccBlock, $cc/w:sdtContent, $indexNames, $indexValues) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then
                        replace node $cc/w:sdtContent/w:tbl/w:tr[last()] with local:renderRepeater($docPartName, $ccBlock, element content {$cc/w:sdtContent/w:tbl/w:tr[last()]}, $indexNames, $indexValues )
                   else ()               
              )
         )
         return $c/*
    };
    
    declare function local:getDataBindingNode($xpath as xs:string) as node()
    {
         local:add-attributes( element w:dataBinding{}, 
              ( xs:QName('w:prefixMappings'), xs:QName('w:xpath'), xs:QName('w:storeItemID') ), 
              ( "xmlns:iwpvp='http://interwoven.com/WordML07/ProductViewPlaceholders'", $xpath, $customIdentifier ) 
         )
    };
    
    declare function local:renderDocumentPart($docPartName as xs:string) 
    {
         copy $c := doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $docPartName, '.xml'))/w:document/w:body
         modify (
              for $sectPr in $c/w:sectPr
              return delete nodes $sectPr,
              for $ccBlock in local:getCustomXmlBlocksNode($docPartName)/iw:Block[fn:string-length(iw:ParentContentControlId)=0]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'Expression') then 
                        replace node $cc/w:sdtContent/w:p with local:copy-attributes( element w:p {element w:r { element w:t { local:getEvaluation($ccBlock/iw:BindValue) } } }, $cc/w:sdtContent/w:p )
                   else if($ccBlock/iw:Type eq 'Switch') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart(fn:string($ccBlock/iw:Items/iw:Item[local:getEvaluation(fn:string(iw:Info)) eq local:getEvaluation(fn:string($ccBlock/iw:BindValue))]/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'Selection') then
                        replace node $cc/w:sdtContent/* with local:renderSelectionParts(fn:string($ccBlock/iw:Items/iw:Item[iw:Selected eq 'True']/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($docPartName, $ccBlock, $cc/w:sdtContent, (" "), ("")) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then 
                   (
                        let $tr := $cc/w:sdtContent/w:tbl/w:tr[last()]
                        return replace node $tr with local:renderRepeater($docPartName, $ccBlock, element content {$tr}, (" "), (""))
                   )
                   else if($ccBlock/iw:Type eq 'DocumentPart') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart($ccBlock/iw:BindValue cast as xs:string)
                   else ()               
              )
         ) 
         return $c/*
    };
    
    declare function local:renderDocument() 
    {
         copy $c := doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $templateName, '.xml'))/w:document
         modify 
         (
              for $ccBlock in local:getCustomXmlBlocksNode($templateName)/iw:Block[fn:string-length(iw:ParentContentControlId)=0]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'Expression') then 
                        replace node $cc/w:sdtContent/w:p with local:copy-attributes( element w:p {element w:r { element w:t { local:getEvaluation($ccBlock/iw:BindValue) } } }, $cc/w:sdtContent/w:p )
                   else if($ccBlock/iw:Type eq 'Switch') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart(fn:string($ccBlock/iw:Items/iw:Item[local:getEvaluation(fn:string(iw:Info)) eq local:getEvaluation(fn:string($ccBlock/iw:BindValue))]/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'Selection') then
                        replace node $cc/w:sdtContent/* with local:renderSelectionParts(fn:string($ccBlock/iw:Items/iw:Item[iw:Selected eq 'True']/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($templateName, $ccBlock, $cc/w:sdtContent, (" "), ("")) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then 
                   (
                        let $tr := $cc/w:sdtContent/w:tbl/w:tr[last()]
                        return replace node $tr with local:renderRepeater($templateName, $ccBlock, element content {$tr}, (" "), (""))
                   )
                   else if($ccBlock/iw:Type eq 'DocumentPart') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart($ccBlock/iw:BindValue cast as xs:string)
                   else ()               
              )
         ) 
         return $c
    };
    
    element mainDocumentContent 
    {
         copy $c := local:renderDocument()
         modify 
         (
              for $cc in $c//w:sdt
              where fn:starts-with($cc/w:sdtPr/w:tag/@w:val, 'iw')
              return delete nodes $cc/w:sdtPr/w:placeholder/*,
              for $pictureCC in $c//w:sdt
              where $pictureCC/w:sdtPr/w:tag/@w:val eq 'iwPictureBlock'
              return delete nodes $pictureCC/w:sdtContent//a:blip/@r:embed,
              for $simpleCC in $c//w:sdt
              where fn:exists( fn:index-of( ('iwValueBlock', 'iwDateBlock', 'iwPictureBlock'), $simpleCC/w:sdtPr/w:tag/@w:val ) )
              return replace value of node $simpleCC/w:sdtPr/w:dataBinding/@w:storeItemID with $customIdentifier,
              let $sdtNodes := $c//w:sdt
              for $i in 1 to fn:count($sdtNodes)
              return replace value of node $sdtNodes[$i]/w:sdtPr/w:id/@w:val with $i
         ) 
         return $c
    }, 
    element customXmlPvpUri 
    { 
         fn:string($docxMetadata/template[name = $templateName]/customXmlPvpUri) 
    }
    ,
    element templatePath
    {
         fn:string($docxMetadata/template[name = $templateName]/path) 
    }
    Published by: donde on November 3, 2008 07:59

    Hello

    Index will not help the copied data. The indexes are limited to a particular container. Queries on this container will search for the appropriate indexes to optimize the query expression. Copied content is placed in a temporary storage that actually has a lot as a container, but is created without index so that queries that operate on this temporary copied content can be optimized using indexes.

    It's an interesting idea to think about the indexing of content, but there are all kinds of questions, I can think of that might occur. In any case, it's something to think about.

    If there is any way for you to cache and reuse the partially processed templates in a real (indexed) container'd win you indexes a bit more. Such a container could be in memory, so it serves as a pure cache. Should still transactions if you have concurrent access but it would disappear when the application is restarted. Just a thought.

    Kind regards
    George

Maybe you are looking for