Groups > Novell > Designer for Novell Identiry Manager > Re: Pasting into Designer




Pasting into Designer

Pasting into Designer
Thu, 08 May 2008 12:38:09 GMT
One trick I noticed that is very powerful is that Copy and Paste in 
Designer (and iManager) work by copying the XML document for the item 
being copied into the Windows/Linux copy buffer.

I leverage this to paste into a text editor all the time.

So I have this snippet I copied from iManager (2.7, 3.6M1 snapins I think).



<do-set-local-variable name="ATTRIBUTE-NAME">
						<arg-string>
							<token-local-variable name="current-node"/>
						</arg-string>
					</do-set-local-variable>
					<do-add-src-attr-value name="DirXML-nwoProcessLog">
						<arg-value type="string">
							<token-text xml:space="preserve">MAGIC-WO: Copy Value of

</token-text>
							<token-local-variable name="ATTRIBUTE-NAME"/>
							<token-text xml:space="preserve"> from Work Order to 
User.</token-text>
						</arg-value>
					</do-add-src-attr-value>
					<do-set-local-variable name="CURRENT-NODE-SET">
						<arg-node-set>
							<token-src-attr name="$ATTRIBUTE-NAME$"/>
						</arg-node-set>
					</do-set-local-variable>
					<do-if>
						<arg-conditions>
							<and>
								<if-local-variable name="ACTION" 
op="not-equal">Insert!</if-local-variable>
							</and>
						</arg-conditions>
						<arg-actions>
							<do-clear-src-attr-value name="$ATTRIBUTE-NAME$">
								<arg-dn>
									<token-attr name="twcWorkOrderTarget"/>
								</arg-dn>
							</do-clear-src-attr-value>
						</arg-actions>
					</do-if>
					<do-for-each>
						<arg-node-set>
							<token-local-variable name="CURRENT-NODE-SET"/>
						</arg-node-set>
						<arg-actions>
							<do-add-src-attr-value name="$ATTRIBUTE-NAME$">
								<arg-dn>
									<token-attr name="twcWorkOrderTarget"/>
								</arg-dn>
								<arg-value type="string">
									<token-local-variable name="current-node"/>
								</arg-value>
							</do-add-src-attr-value>
						</arg-actions>
					</do-for-each>

I paste it into Designer 3.0 M3 (Windows XP) and the items get pasted in 
reverse order!  I.e.  The last XML node goes in first on the display and 
Post Reply
Re: Pasting into Designer
Thu, 08 May 2008 13:38:41 GMT
On Thu, 08 May 2008 12:38:09 GMT, Geoffrey Carman
<geoffreycarman@gmail.com> wrote:

>So I have this snippet I copied from iManager (2.7, 3.6M1 snapins I think).
[-snip-]
>I paste it into Designer 3.0 M3 (Windows XP) and the items get pasted in 
>reverse order!  I.e.  The last XML node goes in first on the display and 
>vica versa!

Can't reproduce this here (Designer 3.0 M3 on OpenSUSE). But I also
can't paste just what you posted in to anything except via the XML
Source editor. How exactly are you pasting in just the actions part of a
policy?

---------------------------------------------------------------------------
 David Gersic                                            dgersic_@_niu.edu
 Novell Support Forums Volunteer SysOp            http://forums.novell.com

Post Reply
Re: Pasting into Designer
Thu, 08 May 2008 14:31:19 GMT
David Gersic wrote:
> On Thu, 08 May 2008 12:38:09 GMT, Geoffrey Carman
> <geoffreycarman@gmail.com> wrote:
> 
>> So I have this snippet I copied from iManager (2.7, 3.6M1 snapins I
think).
> [-snip-]
>> I paste it into Designer 3.0 M3 (Windows XP) and the items get pasted
in 
>> reverse order!  I.e.  The last XML node goes in first on the display
and 
>> vica versa!
> 
> Can't reproduce this here (Designer 3.0 M3 on OpenSUSE). But I also
> can't paste just what you posted in to anything except via the XML
> Source editor. How exactly are you pasting in just the actions part of a
> policy?

I point at a location in Policy Builder and hit paste, with that in the 
buffer.

I wonder because I copied it from iManager, and it comes deeply indented 
(i.e. It was the action set inside a nested IF inside a FOR-EACH inside 
an IF, and so on) and it was because of all the extra indents (though 
they should be seen as whitespace.  I imagine the wrapping in either my 
editor for posting it, or yours in reading it.

Attached it as a TXT file to try.  Ok, maybe not, Thunderbird will not 
let me post with the attachment.  Will send to you via email.

If it is valid XML I find i can paste it right into Policy Builder most 
Post Reply
about | contact