Are you using ModernLook?
If so, adding your own css file is accomplished like this:
Override the existing rule that defines the stylsheets:
20 : look = 'ERModernLook' => stylesheets = ("defaultMainScreenStylesheet",
"defaultMainPrintStylesheet", "datepickerStylesheet")
[com.webobjects.directtoweb.Assignment]
i.e:
100 : look = 'ERModernLook' => stylesheets = ("defaultMainScreenStylesheet",
"defaultMainPrintStylesheet", "datepickerStylesheet","myStylesheet")
[com.webobjects.directtoweb.Assignment]
Add the details for 'myStylesheet':
100 : *true* => myStylesheet = {"filename" = "my_stylesheet_filename.css";
"media" = "all"; "framework"="app";} [com.webobjects.directtoweb.Assignment]
--
David LeBer
Codeferous Software
On 2011-12-28, at 11:07 PM, Theodore Petrosky wrote:
> Here is what I find is working, I want to know if this is the 'correct' way
> to add my own CSS.
>
> I was thinking that I should be able to add css to the end of the css that is
> imported into my app.
>
> my problem was that every time I added my css import statement into the
> header of the PageWrapper, the import statement was added as the first css
> file to import. So my CSS would happen too early.
>
> So I tried adding the import into the appendToResponse method:
>
> public void appendToResponse(WOResponse response, WOContext context) {
> super.appendToResponse(response, context);
> ERXResponseRewriter.addStylesheetResourceInHead(response, context,
> "app", "CorrectedCSS.css");
>
> }
>
> CorrectedCSS.css has only one rule:
>
> span.CommentsAttrVal textarea {
> width: 300px;
> height: 75px;
> }
>
> It works and does what I want.
>
> Is this where you would add in new CSS? Am I thinking this through correctly?
> I would love to hear that I am not setting myself up for a really bad
> situation later.
>
> Thanks for the help
>
> Ted
>
>
>
> --- On Wed, 12/28/11, Ramsey Gurley <[email protected]> wrote:
>
>> From: Ramsey Gurley <[email protected]>
>> Subject: Re: rules not applying
>> To: "Theodore Petrosky" <[email protected]>
>> Cc: [email protected]
>> Date: Wednesday, December 28, 2011, 10:31 AM
>> CSS will override the listed
>> attributes in html. Right click and "Inspect Element"
>> using Safari should tell you pretty quickly where the css
>> that is setting the height/width is located.
>>
>> Ramsey
>>
>>
>> On Dec 28, 2011, at 6:20 AM, Theodore Petrosky wrote:
>>
>>> I am following the demo in WOWODC09W-D2W-part2.mov. I
>> am trying to assign a rule to make an element use the
>> "ERD2WEditLargeString" component.
>>>
>>> I have set the component name to ERD2WEditLargeString
>> and a height and rows to values. When I clear the caches and
>> display the EditGrid page, it uses the ERD2WEditLargeString
>> component, however nothing I do will make it change size.
>>>
>>> I inspected the HTML and it shows the values for rows
>> and cols that I selected in the rules file. If I change the
>> rules file numbers for height and rows, I see the html for
>> the textarea changes, but the actual object remains the same
>> size.
>>>
>>> What else is necessary to change to make these changes
>> stick.
>>>
>>> Ted
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be
>> ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
>>>
>>> This email sent to [email protected]
>>
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>
> This email sent to [email protected]
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]