RE: TEXTAREA element and Barracuda

Kirk Daries <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <D09B591872D1D611AF2B0010B5A1AAD05D420A@WCSMAIL>
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>

Regards
KD

-----Original Message-----
From: Diez B. Roggisch [mailto:[email protected]]
Sent: 02 May 2003 03:47
To: [email protected]
Subject: Re: [Barracuda] TEXTAREA element and Barracuda


Hi,

Kirk Daries wrote:
> } else if (key.equals("Note")) {
> 	Document doc = vc.getTemplateNode().getOwnerDocument();
> 	Node targetNode = doc.createElement("TEXTAREA");
> 	View view = new DefaultView(targetNode);
> 	BComponent b = new BComponent();
> 	b.setView(view);
> 	b.setName("p_note");
> 	b.setAttr("class","TextBox");
> 	b.setAttr("id","M,NOTE");
> 	b.setAttr("cols","30");
> 	b.setAttr("rows","3");
> 	return b;

Thats really complicated. In my TextAreaFormElement from the 
repopulation-package I simply return a BText (as Christian pointed out 
before). Then all this rows/cols/whatever stuff can be put in the html.

<textarea class="Dir::Get_Data.ExampleModel.TEXTAREA" rows="3" 
cols="30"></textarea>


Diez


_______________________________________________
Barracuda mailing list
[email protected]
http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.