Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

how to create type button in JSF using SUN RI

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am using SUN RI for JSF. I want to craete button in my jsf.
If i use <h:commandButton/> it create submit button. But i need type button not type submit.

Please help me to create button in JSF using Sun RI

Thanks in advance.
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With JSF 1 or with JSF 2?

I have no real knowledge of JSF 1 but at least with JSF 2 you have

and of course you can use

depending on your situation.
 
Ranch Hand
Posts: 101
Spring Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your requirement? If you want a button on clicking which, validation shouldnt happen. Then you can set the attribute immediate = true.
 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

My requirement is i want jquery confirm box on submit button. In my case when i put jquery confirm box then it will show the confirm box when i click submit botton but it not wait for responce i mean ok or cancel, it submit the page.

i am using JSF SUN RI <h:command button , it only craetye submit and reset button

so how should i implement jquery confirm box on jsf submit button.

Thanks
 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

My requirement is i want jquery confirm box on submit button. In my case when i put jquery confirm box then it will show the confirm box when i click submit botton but it not wait for responce i mean ok or cancel, it submit the page.

i am using JSF SUN RI <h:command button , it only craetye submit and reset button

so how should i implement jquery confirm box on jsf submit button.

Thanks

 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have any body solution of my issue.
 
Saloon Keeper
Posts: 25812
184
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A "pure" button can be done in JSF by simply omitting the "action=" attribute. However, it sounds like you do want a submit, just a pre-submit confirmation.

I'm forgetting what little jQuery I know, but in straight JavaScript, you can do things like this:


The onclick attribute expects a boolean expression, and if the expression value (results of the confirm method) are false, the submit to server is suppressed. Canceled, if you prefer.
 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks For your reply.
yes it work like you said (confirm box of js), but i am using jconfirm of jquery. When i use jquery it is not waiting my action ( conform box display and close automatically) it submit my page. i want if i am using jconfirm of jquery it wait my action either true or false.

Thanks
 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey anybody have solution of my problem

Thanks
 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey anybody have solution of my problem

Thanks
 
Bartender
Posts: 543
4
Netbeans IDE Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's this hot new technology. Check this out:



Awesome, huh? ;)
 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Dieter Quickfend

Through this i can solve my issue, Thank you very much...

 
reply
    Bookmark Topic Watch Topic
  • New Topic