[JBoss Seam] - Problem in Booking Ex. from Seam 1.0.1 GA causes misbehaviou
by widura
Hello,
I am getting in touch with Seam intensively for days now and I'm already seriously addicted to this, I think, outstanding framework. But during experimenting I ran over a misbehaviour I cannot explain. The booking example shipped with Seam 1.0.1 GA doesn't correctly display the "Current Hotel Bookings" after a successful new booking. You need to login again to see the "Current Hotel Bookings" or book another hotel. But in latter case the recent booking isn't displayed either.
So I played around a bit by calling the factory method "getBookings()" in BookingListAction explicitly after "booking confirmation" (see the code block) but no change.
@In
| HotelBooking bookingList;
|
| ...
|
| @End
| public String confirm(User user)
| {
| if (booking==null || hotel==null) return "main";
| em.persist(booking);
| facesMessages.add("Thank you, #{user.name}, your confimation number for #{hotel.name} is #{booking.id}");
| log.info("New booking: #{booking.id} for #{user.username}");
| bookingList.getBookings();
| events.raiseEvent("bookingConfirmed");
| return "confirmed";
| }
Fortunatly I've recognized that the Online Example on the Seam website does function properly. So I downloaded the latest nightly build (23.09.2006). But it seems like new taglib syntax is introduced since the last stable release. Ex.:
<s:link value="View Hotel" action="#{hotelBooking.selectHotel(hotelSearch.selectedHotel)}"/>
Even though it is not possible to run the example with the bundled Seam Jars shipped within this nightly build because of syntactical errors caused i.e by above code block. So could someone please tell me, where the problem is/was and on which nightly build the working example on the Seam website is based on.
Thanks in advance,
Widura
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974279#3974279
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974279
19 years, 7 months
[Javassist user questions] - 3.1: Use of .class causes VerifyError
by hlship
Whenever I try to use the .class construct inside a Javassist method body, I get a VerifyError.
The text below is from my class transformer; it represents the additions and changes made to a particular class as it is loaded.
| [DEBUG] RenderableUser Finished class transformation: InternalClassTransformation[
| public org.apache.tapestry.integration.app1.components.RenderableUser extends java.lang.Object
| implements org.apache.tapestry.runtime.ComponentLifecycle
|
| add field: protected org.apache.tapestry.internal.InternalComponentResources _$resources;
|
| extend method: public org.apache.tapestry.ComponentResources getComponentResources()
| return _$resources;
|
| add field: protected org.apache.tapestry.services.Environment _$environment;
|
| add method: private org.apache.tapestry.Renderable _$environment_read_renderable()
| return ($r) _$environment.peek(org.apache.tapestry.Renderable.class);
|
| replace read _renderable: _$environment_read_renderable();
|
| add method: private void _write__renderable(org.apache.tapestry.Renderable $1)
| throw new java.lang.RuntimeException("Field org.apache.tapestry.integration.app1.components.RenderableUser._renderable is read-only.");
|
| replace write _renderable: _write__renderable();
|
| extend method: public void beginRender(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.LifecycleEvent $2)
| {
| if ($2.isAborted()) return;
| render($1);
| }
|
|
| convert default constructor: initializer();
|
| add constructor: org.apache.tapestry.integration.app1.components.RenderableUser(org.apache.tapestry.internal.InternalComponentResources $1, org.apache.tapestry.services.Environment $2)
| {
| _$resources = $1;
| _$environment = $2;
| initializer();
|
| }
|
| ]
|
Results in:
| java.lang.VerifyError: (class: org/apache/tapestry/integration/app1/components/RenderableUser, method: _$environment_read_renderable signature: ()Lorg/apache/tapestry/Renderable;) Inconsistent args_size for opc_invokeinterface
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
| at java.lang.Class.getConstructors(Class.java:1446)
| at org.apache.tapestry.internal.services.ReflectiveInstantiator.findConstructor(ReflectiveInstantiator.java:60)
| at org.apache.tapestry.internal.services.ReflectiveInstantiator.<init>(ReflectiveInstantiator.java:48)
| at org.apache.tapestry.internal.services.InternalClassTransformationImpl.createInstantiator(InternalClassTransformationImpl.java:1043)
|
Has anyone else had any luck using .class?
I think, in my situation, I'll be able to work around this using the $type production.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974278#3974278
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974278
19 years, 7 months