myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Val Blant <vace...@yahoo.ca>
Subject s:inputSuggestAjax dojo controls not working
Date Tue, 29 Jan 2008 02:09:09 GMT

Hello.

I've been trying to get s:inputSuggestAjax working for the last few hours,
but so far no luck. Maybe someone would be able to help me. 

I am trying to use it in the most basic way:
<s:inputSuggestAjax id="commodityIncomeDescription" 
suggestedItemsMethod="#{formsBackingBean.buildIncomeExpenseCodeSuggestionList}"
value="#{formsBackingBean.editCommodityIncomeItem.description}" />

This results in a call to buildIncomeExpenseCodeSuggestionList() as it
should. The response is properly sent back to the browser, which I have
verified with Firebug and a packet sniff. I can even observe the list of
completion options in the packets getting smaller and smaller as I type. It
looks like everything is working just fine. Except that absolutely nothing
happens in the browser. There is no drop down box appearing on my input
field and the field is acting like a perfectly ordinary text field (except
for the little image of a down arrow right beside it. The arrow does nothing
when clicked.)

Looking at the page source, it looks like the dojo code was generated, but
it doesn't seem to be doing anything (other than sending the requests, which
it is clearly doing). There are no javascript errors on the page according
to Firefox's console.

Here is the dojo code from the page source:

<script type="text/javascript"
src="/DPSV2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12015691/dojo.DojoResourceLoader/dojo.js">
<!--
//-->
</script>

<script type="text/javascript">
<!--
dojo.setModulePrefix('extensions', '../dojoextensions.ResourceLoader');
//-->
</script>

<script type="text/javascript">
<!--
dojo.require('extensions.FacesIO');
//-->
</script>
<script type="text/javascript">
<!--
dojo.require('extensions.widget.InputSuggestAjax');
//-->
</script>
<script type="text/javascript">
<!--
dojo.require('dojo.event.*');
//-->
</script>

  <input style="display: none;" tabindex="-1" name="undefined" value=""
dojoattachpoint="comboBoxValue">
  <input style="display: none;" tabindex="-1" name="undefined_selected"
value="" dojoattachpoint="comboBoxSelectionValue">
  <input style="" class="dojoComboBox"
id="operatingYearForm:commodityIncomeDescription"
name="operatingYearForm:commodityIncomeDescription" value="Scorzonera"
type="text">
  
/DPSV2/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12015691/dojo.DojoResourceLoader/src/widget/templates/images/combo_box_arrow.png

<div dojoattachpoint="containerNode" style="display: none; position:
absolute;" class="dojoPopupContainer dojoComboBoxOptions">
</div>

<script type="text/javascript">
<!--
var _id339_dojoControl =
dojo.widget.createWidget("extensions:InputSuggestAjax",{mode:'remote',textInputId:'operatingYearForm:commodityIncomeDescription',autoComplete:true,dataUrl:'/DPSV2/forms/operationDetails.jsf?affectedAjaxComponent=operatingYearForm:commodityIncomeDescription&charset=&operatingYearForm:commodityIncomeDescription=%{searchString}'},dojo.byId('_id339'));
//-->
</script>
<script type="text/javascript">
<!--
dojo.addOnLoad(function() {
_id339_dojoControl.comboBoxValue.value = "Scorzonera";
_id339_dojoControl.onResize();
});
//-->
</script>


What could I possibly be doing wrong?

I am using tomahawk, sandbox and core at version 1.1.5 and Facelets.

Any help would be greatly appreciated.
-- 
View this message in context: http://www.nabble.com/s%3AinputSuggestAjax-dojo-controls-not-working-tp15150699p15150699.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message