-----Original 
      Message-----
From: 
      Konstantin Komissarchik [mailto:kosta@xxxxxxx]
Sent: Wednesday, November 16, 2005 
      11:41 AM
To: 
      gerry.kessler@xxxxxxxxxx; 
      wtp-dev@xxxxxxxxxxx
Subject: RE: Facet 
      API
      Gerry,
       
      I really wish you 
      would have brought these problems up as they come up. We could have saved 
      you some grief and hard work. :)
       
      Over the last few 
      weeks the integration of the facets framework caused a lot of churn and 
      there were some builds where certain aspects were broken. Judging by your 
      e-mail, you’ve hit quite a few of these breakages. If you pickup the 
      latest M9 candidate build, you will be much 
      happier.
       
      1. The project 
      creation wizards have only recently been integrated with the faceted 
      project wizards. Now you should be able to select the jsf facet on the 
      second page of the Dynamic Web Project wizard.
[Gerry 
      Kessler] I am   
       
      2. You don’t have 
      to use IDataModel for your action config. It’s now an option, but you 
      don’t have to go this route. Unfortunately, this was broken for a few 
      builds. I didn’t discover and fix this problem until last 
      night.
[Gerry 
      Kessler] So are you saying that the changes weren't 
      required???  Dang.   I'll try with the lastest build.  
      As of this moment, are you speaking of I200511161731?
       
      3. There was 
      another bug that caused the right code path to not be invoked in the early 
      revs of the new web project wizard, so transferStateToConfig was not being 
      invoked. That has also been fixed.
[Gerry 
      Kessler] Now that I have moved to DataModelWizardPage, any thoughts 
      on making it public?  
       
      4. Lets take #1 
      offline. I need to get some info about how you define the JSF facet to 
      figure out why you are only seeing one version or the other. Do you use 
      yahoo im? I am kosta0120.
       
      5. About #2, 
      could you see if you still see this problem in the latest M9 candidate 
      build. If so, I can help figure out why this is 
      happening.
[Gerry 
      Kessler] I will. 
       
      6. In order to 
      get the web content directory, take a look at the IWizardContext that’s 
      available to your wizard page. You can use it to locate the datamodel for 
      the jst.web facet install. Note that if you are going to do that, your 
      page has to handle two cases: (1) the jst.web install is in the wizard 
      context, so you retrieve this value out of the data model, and (2) jst.web 
      has already been installed, so you have to retrieve this value from 
      project metadata using the IVirtualComponent api.
[Gerry 
      Kessler] I will take a look.  Yes, I understand the 2 
      cases.  As of 1021 build I thought that I would only be able to 
      add JSF Facet from an existing WebApp project!    Thanks for the 
      pointer.
       
      Let me know if 
      you have other questions/problems.
       
      - 
      Konstantin
       
      
      
      
      
      From: 
      Gerry Kessler [mailto:gerry.kessler@xxxxxxxxxx] 
Sent: Wednesday, November 16, 2005 
      11:06 AM
To: 
      wtp-dev@xxxxxxxxxxx; Konstantin Komissarchik
Subject: Facet 
      API
 
       
      
      
      
      For the last few weeks the WTP 
      JSF Tools team has been working with the 1021 IBuild.  The main 
      reason for this was stability as the IBuilds after that one seemed to 
      have some kind of problem that persuaded us to stick with 
      it.
 
      
      
      Anyway, we we had facets 
      working and are preparing to do an initial check-in of code but we first 
      are moving up to the latest available IBuild (20051111814).   
      This email is being written to describe some of the pain I went through so 
      as to help solidify the API and perhaps help others working with 
      facets.  Konstantin - if you would like me to enter bugs 
      for anything I mention below, please let me 
      know.
 
      
      
      A little 
      background.   In the 1021 build, the JSF Facet did not show up 
      in the DynamicWebApp creation wizard.  It was necessary to use the 
      Add/Remove facets wizard.  I have also tried to avoid using 
      any internal WTP classes.
 
      
      
      In the 1021 build, I was able 
      to use a POJO for the facet install action's "config" .  The API 
      still says that it's type is Object.  I discovered that it must now 
      be an IDataModel or nothing works.  The API should be updated for 
      this.  With that came a series of significant 
      changes.
 
      
      
      I then discovered that 
      there is now a config-factory ext-pt element that must be used to create 
      an IDataModelProvider.   After figuring out how to convert my 
      original model, I still struggled to get my install delegate to 
      work.  The problem that I was seeing was that my model was not being 
      updated with the wizard values.   My wizard page was using the 
      public AbstractFacetWizardPage class and I discovered that the API, 
      transferStateToConfig() which I was relying on, was not being called in 
      the context of a New WebApp Wizard.   At that point I found it 
      necessary to follow the WebApp facet creation 
      patterns.
 
      
      
      That meant instead of using 
      the public AbstractFacetWizardPage, I used the 
      internal DataModelWizardPage class.   Please consider 
      making this public.    Although it may not have been 
      absolutely necessary, I then moved the validation code out of the UI to my 
      model provider class to take advantage of the DataModelWizardPage.  I 
      like the synchHelpers, btw, which greatly simplified handling the movement 
      of the UI data to the model.   Please consider adding a 
      synchHelper for CCombo as I needed to change to Combo due to the lack 
      of helper for that control type.    
      
 
      
      
      At this time I am back in 
      business, so to speak, but still see the following issues that are 
      probably framework related.   I have not found bugzilla entries 
      for them.
 
      
        - I 
        have 2 facet versions defined but only one of them is ever 
        available.   It does not matter what runtime is 
        specified. 
        
- If 
        the JSF Facet is created as part of WebApp project creation, and when I 
        use Add/Remove Facet wizard, the JSF facet becomes "fixed".  Only 
        if the facet is created after the project am I able to remove the 
        facet. 
      One last thing.  I need 
      to be able to know the WebContent directory for validation purposes from 
      my facet install page.  In the case of project creation, there is not 
      yet a WebApp and I must somehow get it from the previous page's 
      datamodel(WebFacetInstallDataModelProvider).   How can this be 
      done?