Skip to content

XAware Community

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
XAware 5.6
Need Help
Webinars and Events
Advanced Tutorials
Webinars and Events

You are here: Home arrow Forums
XAware Community Forums
Welcome, Guest
Please Login or Register.    Lost Password?
MoveElements extension added (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: MoveElements extension added
#2216
prichards (Admin)
Admin
Posts: 319
User Offline Click here to see the profile of this user
MoveElements extension added 12 Years, 4 Months ago Karma: 18  
I added a MoveElements() extension to the project (this could also be re-written as an instruction!). MoveElements provides the capability to specify the element(s) to move from the current location, to become children of another element.

This is similar to xa:move, but is not required to be defined on the element to be moved, and can also move multiple elements matching the path expression. (In XAware 5, xa:move is limited to the scope of the current Bizfile, so MoveElements may need to be used after the results are returned to the calling Bizfile).

Documentation from the code/javadoc:

MoveElements(sourcePath,targetPath) is an XA-Script extension that moves all of the elements referenced by the source path, to the specified target path (first matching element, if multiple matches).

If either the source or target paths are not found, then no elements are moved. If a source path element is an ancestor of the target path, then that source element is not moved.

Usage:
<elem xmlns:xa-post="http://xaware.org/xas/ext/post" xa-post:org.xaware.extension.MoveElements="sourcePath,targetPath" />
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2765
axacan2 (User)
XAware user
Posts: 30
User Offline Click here to see the profile of this user
Re:MoveElements extension added 12 Years, 2 Months ago Karma: 0  
I am currently trying to convert code from 4.3 to 5.1 and this is one of the things that I am having problems with.

In the 4.3 code I notticed that this class was in the org.xaware.ps.extension package. Is this code the same or would I have to go about getting the newer version?

I am also trying to use org.xaware.ps.extension.CopyHere from the 4.3 version so the same question applies.

If I do need a newer version how would I go about obtaining them?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2773
prichards (Admin)
Admin
Posts: 319
User Offline Click here to see the profile of this user
Re:MoveElements extension added 12 Years, 2 Months ago Karma: 18  
com.xaware.ps extensions and functoids are custom java classes that were developed by various folks for different projects. These were bundled into a .jar file and used on multiple projects - they are not an official product feature.

For 5.x, we have started an XAware Extras community project, in which anyone can contribute reusable functoids, extensions, instructions, or even Bizdocs and Bizcomps. We have converted a couple of 4.3 extensions already and placed them in the XAware Extras source directory.
See the Community Projects forum

The underlying 5.x architecture has changed, so 4.3 extensions can not be used directly; they must be modified and recompiled. Check out the wiki Guidelines to convert an extension from XAware 4.x to XAware 5.x. and look at the current examples for more info.

You will notice that there are only a few extensions in the XAware Extras project. Many of the extensions used in 4.3 were used often enough that they were added as XAware instructions in the product. For example, you should use xa:copy instead of re-writing the old "CopyHere" extension.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Community Login

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
Commercial
Free Training
QuickStart Packages
Image 4 Title
Image 5 Title

Visit XAware.com