Sheet apply specific converter on sheetcolumn

Community Driven Extensions Project
Post Reply
bug007
Posts: 39
Joined: 07 Oct 2015, 12:08

26 Jul 2018, 19:04

Hi,
Version 6.2.7
I have this issue : https://stackoverflow.com/questions/712 ... ect=1&lq=1
on a pe:sheetcolumn

Code: Select all

<pe:sheetcolumn headerText="dateTimeStart" value="#{mybean.dateTimeStart}" converter="extendedDateTimeConverter" colWidth="70" timeFormat="HH:mm:ss" colType="time" >
                                <f:attribute name="pattern" value="HH:mm:ss" />
                                <f:attribute name="timeZone" value="#{mybean.timeZone}" />
                            </pe:sheetcolumn> 
                            
I would like to implement the solution, I try different mode, but f:attribute aren't send to the converter (java.lang.NullPointerException).
Someone have a solution ?

I can't accept a text solution if is it possible to apply a mask like pattern="[0-2][0-3]:[0-5][0-9]:[0-5][0-9]" to validate the user input !

Thanks per advance for your help

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

26 Jul 2018, 19:59

what about using the OmniFaces converter listed in the solution?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

bug007
Posts: 39
Joined: 07 Oct 2015, 12:08

26 Jul 2018, 20:48

I never use, I wouldnt stack a lot of components in my project ... I will try and feed back

bug007
Posts: 39
Joined: 07 Oct 2015, 12:08

26 Jul 2018, 21:56

@ Melloware, It's a little bit complex. Finaly I arrived to use omnifaces version 2.6.9.

The 'pattern' and 'timezone' properties aren't define in the component converter in the editor, but they work !
Be carreful, timezone property is a TimeZone class not a String, make a new getter for that !
Now it's seem to work, but I need to make more test (of course)

For helping somebody who want to do something similar :
- You send to the form a Date (today for exemple 2018/07/26 21:47:02) on the pe:sheetcolumn with the o:converter
- You see 21:47:02 on the sheet => OK
- Update the cell whit 21:50:00
- on the cellChangeEvent use on this time cell, your received on sheetUpdate.getOldValue() property the previous date but on the getNewValue() : 1970/01/01 21:50:00 !!! Be carreful : Date is lost, only time is ready

Hope this can help.

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest