001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS <http://nuxeo.com> and others
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Jean-Marc Orliaguet, Chalmers
011 *
012 * $Id$
013 */
014
015package org.nuxeo.theme.jsf;
016
017import org.nuxeo.theme.html.HTMLView;
018import org.nuxeo.theme.models.InfoPool;
019import org.nuxeo.theme.rendering.RenderingInfo;
020
021public class JSFView extends HTMLView {
022
023    @Override
024    public String replaceModelExpressions(final RenderingInfo info, final String html) {
025        final String infoId = InfoPool.computeInfoId(info);
026        return html.replaceAll("nxthemesInfo", String.format("nxthemesInfo\\.map\\.%s", infoId));
027    }
028
029}