Last week I got the following error message when logging in to our Rational Team Concert server [v1.0.1].

“An internal error occurred during: “Logging into 130.1.xxx.xxx”.
java.lang.IllegalStateException: Authentication state already initialized.”

Snippet from the eclipse log [Workspace\.metadata\.log]
com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(Unknown Source)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(Unknown Source)
at $Proxy0.describe(Unknown Source)

This got me thinking about proxy server and proxy auth and figured out the problem is due to proxy server denying access due to incorrect password. The old password was cached in the General>network settings in Eclispe.

This highlighted another issue that the RTC server should be added to the “No Proxy for” list as need to go via proxy for internal network traffic.

This is a little note about showing and hiding a element(s)/control(s) from a client side event (without page refresh) using the ibm JavaServer Faces components.

The IBM documentation for the hx:behavior tag is here. But it doesn’t contain examples of how to use it and the describtion of the hx:behavior attributes is unclear in places.

behaviorAction is what you want to do (hide, show, invisible, visible etc)
targetAction requires the ID of the object you want to do the behaviorAction on.

<h:outputText style=“visibility:hidden;” id=“text7” value=“Initially i’m hidden, “></h:outputText>
<h:outputText style=“visibility:hidden;” id=“text17” value=“As am I! “></h:outputText>

<h:outputText styleClass=“outputText” id=“text6aa” value=“view hidden text,”>
<hx:behavior id=“behavior4” event=“onclick” behaviorAction=“visible;visible” targetAction=“text7;text17”> </hx:behavior>

</h:outputText>

Also found that when you specify more than one targetAction you must also specify a behaviorAction for each (which is good if you want to do different behaviorActions to each target.

Note: offically hx:behavior tags aren’t supported in h:outputText, recommended to use outputlink tag.

Info from my Ibm devworks question post

I love new smart bar search in firefox 3 but bugged by the fact it defaults to searching google.com, so here’s what I did to make it use google.co.uk

  1. In firefox3 URL/Smart bar type: “about:config” [this brings up the adv config of firefox, don’t cha know, click ok to void warrenty 😉 ]
  2. Use the filter to find the property called “keyword.URL”, and change the google domain suffix from .com to co.uk, hey presto!

    keyword.URL=http://www.google.co.uk/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

all done!

I wanted to get the clients browser info and screen resolution and pass in into to a contact form so I can tell a little bit about the client’s browser encase of unreproducible issues. Basically run a javascript function to collect the info from it’s implicit objects and write that to a hidden form element.

Had this working in JSP ok, and with a slight tweak to account for the : in the hidden field id (fromname:compnonentId) it works.
In JSF file…

function getClientInfo()
{
var clientinfo = “”
clientinfo+=”Browser:” + navigator.appName + “,”
var b_version=navigator.appVersion
clientinfo+=” Version: ” + b_version + “,”
clientinfo+=” Screensize: ” + screen.width +”x” + screen.height
(document.getElementById(’contactfrm:clientinfo’)).value = clientinfo;
}


‹h:form id=”contactfrm” styleClass=”form”>

In Backingbean the usual code to get a request param:

String clientInfo = getFacesContext().getExternalContext().getRequestParameterMap().get(”contactfrm:clientinfo”);

Or is there a better way of doing this? comments most welcome