You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Musachy Barroso <mu...@gmail.com> on 2007/06/12 15:17:03 UTC

Re: S2: How to update two separate divs using one action call?

If you switch the order do they work? Not that it is mandatory but adding a
semicolon at the end looks better :). You could also make them listen to a
common topic an publish that one to make them refresh, in any case it should
work they way you have it.

musachy

On 6/12/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> I have some code like this that is not working:
>
> dojo.event.topic.subscribe("/refreshTopic",
> function(data, type, e)
> {
>    if ('load' == type)
>    {
>
> dojo.event.topic.publish("/refreshCableHeadends")
>       dojo.event.topic.publish("/refreshTDGrid")
>
>       return;
>    }
> }
>
> Only the first div (from refreshCableHeadends) is
> being refreshed, other one is being ignored.
>
> Any ideas or suggestions?  I tried chaining them
> together, that did not work either.
>
> Thanks,
>
> Scott
>
>
>
>
>
> ____________________________________________________________________________________
> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
> news, photos & more.
> http://mobile.yahoo.com/go?refer=1GNXIC
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: S2: datetimepicker and multiple date formats

Posted by Musachy Barroso <mu...@gmail.com>.
Nope. I'm not so sure that's a good idea as you wouldn't have any way to
parse that date on the server (without knowing the right format).

Warning! bad advise ahead: You can always do something crazy like:

dojo.widget.byId("dp").setValue = function(dateObj) {
};

and then do your thing there, or extend StrusDatePicker widget, which I
would strongly advise not to :)

musachy

On 6/12/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
>
> I have this code:
>
> <s:datetimepicker id="selectedDate"
>                   name="selectedDate"
>                   displayWeeks="5"
>                   displayFormat= "MM-dd-yyyy"
>
>
>
> value="%{userDetailsBean.selectDateString}"/>
>
> It works fine if the user uses the drop-down or types
> in a date in just the right format.  However, we would
> like the following to work better:
>
> user input   actual value                 desired
> value
> ----------   ------------
> -------------
> 06-12-07     NaN-NaN-0NaN                 06-12-2007
> 06/13/2007   06-12-2007  (refused change) 06-13-2007
> 06 13 2007   06-12-2007  (refused change) 06-13-2007
> etc.
>
> Basically, I would like to allow multiple date formats
> in order to make life easier for my users.
>
> Can I intercept the user input somehow before it goes
> to the validation and fix it up?
>
> Thanks,
>
> Scott
>
>
>
>
>
> ____________________________________________________________________________________
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: S2: datetimepicker and multiple date formats

Posted by Nicolás Pace <ni...@gmail.com>.
On 6/12/07, Scott Nesbitt <sc...@yahoo.com> wrote:
>
> I have this code:
>
> <s:datetimepicker id="selectedDate"
>                   name="selectedDate"
>                   displayWeeks="5"
>                   displayFormat= "MM-dd-yyyy"
>
>
>
> value="%{userDetailsBean.selectDateString}"/>
>
> It works fine if the user uses the drop-down or types
> in a date in just the right format.  However, we would
> like the following to work better:
>
> user input   actual value                 desired
> value
> ----------   ------------
> -------------
> 06-12-07     NaN-NaN-0NaN                 06-12-2007
> 06/13/2007   06-12-2007  (refused change) 06-13-2007
> 06 13 2007   06-12-2007  (refused change) 06-13-2007
> etc.
>
> Basically, I would like to allow multiple date formats
> in order to make life easier for my users.
>
> Can I intercept the user input somehow before it goes
> to the validation and fix it up?
>

Scott,
Struts 2 automatically uses de correct locale information based in the
host's information.
You don't have to worry about it, unless you wan't to force it.
The best thing to do is to hope that users will configure correctly
their desktops so Struts can use that information correctly.
I hope this could help you
Bye

nicolás Pace
> Thanks,
>
> Scott
>
>
>
>
> ____________________________________________________________________________________
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: How to update two separate divs using one action call?

Posted by Dave Newton <ne...@yahoo.com>.
--- Scott Nesbitt <sc...@yahoo.com> wrote:
> No, switching the order does not help.

Anything with debug turned on? Can we see your
topic-subscription snippets?

d.

> --- Musachy Barroso <mu...@gmail.com> wrote:
> 
> > If you switch the order do they work? Not that it
> is
> > mandatory but adding a
> > semicolon at the end looks better :). You could
> also
> > make them listen to a
> > common topic an publish that one to make them
> > refresh, in any case it should
> > work they way you have it.
> > 
> > musachy
> > 
> > On 6/12/07, Scott Nesbitt <sc...@yahoo.com>
> > wrote:
> > >
> > >
> > > I have some code like this that is not working:
> > >
> > > dojo.event.topic.subscribe("/refreshTopic",
> > > function(data, type, e)
> > > {
> > >    if ('load' == type)
> > >    {
> > >
> > >
> dojo.event.topic.publish("/refreshCableHeadends")
> > >       dojo.event.topic.publish("/refreshTDGrid")
> > >
> > >       return;
> > >    }
> > > }
> > >
> > > Only the first div (from refreshCableHeadends)
> is
> > > being refreshed, other one is being ignored.
> > >
> > > Any ideas or suggestions?  I tried chaining them
> > > together, that did not work either.
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > Take the Internet to Go: Yahoo!Go puts the
> > Internet in your pocket: mail,
> > > news, photos & more.
> > > http://mobile.yahoo.com/go?refer=1GNXIC
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> > 
> > 
> > -- 
> > "Hey you! Would you help me to carry the stone?"
> > Pink Floyd
> > 
> 
> 
> 
>      
>
___________________________________________________________________________________
> You snooze, you lose. Get messages ASAP with
> AutoCheck
> in the all-new Yahoo! Mail Beta.
>
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: How to update two separate divs using one action call?

Posted by Scott Nesbitt <sc...@yahoo.com>.
No, switching the order does not help.

I found a work-around for this, but it involves
another trip to the server so is not ideal.  Oh well,
thanks anyway.

Scott

--- Musachy Barroso <mu...@gmail.com> wrote:

> If you switch the order do they work? Not that it is
> mandatory but adding a
> semicolon at the end looks better :). You could also
> make them listen to a
> common topic an publish that one to make them
> refresh, in any case it should
> work they way you have it.
> 
> musachy
> 
> On 6/12/07, Scott Nesbitt <sc...@yahoo.com>
> wrote:
> >
> >
> > I have some code like this that is not working:
> >
> > dojo.event.topic.subscribe("/refreshTopic",
> > function(data, type, e)
> > {
> >    if ('load' == type)
> >    {
> >
> > dojo.event.topic.publish("/refreshCableHeadends")
> >       dojo.event.topic.publish("/refreshTDGrid")
> >
> >       return;
> >    }
> > }
> >
> > Only the first div (from refreshCableHeadends) is
> > being refreshed, other one is being ignored.
> >
> > Any ideas or suggestions?  I tried chaining them
> > together, that did not work either.
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Take the Internet to Go: Yahoo!Go puts the
> Internet in your pocket: mail,
> > news, photos & more.
> > http://mobile.yahoo.com/go?refer=1GNXIC
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?"
> Pink Floyd
> 



      ___________________________________________________________________________________
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


S2: datetimepicker and multiple date formats

Posted by Scott Nesbitt <sc...@yahoo.com>.
I have this code:

<s:datetimepicker id="selectedDate" 
                  name="selectedDate" 
                  displayWeeks="5" 
                  displayFormat= "MM-dd-yyyy"         
                                                      
                      
                 
value="%{userDetailsBean.selectDateString}"/>

It works fine if the user uses the drop-down or types
in a date in just the right format.  However, we would
like the following to work better:

user input   actual value                 desired
value
----------   ------------                
-------------
06-12-07     NaN-NaN-0NaN                 06-12-2007
06/13/2007   06-12-2007  (refused change) 06-13-2007
06 13 2007   06-12-2007  (refused change) 06-13-2007
etc.

Basically, I would like to allow multiple date formats
in order to make life easier for my users.  

Can I intercept the user input somehow before it goes
to the validation and fix it up?

Thanks,

Scott



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org