¡Hi everyone!
I want to use the inputSuggestAjax from the Tomahawk Sanbox in my
Trinidad-based application, but I've not been able to make it work. I'm using
MyFaces 1.1.6, Tomahawk 1.1.7 and Tomahawk Sandbox 1.1.7. What I did was the
following:
Uncompress the Sandbox-Examples WAR
Copy the Trinidad JARs into WEB-INF/lib
Edit WEB-INF/web.xml to include the Trinidad filter, resources servlet and
resources filter mapping
Create trinidad-config.xml in WEB-INF
Edit WEB-INF/examples-config.xml and set Trinidad render kit as the default
When I try the inputSuggestAjax example (inputSuggestAjax.jsf), the components
behaves like a normal inputText. There isn't any suggestion list/drop down.
I have compared the code generated from my configuration and the one generated
from the examples hosted in
http://www.irian.at/myfaces-sandbox/inputSuggestAjax.jsf , and the code
generated in my machine is missing many lines. For example:
<script type="text/javascript"
src="/myfaces-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12270886/clientvalidation.validationscript.ValidationScript/common.js"><!--
//--></script><script type="text/javascript"
src="/myfaces-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12270886/clientvalidation.validationscript.ValidationScript/messages/Messages_en.js"><!--
//--></script><script type="text/javascript"
src="/myfaces-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12270886/clientvalidation.validationscript.ValidationScript/converters.js"><!--
//--></script><script type="text/javascript"
src="/myfaces-sandbox/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12270886/clientvalidation.validationscript.ValidationScript/validators.js"><!--
//--></script>
...
<script type="text/javascript"><!--
function oamSetHiddenInput(formname, name, value) { var form =
document.forms[formname]; if(typeof form.elements[name]=='undefined') { var
newInput = document.createElement('input');
newInput.setAttribute('type','hidden'); newInput.setAttribute('id',name);
newInput.setAttribute('name',name); newInput.setAttribute('value',value);
form.appendChild(newInput); } else { form.elements[name].value=value; }
} function oamClearHiddenInput(formname, name, value) { var form =
document.forms[formname]; if(typeof form.elements[name]!='undefined') {
form.elements[name].value=null; } } function oamSubmitForm(formName,
linkId, target, params) { var clearFn =
'clearFormHiddenParams_'+formName.replace(/-/g, '\$:').replace(/:/g,'_');
if(typeof eval('window.'+clearFn)!='undefined') {
eval('window.'+clearFn+'(formName)'); } if(typeof
window.getScrolling!='undefined') {
oamSetHiddenInput(formName,'autoScroll',getScrolling()); } var oldTarget =
''; if((typeof target!='undefined') && target != null) {
oldTarget=document.forms[formName].target;
document.forms[formName].target=target; } if((typeof params!='undefined') &&
params != null) { for(var i=0; i<params.length; i++) {
oamSetHiddenInput(formName,params[i][0], params[i][1]); } }
oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);
if(document.forms[formName].onsubmit) { var
result=document.forms[formName].onsubmit(); if((typeof
result=='undefined')||result) { document.forms[formName].submit(); }
} else { document.forms[formName].submit(); } if(oldTarget==null)
oldTarget=''; document.forms[formName].target=oldTarget; if((typeof
params!='undefined') && params != null) { for(var i=0; i<params.length; i++)
{ oamClearHiddenInput(formName,params[i][0], params[i][1]); } }
oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return false; }
//--></script>
And the only messages I'm getting on the console are these:
5/12/2008 12:07:01 PM
org.apache.myfaces.custom.redirectTracker.RedirectTrackerManager
createRedirectTrackerManager
INFO: No context init parameter
'org.apache.myfaces.redirectTracker.MAX_REDIRECTS' found, using default value 20
What am I doing wrong? Any ideas why I can't make this component work with
Trinidad? Did I miss any configuration required for this?
Hope you can help me.
Aram
_________________________________________________________________
See how Windows® connects the people, information, and fun that are part of
your life
http://clk.atdmt.com/MRT/go/119463819/direct/01/