!important attribute in StyleSheet rule ignored

I have a JTextPane which I am inserting HTML into. I have a StyleSheet which states
that p tag text whould be blue. This is flagged as '!important' and should overide in-line
tags. In the HTML, I have used a variety of in-line tags (font, style and p tags) specifying that the text should be green. It always displays green even though the StyleSheet rule should overide it and display blue.
Any ideas how I can increase the priority of the StyleSheet defined rules?
/**Component initialization*/
private void jbInit() throws Exception
jEditorPane1.setContentType("text/html");
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
this.setSize(new Dimension(400, 300));
this.setTitle("Frame Title");
contentPane.add(jEditorPane1, BorderLayout.CENTER);
StyleSheet style = new StyleSheet();
style.addRule(" p { color: #0000ff ! important; }"); // blue = 0000ff green = 00ff00
HTMLDocument doc = new HTMLDocument(style);
doc.setParser(new ParserDelegator());
jEditorPane1.setStyledDocument(doc);
// All these lines display green
// String line = "<font color=#00ff00><p>some text</p></font>";
// String line = "<p><font color=#00ff00>some text</font></p>";
String line = "<p style=\"color: #00ff00\">some text</p>";
javax.swing.text.Element e;
for (ElementIterator i = new ElementIterator(doc); (e = i.next()) != null; )
if ("body".equalsIgnoreCase(e.getName()))
     break;
doc.insertAfterStart(e, line);

" As already mentioned this supports CSS. We don't support the full CSS spec. Refer to the javadoc of the CSS class to see what properties we support. The two major CSS parsing related concepts we do not currently support are pseudo selectors, such as A:link { color: red }, and the important modifier."
The above is from the javax.swing.text.html.StyleSheet API documentation.

Similar Messages

  • Can routine replace "master data attribute of" update rule for performance?

    Hi all,
    We are working on CRM-BW data modeling, We have to look up agent master data for agent level and position for each transaction data. So now we are using "Master data attribute of" update rule. Can we use routine instead of "Master data Attribute of" ? Will it improve the loading performance? Since we have to load 1 lack transaction records , where as we have 20,000 agent details in agent master data.My understanding is, for each record in data package the system has to go to master data table and bring the agent details & store in cubes. Say one agent created 10 transactions, then this option "master data attribute of" will read the agent master data 10 times even though we are going to pull same details for all 10 transactions from master data. if we use routine, we can pull the agent details& storing in internal table removing all duplicates and in update routine we can read the internal table.
    Will this way improve performance?
    let me know if you need further info?
    Thanks in advance.
    Arun Thangaraj

    Hi,
    your thinking is absolutely right!
    I don't recommend to use the standard attribute derivation since it will perform a SELECT to the database for EACH record.
    Better implement a sorted table in your start routine; fill it with SELECT <fields> FROM <master_data_table> FOR ALL ENTRIES OF datapak WHERE OBJVERS = 'A' etc...
    In your routine perform a READ itab ... BINARY SEARCH.... I believe that you won't be able to go faster...
    hope this helps...
    Olivier.

  • ER: organize imports in an "import" attribute of a JSP page directive

    Hi,
    it would be useful to see packages/classes hierarchy when changing the "import" attribute of <%@ page %> directive. It might be as well to have all possibilities of imports processing as in .java classes (autoadding, remove unused import, etc.)
    Thanks in advance.

    Hello Scott,
              First, you have to define this page directive in your static page or JSP
              page :
              <%@ page contentType="text/html; charset=UTF8" %>
              Check your your weblogic.properties file for the following settings:
              weblogic.httpd.inputCharset specifies encoding used when changing into the
              internal code of Java from the parameter of the browser's request. If you
              use Shift_JIS in HTML or JSP, please set
              weblogic.httpd.inputCharset./*=Shift_JIS.
              weblogic.codeset specifies encoding used when jDriver stores data in an
              Oracle database and it changes into the character code of a database from
              the internal code of Java. If you use ja16sjis in Oracle database, please
              set the same encoding as NLS_LANG to weblogic.codeset.
              Hope this helps
              Ludovic.
              Developer Relations Engineer
              BEA Support
              "Scott Mark" <[email protected]> a écrit dans le message news:
              3cd67e5d$[email protected]..
              > Did you ever get around this? Is there an issue with UTF-8 encoding?
              >
              > We are going to have to deliver a site in Japanese soon, and are
              researching how well WLS handles double-byte chars...
              

  • Import attributes thru import manager

    Hi,
        What are are steps to import the attributes and LINK them to records through import manager. Is there some blog or articles refer please. Excel file with supporting different attribute types (numeric,coupled and text) will help along with steps to import the attributes import manager.
      Is linking of attributes to records is possible through import manager?
    Thanks
    Edited by: SDN POWERED on May 21, 2009 9:59 AM

    Hi,
    In order to work with the Taxonomies, you need to perform the following steps:
    1. Import Categories
    2. Import Attributes
    3. Attributes values.
    4. Attribute links
    Please refer to the links below to understand the Taxonomy import process step by step:
    Master Data Management Import Manager - Taxonomy Data (Splitting Into Hierarchy) u2013 Part 1:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30aa1447-80a1-2a10-e483-a76087bcb12f
    Master Data Management Import Manager - Taxonomy Data (Attributes) u2013 Part 2:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090d0bd-1da7-2a10-468f-bdd17badb396
    Master Data Management Import Manager - Taxonomy Data (Attribute Text Values) u2013 Part 3:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8090941f-a5a7-2a10-3ba6-b4af5ec6d97b
    Master Data Management Import Manager: Taxonomy Data (Attribute Links), Part 4:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/308c62a2-5faa-2a10-fda6-fa4aa7169734
    Hope this helps.
    Thanks and Regards
    Nitin Jain

  • Look up InfoObject's attributes in update rule

    Hello Gurus!!!
    I have an update rule that looks up for an InfoObject's attributes to update some fields of an InfoCube. Is there another way to do this look up than load all InfoObject attributes into an internal table from the start routine? I tried to read the attribute's table directly from the routine but it takes very very long time.
    Thanks for your help!!

    Hi:
    I think you made good progress with Viren's advice.
    Your statement looks fine. Now, I think you should play with some settings.
    1) Try reading a sebset without too many AND statements. I cannot tell you which ones are important.
    Look at it this way, if you get 1 million by htis complex Select, try to get 1.5 mil by simplifying the statement since you don't have memory problems anymore.
    If you are reading my Master Data table, why don't you read by KEY, Active Data and just one more FIELD (you pick the field which will give you least values).
    E.g.
    SELECT * FROM /bic/pzdocument
       INTO TABLE it_document
       FOR ALL ENTRIES IN DATA_PACKAGE
       WHERE
       /bic/zdocument = DATA_PACKAGE-ac_doc_no AND
       objvers = 'A' AND
       item_num = DATA_PACKAGE-item_num.
    Another one is that there is a good chance your DATA_PACKAGE-ac_doc_no  is there Multiple times. Now your Select Statement will read the DB table Multiple Times. So, you can do this:
    DATA_PACKAGE_1 like DATA_PACKAGE.
    DATA_PACKAGE_1 [] =DATA_PACKAGE [].
    DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE_1
                 COMPARING ac_doc_no.
    Then, write your Code.
    SELECT * FROM /bic/pzdocument
       INTO TABLE it_document
       FOR ALL ENTRIES IN DATA_PACKAGE_1
       WHERE
       /bic/zdocument = DATA_PACKAGE_1-ac_doc_no AND
       objvers = 'A' AND
       item_num = DATA_PACKAGE_1-item_num.
    Its difficult to tell which one is more efficient. Your best bet is to spend soem time on these Codes and get the Statistics. Also, take an ABAPers help if available.
    Good luck,
    Forget: Its a good time now to play with your Laod Tansfer Settings (do it at the InfoPackage Level so that you don't change others' load)
    Go to InfoPackage, Sechduler from Menu, Data Transfer Settings for Max Size, no. of data packets.
    Ram C.
    Message was edited by:
            Ram Chamarty

  • Import file from Excel and ignoring the headers

    Hi all,
    is it possible to import files(spreadsheets) from Excel and ignoring the first row that contains the headers? Since headers might contain special characters such as "\n", "&" and "/", i wonder if you can tell me how to load .xlsx files while ignoring the first line that contains description regarding the header.
    Thanks

    Put a filter on one of the fields on the source data store in your interface. It is likely that your header row will have some unique identifying attribute so filter on that e.g. if you are importing nmeric amount data it is unlikely that your header line contains a numeric value in the amount field but a decription such as "amount", put a filter testing if the value of that field is numeric or not

  • ImportNode() does not import attribute values

    I want to import one part of xml document into another xml document. I use the Document.importNode() method to do this. Here's my code snippet:
    Document newdoc = db.newDocument();
    Node importedNode = newdoc.importNode(xmlnode,true);
    But as the result the xml part is copied into importedNode, but attribute values are empty. What do I do wrong? I'm really lost, so thanks for ANY help.

    Well, the importNode() method should do this. But while using Xerces (I must use this one (currently in 1.4.4 version), not any other parser) you'll find out there is a bug in this method. It could work for you (maybe), but for me it just removes all the attribute values. So I'm still looking for an answer.
    I wrote one very simple (not generic, which is enough for my case) method to just hack the behaviour, and I entered bug to Xerces bugzilla, but nobody cares ;O( for it. Sad, but true.

  • Not able to import Attribute Text Values in Taxonomy table

    Hi Experts,
    I have an excel file with 54K records of Attribute text values need to import in to taxonomy table. my excel file has 3 fields like ID, Name, Text Values. While mapping the fields in feild mapping grid, I have mapped ID field with Attribute Alias, Name with Attribute name, Text Value with Text Value and clone field of Text Value with [Text Value Remote Key]. Based on the field mapping I was trying to map values for ID filed with Attribute Alias field. Here I found Attribute Alias field has values in destination grid which were imported before for Attribute Name ID's in to the Alias field for attribute names.
    Here I found these values are different when I tried to map these values and the Value map buttons(Automap/Map/Add) were disabled.
    in the same way I tried with out maping the values for Attribute value id and selected the Attribute Alias field as value mapping field. but here in the import actions tab the records are active and disabled the import action option.
    so I have executed the import process, but no attribute text values were imported in to Taxonomy table.
    I am using the MDM 7.1 with build version 7.1.01.46.
    Please let me know if anyone came across this situation.
    Thanks,
    RDNPrasad

    problem solved

  • Problem using 'the current day' attribute in a rule

    Hi,
    I have encountered an issue where the following two rules, (the second rule in word document table as best I can depict) will not compilewill not compile:
    the current time of day = ExtractTimeOfDay(the current time)
    |the earliest start date time available to the applicant |
    |___________________________________________________________|
    |AddHours(the current time, 48) | the application is premium for output |
    |__________________________|________________________________|
    |AddHours(the current time, 72) | otherwise |
    |__________________________|________________________________|
    variable_timeofday[the current time of day]
    The two errors I am getting are :
    Error after 'the current time of day = ExtractTimeOfDay('. Found: 'the current time)'. Expected: expression, variable, constant
    Error after 'AddHours('. Found: 'the current time, 48)'. Expected: expression, variable, constant
    I encountered this while compling with OPA version 10.1.1.19. It compiles successfully with version 10.1.0.27, however.
    Any help would be very welcome.
    Thanks,
    Mike
    Edited by: Mike Nidd on 24-Feb-2012 04:15

    The compile errors you are getting imply that you do not have 'the current time' defined as a variable. If 'the current time' was defined as DateTime attribute it should compile correctly and 'the current time of day' would result in the extracted time. However, the attribute 'the current time' doesn't really make sense in this instance i.e. it implies just time rather than date and time).

  • Attribute Assignation in Rules File

    Hi!
    I am using a Rules File to automatic attributes assignation. The particular thing of this cube, is that the cube acept duplicated members.
    The structure of the dimension is as follow:
    - CC
    -> CC1
    ----> E1
    --------> C1
    --------> C2
    - Eje [Attribute Dimension]
    -> Eje 1
    -> Eje 2
    The Rules File is as follow:
    Level0,CC; Level1,CC; Eje1,CC
    C1; E1; Eje1
    The result of the execution of the Rules Files is as follow:
    - CC
    -> CC1
    ----> E1
    --------> C1
    --------> C2
    -> E1 [Attribute: Eje1]
    ----> C1
    I don't know what is the problem here, because the rules file don't search if the member exists in the structure and only create a new member with the attribute association.
    Do you know what is happen here?

    By attribute we are passing some extra information (like resourceBundle, unique etc) about property/item-descriptor etc.
    you can refer below url:
    http://docs.oracle.com/cd/E23507_01/Platform.20073/RepositoryGuide/html/s1605samplecompositerepositorydefinit01.html
    -RMishra

  • OAM : Multi-valued attribute in Authorization Rule Actions

    Our application is protected by an Oracle Access Manager deployment, where the identity user base is based in an Oracle Internet Directory.
    In the OID, for every user entry, we have a multi valued attribute (say, 'roleattr') which contains the roles recognized in our application. Once the user is authenticated by the Access Server, we need the roles associated to him to be fetched and returned in the page header (similar to uid).
    Hence, our question is, in PolicyManager, by setting the Authorization Rule > Actions, is it possible to retrieve this attribute (which is 'multivalued') and populated into the pageHeader, so that our application can retrieve the same.

    Sure, you'll get a colon-delimited list of the multiple values in your header!
    -Vinod

  • Syntax for datapump import utility (If data exists ignore table.)

    I am trying to import 2 DMP files of the same schema with different data in the tables. The first one has half the tables filled with data from one subject area and the other dmp files has data from another subject area. Is there a syntax in the import utility which if data exists in a table ignore or skip it?
    Thanks in advance.

    Hello,
    Is there a syntax in the import utility which if data exists in a table ignore or skip it?You have the Parameter TABLE_EXISTS_ACTION = SKIP :
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/dp_import.htm#SUTIL936
    But it let the Table as is. If a Table is empty it will stay empty.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Journal Import Attributes not processed

    Hi,
    I'am loading data in an interface table to create journal lines using Standard Journal Import program and I am passing values in attributes fields in my interface table. The attributes are for the table GL_JE_LINES.
    After processing of Journal Import, my journal lines are created but no information appears in the attribute fields.
    I have pass Context value as well.
    I can't find why attribute values are not taken by Journal import.
    Please help
    Vik

    Hello,
    Yes it was argument7 when submitting the request via fnd_request.submit - the value should be either O- without validation or W- with validation.
    , p_argument1 => l_interface_run_id
    , p_argument2 => TO_CHAR(fnd_profile.value('GL_ACCESS_SET_ID'))
    , p_argument3 => 'N'
    , p_argument4 => NULL
    , p_argument5 => NULL
    , p_argument6 => 'N'
    , p_argument7 => 'O'-- import dff
    , p_argument8 => 'Y'
    Thx
    vik

  • How to use Entity Attributes in excel Rule File

    Hello,
    I have defined two entities Entity A with two attributes and Entity B child of A with two attributes.
    I needed to have many instances of theses objects thats why i have chosen entities.
    I need to calculate for each entity a result depending on the values of the attributes filled by the user.
    My final goal is to have the sum of these calculated results.
    The issue i am facing is whenever i try to define a rule in Excel, OPM considers the attribute as global (and creates it) and not as entity level. I therefore have duplicate error.
    How can i tell Excel/OPM that the attribute is entity level ?
    Thank you.

    Make sure you are using exactly the same attribute text in Excel and in your properties file. You can also use the legend key to map from the attribute text to a shorter form.
    There isn't any magic here! If the text is the same it will match.
    If you provide the actual text of the attributes and entities you are using, we might notice something else.
    Davin.

  • Condition Rule ignored?

    I can't work this out but for some reason I can get it to see this rule
    When it gets to
    if thisBrand is equal to "Kids" then
    it seams to ignore it?
    I can't see where the logic goes wrong?
    This was the outcome
    tell application "Mail"
      make new outgoing message with properties {subject:"Week 33 images", visible:false}
      --> outgoing message id 1
      (*Kids*)
      display dialog "2"
    Thanks in advance!
    tell application "Mail" to quit
    --while mail is closed, add in the default Reply-To key in a UserHeaders dictionary
    do shell script "defaults write com.apple.mail UserHeaders '{\"Reply-To\" = \"[email protected], you@@company.com\"; }'"
    display dialog "Please enter the current week number." default answer ""
    set weekNumber to text returned of the result
    set brandsToUse to choose from list {"Adult", "Kids", "Baby"} with prompt "Choose brands to send out." default items {"Kids"} with multiple selections allowed
    -- get the html template
    set htmlTemplate to read "Users/StudioD/WorkFlow/EMAIL PROJECT/content.html"
    considering case
      -- this section splits the template text at every XX, then rejoins it using the week number
              set htmlTemplate to tid(htmlTemplate, "XX")
              set htmlTemplate to tid(htmlTemplate, weekNumber)
    end considering
    tell application "Mail"
              set subjectLine to "Week " & weekNumber & " images"
              repeat with thisBrand in brandsToUse
                        considering case
      -- this section adds the brand name, done inside the loop because it's different for each email
      -- the 'my' keyword is needed because you're calling a handler from within a tell block
                                  set htmlContent to my tid(htmlTemplate, "*LOGO*")
                                  set htmlContent to my tid(htmlContent, thisBrand as list) -- thisBrand is an item in the full list
                        end considering
      -- create a new message.  visible must be false for the 'html content' line to work correctly
                        set newMessage to make new outgoing message with properties {subject:subjectLine, visible:false}
                        tell newMessage
      -- create a variable recipient address based on brand name
      log thisBrand
    -- Here is the issue!!!!!!!!!!!
                                  if thisBrand is equal to "Kids" then
                                            display dialog "Option A"
                                  else
                                            display dialog "Option B"
                                  end if
                                  set html content to htmlContent
      -- send the email
      send
                        end tell
              end repeat
    end tell

    What should happen is that you can select up to all 3  brands
    Adult
    Kids
    Baby
    then each brand receives 1 email that corresponds to their brand. So Brand Adult gets an email with a hyper link to adult
    Whereas currently brand adult will get the above and then another email with a link to the other brand and so on.
    How can I stop this happening?
    Hope this makes sense,

Maybe you are looking for

  • My iPhone 4 is stuck in recovery mode after I tried to update it, & itunes won't let me restore my phone! Help?

    So after trying to update my phone to ios7, it got stuck in recovery mode. I tried plugging it into my computer and itunes, and itunes recognizes that an iphone is plugged in. TThen when I click "restore my iphone", it says on itunes that it is in th

  • More than one Windows ACS Remote Agent

    We recently added a second Windows Remote Agent to have Windows authentication service available for our two ACS. Agent definition (CSAgent.ini) is correct but in Network Configration - Remote Agent (on each ACS web console) we see that the second Re

  • Date format(UTC Time Stamp in Short Form (YYYYMMDDhhmmss)

    Hello Everybody,                         I am facing a problem regarding creating an update program. The program will pick up data from a DB table through the RFC: RFC_READ_TABLE and then it will modify the custom DB table present in the system from

  • Error 205 When Installing

    Hi I've been trying to download Creative Cloud so I can work on After Effects CC but when I try to install it it says "There seems to be a problem with the downloaded file(s), please contact our customer service page. (Error Code: 205) I need a way t

  • Speach to text for Instant Messaging with Skype?

    I posted the following in the Windows Phone Ideas area.  I can't believe that Microsoft has not included this functionality already. Skype needs to add speach to text functionality on the Windows Phone platform.   We had this capability in Messenger