Using a custom Custom AuthorizatioProvider with security-constraints on webApp?

Hi,
we have adapted the security from the medrec-example to build our own
authorization-provider to fetch our users from an RDBMS. Mainly we want
to secure a web-application using <security-constraint>'s:
The MBean for the AUthorizationProvider gets properly deployed into
<wl-home>/server/lib/mbeantypes
and the log-messages show, that the user gets logged in and the groups
for the user are properly resolved. However, when we access a ressource
in a web-app that is secured using:
<security-constraint>
          <web-resource-collection>
               <web-resource-name>SecureCollection</web-resource-name>
               <description>
These pages are only accessible by members of the dvr.
</description>
               <url-pattern>/htdocs/secure/*</url-pattern>
               <http-method>DELETE</http-method>
               <http-method>GET</http-method>
               <http-method>POST</http-method>
               <http-method>PUT</http-method>
          </web-resource-collection>
          <auth-constraint>
               <description>These are the roles who have access</description>
               <role-name>securegroup</role-name>
          </auth-constraint>
          <user-data-constraint>
               <description>
This is how the user data must be transmitted
</description>
               <transport-guarantee>NONE</transport-guarantee>
          </user-data-constraint>
     </security-constraint>
access to the ressource is denied, although the user is in securegroup.
Is there something else we need?! From the docs I understood, that in
absence of a security-role-assignment in weblogic.xml, the server takes
the rolename as principal, so our weblogic.xml is empty right now....
Any ideas anybody?!
Cheers
stf

As there is obviously noone else to answer this, I had to figure this
out myself: The reason for this is the "REQUIRED"-Controlflag on the
Default-AuthorizationProvider. The docs for the medrec-example forgot to
say, that unless you have your users in both the Database and the
internal LDAP-Server the Default-AuthorizationProvider, you are not
granted access - changing the Flag to optional does the trick.
By the way: Same holds true for the Compatibility-Security you can use
to upgrade your old RDBMS-Realms from 6.1: Without the Control-Flag on
the Default-AuthorizationProvider you can search endlessly for the
reason you can't log in although your realm properly authenticates you....
Stefan Frank wrote:
Hi,
we have adapted the security from the medrec-example to build our own
authorization-provider to fetch our users from an RDBMS. Mainly we want
to secure a web-application using <security-constraint>'s:
The MBean for the AUthorizationProvider gets properly deployed into
<wl-home>/server/lib/mbeantypes
and the log-messages show, that the user gets logged in and the groups
for the user are properly resolved. However, when we access a ressource
in a web-app that is secured using:
<security-constraint>
<web-resource-collection>
<web-resource-name>SecureCollection</web-resource-name>
<description>
These pages are only accessible by members of the dvr.
</description>
<url-pattern>/htdocs/secure/*</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<description>These are the roles who have access</description>
<role-name>securegroup</role-name>
</auth-constraint>
<user-data-constraint>
<description>
This is how the user data must be transmitted
</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
access to the ressource is denied, although the user is in securegroup.
Is there something else we need?! From the docs I understood, that in
absence of a security-role-assignment in weblogic.xml, the server takes
the rolename as principal, so our weblogic.xml is empty right now....
Any ideas anybody?!
Cheers
stf

Similar Messages

  • Using a custom tag with a 2.3 servlet descriptor BUG?

    Hi,
    I just developed a Custom Tag and I'd like to use in my jsps.
    If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error:
    Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener' in content of 'web-app', expected elements '[context-param, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    It seems like when the jsp parser encounters the line with taglib it tries to parse the web.xml against a 2.2 version of the dtd. My web.xml begins with the correct dtd version (2.3). Can anyone tell me if this is a bug and eventually tell me how to solve it?
    thanks,
    Giovanni

    I repost this issue again, now with a simple test case.
    If I wrote a simple custom tag:
    import java.io.IOException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class MyCustomTag extends TagSupport {
    public int doStartTag() {
    try {
    pageContext.getOut().print("FOO");
    } catch (IOException ioe) {
    pageContext.getServletContext().log(ioe.getMessage(),ioe);
    return(SKIP_BODY);
    with the associated tld:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>try</shortname>
    <uri>try</uri>
    <info>A short description...</info>
    <tag>
    <name>mytag</name>
    <tagclass>MyCustomTag</tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and a jsp using the custom tag:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    The current time is:
    </H2>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    <%@ taglib uri="try.tld" prefix="try" %>
    <try:mytag />
    </P>
    </BODY>
    </HTML>
    all runs fine if I have a web.xml with the dtd version 2.2
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    but if I use the version 2.3 because I want filters,context listeners and so on:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <!-- Filter Redirector URL mapping -->
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector/</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    I get the error I report in my last post. (the jsp doesn't compile) If I remove the custom tag from my jsp all works fine (filters, listeners,etc). In my project settings I use the 2.3 version of servlet.jar instead of the ServletRuntime that comes with JDeveloper.
    Can anyone tell me how to resolve this issue (Using simple custom tag with a web application using the 2.3 servlet specs)?
    Thanks in advance,
    Giovanni
    If I remove the filter secion all

  • Can I use my custom board with LPC2378 processor with ULINK2 on Embedded module for ARM and LV.

    Issues in ARM and LV
    Can I use my custom board with LPC2378 processor with ULINK2 on Embedded module for ARM and LV.How can I create my elemental I/O vis or I have to use the existing Keil board vis. Confused. Please help.
    I have LV8.6. Which ver of embedded module for ARM should I buy. Website shows combined price for ARM module and LV. But I already have LV8.6 so what is the cost of module.
    Regards
    Shradha

              If the processor of your development board  is the cortex-M3 core, I think you do not have to buy keil board. Now, there are a lot of OS and emulator suitable for Cortex-M3.
              Operating system I am referring to  is the real time operating system such as keil RTX,uCOS,FreeRTOS,CooCox CoOS and so on. CooCox CoOS is very new, you can get more information from http://coocox.org/ .
              Emulator or debugging tools such as ULINK2,st-link,Jlink,CooCox Colink and so on. CooCox Colink is also very new.  You can download the Colink Plugin from here Colink Plugin . 

  • How access applications EJBs, with security constraints

    Hi,
    I'm using iAS 6.5 and this my problem:
    I've an EAR file deployed with EJBs that are protected by security constraints.
    An IIOP Client can do an authentication using the IUserPrincipal Class. This works!
    A web module in this application can do a user authentication using Form Authentication. This works!
    But how can this be done by another deployed Application (Ear), in the same or a remote iAS?
    Is there anywhere an example/doc about a App to App access via iiop, dealing with security constraints?
    Thanks for any help
    Regards

    Hi,
    I'm using iAS 6.5 and this my problem:
    I've an EAR file deployed with EJBs that are protected by security constraints.
    An IIOP Client can do an authentication using the IUserPrincipal Class. This works!
    A web module in this application can do a user authentication using Form Authentication. This works!
    But how can this be done by another deployed Application (Ear), in the same or a remote iAS?
    Is there anywhere an example/doc about a App to App access via iiop, dealing with security constraints?
    Thanks for any help
    Regards

  • How do I use a custom UserInfo with a T3Client?

    This is related to my previous post, 4655. The problem is I if
    use a custom implementation of the interface
    weblogic.security.acl.UserInfo in a T3Client constructor, the
    client fails to connect. If I use
    weblogic.security.acl.DefaultUserInfoImpl, the client connects
    and disconnects without any problems. How do I use a custom
    UserInfo implementation with a T3Client?

    In don't know about the Gmail part, but for the Hotmail, try this link.
    Here's another link from a different source.

  • How to use a custom css with a ditamap?

    I'm still trying to get to grips with some DITA Frame basics and another piece of info that I would like to have is how to get the ditamap to use a custom css when it is output to xhtml with the DITA OT. Is there any simple non-super-techie way to do this without having to learn how to hack the ANT programs?
    Under the StructureTools menu, there is an Import CSS styles item, but I can't find instructions on how to use it accessible to my level.
    Also, is there a way to apply a company stylesheet to the Responsive html output generated with the new Publish tool? I realize the two provided templates can be modified element by element, but it does mean a lot of modification, and it would be cool if we could just invoke the stylesheets that already govern our web site so that the output could match.
    Thanks to anyone who can help,
    Elisa Roselli
    Cambridge Imaging Systems

    Hi Elisa...
    The short answer is .. no.
    When you publish through the OT, you're just passing control off to an Ant target and the DITA-OT processing. You'd need to modify the files in the OT to use a modified CSS. Note that the "easy" way to do this is to just edit the CSS file directly in the OT file structure. The "proper" way to do it is to develop an OT plugin and set up a new Ant target that uses your styling instead of the default. You'd change the Ant target that FM uses so it calls yours (don't recall where this is but it can be done).
    One thing that may be useful to know is that when you set the value of the @outputclass attribute on an element in DITA, the corresponding tag in the generated HTML is assigned a @class attribute with that same value. This lets you set "styling" in DITA that is applied to the output. You still need to get your custom class definitions ino the CSS.
    The Import CSS item on the StructureTools menu has nothing to do with OT publishing (or anything that you'd likely be using).
    I'm not aware of a way to apply a stylesheet to the Publish tool .. I thnk you have to go through the process of mapping styles manually. I could be wrong, and if so, hopefully someone else will jump in to help.
    Cheers,
    …scott

  • Problem with security-constraint use

    Hola!
    I need help for my j2ee 1.4 application, about using security-constraint in web.xml file.
    This is my web.xml...at the bottom i'll expplain my problem:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
         <display-name>
         Prova14Web</display-name>
         <servlet>
              <display-name>
              action</display-name>
              <servlet-name>action</servlet-name>
              <servlet-class>
              org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/struts-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>jsp/index.jsp</welcome-file>
         </welcome-file-list>
         <jsp-config>
              <taglib>
                   <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
                   <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
              </taglib>
              <taglib>
                   <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
                   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
              </taglib>
    <taglib>
              <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
         </taglib>
         </jsp-config>
         <security-constraint>
              <display-name>
              vincolo1</display-name>
              <web-resource-collection>
                   <web-resource-name>Restricted</web-resource-name>
                   <url-pattern>/jsp/*</url-pattern>
                   <http-method>GET</http-method>
                   <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>operatore</role-name>
              </auth-constraint>
         </security-constraint>
         <login-config>
              <auth-method>FORM</auth-method>
    <form-login-config>
                   <form-login-page>/html/login.html</form-login-page>
                   <form-error-page>/html/error.html</form-error-page>
              </form-login-config>
         </login-config>
         <security-role>
              <role-name>operatore</role-name>
         </security-role>
    </web-app>
    The problem is the that when i connect to my application at http://localhost:9081/Prova14Web, the first page that appears is the welcome.jsp, when it should be appear the login page! The application bypass the login page...but I don't know why it happens!
    I'm using RAD6 and Websphere6 AS.
    Could you help me please??

    Hi ,
    do u know which BADI tiggers first ?
    first u need to export  from the first BADI
    like this
    *Exporting Results to ABAP Memory for Future Calc.
    IF GT_TQA[] IS NOT INITIAL.
    EXPORT LT_TQA FROM GT_TQA TO MEMORY ID 'TQA'.
    ENDIF.
    and import in another BADI
      IMPORT LT_TQA TO GT_TQA FROM MEMORY ID 'TQA'.
    regards
    Prabhu

  • Can you use a custom cursor with drag and drop?

    Hi there! I'm a newbie flash user and working on a simulation for a graduate course in instructional design. I'm using Flash Professional CC on Mac. Here's what I'm trying to do. I have several draggable sprites on the stage and three target sprites. I have specified the original x,y locations of the sprites and have set the end x,y locations as those of each of the three targets. Items must be dragged to one of the three targets.
    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite? I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    Thanks!
    I'm pasting my code from the actions panel below so you can see what's going on:
    stop();
    /* Custom Mouse Cursor
    Replaces the default mouse cursor with the specified symbol instance.
    stage.addChild(customcursor);
    customcursor.mouseEnabled = false;
    customcursor.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    function fl_CustomMouseCursor(event:Event)
      customcursor.x = stage.mouseX;
      customcursor.y = stage.mouseY;
    Mouse.hide();
    //To restore the default mouse pointer, uncomment the following lines:
    customcursor.removeEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    stage.removeChild(customcursor);
    Mouse.show();
    //set up variables and objects for dragging
    var offset:int = 10;
    var appleStartX:int = 243;
    var appleStartY:int = 156;
    var appleEndX:int = 522;
    var appleEndY:int = 22;
    apple.buttonMode = true;
    apple.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    apple.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var cupStartX:int = 39;
    var cupStartY:int = 266;
    var cupEndX:int = 520;
    var cupEndY:int = 175;
    cup.buttonMode = true;
    cup.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    cup.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var barStartX:int = 178;
    var barStartY:int = 234;
    var barEndX:int = 522;
    var barEndY:int = 22;
    bar.buttonMode = true;
    bar.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bar.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var orangeStartX:int = 284;
    var orangeStartY:int = 102;
    var orangeEndX:int = 522;
    var orangeEndY:int = 22;
    orange.buttonMode = true;
    orange.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    orange.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bottleStartX:int = 172;
    var bottleStartY:int = 303;
    var bottleEndX:int = 520;
    var bottleEndY:int = 175;
    bottle.buttonMode = true;
    bottle.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bottle.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bananaStartX:int = 113;
    var bananaStartY:int = 123;
    var bananaEndX:int = 522;
    var bananaEndY:int = 22;
    banana.buttonMode = true;
    banana.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    banana.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var napkinStartX:int = 248;
    var napkinStartY:int = 271;
    var napkinEndX:int = 520;
    var napkinEndY:int = 175;
    napkin.buttonMode = true;
    napkin.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    napkin.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var yogurtStartX:int = 27;
    var yogurtStartY:int = 136;
    var yogurtEndX:int = 518;
    var yogurtEndY:int = 329;
    yogurt.buttonMode = true;
    yogurt.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    yogurt.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var strawberryStartX:int = 120;
    var strawberryStartY:int = 285;
    var strawberryEndX:int = 522;
    var strawberryEndY:int = 22;
    strawberry.buttonMode = true;
    strawberry.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    strawberry.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var sandwichStartX:int = 7;
    var sandwichStartY:int = 364;
    var sandwichEndX:int = 522;
    var sandwichEndY:int = 22;
    sandwich.buttonMode = true;
    sandwich.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    sandwich.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var juiceStartX:int = 88;
    var juiceStartY:int = 347;
    var juiceEndX:int = 518;
    var juiceEndY:int = 329;
    juice.buttonMode = true;
    juice.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    juice.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var foilStartX:int = 39;
    var foilStartY:int = 416;
    var foilEndX:int = 520;
    var foilEndY:int = 175;
    foil.buttonMode = true;
    foil.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    foil.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var waxbagStartX:int = 235;
    var waxbagStartY:int = 342;
    var waxbagEndX:int = 522;
    var waxbagEndY:int = 22;
    waxbag.buttonMode = true;
    waxbag.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    waxbag.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    function startDragging (e:MouseEvent) {
      e.currentTarget.startDrag();
    function stopDragging (e:MouseEvent) {
      e.currentTarget.stopDrag();
      switch (e.currentTarget) {
      case apple:
      if (apple.x < appleEndX - offset || apple.x > appleEndX + offset || apple.y < appleEndY - offset || apple.y > appleEndY + offset) {
      apple.x = appleStartX;
      apple.y = appleStartY;
      else {
      apple.x = appleEndX;
      apple.y = appleEndY;
      //checkGame();
      break;
      case sandwich:
    if (sandwich.x < sandwichEndX - offset || sandwich.x > sandwichEndX + offset || sandwich.y < sandwichEndY - offset || sandwich.y > sandwichEndY + offset) {
      sandwich.x = sandwichStartX;
      sandwich.y = sandwichStartY;
      else {
      sandwich.x = sandwichEndX;
      sandwich.y = sandwichEndY;
      //checkGame();
      break;
      case orange:
    if (orange.x < orangeEndX - offset || orange.x > orangeEndX + offset || orange.y < orangeEndY - offset || orange.y > orangeEndY + offset) {
      orange.x = orangeStartX;
      orange.y = orangeStartY;
      else {
      orange.x = orangeEndX;
      orange.y = orangeEndY;
      //checkGame();
      break;
      case strawberry:
    if (strawberry.x < strawberryEndX - offset || strawberry.x > strawberryEndX + offset || strawberry.y < strawberryEndY - offset || strawberry.y > strawberryEndY + offset) {
      strawberry.x = strawberryStartX;
      strawberry.y = strawberryStartY;
      else {
      strawberry.x = strawberryEndX;
      strawberry.y = strawberryEndY;
      //checkGame();
      break;
      case napkin:
    if (napkin.x < napkinEndX - offset || napkin.x > napkinEndX + offset || napkin.y < napkinEndY - offset || napkin.y > napkinEndY + offset) {
      napkin.x = napkinStartX;
      napkin.y = napkinStartY;
      else {
      napkin.x = napkinEndX;
      napkin.y = napkinEndY;
      //checkGame();
      break;
      case bar:
    if (bar.x < barEndX - offset || bar.x > barEndX + offset || bar.y < barEndY - offset || bar.y > barEndY + offset) {
      bar.x = barStartX;
      bar.y = barStartY;
      else {
      bar.x = barEndX;
      bar.y = barEndY;
      //checkGame();
      break;
      case juice:
    if (juice.x < juiceEndX - offset || juice.x > juiceEndX + offset || juice.y < juiceEndY - offset || juice.y > juiceEndY + offset) {
      juice.x = juiceStartX;
      juice.y = juiceStartY;
      else {
      juice.x = juiceEndX;
      juice.y = juiceEndY;
      //checkGame();
      break;
      case foil:
    if (foil.x < foilEndX - offset || foil.x > foilEndX + offset || foil.y < foilEndY - offset || foil.y > foilEndY + offset) {
      foil.x = foilStartX;
      foil.y = foilStartY;
      else {
      foil.x = foilEndX;
      foil.y = foilEndY;
      //checkGame();
      break;
      case banana:
    if (banana.x < bananaEndX - offset || banana.x > bananaEndX + offset || banana.y < bananaEndY - offset || banana.y > bananaEndY + offset) {
      banana.x = bananaStartX;
      banana.y = bananaStartY;
      else {
      banana.x = bananaEndX;
      banana.y = bananaEndY;
      //checkGame();
      break;
      case bottle:
    if (bottle.x < bottleEndX - offset || bottle.x > bottleEndX + offset || bottle.y < bottleEndY - offset || bottle.y > bottleEndY + offset) {
      bottle.x = bottleStartX;
      bottle.y = bottleStartY;
      else {
      bottle.x = bottleEndX;
      bottle.y = bottleEndY;
      //checkGame();
      break;
      case waxbag:
    if (waxbag.x < waxbagEndX - offset || waxbag.x > waxbagEndX + offset || waxbag.y < waxbagEndY - offset || waxbag.y > waxbagEndY + offset) {
      waxbag.x = waxbagStartX;
      waxbag.y = waxbagStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();
      break;
      case cup:
    if (cup.x < cupEndX - offset || cup.x > cupEndX + offset || cup.y < cupEndY - offset || cup.y > cupEndY + offset) {
      cup.x = cupStartX;
      cup.y = cupStartY;
      else {
      cup.x = cupEndX;
      cup.y = cupEndY;
      //checkGame();
      break;
      case yogurt:
    if (yogurt.x < yogurtEndX - offset || yogurt.x > yogurtEndX + offset || yogurt.y < yogurtEndY - offset || yogurt.y > yogurtEndY + offset) {
      yogurt.x = yogurtStartX;
      yogurt.y = yogurtStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();

    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite?
    yes, use an if-else statement
    I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    assign your cursor's mouseEnabled property to false:
    yourcursor.mouseEnabled=false;
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    use the sound class to create a sound:
    // initialize your correct sound once with
    var correctSound:Sound=new CorrectSound();  // add an mp3 sound to your library and assign it class = CorrectSound
    // apply the play() method everytime you want your sound to play:
    correctSound.play();
    // change an object's opacity:
    someobject.alpha = .3;  // partially visible
    someobject.alpha = 1;  // fully visible
    someobject.visible=false;  // not visible, at all.
    // change an object's scale
    someobject.scaleX=someobject.scaleY=.5;  // shink width and height by 2
    someobject.scaleX=someobject.scaleY=1;  // resize to original
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    you could google: 
    actionscript 3 class coding
    actionscript 3 object oriented programming
    p.s.  you can simplify and streamline your coding by learning about arrays and using hitTestObject.

  • How can I use my custom thumbnails with lightbox widget?

    I have been trying to find the answer to this for a couple of days. I did see one thread about this, but it didn't really answer the question. I don't want my thumbnail images to be miniature versions of my hero image. I have created custom thumbnails to use instead. Is there a way to do this?

    I cannot begin to express my level of frustration. I have been trying to use the composition widget light box display for some time now. I drag the widget to my document. The default widget has three small trigger boxes and a large area made up of a forward and backward button, a background, a text box and a frame for your image.
    My steps have been …
    I click on the little trigger box.
    I click on the frame that holds the main image.
    I go to the fill menu and browse my computer for my image and then click OK.
    IT shows up on my screen. Yay
    I attempt to continue using the next two trigger boxes provided in the widget.
    After that, I add more by clicking on the little plus sign.
    This is where all heck breaks loose.
    Every single time I attempt to add thumbnails, something messes up. When I go to preview, either not all of my main images show up, or it starts with the wrong one, or some are missing. I have looked and looked for help on this and the only thing I can find is how easy it is to create a great portfolio lightbox display.  But as we know, that only works when your thumbnails are the same image as the images in your lightbox. If you want something different, you have to use the composition wizard. I am finding it extremely difficult and confusing to customize.
    Is there an exact sequence you need to use to add images to the slideshow? I am my wits end.

  • Has anyone successfully used new custom templates with bookings?

    I have been trying to use an alternate list template for bookings as a fallback for the standard list I have which is outputting json.
    I saw recently in the september release that custom templates are out (thank goodness).
    I have tried:
    {module_booking,a template="fallback_list.tpl"}
    {module, booking,a template="fallback_list.tpl"}
    This is from http://helpx.adobe.com/business-catalyst/partner/using-custom-templates-modules.html it looks wrong to me.
    Then I tried renaming it to html cause I read http://forums.adobe.com/docs/DOC-2573
    Then I tried relocating it, removing the underscore, adding commas, removing commas, single quotes and double quotes.
    But they all return No events found.
    {module_booking,a, }
    Returns the expected amount of bookings.
    Any thoughts?

    Hi,
    Thanks Mario.  http://npaqueensland.businesscatalyst.com/events
    The events done with backbone and JSON are working, above those there is a bar of filters (not yet hooked up properly), and directly above those filters is the part I am having an issue with.
    Thanks,
    Allan.

  • Using a Custom Converter with Dynamic Faces

    I have a custom converter. I want to use fine grained control with regard to Ajax. Below is an example of my jsp. How do I include the custom converter CalcConverter without using a jsfAjaxZone Tag.
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="javax.faces.convert.*"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="jsfExt" uri="http://java.sun.com/jsf/extensions/dynafaces"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body onload="document.CalcForm.innum.focus();">
                    <h:form id="CalcForm" prependId="false">
                    <jsfExt:scripts/>
                                <h1><h:inputText id="innum" value="#{Calc.innum}" >
                                        <f:converter converterId="CalcConverter"/>                                  
                                    </h:inputText>
                                <h:commandButton id ="doadd" value="+"
                                  actionListener= "#{Calc.doAdd}"
                                 onclick ="DynaFaces.fireAjaxTransaction(this, {
                                 execute: 'innum, doadd',
                                 render: 'outnum'});
                                 return false;"
                                />  
                            </h1> 
                            <br/>
                            <h:outputText value="The Result is: " />
                            <h:outputText id="outnum" value="#{Calc.outnum}"/>
                            <br/>
                            <h:message styleClass="errorMessage" for="innum"/>
                   </h:form>
        </body>
    </html>
    </f:view>

    I have a custom converter. I want to use fine grained control with regard to Ajax. Below is an example of my jsp. How do I include the custom converter CalcConverter without using a jsfAjaxZone Tag.
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="javax.faces.convert.*"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="jsfExt" uri="http://java.sun.com/jsf/extensions/dynafaces"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body onload="document.CalcForm.innum.focus();">
                    <h:form id="CalcForm" prependId="false">
                    <jsfExt:scripts/>
                                <h1><h:inputText id="innum" value="#{Calc.innum}" >
                                        <f:converter converterId="CalcConverter"/>                                  
                                    </h:inputText>
                                <h:commandButton id ="doadd" value="+"
                                  actionListener= "#{Calc.doAdd}"
                                 onclick ="DynaFaces.fireAjaxTransaction(this, {
                                 execute: 'innum, doadd',
                                 render: 'outnum'});
                                 return false;"
                                />  
                            </h1> 
                            <br/>
                            <h:outputText value="The Result is: " />
                            <h:outputText id="outnum" value="#{Calc.outnum}"/>
                            <br/>
                            <h:message styleClass="errorMessage" for="innum"/>
                   </h:form>
        </body>
    </html>
    </f:view>

  • How to Use Custom Linker with Xcode 4.x?

    I am using a customer compiler with Xcode and would like to know how to force Xcode to use my own linker line with custom arguments.
    I created a new compiler spec file under:
    /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupp ort/Developer/Library/Xcode/Plug-ins
    The default linker is defined in Ld.spec located in:
    /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupp ort/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources
    The following link seems to indicate that what I want to do is possible:
    http://maxao.free.fr/xcode-plugin-interface/compilers-linkers.html
    It seems like you have to create a custom Linker spec, give it an identifier, and then have the compiler spec reference your linker spec id by including it in the "RequiredLinker" key.
    My compiler spec looks like:
    {   Type = Compiler;
       Identifier = com.apple.compilers.armx;
       BasedOn = com.apple.compilers.gcc.4_2;
       Name = "ARMx";
       Version = "4.2";
       Description = "ARMx GCC Cross Compiler";
       ExecPath = "/Volumes/arm-x/bin/arm-none-linux-gnueabi-gcc";
       RequiredLinker = com.apple.pbx.linkers.armx;
    The problem is that Xcode 4.1 still is insisting on using the default Apple linker.  I want it to use my ARM based toolchain, which does not support some of the options that Xcode ends up passing on the linker line.

    You would be better off using a makefile-based project with custom compilers and linkers.

  • BAT 5.1(4) won't update phones using a custom file

    Hi all -
    I'm trying to use BAT 5.1(4) to change the device pool of a number of 7912 handsets on CCM 4.1(3) using a custom file with a list of the extensions affected. I set the query up and it works fine, but when I then try to change the device pool and update the phones the status window flashes up very briefly but the changes are not made.
    Trying to make the same change using a custom query works with no problems, but I don't fancy doing this for 51 non-sequential extensions! Anyone had a similar problem?

    BAT , the configuration is actually done on the profile that is associated to update the phone, not the BAT CSV
    http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_user_guide_chapter09186a008011b511.html#48233

  • Using a Custom Measure w/ BI Beans

    In order to create month-to-date and year-to-date totals, I have created a custom measure using the create_custom_measure procedure in the dbms_aw_utilities package. These two new measures, MTD and YTD, are simply cumulative sum functions applied over the date dimension. I have created this new measure as 'permanent' and it will exist beyond the current session, persisted in the analytic workspace views. I would now like to enable this new measure for use with the OLAP API and BI Beans so that I can simply display the measure along with my other 'static' measures. However, after refreshing and re-enabling the cube, the measure is still not available outside AWM.
    Is it possible to use a custom measure with BI Beans? Is there a simpler way to accomplish this?
    Thanks,
    Jeff

    You need to post this question on the database OLAP forum as the enablement for OLAP process is owned by the database team.
    I presume you did run the 'enable Analytic Workspace for OLAP API and BI Beans' option from within AWM after you added the two new measures? If not you will need to generate the CWM2 metadata to register the new measures.
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Custom theme with Fiori launchpad

    Hi
    I have created a custom theme using the theme designer  as per detailed in Colorful Fiori - Part 3 - Sea Blue
    I can see some changes taking effect in the preview but not all. For e.g. the tile title color, icon color did not change.
    When I use the custom theme with  the fiori launchpad url, I do not see any of the tiles. Only button I see is the logout button.
    I checked in debug, it did show me few 404 errors.  wondering why the custom theme works for my ui5 application but not with launchpad url.
    Appreciate your help, in identifying what I might be doing wrong.
    Thanks
    Kalpana
    Tags edited by: Michael Appleby

    Hi Masa,
    Thanks for replying !
    We found that our exact issue was resolved in Version 1.1.7 of UI Theme designer (OSS note 1941092) .
    So we upgraded our SAP_UI component to SP08 and now we are on version 1.2.2 of UI theme.
    I am now able to see the tiles on my Fiori launchpad and the logo I defined in the custom theme. But the custom theme I applied did not get applied to the tiles and the background.
    I still see the whole page (Except our company logo) with sap standard sap_bluecrystal theme.
    I did the Inspect element, and see that it is still using the standard CSS.  Cleared the browser histroy just to make sure that it is not picking the old theme from cache  - but with no help.
    If I go back to the theme designer and open the custom theme, I can see the csutom  theme changes in the preview. 
    Any help is appreciated.
    Thanks
    Kalpana

Maybe you are looking for

  • Enhance OVZ9 Screen with a new element

    Dear Experts, I know this has been discussed earlier and I had already searched through the forums to see an answer, but I could not find any and hence I am posting this here. We have the following business requirement in the ECC ATP functionality. 1

  • Do I have to update restore usb drive for every 10.7.x?

    Hello, my Mac is playing up and I've decided to reinstall OS X Lion. When Lion came out I created a USB drive (10.7.0) as per the instructions. Now I need to use the USB stick, whether I press the Option key on boot or look for it In Preferences/Star

  • Fallo en la actualización photoshop CC 2014

    Hola, me he bajado desde el Creative Cloud el photoshop 2014 (hasta ayer el photoshop que tenía funcionaba perfectamente), pero inmediatamente que este se abre, se cierra solo. Tengo Windows 8 64Bits He visto que el mismo problema sale en ese hilo: P

  • Officejet 9130 all in one question

    I am currently running Windows XP and want to purchase new PC with windows 7. What do I need to purchase to be assured that this printer works with Windows 7. Thanks Diane

  • Power control switch for 115VAC wall outlet to operate resistance heating element.

    I am very new to LabView software as well as hardware interfacing, so don't presume that I know anything.  My problem seems simple, I want to be able to control and automate via LabView software a resistance heating element that can plug into a stand