Change CSS file programatically

Hello,
Is there a way to change the CSS file that it's applyed to the project programatically?
Example:
The user enters the application and want's to change it's appearence by giving it a new CSS, so he uploads a .CSS file which should then be applyed to the application.
Thanks,
Rui Belchior

Maybe the CSS can be dynamically generated and made available via a servlet (or any other dynamic technology).
Note also that the Style property of any component can be bound to a Java property:
Right-click on a component, choose Property bindings..., select 'style' in the left column, and bind it to a Java property.

Similar Messages

  • How to update .CSS file programatically

    Hi all,
    I am assigned this role of developing code for my project which involves providing the ability to update the CSS file once the user selects the option to update the CSS.
    This is a role based scenario and only the administrator has the privilege to do the same.
    I will appreciate if code is supported with your suggestions.
    Thanks in advance,
    Prasanna

    The people on this forum will apreciate it if you actually ask a question on Java.
    You should do more then state some vague facts.
    To manipulate files: http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How to edit the core.css file

    Hello,
    All the fonts in my Apex app are too small, and I mean all the fonts, for the interface too. So, I did a bit of research and found it is probably the core.css file that has been adjusted, trouble is I do not know how to change it. Even installed Microsoft Office Sharepoint to do the editing but I cannot locat the file, or rather I can but I cannot seem to be able to edit the file. I think the file can be found here http://127.0.0.1:8080/i/css/core.css but when I try to access this site from sharepoint it prompts me for username and password for the 127.0.0.1 address and does not accept what ever I enter. Any advice welcome.

    Hi,
    I do not recommend you change Apex css files.
    Create your own theme and change css file on that.
    Or add your application page template header style that overwrite font size like
    <style>*{font-size:40px!important}</style>When you try login to xdb where is all images,css and js files use SYSTEM user.
    http://daust.blogspot.com/2006/03/where-are-images-of-application.html
    And Apex related question you should post to Application Express Forum
    Oracle Application Express (APEX)
    Regards,
    Jari

  • Change config file properties programatically

    hi, all i have created one config file and from that file i am readindg data. Now when i click on this file it shows that this file is in read only format. Now in this same config file i want to write the data but when i try to write data by using write key function it gives me some error just like please check the permission of the file.
    For this config file i canot change its permission to archive permenantly. So Is there any way to change the file permission programatically from read only archieve and again from archieve to read only.

    You can change the file permissions programmatically using LabVIEW.  This allows you to temporarily change the permission and modify the file before restoring the permissions to their original settings.
    The Set Permission is found within the Advanced File Functions of the File I/O section of the Functions Palette.
    The information below is from the Context Help.
    R
    Message Edited by JoeLabView on 09-16-2008 08:07 AM
    Attachments:
    filePermission.PNG ‏33 KB

  • EPG means that for every change in the .css files I need to load to DB??

    Hi all,
    I have just figured out the answer to a previous post regarding .css files.
    Now checking if anyone can please tell me I am wrong about this:
    Running Apex on ORACLE XE means that every change to a .css file will only be visible after loading the images directory into the database??
    Thanks!

    Yes, that is correct.
    Fortunately, you can map the APEX images directory to the drive in Windows (or volume on a Mac) using WebDAV. This way, you can edit the .css files right on the database, eliminating the need to load them to the database after each change.
    See this post for more details on how to map the database as a drive: http://daust.blogspot.com/2006/03/where-are-images-of-application.html
    Thanks,
    - Scott -
    http://sumnertechnologies.com/
    http://spendolini.blogspot.com/

  • Css-file on Romote Site does not show changes

    hello
    I use Dreamweaver CS4 on Win7 64bit system.
    I have a new website in construction and today the developer made changes to the Style.css file. Made the changes on an other computer and not in Dreamweaver.
    Now, when I open the Style.css file from the Remote Site, it does not show the changes that were made. However when I delete the Style.css file in my Local Files directory and copy the Style.css file from the Remote Site to the Local Files and open it from the Local Files in Dreamweaver, it shows the new file with the changes that were made. But the Remote file keeps showing the old data.
    I took several steps to try to eliminate this problem. Closing Dreamweaver and deleting the Configuration folders in Users>[NameUser]>AppData>Roaming>Adobe>Dreamweaver CS4> Both in en_US and nl_NL, although the latter did not contain any files.
    This did not work. Deleted the Style.css file on my Remote Site and uploaded it again from my Local Files. Nope. Still shows rthe css-file with the old data.
    Anybody any idea where Dreamweaver gets these old data from and how to make it work differently?
    greetings, Lex van de Oudeweetering

    Hello Ken
    I did not say my page is troubled. The trouble is that the style.css file opened from the Remote Site in Dreamweaver shows the wrong data, but in effect has the right data, because when copied to the Local Files and opened from there it shows the right data.
    The link to the page/site in construction is http://www.lex-illustrator.nl/lexillus
    And I have made screenshots of the opend css files and assembled them beside each other.
    On the left opened from the Local Files and on the right side the same css file opened from the Remote site.
    The orange dots indicate where they differ, the green ones the items that were changed today. So it's not a problem of only today.
    http://www.lex-illustrator.nl/2xcss.gif
    And I have to say I had issues before with updating files to the Remote server and how Dreamweaver shows them. Much of the times I have to delete the Remote file first to get it dispayed right if I check if it has worked by trying to open it from the Remote server.
    So it's not only limited to this site under construction. It looks like a Dreamweaver thing to me.
    Greetings, Lex

  • Changes made to .css file in adf application, Does need to run the page again

    Hi Gurus,
    Please explain me, Changes made to .css file in running adf application, Does need to run the page or just refreshing page from browser will pickup the changes for oracle ADF 11g R2.
    Warm Regards,
    Md Jahangir Pasha

    Hi,
    you have to set CHECK_FILE_MODIFICATION parameter value to "true" on web.xml file.
    <context-param>
        <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
        <param-value>true</param-value>
      </context-param>

  • CSS isn't changing XML File

    I'm working on the example attached trying to get my css to alter the colour of my xml links. Despite doing what the forums say you should it's not working. What am I doing wrong? Thanks
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/css" href="style.css"?>

    I assume I put this code at the bottom of my current AS?
    When I run the fla I get the following message:
    Error opening URL "file:///C|/Documents%20and%20Settings/Jen/Desktop/xml/undefined"
    It still displays my xml info but there is no colour change. This is how my current AS is looking:- Thanks
    function loadXML(loaded) {
    if (loaded) {
    _root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
    _root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
    name_txt.text = _root.inventor;
    comment_txt.htmlText = _root.comments;
    } else {
      trace("file not loaded!");
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("inventors.xml");
    var myCSS = new TextField.StyleSheet();
    myCSS.load(style.css);
    // define onLoad handler
    myCSS.onLoad = function(success) {
        if (success) {
            name_txt.styleSheet = myCSS; // where myTextField_txt is your textfield's instance name
            // call a funciton to assign your text to myTextField_txt
        } else {
            name_txt.text = "CSS file failed to load!";

  • Changing or Deleting Uploaded CSS file

    I am having a problem modifying an uploaded CSS file. I uploaded it just fine but now when I go to the Edit Cascading Style Sheet page and click any of the three buttons (Cancel, Delete, Apply Changes) I get a page not found error with the following URL https://<servername>/pls/htmldb/wwv_flow.accept. If I then press the refresh button I get this error:
    Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.
    Error ERR-7621 Could not determine workspace for application (:) on application accept.
    OK
    I'm sure it is something wrong with the environment because it works great on the Application Express version I have loaded on my laptop.
    Message was edited by:
    ddlloyd

    ddloyd,
    Your CSS is too large to edit directly and save. We attempt to prevent you from doing that, but ultimately, we base our size calculation on the actual size and not the eventual size of the encoded data that will be posted.
    You have really two options - either break this up into multiple CSS files, or edit locally and upload again.
    I hope this helps.
    Joel

  • How can i change the html, jsp, js, css file using ../tools/filemanager.jsp

    Hallo Experts
    I want to know how to get the html, jsp, js, css file using .../strategy/tools/filemanager.jsp? If I search the file such as "commentslist", I'll find the file. It is shown in the table with three columns:
    Column with trash symbol for deletion, Path and Date. But I cannot to fetch the file and saved local to make the modifications.  Could you tell me how I can get the file? Is there another way to this?
    Thanks a lot and
    Best regards!
    Ping

    Wang,
    If you are looking at the commentslist file with the intention of customizing, you would use File Manager Path to be directed to the file's location:
    \usr\sap\<3 letter CE instance>\J00\j2ee\cluster\apps\sap.com\xappscpmsm~strategymanagement\servlet_jsp\strategy\root\pilotworks
    Any customization would have to be noted, since upgrades will overwrite customizations.
    Regards,
    Bob

  • Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only. However opening a CSS file does not prompt that it is alr

    Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only.
    However opening a CSS file does not prompt that it is already open on or from any machine which is causing code edits to be lost.
    What we found from out testing:
    - The file can be saved from one user to the server and WILL NOT PROMPT on other machines until the saving machine has the Dreamweaver program closed completely
    - The file can be closed and  Dreamweaver minimised to the launch bar but it still will not register on other machines that it has been changed.
    - Also, until the  Dreamweaver program is closed on the machines, it will continue to open it's saved version of the file. 
    Example Scenario:
    - User 1 opens test.css (which is 2000 lines) and adds some code to the end of the file to bring it up to 2500 lines
    - Meanwhile User 2 opens test.css as well (opens as 2000 lines as User 1’s edits have not yet been saved) and adds in code to bring it to 2300 lines
    - User 1 saves his file and closes it - but  Dreamweaver is still open.
    - User 2 also saves his file and leaves  Dreamweaver  open.
    - The server will report the size and last edit of the file the same as User 2 as he was the last person to save it (and if you open from the Win7 Machine it will show as User 2’s 2300 line version)
    - If User 1 then open's the file again (from either the 'recent' in Dreamweaver OR clicking on the file directly in Finder...which version opens.... The version that User 1 saved! Not the true version on the server, but the version that User 1 edited and saved with 2500 lines in it.
    - Same for User 2, he will open 'his' version with 2300 lines in.
    Other information:
    - Files are opened directly from the server
    - Sometimes the users will save incrementally and re-open
    - Most of the time users will save incrementally and keep the files open
    - The users will never not save incrementally and just save when closing the file once finished
    - The users are usually working on the files all day
    - It is always the bottom lines of code that are lost. It could be a case of the two versions being mixed up and cutting off the newly added lines based on the line count (possibly).
    It is as if Dreamweaver is holding a cache of the version locally and then only properly looking back to the server when it has been completely closed. It is very difficult to see how the server is causing such an impact on these files, there are very few logs which are giving any indication to the root cause of the problems.
    Anyone know if this is a known issue?
    Is there a way that there can be a featured implemented on the server that doesn't allow another user to open a file if it is already open on another machine?
    Thanks

    Your server file handling has nothing, and really nothing to do with Adobe software. If files don't get locked for (over-)writing and/or lose connection to the program opening them, then your server is misconfigured. It's as plain and simple and that. Anything from "known file types"/ file associations not being set correctly, MIME types being botched, crooked user privileges and file permissions, missing Mac server extensions, delayed file writing on the server, generic network timeout issues and what have you. Either way, you have written a longwinded post with no real value since you haven't bothered to provide any proper technical info, most notably about the alleged server. Either way, the only way you can "fix" it is by straightening out your server and network configuration, not some magic switch in Adobe's software.
    Mylenium

  • How to use a CSS file  in a jspx page..

    I'm using JDev 10.1.3.4.
    I would like to know how can i use a CSS file in a JSPX page..
    there is this file: public_html\WEB-INF\temp\adf\styles\cache\oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css
    How do I make use of this is my jspx page?
    Also how do i use the style class in property inspector?
    What should be the path of "oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css"?
    Also please tell me what changes I have to make in all the other files like web.xml or adf-faces-config.xml.
    Im using web application template using (EJB,Toplink and JSF)
    Please suggest the detailed steps as I'm new to JSF.
    Thanks ,
    Shri

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • How can I specify a different css file for mobile browsers?

    I'm experimenting with updating our website to be "mobile friendly". I could use some help.
    We use a lot of static HTML landing pages for things like links from email ads, etc. What I'm trying to do is have 1 landing page so the content/html page is always the same, but the page will detect what browser/device you are using and then load a different css file depending on what it is. But, we don't want to have to load the style info from the PC version if you're not on a PC.
    What I'm doing now is specifying the media type in the css link, like this..
    <link rel="stylesheet" href="style.css" type="text/css">
    <link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="mobile.css" type="text/css">
    What's happening is it's loading the main stylesheet first, and then the 2nd one changes some styles if you're on a device with a max width of 480 pixels (like an iPhone). But since it's loading the PC styles first, it's making some things look screwy.
    So, is there a way to say "If you're on a PC, load this stylesheet. If you're on an iPhone, load this one instead." .. without javascript? I don't trust javascript too much on mobile devices. I feel like this some simple little thing that I'm missing that will make it all automagically work.
    We don't want to have different content depending on the browser, just different stylesheets. Can anyone help?

    Hi
    Would it be better to do 2 different stylesheets, or just one big one and add a section at the bottom like:
    @media only screen and (max-device-width: 480px) {   .styles {whatever: styles;} }
    2 separate style sheets are recommended. The reason for this is that the Safari mobile browser, (as used in iPhone etc) will download any/all images specified in a style sheet even if they are not used or specified in a media-query rule, this is a know bug with that browser.
    I'm also having a new issue where the style "clear: both;" doesn't seem
    to be working right. I set up my top horizontal menu using float: left,
    and there's a lot of links so on the smaller screen it wraps, which is
    fine but now the wrapped links are floating over the page content...
    This is one of the reasons that floats should not be used in style sheets for mobile devices, the only exception I know of is for small typographical feature such as 'pull-quotes', (and never use float: right;). It is also recommended to include a menu at the bottom of the page, (or at least a link back to the top).
    It works, if I have the iPhone as portrait it looks great, but if I turn
    it to landscape, everything is zoomed in. But if I switch back to
    portrait, everything is the right size. Is there any kind of way to get
    the landscape to have the normal zoom level? I know I can do
    "initial-scale=1.0", but that is just for when the page loads, not if
    you change it afterwards...
    I have heard of only one recommendation to fix this and that is a page refresh on resize, but due to bandwidth limits now being implemented by many providers it is probably not a good idea, you could try setting -
    maximum-scale = 1.0
    as well.
    PZ

  • Use css file in oracle 10g report builder

    hi every one
    i am using oracle 10g report buidler. i want control paramform by usign css file.
    any body have idea how can i use css file in oracle report builder 10g and how can i modify it's path and i how can i manage any css class on a perticular field.

    Thanks Billy.
    Yes you are right.
    Here why I discarded that option is,
    I may get the source files with changing layouts.
    My Actual scenario is as follows.
    Initially we developped all the things using PL/SQL packages. Its working fine.
    But as per the inputs we received from requirements group, the file structure changes dynamically. and we would able to consider those new columns also. We should be able to changes the rules dynamically.
    Lets say, we doing fullouter join on Src_A and Src_B. on columns col1_A and col1_B.
    Now the requirement changes in a way that, the join should be done on Src_A and Src_C. on columns col1_A and col_C.
    For this I need to define a new package.
    Instead of that, I would like to do everything dynamically based on configuration parameters given as input.
    Thank you,
    Regards,
    Gowtham Sen

  • How To Use a css File To Watermark A Report

    Hello.
    I am using Apex 4.0.1 and have a need to place a watermark (that is, a background image) over a report, both a "classic" type and Interactive Report.
    I have two questions about this.
    1) I've searched this Forum and found several good questions/responses about this subject. What I think is the most maintainable solution is to create a .css file and reference this file within the Template section of a copy of, say, the "Reports Region" template used by my application theme. And so, I made a copy of the "Reports Region" template and called it "Watermark Reports Region". I then created a very simple .css file called "bgimg.css" defined as:
    #REGION_STATIC_ID# {
    background-image: url(#WORKSPACE_IMAGES#menu_bug.png) !important;
    background-repeat: repeat !important;
    background-attachment: fixed !important;
    Note: For those that may not know, the "!important" clause is, in fact, a css defined clause used to tell the browser that it should give the associated option the highest precedence. This prevents my desired css option from being overridden by another css file. Frankly, I myself did not know this until after I saw it being used in several of the responses on this Forum and then read up about it.
    I uploaded this css file via the Apex "Shared Components -> Cascading Style Sheets" option. I also made sure that menu_bug.png is, in fact, among my workspace images.
    I also made sure that my "Watermark Reports Region" template contains the substitution variable "REGION_STATIC_ID" and that my actual report region has a value in the Region Static Id field.
    Within my "Watermark Reports Region" template, I tried to reference my .css file. This is where I think my problem is.
    I placed
    <link rel="stylesheet" type="text/css" href="#WORKSPACE_IMAGES#bgimg.css" />
    at the very top of the Template section in my "Watermark Reports Region" template.
    I then assigned my template to my Apex report. When I run my report, I see nothing.
    So, how does one reference this css file within the template?
    =================================================
    2) I tried using my css tags as an internal style by placing it within the "HTML Header" section of my application page. I used:
    <style type="text/css">
    #empreport {
    background-image: url(#WORKSPACE_IMAGES#menu_bug.png) !important;
    background-repeat: repeat !important;
    background-attachment: fixed !important;
    </style>
    I assigned a div tag to my report region header and footer that looks like:
    In Header: <div id="empreport">
    In Footer: </div>
    When I run the report, I do get the image. But it is surrounding the report. It looks like my report is "floating" in a sea of bug images.
    So, how can I get these images to actually appear within the report itself. In other words, I want the report itself to be "transparent" so as to allow these images to be seen within the report body itself.
    Thank you all for any help/advice/code example.
    Elie

    Elie
    Thanks for taking the time to post sufficient information to understand the problem. In future if you're going to such efforts you might want to use them to reproduce the problem on apex.oracle.com, which means you can share actual working (or more likely not working!) code. Please also always wrap code posted on the forum in tags<tt>\...\</tt> tags to preserve formatting and special characters.
    >
    I placed
    <link rel="stylesheet" type="text/css" href="#WORKSPACE_IMAGES#bgimg.css" />
    at the very top of the Template section in my "Watermark Reports Region" template.
    >
    According to the relevant HTML 4.01 and XHTML 1.x standards, <tt>style</tt> and <tt>link rel="stylesheet"</tt> elements should only appear within the <tt>head</tt> element of a document.
    This changes in HTML5. The new <tt>scoped</tt> attribute allows <tt>style</tt> to be used in a prescribed way elsewhere in the document, with the effect that the styling rules specified are only to be applied to the other descendant elements of that <tt>style</tt> element's parent (in the way you're trying to do here). I'd expect <tt>link</tt> with a <tt>rel="stylesheet"</tt> to remain restricted to <tt>head</tt> content in HTML5: off the top of my head I can't see a use case for referencing external stylesheets in a non-metadata context.
    That said, current browsers apply CSS regardless of where in the document it appears, and future HTML5-compliant ones will continue to continue to do so for backwards compatibility. For myself, when using XHTML 1.0 I'll continue to follow the only put <tt>style</tt> and <tt>link</tt> elements in the page <tt>head</tt>. When I get round to using HTML5 for real I'll follow the standards for that as well.
    I strongly recommend that you follow the standards and only put <tt>link rel="stylesheet"</tt> elements in the page <tt>head</tt>.
    >
    Note: For those that may not know, the "!important" clause is, in fact, a css defined clause used to tell the browser that it should give the associated option the highest precedence. This prevents my desired css option from being overridden by another css file. Frankly, I myself did not know this until after I saw it being used in several of the responses on this Forum and then read up about it.
    >
    Use <tt>!important</tt> only where it's actually needed. It's over-represented in this forum because Oracle changed the order of style sheet inclusion in APEX 4.0 and made it more difficult to override theme styles using CSS in the page HTML Header without modifying page templates.
    Try your styles initially without using <tt>!important</tt>, and also consider using the cascade to provide any necessary overrides by including your CSS after other style sheets.
    >
    I then created a very simple .css file called "bgimg.css" defined as:
    #REGION_STATIC_ID# {
    background-image: url(#WORKSPACE_IMAGES#menu_bug.png) !important;
    background-repeat: repeat !important;
    background-attachment: fixed !important;
    I then assigned my template to my Apex report. When I run my report, I see nothing.
    >
    Because <tt>#WORKSPACE_IMAGES#</tt> is not substituted in external CSS files: +{thread:id=986329}+
    If possible it's much better to locate image, CSS and JavaScript files externally on the file system. Otherwise you'll have to use the workaround suggested in that thread and include a <tt>style</tt> element in the page templates to specify the background image.
    When I run the report, I do get the image. But it is surrounding the report. It looks like my report is "floating" in a sea of bug images.Reports are descendants of their region containers and may be subject to additional built-in or theme styles that overrides that specified for the region. Your CSS selector has to specify the report element, not the entire region.
    So, how can I get these images to actually appear within the report itself. In other words, I want the report itself to be "transparent" so as to allow these images to be seen within the report body itself.I'd use a <tt>class</tt> attribute in the region template: this removes the need to use the <tt>#REGION_STATIC_ID#</tt> selector, and allows the CSS to go in the page <tt>head</tt> where it belongs. Add <tt>watermark-report-region</tt> in addition to any existing <tt>class</tt> values in the region template:
    <div class="borderless-region watermark-report-region" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
      <div class="bl-body">#BODY#</div>
    </div>You may have to inspect the page source (use a web inspector like that found in Safari, or the Firefox+Firebug combo) to figure out what has to be overridden in the theme/templates you're using. This worked for an Interactive Report using theme 17:
    .watermark-report-region .apexir_WORKSHEET_DATA {
      background: #fff url(/i/menu/blank_app_32.gif);
    .watermark-report-region .apexir_WORKSHEET_DATA tr.even td,
    .watermark-report-region .apexir_WORKSHEET_DATA tr.odd td {
      background-color: transparent;
    }For a standard report you'll need to identify the selector required for the actual report element (equivalent to the <tt>apexir_WORKSHEET_DATA</tt> table) using the web inspector or from the report template. It would be a good idea to create standard report template(s) incorporating a <tt>watermark-report</tt> class on the report table to provide a simple selector for such reports.

Maybe you are looking for

  • Ammount formating num{$z,zzz,zz9.99}

    Hi All Need help in formating the amount fields. Currently I am using num{$z,zzz,zz9.99} Its working fine for positive ammount value. But for negative amount its giving output as $-18,970.50 Expected out is -$18,970.50 need '-' sign before $ Thanks,

  • My calendar in 10.8.2 never finishes updating and new entries are not syncing to cloud

    When i open the Calendar app and choose to refresh my calendars the 'Calendar -- Updating...' message at the top of the calendar window never goes away and the new entries on my computer do not make it to the cloud.  Additionaly new entries on the cl

  • Mouse wheel usability

    Is rubbish.  Cmon abode,  its not rocket science.  Or maybe I'm doing wrong - Is there any other way to scroll audio and video layers other than with the scrollbar? If not here are some no brainer suggestions: existing: scroll along timeline with mou

  • I can't install netflix in the iPad, why is this?

    I'm trying to install the Netflix app in. My iPad but it won't let me. The message says that request cannot be completed. What can I do?

  • Elements 10 extraction error message

    I am trying to load Photoshop Elements 10 onto a computer running Win XP SP3. I have downloaded it twice and try to run it with the Akamai netsession installer program. I am getting the following error: A problem occurred while extracting some files.