tangyong / GlassFishOSGiJavaEESample

GlassFishOSGiJavaEESample
1 stars 1 forks source link

Cant declare a CDI bean in fragment module #1

Open rmpestano opened 11 years ago

rmpestano commented 11 years ago

steps to reproduce: 1 - create a CDI bean in module 1 2 - try to reference it via el expression in about.xhtml like below:


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>About Module 1</title>
    </h:head>
    <h:body>     
        <h:outputText value="#{myBean.greeting}"/>
    </h:body>
</html> 

3 - no content is shown

rmpestano commented 11 years ago

i see that we are loading about.xhtml in main web app via bc.getBundle().getEntry(path) which in fact doesnt pass throught faces servlet and consequently doesnt invoke my CDI bean greeting method, am i right? if yes how can we workaround that?