cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with press-release tutorial creating repeated item

ispeak
Champ in-the-making
Champ in-the-making
I followed the alfresco wcm evaluation guide in creating web forms and a web project. I was able to successfuly create the project but encountered problems when I tried to create a new content for the press-release.

I first used IE 7 to create the content and the problem I encountered was I could not select the radio button for the "Include Company Footer" part. When I tried to use firefox thinking that the error might be caused by a browser error, I encountered a different problem. In firefox, I could select the radio button but I couldn't add a repeating item (i.e. body or include company footer section - the guide specified that two company footers should be included in the xml file).

The alfresco log showed this error when I tried creating the content in ie : ERROR [alfresco.ajax] Failed to execute method XFormsBean.setRepeatIndeces: Exception in Transaction. org.alfresco.error.AlfrescoRuntimeException: Exception in Transaction.

And it showed this other error when I tried the firefox browser to create the content: ERROR [alfresco.ajax] Failed to execute method XFormsBean.fireAction: Exception in Transaction. org.alfresco.error.AlfrescoRuntimeException: Exception in Transaction.

Can somebody help me debug this particular problem? I'm using the Alfresco Community Network 2.9.0B and Alfresco WCM Community 2.9.0B versions.
Any help you guys can give me would be greatly appreciated!  Smiley Very Happy

I tested the create content in four different browsers all with the same results: ie7, ie6, firefox 2 and firefox 3.
6 REPLIES 6

rohitmichael
Champ in-the-making
Champ in-the-making
Hi,

I'm facing the same problem in IE7. The radio button does not get selected for 'Include Company Footer' in 'Create Content' for 'Press Release Form' in the 'alfrescosample' Web Project.
Can anyone please suggest a solution.

Thanks,
Rohit

toshiikeuchi
Champ in-the-making
Champ in-the-making
Hi, I'm not sure if the solution has came out already in other topic but below fixed the problem.  I've installed 3.0b and I had a same problem with 'alfrescosample' Web Project.

Event object recieves target properties, but Alfresco code does not support IE.  Below code will provide IE support and will fix the radio button problem.

Find your "xforms.js" which should be located under "{ALFRESCO_HOME}\tomcat\webapp\alfresco\scripts\ajax\" and replace _radio_clickHandler function with code below.

[size=85]  _radio_clickHandler: function(event)
  {
    var target;
    if (window.ie) {
      target = window.event.srcElement;
    } else {
      target = event.target;
    }
    if (!target.checked)
    {
      var all_radios = this.widget.getElementsByTagName("input");
      for (var i = 0; i < all_radios.length; i++)
      {
        if (all_radios.name == target.name)
        {
          all_radios.checked = target == all_radios;
        }
      }
    }
    this._selectedValue = target.value;
    this._commitValueChange();
  }
[/size]

Hope it works on yours as well :mrgreen:

Toshi

rohitmichael
Champ in-the-making
Champ in-the-making
Thanks,
Will try it out.

mtaal
Champ in-the-making
Champ in-the-making
Hi,
I am having similar issues as reported by the previous writer: in firefox I can't add a repeating item in a form. Is there anything I can do on my side to solve this? I am using alfresco 3.0b.

Help on this is really appreciated!

gr. Martin

alfresco_gopesh
Champ in-the-making
Champ in-the-making
hi all,

_combobox_changeHandler: function(event)
  {
       var target;
if (window.ie) {
target = window.event.srcElement;
} else {
target = event.target;
}
//alert("here"+target);
    this._selectedValue = target.options[target.selectedIndex].value;
//   this._selectedValue =
event.target.options[event.target.selectedIndex].value;
    this._commitValueChange();
  }
});


replace the code in xform.js and will resolve the problem for combo selection problem with enumeration

steventux
Champ in-the-making
Champ in-the-making
A fix I have found for repeating items in FF3 where the plus and minus signs do nothing until the page is reloaded is to edit alfresco/scripts/ajax/xforms.js

Change the line

 alfresco.AjaxHelper.sendRequest("XFormsBean.fireAction",
                                    { id: id },
                                    $pick(asynchronous, false),
                                    this._handleEventLog.bindAsEventListener(this));

to


alfresco.AjaxHelper.sendRequest("XFormsBean.fireAction",
                                    { id: id },
                                    $pick(asynchronous, true),
                                    this._handleEventLog.bindAsEventListener(this));


this way the event handler gets called and page updates.