2 Feb 2011, 11:45pm
gwt jobs:

leave a comment




  • GWT Error Message “Asked for attribute parser of no type”

    Exam­ple:

    public boolean isCollapsed() {
    	return panel.isVisible();
    }
    
    public void setCollapsed() {
    	panel.setVisible(false);
    }

    Seen it? Despite the com­pli­cated and cryp­tic error mes­sage, the mis­take is rather sim­ple: the set­ter method is miss­ing a para­me­ter, i.e. “pub­lic void setCollapsed(boolean collapsed) {“.

    17 Jan 2011, 6:38pm
    gwt jobs:

    leave a comment




  • Testing GWT Application in Virtual Machine

    I am devel­op­ing on a Mac, but to test my GWT appli­ca­tions for cross-browser com­pat­i­bil­ity in Inter­net Explorer I need to use Win­dows, thus I got Win­dows 7 installed using Par­al­lels. Just by the way, to be able to test in dif­fer­ent Inter­net Explorer ver­sion, I am using a pretty handy appli­ca­tion called IETester.
    But try­ing to access local­host with IE in the vir­tual machine did not work. I got a “404 page not found” error instead of see­ing my app run­ning on the local App Engine instance. Obvi­ously, Par­al­lels does not auto­mat­i­cally for­ward local­host requests to OSX and maybe that is actu­ally a good idea security-wise.
    To fix the issue, you need to run Google App Engine on a pub­lic net­work inter­face, or in other words, bind the App Engine server to all avail­able IP addresses. The down side: every­body know­ing your IP address can see the GWT app now, but oth­er­wise you are not allowed to access it in the viru­tal machine as from your OSX’s point of view, that Win­dows machine is “some other guy access­ing from the out­side”, too. To make GAE acces­si­ble from the out­side, add the para­me­ter “-bindAd­dress 0.0.0.0″ when launch­ing you local GAE. Using Eclipse you can achieve that by right click­ing your project -> Run As -> Run Con­fig­u­ra­tions -> Choose “(x)= Argu­ments” tab; add the option to the top most box titled “Pro­gram argu­ments” in the options area (e.g. before “-port 8888″).

    The first part of the list of argu­ments should look some­thing like that:

    -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl GlocalUiPg2.html -logLevel INFO -codeServerPort 9997 -bindAddress 0.0.0.0 -port 8888 ...

    Now, you can access you app using the OSX’s pub­lic IP address. (You can get to know your IP by hav­ing a look at the net­work pref­er­ences panel.) Launch­ing GAE from Eclipse, you will see a dif­fer­ent link (URL) in the “Devel­op­ment Mode” tab now, con­tain­ing the pub­lic IP already. Using that one in, say, your Fire­fox on Mac, it will ask you now whether you want to allow the debug­ger access. That is also due to the fact, that you are now using a pub­lic address, so it is not clear to your local debug server, whether that request came from the same com­puter or some­one else in the network.

    17 Sep 2010, 4:16pm
    jobs projects:

    1 comment




  • Using the XML Parser in GWT

    I tried using the XML pars­ing fea­tures of the GWT like that:

    form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
    	@Override
    	public void onSubmitComplete(SubmitCompleteEvent event) {
    		// One time upload only, to upload again, user needs to start the upload process from scatch – keeping it simple for now
    		panel.clear();
    		Window.alert(event.getResults());
    		Document result = XMLParser.parse(event.getResults());
    		...
    });

    But GWT kept telling me “No source code is avail­able for type com.google.gwt.xml.client.Document; did you for­get to inherit a required mod­ule?”. It turns out, you are required to explic­itly add the XML func­tion­al­i­ties to your project by adding fol­low­ing line to your .…gwt.xml file:

    <inherits name='com.google.gwt.xml.XML'/>

    Raises a ques­tion: What’s the point of AJAX (Asyn­chro­nous JavaScript and XML) with­out XML? Or in other words there is no AJAX with­out XML! So it’s up to you to add the AX part to GWT man­u­ally. What’s next?

    16 Sep 2010, 6:02pm
    jobs projects:

    3 comments




  • GWT FileUpload: Adding Widgets to a FormPanel

    If you build your first GWT form, for exam­ple some­thing like that:

    <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
    <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
    xmlns:g="urn:import:com.google.gwt.user.client.ui">
    <g:HTMLPanel>
    <g:FormPanel ui:field="form"> 
    <g:FileUpload ui:field="uploadField" name="file"/>
    <g:SubmitButton ui:field="submitButton">Upload</g:SubmitButton>
    </g:FormPanel>
    </g:HTMLPanel>
    </ui:UiBinder>

    And your con­sole keeps telling you dur­ing run­time some­thing like this: “java.lang.IllegalStateException: Sim­plePanel can only con­tain one child wid­get”. Instead of writ­ing a long page of expla­na­tions and com­plaints like I did before, it’s sim­ply like that:

    Just put all your wid­gets in a panel (like Hor­i­zon­tal­Panel) and add that panel to the Form­Panel.” (Jake − cf. com­ment below)

    Thanks Jake! :)

    9 Sep 2010, 4:48pm
    jobs projects:

    1 comment




  • GWT Does Not Load Module in Local AppEngine

    The issue arose after I renamed the mod­ule file (end­ing with .gwt.xml) to bet­ter rep­re­sent the mod­ule func­tion­al­ity. I also updated all rel­e­vant files in the project (search for files con­tain­ing the old name to find them) accordingly.

    Start­ing the appli­ca­tion after that mod­i­fi­ca­tions ended up in an error (“[ERROR] Unable to find ‘<old mod­ule name>.gwt.xml’ on your class­path; could be a typo, or maybe you for­got to include a class­path entry for source?”) as the AppEngine tried load­ing the mod­ule by its old name.

    Solu­tion: Delete the launch pro­file for the project (by choos­ing “Run As…” -> “Run Con­fig­u­ra­tions…” from the con­text menu).

    Obvi­ously the GWT does not check nor update the auto­mat­i­cally gen­er­ated launch pro­file thus you need to delete it to force the GWT to cre­ate a new pro­file from scratch tak­ing the project changes into account. You might also adjust the pro­file accord­ing to the changes made, but delet­ing it is the safe and easy way.

    25 Aug 2010, 10:41am
    jobs projects:

    leave a comment




  • First GWT Steps

    Just started to work with GWT – a pretty inter­est­ing approach for web devel­op­ment com­pared to PHP or JSF. The whole Appli­ca­tion engine is quite impres­sive espe­cially allow­ing you to quickly test your appli­ca­tions locally by sup­port­ing auto­matic hot deploy­ment after each code update.
    One thing that took me a while was one of that “[ERROR] Unable to find ‘[some-file].xml’ on your class­path; could be a typo, or maybe you for­got to include a class­path entry for source?” errors. If you are sure the file is in place, I real­ized restart­ing the App Engine or Eclipse mostly solves that problem.

    18 Feb 2010, 7:10pm
    jobs projects:

    leave a comment




  • Getting Drupal’s Access Control Module to Work Properly

    After set­ting up some con­tent types — some pub­lic, some inter­nal. I installed the Access Con­trol mod­ule, set up inter­nal con­tent not to be vis­i­ble to anony­mous users — but with­out any effect.

    After some research, but with­out suc­cess, I real­ized the *Advanced* sec­tion at the bot­tom of the Access Con­trol tab for each con­tent type. And now the magic trick: Increase the weight and you are done. So I guess the build in access man­age­ment was fight­ing the Access Con­trol mod­ule, so it is up to you to make your favorite mod­ule stronger by giv­ing it more weight. — I doubt this is intu­itive. Addi­tion­ally, it is for sure dif­fi­cult to sim­ply find the tiny lit­tle select box down there in a sec­tion, which is by default folded.

    2 Feb 2010, 7:13pm
    jobs projects:

    leave a comment




  • How to Make Jquerymenu for Drupal Keep its State on Page Reload

    While set­ting up the web­site for my new project “Glo­cal” www.glocal-project.eu), I came across the prob­lem of find­ing a proper menu mod­ule. Some­thing easy to use, sta­ble and effi­cient in the same time for the com­plex intranet struc­ture (there­fore, sorry, but you will not be able to see my solu­tion there unless you are a project mem­ber). Some­thing with a high usabil­ity in the end. Active­menu is still quite buggy and DHTML Menue requires a dou­ble click to actu­ally open a page — unbear­able in a non-doulbe-click envi­ron­ment like the Inter­net — who is sup­posed to guess, that this menu requires a dou­ble click?? Leav­ing me with JQuery­menu.

    First impres­sion: per­fect! Open and close branches by click­ing (+) or (-) — view page by click­ing menu item label. Even the few styling issues could be fixed eas­ily by using CSS. But as soon, as some­one clicks a label, the menu col­lapses to its default sta­tus. It does not remem­ber its last sta­tus after load­ing a dif­fer­ent page with the same menu.

    Is this it? All mod­ule have crit­i­cal down­sides like this? I was quite dis­ap­pointed! :(

    But I taught JQuery­menu to remember!

    As it is quite some code, I will not post it here directly, but added it to the tracker page for this “fea­ture request” or you can down­load the two updated files (jquerymenu.js and jquerymenu.module) here and replace the once in your /sites/all/modules/jquerymenu folder.

    But please be care­ful, it should be con­sid­ered an alpha ver­sion, there are quite some weak­nesses (see tracker page). Any feed­back or sug­ges­tions are very wel­come!

    24 Jun 2009, 3:03pm
    jobs projects:

    2 comments




  • fixing flex VideoDisplay CuePointManager

    I was cre­at­ing a Flex appli­ca­tion to show slides and a pre­sen­ta­tion video of pre­vi­ously recorded pre­sen­ta­tions. Accord­ingly, each slide should appear at a cer­tain point of time in the video — calls for cue points!

    As all slides and there appear­ance are stored in a text file in my case, I started adding cue points with Action­Script. But as soon as the video can be con­trolled with a slider, allow­ing to shift for– and back­wards, the event han­dler “cue­Point” was not trig­gered any more. Thus, the slides where not changed cor­rectly as the user jumps ahead, as the cue points between the pre­vi­ous and the new posi­tion did not cause and cue point event.

    Finally I wrote AdvCue­Point­Man­ager, inher­it­ing from Cue­Point­Man­ager, but which can deal with jump­ing back– and forward.

    Copy it to “<your source folder>/net/svenbuschbeck/flex/video” and use it as follows:

    <mx:VideoDisplay cuePointManagerClass="net.svenbuschbeck.flex.video.AdvCuePointManager" />
    16 Apr 2009, 5:46pm
    jobs:

    3 comments




  • how to install memchached 1.2.2 from source

    I have installed an instance of mem­chached ver­sion 1.2.2 on one of our servers (Debian etch) today and to keep you from spend­ing a whole after­noon, see my everything-step-by-step instruc­tion below.

    Mem­chached is a dis­trib­uted hash map, which can be used for exam­ple to speed up any kind of web appli­ca­tion, see web­site for details. In our case, we want to use it as tem­po­rary data store. I will report about the expe­ri­ences in a lat­ter post.

    intro­duc­tion

    Always refer to this page for details, but I cre­ated a ver­sion with less text but includ­ing steps to really start from scratch.

    All lines start­ing with # are com­mand lines, i.e. you need to type into a linux shell.
    Out­put of any kind is always sur­rounded by ” even if it is mul­ti­line output.

    con­tent

    a. get libevent (needed to install mem­cached)
    b. get mem­cached and ver­ify instal­la­tion
    c. use and test mem­cached within Java with junit/ant

    a. installing libevent 1.3

    a.1. check for cur­rent ver­sion of libevent

    a.1a.

    Log in as root or get super user rights by call­ing su

    # updat­edb
    # locate libevent

    If there is out­put includ­ing “libevent1” and/or “libevent-1″ (ignore pack­age files like *.deb) -> a.1b, oth­er­wise a.2

    a.1b. remov­ing old libevent version

    # apt-get remove –purge libevent1
    # Y

    # updat­edb
    # locate libevent
    Should now return noth­ing or pack­age files only, i.e. you are ready for installation

    a.2. installing libevent 1.3

    a.2a down­load­ing and unpacking

    # cd /usr/local/src
    # wget http://monkey.org/~provos/libevent-1.3b.tar.gz
    # tar zxvf libevent-1.3b.tar.gz
    # cd libevent-1.3b

    a.2b. con­fig­ur­ing

    # ./configure
    check the out­put, if it con­tains some­thing like “con­fig­ure: error: no accept­able C com­piler found in $PATH” -> a.2c. oth­er­wise a.2d.

    a.2c. com­pil­ing

    # apt-get install gcc

    Redo a.2b.
    I got out­put like “C com­piler can­not cre­ate exe­cuta­bles”, read­ing file ‘config.log’ did not help me at all. Googling finally did, as I found a forum entry, point­ing out a miss­ing lib.
    So try this:

    # apt-get install libc-dev

    Redo a.2b.
    If that did  not solve it… sorry … google on, there is no sense in going on with­out solv­ing this issue. :-/

    a.2d. make it!

    # make && make install

    If you get some­thing like “-bash: make: com­mand not found” -> A.2e, oth­er­wise A.3.

    a.2e.

    # apt-get install make

    Redo a.2d.

    a.3. con­fig­u­ra­tion

    Press the Esc key as you read [esc] in the com­mands below.

    # vim /etc/ld.so.conf.d/libevent-i386.conf
    # i/usr/local/lib/[esc]:wq
    # ldconfig

    b. install mem­chached and ver­ify installation

    b.1. down­load, unpack and install memchached

    # cd /usr/local/src
    # wget http://danga.com/memcached/dist/memcached-1.2.2.tar.gz
    # tar zxvf memcached-1.2.2.tar.gz
    # cd memcached-1.2.2
    # ./configure
    # make && make install

    After installing gcc and libc-dev in sec­tion a, this one went eas­ily for me — if you skipped sec­tion a and run in prob­lems here, please install gcc and libc-dev (see a.2c).

    b.2. ver­ify instal­la­tion of memchached

    b.2a. start mem­chached server

    # mem­cached –u www-data –vv

    Out­put should end with line “<3 server lis­ten­ing”. Per­fect! :)

    b.2b test server

    I will refer to this shell in front of you as server shell below. Now, open another shell on the same machine, I will refer to it a client shell.

    # tel­net local­host 11211

    You should see some­thing like “<7 new client con­nec­tion” on the server shell, switch back to client shell.

    # set test1 1 10000 1
    # a

    You should see “STORED” on client shell and the two fol­low­ing lines on server shell
    ”<7 set test1 1 10000 1
    >7 STORED

    Per­fect!
    You did it, your mem­cached is up and run­ning :)

    c. mem­cached and Java

    I wrote a lit­tle test pack­age using a Java client library for mem­cached from here, together with junit and ant. You can down­load it to have a look how sim­ple using mem­cache is and to ver­ify your instal­la­tion with an included  junit test, auto­mated with an ant build file.

    21 Jan 2009, 11:21am
    jobs projects:

    leave a comment




  • oidviz

    What we do here in the Okkam project, is cre­at­ing an global infra­struc­ture, allow­ing to give an unique name to any­thing. We called it ENS (Entity Name Sys­tem), inspired by the DNS (Domain Name Sys­tem). Why? Because hav­ing every­thing named and all occur­rences in a doc­u­ment anno­tated with this name makes data inte­gra­tion as easy as pie. But names in a com­puter sci­ence envi­ron­ment are URIs and those are not human-readable by default. For exam­ple http://www.okkam.org/entity/ok923bf64b-3edf-4d0a-baf8-592db9f55689 is my name! :) — for sure no one is able nor will­ing to mem­o­rize this. As a first approach to this, I cre­ated a lit­tle PHP script, that can pro­duce an image rep­re­sent­ing those names, or ENS iden­ti­fiers or Okkam IDs (in short OID)  as we call them. This result­ing image should be much eas­ier to be remem­bered an recognized.

    representation for http://www.okkam.org/entity/ok923bf64b-3edf-4d0a-baf8-592db9f55689, that is me
    representation for http://www.okkam.org/entity/ok42fe5511-c177-435a-8cf7-18b6a881d8b7, a friend and colleague of mine

    The upper one rep­re­sents me and the one below Ste­fano Bor­toli, a friend and col­league of mine. Sev­eral dimen­sions have been used, like color, size, posi­tion and line-width. As a next step, besides improv­ing cre­ation speed, pat­terns and shapes could be intro­duced and even motion by exchang­ing the PNG image either with an old-fashioned ani­mated GIF or a Flash ani­ma­tion. Inte­gra­tion is kept as sim­ple as it can be, e.g. by sim­ply insert­ing <img src=“http://okkam.dit.unitn.it/oidviz/?oid=[put your ID here]”/> into your XHTML page. The PHP script returns a bit stream, as if you would load an exist­ing image directly from a server but instead it is cre­ated on-the-fly.

    2 Mar 2006, 4:07pm
    jobs:

    leave a comment




  • education portal for the city of Augsburg

    screenshot: list view
    screenshot: list view
    screenshot: list view

    A new por­tal has been launched for the city of Augs­burg. It is meant to be a cen­tral plat­form about all kind of infor­ma­tion and events con­cern­ing edu­ca­tion in and around Augs­burg (Ger­many). Dif­fer­ent lay­outs have been cre­ated in the course of a sem­i­nar, the one to be real­ized, has been cho­sen by a per­son in charge of the munic­i­pal­ity. Two stu­dents of the “win­ning” team and myself, we formed a team, got a work con­tract by the munic­i­pal­ity and imple­mented the web­site on the basis of the Typo3 CMS within one year, besides our studies.

    » go to see the website »