[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-05 Thread rlhr
Hello,

So I got time to do more testing. Now the interface generated for the 
SelectItem is fine and got all the methods defined.

Seam.Remoting.type.javax$faces$model$SelectItem = function() {
  |   this.value = undefined;
  |   this.label = undefined;
  |   this.disabled = undefined;
  |   this.description = undefined;
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.getValue = 
function() { return this.value; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.getLabel = 
function() { return this.label; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.isDisabled = 
function() { return this.disabled; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.getDescription 
= function() { return this.description; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.setValue = 
function(value) { this.value = value; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.setLabel = 
function(label) { this.label = label; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.setDisabled = 
function(disabled) { this.disabled = disabled; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.setDescription 
= function(description) { this.description = description; }
  | }
  | 
  | Seam.Remoting.type.javax$faces$model$SelectItem.__name = 
"javax.faces.model.SelectItem";
  | Seam.Remoting.type.javax$faces$model$SelectItem.__metadata = [
  |   {field: "value", type: "bean"},
  |   {field: "label", type: "str"},
  |   {field: "disabled", type: "bool"},
  |   {field: "description", type: "str"}];
  | 
  | Seam.Remoting.registerType(Seam.Remoting.type.javax$faces$model$SelectItem);
  | 
Also I was able to import a non-component classes:

/* IE */
  | 
generated the following interface:

Seam.Remoting.type.test$RangeValue = function() {
  |   this.value = undefined;
  |   this.minValue = undefined;
  |   this.maxValue = undefined;
  |   Seam.Remoting.type.test$PriceRange.prototype.getValue = function() { 
return this.value; }
  |   Seam.Remoting.type.test$PriceRange.prototype.getMinValue = function() { 
return this.minValue; }
  |   Seam.Remoting.type.test$PriceRange.prototype.getMaxValue = function() { 
return this.maxValue; }
  |   Seam.Remoting.type.test$PriceRange.prototype.setValue = function(value) { 
this.value = value; }
  |   Seam.Remoting.type.test$PriceRange.prototype.setMinValue = 
function(minValue) { this.minValue = minValue; }
  |   Seam.Remoting.type.test$PriceRange.prototype.setMaxValue = 
function(maxValue) { this.maxValue = maxValue; }
  | }
  | 
  | Seam.Remoting.type.test$RangeValue.__name = "test.RangeValue";
  | Seam.Remoting.type.test$RangeValue.__metadata = [
  |   {field: "value", type: "number"},
  |   {field: "minValue", type: "number"},
  |   {field: "maxValue", type: "number"}];
  | 
  | Seam.Remoting.registerType(Seam.Remoting.type.test$RangeValue);
  | 
Everything looks good to me. 

Thanks for this great work.

Richard

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963368#3963368

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963368
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-04 Thread rlhr
Thanks, I'll try it when I get today's build.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963232#3963232

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963232
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-03 Thread sbryzak2
This has been fixed in CVS - you'll now get correctly generated getter/setter 
methods for non-component types.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963065#3963065

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963065
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-03 Thread sbryzak2
There should be getters and setters, I'll try and find time today to fix this 
for you.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963052#3963052

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963052
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-03 Thread rlhr
I finally got the opportunity to test the code you checked in.
I downloaded jboss-seam-CVS.20060803.zip (which was created after your post).

The interface created for the SelectItem class is:

Seam.Remoting.type.javax$faces$model$SelectItem = function() {
  |   this.value = undefined;
  |   this.label = undefined;
  |   this.disabled = undefined;
  |   this.description = undefined;
  | }
  | 
  | Seam.Remoting.type.javax$faces$model$SelectItem.__name = 
"javax.faces.model.SelectItem";
  | Seam.Remoting.type.javax$faces$model$SelectItem.__metadata = [
  |   {field: "value", type: "bean"},
  |   {field: "label", type: "str"},
  |   {field: "disabled", type: "bool"},
  |   {field: "description", type: "str"}];
  | 
  | Seam.Remoting.registerType(Seam.Remoting.type.javax$faces$model$SelectItem);
  | 
  | 

The xml received back from the server is:


  |   
  | 11
  |   
  | 
  |   
  | 
  |   
  | 
  | 
  | 
  |   
  | 
  |   
  | 
  |   
  | -1
  | AA
  | false
  | 
  |   
  | 
  | 
  |   
  | 2
  | B
  | false
  | 
  |   
  | 
  | 
  |   
  | 3
  | C
  | false
  | 
  |   
  | 
  |   
  | 
  |   
  | 
  | 

I was able to read the value fine using the properties "label" and "value".

I noticed that the getters and setters are not generated for that bean.
Is that in purpose?

Anyway, that solve my problem. Awesome job!

I didn't try the other functionnality you mentioned but actually I might also 
need it soon and therefore test it at the same time.

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962849#3962849

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962849
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-03 Thread rlhr
That's really cool.
I'm in the middle of something else right now and broke my app, but I still my 
be able to try your change today and give you some feedback.
Thanks a lot.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962768#3962768

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962768
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread sbryzak2
I've checked in some changes to CVS which hopefully should fix your issue.  It 
would be great if you could try this out for me and let me know if it works for 
you.  One other neat thing that is now supported is explicit importing of 
non-component classes, so for example you can now import/browse this:

/seam/remoting/interface.js?javax.faces.model.SelectItem

to generate a client stub for the SelectItem class. 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962684#3962684

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962684
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread rlhr
Thanks a lot.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962612#3962612

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962612
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread sbryzak2
"rlhr" wrote : 
  | 
  | 
  |   | Wed Aug 02 2006 14:56:55 GMT+0200 (Romance Daylight Time): Response 
packet:
  |   | 
  |   |   
  |   | 12
  |   |   
  |   |   
  |   | 
  |   |   
  |   | 
  |   |   
  |   |   
  |   |   
  |   | 
  |   |   
  |   |   
  |   | 
  |   | 
  |   | 
  |   |   
  |   | 
  |   |   
  |   | 
  |   | 

It looks like the field values for SelectItem aren't being serialized after 
all.  I'll take a look at this today and see if I can come up with something 
that will work for the cases where the field naming doesn't match the 
getter/setter names.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962602#3962602

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962602
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread rlhr
So after registering myManager, I registered this classe:

Seam.Remoting.type.javax$faces$model$SelectItem = function() {
  |   this._value = null;
  |   this._label = null;
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.getValue = 
function() { return this._value; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.getLabel = 
function() { return this._label; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.setValue = 
function(_value) { this._value = _value; }
  |   Seam.Remoting.type.javax$faces$model$SelectItem.prototype.setLabel = 
function(_label) { this._label = _label; }
  | }
  | 
  | Seam.Remoting.type.javax$faces$model$SelectItem.__name = 
"javax.faces.model.SelectItem";
  | Seam.Remoting.type.javax$faces$model$SelectItem.__metadata = [
  |   {field: "_value", type: "str"},
  |   {field: "_label", type: "str"},
  | ];
  | 
  | 
  | Seam.Remoting.registerType(Seam.Remoting.type.javax$faces$model$SelectItem);
  | 

Looking at the javascript code, it should then replace the generated stub.

Then I tried again without success...

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962582#3962582

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962582
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread rlhr
Here are the XML packets:

Wed Aug 02 2006 14:56:54 GMT+0200 (Romance Daylight Time): Request packet:
  | 
  |   
  | 10
  |   
  |   
  | 
  |   
  | 
  |   ID:12
  | 
  |   
  |   
  | 
  |   
  | 
  | 
  | 
  | Wed Aug 02 2006 14:56:55 GMT+0200 (Romance Daylight Time): Response packet:
  | 
  |   
  | 12
  |   
  |   
  | 
  |   
  | 
  |   
  |   
  |   
  | 
  |   
  |   
  | 
  | 
  | 
  |   
  | 
  |   
  | 
  | 

So if I write a stub for SelectItem and register it, Seam won't generate one 
and pick that one up. Is that what you mean?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962450#3962450

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962450
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread sbryzak2
What you could do is implement your own javascript stub and register it with 
Seam.Remoting.registerType(), but it would be interesting to see what actual 
XML is being sent in response to your remoting call.  You can enable debugging 
mode with Seam.Remoting.setDebug(true) which will show you the XML packets that 
are sent back and forth between the browser and the server.  As far as I 
recall, the field values for the SelectItem object should still be sent back 
even if they don't have a matching getter/setter method.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962428#3962428

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962428
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread rlhr
This is what is generated:

Seam.Remoting.type.javax$faces$model$SelectItem = function() {
  | }
  | 
  | Seam.Remoting.type.javax$faces$model$SelectItem.__name = 
"javax.faces.model.SelectItem";
  | Seam.Remoting.type.javax$faces$model$SelectItem.__metadata = [
  | ];
  | 
  | Seam.Remoting.registerType(Seam.Remoting.type.javax$faces$model$SelectItem);
  | 
  | 

The field haven't been produced. As you said, that might just come from this 
strange naming convention they used. 
I didn't think of checking the implementation of that javabean class!
I could just implement my own, but I'm not sure it is going to work properly 
with the selectOneMenu tag from the http://java.sun.com/jsf/html library.
Maybe we should ask the MyFaces team whether they could change this naming...
Thanks a lot for you help.

Richard

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962390#3962390

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962390
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread sbryzak2
What does /peanutcafe/seam/remoting/interface.js?myManager produce for the 
SelectItem class?  Looking at the MyFaces implementation of SelectItem, it 
seems that they are using a non-standard naming convention for their javabean 
fields... ie. _value instead of just value.  This might be what's messing up 
the stubs for this class.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962381#3962381

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962381
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread rlhr
This is the javax.faces.model.SelectItem class that also implements 
java.io.Serializable


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962373#3962373

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962373
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread sbryzak2
Your javascript looks ok.  Is SelectItem an interface?  If it is, then there 
are still some outstanding issues with how remoting deals with interfaces.  

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962369#3962369

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962369
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread rlhr
So I have the following javascript:

/* IE */
  | /* IE */
  | 
  | 
  | function getList(id){
  |   var myManager = Seam.Component.getInstance("myManager");
  |   var fctCallback = function(myList) {
  | for (var idx = 0; idx < myList.length; idx++) {
  |   for(var field in myList[idx]) {
  | alert(field + " : " + myList[idx][field]);
  | }
  |  }
  |   myManager.getMyList(id, fctCallback );
  | }
  | 
  | 

The list has been populated with the right number of object, but the javascript 
objects don't seems to be instantiated properly.

Did I miss anything?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962367#3962367

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962367
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @WebRemote: problem with client site instantiation of ob

2006-08-02 Thread sbryzak2
What Javascript do you have on the client?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962365#3962365

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962365
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user