Is there a switch case in Javafx 1.2? - switch-statement

Is there a switch case in Javafx 1.2?

Alas... no switch, case or whatsoever.
Here's a rather complete overview... http://jarfiller.com/reference/javafxscript/

Related

JSF or Primefaces component

i work on a project where we use JSF + Primefaces
I would like to know if it's preferable to use JSF components as much as possible even if there are sometimes the same components in Primefaces (for basic use)
Using Primefaces only for specific things not available on the JSF version
When should we use Primefaces instead of JSF ?
sorry for any faults
In general, I'd say prefer them than JSF standard components, the reason is simple: CSS skinning. For example, even if h:inputText and p:inputText are exactly the same component, you might want to have the same CSS skinning for all JSF components (specially if you use a premium layout from PF)
But, I think there are few exceptions:
If you use JSF 2.3. For example, I'd rather use h:commandScript than p:remoteCommand. As they're not "visual" components, I'd prefer to use standard components. See also what works better for you ;-)
Also, Oleg presents some performance killer using PF components in datatable, see here http://ovaraksin.blogspot.com/2013/05/jsf-choice-between-legacy-components.html
I think the most important point is consistency, which comes in a couple of flavours.
PrimeFaces (PF) components have a lot of styling put on them (through the theme options). If you use PF components throughout your application, you'll get a consistent style. If you mix PF and JSF components this will look messy.
PF components have a particular way of doing things - organising options, defining ajax calls etc. While it's important to know how the JSF stuff works underneath, using PF components consistently will make your code consistent too.
Finally, in many cases PF components are exact replacements for JSF components, but often with extra features added. There's no reason not to take advantage of them.
Better choose one of them and develop all application using mainly one stack. Will be easy to support, easy update, easy bug fix.
Primefaces at the moment good choose.

JavaFX good DateChooser need

Need good DateChooser for JavaFX project(JDK 7).
I was faced with the task of which is the need to use DataChooser.
please recommend ready solutions, for implement and use it in JavaFX (JXML files)
There's a new date picker in JavaFX 8. It's all included in JDK 8.
https://jdk8.java.net/download.html
A cool little video on using it.
https://blogs.oracle.com/geertjan/entry/javafx_8_datepicker_with_lambdas
I found this very beautiful component for datepicker.. Check this if you running your javaFX application on JDk7.
Link for download Datepicker.
Reference for this picker. Follow this instruction for working with Listener
Thanks..

prompttext in textfield of javafx 2 hides on focus after some java 7 update

i've been making simple javafx 2 gui application and found that prompttext in textfield of javafx 2 hides as soon as the textfield gets focus.
this wasn't this way some updates back.
prior to this update, the textfield showed the prompttext until some text is typed into.
this isn't good and really need a workaround for this.
I just solved this same issue by applying particular CSS rules to text inputs. Here's what I used (which should apply to all text-inputs)
.text-input, .text-input:focused { -fx-prompt-text-fill:darkgray; }
Erem Boto's answer is just fine and should solve your problem!
Please see my answer here to see how to solve the problem if you use proper Java code (no FXML and CSS file).
(And also how to get the other behavior back).
In short, this is the solution:
In case your application interface is written using proper Java code.
Java Code:
textField.setStyle("-fx-prompt-text-fill: derive(-fx-control-inner-background, -30%);");
Where textField is your TextField component.
And in case your application interface is written using FXML and CSS, add the following to your CSS file.
JavaFX FXML (CSS):
.text-input, .text-input:focused {
-fx-prompt-text-fill: derive(-fx-control-inner-background, -30%);
}

JSF 2.0 and Multiple Submission problem

Somebody told me that JSF 2.0 automatically handles multiple submission problem.
Is that right?
If yes, how does JSF 2.0 do that?
If no, what are the things that must taken care of, so that you don't leave any pitfall while handling this problem?
Thanks.
This is requested and maintained by JSF spec issue 559. As it currently stands, it's not there yet, but it is targeted for the upcoming JSF 2.2.
Until then, the Seam's <s:token> is your best solution which not only prevents CSRF (which is not strictly necessary anymore since JSF 2.1 as per JSF impl issue 812), but also double submits.
<h:commandButton onclick ="setTimeout('document.getElementById(\'' + this.id + '\').disabled=true;', 50);setTimeout('document.getElementById(\'' + this.id + '\').disabled=false;', 500);" />
Thought of improving upon your simple yet elagent solution. I think we should enable the submit button after some time. I'm sure you would have thought of this, but this is for other newbie readers like me :-)

Java - RichFaces - RTL

I'm looking for Java "Faces" that supports RTL (Right To Left) user interfaces. The only library that I've checked so far is RichFaces. It seems that it doesn't support it natively.
What is a good resource that talks about this issue?
What other "Faces" can be recommend that natively support RTL user interfaces?
RichFaces components support the dir attribute.
The JSF standard components already do it since ages. They just supports all of the HTML attribues, including the dir attribute, which you can set to "rtl". I would be surprised if any of the 3rd party component libraries didn't inherit it.
In richfaces, it does support dir="rtl" in all components, yep it does not say you can not set the attribute dir but when you put it on, it will not display correct. To do so, in richfaces you need override its style, replacing left with right and right with left, i have checked it for simple components but for others like tree, like menu it would not be easy as i say. I have no idea what other components would support that.
btw i speak for 3.1.5. GA.
I didn't used it on my own, but was just googling about it and wikipedia states it might be candidate:
http://myfaces.apache.org/trinidad/

Resources