Making JSF 1.0 Work

Today I took the time to go through and make JSF work, and after some finding out I made it fly. Luckily I only needed to patch various deployment descriptors... [diffs included]
Perhaps other people can benefit from these expperiences;
1. I needed to patch the TLD's for the scriptfree and permittedTaglibs
libraries, as they are not conforming; and so I couldn't deploy them
with a validating parser.
2. The TLD for the demo-components includes reference to a non-existing
tag, components.taglib.AreaSelectedTag. Again, our pedantic deployment
tool wouldn't allow deployment.
3. In the provided web.xml (inside jsf-components.war, for example),
there is no reference to the ConfigureListener, and so nothing
worked until I added that.
BTW, congrats on the release; good work!
Kresten
Who's at JAOO?
http://www.jaoo.dk
Apple-Mail-719489557
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
     x-unix-mode=0644;
     name="demo-components.jar:META-INF:components.tld"
Content-Disposition: attachment;
     filename="demo-components.jar:META-INF:components.tld"
--- components.tld~     Sat Mar 13 15:57:59 2004
+++ components.tld     Sat Mar 13 16:05:43 2004
@@ -170,38 +170,6 @@
<tag>
- <name>area_selected</name>
- <tag-class>components.taglib.AreaSelectedTag</tag-class>
- <body-content>empty</body-content>
- <description>
- Register an AreaSelectedListener, of the class specified by the
- type attribute, with the parent MapComponent in which we are nested.
- </description>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Component reference expression for this component.
- </description>
- </attribute>
- <attribute>
- <name>type</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Fully qualified name of a JavaBean class (which must implement
- components.components.AreaSelectedListener) to be registered.
- </description>
- </attribute>
- </tag>
- <tag>
<name>data_repeater</name>
<tag-class>components.taglib.DataRepeaterTag</tag-class>
<body-content>JSP</body-content>
Apple-Mail-719489557
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
     x-unix-mode=0644;
     name="standard.jar:META-INF:permittedTaglibs.tld.diff"
Content-Disposition: attachment;
     filename="standard.jar:META-INF:permittedTaglibs.tld.diff"
--- permittedTaglibs.tld~     Sat Mar 13 15:42:51 2004
+++ permittedTaglibs.tld     Sat Mar 13 15:43:48 2004
@@ -3,22 +3,26 @@
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
- "http://java.sun.com/xml/ns/j2ee web jsptaglibrary_2_0.xsd"
+ "http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
version="2.0">
<description>
Restricts JSP pages to the JSTL tag libraries
</description>
+ <display-name>permittedTaglibs</display-name>
<tlib-version>1.1</tlib-version>
- <jsp-version>2.0</jsp-version>
<short-name>permittedTaglibs</short-name>
<uri>http://jakarta.apache.org/taglibs/standard/permittedTaglibs</uri>
- <display-name>permittedTaglibs</display-name>
<validator>
<validator-class>
     javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV
</validator-class>
<init-param>
+ <description>
+ Whitespace-separated list of taglib URIs to permit. This example
+     TLD for the Standard Taglib allows only JSTL 'el' taglibs to be
+     imported.
+ </description>
<param-name>permittedTaglibs</param-name>
<param-value>
     http://java.sun.com/jsp/jstl/core
@@ -26,11 +30,6 @@
     http://java.sun.com/jsp/jstl/sql
     http://java.sun.com/jsp/jstl/xml
</param-value>
- <description>
- Whitespace-separated list of taglib URIs to permit. This example
-     TLD for the Standard Taglib allows only JSTL 'el' taglibs to be
-     imported.
- </description>
</init-param>
</validator>
</taglib>
Apple-Mail-719489557
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
     x-unix-mode=0644;
     name="standard.jar:META-INF:scriptfree.tld.diff"
Content-Disposition: attachment;
     filename="standard.jar:META-INF:scriptfree.tld.diff"
--- scriptfree.tld~     Sat Mar 13 15:42:51 2004
+++ scriptfree.tld     Sat Mar 13 15:45:46 2004
@@ -3,51 +3,50 @@
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
- "http://java.sun.com/xml/ns/j2ee web jsptaglibrary_2_0.xsd"
+ "http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
version="2.0">
<description>
Validates JSP pages to prohibit use of scripting elements.
</description>
<tlib-version>1.1</tlib-version>
- <jsp-version>2.0</jsp-version>
<short-name>scriptfree</short-name>
<uri>http://jakarta.apache.org/taglibs/standard/scriptfree</uri>
<validator>
+ <description>
+ Validates prohibitions against scripting elements.
+ </description>
<validator-class>
     javax.servlet.jsp.jstl.tlv.ScriptFreeTLV
</validator-class>
<init-param>
- <param-name>allowDeclarations</param-name>
- <param-value>false</param-value>
<description>
Controls whether or not declarations are considered valid.
</description>
+ <param-name>allowDeclarations</param-name>
+ <param-value>false</param-value>
</init-param>
<init-param>
- <param-name>allowScriptlets</param-name>
- <param-value>false</param-value>
<description>
Controls whether or not scriptlets are considered valid.
</description>
+ <param-name>allowScriptlets</param-name>
+ <param-value>false</param-value>
</init-param>
<init-param>
- <param-name>allowExpressions</param-name>
- <param-value>false</param-value>
<description>
Controls whether or not top-level expressions are considered valid.
</description>
+ <param-name>allowExpressions</param-name>
+ <param-value>false</param-value>
</init-param>
<init-param>
- <param-name>allowRTExpressions</param-name>
- <param-value>false</param-value>
<description>
Controls whether or not expressions used to supply request-time
attribute values are considered valid.
</description>
+ <param-name>allowRTExpressions</param-name>
+ <param-value>false</param-value>
</init-param>
- <description>
- Validates prohibitions against scripting elements.
- </description>
</validator>
</taglib>
Apple-Mail-719489557
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
     x-unix-mode=0644;
     name="web.xml.diff"
Content-Disposition: attachment;
     filename=web.xml.diff
--- web.xml~     Sat Mar 13 15:42:05 2004
+++ web.xml     Sat Mar 13 18:19:09 2004
@@ -88,6 +88,11 @@
</description>
</context-param>
+ <!-- make JSF load the configuration -->
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
Apple-Mail-719489557--

The fact that you need a reference to ConfigureListener means there's a bug in the servlet engine you're using - a proper Servlet 2.3 & JSP 1.2 engine would automatically load that listener. So that ain't a bug in JSF.
The other things look like bugs in the demo parts of JSF - not problems with the core of the JSF RI.
-- Adam Winer (EG member)

Similar Messages

  • Stuck making JSF 2.0 work with MyFaces

    Hi everybody,
    I'm trying to solve the file upload lack in JSF 2.0 using MyFaces. I'm trying with a very simple example:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:t="http://myfaces.apache.org/tomahawk">
    <body>
    <h:form enctype="multipart/form-data" id="myForm">
    firstName : <h:inputText value="#{user.firstName}" />
    lastName : <h:inputText value="#{user.lastName}" />
    pic : <t:inputFileUpload id="file" storage="file" accept="image/*" styleClass="myStyle" value="#{user.file}"/>
    <h:commandButton action="#{user.createUser}" value="Create user"/>
    </h:form>
    </body>
    </html>
    The problem is that the page does not get transformed. In the browser I get the exact same code above, not the XHTML code expected.
    Please tell me, how can I solve this?

    that's standard notation for JSF 2.0, which uses XHTML, which is XML. U should upgrade.
    The problem is that MyFaces Tomahawk has not been yet upgraded to work with JSF 2.0

  • Hi, I'm making hyperlinks. They work for the main page of the webpage, but when I'm trying to redirect the hyperlink to a "sub page" of the webpage it is still going to the main page. (allthough I'm pasting the complete url address)

    Hi, I'm making hyperlinks. They work for the main page of the webpage, but when I'm trying to redirect the hyperlink to a "sub page" of the webpage it is still going to the main page. (allthough I'm pasting the complete url address)

    Hi! first of all, thank you so much for your help.
    I don't know about that panel you are talking about.
    what I do is RIGHT CLICK, INTERACTIVE, NEW HYPERLINK, and a window pops up, where I paste the address (images).
    Where says URL I paste the complete address that the "sub page" gives me.
    Is that correct? (for the main page of the wabepage works correctly)
    thanks!!!

  • Generated javascript by JSF doesn't works with IE

    Hi Everyone!!!
    I Have a big problem, the jaavascript code generated by JSF doesn't
    works using IE, I used a h:commanLink with actionListener to a funciton
    in the backing bean, and I use two f:params to send the parameter of an
    specific element to show its details, the problem is taht the
    javascript code generated shows an error: "
    'documents.forms.form.form:_idcl' is null or is not an object " or "
    'elements.idVar' is null or is not an object ". I'm not using MyFaces,
    or something similar because the application has a part built in
    ArcgisServer, and it 's not compatible with Myfaces, so I needed to use
    JSf only...
    Please I hope an answer, it has a big problem!!!
    it is the code of the jsp
    <code><h:commandLink actionListener="#{consultaEstadisticasMB.detalleEstadistica}">
    <f:param name="idVar" value="#{consultaEstadisticasMB.idColumna3}"/>
    <f:param name="idMun" value="#{registro[0]}" />
    <h:outputText title="#{consultaEstadisticasMB.columna3}" id="itColumna3" value="#{registro[2]}" />
    </h:commandLink>
    </code>

    Minor nit: MyFaces is JSF, an implementation at least, as is Mojarra, which I assume is what you mean. :)ye, MyFaces is an implementation... but at this time, we�re using "JSF 1.1.02 - Reference Implementation"...
    Now, I have noticed that is a problem of jsf implementation so i have tried to do the work in another way, usign outputLink, nad creating a new backing bean for the details page.. altough I'm having problems, this is what i'm trying to do:
    <h:outputLink value="/ConsultaEstadisticasGeo/detalleEstadisticas.jsf?idVar=#{consultaEstadisticasMB.idColumna3}">
              <h:outputText title="#{consultaEstadisticasMB.columna3}"id="itColumna3" value="#{registro[2]}" />
    </h:outputLink>but it shows me an error...
    GRAVE: Servlet.service() para servlet Faces Servlet lanz� excepci�n
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    And I don't kwon why. If you could help me, I would been so grateful

  • Does JSF 1.1_01 works on Sun App Server 7/Portal 6.2 ?

    Hi,
    i'm get an error (NullPointerException) while submitting form on this configuration. Same example using JSF 1.1 works fine. I know 1.1_01 requires App Server 8 but there is no windows version of Portal Server working with App Server 8...

    For future references:
    this happens to me too and I found that the cause is that the AM server you are going to configure, is already registered into the directory server.
    Try running this command (with the obvious parameters substituted)
    ldapsearch -B -T -D 'cn=directory manager' -w YOUR_CREDENTIALS -b ou=1.0,ou=iPlanetAMPlatformService,ou=services,YOUR_BASEDN -s base objectclass=* | grep YOUR_SERVERNAMEIf you found that the server you are configuring is listed here try going to AMserver console (if you have another AMserver configured) and browse to Configuration->System Properties->Platforms. If the server is here, remove it, if not, just hit Save (very important).
    If this is your first AM and is a first installation you can just get rid of the Directory Server suffix and recreate it with the Top Entry alone.
    Edited by: flistello on Mar 27, 2008 4:30 PM

  • Since upgrading to 10.8 I've had alot of issues burning DVD's. I've had the drive replaced and now I can burn from a new user account but not the old one. Is there any way of making the old one work?

    Since upgrading to 10.8 I've had alot of issues burning DVD's. I've had the drive replaced and now I can burn from a new user account but not the old one. Is there any way of making the old one work?
    Just want to avoild spending hours migrating everything across....

    Yes, I can read but just can't write DVD's. I get:
    This disc can’t be verified and might be unreliable. Try again using a new blank disc (error code 0x80020063).
    Originally I thought it was the old Moutain Lion DVD drive issue (but have had the drive recently replaced by Apple), so I tried creating a new account, which worked.
    In the old account I have reset SMU, Pram... but no change.

  • [Guide]Making the Logitech G510 Work On Linux!

    Update April 23, 2015: I've got a new keyboard (Corsair K95) so I personally probably won't touch this code ever again if I can help it, however it should be working just fine in it's current state without my dabbling, I've set the code up so that the macros are recorded to script files in /usr/share/g15daemon/macros/ with a provided example script, it should be easy enough to read or modify, and if desired the scripts can be replaced by custom executables. When the buttons on the keyboard are pressed they execute these scripts with a command line argument corresponding to the current M-Key state (so we have different functions for M1, M2 and M3 keys), but I thought this was the easiest and most versatile approach, I feel I've got a lot more freedom to customize the macro keys than I ever did in windows this way. As for the MR Key, it is functioning in that it will record a macro (through Xev) and output it to a text file: /usr/share/g15daemon/macros/Macros by running the MacroRecord script located at /usr/share/g15daemon/macros/MacroRecord, you need to ensure that these scripts are made executable when you install this (unless you use my custom pkgbuild on arch which does this automatically) to use these recorded Macros you just have to copy them over to one of the other scripts (for the respective key you wish to use). The Macro Recording script works for recording most normal macros, but if you try to break it, you will (You should be able to use up to 4 modifier keys on one button press (for a total of 5 buttons held down) without running into any problems, as a limitation) but this script is not complex so it should be easy for anyone using it to open it up and try to improve it or increase the amount of modifier keys supported per macro.
    I was working on a Qt5 application that would allow these files to be edited through a Qt based GUI, which also shows the macros recorded by MR for easily copying them over and saving the file. Everything is done except the save function, if someone asks me in a message, I will finish this application for them or send them the source code once I get it.
    Latest Source (Comes with Arch PKGBUILDs, install with makepkg -i)
    Older Source (Before I coded in the MR key)
    Source of Qt GUI Front-End (I never finished this program, you need qt-creator to open these source files and finish them yourself. Without this program you can just manually edit the files in /usr/share/g15daemon/macros as described below, the only parts that haven't been coded in yet are the save code, and the test button code. It should be easy to do though, there is example code in the saveFiles function which you can use to finish it (comment this function out if you want to compile it before you finish up coding it, this function breaks the code since it is not written in functional code) if you just adjust it based on the loadFiles function that is above it which does work for loading all the files, it should be pretty easy to finish this program up. If you finish coding it, feel free to send me a message so that I can link to your complete sources instead. These sources I'm releasing in public domain (do whatever you want with them) but Qt5 is LGPL 3.0 licensed.)
    There is now a wiki page for this, but it's content is slightly different from this thread and doesn't offer much support for other distributions.
    I have a logitech G510 keyboard, and 2 years back I spent about a week applying several patches I had scoured from around the net as well as making my own modifications as needed to make this work with the old g15daemon drivers (as in, I forked g15daemon, without actually changing the programs name). An alternative to this method is using the gnome15 project (just as g15daemon it is no longer being developed) but I had severe (and quite unacceptable) input lag when I used gnome 15 as well as other major issues and as such I vastly prefer my own method. (Besides I worked hard to make this work, I was toying with source code in a programming language I am not really familiar with (C) and did so non-stop for a week, it'd be a total waste if it wasn't better than the alternative!)
    And on february 11th 2015 I made yet another update to these drivers that made them significantly easier to use (before this time, the source code had to be manually edited and the drivers had to be then recompiled ino rder to edit the functionality of the G-Keys (not to mention the source code was an ugly mess because of this roundabout approach) this had to be done because the g15macro part of g15daemon never worked well with this keyboard, so I decided to hardcode the keys into the drivers as a temporary solution, now I've found a more permanent solution which is redirecting the keypresses to bash scripts. One script file for each button, I will explain how to do this later on.
    Here is the  original thread I made on this if anyone wants to see the ugly mess I went through to get here, luckily that's far behind me now and the code is getting more and more mature over time as I fix it little by little.
    How to do it:
    What you will need to do is apply these patches for libg15 and g15daemon. (If you want to do it the hard way, use the older Hardcode Patch but I don't recommend it unless you really know that you want it, and know why you want it.)
    This can be done on any distro I would assume, for gentoo refer to this thread. To get the sources Download this (latest source) and extract it with unrar, (on arch use makepkg -i to install) in the following order: "libg15 -> libg15render -> g15daemon -> g15stats" (Note: You can edit the macros in the macros folder before installing g15daemon. If you are not on arch you need to manually copy the macros folder to /usr/share/g15daemon/macros/, otherwise the pkgbuild will do it for you. If you are running in another distro you can delete the PKGBUILD file in the folders. I included the unmodified libg15render and g15stats too for the sake of convenience, and as a safety net if they disappear off the face of the internet, which is what they seem to be about to do. If you do not feel like trusting the sources I provided then fear not! the ones I provided are just the original sources (md5sum should match with those found there) (as development for the project seems to have been dropped and these were the final versions ever made) but I assure you, the sources I provided are the original ones downloaded straight from sourceforge. If you are on arch you can use ABS to get the sources from the official repositories and then replace the PKGBUILDs with the ones in my rar (or change them yourself, see wiki). If you want to download your own sources (remember to get my patches too!) then here is an alternative download for the default macros.
    Note: In the arch package there were other patches(config-write, recv-oob-answer and uinput) in the package in the official repositories, I added these three to my own file to avoid clutter, the first two are the first two entries of my file, the third is at line 40-71 (two entries) as a part of the same file where I coded in the G-Keys. Depending on your distro and how you get your hands on the sources you may have to adjust this as these patches may already have been applied for you (meaning mine will fail to patch because of mismatching sources). I have no idea what these patches are actually for (would be nice to know) but I imagine they're there for a reason and as such stuck with them.
    For other distros figure out how to compile packages from the sources (sorry Arch and Gentoo are the only distros I really use so I can't help with others, but I assure you this can be done on all distros. If it comes down to it ask on their forums for help!)
    In the libg15 patch I disabled support for other keyboard models in the first few lines (you will see which if you read the patch) as I suspect many of the changes made might break support for the other devices, but if you want to take your chances just remove the minus sign in front of the device you want to use and hope for the best. If you have a keyboard that was already supported by these drivers, the biggest benefit of getting my version working would be the smoother G-Key functions (since they aren't run through a third party program like g15macro, it's bound to be a little faster and less prone to bugs.) also if you have a G510s and want to try these drivers on that board, you will have to add your keyboards id into this section (or replace the one I added with the appropriate ID for your board) using lsusb to find the right values.
    I couldn't get g15macro to work properly with my keyboard and noticed several issues with it (it seemed like it was underdeveloped to me) so my solution to that problem was originally to hardcode the G-key functionalities into the base drivers; But later on I realized I could instead redirect the code to script files that I would create outside of the install, to avoid the load of pain that comes with hardcoding something you may frequently want to change. These drivers are run as root and as such you must be careful and use sudo where applicable to run the commands as your user rather than as root. By default all G-Key presses will be read as commands from the user with uid "#1000", which is in most cases the first user account created on the system. The bonus from this approach is that the G-Keys work much faster than they would using the g15macro and they are also much more customizable than they ever were in windows, the minus is that you need to know/learn bash/shell scripting in order to use it this way. That or find a way to edit the script files to be in a programming language you understand, but bash scripting is the most convenient since you get all the versatility of a terminal in your keyboard that way.
    To change the colors of your keyboard you need to edit the libg15.patch file below line 338 (//Set keyboard color based on M led state.) The code there uses the basic RGB format, and each M-Key has it's own line. The default is: Dark-ish Blue(M1/Fallback), Dark-ish Red(M2), Dark-ish Green(M3)
    To change the macros, you can (if you installed with my pkgbuild on arch) go to /usr/share/g15daemon/macros/ and within you will find 19 files, an "Example" file (this is like a backup, it's what can be used to reset files back to their defaults if you get lost.) The files are named after the keys they affect, each file has statements for M1, M2 and M3 and then a few extras for errors that uses libnotify for error messages. The default setup also uses libnotify to tell you which key was pressed, and which key was released. If you are not on arch or gentoo and could not install directly from my sources, you will need to either copy the files from my rar to "/usr/share/g15daemon/macros/" and edit them from there, or create them yourself from scratch on that path (the names of the scripts are G# where # is the number of the key, make sure that the files are executable with chmod +x if you are more advanced, you can edit the g15daemon.patch file if the location of the macros isn't to your liking and change the path to the scripts to something more convenient for you (e.g. ".../.config/g15daemon/")
    By default, the scripts will look something like this:
    #!/bin/sh
    declare -i mkey=$(( $2 + 1 ))
    declare -r key="G1"
    #M1
    if [[ "$1" == "on" && $2 -eq 0 ]]; then
    /usr/bin/notify-send $key: 'M'$mkey', state='$1
    elif [ $2 -eq 0 ]; then
    /usr/bin/notify-send $key: 'M'$mkey', state='$1
    fi
    #M2
    if [[ "$1" == "on" && $2 -eq 1 ]]; then
    /usr/bin/notify-send $key: 'M'$mkey', state='$1
    elif [ $2 -eq 1 ]; then
    /usr/bin/notify-send $key: 'M'$mkey', state='$1
    fi
    #M3
    if [[ "$1" == "on" && $2 -eq 2 ]]; then
    /usr/bin/notify-send $key: 'M'$mkey', state='$1
    elif [ $2 -eq 2 ]; then
    /usr/bin/notify-send $key: 'M'$mkey', state='$1
    fi
    #Else (Errors)
    #If there is no input
    if [[ -z "$@" ]]; then
    /usr/bin/notify-send $key": Error!" 'There was no input'
    fi
    #If M key state is out of range (less than zero or more than 2)
    if [[ $2 -lt 0 || $2 -gt 2 ]]; then
    /usr/bin/notify-send $key": Error!" 'There is no M'$mkey'! (State='$1')'
    fi
    #If the first input variable (on/off) is incorrect. This should never happen.
    if [[ -n "$1" && "$1" != "on" && "$1" != "off" ]]; then
    /usr/bin/notify-send $key": Warning!" '"'$1'" is not a valid state! (M'$mkey'), defaulting to "off".'
    fi
    And here is an example of how the M1-M3 keys could be edited in this file. The "if" statements are events that occur when you press down on the button, and the elif statements are for the key release.
    #M1
    if [[ "$1" == "on" && $2 -eq 0 ]]; then
    thunar /mnt/stash/movies & disown
    fi
    #^elif is not needed and can be erased for this command to avoid the notification of key-release. The & disown part is extremely important, if you forget to add this to the end of every line where you execute a program that will keep running after you release the button, you will not be able to use any G-Keys until you terminate the program. If you remember to add the & disown, everything will be fine.
    #M2
    if [[ "$1" == "on" && $2 -eq 1 ]]; then
    xdotool keydown Ctrl && xdotool keydown Page_Down
    elif [ $2 -eq 1 ]; then
    xdotool keyup Ctrl && xdotool keyup Page_Down
    fi
    #^The above executes the keyboard combo Ctrl+Page Down (Next Tab) and holds these buttons down until your key release is detected.
    #M3
    if [[ "$1" == "on" && $2 -eq 2 ]]; then
    xdotool keydown Super && xdotool keydown F1 && xdotool keyup Super && xdotool keyup F1
    fi
    #^The above is my keyboard shortcut for changing workspaces, (Meta + F1-F6), since I won't ever need to hold these buttons down, I set them up to press and release on keydown, with no need to detect the key release, this is good to do to avoid a bug I mention lower in the guide.
    That's the gist of it, all you need to know. You can test-fire the commands in your terminal before you add them to the files. Recompiling and re-installing the G15Daemon (at least on arch) will overwrite your existing macros in /usr/lib/g15daemon/macros. Last but not least, you should remember the sleep command (for example, to restart g15daemon, do g15daemon -k && sleep 5 && g15daemon this is how you can set up timed commands and macros on your G-Keys as well. I may later on develop a GUI front-end for editing the macros, and program the MR-key to work like it does on Windows, but right now I'm satisfied with what I've got, so that will have to wait.
    You need to know:
    -The g15daemon service should be started after X11/Xorg-Server is started or any commands that require X (like opening a folder, or graphical notifications) will not work. (You can either just wait till you log in and use xinitrc or an autostart script for your desktop environment to start the service, or you can set up a restart script which kills the original instance (g15daemon -k) and starts a new one, this may be good to know if you would like the service to be started on bootup so you wont have to look at white leds until you have logged in. You can use sudo to run these services as a user). You can also try to have the g15daemon initiate after your display manager loads. (For example make the initscript depend on kdm if you're using kde, I have not tried this though)
    Add this to the sudo configuration with visudo so you can run the g15daemon with sudo and no password (this should work on most distros, if not find the executable, could be in sbin (is on gentoo) like so: "/usr/sbin/g15daemon")
    ALL ALL = (root) NOPASSWD: /usr/bin/g15daemon
    (You can replace the first "ALL" with a username or % group if you want to limit the command to just one user)
    -I have not tested the headphone/mic plugs on the keyboard (please do comment your results if you try to use that)
    -This is not completely bug free.
    -There is no support for tracking launched/focused application and changing the M-Key mode depending on what you are doing (this would be useful though)
    -The MR key is not supported, but the LED works.
    Known Issues: (ordered by severity, if you want to contribute fixing these issues is the best thing you can do to help as I seem incapable of it)
    Sometimes the Key Release of G keys is not detected (this means if you have a key bound to the button that is held until the key is released, the release may not be detected properly. This only happens if you press the key quickly, not if you hold it for a short period before releasing it this is solved by either pressing the key again, or not relying on the key-release state, the latter is fairly easy to do as you can use "variables" and "if"s and "do/while" or "for" in C to set keys with toggle functions.
    Keypress detection for the G-Keys isn't 100% reliable, it will work completely fine 95% of the time or so, but sometimes (usually only if a G key has not been pressed in a while) the key needs to be pressed twice (This was much worse when g15macro was used and the keys almost always had to be pressed twice if I recall correctly). This may look like it's a huge bother at first, but really I hardly ever notice this when I'm using the keyboard and it is a very rare occurance.
    The Volume Wheel is erratic, I used patches from the net to make the wheel work but the wheel was unusable, I managed to make it just barely usable but I wouldn't call it "reliable" in it's current state. It does however work "ok". The wheel worked fine with generic keyboard drivers so maybe there is something in there to shed light on how to make them properly work (remember that there was a bit in libg15.c that made the wheel work, the other half of it is in uinput.c)
    The M-Key leds (M1, M2 and M3) will not light up until a G-Key or one of the M keys is pressed (very minor, I tried to fix this but failed, gave up since it's not really important)
    Run "g15daemon -d" for debug mode to see output from the driver when it is running you will repeatedly get the following error, I have no idea what this is but I do not like it
    libg15: Unknown usb error: Keyboard Read !! (err is -75 (Value too large for defined data type))
    look around line 471 of the patched libg15.c to see where the error is being printed from.
    Terminating the g15daemon (g15daemon -k) will render the keyboard unusable and can result in bugs (for example your next keypress may be detected but release will not be detected) so be careful when doing something like that. Unplugging the keyboard and plugging it back in solves this issue.
    Scroll-Lock led does not work (this is not specific to this keyboard, it is a Linux problem and affects all keyboards as far as I am aware)
    I personally prefer using this keyboard in Linux over using it in Windows because of how much more configurable it is (there's nothing I can't do with the press of a button now) and switching workspaces with just one button each for a total of 6 is a joy!
    Feel free to comment below with any questions or thoughts, any suggestions to improve the code or other contributions are greatly appreciated! I am not skilled in C programming and as such some of my code may look hideous to those who would know what they're doing so better ways to achieve the same results will not be ignored either and I will add any significant updates to the OP when I see them.
    Good Luck and Enjoy
    PS: I know the libg15 patch is rather "unclean" (contains a lot of redundant patches, i.e. replacing a line with the same line) but I was too lazy to clean it up. I tried once but it did not work out so well
    If you have a G510s and this did not work for you, I may be able to help you get that working, comment if you want help with that (the first step to try is on the wiki)
    Last edited by rabcor (2015-05-08 14:41:34)

    Major Update: The G-Keys can now be edited without recompiling by editing shell scripts at "/usr/share/g15daemon/macros/"
    Each button has it's own script file named by it's label (e.g. to edit the functionality of G1, open the script named G1.) The button will try to execute the scripts as programs, so make sure they are executable (chmod +x) and as long as the name remains the same, if you want to replace the files with something different, know that the arguments currently given to the files ($1 and $2) are ($1)on/off and ($2)0-2  (where 0 is M1 and 2 is M3)
    To download the updated sources, go here (only the g15daemon source/patch was updated). This thread's OP has been updated.
    Last edited by rabcor (2015-02-12 04:46:48)

  • Visual editor JSF rendering not working

    Hi,
    I'm trialing the 10.1.0.3EA version of JDeveloper and I can't seem to get the JSF rendering working in the visual editor. I thought that perhaps I'd changed some settings or something so I completely uninstalled and then reinstalled JDeveloper. After the install I created a new application using the default web tech. scope, created default business components from the order and order_items tables in the oe schema, opened the JSF navigation, added a page and tried to drag and drop a read only table onto the page. Instead of the rendering I am getting a hierarchical view of tags with just the tag names, i'm not even getting any of the binding information shown, other than in the property inspector. I'v checked to make sure that the JSP tag libraries in the project settings all have "Execute tags in JSP Visual Editor" checked and in the preferences I have made sure that "Show JSP Tag Names Only" is unchecked. Does this functionality not work by default from the install or am I missing something?
    Any help would be appreciated!
    Thanks,
    Lee Proctor.

    Of course, use the value attribute of the component and set it to EL representing the desired property.

  • JSF actionListeners only work for first requestor?

    Good morning! I'm working on a project where I've built a custom JSF panel that contains 3 buttons. Each button is bound to an action listener method in a form bean. One method takes the value from the text box on the form and adds it as a selectItem to one selectOne object, the second button adds the text box content to a second selectOne object and the third clears both selectOne object and restores them to their default state.
    This all works well as long as you are the first person to press a button after a server re-start. For anyone else that requests this page after that, nothing happens (the page doesn't even seem to refresh, but I can't verify that). I know through the use of breakpoints and debugging that the action listener method is never entered.
    I'm using Weblogic Workshop 9.1 for development (the server is the same version) and using the version of JSF/Beehive that comes with workshop. Any suggestions as to what might be happening to prevent anyone but the first user to fire the listeners would be greatly appreciated!
    Thank you in advance,
    Chris

    There are a couple things you should do:
    1. Implement a debugging phase listener. This is just a simple phase listener for all phases that just prints a debug line at each phase entry/exit.
    2. Add the "messages" tag to show all messages.
    Adding these two may help you discover that you are hitting a validation error.

  • Making DVDs that actually work

    Hello all my fellow Mac-ers
    I seem to be having the worst luck when it comes to making DVD copies of my .AVI files.
    I have an extensive collection of movie on my hard drives. I've started to put these movies on to DVD and I have encountered some problems.
    First problem - I tried to make a backup of an .avi file by just copying said file onto a regular CDrom. Tat cd DID NOT play in any DVD, Computer, or laptop that said it was capable of playing .AVI files. So I burned it to DVD using iDVD and still nothing. I blame this problem on the the units I was trying to play the disc in. Not a big deal
    2nd problem - I tried another movie, using iDVD to burn to a DVD disc. It started encoding, took nearly 3 hours to complete the process. The newly burned DVD did play, but the video was jumpy and shaking. The audio was fine.
    I bought my MacBook because this stuff was supposed to be easy. I never would think it would take over 2-3 hours to make a DVD. Sometimes I get a multiplexing error and I have to start all over.
    I've burned DVDs on my lame PC a few times and it takes no time and it works every time. Using the same .AVI files I have now.
    Someone out there, please be so kind as to tell me how to make DVDs the easy way, if there is one.
    Thanks, Chris

    Hello Klaus,
    Sorry for the delay. Here is the info you requested:
    Format: DivX 5.0, 696 x 284, millions
    mpeg layer 3, stereo, 48.000 kHz
    FPS: 23.98
    Playing fps: 24
    Data Size: 695.93 MB
    Data Rate: 1068.94 kbits/s
    Current Time: 0:00:000
    Duration: 0:01:33:24:09
    Normal Size: 694 x 284 pixels
    Current Size: 694 X 284 pixels (actual)
    Hope this helps. Thank you for your help

  • Creation of new JSF has stopped working correctly

    Hi guys,
    I'm rather new to JDeveloper, but i have successfully completed 7 or so tutorials without a problem. But recently i have found a problem which i can't seem to get rid of.
    I create a new Application; lets say a WebCenter Application.
    I right Click the view controller and select "New > JSF > JSF JSP"
    Just hit next a few times and finish, so i have a untitled1.jspx on there with all components enabled. and then drag and drop a PanelPage onto the JSPX page.
    Instead of getting the template up, I get a page with
    -<>ROOT
    <>OUTPUT | Page Directive
    This happens with and ADF component.
    If i repeat the same process with other, older projects i can do this and get the correct template still.. So it's obviously something i have done to the way new projects are created.
    Any ideas what i need to reconfigure?
    Many thanks,

    Thanks a lot for your responses: Showing the log of the visual editor has been a lot of help. I've got the following response:
    Error exercising tag : afh:head
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.renderkit.AdfRenderingContext.getTranslatedString(AdfRenderingContext.java:70)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.GlobalVariablesScriptlet.outputScriptletContent(GlobalVariablesScriptlet.java:49)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptletImpl(Scriptlet.java:111)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptlet(Scriptlet.java:52)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlUtils.addLib(XhtmlUtils.java:166)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputDependency(Scriptlet.java:144)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.AliasedScriptlet.outputScriptletImpl(AliasedScriptlet.java:112)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.jsLibs.Scriptlet.outputScriptlet(Scriptlet.java:52)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlUtils.addLib(XhtmlUtils.java:166)
    Error exercising tag : afh:body
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.renderkit.core.CoreAdfRenderingContext.getStyleClass(CoreAdfRenderingContext.java:211)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.XhtmlRenderer.renderStyleClass(XhtmlRenderer.java:338)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer._renderLibraryDownloadElement(PanelPartialRootRenderer.java:480)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderPPRSupport(PanelPartialRootRenderer.java:340)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderPPRSupport(BodyRenderer.java:81)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:141)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)
         at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)
         at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
    I'll look into these errors as best i can... Shame it's not as simple as a class not found exception. Has anyone got any pointers as where would be best to look?

  • Making two hard drives work or appear as a single drive

    I have a G5 with two 500 GB internal drives. One I use to backup the first, however, now my drives are full and I would like to buy 1 TB external to back up the two internal drives but is there anyway to setup the second internal drive to work with the first like a single 1 TB drive instead of two 500GB drives? I'm not sure how I would use the second drive otherwise. I don't want to have to drag files to it every time I want to save something on it. How should I set it up? Any help would be greatly appreciated. Thanks.

    Thanks for your help. I will have to research it a bit. I'm not 100% sure what a rAID is or how it works and with regard to the second comment on using the 500 GB as super duper backup...you may have misunderstood or maybe I wasn't clear. I won't have a 500 GB to use as any backup. I want my two internal 500 GB drives to be viewed as a single 1TB drive that can be backed up to a 1TB external drive. I just don't understand how to make my 2 500GB drives into one drive. I prefer not to split it up into application on one of the drives and user info on the other because I won't get the max space out of both. I have tons of photos, music, and video on my machine and little in the way of programs. Will a RAID make the two 500GB drives into a single drive?

  • Making a DVD that works with surroung Sound

    I am trying to make a DVD that works on surround a sound system (DTS system) There are 2 front speakers, 2 rear, and a sub woofer. I imported several film clips into iMovie (I believe what I did is called "down mixing") then created a Quicktime file that I imported into DVD Studio Pro. I created the disc, but the audio did not sound good. So I have been fooling around with Compressor to try to turn the audio into the correct format, and I still have not found the right combination to get the audio to sound correct. What can I do to get the disc sounding clear when I play it on the DTS system. I am assuming that there are certain steps I must make in both Compressor AND DVD Studio Pro (version 3) - I would be very appreciatvie to the person who can give me the magic formula to get everything sounding right. Thanks!

    The answers posted don't fully address your question, since they are talking about AC-3, not DTS which is what you indicate you want.
    First, you can use iMovie to edit the visuals, but you won't be able to use it (easily) to create the 5+1 tracks you'll need for surround encoding.
    This is more a job for an actual multi-channel mixer, like BIAS Deck....
    http://bias-inc.com/products/deck/
    Basically, once you have each of your audio channels edited and mixed, you export each channel as an individual mono track. These are then imported into the audio encoder and assigned to the appropriate channels.
    Apple does not provide a DTS encoder, so you'll need a third party encoder.
    DTS sells their own...
    http://tinyurl.com/6xvlb
    And Surcode has one as well...
    http://www.surcode.com/
    DTS has a good document re: authoring surround discs...
    http://tinyurl.com/kzsbx
    If you can live with Dolby Digital, then you can use A.pack which is included with DSP.
    -David

  • MAking a DVD that works with surround Sound

    I am trying to make a DVD that works on surround a sound system (DTS system) There are 2 front speakers, 2 rear, and a sub woofer. I imported several film clips into iMovie (I believe what I did is called "down mixing") then created a Quicktime file that I imported into DVD Studio Pro. I created the disc, but the audio did not sound good. So I have been fooling around with Compressor to try to turn the audio into the correct format, and I still have not found the right combination to get the audio to sound correct. What can I do to get the disc sounding clear when I play it on the DTS system. I am assuming that there are certain steps I must make in both Compressor AND DVD Studio Pro (version 3) - I would be very appreciatvie to the person who can give me the magic formula to get everything sounding right. Thanks!

    You posted the same question in DVDSP forum; look for the answers:
    http://discussions.apple.com/thread.jspa?threadID=583692&tstart=0
    You can use A.Pack (look for it into your apps. folder) to generate the Dolby AC3 files.

  • "Tutorial - Getting Started with JSF" does not work

    I tried the "Tutorial - Getting Started with JSF" located on http://www.oracle.com/technology/obe/obe1013jdev/jsfintro/jsfintro.htm#t6, but the last part "Creating a conditional navigation" is not complete.
    There are 2 issues
    1. The return values in the code blocks in step 9 and 11 do not match with the given example code.
    2. In step 12 I am missing the way to bind this message component to returned message from the login.
    Could you please correct the code parts and add the message binding piece?
    Thanks,
    Aard Jan

    I tried the "Tutorial - Getting Started with JSF" located on http://www.oracle.com/technology/obe/obe1013jdev/jsfintro/jsfintro.htm#t6, but the last part "Creating a conditional navigation" is not complete.
    There are 2 issues
    1. The return values in the code blocks in step 9 and 11 do not match with the given example code.
    2. In step 12 I am missing the way to bind this message component to returned message from the login.
    Could you please correct the code parts and add the message binding piece?
    Thanks,
    Aard Jan

Maybe you are looking for