Ok, now i researched some some more:
What i wan't to do: Have an autocompletetextbox with custom layout in the
dropdown. 
The default autocomplete fills the first criteria, but then i would like to
modify the html-output
thats created in the dropdown. The default output is final though and
outputs an list list this.

<ul><li textvalue="abc">abc</li><li textvalue="abd">abd</li></ul>

and default renderer for autocompletetextfield, method renderer is final.

public abstract class AbstractAutoCompleteRenderer<T> implements
IAutoCompleteRenderer<T>
{
        private static final long serialVersionUID = 1L;

        public final void render(final T object, final Response response, final
String criteria)
        {
                String textValue = getTextValue(object);
                if (textValue == null)
                {
                        throw new IllegalStateException(
                                "A call to textValue(Object) returned an 
illegal value: null for object:
" +
                                        object.toString());
                }
                textValue = textValue.replaceAll("\\\"", "&quot;");

                response.write("<li textvalue=\&quot;&quot; + textValue +
&quot;\&quot;&quot;);
                final CharSequence handler = 
getOnSelectJavaScriptExpression(object);
                if (handler != null)
                {
                        response.write(&quot; onselect=\&quot;&quot; + handler 
+ '&quot;');
                }
                response.write(&quot;>");
                renderChoice(object, response, criteria);
                response.write("</li>");
        }

        public final void renderHeader(final Response response)
        {
                response.write("<ul>");
        }

        public final void renderFooter(final Response response, int count)
        {
                response.write("</ul>");
        }


What i would like to do, kind of:
<ul class="a">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Coca Cola</li>
</ul>
<p> NEXT IN LINE </p>
<ul class="b">
  <li>Coffee and some other values</li>
  <li>Tea and adfd</li>
  <li>Coca Cola</li>
</ul>


Are there any easy obvious ways to do this, that i'm missing?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/objectautocomplete-with-first-item-selected-tp3031312p4401863.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to