Attempt to replace p:inputTextarea with p:editor - weird...

UI Components for JSF
Post Reply
User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

30 Mar 2011, 22:14

Hi

I had a p:inputTextarea which content was replaced by selecting item from h:selectOneMenu that fire p:ajax...

All work very well

here's the code:

Code: Select all

<h:selectOneMenu id="listdropdown" value="#{toBuyBean.aSelectedRecentShoppingListKey}">
									<f:selectItems value="#{toBuyBean.aRecentShoppingLists}" />
									<p:ajax update="inputtextlist" listener="#{toBuyBean.processValueChangeLoadRecentList}"/>
								</h:selectOneMenu>
								<br />
								<p:ajaxStatus style="width:16px;height:16px;">  
						             <f:facet name="start">  
						                 <h:graphicImage value="/images/ajax-loader.gif" />  
						             </f:facet>  
						               
						             <f:facet name="complete">  
						                 <h:outputText value="" />  
						             </f:facet>  
					         	</p:ajaxStatus>
								<br />
								<p:inputTextarea  id="inputtextlist" value="#{toBuyBean.aToBuyText}" style="width:500px;height:350px;" effectDuration="400"/>  
						       
i tried to replace the <p:inputTextarea with p:editor

so now it looks like this:

Code: Select all

		<h:selectOneMenu id="listdropdown" value="#{toBuyBean.aSelectedRecentShoppingListKey}">
									<f:selectItems value="#{toBuyBean.aRecentShoppingLists}" />
									<p:ajax update="inputtextlist" listener="#{toBuyBean.processValueChangeLoadRecentList}"/>
								</h:selectOneMenu>
								<br />
								<p:ajaxStatus style="width:16px;height:16px;">  
						             <f:facet name="start">  
						                 <h:graphicImage value="/images/ajax-loader.gif" />  
						             </f:facet>  
						               
						             <f:facet name="complete">  
						                 <h:outputText value="" />  
						             </f:facet>  
					         	</p:ajaxStatus>
								<br />
								<p:editor id="inputtextlist" value="#{toBuyBean.aToBuyText}" widgetVar="editor" style="width:500px;height:350px;"/> 
							 
but each time I choose a different item from <h:selectOneMenu the editor duplicate it self on the screen with some offset in buttom direction

here how it looks like after 4 times using the <h:selectOneMenu

Image


any ideas?

Regards,

Daniel.
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

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

30 Mar 2011, 22:22

Container of editor doesn't seem to have the client id as the id, instead textarea element inside has it.

I've created this;

http://code.google.com/p/primefaces/iss ... il?id=1898

And started working on it at the moment. Stay tuned!

User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

30 Mar 2011, 22:31

starred that one :)

thx!
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

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

30 Mar 2011, 22:38

Fixed now, should be available in tomorrows nightly build if you need this fix urgently.

User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

30 Mar 2011, 22:49

tx

will grab it tomorrow :)

big thx again!
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

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

30 Mar 2011, 22:55

Let us know if it works, worked for me locally ;)

User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

30 Mar 2011, 23:02

sure
:D
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

31 Mar 2011, 21:52

Working :)

and working on GAE as well...

tx!

say any chance it possible to set it to work in RTL (for right to left langs')


thx again!
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

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

31 Mar 2011, 22:05

Not sure if CLEditor we use has this feature, maybe through a plugin.

http://premiumsoftware.net/cleditor

We've picked cleditor as it is super lightweight as PrimeFaces :) If you need to implement advanced text editing requirements, I suggest more complex editors like tinymce or ckeditor.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 55 guests