Assuming that gridtext behaves as a standard value component, you'll want to 
use the accessors defined on basevaluecomponent:

getValue -- returns the Javascript value
presentValue -- returns a string representing the Javascript value

and for setting the value:

setAttribute('value', ...) -- set the Javascript value
acceptValue('value', "...") -- set the Javascript value from a string 
representation

[The distinction between get/present and set/accept is important for 
databinding, where all values are represented as strings.]

If that doesn't work, I'd say there is a bug in gridtext.

On 2009-11-21, at 05:12, Thomas Eichhorn wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there,
> 
> I have a small problem, maybe some of yours have an idea:
> 
> I have a gridtext, and I want to read the value of what the user has
> entered - but as far as I debugged it is not the attribute "text" of the 
> gridtext.
> 
> My source looks like:
> 
> <grid name="usergrid" id="usergrid" datapath="userlist:/" 
> contentdatapath="/userlist/user"
>      width="${apptabpane.width-30}" height="300">
>    <gridtext name="namecolumn" id="namecolumn"
>              showheader="true" width="${usergrid.width/6}" 
> datapath="@name">Name
> 
>    </gridtext>
>    <gridcolumn
>            
> width="${usergrid.width-namecolumn.width-companycolumn.width-useridcolumn.width-sslidcolumn.width}">User
>        Actions
>        <simplelayout axis="x" spacing="5"/>
>        <text width="5"></text>
>        <button name="save" text="Save"
>                
> onclick="gridview.parent.saveuser(namecolumn.getText(),namecolumn.datapath)"/>
>        <button name="reset" text="Reset changes" 
> onclick="userlist.doRequest()"/>
>        <button name="pwdchange" text="Change password"/>
>        <button name="deleteuser" text="Delete user"/>
> 
>    </gridcolumn>
> </grid>
> 
> If somebody has a hint for me to get the value out of "namecolumn" I would be 
> really happy,
> 
> Thanks
> Tom
> 
> PS: I registered myself 2 weeks ago for the forums, but are unable to create 
> any new threads,
> whom must I contact to get that right?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAksHvPUACgkQrUvjMoak8ZdxEQCeM/15T3q1UagEtDuK0IuQw//x
> yPIAn175Z3lkXbAGMIcDSLLYkQjhfhZc
> =/2jk
> -----END PGP SIGNATURE-----


Reply via email to