Read e-book online Smashing eBook #30 Designing for iPhone PDF

In this code, cc:interface defines metadata that describes the characteristics of the component, such as supported attributes, facets, and attach points for event listeners. cc:implementation contains the markup substituted for the composite component.

This method returns AsyncContext, which represents the execution context of the asynchronous request. complete (explicit) or dispatching to another resource (implicit). The container completes the invocation of the asynchronous request in the latter case. ac = ac; } @Override public void run() { //. . addListener(new AsyncListener() { public void onComplete(AsyncEvent event) throws IOException { //. . } public void onTimeout(AsyncEvent event) throws IOException { //. . } //. . execute(new MyAsyncService(ac)); } Asynchronous Support | 21 In this code, the request is put into asynchronous mode.

Attrs} has name and password defined as attributes. • actionListener is an attach point for an event listener. It is defined as a methodsignature and describes the signature of the method. • h:commandButton has an id attribute so that it can be clearly identified within the h:form. register}"/> Now the using page can pass different backing beans, and different business methods can be invoked when the submit button is clicked. Overall, the composite component provides the following benefits: • Follows the Don’t Repeat Yourself (DRY) design pattern and allows you to keep code that can be repeated at multiple places in a single file.

Download PDF sample

Rated 4.85 of 5 – based on 7 votes