[forge-dev] FacesScaffoldProvider

Daniel Cunha danielsoro at gmail.com
Sun Dec 28 16:23:55 EST 2014


Hi folks,

About FORGE-2072.

The problem is:
We have this method: ErrorPageType getOrCreateErrorPage();
I’ll propose create a ErrorPageType getOrCreateErrorPage(String erroCode);

The getOrCreteErroPage only check if web.xml has an error-page. This case,
if I want do that:

String errorLocation =
getAccessStrategy().getWebPaths(web.getWebResource(ERROR_XHTML)).get(1);
servletConfig.getOrCreateErrorPage().errorCode("404").location(errorLocation);
servletConfig.getOrCreateErrorPage().errorCode("500").location(errorLocation);

The shrinkwrap only put an error-page. This case, only 404. :)

I fixed the FORGE-2072 with 2 methods because we need specify the
WebAppDescriptor for servelet-api version, but this case erro-page is a
common feature for two version of the api. No make sense sense to have two
interface to this method.

Look this:
https://github.com/danielsoro/core/blob/FORGE-2072/javaee/faces/src/main/java/org/jboss/forge/addon/scaffold/faces/FacesScaffoldProvider.java#L1044-L1062

I think better to have:
WebAppDescriptorCommons

   - getOrCreateErrorPage()
   - createErroPage()
   - etc..

WebAppDescriptor30 extends WebAppDescriptorCommons

   - methodETC()…

WebAppDescritptor31 extends WebAppDescriptorCommons

   - methodETC()..

I don’t think a valid idea create a descriptor in forge if we have the
shrinkwrap for that.
IMHO.

If it is a good suggestion, please.. open an issue in shrinkwrap. :)
​
-- 
Daniel Cunha (soro)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20141228/14c0da72/attachment.html 


More information about the forge-dev mailing list