Should I include parentheses in method expressions in <from-action> of navigation cases? - el

I will perform the 1Z0-896 exam (Java EE 6 JavaServer Faces Developer Certified Expert), and I'm reading the book Core JavaServer Faces and official documentation. As much as I have tried not yet found the answer to a question, what is the difference using the following excerpts from the of navigation cases in faces-config.xml:
#{myBean.method()} or #{myBean.method}
I would like to know the correct way to use the method in the tag, it is with parentheses or not?

Related

Custom LegacyWrapper for vaadin flow to integrated legacy code

There are plenty of good addons, developed for vaadin 7 and vaadin 8 non compatible with flow. Searching for solution i found - vaadin docs on MPR (multiplatform runtime) - where LegacyWrapper class is available which provides integration for legacy components into flow engine. The MPR is available for Prime (paid) subscription users only, so does the LegacyWrapper class as well.
Could anybody please give any hints how to make a simple wrapper implementation for using legacy components into flow layouts. I believe, supposed CustomLegacyWrapper class should inherit from vaadin.flow.component and contain (as a composition, maybe?) vaadin.ui.AbstractComponent. How the baseline solution might look like?
Thanks in advance.
I've got an answer to my question on the vaadin forum from one of the contributors that there is no simple workaround for my purpose, integration of old components into flow engine is one of multiplatform features and its not possible to implement it in easy way.

I don't understand the Dojo documentation

I'm a beginner in dojo. First of all is everything javascript based? For example to create a form I have to use JavaScript or HTML tags?
Also I cannot understand their documentation and tutorials. It's very confusing.
Is there a proper website (other then dojo itself) that has good tutorials?
You can use Dojo's components's (widgets) in two ways. Programmatic and declaritive. The programmatic way (what you are talking about) is by defining widgets through the use of javascript. With declaritive you can define them using HTML markup. David Walsh has a nice short writeup and if you search for "declaritive programmatic dojo" you'll find some questions and answers on the matter:
https://davidwalsh.name/dojo-widget
Difference between programmatically vs declaratively created widgets in dojo?
Declarative coding or programmatic coding in Dojo Projects?
Declarative or programatic approach in DOJO?
If you're having trouble with the tutorials on the Dojo website, i suspect you're better off, first diving into some basic beginner javascript tutorials before trying to learn a framework like Dojo. I concur with the comment Ferry made on your question, there are no better resources than the actual Dojo website. I recommend following every tutorial, starting with the Hello Dojo tutorial and working your way up so that you don't miss out on the basic concepts which you'll need when you read the harder tutorials. Good luck!
For your first question: dojo is javascript-based platform that provide you with a basic javascript library and a bunch of basic widgets (UI controls like button, dialogue, layouts,...), and some extra things. However, you don't really have to use dojo all the time: you still can use dojo to manipulate a html form button; it's just dojo button comes with extra functionalities and might save you some time.
For the second question, I agree with iH8 that dojo website is the best place to start. There are three different ways dojo websites can help you:
Look at the tutorial: Basic steps on how to set it up and use provided functionalities as-is
Look at thetoolkit api: This provides a very detailed view of dojo javascript object (See what extra things you can do with dojo objects)
Look at the nightlytest: I found this very helpful in term of showing me what can be done outside of the tutorial (i.e. how to use things you found in the api)
Other than these, you can look at existing implementation to learn about the toolkit.
Basically, this is how I am learning Dojo. Without more-specific questions, it's hard to tell what is confusing about the tutorial. I would recommend you give it a try and post a question: everyone here will be willing to help you.
I recommend starting with some video tutorial like this.
When you understand the concept, you can try to copy and paste some code from Dojo documentation tutorials or Reference Guide, because all books are out-of-date.
Also you may find some useful information on IBM-related sites like http://www.ibm.com/developerworks because IBM invested in Dojo and uses it for its products.
If you have enough resources ($) you can take participation in Workshops (sitepen.com/workshops)

Documentation for multi-programming-language API

I'm part of team working on SDK that is exposed with several programming languages - currently ObjC, C#, ActionScript, Java (Android) and later we'll have even more languages.
We want to have documentation which is made up of two parts:
Human readable documentation
API Reference
There are links between the two parts: from human readable docs we have links to specific classes or methods and from the API reference we may link to a document that explain the context in which the class or method is used.
We are currently use a combination of sphinx for human readable documentation and language specific tools for API such as doxygen or asdoc
I saw in LeapMotion they were able to generate a complete documentation for multiple programming-language (not human language) with cross links between programming-languages.
The Question
Does someone know how to accomplish such documentation system in a way we'll not have to duplicate each change in human readable docs to every language and have cross links between the languages?
I put together the Leap Motion documentation. I use Sphinx to create the package of docs and Breathe, a Sphinx plug-in, to basically import XML files generated by Doxygen into the Sphinx project for the doxygenated API references (C++, C#, Java, and Objective-C). For links from the so-called "human-readable" pages to the API references, I generate RST substitutions from the .tag files which Doxygen will generate for you. Links from the API reference to the "human-readable" pages are normal, relative hyperlinks (which I should add more of).
I use the conditional content features of Sphinx to generate a separate set of docs (both "human-readable" and API) for each programming language. Thus these articles can be customized for each programming language where needed and have the correct code examples for the current language. Because each doc set has the same structure, it isn't hard to switch from one language to another.
I did add some custom JavaScript to the page templates to help switch between languages.
tl;dr: Sphinx, Breathe, Doxygen and a small amount of custom JavaScript.
If you would like to discuss this further, you can post a question to our (Leap Motion) developer forum. I'll see it (Stackoverflow isn't the proper place for an ongoing discussion).
Hi Ido Ran,
Tools which you've specified are best in industry for documentation purpose,I am afraid there is no such tool yet which could provide both human and as well as API reference.Out of all my personal best is doxygen which is slighly of multi-use (human and API)..Hope this helps.

WebKit in Java application

Is it possible to integrate a webkit engine in a java application.
Here is my thinking, I would like to implement my User Interface using javascript and business logic in Java and want to communicate back and forth between the js and java. I have looked at titanium and chromiumembedded. But i dont get the complete picture. Can anyone give me a good explanation of webkit being used in a standalone application.
There are a few solutions, the main one being for SWT. See here for the SWT solution. There was a similar question here referring to SWING.
Edit: Oh my, I can't believe I forgot Lobo, a browser written in Java. More Specifically, their Browser API providers support for embedding. This seems to be the better solution for cross-platform and possibly stability. I'm not 100% sure on the first two solutions' development. Hope that provides some insight.
JavaFX 2 has an embedded browser component based on Webkit. There is a tutorial provided by Oracle here.

How do I find working examples of Cocoa/Carbon API?

I find it hard to find some working examples of Cocoa/Carbon framework functions, whereas there are well documented function prototypes from Apple.
For example, LSOpenItemsWithRole function has well defined prototype, but I guess some examples would be a great help for a mac programming beginners like me.
How can I find some working examples for Cocoa/Carbon API? Doesn't Apple provide that? MSDN has good working examples, I expect similar thing from Apple.
You can find some sample code on Apple's developer site, and some of it can also be found within the Xcode documentation viewer. In fact in some cases, but probably not enough, you'll see links to sample code right at the bottom of the API documentation.