Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
17. Mar 2010, 16:29 America/New_York | Link

Hello

I'm new to this, I developed a project.

Someone can help me with an example of an invoice.

An application header detail

8 Replies:
17. Mar 2010, 16:38 America/New_York | Link

Please provide more info.

 

Outsource your Seam projects to Poland

Rating:  *
17. Mar 2010, 17:29 America/New_York | Link
I am developing an invoice
with a header and detail.

the headers is no problem
the header call rich: modalPanel
which is the next....
..................................................................
rich:modalPanel id="editarItem"
                 xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:s="http://jboss.com/products/seam/taglib"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:rich="http://richfaces.org/rich"
                 xmlns:a4j="http://richfaces.org/a4j" resizeable="true" width="600" height="300">

    <f:facet name="header">
        <h:panelGroup>
            <h:outputText value="Agregar Catalogo"/>
        </h:panelGroup>
    </f:facet>

    <f:facet name="controls">
        <h:panelGroup>
            <h:graphicImage value="/img/close.png" id="hidelink"
                            styleClass="hidelink" />
            <rich:componentControl for="editarItem" attachTo="hidelink"
                                   operation="hide" event="onclick" />
        </h:panelGroup>
    </f:facet>
        <h:form id="guardar">
        <s:validateAll>

                <rich:panel >
                <f:facet name="header">Agregar Item</f:facet>
                <h:panelGrid columns="3" rowClasses="prop" columnClasses="name,value">
                        <h:outputLabel for="items">cant</h:outputLabel>
                        <h:inputText value="#{detalleCompraHome.instance.dmsCantidad}" id="cant"/>
                           <h:commandButton value="calcular" action="none" actionListener="#{detalleCompraHome.calculaporcentaje}"/>
                    <h:outputLabel for="itemd">Catalogo</h:outputLabel>
                    <h:inputText value="#{detalleCompraHome.instance.item}" id="itemd" converter="#{itemConverter}" style="text-transform:uppercase" size="30"/>
                    <rich:suggestionbox id="suggestionBoxId" for="itemd"
                                        suggestionAction="#{itemBodegaHome.findItem}" var="result"
                                        fetchValue="#{result.catalogo.eqcCodeqc}" tokens="," height="200" width="300" cellpadding="2"
                                        cellspacing="2" shadowOpacity="4" shadowDepth="4"
                                        minChars="4" rules="none" nothingLabel="No se encontro nada">
                        <h:column>
                            <h:outputText value="#{result.catalogo.eqcCodeqc}"/>
                        </h:column>
                        <h:column>
                            <h:outputText value="#{result.catalogo.eqcDescri}" />
                        </h:column>
                    </rich:suggestionbox>
                </h:panelGrid>
            </rich:panel>
        </s:validateAll>
        <div class="actionButtons">
            <h:commandButton value="Guardar" action="#{detalleCompraHome.persist}" rendered="#{!detalleCompraHome.isManaged()}"/>
            <h:commandButton value="Guardar" action="#{detalleCompraHome.update}" oncomplete = "('editarCatalogo').component.hide()" rendered="#{detalleCompraHome.isManaged()}"/>
            <h:commandButton value="Regresar" action="cancelar" immediate="true"/>
        </div>
   </h:form>
</rich:modalPanel>

...........................
which adds items,
My problem is that when you clik on calcular abandons modalpanel

What I want is that the independent commadbotton the form to continue doing some independent calculations to fields


thanks
17. Mar 2010, 17:51 America/New_York | Link

Hello

commandbutton Send the application form That another option may be to not send the form and stay in modalpanel

18. Mar 2010, 09:22 America/New_York | Link

How about using a4j:commandButton to perform ajax submit. This will not hide modal panel. You can provide reRender attribute for that button to rerender some part of modal panel.

 

Outsource your Seam projects to Poland

18. Mar 2010, 15:08 America/New_York | Link

ok worked thanks

Bernard

Greetings

EfraĆ­n

18. Mar 2010, 21:55 America/New_York | Link
Hello Dernard

Another cuestion please
How can I keep track of twice panelModal
of the code is as follows entityhome
public class DetalleCompraHome extends EntityHome<DetalleCompra>
.
.
.
 @Override
    public String persist()
    {

        this.getInstance().setDmsCantidad(this.getInstance().getDmsCantidad());
         this.getInstance().setItem(this.getInstance().getItem());
         System.out.println(this.getInstance().getDmsCantidad());
         System.out.println(this.getInstance().getItem());
          String s = super.persist();
         this.getInstance().setDmsCantidad(this.getInstance().getDmsCantidad());
         this.getInstance().setItem(this.getInstance().getItem());
         System.out.println(this.getInstance().getDmsCantidad());
         System.out.println(this.getInstance().getItem());
          String s1 = super.persist();
        return s+"D";
    }

I have no idea
19. Mar 2010, 08:35 America/New_York | Link

I do not understand your English. What do you mean by track of twice panelModal ? What i see from your I suspect that you want to make a copy of DetalleCompra and persist both original and the copy. Am I right ?

Anyway, the code is wrong. Explain what you want to do, please.

 

Outsource your Seam projects to Poland

19. Mar 2010, 16:53 America/New_York | Link
Sorry for my English ... I do not practice
My challenge is learn English and seam framework.

Indeed.
By submitting form ( <h:form id="guardar"> )
I have a copy of DetalleCompra and persist both original and the copy.