RE: TEXTAREA element and Barracuda
Kirk Daries <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <D09B591872D1D611AF2B0010B5A1AAD05D420E@WCSMAIL> |
Your're Correct. I suppose this is a cleaner way of doing this. -----Original Message----- From: Diez B. Roggisch [mailto:[email protected]] Sent: 02 May 2003 04:06 To: [email protected] Subject: Re: [Barracuda] TEXTAREA element and Barracuda Hi, Kirk Daries wrote: > Hi, > > In the example.. I needed to conditionally create the textArea within the > HTML page. > It depends on the users rights.. > E.g. > > A user with create or edit rights... would be presented with the textArea > for updating.. > A user with only 'View' rights would just see the 'text' without the > textArea being rendered for updating. > > Here's the HTML snippet.. > > <span class="Dir::Get_Data.ExampleModel.Note">[TEXT AREA HERE]</span> Well, I still would do it different - because of the mixing of layout and logic. In such cases I'd simply create two div-tags surrounding the desired tag, like this: <div class="Dir::Get_Data.ExampleModel.NO_EDIT"> <span class="Dir::Get_Data.ExampleModel.Note">[TEXT AREA HERE]</span> </div> <div class="Dir::Get_Data.ExampleModel.EDIT"> <textarea class="Dir::Get_Data.ExampleModel.Note"></textarea> </div> Thats still a little bit unfortunate, as the programmer has to supply the BComponents NO_EDIT and EDIT in his model. But at least you can then produce whatever layout you want. Diez _______________________________________________ Barracuda mailing list [email protected] http://barracudamvc.org/lists/listinfo/barracuda