Importing the js and css files included in the distributable JAR

Hi, I have a custom JSF component that needs one .css and one .js file.
The question is: how can I put those files in the distributable JAR of the component, allowing the jsf pages that use this custom tag, to automatically import them –once per page-?
(RichFaces components, for example, work in this way).
Thanks.
[Lately, searching in SUN forums works horribly for me –in both Firefox and IExplorer-¿?]

JSF 2.0 will have this functionality out of the box. See [1].
Would recommend you give it a shot. The first beta will be released soon, but the nightlies [2]
are fairly stable right now.
If you're a maven type of person, the nightly snapshots can be obtained using this info;
Mojarra 2.0.0 API
group ID: com.sun.faces
artifact ID: jsf-api
version: 2.0.0-SNAPSHOT
Mojarra JSF 2.0.0 IMPL
group ID: com.sun.faces
artifact ID: jsf-impl
version: 2.0.0-SNAPSHOT
[1] http://blogs.sun.com/rlubke/entry/jsf_2_0_new_feature5
[2] https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=9814&expandFolder=9814&folderID=0

Similar Messages

  • Stop Dreamweaver loading scripts/CSS files included in a page

    Dreamweaver CC 2014.1 (Mac OS X 10.10, Yosemite) has a big BUG... isn't possibile build with it large/complex websites.
    If I have a website with large numbers of css files (or scripts), Dreamweaver takes too much time to load/save a page that included them (the wheel turns indefinitely).
    Is it possible to stop Dreamweaver from loading scripts and CSS files included in a page while I'm working on it (even temporarily)?
    I know that without this function (load external files) Dreamweaver is absolutely useless, but at the moment I haven't still found another IDE tool and I need to work with speed.
    Thanks

    Live View, Code View or Design View?
    Have you validated your code to check for errors?
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    You could comment out your links to external scripts and CSS Files.
    <!--this is an html comment
    -->
    To turn off styles in Design View only, go to View > Style Rendering > untick Display Styles.  Or consider using a Design-Time Style Sheet.
    Dreamweaver Help | Use Design-Time style sheets
    To speed things up a bit, try these tips:
    1. Edit -> Preferences -> Code Hints -> Disable description tooltips
    2. Edit -> Preferences -> Highlighting -> Untick both Live Data Untranslated and Translated
    3. Edit -> Preferences -> Sync Settings -> Untick all in sync settings
    Nancy O.

  • Including external javascript and css files in servlet

    Hello,
    I am struggling to generate an HTML page from within a servlet using external javascript and css files. I am not sure how to point the servlet to the external files.
    Any code sample to accomplish the above will be much appreciated.
    Thanks inadvance,
    Antana.

    Can't you just include the following in your servlet?
           response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Getting CSS</title>");
            out.println("<link rel='stylesheet' type='text/css' href='yourCSS.css' />");
            out.println("<script language='JavaScript' SRC='yourScript.js'></script>");
            out.println("</head>");
           //...

  • How to import programmatically an APEX images file using workspace images option and CSS files to APEX?

    Oracle db 11gR2
    Oracle APEX 4.2.1
    Linux RHEL 6.3
    I am importing a images file programmatically into APEX.  And also a CSS file.
    I want to add an images file to my APEX instance but I want to choose the option -- workspace images --.  How does one do that programmatically via the APEX API e.g.?
    I don't want the images tied to an application within APEX.
    Does one do the same thing for CSS files that are imported to APEX?
    thx.

    This is interesting and helpful,  I use the following code to import my APEX database application and run it via SQL*Plus and it works fine for database applications -- what do I need to change/add/modify in order to load the images and CSS files?  NOTE: I want the images to be -- Workspace images -- not tied to any application.  Also, I need to handle the situation where the images and CSS data already exist in the APEX environment as well as when they are not there (i.e. initial install).  Usually it is a case where it is an upgrade so the data already exists in the APEX app and just needs to be updated.
    declare
                      v_workspace      varchar2(35)    := 'WORKSPACE';
                      n_existing_app   number          := 123;
                      n_new_app        number          := 456;
                      v_app_alias      varchar2(35)    := 'WKALIAS';
                      v_parsing_schema varchar2(35) :='WORKSPACE_PARSE';
                      n_secgrp_id      number;
                      v_err_msg        varchar2(200);
                      n_err_num        number;
                      n_workspace_id   number;
                    begin
                      -- get workspace id
                      select workspace_id
                      into n_workspace_id
                      from apex_workspaces
                      where workspace = v_workspace;
                      -- set workspace id
                      apex_application_install.set_workspace_id (n_workspace_id);   
                      -- set security group
                      apex_util.set_security_group_id (p_security_group_id => apex_application_install.get_workspace_id);
                      -- set pasring schema
                      apex_application_install.set_schema(p_schema => v_parsing_schema);
                      -- delete existing app
                      begin
                        wwv_flow_api.remove_flow(n_existing_app);
                      exception
                      when NO_DATA_FOUND then -- do nothing when the application does not exist
                        null;
                      end; 
                      -- set new app id
                      apex_application_install.set_application_id(p_application_id => n_new_app);
                      -- generate offset
                      apex_application_install.generate_offset;
                      -- set application alias
                      apex_application_install.set_application_alias(p_application_alias => v_app_alias);
                      exception
                      when others then        
                        n_err_num := SQLCODE;
                        v_err_msg := SUBSTR(SQLERRM, 1, 200);
                        dbms_output.put_line('Error number = ' || n_err_num);     
                        dbms_output.put_line('Error message = ' || v_err_msg);
                    end;
    @newapp.sql
    commit;

  • Load the External text and css file for more frames

    hello..
           I created one Movie file. In that I load the External text and css file in first frame and display the first variable value in one text box.
    And then in 2nd frame I use another one text field and display the 2nd variable value like that I want to load the more variable in more textboxes with different frames.
         I loaded  for first variable value in first frame. But I don't know how to do next frames like that..
         Help me...

    You need to load them in the frames they are in.  You can store the loaded data in variables in frame 1, but you will need to extend that layer so that whatever is stored is avaliable in other frames.  The code to load the data into the other textfields can then be done in the frames where it is needed.
    There are other options, such as not using other frames for content or having all of them in frame 1 and making them invisible until you get to the other frames where they get turned visible.

  • How to decrease the size of the JS and CSS File

    Hi experts,
    I m facing a bandwidth problem because i m accessing an application from a PDA and i noticed that it takes a very long time to load a very simple page. After some investigation, i noticed that its because the JS and CSS files downloaded are rather big.
    sapUrMapi_ie6.js (Size: 301 KB)
    sapWdSsr_ie6.js (Size: 79 KB)
    ur_ie6.css (Size: 247KB).
    Any idea how to minimize the size of these files or any workaround as to this problem ?
    Your help will be much appreciated.
    Regards,
    Daniel

    Hi,
    Check this link this may be helpful to you
    http://help.sap.com/saphelp_nw04/helpdata/en/b5/7e1141e109ef6fe10000000a1550b0/frameset.htm
    Regards,
    SURYA

  • Java script and css files are not loaded

    I am using 9iAS 1.0.2.2.2a on Windows Server Family 2000. My web application is using bc4j and developed in JDeveloper 3.2. I am also using Apache and web cache and caching js and css files.
    Problem is some times it does not load js files but load css files.
    Some times loads css files but does not load js files.
    Some times does not load js and css files.
    & some times loads both types of files.
    How to control this problem.
    Tahir Pervaiz.

    I'm fairly certain this issue represents a bug in IE 11. The same problem(s) do not occur in IE 9 or IE 10. The same problems occur on unrelated websites accessed from separate machines. Doing a force-refresh (Ctrl+F5) always fixes the issue.
    I took your advice about opening the console to look for error messages during page load. When loading normally (i.e. not doing a force-refresh), the console shows the following:
    HTML1300: Navigation occurred.
    File: TimeEntry
    DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
    File: Dashboard
    SCRIPT70: Permission denied
    File: modernizr-2.5.3.js, Line: 468, Column: 9
    SCRIPT70: Permission denied
    File: jquery-ui-1.10.0.js, Line: 252, Column: 1
    SCRIPT70: Permission denied
    File: knockout-2.2.1.js, Line: 48, Column: 5
    SCRIPT5007: Unable to get property 'extend' of undefined or null reference
    File: knockout.validation.js, Line: 30, Column: 5
    When loading the page via a force-refresh, only the 'Navigation occurred.' message is displayed. It does not make sense that IE would apply a more restrictive security policy to scripts loaded from cache vs. scripts loaded directly from their original location,
    yet that appears to be what is happening.
    Post questions about html, css and scripting for website development to the IE Web Development forum.....WITH A LINK TO YOUR WEBSITE OR A MASHUP THAT SHOWS THE ISSUE...
    looks like you have a sandboxed iframe on your page.
    the first step in troubleshooting IE issues is to test in noAddons mode.
    Rob^_^

  • How to batch or individual import Canvas .CVX and .CNV files into AI CS6(mac)?

    Is anyone aware how to batch or individually import Canvas .CVX and .CNV files into AI CS6(mac)? I have a large old graphics library representing 10 years of work which would be very nice to convert into Illustrator CS6...
    Thanks a lot for any hint -
    stefan

    JETalmage wrote:
    ...export them as an EPS or another file type that windows will recognize...
    It's not a matter of exporting a file that Windows will recognize; it's a matter of exporting a file format that Illustrator can import or open.
    A Mac OS version of Canvas is under development, by the way.
    JET
    My bad. Typo on my part. I meant one that Adobe will recognize.
    Too early yet. I shouldn't try to type before I get my first morning tea.
    --OB.

  • Does EP 7 supports xHtml and css files?

    Hello,
          Does EP 7 supports xHtml and css files?
    Regards
    Sunil Kulkarni

    As I mentioned to Sergio, it was probably when I switched back to flows_010500. When I did
    wwv_upgrade.switch_schemas('FLOWS_010500', 'FLOWS_010600');
    I was logged in as FLOWS_010600. However when I switched back using
    wwv_upgrade.switch_schemas('FLOWS_010600', 'FLOWS_010500');
    I was still logged in as FLOWS_010600. I believe that's the mistake; I should have been logged in as FLOWS_010500 to switch back to FLOWS_010500. I remember seeing this somewhere in the doc (that you should be logged in as the user you are migrating/reverting to), but it doesn't appear to be enforced.
    In any case, thanks Sergio for the quick and easy fix! I'm now going to re-install the flows_010600 user and hope that things go smoothly this time.

  • Removing the BC generated JS and CSS files from pages

    Hi,
    We're working on a feature to allow you to generate pages without our styles and JS files. This is what we're planning to build, we need feedback on some automated JS/CSS generation for some pages and modules.
    We will add one flag per "Page Template" flag (to not output module CSS or our JS things)
    The Site Manager/Page Templates/Detail UI will have a new boolean control in the More Options sectionDon't include pre-generated HEAD elements
    Once you are on a page that uses a template with this flag set to on, you won't see in your HEAD the following/StyleSheets/ModuleStyleSheets.css
    We are wondering if you want us to include the validation JS files. Today, depending on the modules you have in the page or the type of overall layout (e-commerce, etc), we're adding the following files (click the image to see the code). Should we keep those or the flag should disable those, too?
    Sincerely,
    Alexandru

    This will be a great little tweak,
    Thank you Alexandru.
    Just to clarify, the tick opton will be on web pages UI?, Template UI?, And Detail layouts like web apps etc - Anywhere where you select a template?
    That would be great.
    I am a bit torn with the javascript, The CSS - Yep go for it, But while I could see some advantages turning that off too, it may cause more problems.
    I think a common use case is wanting to use CSS frameworks like foundation and Bootstrap. You will defiantly want to turn the modulestylesheets from rendering. But then if the javascript also got turned off, when you were doing eCommerce, and some other bits you would have to rebuild your own sollutions which would take up a lot of time.
    My feedback on possible options:
    - Two tick boxes to turn offf css or Javascript - this is a bit more messy though, It would solve the above dilema though.
    - Maybe for now the CSS would be enough for now? Maybe with the re-introduction of Liquid down the line there could be something using that developers can do with conditionals?
    - Both and provide documentation on how and where and when to include the javascripts back in. This would be a bit more messy support wise maybe?
    - A bit more work but could offer more options going forward could help in a lot of ways would be to turn the head into a layout under Layouts.
    This would have tags such as the BC javascript, a tag that renders the conditional .NET from your screenshot. A tag for the CSS and other elements, tag for the meta that is automatically generated etc.
    This would also have the added effect of allowing people to fix up some meta layout issues, and have a bit more control when using frameworks, HTML5 or XHTMl doctype varients etc.
    With Liquid in the future as well and conditionals this would also then allow more posibilities as well.
    The sollution I take it would also be on by default for BC App html pages Alexandru?
    Hopefully that is helpful and I hope others provide feedback for you as well.
    Thank you for the update.

  • How to connect the  flex and css file on the server..

    when i work on my system, i just give source="abc.css" in style tag but when i upload its not working...can someone help me?

    A common practice is to place the CSS files under <src><assets><styles>  directory in your project.
    Then, in your MXML file  you  use them :<mx:Style source="/assets/styles/common.css"/> 
    When ready to publish to online server, you do as "Export release build" from your project menu.
    This will generate all you need files in the "bin-release"  directory in your project environment.
    You should upload all this content ( from the bin-release directory)  to your server.

  • Lightroom 5.4 problem importing older crw and nef files

    Built new computer. Fresh install of Photoshop Lightroom 5.4. Imported photos to lightroom 5.4. After import session completed noted some folders in catalog had zero photos. Checked folders in explorer and photos/files are present. Able to open and view photos/files in Photoshop cs5.
    Files are raw files format  from canon G1 CRW and Nikon d70 NEF.
    Any ideas? How do I proceed? Should I download and install the free Adobe DNG Converter? But these are old cameras?
    thanks

    Thanks for the reply. No the files were not list in a LR Catalog anywhere on the computer. I was able to import the missing files by right clicking on the empty folder in the LR Catalog, selected the import to folder option. This opened the import LR Window, I deselected the "duplicate option" . This allowed the files to become visible, not the usual grayed out thumbnails usually seen if attempting to import a duplicate. Once I selected the raw files LR imported them to the folder. I did get a LR message stating that a "smart preview already was present for files.
    If LR was able to verify a smart preview for the files from a previous import, why were the folders in LR displaying a 0 for files/photos?
    I am in the process of reviewing the LR Catalog to ensure everything was imported.

  • Lightbox js and css files are empty

    Hello All,
    I am new to this forum, new to Dreamweaver (running CS6) and new to web design and html and all of it really.  I am hoping you can help me. 
    I installed the lightbox widget, put my own pictures in, which show up fine, but nothing happened when clicking them.  I checked the js file, it is blank.  Checked the css file, it is blank.  I am sure this is my problem.  However, I don't know where to go to get the code for the js or the css.  Can anyone help me?  I have two pages that I would like to install this on and can't get either of them to work.
    Thank you so very much.
    Maria

    Try Fancybox instead.
    http://fancybox.net/
    See Primer for using jQuery Plugins
    http://alt-web.blogspot.com/2012/11/primer-for-using-jquery-plug-ins.html
    Nancy O.

  • Theme Editor  and CSS files

    Hi all,
    NetWeaver Portal 2004 SP16
    For those of you who have worked with the Theme Editor probably feel the same way as I do: it's just not good enough. It allows you to change some styles but really for real changes one has to edit the million stylesheets manually.
    When going down that road, the Theme Editor becomes useless because it overwrites your manually applied changes.
    As long as you reapply your changes afterwards, this works pretty good but I'm still confused about one thing. The stylesheets that are actually called from the webpage are followed by some sort of counter. For example:
    ../prtl_std/prtl_std_ie6.css?6.0.16.0.31 The last number increases everytime you save a theme in the Theme Editor, so it acts as a version numner (see themeInfo.properties).
    And now the annoying part: this <u>sometimes</u> prevents my manual changes to be read (one can check this by inspecting the css files in browser cache).
    My question: what does this counter do? Are themes also stored in the PCD / database and if so where? What can be done to have the portal ALWAYS push the css files from the irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal directory?
    Cheers
    Marcel

    The counter works with the database. It is actually possible to edit other (no visible) style sheet classes via the Theme Editor

  • Importing AVCHD .MTS  and .M2TS files (Sony HDR-SR1) into iMovie 08

    I've read numerous other threads about trying to get these files into iMovie 08 but I'm still having problems.
    I can plug my camcorder in just fine and have it import directly off there. But for older video files that I took with this camcorder I have two folders. One with just the .MTS files that I pulled off the camcorder. And the other with the YYYYMMDDHHMMSS (.modd & .m2ts) files that I archived (using my sony software) on my pc way back when I was using my PC for video editing.
    I created a .DMG that I copied everything from my camcorders HD to. I was able to mount this and iMovie 08 worked just like when I plug my camcorder in. But my problem comes when I try to work with the older .MTS and .M2TS files that I backed up. I was hoping that I could just put them in the
    DMGIMAGE\AVCHD\BDMV\STREAM folder and have it import just like before but no luck there. Any ideas as to how I can go about pulling these old raw video files to work with in iMovie? Thanks.
    Message was edited by: Billy McQueary

    Welcome to the  Discussion Forums.
    You might try voltaic to convert these files before adding them to imovie

Maybe you are looking for

  • Error while adding the Objects in Existing DSO -Table /BIC/B* is too long ( 004030)

    Hi Team, We added some objects in the existing Write Optimized DSO.  while activitating the DSO We got the below error . Table /BIC/BXXXXXXXXX is too long (>004030) Please go through the issue and provide the solution. Thanks, Purushotham.

  • Re-installing Photoshop Elements 12 on 8.1 Windows computer

    Have just re-installed Photoshop Elements 12 ok on my Windows 7 home computer following hard drive failure. For various reasons I have now decided I need to use this computer at work. I will buy new computer for home which will be Windows 8.1. I only

  • Re: Buttons not working (branched)

    Hello, I've installed the lastest version of InDesign CC on my Mac and it works great. But in my PC the animations, buttons and functions for ePub don't work. I've tried to unistall a hundred times and still not working, even in the ePub preview. It

  • Did I just delete my imovie 08?

    So I installed ilife 08 (i really just wanted imovie) and THEN installed ilife 06 (just wanted imovieHD)....now its like I only have ilife 06.  is there a proper order or process I should've taken?  and can I ONLY install the movie things?  maybe iph

  • Setting work item as obsolete

    Hi Experts, We are using modeled deadline monitoring. We are setting the " Workitem to obsolete" in the process control step. Does this imply that the approver will not be able to execute the work item once it crosses it deadline. In case of repeated