Perhaps we should send a note out to laszlo-dev/user and ask folks what 
they think the best approach is?

André Bargull wrote:
> This should address my concerns about constrained datapaths, but there 
> might be still some open issues. For example: what is the expected 
> behaviour in this example?
> ---
> <view visible="true" datapath="ds:/BADPATH">
>  <text text="${'display this (' + this.t + ')?'}" >
>    <attribute name="t" value="$path{'@bla'}"/>
>  </text>
> </view>
> ---
> Let the view's datapath be invalid, but "visible" is set to true, so the 
> view is still displayed. With this change, the inner text is also 
> displayed, because datacontrolsvisibility is set to false. But in all 
> previous releases, the text is not displayed.
> I really can't tell what the correct behaviour should be in this case..
> 
> 
> Change 20091010-bargull-xLG by barg...@dell--p4--2-53 on 2009-10-10 
> 11:48:18
> in /home/Admin/src/svn/openlaszlo/trunk
> for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Prevent $path expressions from setting views' visibility
> 
> New Features:
> 
> Bugs Fixed: LPP-290 ($path attributes can hide the instance/view they 
> belong to), LPP-8529 (No text displayed for check box)
> 
> Technical Reviewer: max
> QA Reviewer: henry
> Doc Reviewer: (pending)
> 
> Documentation:
> 
> Release Notes:
> 
> Details:
> With this change, datapaths created by path-constraints have 
> datacontrolsvisibility set to false by default. If the datapath is 
> changed later by the user, datacontrolsvisibility is reset to its 
> default value (= true). The datapath can be changed either by 
> setPointer() or setXPath(), but since setPointer() also calls 
> setXPath(), it's only necessary to change setXPath().
> Unfortunately I needed to use a hack to identify the initial call to 
> setXPath() by checking the internal __LZinstantiated flag, is there any 
> better way to accomplish this? (One could add just another flag to 
> datapath, but I don't think that's really elegant..)
> 
> 
> 
> Tests:
> see LPP-290, LPP-8413, LPP-8529
> 
> Files:
> M WEB-INF/lps/lfc/core/LzNode.lzs
> M WEB-INF/lps/lfc/data/LzDatapath.lzs
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/20091010-bargull-xLG.tar
> 

-- 
Regards,
Max Carlson
OpenLaszlo.org

_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to