This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Enabling and disabling a selectonemenu and textarea in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Enabling and disabling a selectonemenu and textarea in jsf" Watch "Enabling and disabling a selectonemenu and textarea in jsf" New topic
Author

Enabling and disabling a selectonemenu and textarea in jsf

vibhas karn
Greenhorn

Joined: Aug 11, 2008
Posts: 26
Hi all i want to make a very simple application in which on selecting the checkbox only the selectonemenu appears and also the text are appears i same page where i have the select checkbox is present i have tried doing it but getting error can any body help me in this code or give me some better code to do so. Here is my code


index.jsp

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@





@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


and my bean class is







the error which i am getting is:-


index.jsp:33:29: The deferred EL expression is not allowed since deferredSyntaxAllowedAsLiteral is false.
disabled="#{EnableDisable.disable1}" </h:selectOneMenu>/>
^-----------------------^
index.jsp:33:29: The deferred EL expression is not allowed since deferredSyntaxAllowedAsLiteral is false.
disabled="#{EnableDisable.disable1}" </h:selectOneMenu>/>
^-----------------------^

at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:328)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:237)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:182)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
Truncated. see log file for complete stacktrace


thanks in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kavita Tipnis
Ranch Hand

Joined: Sep 21, 2008
Posts: 177
From what I get from your post , take a look at the 'rendered' property of your selectOnemenu if you want it to appear/disappear.
Please do not mix plain old html with jsf, you can do use UIPanelGrid to create an html table
Martin Lopez Ochoteco
Greenhorn

Joined: May 28, 2009
Posts: 15
Hi Vibhas, I think you are asking something like what's explained on this post http://www.coderanch.com/t/414509/JSF/java/rich-comboBox-valueChangeListener-not-working . You'll have to use a valueChangeListener .

PS: Kavita, why do you say it's not advisable to mix old html with jsf? I'm doing this on my app with a html table.. (reply to me in private if you wish)


JM.-
Kavita Tipnis
Ranch Hand

Joined: Sep 21, 2008
Posts: 177
Martin Lopez Ochoteco wrote:Hi Vibhas, I think you are asking something like what's explained on this post http://www.coderanch.com/t/414509/JSF/java/rich-comboBox-valueChangeListener-not-working . You'll have to use a valueChangeListener .

PS: Kavita, why do you say it's not advisable to mix old html with jsf? I'm doing this on my app with a html table.. (reply to me in private if you wish)


Take a look at this post Mixing Html and JSF

Also take a look at facelets which can take care of already existing html in the jsf page.

I found a blog which explains the gotchas of mixing plain html with jsf
Mixing Html and JSF gotchas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enabling and disabling a selectonemenu and textarea in jsf
 
Similar Threads
Best way to create a combo-box (editable selectBox)?
Problem regarding the ValueChangeEvent and the commandButton
h selectBooleanCheckbox valueChangeListener not working properly
Exception during addition of data from UI
illegalArgumentException