• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERXResponseRewriter.addStylesheetResourceInHead(...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXResponseRewriter.addStylesheetResourceInHead(...)


  • Subject: Re: ERXResponseRewriter.addStylesheetResourceInHead(...)
  • From: Farrukh Ijaz <email@hidden>
  • Date: Thu, 14 Jul 2011 15:59:47 +0300

Thanks Jean,

I can manage with this. This will solve the problem and there is only one css that I insert once so no worries about checking if it already inserted or not.

Farrukh

On 2011-07-14, at 3:43 PM, Jean-Francois Veillette wrote:

> By default ERXResponseRewriter will insert just before the "</head>" tag, you can call
>
> You could use insertInResponseBeforeTag directly and use it like this:
> 1- keep an 'early-tag' in your html, like:
> <html>
> <head>
> <!-- EARLY_TAG -->
> ...
>
> 2- use use that tag as a reference:
> 	public void appendToResponse(WOResponse response, WOContext context) {
> 		super.appendToResponse(response, context);
> 		String content = "<link rel=\"stylesheet\" type=\"text/css\" href=\""+ URL + ... you get the idea ...;
> 		tagMissingBehavior
> 		ERXResponseRewriter.insertInResponseBeforeTag(response,  context,  content, "<!-- EARLY_TAG", TagMissingBehavior.Top);
> 	}
>
> Warning:
> If you make your call manually, you do not benefit from many automatic checking done for you:
> - making sure the resources is loaded only once
> - resources replacement
> - ajax style response support (that may not have <head> in it at all).
> - probably other things ... look at what ERXResponseRewriter is doing when you simply call ERXResponseRewriter.addStylesheetResourceInHead
>
>
> Le 2011-07-14 à 05:48, Farrukh Ijaz a écrit :
>
>> Re-sent to grab attention :), may be some of you could have a solution!
>>
>> Thanks,
>>
>> Farrukh
>>
>> Begin forwarded message:
>>
>>> From: Farrukh Ijaz <email@hidden>
>>> Date: July 13, 2011 6:47:15 AM GMT+03:00
>>> To: WebObjects Development <email@hidden>
>>> Subject: ERXResponseRewriter.addStylesheetResourceInHead(...)
>>>
>>> Hi Guys,
>>>
>>> I've an issue. In the ERXResponseRewriter is a method called addStylesheetResourceInHead(...). This method adds the stylesheet right before the </head> tag.
>>>
>>> According to CSS style inheritance, I should load the CSS in proper sequence. The CSS I'm adding is the base CSS but because it's being inserted just before the </head> tag, the inheriting CSS appear before this CSS in the final response and therefore whole CSS hierarchy breaks. Is there a way I could make the CSS inserted right after the <head> tag?
>>>
>>> Thanks in advance,
>>>
>>> Farrukh
>>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ERXResponseRewriter.addStylesheetResourceInHead(...) (From: Farrukh Ijaz <email@hidden>)
 >Fwd: ERXResponseRewriter.addStylesheetResourceInHead(...) (From: Farrukh Ijaz <email@hidden>)
 >Re: ERXResponseRewriter.addStylesheetResourceInHead(...) (From: Jean-Francois Veillette <email@hidden>)

  • Prev by Date: Re: ERXResponseRewriter.addStylesheetResourceInHead(...)
  • Next by Date: Re: Question about 1-to-many relationship
  • Previous by thread: Re: ERXResponseRewriter.addStylesheetResourceInHead(...)
  • Next by thread: How to open a URL in WO
  • Index(es):
    • Date
    • Thread