Showing posts with label JDeveloper. Show all posts
Showing posts with label JDeveloper. Show all posts

Saturday, 21 May 2016

Button actionListener with an actionEvent.queue() issue

The other day, I faced an issue with the programmatic taskflow navigation. At first, it seemed to be a simple task. The purpose was to click a button on a page and navigate to the next step in the bounded taskflow.

The environment is MS Windows 10, JDeveloper is 12.2.1 (Build JDEVADF_MAIN_GENERIC_151011.0031.S).

The code for the button is:
af:button text="button 1" id="b1" action="save" actionListener="#{viewScope.bean.validate}"


The code for the actionListener is:
public void validate(ActionEvent actionEvent) {
        RichButton saveButton = (RichButton) actionEvent.getComponent();
        ActionEvent action = new ActionEvent(saveButton);
        System.out.println("The listener has fired ########### ");
        action.queue();
}

When the button is clicked, the actionListener fires continuously, so the user sees that the application is hang. The Oracle Support has opened a bug 23325363 : TASKFLOW NAVIGATION USING ACTIONLISTENER IS FIRED CONTINUOUSLY, which is being worked on a priority.


Update, which works OK, but the question still remains. "save" is the name of action.

public void validate(ActionEvent actionEvent) {
//RichButton saveButton = (RichButton) actionEvent.getComponent();
//ActionEvent action = new ActionEvent(saveButton);
//action.queue();

NavigationHandler nvHndlr =
FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
nvHndlr.handleNavigation(FacesContext.getCurrentInstance(),
null,"save");
}

Monday, 26 November 2012

Creating Web Services Proxy in JDeveloper

Probem: Faced the following issues while creating web services proxy in JDeveloper.

Caused by: oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "https://blabla/TaxService.asmx?WSDL": A class/interface with the same name "acb.web.ArrayOfTaxControl" is already in use. Use a class customization to resolve this conflict.(Relevant to above error) another "ArrayOfTaxControl" is generated from here.Two declarations cause a collision in the ObjectFactory class.(Related to above error) This is the other declaration.

Solution: Do not to enter anything in "Package name" and "Root Package for Generated Types" fields at "Specify Default Mapping Options" screen.

Reason: Apparatently, when you put the package names, JDeveloper is trying to create objects with the same name in the same location (given by "Root Package for Generated Types" field value).

Problem: oracle.j2ee.ws.wsdl.LocalizedWSDLException: WSDLException: faultCode=PARSER_ERROR: Failed to read wsdl file at: "file:/C:/projects/workspace/BlaBlaWebServices/Model/src/https/blabla/TaxService.wsdl", caused by: java.io.UTFDataFormatException.    : java.io.UTFDataFormatException: Invalid UTF8 encoding.

Solution: Remove "Copy WSDL Into Project" option.