Hi again,

In fact it works ! Just adding the engine directive in the view declaration
enables the view only for the specified engine. That make it fairly simple
to implement a custom engine without touching the others.

Thanks for the help... and for the flexibility of the framework !

Nel


2008/6/23 Jean-Marc Orliaguet <[EMAIL PROTECTED]>:

> Nel Taurisson wrote:
>
>> Thanks for the two really quick answers !
>>
>> I don't know how I missed the template, looked for it for some time now !
>>
>> Ok, now, just to see if I've caught it, if I define a new view name
>> section template like this it will use my custom template for my engine and
>> leave the default engine untouched :
>>
>> <view name="section frame">
>>    <element-type>section</element-type>
>>    <engine>my-engine</engine>
>>    <format-type>widget</format-type>
>>    <template>nxthemes/jsf/widgets/my-section-frame.xml</template>
>> </view>
>>
>>
>>
>> Thanks again.
>>
>> Nel
>>
>
> Hi,
> I haven't tried in fact. The most intuitive solution would be to override
> the existing view. You can start experimenting with that, making sure that
> your contribution comes last during deployment.
>
> If you register a new engine you'll have to add some references to it in
> other places too (replacing 'default-engine' for instance)
>
> PS: you could also override the file
> nxthemes/jsf/widgets/my-section-frame.xml directly inside your package, this
> could be the simplest solution
>
> Regards
> /JM
>
>
>
>
>>
>>
>> 2008/6/23 Jean-Marc Orliaguet <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
>>
>>
>>    Alexandre Russel wrote:
>>
>>        Nel Taurisson wrote:
>>
>>            Hi all,
>>
>>            I'm trying to write a new theme engine to change deeply
>>            the rendering mechanism for an app we are building. But it
>>            isn't really clear for me how (where) the theme rendering
>>            really occurs.
>>
>>            If anybody has any cues on that. For example, where are
>>            the section tables (with class ending with SectionFrame)
>>            rendered ?
>>
>>        One of the main idea of the theme engine is its use of URL. A
>>        URL, uses a protocol, a host and a resource
>>        (http://google.com/index.html)
>>        The theme engine defined its own protocol (nxtheme) and when a
>>        URL such as nxtheme://... is wanted it ask the:
>>        org.nuxeo.theme.protocol.nxtheme.Connection an input stream to
>>        fetch it.
>>        To see it work, you could put a break point in this class at
>>        the start of getInputStream() and see it fetch all it needs.
>>        You can also put a break point in:
>>
>>  org.nuxeo.theme.jsf.facelets.vendor.DefaultFaceletFactory.getFacelet(URL
>>        url)
>>        to see from where such URL are fetch.
>>
>>        Restart JBoss before so the facelet are created and not fetch
>>        from the cache.
>>
>>        alex
>>
>>
>>
>>    Hi,
>>    The rendering of Section Frames is not hardcoded in the theme
>>    rendering engine at all. In fact it is defined in:
>>
>>    nuxeo-theme-jsf/src/main/resources/OSGI-INF/nxthemes-jsf-contrib.xml
>>
>>
>>    <extension target="org.nuxeo.theme.services.ThemeService"
>>    point="views">
>>
>>     ...
>>
>>     <view name="section frame">
>>        <element-type>section</element-type>
>>        <format-type>widget</format-type>
>>        <template>nxthemes/jsf/widgets/section-frame.xml</template>
>>      </view>
>>
>>    </extension>
>>
>>
>>    It is possible to register custom views for a specific elements
>>    (page, section, ...) and also you can register new rendering
>>    engines, this is all done in XML, not in Java.
>>
>>    I'm working on adding new parameters for the different template
>>    engines (JSF, freemarker, ..), it will look like:
>>
>>      <view name="section frame">
>>        <template-engine>jsf-facelets</template-engine>
>>  <element-type>section</element-type>
>>        <format-type>widget</format-type>
>>        <template>nxthemes/jsf/widgets/section-frame.xml</template>
>>      </view>
>>
>>    /JM
>>
>>
>>
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to