• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Enabling and disabling a selectonemenu and textarea in jsf

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vibhas, I think you are asking something like what's explained on this post https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Martin Lopez Ochoteco wrote:Hi Vibhas, I think you are asking something like what's explained on this post https://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
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic