Bug for p:menubar with h:inputTextarea

UI Components for JSF
Post Reply
csfreebird
Posts: 13
Joined: 13 Nov 2010, 15:35

11 Dec 2010, 14:45

Hello,I found one bug when using p:menubar and h:inputTextarea.The click event of menuitem doesn't call my manged bean's event method.
Please ignore the Chinese words below,just have a look at the red color words.My userHome.clearData method was not called.But if I replaced h:inputTextarea with h:inputText,it worked.
Some information for this bug:
OS:UBuntu 10.10 Desktop
Browser:Chrome 8
Builder: Maven3
PrimeFaces:2.2.RC2 or 2.1
Web server:GlassFish v3.0.1
JSF:Mojarra
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.3-b03</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.0.3-b03</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
Last edited by csfreebird on 12 Dec 2010, 07:04, edited 1 time in total.

csfreebird
Posts: 13
Joined: 13 Nov 2010, 15:35

11 Dec 2010, 14:48

Here is my xhtml file:
...

<p:menubar>
<p:submenu label="...">
<p:menuitem value="..." action="#{userHome.clearData}"/>
</p:submenu>
<p:submenu label="...">
</p:submenu>
<p:submenu label="...">
<p:menuitem value="..." url="http://www.google.com"></p:menuitem>
</p:submenu>
<p:submenu label="...">
</p:submenu>
</p:menubar>
<p:layout style="width:1023px;height:500px;">
<p:layoutUnit position="left" width="200" resizable="true" minWidth="50" maxWidth="200">
...
</p:layoutUnit>
<p:layoutUnit position="center">
<h:inputTextarea id="data" title="..." value="#{userHome.data}" required="true" style="width:800px"/>
...
</p:layoutUnit>
</p:layout>
...
</html>
Last edited by csfreebird on 12 Dec 2010, 07:04, edited 1 time in total.

csfreebird
Posts: 13
Joined: 13 Nov 2010, 15:35

11 Dec 2010, 14:49

Your forum can't accept Chines words.I have to replace them with ....
It's also a bug.
:)
Last edited by csfreebird on 12 Dec 2010, 07:05, edited 1 time in total.

csfreebird
Posts: 13
Joined: 13 Nov 2010, 15:35

11 Dec 2010, 15:46

Update!
Maybe I made a mistake.Replacing inputTextarea with inputText tag can't bypass this problem.
I just tried again and found If I filled some data into inputTextarea or inputText,the menubar worked!

callahan
Posts: 768
Joined: 27 May 2010, 22:52

12 Dec 2010, 07:48

You probably need to use the p:menuitems update attribute to specify that the h:inputTextarea should be updated.

csfreebird
Posts: 13
Joined: 13 Nov 2010, 15:35

02 Jan 2011, 13:36

It doesn't work when pointing the update attribute of menuitem to inputTextArea tag.
<p:menubar>
<p:submenu label="DataManager">
<p:menuitem value="CleanAll" action="#{userHome.clearData}" update="d"/>
</p:submenu>
...
</p:menubar>
...
<h:inputTextarea id="d" title="Please fill in what you want to send" value="#{userHome.data}" required="true" style="height:300px;width:800px"/>
...

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests