hi josh, thx for your reply , i have solved my problem with 2 variables . my situation is like this
Grid at top of page (list) , and bottom is a form (detail) at grid, I have t:row id="abc" and at form , I use value="abc" also then I initial the value at pageLoaded . since t:row also use the same variable , that why the value is overwritten during the rendering .. On Wed, Jun 11, 2008 at 12:39 AM, Josh Canfield <[EMAIL PROTECTED]> wrote: >> I am facing a problem , I need to set a default value for some >> components during loading. Since the default value is not a static >> value , I cannot hard coded it in the .java file. > > You can set the value of your instance properties when they are > created or in a default constructor and Tapestry will reset them when > it pulls them from the page pool. > >> After doing some study, I found that the value has been assigned >> properly to the corresponding private variable in the class , however, >> somewhere in between beforeRender and afterRender , the value has >> been changed automatically . > > Are you changing the reference and persisting it? If you are then it > may get overwritten by the value stored in the session. > > I believe you can create a setter for the value (if you don't have one > already) and put a break point in it to see what is changing it. > > Josh > > On Mon, Jun 9, 2008 at 9:19 PM, CG <[EMAIL PROTECTED]> wrote: >> hi, I am new to Tapestry , no T4 experience at all. >> >> I am facing a problem , I need to set a default value for some >> components during loading. Since the default value is not a static >> value , I cannot hard coded it in the .java file. >> >> Instead, I assign the value in pageLoaded , however, it does not work. >> >> After doing some study, I found that the value has been assigned >> properly to the corresponding private variable in the class , however, >> somewhere in between beforeRender and afterRender , the value has >> been changed automatically . >> >> >> Therefore, I wonder where and how should I put the code to archieve >> such function... >> >> Thanks for all the help .. >> >> CG >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]