File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes how to create type button in JSF using SUN RI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to create type button in JSF using SUN RI" Watch "how to create type button in JSF using SUN RI" New topic
Author

how to create type button in JSF using SUN RI

roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
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

Joined: Apr 15, 2008
Posts: 198
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

Joined: Nov 27, 2008
Posts: 101

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

Joined: Sep 08, 2010
Posts: 31
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

Joined: Sep 08, 2010
Posts: 31
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

Joined: Sep 08, 2010
Posts: 31
have any body solution of my issue.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
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

Joined: Sep 08, 2010
Posts: 31
Hey anybody have solution of my problem

Thanks
roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
Hey anybody have solution of my problem

Thanks
Dieter Quickfend
Bartender

Joined: Aug 06, 2010
Posts: 543
    
    4

There's this hot new technology. Check this out:



Awesome, huh? ;)


Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
Thanks Dieter Quickfend

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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create type button in JSF using SUN RI