Using ig:slot with unusual parameters
astik <[email protected]>
| Newsgroups | gmane.comp.cms.infoglue.devel |
|---|---|
| Message-ID | <[email protected]> |
I'm working on ig:slot features with a ComponentPage. The invoker
associated to ComponentPage is
org.infoglue.deliver.invokers.ComponentBasedHTMLPageInvoker (it is
standard infoglue configuration).
Into org.infoglue.deliver.invokers.ComponentBasedHTMLPageInvoker line
1714, we can find the process of slot. What is interesting is the list
of param you can use :
- inherit
- disableAccessControl
- allowedComponentNames
- disallowedComponentNames
- allowedComponentGroupNames
- addComponentText
- addComponentLinkHTML
- allowedNumberOfComponents
I found the parameters allowedNumberOfComponents and
allowedComponentGroupNames really cool =) You should had it to the
documentation of ig:slot.
Anyway, my point is : there is a limitation with the ig:slot.
The analysis process works with indexOf " PARAM" with some parameters.
As you can see, there is a white space befiore param name. I used to
do tab to delimit my parameter, like this :
<ig:slot
id="tiles_doc"
inherit="true"
allowedComponentGroupNames="layout"
allowedNumberOfComponents="1"
></ig:slot>
With that declaration, allowedComponentNames, disallowedComponentNames
and allowedComponentGroupNames can't be defined (because of the white
space into the analysis process).
You can fix it by doing :
<ig:slot id="tiles_doc" inherit="true"
allowedComponentGroupNames="layout" allowedNumberOfComponents="1"></
ig:slot>
So, it isn't really a bug, but it would be better if we could write
the way we want.
Removing the white space for the few mistaken parameters is simple :
change
int allowedComponentGroupNamesIndex = slotString.indexOf("
allowedComponentGroupNames");
into
int allowedComponentGroupNamesIndex = slotString.indexOf("
allowedComponentGroupNames");
There are quite a few classes that do the analysis :
- /infoglue2971/src/java/org/infoglue/deliver/controllers/kernel/impl/
simple/PageEditorHelper.java
- /infoglue2971/src/java/org/infoglue/deliver/invokers/
AjaxDecoratedComponentBasedHTMLPageInvoker.java
- /infoglue2971/src/java/org/infoglue/deliver/invokers/
ComponentBasedHTMLPageInvoker.java
- /infoglue2971/src/java/org/infoglue/deliver/invokers/
DecoratedComponentBasedHTMLPageInvoker.java
I guess all invoker are not used, in fact I hope so =)
__
Romain
http://blog.astik.info
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july