Sorry Thats the typo at my end but in my code there is no such blank. Charles TJ wrote: > > > Hi Shuchi, > > I saw there is a blank space at your - request-map when it was 'invoke' to > your Event. > > see below > <event type="java"path="org.ofbiz.learning.learning.LearningEvents" > invoke="CheckAccess "/> > > "CheckAccess_" (_ a blank space) > > I think it is the problem you're facing. Check it out. > > - Charles TJ > > ================== > > > -----Original Message----- > From: su2 [mailto:[email protected]] > Sent: 19 Agustus 2009 23:13 > To: [email protected] > Subject: blank screen while calling event > > > > Hello All, > > I am trying to create a screen "CheckAccess" with the event. But, when I > fire the request I get blank screen. and if I remove <event> from the > controller.xml screen,it works. I have jar class-path in > ofbiz-component.xml > > My event is > > ---------------------------------------------------------------------------- > -------------------------- > public static String CheckAccess(HttpServletRequest > request,HttpServletResponse response){ > Security security = > (Security)request.getAttribute("security"); > String key = "_EVENT_MESSAGE_"; > if (security.hasPermission("LEARN_VIEW", > request.getSession())) > { > request.setAttribute(key, "You have access!"); > } > else { > request.setAttribute(key, "You DO NOT have access! You are > denied!"); > } > return "success"; > } > > ---------------------------------------------------------------------------- > -------------------------- > > Controller.xml > ---------------------------------------------------------------------------- > -------------------------- > <request-map uri="CheckAccess"> > <security auth="true"/> > <event type="java" > path="org.ofbiz.learning.learning.LearningEvents" invoke="CheckAccess "/> > <response name="success" type="view" value="CheckAccess"/> > </request-map> > > <view-map name="CheckAccess" type="screen" > page="component://learning/widget/learning/LearningScreens.xml#CheckAccess"/ >> > > ---------------------------------------------------------------------------- > -------------------------- > > Screen is > ---------------------------------------------------------------------------- > -------------------------- > <screen name="CheckAccess"> > <section> > <widgets> > <decorator-screen name="main-decorator" > location="${parameters.mainDecoratorLocation}"> > <decorator-section name="title"> > <label text="Checking Access via Event > BeanShell"/> > </decorator-section> > <decorator-section name="body"> > <label text="This is the good screen."/> <!-- text > for testing without event in controller.xml--> > <label text="${eventMessageList[0]}"/> > </decorator-section> > </decorator-screen> > </widgets> > </section> > </screen> > ---------------------------------------------------------------------------- > -------------------------- > > I would really appreciate the help. > > Thank you in advance. > -- > View this message in context: > http://www.nabble.com/blank-screen-while-calling-event-tp25047243p25047243.h > tml > Sent from the OFBiz - User mailing list archive at Nabble.com. > > >
-- View this message in context: http://www.nabble.com/blank-screen-while-calling-event-tp25047243p25047845.html Sent from the OFBiz - User mailing list archive at Nabble.com.
