Re: TEXTAREA element and Barracuda
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
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