This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all I have the following text tag but it isn't working quite like I would like. I am trying to allow user to change the shipping address, but I want to populate it with the default values in the event that they don't need to change it - there is more than one field, but I am working with one too see the effects. I have tried the following and various ideas around it but haven't had any success. Can someone suggest something else ? With the below code the value is displayed exactly as it is instead of pulling that value - can someone give me an idea of how to give it that default value ?
*Still reserving the right to come back when I realize that I have indeed screwed up the "simple" thing.
Joined: Aug 23, 2006
I got the default values to work and it was quite simple once i got over the stupid spelling mistakes that I was making. I do however have a further question on the matter. I want to be able to toggle between being able to edit and not edit the values in fields. Essentially on my jsp page there will be button to change the listed information. I am looking for the best manner in which to accomplish this. I assume that it will be something along the lines of submitting back to the same page only changing a variable such as setEditable to true - does something like this work ?
Yea, something like that would work. Since the initial page is just read-only data, you would not really have to submit the page. You could just pass some type of id and the isEditable flag on a url. Another option might be to hide/show fields on your page or enable/disable fields using some form of DHTML.
Joined: Aug 23, 2006
I was playing around with having a variable that I can toggle, but can't seem to get the right syntax, so I was hoping that someone could fill in my knowledge with respect to weather or not it is possible to do something like the following:
the part I am wondering about is using a bean write inside of the html:text. I am guessing that it can't be used as it seems that that would require interpretation twice on the same portion of code, but if there is a similar manner that would allow me to alter the readonly tag could someone please let me know about it.