Thanks Jan, I did the latter.

regards,

Ernst

2010/1/18 Jan Haderka <[email protected]>:
>
> I guess that's what is also described in
> http://jira.magnolia-cms.com/browse/MGNLSTK-564
>
> the quick workaround would be
> - either to have more then one handler defined
> - or change the check to get the first handler from the list when the
> handler name is not set.
>
> HTH,
> Jan
>
> On Mon, 2010-01-18 at 16:35 +0100, Ernst Bunders wrote:
>> hello
>>
>> I think i stumbled upon a bug in the dam support code.
>> If you only have one dam handler, the dam dialog control no longer
>> shows the radio group with the possible dam handlers. This is nice.
>> But i suspect that because of this, the property 'image' is no longer
>> set (to the selected dam handler name).
>> Therefore in info.magnolia.module.templatingkit.dam.DAMSupport
>>
>> the following method (line 99) will throw an AssetNotFoundException,
>> because the handler can no longer be resolved.
>>
>> Any ideas for a quick workaround?
>>
>> regards,
>>
>> Ernst
>>
>>  public Asset getAsset(Content node, String nodeDataPrefix) throws
>> DAMException {
>>         String handlerName = NodeDataUtil.getString(node, nodeDataPrefix);
>>         final String path = node.getHandle() + "/" + nodeDataPrefix;
>>         if(StringUtils.isEmpty(handlerName)){
>>             throw new AssetNotFoundException("No handler defined for " + 
>> path);
>>         }
>>         final DAMHandler handler = handlers.get(handlerName);
>>         if(handler == null){
>>             throw new DAMException("No handler found with name [" +
>> handlerName + "] for [" + path + "]");
>>         }
>>         return handler.getAsset(node, nodeDataPrefix);
>>     }
>>
>>
>>
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
>



-- 
Ernst Bunders
Ontwikkelaar VPRO

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to