<commit_before>package net.databinder.components.hibernate;

import net.databinder.components.AjaxOnKeyPausedUpdater;
import net.databinder.components.StyleLink;
import net.databinder.components.Wrapper;
import net.databinder.models.IQueryBinder;

import org.hibernate.Query;

import org.apache.wicket.ResourceReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;

/**
 * Panel for a "live" search field with a clear button. The SearchPanel's model object
 * is linked to the text of the search field inside it. Instances of this class must
 * implement the onUpdate method to register external components for updating.
 * It is possible to override a search button text with a key "searchbutton.text" 
 * @author <NAME>
 */
public abstract class SearchPanel extends Panel {
	
	/**
	 * @param id Wicket id
	 * @param searchModel model to receive search string
	 */
	public SearchPanel(String id, IModel searchModel) {
		super(id, searchModel);
		add(new SearchForm("searchForm", searchModel));
		add(new StyleLink("searchStylesheet", SearchPanel.class));
	}

	
	/**<commit_msg>sp<commit_after>package net.databinder.components.hibernate;

import net.databinder.components.AjaxOnKeyPausedUpdater;
import net.databinder.components.StyleLink;
import net.databinder.components.Wrapper;
import net.databinder.models.IQueryBinder;

import org.hibernate.Query;

import org.apache.wicket.ResourceReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;

/**
 * Panel for a "live" search field with a clear button. The SearchPanel's model object
 * is linked to the text of the search field inside it. Instances of this class must
 * implement the onUpdate method to register external components for updating.
 * It is possible to override the search button text with the key "searchbutton.text" 
 * @author <NAME>
 */
public abstract class SearchPanel extends Panel {
	
	/**
	 * @param id Wicket id
	 * @param searchModel model to receive search string
	 */
	public SearchPanel(String id, IModel searchModel) {
		super(id, searchModel);
		add(new SearchForm("searchForm", searchModel));
		add(new StyleLink("searchStylesheet", SearchPanel.class));
	}

	
	/**
{'fraction_non_alphanumeric': 0.0991615020051039, 'fraction_numerical': 0.0, 'mean_word_length': 5.030769230769231, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7594268', 'n_tokens_mistral': 845, 'n_tokens_neox': 804, 'n_words': 226}