[Laszlo-user] Setting the parent of a tag

Robin Sheat robin at kallisti.net.nz
Tue Jul 10 04:14:55 PDT 2007


On Tuesday 10 July 2007 22:57:47 P T Withington wrote:
> I'd need to see more of what you are really trying to do to comment
> more intelligently.
OK, I'll go with an example (somewhat contrived...):

<!-- This extends node because it doesn't actually show any content itself, so 
doesn't need the view stuff -->
<class name="myclass" extends="node">
	<attribute name="something" />
	<attribute name="wherethingsshouldbeput" />

	<oneview parent="${classroot.wherethingsshouldbeput}"
		something="${classroot.something}" />
	<anotherview parent="${classroot.wherethingsshouldbeput}"
		something="${classroot.something}" />
</class>

<view name="view1">
	...
</view>

<view name="view2">
	<myclass something="something"
		wherethingsshouldbeput="${parent.view1}" />
</view>

I want the instances of oneview and anotherview to be children of view1, 
without anything having to be done on the part of view1, as indicated by the 
assignment to 'parent' (which, now I think of it, I haven't actually tested, 
but I bet it doesn't work :)

-- 
Robin <robin at kallisti.net.nz> JabberID: <eythian at jabber.kallisti.net.nz>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20070710/498fb649/attachment-0001.bin


More information about the Laszlo-user mailing list