You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Jose Luis Vázquez González (JIRA)" <ji...@apache.org> on 2011/06/15 17:53:47 UTC
[jira] [Created] (CLK-772) Form.copyTo() does NOT set java.sql.Time
nor java.sql.Timestamp
Form.copyTo() does NOT set java.sql.Time nor java.sql.Timestamp
---------------------------------------------------------------
Key: CLK-772
URL: https://issues.apache.org/jira/browse/CLK-772
Project: Click
Issue Type: Bug
Components: core
Affects Versions: 2.3.0
Reporter: Jose Luis Vázquez González
I you have a POJO with a Time or Timestamp:
class Pojo {
...
private Time t;
...
public void setT(Time t) {this.t=t;}
public Time getT() {return t;}
}
And you want Form click to copy request contents to it like this:
myform.copyTo(pojo); // pojo is a Pojo with Time t attribute
pojo.getT() will end up being null instead of the time that was sent on the request.
The problems seems to be on Ognls's ognl.setValue()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CLK-772) Form.copyTo() does NOT set java.sql.Time
nor java.sql.Timestamp
Posted by "Jose Luis Vázquez González (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jose Luis Vázquez González updated CLK-772:
-------------------------------------------
Priority: Minor (was: Major)
Description:
If you have a POJO with a Time or Timestamp:
class Pojo {
...
private Time t;
...
public void setT(Time t) {this.t=t;}
public Time getT() {return t;}
}
And you want Form click to copy request contents to it like this:
myform.copyTo(pojo); // pojo is a Pojo with Time t attribute
pojo.getT() will end up being null instead of the time that was sent on the request.
The problems seems to be on Ognls's ognl.setValue()
was:
I you have a POJO with a Time or Timestamp:
class Pojo {
...
private Time t;
...
public void setT(Time t) {this.t=t;}
public Time getT() {return t;}
}
And you want Form click to copy request contents to it like this:
myform.copyTo(pojo); // pojo is a Pojo with Time t attribute
pojo.getT() will end up being null instead of the time that was sent on the request.
The problems seems to be on Ognls's ognl.setValue()
Issue Type: Question (was: Bug)
The problems seems NOT to be on the Form's copyTo but on the Field type you used to hold the timestamps or times.
Using a HiddenField with the correct type will work, but DateFields will fail.
The solution is to create a TimeField or TimestampField that (either extends DateField or not) will change the bindRequestValue() to acquire the forms timestamp or time properly.
> Form.copyTo() does NOT set java.sql.Time nor java.sql.Timestamp
> ---------------------------------------------------------------
>
> Key: CLK-772
> URL: https://issues.apache.org/jira/browse/CLK-772
> Project: Click
> Issue Type: Question
> Components: core
> Affects Versions: 2.3.0
> Reporter: Jose Luis Vázquez González
> Priority: Minor
>
> If you have a POJO with a Time or Timestamp:
> class Pojo {
> ...
> private Time t;
> ...
> public void setT(Time t) {this.t=t;}
> public Time getT() {return t;}
> }
> And you want Form click to copy request contents to it like this:
> myform.copyTo(pojo); // pojo is a Pojo with Time t attribute
> pojo.getT() will end up being null instead of the time that was sent on the request.
> The problems seems to be on Ognls's ognl.setValue()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CLK-772) Form.copyTo() does NOT set java.sql.Time
nor java.sql.Timestamp
Posted by "Jose Luis Vázquez González (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jose Luis Vázquez González closed CLK-772.
------------------------------------------
Resolution: Later
It's not a bug, but maybe the DateField docs should mention Explicitly that this FIELD is not suitable to SET java.sql.Timestamps or java.sql.Time and probably provide implementations for those fields.
> Form.copyTo() does NOT set java.sql.Time nor java.sql.Timestamp
> ---------------------------------------------------------------
>
> Key: CLK-772
> URL: https://issues.apache.org/jira/browse/CLK-772
> Project: Click
> Issue Type: Question
> Components: core
> Affects Versions: 2.3.0
> Reporter: Jose Luis Vázquez González
> Priority: Minor
>
> If you have a POJO with a Time or Timestamp:
> class Pojo {
> ...
> private Time t;
> ...
> public void setT(Time t) {this.t=t;}
> public Time getT() {return t;}
> }
> And you want Form click to copy request contents to it like this:
> myform.copyTo(pojo); // pojo is a Pojo with Time t attribute
> pojo.getT() will end up being null instead of the time that was sent on the request.
> The problems seems to be on Ognls's ognl.setValue()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira