• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create type button in JSF using SUN RI

 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • 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.
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • 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.
 
Shasi Mitra
Ranch Hand
Posts: 101
Flex Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
have any body solution of my issue.
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Hey anybody have solution of my problem

Thanks
 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks Dieter Quickfend

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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic