[jira] Commented: (TRINIDAD-458) Allow users to control the starting date of date picker

2009-04-25 Thread Jacob Nordfalk (JIRA)

[ 
https://issues.apache.org/jira/browse/TRINIDAD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12702731#action_12702731
 ] 

Jacob Nordfalk commented on TRINIDAD-458:
-

(I've also sent this to dev@myfaces.apache.org but as far as I can tell no 
reactions came)

Now, excuse me for asking probably stupid questions (I'm just a user of your 
component library, and have never looked at how they work inside):

1) Does this mean that if I could somehow set the property _currTimeKey to the 
desired value, then I would have a workaround?

2) As I don't have the source code and the field _currTimeKey is not in my 
decompiled class stub of class 
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ChooseDateRenderer, 
could you please give me the value of that key?

3) I have no idea how to get access to the renders. I have access to the 
CoreChooseDate bean frm my code

  private CoreChooseDate bean_fromDate;

  public void setBean_fromDate(CoreChooseDate bean_fromDate) {
this.bean_fromDate = bean_fromDate;
if (bean_fromDate==null) return;
System.err.println(bean_fromDate.getAttributes());
System.err.println(bean_fromDate.getChildCount());
System.err.println(bean_fromDate.getChildren());
  }

  public CoreChooseDate getBean_fromDate() {
return bean_fromDate;
  }

Please tell me how to get access to the renderer of the bean so I can make a 
workaround this issue.


Thanks!

Jacob


 Allow users to control the starting date of date picker
 ---

 Key: TRINIDAD-458
 URL: https://issues.apache.org/jira/browse/TRINIDAD-458
 Project: MyFaces Trinidad
  Issue Type: Improvement
Reporter: Simon Lessard
Priority: Minor
 Attachments: trunk_patch90.patch


 Currently, date picker init itself to the current date (unless there's a 
 DateTimeRangeValidator preventing it). This can be useful, but also 
 problematic when the date to be selected is decently old, like a birthdate 
 for instance. A decent workaround would be to add an attribute on the 
 component to fix the initial selected date of the date picker.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Fwd: [Trinidad] How to control tr:chooseDate/'s starting date?

2009-04-22 Thread Jacob Nordfalk
Hi, I wonder if the list has recieved this?
Am I posting on the rignt list?

(I haven't recieved any reaction)

Jacob

-- Forwarded message --
From: Jacob Nordfalk jacob.nordf...@gmail.com
Date: 2009/4/20
Subject: [Trinidad] How to control tr:chooseDate/'s starting date?
To: MyFaces Development dev@myfaces.apache.org


Dear Trinidad developers,

First, thanks for a great library.

I am using the following, probably very familiar, construct:

   tr:inputDate chooseId=fromDate label=From date:
value=#{userchoice.fromDate}
 f:convertDateTime timeZone=CET pattern=dd-MM-yy/
   /tr:inputDate
   tr:chooseDate id=fromDate /


It's a big annoyance for me that tr:chooseDate / can't be somehow made to
get the initial values of its associated tr:inputDate/.
tr:chooseDate always goes to the current date.

Could someone please advice me on fixing the above?
I'm not a Trinidad developer and the product is in production, so I am
looking for a Javascript workaround (rather than having to patch the
Trinidad code).

I have tried working around this issue with JavaScript

 tr:document 
onload=document.myForm.fromDateyear.selectedIndex=#{userchoice.fromDate.year-100};
document.myForm.fromDatemonth.selectedIndex=#{userchoice.fromDate.month}; 

but it doesent work too well, also not if I include
document.myForm.fromDateyear.onchange();
document.myForm.fromDatemonth.onchange();



Thanks
Jacob Nordfalk


More info:
 Currently, date picker init itself to the current date (unless there's a
DateTimeRangeValidator preventing it). This can be useful, but also
problematic when the date to be selected is decently old, like a birthdate
for instance. A decent workaround would be to add an attribute on the
component to fix the initial selected date of the date picker.
[
https://issues.apache.org/jira/browse/TRINIDAD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12700690#action_12700690]


-- 
Jacob Nordfalk
Venu al la plej granda kultura evento en esperantujo: Kultura
Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 - http://kef.saluton.dk
एस्पेरान्तो के हो?  http://www.esperanto.org.np/.



-- 
Jacob Nordfalk
Venu al la plej granda kultura evento en esperantujo: Kultura
Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 - http://kef.saluton.dk
एस्पेरान्तो के हो?  http://www.esperanto.org.np/.


Re: [Trinidad] How to control tr:chooseDate/'s starting date?

2009-04-22 Thread Jacob Nordfalk
Hi Matthias, and sorry for not seeing your answer:

Looking at the code of the renderer (ChooseDateRenderer)'s encodeAll(), I
 see that it looks for the current date, here:
 ...
 long currTimeMillis = 0;
 Object currTimeValue = bean.getProperty (_currTimeKey);
 if (currTimeValue != null)
   currTimeMillis = ((Date) currTimeValue).getTime();
 else
   currTimeMillis = System.currentTimeMillis();
 ...


Now, excuse me for asking probably stupid questions (I'm just a user of your
component library, and have never looked at how they work inside):

1) Does this mean that if I could somehow set the property _currTimeKey to
the desired value, then I would have a workaround?

2) As I don't have the source code and the field _currTimeKey is not in my
decompiled class stub of class
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ChooseDateRenderer,
could you please give me the value of that key?

3) I have no idea how to get access to the renders. I have access to the
CoreChooseDate bean frm my code

  private CoreChooseDate bean_fromDate;

  public void setBean_fromDate(CoreChooseDate bean_fromDate) {
this.bean_fromDate = bean_fromDate;
if (bean_fromDate==null) return;
System.err.println(bean_fromDate.getAttributes());
System.err.println(bean_fromDate.getChildCount());
System.err.println(bean_fromDate.getChildren());
  }

  public CoreChooseDate getBean_fromDate() {
return bean_fromDate;
  }

Please tell me how to get access to the renderer of the bean.


Thanks!

Jacob



2009/4/22 Matthias Wessendorf mat...@apache.org

 yes, see here:

 http://www.nabble.com/-Trinidad--How-to-control-%3Ctr:chooseDate-%3E%27s-starting-date--p23138122.html

 I replied to your original mail:
 http://www.mail-archive.com/dev@myfaces.apache.org/msg38317.html

 -Matthias

 On Wed, Apr 22, 2009 at 8:34 AM, Jacob Nordfalk
 jacob.nordf...@gmail.com wrote:
  Hi, I wonder if the list has recieved this?
  Am I posting on the rignt list?
 
  (I haven't recieved any reaction)
 
  Jacob
 
  -- Forwarded message --
  From: Jacob Nordfalk jacob.nordf...@gmail.com
  Date: 2009/4/20
  Subject: [Trinidad] How to control tr:chooseDate/'s starting date?
  To: MyFaces Development dev@myfaces.apache.org
 
 
  Dear Trinidad developers,
 
  First, thanks for a great library.
 
  I am using the following, probably very familiar, construct:
 
 tr:inputDate chooseId=fromDate label=From date:
  value=#{userchoice.fromDate}
   f:convertDateTime timeZone=CET pattern=dd-MM-yy/
 /tr:inputDate
 tr:chooseDate id=fromDate /
 
 
  It's a big annoyance for me that tr:chooseDate / can't be somehow made
 to
  get the initial values of its associated tr:inputDate/.
  tr:chooseDate always goes to the current date.
 
  Could someone please advice me on fixing the above?
  I'm not a Trinidad developer and the product is in production, so I am
  looking for a Javascript workaround (rather than having to patch the
  Trinidad code).
 
  I have tried working around this issue with JavaScript
 
   tr:document onload=document.myForm.
  fromDateyear.selectedIndex=#{userchoice.fromDate.year-100};
  document.myForm.fromDatemonth.selectedIndex=#{userchoice.fromDate.month};
 
 
  but it doesent work too well, also not if I include
  document.myForm.fromDateyear.onchange();
  document.myForm.fromDatemonth.onchange();
 
 
 
  Thanks
  Jacob Nordfalk
 
 
  More info:
   Currently, date picker init itself to the current date (unless there's
 a
  DateTimeRangeValidator preventing it). This can be useful, but also
  problematic when the date to be selected is decently old, like a
 birthdate
  for instance. A decent workaround would be to add an attribute on the
  component to fix the initial selected date of the date picker.
  [
 
 https://issues.apache.org/jira/browse/TRINIDAD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12700690#action_12700690
  ]
 
 
  --
  Jacob Nordfalk
  Venu al la plej granda kultura evento en esperantujo: Kultura
  Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 -
 http://kef.saluton.dk
  एस्पेरान्तो के हो?  http://www.esperanto.org.np/.
 
 
 
  --
  Jacob Nordfalk
  Venu al la plej granda kultura evento en esperantujo: Kultura
  Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 -
 http://kef.saluton.dk
  एस्पेरान्तो के हो?  http://www.esperanto.org.np/.
 



 --
 Matthias Wessendorf

 blog: http://matthiaswessendorf.wordpress.com/
 sessions: http://www.slideshare.net/mwessendorf
 twitter: http://twitter.com/mwessendorf




-- 
Jacob Nordfalk
Venu al la plej granda kultura evento en esperantujo: Kultura
Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 - http://kef.saluton.dk
एस्पेरान्तो के हो?  http://www.esperanto.org.np/.


[jira] Commented: (TRINIDAD-458) Allow users to control the starting date of date picker

2009-04-20 Thread Jacob Nordfalk (JIRA)

[ 
https://issues.apache.org/jira/browse/TRINIDAD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12700690#action_12700690
 ] 

Jacob Nordfalk commented on TRINIDAD-458:
-

It's a big annoyance that tr:chooseDate / can't be somehow made to get the 
initial values of ist associated tr:inputDate/.

tr:inputDate chooseId=fromDate label=From date: 
value=#{userchoice.fromDate} contentStyle=width: 80px immediate=true
  f:convertDateTime timeZone=CET pattern=dd-MM-yy/
/tr:inputDate
tr:chooseDate id=fromDate /

tr:chooseDate always goes to the current date.

I have tried working around this issue with JavaScript

  tr:document 
onload=document.show.fromDateyear.selectedIndex=#{userchoice.fromDate.year-100};
 document.show.fromDatemonth.selectedIndex=#{userchoice.fromDate.month}; 

but it doesent work too well, also not if I include 
document.show.fromDateyear.onchange(); document.show.fromDatemonth.onchange();

I know this is not the right place but I couldnt fin *any* information about 
how to get in contact with Trinidad developers.

Could someone please advice me, both on fixing the above, and how to get in 
contact with Trinidad developers.?

Thanks
Jacob Nordfalk

 Allow users to control the starting date of date picker
 ---

 Key: TRINIDAD-458
 URL: https://issues.apache.org/jira/browse/TRINIDAD-458
 Project: MyFaces Trinidad
  Issue Type: Improvement
Reporter: Simon Lessard
Priority: Minor
 Attachments: trunk_patch90.patch


 Currently, date picker init itself to the current date (unless there's a 
 DateTimeRangeValidator preventing it). This can be useful, but also 
 problematic when the date to be selected is decently old, like a birthdate 
 for instance. A decent workaround would be to add an attribute on the 
 component to fix the initial selected date of the date picker.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[Trinidad] How to get tr:chooseDate/ to take the starting date of is't tr:inputDate/ ?

2009-04-20 Thread Jacob Nordfalk
Dear Trinidad developers,

First, thanks for a great library.


I am using the following, probably very familiar, construct:

   tr:inputDate chooseId=fromDate label=From date:
value=#{userchoice.fromDate}
 f:convertDateTime timeZone=CET pattern=dd-MM-yy/
   /tr:inputDate
   tr:chooseDate id=fromDate /


It's a big annoyance for me that tr:chooseDate / can't be somehow made to
get the initial values of its associated tr:inputDate/.

tr:chooseDate always goes to the current date.

I have tried working around this issue with JavaScript

 tr:document 
onload=document.show.fromDateyear.selectedIndex=#{userchoice.fromDate.year-100};
document.show.fromDatemonth.selectedIndex=#{userchoice.fromDate.month}; 

but it doesent work too well, also not if I include
document.show.fromDateyear.onchange();
document.show.fromDatemonth.onchange();


Could someone please advice me on fixing the above?
As I'n not a Trinidad developer and the product is in production I am
looking for a Javascript workaround (rather than having to patch the
Trinidad code).

Thanks
Jacob Nordfalk


More info:
 Currently, date picker init itself to the current date (unless there's a
DateTimeRangeValidator preventing it). This can be useful, but also
problematic when the date to be selected is decently old, like a birthdate
for instance. A decent workaround would be to add an attribute on the
component to fix the initial selected date of the date picker.
[
https://issues.apache.org/jira/browse/TRINIDAD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12700690#action_12700690]



-- 
Jacob Nordfalk
Venu al la plej granda kultura evento en esperantujo: Kultura
Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 - http://kef.saluton.dk
एस्पेरान्तो के हो?  http://www.esperanto.org.np/.


[Trinidad] How to control tr:chooseDate/'s starting date?

2009-04-20 Thread Jacob Nordfalk
Dear Trinidad developers,

First, thanks for a great library.

I am using the following, probably very familiar, construct:

   tr:inputDate chooseId=fromDate label=From date:
value=#{userchoice.fromDate}
 f:convertDateTime timeZone=CET pattern=dd-MM-yy/
   /tr:inputDate
   tr:chooseDate id=fromDate /


It's a big annoyance for me that tr:chooseDate / can't be somehow made to
get the initial values of its associated tr:inputDate/.
tr:chooseDate always goes to the current date.

Could someone please advice me on fixing the above?
I'm not a Trinidad developer and the product is in production, so I am
looking for a Javascript workaround (rather than having to patch the
Trinidad code).

I have tried working around this issue with JavaScript

 tr:document 
onload=document.myForm.fromDateyear.selectedIndex=#{userchoice.fromDate.year-100};
document.myForm.fromDatemonth.selectedIndex=#{userchoice.fromDate.month}; 

but it doesent work too well, also not if I include
document.myForm.fromDateyear.onchange();
document.myForm.fromDatemonth.onchange();



Thanks
Jacob Nordfalk


More info:
 Currently, date picker init itself to the current date (unless there's a
DateTimeRangeValidator preventing it). This can be useful, but also
problematic when the date to be selected is decently old, like a birthdate
for instance. A decent workaround would be to add an attribute on the
component to fix the initial selected date of the date picker.
[
https://issues.apache.org/jira/browse/TRINIDAD-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12700690#action_12700690]


-- 
Jacob Nordfalk
Venu al la plej granda kultura evento en esperantujo: Kultura
Esperanto-Festivalo - la 7a ĝis la 12a de julio 2009 - http://kef.saluton.dk
एस्पेरान्तो के हो?  http://www.esperanto.org.np/.