« Return to Thread: facelets valueExpression always as String?
Hi all,
actually I am facing the following problem: I have moved an existing JSF
project to facelets. Within the project there are "old" JSF custom tags
which I can use without problems in the new facelets environment as long as
all my expressions belong to be Strings.
As my custom components have attributes different to Strings I have not
found a solution to access them.
My custom tag:
<jb:eventplanner event="#{event}"/>
So there it is, my attribute event which ii a
net.jb.model.businessobjects.Event class. Again: my old Tags were working.
Now in my renderer class, I just access the valueexpression by
ValueExpression ve = component.getValueExpression("event");
If I just have a look to ve.getExpectedType() this returns String. Not good!
I just inspect the String in the debugger and, surprise, my whole Object is
there as a String. Not sure whether this is a serialized kind of my object
or something like this.
Event ( net.jb.model.businessobjects.Event@b3d2d92d | date =
java.util.GregorianCalendar[time=1247133600000,areFieldsSet=true,areAllField
sSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Berlin",of
fset=3600000,dstSavings=3600000,useDaylight=true,transitions=143,lastRule=ja
va.util.SimpleTimeZone[id=Europe/Berlin,offset=3600000,dstSavings=3600000,us
eDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWe
ek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDay
OfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirst
Week=4,ERA=1,YEAR=2009,MONTH=6,WEEK_OF_YEAR=28,WEEK_OF_MONTH=2,DAY_OF_MONTH=
9,DAY_OF_YEAR=190,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=0,HOUR_O
F_DAY=12,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=3600000,DST_OFFSET=3600
000] | hotelOptionFlag = true | id = 2 | identifier = DANCING |
mainEvent = null | showInOverviewFlag = true | )
So
ve.getValue(context.getELContext());
will give me always a String :-(
Can anyone explain me, how to access my "real" object. I have absolutely now
ideas left.
Thanks in advance
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
« Return to Thread: facelets valueExpression always as String?
| Free embeddable forum powered by Nabble | Forum Help |