> For the complete documentation index, see [llms.txt](https://avbravo-2.gitbook.io/jmoordbtaller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://avbravo-2.gitbook.io/jmoordbtaller/parte-ii/paiscontroller.java/init/searchby.md).

# searchBy()

Se usa para búsquedas desde componentes

```java

  public String searchBy(String field, Object value) {
        try {
            JmoordbContext.put("searchpais", field);
            JmoordbContext.put("_fieldsearchpais", value);
        } catch (Exception e) {
            JsfUtil.errorDialog("searchBy", e.getLocalizedMessage());
        }
        return "";
    }
```
