Untitled

 avatar
unknown
java
a year ago
1.1 kB
5
Indexable
@DUCXImplementation("SKELASTIC@103.510:ActAddSelectedObject")
	public void AddSelectedObject(final CooLib.CooDictionary dict, final Object myparent, final Object myview, final java.lang.Boolean selectedOnly) throws CooException 
	{        
		CooTrace.enter();
		
		if(myview==null)
		{
			CooTrace.message("Žiadna vlastnosť na naplnenie.");
			return;
		}
		
		if(myparent==null)
		{
			CooTrace.message("Ziadny objekt na naplnenie.");
			return;
		}
		
		CooObjectArray copyObjects = new CooObjectArray();
		
		if(selectedOnly)
			copyObjects.addAll(dict.GetEntry("sys_selobjects"));
		else
			copyObjects.addAll(myparent.GetAttribute(cootx, ELA.getProperty_AttrPtrResultObjs()));
		
		if(copyObjects.size()<=0)
		{
			CooTrace.message("Ziadne objekty na prevzatie.");
			return;
		}
		
		myparent.Lock(cootx, true, true);
		for(int i=0; i<copyObjects.size(); i++)
		{
			CooObject selObject = copyObjects.get(i);
			int idx = myparent.GetAttributeValueCount(cootx, myview);			
			myparent.SetAttributeValue(cootx, myview, idx, CooValue.asValue(selObject));
		}

		CooTrace.leave();
	}
Editor is loading...
Leave a Comment