[Seaside] using CSS for default Magritte-Editors

Gastón Dall' Oglio gaston.dalloglio at gmail.com
Thu Mar 14 12:06:10 UTC 2013

Hello Stefan.

Hello.First of all I will clarify that I am no expert in html or css, much
less in Seaside, but I mention something that you could try.
* In HTML5 it's totally OK to put a <link> or <style> in <body>.
* In fact, you can even have scoped <style>s that apply only to a part of
your document!
* But in terms of rendering, it may be slower because the browser
re-renders the page.


Then, you can experiment load your css (and your js) in the body. As far as
I understand, in Seaside 3.0.7, WAHtmlCanvas has no support for this, so I
use a raw:

 html html: '<link href="', (SomeLibrary / #someCss) greaseString, '"
type="text/css" rel="stylesheet" />'


2013/3/14 Stefan Krecher <stefan.krecher at googlemail.com>

> Hi,
> i have a main-component where i overwrite updateRoot to inject some css.
> On the main-page, i render a list of domain-objects, every domain-object
> gets an "edit"-link. By pressing edit, i construct a component (->
> descriptions asComponentOn: aMitarbeiter).
> The component will be rendered via self call: component. To inject css in
> the resulting editor, i add a custom MAFormDecoration (with an overwritten
> updateRoot:).
> Now i have the editor for that domain-object. The domain-object has a
> one-to-many-relationship to another domain-object, it is modelled like this:
> descriptionHistorieArbeitsbereiche
> ^MAToManyRelationDescription new
> classes: (Array with: HistorieArbeitsbereiche);
>  accessor: (MAPluggableAccessor read:[ :mitarbeiter | mitarbeiter
> historieArbeitsbereiche ] write: [:mitarbeiter :historieArbeitsbereiche |
> mitarbeiter historieArbeitsbereiche: historieArbeitsbereiche]);
>   label: 'Arbeitsbereiche';
> default: #();
> priority: 500;
>  beSorted;
> cssClass: #historieArbeitsbereiche;
> reference: (HistorieArbeitsbereiche descriptionArbeitsbereich);
>       yourself
> The problem is, that i have no idea, how to inject css in the resulting
> editor (when i click on "edit" or "add").
> Is there a way to inject an link to a css into the header of _every_ page
> that is rendered? If i use call: to render a component, the calling
> component gets replaced (including the <header> section). If a
> magritte-editor is redered via a OneToMany-Relationsip i don't seem to have
> access to the header-section of the resulting html (i only could use a
> custom renderer - here i could try to load css from the <body>-section of
> the page - but that seems do be no clean way.
> thx and regards,
> Stefan
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20130314/2aafcbbc/attachment.htm

More information about the seaside mailing list