Hello,

I've defined my own theme and an additional markup. It works,
when I use the standard resource path 
org/apache/myfaces/tobago/renderkit.
But when I change the path to my own package de/wlps/ndr/tobago/renderkit,
it doesn't work. The class defintion in my style.css has no effect. 
I can see the reference to my own style.css in the html source. When I
enter this URL in my browser, I can see the style class defintion.
So the resource location seems to work properly. The defined class is 
referenced in the generated html code for the tc:in tag.

This is the tobago-theme.xml

<tobago-theme>
  <name>gena</name>
  <deprecated-name>de.wlps.ndr.tobago.context.GenaTheme</deprecated-name>
  <resource-path>de/wlps/ndr/tobago/renderkit</resource-path>
  <fallback>speyside</fallback>
  <renderers>
    <renderer>
      <name>In</name>
      <supported-markup>
        <markup>number</markup>
        <markup>modified</markup>
      </supported-markup>
    </renderer>
  </renderers>
</tobago-theme>

In web.xml, I setup a ResourceServlet:

  <servlet-mapping>
    <servlet-name>ResourceServlet</servlet-name>
    <url-pattern>/de/wlps/ndr/tobago/renderkit/*</url-pattern>
  </servlet-mapping>


This is the generated html code:

...
<link rel="stylesheet" 
href="/gena-demo/de/wlps/ndr/tobago/renderkit/html/gena/standard/style/style.css"
 media="screen" type="text/css">
...
<input type="text" name="gena:_idJsp108" id="gena:_idJsp108" value="566756" 
style="width: 100px; height: 20px;" class="tobago-in-default 
tobago-in-markup-modified ">
...

And finally, this is my style.css:

.tobago-in-markup-modified {
  background-color: yellow;
}  

Is there something else, I have to setup?
Thanks for help
Helmut


>Hello,
>
>with a own theme you can define additonal markup for components that 
>support the markup property. At this time out, in and box (trunk).
>
>I will prepare a short howto for "Own Theme and Custom Markup" later.
>Because lack of time this won't be finished until tonight :-(
>
>Regards
>
>Bernd
>
>[EMAIL PROTECTED] wrote:
>> Hi! 
>> 
>>  
>> 
>> In HTML, I write for example: 
>> 
>>  
>> 
>> <style> #xyz { color: red; } </style> 
>> 
>> ... 
>> 
>> <input type="text" id="xyz" value=""/> 
>> 
>>  
>> 
>> In Tobago, I must write: 
>> 
>>  
>> 
>> <tc:style> #page1:xyz { color: red; } </tc:style> 
>> 
>> ...
>> <tc:page label="Test" id="page1">
>> ...
>> 
>> <tc:in value="Test" id="xyz">
>> 
>> Because Tobago concatenates all hierarchical ids with a colon.
>> But in style denifitions colons are not allowed for ids. So the style 
>definition 
>> has no effect.
>> Is there a workaround for this problem? Or is there any other way to set the 
>
>> style for
>> indiviual components?
>> 
>> Thanks for any help!
>> Regards
>> Helmut
>>

Reply via email to