On Thu, Jan 29, 2009 at 6:23 PM, Dan Miron <[email protected]> wrote:
> Thomas Mortagne (JIRA) wrote:
>>     [ 
>> http://jira.xwiki.org/jira/browse/XWIKI-2882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35171#action_35171
>>  ]
>>
>> Thomas Mortagne edited comment on XWIKI-2882 at 1/28/09 3:40 PM:
>> -----------------------------------------------------------------
>>
>> *  this macro should not depends on radeox, expecially if it's just to use 
>> org.radeox.util.Encoder. You should directly generate the List<Block> and 
>> not generate a html string and call html macro to do it in 
>> RssMacro.renderSearch.
>>
>> * in RssMacro.renderEntries() you should use ParserUtils.parseInlineNonWiki 
>> to parse the description, WordBlock is supposed to contains only one work 
>> and not an entire paragraph.
>>
>> * never use wiki syntax in macros
>>   -- macro is supposed to not be syntax dependent
>>   -- a macro is supposed to work on XDOM level
>>   -- create directly the right block is way faster
>> If the problem is that you can't pass List<Block> for the title to 
>> BoxMacroParameters, do it another way:
>>  -- you could define a protected List<Box> getTitle() methods in 
>> AbstractBoxMacro like you have getClassProperty() and extend it with a 
>> RSSEntryMacro class
>>  -- you could also add a set/getBlockTitle in BoxMacroParameters based on 
>> List<Block> which can be used from java (we could even imagine to be able to 
>> use it from wiki syntax with the tight BeanUtil converter)
>>  -- ...
> Regarding the last issue, about whether to  use or not  wiki syntax for
> rendering the title I must say I'm a bit puzzled. I thought that the
> point of allowing wiki syntax to be specified in the title for the
> boxMacro was right this, to properly render the titles of the rss
> entries in the RssMacro.

No, the goal was to be able to allow a user to give wiki syntax as
title when he use box macro. I don't say you have to change the way to
handle titles from String to List<Block> but to provide two ways to do
it since macros should never use syntax.

> ................................
>
> [15:42:26] Vincent Massol: now re the links I'm not sure yet
> [15:42:37] … there are different ways of doing that I guess
> [15:43:29] … one idea (brainstorming): we could allow inline wiki syntax
> to be used the title parameter maybe
> [15:44:14] Dan Miron: yes, it could be a way
> [15:44:17] Thomas Mortagne: I like that yes
> [15:46:45] Vincent Massol: hmm I wonder if this is something we'd want
> for all macros
> [15:47:09] … not sure
> [15:47:17] Thomas Mortagne: at wors we can add a isTitleWiki
> [15:47:19] Vincent Massol: even for this use case I'm stil not fully sure
> [15:47:51] … it sounds good but I wonder if we'd get side effects
> [15:48:09] … actually we wan't do that in a generic way for all macros
> [15:48:20] … since it's not going to generate text
> [15:48:25] … but Blocks
> [15:48:32] … so the macro needs to handle that
> [15:48:50] … s/Wan't/can't/
> [15:49:33] … ok I think I'm +1 for making the image and title params
> allow inline wiki syntax here for this macro
> [15:49:45] … (it's a good experiment, we'll see how it goes)
> [15:49:49] … wdyt?
> [15:49:53] Thomas Mortagne: +1
> [15:50:03] Jean-Vincent Drean: +1
>
> ..................................
>
> Anyway, if we need to quit using wiki syntax in the title, i'd prefer
> the second choice, "add a set/getBlockTitle in BoxMacroParameters based
> on List<Block> which can be used from java". Should I go on with this?

I prefer the set/getBlockTitle way too.

>
> Tnx,
> Dan
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to