Editable outputText Fields

UI Components for JSF
ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

17 May 2010, 14:12

Hi there,

is there a componenten which allows to edit a h:ouputText and submit the changes? Should i write an own comoponente for it?

Any ideas are welcome!

Cheeerio,
Ramo

User avatar
boscooo
Posts: 55
Joined: 07 Apr 2010, 15:48
Location: Brazil

17 May 2010, 15:54

Why not to try p:inplace?

After click open a h:inputText and after a event or click on some button you defined, you submit the changes...
Works like rich:inplaceInput

http://docs.jboss.org/richfaces/latest_ ... Input.html
JBoss Seam 2.2.0 GA Web Framework
Mojarra 1.2_15-SNAPSHOT JSF Implementation
PrimeFaces 1.0.2 Final
RichFaces 3.3.3 Final
JBoss AS 4.2.2 GA

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

18 May 2010, 10:22

Hi,

thank you for the hint. So is it possible to "display" the a submitbutton, when one inplace element is activated? Is that pure JS or are there any "methods" from primefaces/jsf ? Imagine a something like six "inplacable" inputtexts and one save button should be seen, when one of these six are activated.

Greetings,
Ramo

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

19 May 2010, 18:20

We're planning to add this as a built-in feature based on;

http://developer.yahoo.com/yui/examples ... iting.html

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

19 May 2010, 18:34

Hi,

i don't know if you understood what i mean.

http://img215.imageshack.us/img215/6743 ... age01f.png

I've put an example picture there, which shows a little edit-pencil. When clicking on it, all fields should be inplacable and should be labeled, e.g. on the name-field there should be the label: Name: Max Mustermann

At the end, there should be a Submit-button to submit the whole changes to a bean....

Did you mean it this way too?

hth,
Ramo

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

19 May 2010, 18:48

Sorry, I thought I read datatable somewhere :)

We are planning to add submit and cancel buttons as a built-in feature to inplace for this to enable inplace editing.

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

19 May 2010, 21:06

Hi,

but that won't be the scenario that i thouhgt of. Try to imagine a group of inplace elements, where editing is enabled for a inplace-lements in this group. When finished, you have only one submit button to send the "whole group" to a bean.

Hth,
Ramo

User avatar
boscooo
Posts: 55
Joined: 07 Apr 2010, 15:48
Location: Brazil

19 May 2010, 23:36

Hi!

p:inplace allow you to do what you think... but with a little detail.... You won't have all fields visible... only one link that can render all inputs and with only one confirm button(or many you like)... this sample shows my imp:

Code: Select all

 
        <div  style="position : absolute; padding-bottom:20px; ">
         <a4j:outputPanel rendered="#{controleEstadoAction.getPropostaDoAno(ano).size() != 0}" id="panelOpcoes" >
            <a4j:form ajaxSubmit="true">
              <p:inplace label="Filtros de Consulta" >
                   <h:panelGrid columns="8">
                       <h:outputText value="Unidade: " />
    	              <rich:comboBox id="idUnidade" enableManualInput="false" defaultLabel="TODAS" width="70px" value="#{controlePropostaAction.unidadeSelecionada}" suggestionValues="#{controlePropostaAction.unidades}">
                       </rich:comboBox>
                       <rich:spacer width="15px" />
                       <h:outputText value="Categoria: " />  
  	             <rich:comboBox id="idCategoria" enableManualInput="false" defaultLabel="TODAS"  width="270px" value="#{controlePropostaAction.categoriaSelecionada}" suggestionValues="#{controlePropostaAction.categorias}">
                       </rich:comboBox>
	       <rich:spacer width="20px" />
	       <h:panelGroup>
	                   <a4j:commandButton image="/img/ok_tiny.png" value="Atualizar" action="#{controlePropostaAction.atualizarTabela()}" />
	                   <a4j:commandButton ajaxSingle="true" image="/img/cancel_tiny.png" onclick="reset();" value="Cancelar" bypassUpdates="true" immediate="true" reRender="panelOpcoes" />
	       </h:panelGroup>
                   </h:panelGrid>
              </p:inplace>  
             </a4j:form>
     </a4j:outputPanel>
    </div>


It shows to client the phrase "Filtros de Consulta". When the user clicks on it, shows up the content inside p:inplace.

You can try to add in p:inplace labels the properties o MB that represents your fields....

Hope this help....
JBoss Seam 2.2.0 GA Web Framework
Mojarra 1.2_15-SNAPSHOT JSF Implementation
PrimeFaces 1.0.2 Final
RichFaces 3.3.3 Final
JBoss AS 4.2.2 GA

User avatar
boscooo
Posts: 55
Joined: 07 Apr 2010, 15:48
Location: Brazil

19 May 2010, 23:38

cagatay.civici wrote:Sorry, I thought I read datatable somewhere :)

We are planning to add submit and cancel buttons as a built-in feature to inplace for this to enable inplace editing.
Any idea when this will be available?
Thanks in advance.
JBoss Seam 2.2.0 GA Web Framework
Mojarra 1.2_15-SNAPSHOT JSF Implementation
PrimeFaces 1.0.2 Final
RichFaces 3.3.3 Final
JBoss AS 4.2.2 GA

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

24 May 2010, 15:39

Hi,

I've create a new ticket for this;

http://code.google.com/p/primefaces/iss ... ail?id=830

Can't say an exact timeframe for this as it now all depends to the new priority scheme;

http://primefaces.prime.com.tr/forum/vi ... f=3&t=2465

But I'm really excited about seeing this in PrimeFaces as well so I think it won't take too long hopefully.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests