<p:editor allowNoEdit

UI Components for JSF
Post Reply
johnnycoppini
Posts: 4
Joined: 01 Oct 2009, 16:37

01 Oct 2009, 16:51

I have some situations who i need to disable the html editor.
How to set the propertie (disable, readonly or allowNoEdit) on editor area to show editor like read only?

Thanks!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Oct 2009, 21:02

Raised an issue for this;

http://code.google.com/p/primefaces/iss ... ail?id=234

I'll update this post once the changes are in. Thanks for the feedback!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Oct 2009, 21:41

disabled attribute is added.

johnnycoppini
Posts: 4
Joined: 01 Oct 2009, 16:37

02 Oct 2009, 14:30

:D
Thanks...
when the version 0.93 will be ready to donwload?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

02 Oct 2009, 14:43

Snapshot is deployed, you can grab it at;

http://repository.prime.com.tr

There's still a weird issue with editor, when it's disabled it doesn't display anything if there's a non value defined.

johnnycoppini
Posts: 4
Joined: 01 Oct 2009, 16:37

05 Oct 2009, 15:03

Really... it dosen´t works good...
On class EditorRenderer.java line 112 (if(editor.isDisabled()) writer.write(",disabled:true");) try to use other param allowNoEdit -> if(editor.isDisabled()) writer.write(",allowNoEdit:true");)
if(editor.isDisabled()) writer.write(",disabled:true");

Look at http://developer.yahoo.com/yui/docs/YAH ... ditor.html allowNoEdit atribute

thanks.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Oct 2009, 11:43

Thanks, I've also tried that before but it had no effect. I'll look into this in detail.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 Oct 2009, 10:23

Still you can set allowNoEdit using the client side api and widgetVar attribute.

johnnycoppini
Posts: 4
Joined: 01 Oct 2009, 16:37

08 Oct 2009, 19:56

i tried to do this things on client side:

function desabilitarEditor() {
var textAreaEditor = document.getElementById("frmDados:tabSetCadastroDePJ:tabPropostas:layoutPanel3:rtfEditor:input");
textAreaEditor.readonly = true;
}
function desabilitarEditor() {
var edit = document.getElementById("frmDados:tabSetCadastroDePJ:tabPropostas:layoutPanel3:rtfEditor");
edit.allowNoEdit = true;
}

it does not works..
Did you have some idea?
How can i use the metodo setWidgetVar(""); to set allowNoEdit ?

Thanks

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Oct 2009, 13:36

I've tried allowNoEdit and passed it as a constructor. It had no effect, I think this might be a bug in YUI editor. I'll contact them.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests