# Simple  con autocomplete \<Rol> view

**Es un entity simple.**

![](/files/-Lc1WutqKPnbPc0n8TV1)

![](/files/-Lc1WutsXtM0zzZswCZl)

## **Esquema**

```java
<b:form id=”form”>
    <h:panelGroup id=”content”>    
        <a:messages/>
        <b:panel title="#{app['title.data']}">
            <b:panelGrid id="panel" colSpans="2,10" >
                <p:outputLabel />  {campo llave no se edita}
            <a:inputText/>
                <a:password/>
                <a:email/>
                <a:selectOneMenu/>
            <a:autocompleteEntity/>
             </b:panelGrid>
                <a:view/>
        </b:panel>
    </h:panelGroup>
</b:form>
<a:denegado/>
```

## **Código**

```java
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<ui:composition template="/layout/template.xhtml" 
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:b="http://bootsfaces.net/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:a="http://xmlns.jcp.org/jsf/composite/avbravo">
    <ui:define name="content">
        <!--<h:outputStylesheet library="bsf" name="css/thumbnails.css"/>-->

        <style>
            .thumbnail { max-width: 100%; }
            img.thumbnail:hover, img.thumbnail:focus {
                border: 1px solid;
                border-color: #428BCA;
            }
        </style>
        <h1>#{msg['titleview.rol']}</h1>
        <hr/>
         <b:form id="form"  prependId="false"  rendered="#{loginController.loggedIn and applicationMenu.rol.query}" onkeypress="if (event.keyCode == 13) {
                    return false;
                }">
            <h:panelGroup id="content" layout="block"> 
                <a:messages id="msg"/>
                <b:panel title="#{app['title.data']}">
                    <b:panelGrid id="panel" colSpans="2,10" size="xs" rendered="#{rolController.writable}"> 
                        <p:outputLabel  value="#{msg['field.rol']}" />
                        <p:outputLabel value="#{rolController.rol.rol}" id="idrol"  />
                         <p:outputLabel  value="#{msg['field.rol']}" />
                        <a:inputText value="#{rolController.rol.rol}" id="rol"  />                           
                        <p:outputLabel  value="#{msg['field.activo']}" />
                        <a:yesno value="#{rolController.rol.activo}" id="activo"  required="true"/>
                                           </b:panelGrid>

                    <a:view 
                        renderedDelete="#{applicationMenu.rol.delete and rolController.writable }"
                        renderedEdit="#{applicationMenu.rol.edit and rolController.writable}" 
                        renderedList="#{applicationMenu.rol.list and rolController.writable}"                    
                        edit="#{rolController.edit()}"
                        delete="#{rolController.delete(rolController.rol,true)}"
                        print="#{rolController.print()}"
                        url="#{rolController.prepare('golist',rolController.rol)}"
                        />
                </b:panel>
            </h:panelGroup>
        </b:form>
 <a:denegado renderedcondition="#{!loginController.loggedIn or !applicationMenu.rol.query}" />
        <br/><br/><br/>
    </ui:define>
</ui:composition>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avbravo-2.gitbook.io/jakartaee/view-esquema/simple-con-autocomplete-rol-view.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
