JSF with SAS9 ;) ... and SAS9 Code Snip

Publié le par Harduin

Since few weeks, we re-started to work on SAS9 implementation. In order to prototype efficently, I searched for a JSF IDE. I was used to have net beans, and I found in free download Sun Java Creator Studio :

http://developers.sun.com/prodtech/devtools/free/

What was my surpise, to develop with a UI with the same functionalities as VS (more or less;) ) :

For example double clicking on connect this builds for you all the necessary call back in order to implement your code into your BackBean, with full access to your Session &  Application Jbeans (getter and setter are written for you):

_______________________________________

 public String btConnect_action() {
      this.collectUserInfo();


      String serverName = this.getUserInfoBean().getServer();
      String serverPort =  this.getUserInfoBean().getPort();
      String serverUser = this.getUserInfoBean().getUsername();
      String serverPass = this.getUserInfoBean().getPassword();

      MetadataWorkspace workspace = com.sas.metadata.MetadataWorkspace.getWorkspace();
      try
      {
        sas9explorer.UserInfoBean uib = this.getUserInfoBean();
        uib.setWorkspace(workspace);
        uib.setIOMI( workspace.makeOMRConnection(serverName,serverPort,serverUser,serverPass));
        this.setBean("UserInfoBean", uib);
      }
      catch (MdException e)
      {
         String msg = e.getSASMessageSeverity() + " / " + e.getSASMessage()
                            + " / " + e.getLocalizedMessage();
         this.getErrorManagementBean().setMessage(msg);
         return "NotLogged";
      } catch (Exception e)
      {
           String msg = e.getLocalizedMessage();
         this.getErrorManagementBean().setMessage(msg);
         return "NotLogged";
      }
        return "Logged";
    }

_______________________________________

Moreever you can design explitcitly your navigation flow :

Great !

About JSF and ASP 2.0 comparison ....

Publié dans SAS9

Pour être informé des derniers articles, inscrivez vous :
Commenter cet article