Hello Andrew,

Thanks for your help. I found out what was the problem.


When I click on link in Firefox, request map is this one:

  requestMap: {
    javax.faces.ViewState=8E(...)4w==,
    form_SUBMIT=1,
    autoScroll=0,114,
    form:_idcl=form:j_id_jsp_362524613_4:1:j_id_jsp_362524613_18,
    id=2
  }

Note the parameter "id=2", as expected. But, when I click the same link in Internet Explorer 6, request map is this one:

  requestMap: {
    javax.faces.ViewState=8E(...)6w==,
    form_SUBMIT=1,
    autoScroll=0,0,
    form:_idcl=form:j_id_jsp_362524613_4:1:j_id_jsp_362524613_18
  }

Parameter "id=2" is missing! Generated HTML have

return oamSubmitForm('form','form:j_id_jsp_362524613_4:1:j_id_jsp_362524613_18',null,[['id','2']])

So, I beleived, that there was the problem with oamSubmitForm in Internet Explorer 6.

Debugging with Microsoft Script Editor revealed that JavaScript function "oamSetHiddenInput" in line

  form.elements[name].value=value;

doesn't work in IE6 when variable name is "id". Probably because form already have an "id" set by JSF tag

  <h:form id="form">

However, that JavaScript works just fine in Firefox. So, workaround was to change parameter name from "id" to e.g. "rowId".

Also, to avoid situations like this, I created an issue: MYFACES-1723.


Thanks,
Ognjen



Andrew Robinson wrote:
That is definitely odd. Can you check to see what parameters are in
the request parameters? Also, you may want to debug into the form
submittal using a Microsoft script debugger.

On 9/11/07, Ognjen Blagojevic <[EMAIL PROTECTED]> wrote:
Any thoughts on this one?

Is the way I'm using f:param wrong?

Regards,
Ognjen



Ognjen Blagojevic wrote:
Hi all,

I have a problem using h:commandLink and f:param that is specific to
Internet Explorer. In JSF I have:

<h:dataTable value="#{myBean1.findAll}" var="row">
...
  <h:commandLink action="#{myBean.edit}">
    <f:param name="id" value="#{row.id}"/>
    <h:outputText value="edit" />
  </h:commandLink>

Which shoud generate "edit" link with "id" parameter for every row in
the table. Later, in my edit action, i get this parameter with

  int id = Integer.parseInt((String) FacesContext
      .getCurrentInstance().getExternalContext()
      .getRequestParameterMap().get("id"));


Getting this parameter when client is Firefox, works just fine. However,
trying it with IE 6, gives me "NumberFormatException: null". Javascript
is enabled in both IE and FF.

I can see that MyFaces uses a Javascript for setting this parameter, so
maybe this is the reason for incompatibility?

Regards,
Ognjen




Reply via email to