Re: Request Factory Proxy Variable Null problem

2011-09-28 Thread Julian


*Your other properties are already filled because they are primitive types ( 
= no entity proxy). Only properties that are entity proxies or lists of 
entity proxies are null when you do not add these properties to the .with() 
method.*

This also applies to instances of ValueProxy.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/NlWZRivqHu4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request Factory Proxy Variable Null problem

2011-09-28 Thread Mark Wengranowski
Awsome!

Thanks for you help with this guys. Everything is working properly
now.

Cheers,
-Mark

On Sep 28, 3:17 pm, Jens  wrote:
> You have to use the property name of the entity proxy. So in your case
> .with("lineItems"). If you need more than one property you can just add it
> to the parameter list, e.g. .with("lineItems", "otherPropertyName"). You can
> also go down the hierarchy with a dot notation. Imagine your
> InvoiceDetailsProxy contains a property "A" (which is an entity proxy) and
> you also want that property to be not null, you would add it to the with
> method like: .with("lineItems", "lineItems.a").
> Your other properties are already filled because they are primitive types (
> = no entity proxy). Only properties that are entity proxies or lists of
> entity proxies are null when you do not add these properties to the .with()
> method.
>
> If you use the Editor Framework from GWT there is also a getPaths() method
> on the editor driver which returns an array of strings with all the property
> names the editor needs to be loaded. So you would do
> .with(editorDriver.getPaths()).
>
> -- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request Factory Proxy Variable Null problem

2011-09-28 Thread Jens
You have to use the property name of the entity proxy. So in your case 
.with("lineItems"). If you need more than one property you can just add it 
to the parameter list, e.g. .with("lineItems", "otherPropertyName"). You can 
also go down the hierarchy with a dot notation. Imagine your 
InvoiceDetailsProxy contains a property "A" (which is an entity proxy) and 
you also want that property to be not null, you would add it to the with 
method like: .with("lineItems", "lineItems.a"). 
Your other properties are already filled because they are primitive types ( 
= no entity proxy). Only properties that are entity proxies or lists of 
entity proxies are null when you do not add these properties to the .with() 
method.

If you use the Editor Framework from GWT there is also a getPaths() method 
on the editor driver which returns an array of strings with all the property 
names the editor needs to be loaded. So you would do 
.with(editorDriver.getPaths()).

-- J.



-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/VNpGYGRUdFkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request Factory Proxy Variable Null problem

2011-09-28 Thread Mark Wengranowski
It could be but im not really sure how i should use it? How do you
determine what parameter gown in with("param")

would i just change this line of code
rs2.getInvoiceWithDetails(clientFactory.getUser()
+view.getInvoice()).fire(new Receiver()

to
rs2.getInvoiceWithDetails(clientFactory.getUser()
+view.getInvoice()).with("").fire(new Receiver()

Cheers,
-Mark


On Sep 28, 1:42 pm, Julian  wrote:
> Could this be related?
>
> https://groups.google.com/forum/#!searchin/google-web-toolkit/request...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Request Factory Proxy Variable Null problem

2011-09-28 Thread Julian
Could this be related?

https://groups.google.com/forum/#!searchin/google-web-toolkit/requestfactory$20null/google-web-toolkit/ocBf6sXrv-I/HNkuYb9CnfQJ

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bAyOIDTwkRgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Request Factory Proxy Variable Null problem

2011-09-28 Thread Mark Wengranowski
Hi Everyone,

I'm stuck on figuring out why a List Variable "lineItems" from my
entity comes back as null when passing it through the entity proxy.
All the other getter methods return values but for some reason the
list is null. When stepping through the code i can see that the list
variable is populated in the service method which populated the class.
This is how im trying to make things work and have based it on the
ListWidget program source. Everything is identical (i think). Any Help
would be greatly appreciated.

1. define my entity

@entity
public class Invoice extends EntityBase {

private String invoiceID;

private String invoice;
private String dateOrdered;
private String dateInvoiced;
private String invoiceTotal;
private String balanceOwing;
private String age;
private String amountPaid;
private String adjustments;
private String poNum;
private String accountMgr;
private String terms;
private String customerContact;
private String shippedVia;
@Embedded private List lineItems;
.
.
.

2. define the entity proxy


@ProxyFor(value = Invoice.class, locator = EntityLocator.class)
public interface InvoiceProxy extends EntityProxy
{

String getInvoiceID();
void setInvoiceID(String invoiceID);
String getPoNum();
void setPoNum(String poNum);
String getInvoice();
void setInvoice(String invoice);
String getDateOrdered();
void setDateOrdered(String dateOrdered);
String getDateInvoiced();
void setDateInvoiced(String dateInvoiced);
String getInvoiceTotal();
void setInvoiceTotal(String invoiceTotal);
String getBalanceOwing();
void setBalanceOwing(String balanceOwing);
String getAge();
void setAge(String age);
String getAmountPaid();
void setAmountPaid(String amountPaid);
String getAdjustments();
void setAdjustments(String adjustments);
String getAccountMgr();
void setAccountMgr(String accountMgr);
String getTerms();
void setTerms(String terms);
String getCustomerContact();
void setCustomerContact(String customerContact);
String getShippedVia();
void setShippedVia(String shippedVia);

List getLineItems();
void setLineItems(List lineItems);

}


3. Call the Server Side method in the onStart of my activity



InvoiceService rs2 =
clientFactory.getRequestFactory().invoiceService();
rs2.getInvoiceWithDetails(clientFactory.getUser()
+view.getInvoice()).fire(new Receiver()
{
@Override
public void onSuccess(InvoiceProxy 
invoicepx)
{
// Gotcha--if do this, must 
call panel.setWidget in onSuccess
// also
assert (view != null);
assert invoicepx != null;
invoice = invoicepx;
List 
invoiceList=invoicepx.getLineItems();

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.