• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Enabling and disabling a selectonemenu and textarea in jsf

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!