• 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
Dynamically append CSS class in D2W
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamically append CSS class in D2W


  • Subject: Dynamically append CSS class in D2W
  • From: Fabian Peters <email@hidden>
  • Date: Mon, 23 Jan 2012 16:54:35 +0100

Hi,

I'm setting a CSS class via a rule like:

    100 : (task = 'edit' and object.isEditingClone = 1) => classForHeader = editingClone [com.webobjects.directtoweb.Assignment]

The above works fine, but it of course removes all existing classes on the header div:

<div class="Header EditHeader EditProductHeader"> => <div class="editingClone">

Is there a "pretty good practice" to handle this in a generic fashion (read: on headers, rows etc.) so that the new class only gets appended?

I looked at ERMDDefaultCSSAssignment and came up with baseClassForXY, but this also does not do exactly what I'm looking for. Which made me think about using a subtask like "cloned", so that it would get included via ERMDDefaultCSSAssignment. But the required configuration seems too much of a hassle right now (probably because I have no experience with using custom subtasks).

Any input much appreciated,

Fabian
 _______________________________________________
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


  • Follow-Ups:
    • Re: Dynamically append CSS class in D2W
      • From: David LeBer <email@hidden>
  • Prev by Date: Re: Rule to access security
  • Next by Date: Re: Dynamically append CSS class in D2W
  • Previous by thread: Re: Rule to access security
  • Next by thread: Re: Dynamically append CSS class in D2W
  • Index(es):
    • Date
    • Thread