:) There's no chance the autocompleter is messing up. (ok that's bold,
it's very unlikely )
Are you sure your model object is returning the values you think it is
? If I were curious I'd run your webapp in debug mode (ie add
something like this to your java command line:
"-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" )
and add some breakpoints to your model object to find out "for sure".
Since the model is so simple you may not even need to do that, just
testing it in a normal test case might be enough. (maybe)
It could be something else of course, but I really don't think it is.
On 3/7/07, Leffel, Daniel <[EMAIL PROTECTED]> wrote:
I've burned an entire day on this already. I can't figure out what's
wrong. Please help. My Autocomplete component is returning an empty json
response. Client-side the call is being made. Looking at the server-side
debug, I can't find anything that would make me suspect a problem (I can
see the query is working). Code and debug below:
RegionAdmin.java:
public IAutocompleteModel getRegionAutoCompleteModel(){
return new RegionAutoCompleteModel(getRegionManager());
}
RegionAutoCompleteModel.java:
public class RegionAutoCompleteModel implements IAutocompleteModel{
RegionManager regionManager;
public RegionAutoCompleteModel(RegionManager manager){
this.regionManager=manager;
}
public String getLabelFor(Object region) {
return ((Region) region).getRegionName();
}
public Object getPrimaryKey(Object region) {
return ((Region) region).getRegionId();
}
public Object getValue(Object primaryKey) {
return regionManager.getRegion((Long) primaryKey);
}
public List getValues(String query) {
return regionManager.getRegions(query);
}
}
regionAdmin.html:
<span jwcid="@Autocompleter" async="ognl:true"
value="ognl:currentRegion.parentRegion"
model="ognl:regionAutoCompleteModel" />
Client-side debug:
Response is "{}"
Server-side:
ComponentEventConnectionWorker [DEBUG] Constructing core service
implementation for service
tapestry.render.ComponentEventConnectionWorker
ComponentEventConnectionWorker [DEBUG] Autowired property classResolver
to [EMAIL PROTECTED]
ComponentEventConnectionWorker [DEBUG] Set property eventInvoker to
<SingletonProxy for
tapestry.event.EventInvoker(org.apache.tapestry.internal.event.IComponen
tEventInvoker)>
ComponentEventConnectionWorker [DEBUG] Set property eventEngine to
<SingletonProxy for
tapestry.event.DirectEvent(org.apache.tapestry.engine.IEngineService)>
ComponentEventConnectionWorker [DEBUG] Set property componentScript to
/org/apache/tapestry/ComponentEvent.script
ComponentEventConnectionWorker [DEBUG] Set property widgetScript to
/org/apache/tapestry/dojo/html/WidgetEvent.script
ComponentEventConnectionWorker [DEBUG] Set property elementScript to
/org/apache/tapestry/html/ElementEvent.script
ComponentEventConnectionWorker [DEBUG] Set property scriptSource to
<SingletonProxy for
tapestry.script.ScriptSource(org.apache.tapestry.engine.IScriptSource)>
RequestCycle [DEBUG] Set attribute org.apache.tapestry.Form to
[EMAIL PROTECTED]/mainForm]
BeanProvider [DEBUG] getBean(defaultDelegate)
BeanProvider [DEBUG] Instantiating instance of
org.apache.tapestry.valid.ValidationDelegate
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Set attribute <unique>
classpath:/org/apache/tapestry/link/DirectLink.script, line 10, column
13 to true
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to false
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_2]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_3]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to false
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_2]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_3]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
IfBean [DEBUG] Condition was true so rendering
[EMAIL PROTECTED]/$If]
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_0]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_1]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to true
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to false
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_2]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_3]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.mb.tapestry.base.IfValue to false
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_2]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.active-link-component to
[EMAIL PROTECTED]/$DirectLink_3]
RequestCycle [DEBUG] Removing attribute
org.apache.tapestry.active-link-component
RequestCycle [DEBUG] Set attribute org.apache.tapestry.field-focused to
true
RequestCycle [DEBUG] Set attribute
org.apache.tapestry.services.impl.ComponentEventConnectionFormNames-main
Form to []
RequestCycle [DEBUG] Set attribute <unique>
classpath:/org/apache/tapestry/ComponentEvent.script, line 12, column 17
to true
RequestCycle [DEBUG] Removing attribute org.apache.tapestry.Form
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]