[Laszlo-user] inputtext bug

Robert B. Hanviriyapunt RobertHana at mac.com
Wed Dec 19 06:31:56 PST 2007


Yeah I think it's a bug.

Here's my OpenLazlo version info for the work-around I sent earlier.

Laszlo Presentation Server, 4.0.5, initialized
Running in context:Apache Tomcat/5.5.20
LPS: Build: 6513-openlaszlo-branches-wafflecone

= Robert =

Begin forwarded message:

> From: Robert B. Hanviriyapunt <RobertHana at mac.com>
> Date: December 18, 2007 3:07:29 PM CST
> To: David Buckler <db at intuvo.com>
>
> Sorry David,
>
> I also use my object differently:
>
>     <dataset name="ds">
>       <foo>
>         <bar/>
>       </foo>
>     </dataset>
>
>     <view datapath="ds:/foo/bar"/>
>       <fixedinputtext datapath="text()"/>
>       <button onclick="parent.datapath.updateData()"/>
>     </view>
>
> I think if you want it updated on each blur, you can add an  
> datapath.updateData() call in the onblur.
>
> = Robert =
>
> Begin forwarded message:
>
>> From: "Robert B. Hanviriyapunt" <RobertHana at mac.com>
>> Date: December 18, 2007 12:51:28 PM CST
>> To: David Buckler <db at intuvo.com>
>> Subject: Re: [Laszlo-user] Inputtext and updateData Broken?
>>
>> David.  I'm not sure if my work-around works in your version (not  
>> sure which version we're on as I'm writing this), but try the  
>> following:
>>
>>     <class name="fixedinputtext" extends="inputtext">
>>         <attribute name="_text" type="string" value="$once{text}"/>
>>         <method event="ontext" args="x"><![CDATA[
>>             _text = x;
>>         ]]></method>
>>         <method event="onblur"><![CDATA[
>>             setText( _text );
>>         ]]></method>
>>     </inputtext>
>>
>> I was so happy when I found that this worked.  Lemme know if it  
>> works for ya.  Good luck!  :D
>>
>> = Robert =
>>
>> On Dec 17, 2007, at 1:51 PM, David Buckler wrote:
>>
>>> I think I have found a decent sized bug in version 4.0.7.  All  
>>> over our application we use databound inputtext but in the newest  
>>> version it appears that this is no longer supported.  If you look  
>>> at the example below, change the text of the inputtext and then  
>>> click to the edittext and look at ds in the debugger you see that  
>>> the dataset doesnt update.  The edittext works perfectly but as  
>>> has the border which is not desirable in our UI.  Is this a  
>>> feature of the inputtext that has been removed in this version or  
>>> is this a bug?
>>>
>>> <canvas width="100%" height="100%">
>>>
>>> <dataset name="ds">
>>>  <stuff edit="default edit" input="default input"/>
>>> </dataset>
>>>
>>> <simplelayout axis="x" spacing="20"/>
>>>
>>> <inputtext datapath="ds:/stuff" text="$path{'@input'}">
>>>     <method event="onblur">
>>>         this.datapath.updateData();
>>>     </method>
>>> </inputtext>
>>> <edittext datapath="ds:/stuff" text="$path{'@edit'}">
>>>     <method event="onblur">
>>>          this.datapath.updateData();
>>>     </method>
>>> </edittext>
>>>
>>>
>>> </canvas>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20071219/ce81ce7d/attachment-0001.html


More information about the Laszlo-user mailing list