[Laszlo-user] Setting the parent of a tag

P T Withington ptw at openlaszlo.org
Tue Jul 10 04:35:48 PDT 2007


Does it not work to either set the `placement` attribute of `oneview`  
and `anotherview`?  Or to give them a `determinePlacement` method as  
in example [30.19](http://www.openlaszlo.org/lps/docs/guide/class- 
inheritance.html#d0e17794)?  That's what placement is all about --  
putting a view somewhere other than where it would be by default.

On 2007-07-10, at 07:14 EDT, Robin Sheat wrote:

> 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



More information about the Laszlo-user mailing list