March 29, 2004

Fedore Core 2 (Test 1)

So I'd installed Fedora Core 2 Test 1 Linux on my Dell notebook. Installation went smoothly in little tiny graphical screen, and it worked fine both with touchpad and USB mouse.

After install was done, I went to see what was working (and not) in this default Fedora install:

  • Graphics: X launched with no problems, but it knew nothing about 16:10 screen of this Inspiron, and RedHat tools also had no support for it;
  • ACPI: Seems like working, and you can send CPU in sleep mode. After waking up, keyboard was dead;
  • Wireless: Dell True Mobile, not recognized;
  • Sound: Integrated sound card does not produce any sound at all;
  • CD/DVD-RW: does not work (cdrecord: Cannot open '/dev/pg*')

I also noticed other glitches as well:

  • up2date never worked to the end even once, usually it stalls somewhere in the middle;
  • K Menu in KDE sometimes freezes the system for several seconds if you click on it;
  • system-config-packages looking in the /mnt/cdrom/RedHat directory instead of /mnt/cdrom/Fedora;
  • DNS names resolution is very slow when browsing internet either in Mozilla or Konqueror;
  • CD Drive: stops recognizing most CDs (CD-Rs, CD-RWs) once Fedora is booted up.

Well, right now system is pretty much unuseable - you can't even add / remove packages (CD Drive does not work, up2date does not work too...) Interesting, how much better released version of Fedora Core 2 would work?

Posted by Vadim at 9:51 PM | Comments (1)

March 26, 2004

Cocoon Forms in Portal Environment

Those who worked with Portal and Portlets (and here I mean JSR-168 portlets), they know that Portlet has two kind of requests: RenderRequest and ActionRequest. These two requests can be compared with regular servlet's GET and POST requests, but there is significant difference: Portlet's ActionRequest can not have any response body!

This means, that the approach (GET request shows form - Submit POSTs form to server - server validates form and in case of failure re-displays form) taken by Cocoon Form's showForm() method is not possible anymore. Once form is POSTed (or, ActionRequest is received - in Portlet-speak), response can not be HTML of the re-displayed form, response must be always redirect, and only subsequent RenderRequest can send HTML with re-displayed forms.

To achieve this functionality, Form.showForm() method should be overridden:

Form.prototype.showForm = function(uri, bizData) {
    // ... Snip ...
    var finished = false;
    this.isValid = false;

    var s = capture();
    var k = cocoon.sendPageAndWait(uri, bizData);
    var formContext = Packages.org.apache.cocoon.woody.flow.javascript.
        WoodyFlowHelper.getFormContext(cocoon, this.locale);

    // Prematurely add the bizData as a request attribute so that event listeners can use it
    // (the same is done by cocoon.sendPage())
    cocoon.request.setAttribute(
        Packages.org.apache.cocoon.components.flow.
            FlowHelper.CONTEXT_OBJECT, bizData);

    finished = this.form.process(formContext);

    // Additional flow-level validation
    if (finished && this.form.isValid()) {
        if (this.validator == null) {
            this.isValid = true;
        } else {
            this.isValid = this.validator(this.form, bizData);
            finished = this.isValid;
        }
    }

    if (!finished) {
        // Failure: Redirect back to starting point, s.
        cocoon.redirectTo(s.id + ".continue");
        FOM_Cocoon.suicide();
    }

    var widget = this.form.getSubmitWidget();
    // Can be null on "normal" submit
    this.submitId = widget == null ? null : widget.getId();

    // Success: Redirect out of this function
   cocoon.redirectTo(cocoon.makeWebContinuation(new Continuation()).id + ".continue");
    FOM_Cocoon.suicide();
}

Where, capture() method is simply:

function capture() {
    var wc = cocoon.createWebContinuation(0);
    return wc;
}

PS All of the above relevant when using Cocoon Forms (a.k.a. Woody) from the Flow.

Posted by Vadim at 8:45 AM

March 7, 2004

Linux on Notebook

We all know that Linux is coming on the desktop, but when it will be ready for the notebooks? Say, I've got this Dell Inspiron 8600 with optional TrueMobile 802.11b/g wireless card... The resource I found which covers installation of Linux on the notebook of this model:

Linux on Dell Inspiron 8600

Goes to great detail about what and how should be patched in kernel... And wha steps to take when something is not detected or not compiling... And that's what makes me feel uneasy... I'd just love to see Linux distro which would install on notebook as easily as Linux currently installs on main stream desktop hardware.

Posted by Vadim at 1:13 PM | Comments (5)