
|
Problem refreshing Calendar component using fireAjaxTransation
Below is a code snippet on how I am trying to update my components asynchroneously using fireAjaxTransaction:
DynaFaces.fireAjaxTransaction(this, { execute: 'IdOfComponentToSubmit', render:'IdOfComponentToRender'});
When IdOfComponentToRender is that of a textfield, table, button etc... there is no problem and everything works correctly .
But When IfOfComponentToRender is that of a calendar, although the refresh takes place correctly, whenever I attempt to pick another day from the calendar, I get a javascript error saying: this.domNode is null.
I followed the javascript code for the calendar component, and this could be taking place in the calendarField.js file at:
webui.suntheme.widget.calendarField.dayClicked=function(_1){
if(_1.date!=null&&_1.id==this.calendar.id){
this.domNode.setProps({value:_1.date});
}
Is there something I'm doing wrong, or is this a bug in the Calendar component?
Thanks.
Rasha
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Hi Rasha,
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?
Also, are you giving the id of the calendarfield widget or the calendar
widget?
The code you are referring to :
webui.@ THEME@... = function(props) {
// Check whether the calendar associated with this particular
calendarField
// broadcasted the event.
if (props.date != null && props.id == this.calendar.id) {
// Set the selected date on the field.
this.domNode.setProps({value: props.date});
}
return false;
}
this.domNode refers to the calendarField widget's dom element.
Try appending the "?debug" parameter to your url
This will help you get a more meaningful error.
You can also try using firebug to get more information.
-venky
Rasha wrote:
> Below is a code snippet on how I am trying to update my components
> asynchroneously using fireAjaxTransaction:
>
>
> DynaFaces.fireAjaxTransaction(this, { execute: 'IdOfComponentToSubmit',
> render:'IdOfComponentToRender'});
>
> When IdOfComponentToRender is that of a textfield, table, button etc...
> there is no problem and everything works correctly .
> But When IfOfComponentToRender is that of a calendar, although the refresh
> takes place correctly, whenever I attempt to pick another day from the
> calendar, I get a javascript error saying: this.domNode is null.
> I followed the javascript code for the calendar component, and this could be
> taking place in the calendarField.js file at:
> webui.suntheme.widget.calendarField.dayClicked=function(_1){
> if(_1.date!=null&&_1.id==this.calendar.id){
> this.domNode.setProps({value:_1.date});
> }
>
> Is there something I'm doing wrong, or is this a bug in the Calendar
> component?
> Thanks.
> Rasha
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Hello Venkatesh,
"
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?"
Well here is my initial requirement:
I have a field called ID where the user inserts the ID of the object he is trying to retrieve.
When the user leaves the textfield (onChange) I want to submit the value of the ID asynchroneously to the server. AFTER the ID being submitted and the object being fetched on the server side, I want to asynchroneously update MULTIPLE components on the page at the SAME time.
The thing is, the current implementations on submit and refresh do not allow me to achieve this behavior.
In fact, myNode.submit(field1, field2) will submit field1 and field2 while submitting myNode; and myNode.refresh('field1 , field12') will submit field1 and field2 while refreshing myNode.
There does not seem to be a way to refresh field1 and field2while submitting myNode.
Moreover if I do: myNode.submit(); field1.refresh(); field2.refresh() : this does not garantee that field1 and field2 will wait till myNode has been submitted before attempting a refresh ...
This is why I dropped using refresh and submit provided by woodstock components and opted for fireAjaxTransaction wich allow me to specify which components to submit and which ones to refresh in a single call.
"Also, are you giving the id of the calendarfield widget or the calendar
widget?"
No I am actually sending the id of the whole calendar.
Thanks a lot!
Rasha
Venkatesh Babu-5 wrote:
Hi Rasha,
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?
Also, are you giving the id of the calendarfield widget or the calendar
widget?
The code you are referring to :
webui.@THEME@.widget.calendarField.prototype.dayClicked = function(props) {
// Check whether the calendar associated with this particular
calendarField
// broadcasted the event.
if (props.date != null && props.id == this.calendar.id) {
// Set the selected date on the field.
this.domNode.setProps({value: props.date});
}
return false;
}
this.domNode refers to the calendarField widget's dom element.
Try appending the "?debug" parameter to your url
This will help you get a more meaningful error.
You can also try using firebug to get more information.
-venky
Rasha wrote:
> Below is a code snippet on how I am trying to update my components
> asynchroneously using fireAjaxTransaction:
>
>
> DynaFaces.fireAjaxTransaction(this, { execute: 'IdOfComponentToSubmit',
> render:'IdOfComponentToRender'});
>
> When IdOfComponentToRender is that of a textfield, table, button etc...
> there is no problem and everything works correctly .
> But When IfOfComponentToRender is that of a calendar, although the refresh
> takes place correctly, whenever I attempt to pick another day from the
> calendar, I get a javascript error saying: this.domNode is null.
> I followed the javascript code for the calendar component, and this could be
> taking place in the calendarField.js file at:
> webui.suntheme.widget.calendarField.dayClicked=function(_1){
> if(_1.date!=null&&_1.id==this.calendar.id){
> this.domNode.setProps({value:_1.date});
> }
>
> Is there something I'm doing wrong, or is this a bug in the Calendar
> component?
> Thanks.
> Rasha
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@woodstock.dev.java.net
For additional commands, e-mail: users-help@woodstock.dev.java.net
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Also note, that all woodstock components refresh correclty when I use fireAjaxTransaction.
My only problem happens with the Calendar component.
Thanks.
Hello Venkatesh,
"
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?"
Well here is my initial requirement:
I have a field called ID where the user inserts the ID of the object he is trying to retrieve.
When the user leaves the textfield (onChange) I want to submit the value of the ID asynchroneously to the server. AFTER the ID being submitted and the object being fetched on the server side, I want to asynchroneously update MULTIPLE components on the page at the SAME time.
The thing is, the current implementations on submit and refresh do not allow me to achieve this behavior.
In fact, myNode.submit(field1, field2) will submit field1 and field2 while submitting myNode; and myNode.refresh('field1 , field12') will submit field1 and field2 while refreshing myNode.
There does not seem to be a way to refresh field1 and field2while submitting myNode.
Moreover if I do: myNode.submit(); field1.refresh(); field2.refresh() : this does not garantee that field1 and field2 will wait till myNode has been submitted before attempting a refresh ...
This is why I dropped using refresh and submit provided by woodstock components and opted for fireAjaxTransaction wich allow me to specify which components to submit and which ones to refresh in a single call.
"Also, are you giving the id of the calendarfield widget or the calendar
widget?"
No I am actually sending the id of the whole calendar.
Thanks a lot!
Rasha
Venkatesh Babu-5 wrote:
Hi Rasha,
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?
Also, are you giving the id of the calendarfield widget or the calendar
widget?
The code you are referring to :
webui.@THEME@.widget.calendarField.prototype.dayClicked = function(props) {
// Check whether the calendar associated with this particular
calendarField
// broadcasted the event.
if (props.date != null && props.id == this.calendar.id) {
// Set the selected date on the field.
this.domNode.setProps({value: props.date});
}
return false;
}
this.domNode refers to the calendarField widget's dom element.
Try appending the "?debug" parameter to your url
This will help you get a more meaningful error.
You can also try using firebug to get more information.
-venky
Rasha wrote:
> Below is a code snippet on how I am trying to update my components
> asynchroneously using fireAjaxTransaction:
>
>
> DynaFaces.fireAjaxTransaction(this, { execute: 'IdOfComponentToSubmit',
> render:'IdOfComponentToRender'});
>
> When IdOfComponentToRender is that of a textfield, table, button etc...
> there is no problem and everything works correctly .
> But When IfOfComponentToRender is that of a calendar, although the refresh
> takes place correctly, whenever I attempt to pick another day from the
> calendar, I get a javascript error saying: this.domNode is null.
> I followed the javascript code for the calendar component, and this could be
> taking place in the calendarField.js file at:
> webui.suntheme.widget.calendarField.dayClicked=function(_1){
> if(_1.date!=null&&_1.id==this.calendar.id){
> this.domNode.setProps({value:_1.date});
> }
>
> Is there something I'm doing wrong, or is this a bug in the Calendar
> component?
> Thanks.
> Rasha
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@woodstock.dev.java.net
For additional commands, e-mail: users-help@woodstock.dev.java.net
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Rasha wrote:
Also note, that all woodstock components refresh correclty when I use
fireAjaxTransaction.
My only problem happens with the Calendar component.
Thanks.
Could you please try using the debug option so that you could gain more
information on what exactly the error is?
Maybe there is something in the calendar.js file thats causing the
problem?
Since the calendarField widget actually exists on the dom page and you
are updating a sub-widget of calendarField,
i dont understand why "this.domNode" for the calendarField widget
should be returned as null. The calendar widget
is not changing any properties on the calendarField widget.
More comments inlined..
Rasha wrote:
Hello Venkatesh,
"
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?"
Well here is my initial requirement:
I have a field called ID where the user inserts the ID of the object he is
trying to retrieve.
When the user leaves the textfield (onChange) I want to submit the value
of the ID asynchroneously to the server. AFTER the ID being submitted and
the object being fetched on the server side, I want to asynchroneously
update MULTIPLE components on the page at the SAME time.
The thing is, the current implementations on submit and refresh do not
allow me to achieve this behavior.
In fact, myNode.submit(field1, field2) will submit field1 and field2 while
submitting myNode; and myNode.refresh('field1 , field12') will submit
field1 and field2 while refreshing myNode.
There does not seem to be a way to refresh field1 and field2while
submitting myNode.
Moreover if I do: myNode.submit(); field1.refresh(); field2.refresh() :
this does not garantee that field1 and field2 will wait till myNode has
been submitted before attempting a refresh ...
You could try doing field1.refresh(myNode) and field2.refresh(myNode)
Though you risk submitting the data of myNode twice to the server.
Another way of accomplishing the same thing would be to subscribe to
the end event topic
of field1.refresh(myNode) by field2 and do a field2.refresh() when
field1's end event topic is broadcast.
But in the above use cases, i dont see you trying to update a calendar
anywhere?
-Venky
This is why I dropped using refresh and submit provided by woodstock
components and opted for fireAjaxTransaction wich allow me to specify
which components to submit and which ones to refresh in a single call.
"Also, are you giving the id of the calendarfield widget or the calendar
widget?"
No I am actually sending the id of the whole calendar.
Thanks a lot!
Rasha
Venkatesh Babu-5 wrote:
Hi Rasha,
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?
Also, are you giving the id of the calendarfield widget or the calendar
widget?
The code you are referring to :
webui.@... = function(props)
{
// Check whether the calendar associated with this particular
calendarField
// broadcasted the event.
if (props.date != null && props.id == this.calendar.id) {
// Set the selected date on the field.
this.domNode.setProps({value: props.date});
}
return false;
}
this.domNode refers to the calendarField widget's dom element.
Try appending the "?debug" parameter to your url
This will help you get a more meaningful error.
You can also try using firebug to get more information.
-venky
Rasha wrote:
Below is a code snippet on how I am trying to update my components
asynchroneously using fireAjaxTransaction:
DynaFaces.fireAjaxTransaction(this, { execute: 'IdOfComponentToSubmit',
render:'IdOfComponentToRender'});
When IdOfComponentToRender is that of a textfield, table, button etc...
there is no problem and everything works correctly .
But When IfOfComponentToRender is that of a calendar, although the
refresh
takes place correctly, whenever I attempt to pick another day from the
calendar, I get a javascript error saying: this.domNode is null.
I followed the javascript code for the calendar component, and this
could be
taking place in the calendarField.js file at:
webui.suntheme.widget.calendarField.dayClicked=function(_1){
if(_1.date!=null&&_1.id==this.calendar.id){
this.domNode.setProps({value:_1.date});
}
Is there something I'm doing wrong, or is this a bug in the Calendar
component?
Thanks.
Rasha
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
FYI, JSF Extensions provides an ajaxZone tag which you can use to
refresh multiple widgets at the same time. Visual Web Pack also
provides a similar tag, named ajaxTransaction, which may be easier to
use than calling DynaFaces.fireAjaxTransaction directly.
Dan
Rasha wrote:
Hello Venkatesh,
"
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?"
Well here is my initial requirement:
I have a field called ID where the user inserts the ID of the object he is
trying to retrieve.
When the user leaves the textfield (onChange) I want to submit the value of
the ID asynchroneously to the server. AFTER the ID being submitted and the
object being fetched on the server side, I want to asynchroneously update
MULTIPLE components on the page at the SAME time.
The thing is, the current implementations on submit and refresh do not allow
me to achieve this behavior.
In fact, myNode.submit(field1, field2) will submit field1 and field2 while
submitting myNode; and myNode.refresh('field1 , field12') will submit field1
and field2 while refreshing myNode.
There does not seem to be a way to refresh field1 and field2while submitting
myNode.
Moreover if I do: myNode.submit(); field1.refresh(); field2.refresh() : this
does not garantee that field1 and field2 will wait till myNode has been
submitted before attempting a refresh ...
This is why I dropped using refresh and submit provided by woodstock
components and opted for fireAjaxTransaction wich allow me to specify which
components to submit and which ones to refresh in a single call.
"Also, are you giving the id of the calendarfield widget or the calendar
widget?"
No I am actually sending the id of the whole calendar.
Thanks a lot!
Rasha
Venkatesh Babu-5 wrote:
Hi Rasha,
When are you trying to fire an ajax rransaction? what data are you
returning back in your ajax response?
Also, are you giving the id of the calendarfield widget or the calendar
widget?
The code you are referring to :
webui.@... = function(props)
{
// Check whether the calendar associated with this particular
calendarField
// broadcasted the event.
if (props.date != null && props.id == this.calendar.id) {
// Set the selected date on the field.
this.domNode.setProps({value: props.date});
}
return false;
}
this.domNode refers to the calendarField widget's dom element.
Try appending the "?debug" parameter to your url
This will help you get a more meaningful error.
You can also try using firebug to get more information.
-venky
Rasha wrote:
Below is a code snippet on how I am trying to update my components
asynchroneously using fireAjaxTransaction:
DynaFaces.fireAjaxTransaction(this, { execute: 'IdOfComponentToSubmit',
render:'IdOfComponentToRender'});
When IdOfComponentToRender is that of a textfield, table, button etc...
there is no problem and everything works correctly .
But When IfOfComponentToRender is that of a calendar, although the
refresh
takes place correctly, whenever I attempt to pick another day from the
calendar, I get a javascript error saying: this.domNode is null.
I followed the javascript code for the calendar component, and this could
be
taking place in the calendarField.js file at:
webui.suntheme.widget.calendarField.dayClicked=function(_1){
if(_1.date!=null&&_1.id==this.calendar.id){
this.domNode.setProps({value:_1.date});
}
Is there something I'm doing wrong, or is this a bug in the Calendar
component?
Thanks.
Rasha
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Dear Friends ,
I know lot of time passed after the last message. But , now I have the same problem in this topic.
Till now, it must have solved someway. I would appreciate If RASHA or someone else could give the solution to that problem.
Thanks
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Hi mohindermoo,
I am not sure if I can be of any help with this. I ended up not getting any feedback on this issue from anyone. Hackiing the code didn't help either :).
I have faced other major issues with Woodstock at the time, and since limited support was available from authors, it became really unusable and time wasting for me.
Sorry to be saying this on the woodstock forum, but the truth is I ended up switching to JBoss richfaces at the time. It’s a much mature product, it offers much more flexibility and it uses A4J which is also a mature ajax implementation. And there is some decent documentation outthere :) .
mohindermoo wrote:
Dear Friends ,
I know lot of time passed after the last message. But , now I have the same problem in this topic.
Till now, it must have solved someway. I would appreciate If RASHA or someone else could give the solution to that problem.
Thanks
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Hi mohindermoo,
I am not sure if I can be of any help with this. I ended up not getting any feedback on this issue from anyone. Hackiing the code didn't help either :).
I have faced other major issues with Woodstock at the time, and since limited support was available from authors, it became really unusable and time wasting for me.
Sorry to be saying this on the woodstock forum, but the truth is I ended up switching to JBoss richfaces at the time. It’s a much mature product, it offers much more flexibility and it uses A4J which is also a mature ajax implementation. And there is some decent documentation outthere :) .
mohindermoo wrote:
Dear Friends ,
I know lot of time passed after the last message. But , now I have the same problem in this topic.
Till now, it must have solved someway. I would appreciate If RASHA or someone else could give the solution to that problem.
Thanks
|

|
Re: Problem refreshing Calendar component using fireAjaxTransation
Same thing here. It would be very good if NetBeans supports RichFaces, so I wouldn't have to use Eclipse. 2009/2/26 Rasha <rasha.abdallah@...>
Hi mohindermoo,
I am not sure if I can be of any help with this. I ended up not getting any
feedback on this issue from anyone. Hackiing the code didn't help either :).
I have faced other major issues with Woodstock at the time, and since
limited support was available from authors, it became really unusable and
time wasting for me.
Sorry to be saying this on the woodstock forum, but the truth is I ended up
switching to JBoss richfaces at the time. It’s a much mature product, it
offers much more flexibility and it uses A4J which is also a mature ajax
implementation. And there is some decent documentation outthere :) .
mohindermoo wrote:
>
>
> Dear Friends ,
>
> I know lot of time passed after the last message. But , now I have the
> same problem in this topic.
> Till now, it must have solved someway. I would appreciate If RASHA or
> someone else could give the solution to that problem.
>
> Thanks
>
>
--
View this message in context: http://www.nabble.com/Problem-refreshing-Calendar-component-using-fireAjaxTransation-tp14216947p22226840.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
|