[OFBiz] Dev - Sending parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - Sending parameters

Michael Irving

I’m trying to “automatically” go from the createPerson (editPerson) to the editcontactmech form.  How do I send the partyID to editcontactmech form without having to go to the viewProfile page?

 

-----------------------------------------

Michael Irving

Keynetx, Inc. - Building Solutions for Success

Mobile: (267)474.3564

Fax: (425) 871-2838

email: [hidden email]

 

* * * Visit Our Web Site: http://www.keynetx.net * * *

 

--------------------------------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

 


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Sending parameters

Si Chen-2
Are you using a request chain in the controller? If so it should already
do that for you?

Michael Irving wrote:

> I’m trying to “automatically” go from the createPerson (editPerson) to
> the editcontactmech form. How do I send the partyID to editcontactmech
> form without having to go to the viewProfile page?
>
> -----------------------------------------
>
> Michael Irving
>
> Keynetx, Inc. - Building Solutions for Success
>
> Mobile: (267)474.3564
>
> Fax: (425) 871-2838
>
> email: [hidden email] <mailto:[hidden email]>
>
> * * * Visit Our Web Site: http://www.keynetx.net 
> <http://www.keynetx.net/> * * *
>
> --------------------------------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender
> does not waive confidentiality or privilege, and use is prohibited.
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Dev mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/dev
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

RE: [OFBiz] Dev - Sending parameters

Michael Irving
Si,

I've been trying to find information on how to build the request chain that
you suggested....but I'm coming up with nothing.  I tried the Dev archives
and WIKI.

Can you point me to a "how to" or some examples of this?

Thanks

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Si Chen
Sent: Monday, August 29, 2005 2:32 PM
To: OFBiz Project Development Discussion
Subject: Re: [OFBiz] Dev - Sending parameters

Are you using a request chain in the controller? If so it should already
do that for you?

Michael Irving wrote:

> I'm trying to "automatically" go from the createPerson (editPerson) to
> the editcontactmech form. How do I send the partyID to editcontactmech
> form without having to go to the viewProfile page?
>
> -----------------------------------------
>
> Michael Irving
>
> Keynetx, Inc. - Building Solutions for Success
>
> Mobile: (267)474.3564
>
> Fax: (425) 871-2838
>
> email: [hidden email] <mailto:[hidden email]>
>
> * * * Visit Our Web Site: http://www.keynetx.net 
> <http://www.keynetx.net/> * * *
>
>
----------------------------------------------------------------------------
----

>
> NOTICE: If received in error, please destroy and notify sender. Sender
> does not waive confidentiality or privilege, and use is prohibited.
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Dev mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/dev
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Sending parameters

David E. Jones

There are lots of examples in the controller.xml file in ecommerce,  
and various other places. For information on how it works and such,  
the best source of information would be the documentation (see the  
Control Servlet Guide on the Docs & Books page of the ofbiz.org site).

-David


On Sep 3, 2005, at 1:53 PM, Michael Irving wrote:

> Si,
>
> I've been trying to find information on how to build the request  
> chain that
> you suggested....but I'm coming up with nothing.  I tried the Dev  
> archives
> and WIKI.
>
> Can you point me to a "how to" or some examples of this?
>
> Thanks
>
> -----Original Message-----
> From: [hidden email] [mailto:dev-
> [hidden email]] On
> Behalf Of Si Chen
> Sent: Monday, August 29, 2005 2:32 PM
> To: OFBiz Project Development Discussion
> Subject: Re: [OFBiz] Dev - Sending parameters
>
> Are you using a request chain in the controller? If so it should  
> already
> do that for you?
>
> Michael Irving wrote:
>
>
>> I'm trying to "automatically" go from the createPerson  
>> (editPerson) to
>> the editcontactmech form. How do I send the partyID to  
>> editcontactmech
>> form without having to go to the viewProfile page?
>>
>> -----------------------------------------
>>
>> Michael Irving
>>
>> Keynetx, Inc. - Building Solutions for Success
>>
>> Mobile: (267)474.3564
>>
>> Fax: (425) 871-2838
>>
>> email: [hidden email] <mailto:[hidden email]>
>>
>> * * * Visit Our Web Site: http://www.keynetx.net
>> <http://www.keynetx.net/> * * *
>>
>>
>>
> ----------------------------------------------------------------------
> ------
> ----
>
>>
>> NOTICE: If received in error, please destroy and notify sender.  
>> Sender
>> does not waive confidentiality or privilege, and use is prohibited.
>>
>> ---------------------------------------------------------------------
>> ---
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - Using view-entity in a form

Michael Irving
I created a view-entity (Employee) that queries the Person table.  I then
created a form "Edit Employee" see below.  The form works when I want to
create anew employee, but when I pass the personId, I get:

org.ofbiz.base.util.GeneralException: Error rendering screen [EditEmployee]:
java.lang.NullPointerException (null)

I know I must be missing something very basic.  Can someone help?

Thanks,

-Mike


<form name="EditEmployee" type="single"
            target="updatePerson" title="" default-map-name="employee"
            default-title-style="tableheadtext"
default-widget-style="inputBox" default-tooltip-style="tabletext">
        <alt-target use-when="partyId==null" target="createPerson"/>
        <auto-fields-entity entity-name="Employee"/>
       
        <field use-when="partyId!=null" name="partyId"
title="${uiLabelMap.PartyPartyId}"
tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
        <!--
        <field use-when="employee==null&amp;&amp;partyId==null"
name="partyId" title="${uiLabelMap.PartyPartyId}"><ignored/></field>
        <field use-when="employee==null&amp;&amp;partyId!=null"
name="partyId" title="${uiLabelMap.PartyPartyId}"
tooltip="${uiLabelMap.CommonCannotBeFound}: [${partyId}]"><display/></field>
         -->

        <field name="gender">
            <drop-down allow-empty="true">
                <option key="M" description="Male"/>
                <option key="F" description="Female"/>
            </drop-down>
        </field>
        <field name="maritalStatus">
            <drop-down allow-empty="true">
                <option key="S" description="Single"/>
                <option key="M" description="Married"/>
                <option key="P" description="Separated"/>
                <option key="D" description="Divorced"/>
                <option key="W" description="Widowed"/>
            </drop-down>
        </field>
       
        <field name="submitButton" title="[${uiLabelMap.CommonSave}]"
widget-style="buttontext"><submit button-type="text-link"/></field>
        <field name="cancelLink" title=" "
widget-style="buttontext"><hyperlink target="${donePage}?partyId=${partyId}"
also-hidden="false" description="[${uiLabelMap.CommonCancelDone}]"/></field>
    </form>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Sending parameters

Andrew Zeneski
In reply to this post by Michael Irving
Look at a controller.xml file. Look for requests which have a response type of "request". Instead of rendering a view at that time it will call that request, run the event and then process that response. That response can render a view or "chain" to another request.


-----Original Message-----
From: "Michael Irving" <[hidden email]>
Date: Sat, 3 Sep 2005 08:53:05
To:"'OFBiz Project Development Discussion'" <[hidden email]>
Subject: RE: [OFBiz] Dev - Sending parameters

Si,

I've been trying to find information on how to build the request chain that
you suggested....but I'm coming up with nothing.  I tried the Dev archives
and WIKI.

Can you point me to a "how to" or some examples of this?

Thanks

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Si Chen
Sent: Monday, August 29, 2005 2:32 PM
To: OFBiz Project Development Discussion
Subject: Re: [OFBiz] Dev - Sending parameters

Are you using a request chain in the controller? If so it should already
do that for you?

Michael Irving wrote:

> I'm trying to "automatically" go from the createPerson (editPerson) to
> the editcontactmech form. How do I send the partyID to editcontactmech
> form without having to go to the viewProfile page?
>
> -----------------------------------------
>
> Michael Irving
>
> Keynetx, Inc. - Building Solutions for Success
>
> Mobile: (267)474.3564
>
> Fax: (425) 871-2838
>
> email: [hidden email] <mailto:[hidden email]>
>
> * * * Visit Our Web Site: http://www.keynetx.net 
> <http://www.keynetx.net/> * * *
>
>
----------------------------------------------------------------------------
----

>
> NOTICE: If received in error, please destroy and notify sender. Sender
> does not waive confidentiality or privilege, and use is prohibited.
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Dev mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/dev
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

RE: [OFBiz] Dev - Using view-entity in a form

Michael Irving
In reply to this post by Michael Irving
I've created the following screen, but I keep getting "
java.lang.NullPointerException (null)" if I pass in the partyId in the URL.
I just can't seem to get the screen to correctly query the Employee
entity-view that I created.  If I don't send a parameter, it will properly
go into "create" mode.:



<screen name="EditEmployee">
  <section>
   <actions>
      <set field="partyId" from-field="parameters.partyId"/>
      <set field="donePage" from-field="parameters.DONE_PAGE"
default-value="viewprofile"/>
      <entity-one entity-name="Employee" value-name="Person">
            <field-map env-name="partyId" field-name="partyId" />
      </entity-one>
   </actions>
   <widgets>
      <decorator-screen name="CommonDecorator">
         <decorator-section name="body">
           <include-form name="EditEmployee"
location="component://aztec-hrms/webapp/aztec-hrms/forms/HrmsForms.xml"/>
         </decorator-section>
      </decorator-screen>
   </widgets>
 </section>
</screen>

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Michael Irving
Sent: Saturday, September 03, 2005 11:48 AM
To: 'OFBiz Project Development Discussion'
Subject: [OFBiz] Dev - Using view-entity in a form

I created a view-entity (Employee) that queries the Person table.  I then
created a form "Edit Employee" see below.  The form works when I want to
create anew employee, but when I pass the personId, I get:

org.ofbiz.base.util.GeneralException: Error rendering screen [EditEmployee]:
java.lang.NullPointerException (null)

I know I must be missing something very basic.  Can someone help?

Thanks,

-Mike


<form name="EditEmployee" type="single"
            target="updatePerson" title="" default-map-name="employee"
            default-title-style="tableheadtext"
default-widget-style="inputBox" default-tooltip-style="tabletext">
        <alt-target use-when="partyId==null" target="createPerson"/>
        <auto-fields-entity entity-name="Employee"/>
       
        <field use-when="partyId!=null" name="partyId"
title="${uiLabelMap.PartyPartyId}"
tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
        <!--
        <field use-when="employee==null&amp;&amp;partyId==null"
name="partyId" title="${uiLabelMap.PartyPartyId}"><ignored/></field>
        <field use-when="employee==null&amp;&amp;partyId!=null"
name="partyId" title="${uiLabelMap.PartyPartyId}"
tooltip="${uiLabelMap.CommonCannotBeFound}: [${partyId}]"><display/></field>
         -->

        <field name="gender">
            <drop-down allow-empty="true">
                <option key="M" description="Male"/>
                <option key="F" description="Female"/>
            </drop-down>
        </field>
        <field name="maritalStatus">
            <drop-down allow-empty="true">
                <option key="S" description="Single"/>
                <option key="M" description="Married"/>
                <option key="P" description="Separated"/>
                <option key="D" description="Divorced"/>
                <option key="W" description="Widowed"/>
            </drop-down>
        </field>
       
        <field name="submitButton" title="[${uiLabelMap.CommonSave}]"
widget-style="buttontext"><submit button-type="text-link"/></field>
        <field name="cancelLink" title=" "
widget-style="buttontext"><hyperlink target="${donePage}?partyId=${partyId}"
also-hidden="false" description="[${uiLabelMap.CommonCancelDone}]"/></field>
    </form>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

RE: [OFBiz] Dev - Sending parameters

Michael Irving
In reply to this post by Andrew Zeneski
When building a chain of requests.....how do parameters get sent in?  For
example:

1.  web form calls createPerson service
2.  when the createPerson response = "success", then call "createPartyRole"

I have a hidden field in the web for that is set to the role
"EMPLOYEE"....but when the person is created, the log is showing that the
_NA_ role is created.  Then when the "chained" createPartyRold is called, I
get a FK violation on the insert.  I'm guessing that the "_NA_" value is
hanging around and the chained request isn't getting the "EMPLOYEE" role id.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of A. Zeneski
Sent: Saturday, September 03, 2005 12:33 PM
To: OFBiz Project Development Discussion
Subject: Re: [OFBiz] Dev - Sending parameters

Look at a controller.xml file. Look for requests which have a response type
of "request". Instead of rendering a view at that time it will call that
request, run the event and then process that response. That response can
render a view or "chain" to another request.


-----Original Message-----
From: "Michael Irving" <[hidden email]>
Date: Sat, 3 Sep 2005 08:53:05
To:"'OFBiz Project Development Discussion'" <[hidden email]>
Subject: RE: [OFBiz] Dev - Sending parameters

Si,

I've been trying to find information on how to build the request chain that
you suggested....but I'm coming up with nothing.  I tried the Dev archives
and WIKI.

Can you point me to a "how to" or some examples of this?

Thanks

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Si Chen
Sent: Monday, August 29, 2005 2:32 PM
To: OFBiz Project Development Discussion
Subject: Re: [OFBiz] Dev - Sending parameters

Are you using a request chain in the controller? If so it should already
do that for you?

Michael Irving wrote:

> I'm trying to "automatically" go from the createPerson (editPerson) to
> the editcontactmech form. How do I send the partyID to editcontactmech
> form without having to go to the viewProfile page?
>
> -----------------------------------------
>
> Michael Irving
>
> Keynetx, Inc. - Building Solutions for Success
>
> Mobile: (267)474.3564
>
> Fax: (425) 871-2838
>
> email: [hidden email] <mailto:[hidden email]>
>
> * * * Visit Our Web Site: http://www.keynetx.net 
> <http://www.keynetx.net/> * * *
>
>
----------------------------------------------------------------------------
----

>
> NOTICE: If received in error, please destroy and notify sender. Sender
> does not waive confidentiality or privilege, and use is prohibited.
>
>------------------------------------------------------------------------
>
>
>_______________________________________________
>Dev mailing list
>[hidden email]
>http://lists.ofbiz.org/mailman/listinfo/dev
>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Using view-entity in a form

David E. Jones
In reply to this post by Michael Irving

Could you send over the full stack trace? A NullPointerException out  
of context is difficult to isolate...

Thanks,
-David


On Sep 3, 2005, at 6:25 PM, Michael Irving wrote:

> I've created the following screen, but I keep getting "
> java.lang.NullPointerException (null)" if I pass in the partyId in  
> the URL.
> I just can't seem to get the screen to correctly query the Employee
> entity-view that I created.  If I don't send a parameter, it will  
> properly
> go into "create" mode.:
>
>
>
> <screen name="EditEmployee">
>   <section>
>    <actions>
>       <set field="partyId" from-field="parameters.partyId"/>
>       <set field="donePage" from-field="parameters.DONE_PAGE"
> default-value="viewprofile"/>
>       <entity-one entity-name="Employee" value-name="Person">
>             <field-map env-name="partyId" field-name="partyId" />
>       </entity-one>
>    </actions>
>    <widgets>
>       <decorator-screen name="CommonDecorator">
>          <decorator-section name="body">
>            <include-form name="EditEmployee"
> location="component://aztec-hrms/webapp/aztec-hrms/forms/
> HrmsForms.xml"/>
>          </decorator-section>
>       </decorator-screen>
>    </widgets>
>  </section>
> </screen>
>
> -----Original Message-----
> From: [hidden email] [mailto:dev-
> [hidden email]] On
> Behalf Of Michael Irving
> Sent: Saturday, September 03, 2005 11:48 AM
> To: 'OFBiz Project Development Discussion'
> Subject: [OFBiz] Dev - Using view-entity in a form
>
> I created a view-entity (Employee) that queries the Person table.  
> I then
> created a form "Edit Employee" see below.  The form works when I  
> want to
> create anew employee, but when I pass the personId, I get:
>
> org.ofbiz.base.util.GeneralException: Error rendering screen  
> [EditEmployee]:
> java.lang.NullPointerException (null)
>
> I know I must be missing something very basic.  Can someone help?
>
> Thanks,
>
> -Mike
>
>
> <form name="EditEmployee" type="single"
>             target="updatePerson" title="" default-map-name="employee"
>             default-title-style="tableheadtext"
> default-widget-style="inputBox" default-tooltip-style="tabletext">
>         <alt-target use-when="partyId==null" target="createPerson"/>
>         <auto-fields-entity entity-name="Employee"/>
>
>         <field use-when="partyId!=null" name="partyId"
> title="${uiLabelMap.PartyPartyId}"
> tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
>         <!--
>         <field use-when="employee==null&amp;&amp;partyId==null"
> name="partyId" title="${uiLabelMap.PartyPartyId}"><ignored/></field>
>         <field use-when="employee==null&amp;&amp;partyId!=null"
> name="partyId" title="${uiLabelMap.PartyPartyId}"
> tooltip="${uiLabelMap.CommonCannotBeFound}: [${partyId}]"><display/
> ></field>
>          -->
>
>         <field name="gender">
>             <drop-down allow-empty="true">
>                 <option key="M" description="Male"/>
>                 <option key="F" description="Female"/>
>             </drop-down>
>         </field>
>         <field name="maritalStatus">
>             <drop-down allow-empty="true">
>                 <option key="S" description="Single"/>
>                 <option key="M" description="Married"/>
>                 <option key="P" description="Separated"/>
>                 <option key="D" description="Divorced"/>
>                 <option key="W" description="Widowed"/>
>             </drop-down>
>         </field>
>
>         <field name="submitButton" title="[${uiLabelMap.CommonSave}]"
> widget-style="buttontext"><submit button-type="text-link"/></field>
>         <field name="cancelLink" title=" "
> widget-style="buttontext"><hyperlink target="${donePage}?partyId=$
> {partyId}"
> also-hidden="false" description="[${uiLabelMap.CommonCancelDone}]"/
> ></field>
>     </form>
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev