Using methods with links

Hi all !
Can i call a jsp-method by clicking on a html-link ??
The method:
<%!
    int month=2;
    public void forward() {
        month++;
%>And now i want to call the method with a link.
Something like this:
<a href="..." onclick="forward()">Click</a>Is there a possibility to use methodes out of the html-code.

I don't think u can call a method, but u can call the jsp page by using the "action"
so u can soemthing like this
document.formname.action = '*.jsp';
Hi all !
Can i call a jsp-method by clicking on a html-link ??
The method:
<%!
int month=2;
public void forward() {
month++;
%>And now i want to call the method with a link.
Something like this:
<a href="..." onclick="forward()">Click</a>Is there a possibility to use methodes out of the
html-code.

Similar Messages

  • Using methods with refrence parameters

    I'm having problems completing this program I'm writing for class. I must use the setNum and getNum methods. and its must read input files as such:
    John Smith
    9.45 40 15
    Jane Doe
    12.50 45 15
    I'm keep getting a boolean identifier error. Are there any examples that anyone can give me to make my program work?
    import java.io.*;
    import java.util.*;
    public class Payroll3
         static final double FULL_TIME = 40.0;
         public static void main (String[] args)
                                                      throws FilesNotFoundException
              Scanner inFile = new Scanner(new FileReader("payroll.dat"));
              StringBuffer employeeName = new StringBuffer("");
              DoubleClass hourlyRate = new DoubleClass();
              DoubleClass hoursWorked = new DoubleClass();
              DoubleClass taxRate = new DoubleClass();
              double grossAmount = 0.0;
              double netAmount = 0.0;
              instructions();
              reportTitle();
              inputData();
              while(inFile.hasNext())
                   employeeName = inFile.nextLine();
                   hourlyRate = inFile.nextDouble();
                   hoursWorked = inFile.nextInt();
                   taxRate = inFile.nextInt();
              printEmployeeInfo(employeeName, hourlyRate, hoursWorked, taxRate, grossAmount, netAmount);
              inFile.close();     
         public static void instructions()
              System.out.println("               Instructions for Payroll Report Program              \n");
              System.out.println("This program calculates a paycheck for each employess.\n"
                                       + "A text file containing the following information will be created:\n"
                                       + "name, payrate, hours worked, and tax percentage to be deducted.\n");
              System.out.println("The program will create a report in columar format showing the \n"
                                       + "employee name, hourly rate, number of hours worked, tax rate,\n"
                                       + "gross pay, and net pay.\n");
              System.out.println("After all employees are processed, totals will be displayed,\n"
                                       + "including total gross amount and total net pay.\n");
         public static void reportTitle()
              System.out.println("                              Payroll Report                  \n"
                                            + "\n");
              System.out.println("Employee             Hourly      Hours   Tax     Gross     Net     ");
              System.out.println("Name                 Rate       Worked   Rate    Amount   Amount    ");
              System.out.println("----------------     -------   -------  -----  -------   -------");
         public static void printEmployeeInfo(StringBuffer employeeName, Doubleclass hourlyRate, Doubleclass hoursWorked, Doubleclass taxRate, Doubleclas grossAmount, Doubleclass netAmount)
         System.out.printf("%-20s%8.2f%9.2f%8.2f%9.2f%10.2f%n", employeeName, hourlyRate, hoursWorked, taxRate, grossAmount, netAmount);
              if (hoursWorked > FULL_TIME)
                    System.out.println("OT");
              else
                   System.out.println();
         public static void boolean inputData(StringBuffer employeeName, Doubleclass hourlyRate, Doubleclass hoursWorked, Doubleclass taxRate)
              if (
              hourlyRate.getNum();
              hoursWorked.getNum();
              taxRate.getNum());
              return true;
              else
               return false;
    }

    I had FilesNotFoundException in the code but I corrected the other issues. my main problem now is the DoubleClass methods. here are the errors that came up now.
    Payroll3.java:31: incompatible types
    found : double
    required: DoubleClass
                   taxRate = inFile.nextDouble();
    ^
    Payroll3.java:34: printEmployeeInfo(java.lang.StringBuffer,DoubleClass,DoubleClass,DoubleClass,DoubleClass,DoubleClass) in Payroll3 cannot be applied to (java.lang.StringBuffer,DoubleClass,DoubleClass,DoubleClass,double,double)
              printEmployeeInfo(employeeName, hourlyRate, hoursWorked, taxRate, grossAmount, netAmount);
    ^
    Payroll3.java:63: operator > cannot be applied to DoubleClass,double
              if (hoursWorked > FULL_TIME)
    ^
    Payroll3.java:73: cannot find symbol
    symbol : method getNum()
    location: class DoubleClass
              hourlyRate.getNum();
    ^
    Payroll3.java:74: cannot find symbol
    symbol : method getNum()
    location: class DoubleClass
              hoursWorked.getNum();
    ^
    Payroll3.java:75: cannot find symbol
    symbol : method getNum()
    location: class DoubleClass
              taxRate.getNum();
    ^
    11 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    ----jGRASP exec: javac -g E:\Chapter 7 Source Code\Payroll3.java
    Payroll3.java:9: cannot find symbol
    symbol : class FilesNotFoundException
    location: class Payroll3
                                                      throws FilesNotFoundException
    ^
    Payroll3.java:24: inputData(java.lang.StringBuffer,DoubleClass,DoubleClass,DoubleClass) in Payroll3 cannot be applied to ()
              inputData();
    ^
    Payroll3.java:28: incompatible types
    found : java.lang.String
    required: java.lang.StringBuffer
                   employeeName = inFile.nextLine();
    ^
    Payroll3.java:29: incompatible types
    found : double
    required: DoubleClass
                   hourlyRate = inFile.nextDouble();
    ^
    Payroll3.java:30: incompatible types
    found : int
    required: DoubleClass
                   hoursWorked = inFile.nextInt();
    ^
    Payroll3.java:31: incompatible types
    found : int
    required: DoubleClass
                   taxRate = inFile.nextInt();
    ^
    Payroll3.java:34: printEmployeeInfo(java.lang.StringBuffer,DoubleClass,DoubleClass,DoubleClass,DoubleClass,DoubleClass) in Payroll3 cannot be applied to (java.lang.StringBuffer,DoubleClass,DoubleClass,DoubleClass,double,double)
              printEmployeeInfo(employeeName, hourlyRate, hoursWorked, taxRate, grossAmount, netAmount);
    ^
    Payroll3.java:63: operator > cannot be applied to DoubleClass,double
              if (hoursWorked > FULL_TIME)
    ^
    Payroll3.java:73: cannot find symbol
    symbol : method getNum()
    location: class DoubleClass
              hourlyRate.getNum();
    ^
    Payroll3.java:74: cannot find symbol
    symbol : method getNum()
    location: class DoubleClass
              hoursWorked.getNum();
    ^
    Payroll3.java:75: cannot find symbol
    symbol : method getNum()
    location: class DoubleClass
              taxRate.getNum();
    ^
    11 errors

  • Using CSS with Linked Report Field

    I'm using the CSS Style width:150px on a report column that has a link. However, when using a CSS Style on linked column the formatting doesn't work. If I remove the link the width setting takes effect. How can I correct this? If I embedded the link URL in the query data it will format fine so there appears to be something different happen when Application Express generate the link.

    When a report column is rendered as a hyperlink, the CSS style you specify is not used, that is used only for regular report columns.
    Try putting your style as style="width:150px;" in the Link Attributes in the Column Link section (where you specify the other hyperlink details)

  • Protected scope - how to use methods with it

    I'm trying to use the method removeRange():
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html#removeRange(int,%20int)
    From the ArrayList class, but it won't let me as it calls protected void. Is there any way around this so I can use the method?
    Edited by: Chris123 on May 3, 2008 6:03 PM

    class Testing
      MyArrayList<String> list = new MyArrayList<String>();
      public Testing()
        for(int x = 0; x < 10; x++) list.add(""+x);
        printList();
        list.removeRange(2,5);
        printList();
      public void printList()
        for(int x = 0, y = list.size(); x < y; x++) System.out.println(list.get(x));
        System.out.println("===");
      public static void main(String[] args){new Testing();}
    class MyArrayList<E> extends java.util.ArrayList<E>
      protected void removeRange(int fromIndex,int toIndex) {super.removeRange(fromIndex,toIndex);}
    }

  • Flash with linked flv: Waiting while playing

    Hello
    for an automatic running projector I want to use flash with
    linked flvs. While the flash is running the movie shell wait, after
    finishing playing the movie jumps to next marker.
    I used following script:
    on exitFrame
    if sprite (5).playing then
    go to the frame
    end if
    end
    The script don't function. Has anyone an idea how to let the
    movie waiting for the end of embedded flash?
    Thanks and regards
    Peter

    If the .flv is loaded in to a movieClip in your .swf, you
    would want to
    test the clip's playing property, not the .swf. Another
    method is to
    build a telltale in to the .swf to mark the end of the .flv
    play. You
    could set a boolean variable in the .swf and then look at the
    value from
    the Director movie. A better method is to call a Director
    function from
    the .swf, when the .flv finishes.
    Rob
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412-243-9119
    http://www.macromedia.com/software/trial/

  • Issue with SharePoint foundation 2010 to use Claims Based Auth with Certificate authentication method with ADFS 2.0

    I would love some help with this issue.  I have configured my SharePoint foundation 2010 site to use Claims Based Auth with Certificate authentication method with ADFS 2.0  I have a test account set up with lab.acme.com to use the ACS.
    When I log into my site using Windows Auth, everything is great.  However when I log in and select my ACS token issuer, I get sent, to the logon page of the ADFS, after selected the ADFS method. My browser prompt me which Certificate identity I want
    to use to log in   and after 3-5 second
     and return me the logon page with error message “Authentication failed” 
    I base my setup on the technet article
    http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-end-to-end.aspx
    I validated than all my certificate are valid and able to retrieve the crl
    I got in eventlog id 300
    The Federation Service failed to issue a token as a result of an error during processing of the WS-Trust request.
    Request type: http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
    Additional Data
    Exception details:
    Microsoft.IdentityModel.SecurityTokenService.FailedAuthenticationException: MSIS3019: Authentication failed. ---> System.IdentityModel.Tokens.SecurityTokenValidationException:
    ID4070: The X.509 certificate 'CN=Me, OU=People, O=Acme., C=COM' chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed
    correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    --- End of inner exception stack trace ---
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.BeginGetScope(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.BeginIssue(IClaimsPrincipal principal, RequestSecurityToken request, AsyncCallback callback, Object state)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.DispatchRequestAsyncResult..ctor(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginDispatchRequest(DispatchContext dispatchContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.ProcessCoreAsyncResult..ctor(WSTrustServiceContract contract, DispatchContext dispatchContext, MessageVersion messageVersion, WSTrustResponseSerializer responseSerializer, WSTrustSerializationContext
    serializationContext, AsyncCallback asyncCallback, Object asyncState)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract.BeginProcessCore(Message requestMessage, WSTrustRequestSerializer requestSerializer, WSTrustResponseSerializer responseSerializer, String requestAction, String responseAction, String
    trustNamespace, AsyncCallback callback, Object state)
    System.IdentityModel.Tokens.SecurityTokenValidationException: ID4070: The X.509 certificate 'CN=Me, OU=People, O=acme., C=com' chain building
    failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. 'A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
    at Microsoft.IdentityModel.X509CertificateChain.Build(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509NTAuthChainTrustValidator.Validate(X509Certificate2 certificate)
    at Microsoft.IdentityModel.Tokens.X509SecurityTokenHandler.ValidateToken(SecurityToken token)
    at Microsoft.IdentityModel.Tokens.SecurityTokenElement.GetSubject()
    at Microsoft.IdentityServer.Service.SecurityTokenService.MSISSecurityTokenService.GetOnBehalfOfPrincipal(RequestSecurityToken request, IClaimsPrincipal callerPrincipal)
    thx
    Stef71

    This is perfectly correct on my case I was not adding the root properly you must add the CA and the ADFS as well, which is twice you can see below my results.
    on my case was :
    PS C:\Users\administrator.domain> $root = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ad0001.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "domain.ad0001" -Certificate $root
    Certificate                 : [Subject]
                                    CN=domain.AD0001CA, DC=domain, DC=com
                                  [Issuer]
                                    CN=domain.AD0001CA, DC=portal, DC=com
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    22/07/2014 11:32:05
                                  [Not After]
                                    22/07/2024 11:42:00
                                  [Thumbprint]
                                    blablabla
    Name                        : domain.ad0001
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : domain.ad0001
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17164
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.domain> $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\
    cer\SP2K10\ADFS_Signing.cer")
    PS C:\Users\administrator.domain> New-SPTrustedRootAuthority -Name "Token Signing Cert" -Certificate $cert
    Certificate                 : [Subject]
                                    CN=ADFS Signing - adfs.domain
                                  [Issuer]
                                    CN=ADFS Signing - adfs.domain
                                  [Serial Number]
                                    blablabla
                                  [Not Before]
                                    23/07/2014 07:14:03
                                  [Not After]
                                    23/07/2015 07:14:03
                                  [Thumbprint]
                                    blablabla
    Name                        : Token Signing Cert
    TypeName                    : Microsoft.SharePoint.Administration.SPTrustedRootAuthority
    DisplayName                 : Token Signing Cert
    Id                          : blablabla
    Status                      : Online
    Parent                      : SPTrustedRootAuthorityManager
    Version                     : 17184
    Properties                  : {}
    Farm                        : SPFarm Name=SharePoint_Config
    UpgradedPersistedProperties : {}
    PS C:\Users\administrator.PORTAL>

  • Error with Links if using x3 primary keys

    Hi Folks:
    Here is the error code I'm receiving:
    ORA-01422: exact fetch returns more than requested number of rows
    Unable to fetch row.
    Background: I am using Application Express 3.2
    All of the pages I have created that rely on x2 primary keys (first_name, last_name) work fine.
    I have a table that has x3 primary keys: Table is called "time_off_awards". The x3 primary keys are: last_name, first_name, approval_date.
    I created a report that works properly and lists the awards for each person (each person can receive more than one award-on different dates).
    I also created an edit link that works properly IF *(only if)* each individual has only one award. If the individual has more than one award then I get the error above. When I set up the link I used all three keys. The x3 PK's should uniquely identify each row, but if the same last name/first name appear more than once (that is if the person has more than one award) I get the error. I thought at first maybe it was just not reading the 3rd key/part of the link (approval_date), but it shows properly if you move your cursor over the edit link.
    Here is a link to a screen pic of how I have my link set in Apex:
    [http://www.wczone.com/link_settings.gif]
    Here is a link to a pic of the report with some info:
    [http://www.wczone.com/report_link.gif]
    If needed, here is my table info:
    CREATE TABLE PERSONNEL.TIME_OFF_AWARDS (
    LAST_NAME VARCHAR2(40) NOT NULL,
    FIRST_NAME VARCHAR2(25) NOT NULL,
    APPROVAL_DATE DATE NOT NULL,
    HOURS_OFF NUMBER(3),
    CITATION VARCHAR2(1500),
    /* Keys */
    PRIMARY KEY (LAST_NAME, FIRST_NAME, APPROVAL_DATE),
    /* Foreign keys */
    CONSTRAINT TOA_PERSONNEL
    FOREIGN KEY (LAST_NAME, FIRST_NAME)
    REFERENCES PERSONNEL.MARC_PERSONNEL(LAST_NAME, FIRST_NAME)
    TABLESPACE PERSONNEL;
    Thanks for any help, I've tried looking at a couple of Apex books, but they didn't help much.
    Matt
    Edited by: user10495310 on Mar 4, 2009 8:21 AM

    Thank you everyone for the help and information you gave to me.
    Your ideas and advice helped me to think through the issues involved.
    The way i actually found to work around this issue was a little different.
    What I did was the following (which may only be usable with empty tables. If its possible to create a new column with a sequence and trigger on a table that already contains data it should work also):
    1. I removed the current PK's that were currently set.
    2. I added a single, unique PK (that used a sequence and trigger to automatically increment) to the table as was suggested in this thread and other APEX forum threads.
    3. I changed the link on the report so that it used the new PK, and also changed the PK used on the forms (under Processes - both the page rendering and page processing processes).
    The Difference:
    4. Next I changed the table (not by using APEX, but directly) from using the automatically generated ID as the PK, back to using the compound PK (x3 keys). I then added an constraint to make sure that the automatically generated column was unique. So now I have the compound PK that my supervisor wants us to use, and I'm able to use a unique, automatically generated key for APEX to use.
    I found also that if you already have a column that uses a unique/auto-generated key you can still use it with APEX without switching keys around.
    1. I added the new column to the sql in the reports source section so that the new column was searched (and then used 'hidden' so it wouldn't be displayed on the report users would see).
    2. You can still add the unique key under the processes on the form that is being linked too under the Primary key tabs. If its not a PK it won't show up in the pop up which is to the right of "Item Containing Primary Key Column Value" but it can be entered manually (i.e. p23_AUTO_ID) and it will work fine. You would also need to edit your form so that the auto ID that is being passed from the report is part of the form - but hidden if desired).

  • How can I use Automator to open and save Word docs with links?

    Hi-
    I'm having trouble building a Workflow to open and save Word docs with links.
    My Workflow so far:
    1. Get Finder items
    2. Copy Finder items (to new folder)
    3. Rename selected items
    4. Open selected items (Word docs)
    Three problems occur.
    The first is a Word 2004 problem -- I can't get the warning "This document has links in it; do you want to open it with/without updating the links" to go away (Unilke the Macro warning toggle capability, there is nothing in the Preferences for Word 2004 that addresses the links warning, as far as I can tell; any insight you can shed on this would be terrific.)
    The second problem happens with Automator: if I manually accept the update of the first document's links, Automator opens that document but then halts completely, even though I've instructed it to open multiple documents.
    The third problem I have is that there's no Finder action in Automator that allows me to save the document that's now open (as far as I can see).
    Any suggestions for how to fix? If I can get this to work, and scheduled in iCal, it will be an unbelievable time saver.
    Thanks,
    Jeremy
    PowerPC G5   Mac OS X (10.4.6)  

    Hi there Jeremy,
    to do this you are going to have to add in some Run AppleScript steps...
    These will rely on GUI Scripting. So first you need to activate GUI Scripting.
    Now we need to add in a Run AppleScript action to the end of your workflow...
    This will replace your current number 4 in the workflow (Open Selected...)
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">on run {input, parameters}
    set allItems to every item of input
    repeat with currItem in allItems
    tell application "TextWrangler"
    open currItem
    end tell
    activate application "TextWrangler"
    tell application "System Events"
    tell process "TextWrangler"
    delay 2
    --when the Word document is opened I have told it to press okay !
    --I don't know what key you want it to press in the dialog box
    keystroke return
    delay 2
    --save the doc
    keystroke "s" using command down
    delay 5
    --close the doc
    keystroke "w" using command down
    end tell
    end tell
    end repeat
    return input
    end run</pre>
    The above script should open each Word Document, press a button in the dialog box then do a save and then close the doc...then loop through the rest of them.
    You need to replace the name Text Wrangler with Microsoft Word (or whatever it is called!), I don't have it on my Mac.
    You will have to let me know what button needs pressing in the first dialog, if it isn't the 'highlighted ' one then we will have to amend the script...
    regards
    Ric

  • How can I add a hyperlink to a PDF with OSX 10.9? The "Help" article says to use the "add link" feature under "edit." It's not there.

    How can I add a hyperlink to a PDF with OSX 10.9? The "Help" article says to use the "add link" feature under "edit." It's not there. I could add links w/ the previous OS. Time sensitive project.

    Which application are you using?
    Clinton

  • How to use the html:link with a arraylist

    Hi everyone:
    I want to display the data using struts html:link.
    I query the database and place all the data to javabean,later place all the javabean to ArrayList.In Action,I use the "request.setAttribute("lovetable",articlelist) to set request to jsp page.
    I want to pass a parameter "id" use the hyperlink so I can get the parameter when I click the hyperlink.
    But how to use html:link to display it?
    I use <html:link action="viewtopic.do" paramId="id" paramName="lovetable" paramProperty="id"/>,it can't work and Tomcat report error :
    org.apache.jasper.JasperException: No getter method for property id of bean lovetable
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    The lovetable is a ArrayList and it don't have a getter or setter method.
    How to use it pass parameter? :( Thks

    Thank you.
    I use the bean:define successful.And display all the data to jsp.My jsp code is:
    <logic:iterate id="love" name="lovetable">
    <bean:define id="idbean" name="love"/>
    <tr bgcolor="<%=color%>">
    <td><bean:write name="love" property="id"/></td>
    <td><html:link forward="viewtopic" paramId="id" paramName="idbean" paramProperty="id"><bean:write name="love" property="title"/></html:link></td>
    <td><bean:write name="love" property="name"/></td>
    <td><bean:write name="love" property="time"/></td>
    </tr>
    </logic:iterate>
    In Action : request.setAttribute("lovetable",articlelist)
    ResutlSet rs=.............
    List articlelist=new ArrayList();
    while(rs.next()){
    articlebean bean=new articlebean();
    bean.setName(rs.getString("name"));
    bean.setTitle(rs.getString("title"));
    articlelist.add(bean);
    The above code will work property.
    The Tag "html:link" need bean to work other than arraylist so I iterate all the bean out.
    The Tag "logic:iterate" need collection to work so I make Action return a List.
    right?
    Any idea? :)

  • How to use PDF files with links to other PDF Files

    How to use a PDF file with links to other PDF files that have been transferred to the same folder

    Are you using a mouse, or a trackpad on a laptop? Either way, your cursor is usually an arrow, right? And presumably it's working/moving MOST of the time, otherwise you wouldn't be able to do anything?
    For example, can you move the cursor arrow to the "Annotate" tool to click on it and go into Annotate mode? If so, can you click on the text tool? If so, does the cursor change to a crosshairs? At what point can you NOT move the cursor around the screen?
    Matt

  • How to use user defined object with linked button

    Hi experts
    Can I use user defined table data with linked button. If yes then how. plz give me sample examples.
    Regards
    Gorge

    If you have an UDO in your form, or any other, the FormDataLoad eventhandler should be used.
    Take care, it is not inside the eventhandler.
    for VB:
    Select SBO_APPLICATION in the classes, and select FormDataLoad event
    Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
    in C#
    Add a new eventhandler as
    // declaration
    SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(ref SBO_Application_FormDataEvent);
    // eventhandler:
    public void SBO_Application_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)

  • Use of action links in combination with hierarchy object in analysis

    Hi All,
    From OBI 11g release hierarchy objects are available in the presentation layer of OBI. We make often use of these hierarchy objects. We also make use of action links to drill down to a analysis with more detailed information. This more detailed analysis should inherit the values of the higher-level analysis. In combination with the hierarchy objects this can give problems.
    An example:
    Let's say we have the following atttributes:
    Hierarchy object date (year, quarter, month), a product column and # of units shipped measure. On the column # of units shipped we have defined an action link to a more detailed analysis.
    Now, let's say the user clicks on the year 2011 in the hierarchy object. The quarters for 2011 are shown. The 'normal' product column attributes contains 'Product A'. The user makes use of the action link that is available by clicking on the measure value of # of units shipped. He clicks on the value that is based on quarter 2 of 2011 and 'Product A'. The detailed analysis is set to filter the analysis on the product and date dimension. In this example the analysis is filtered on 'Product A' but not on the value Quarter 2, 2011. Hierarchy object values are not passed through on clicking on a action link.
    Is there any workaround for this issue? We want to make use of the hierarchy object but users expect to also pass the hierarchy object value to the underlying detailed analysis

    I am facing the same issue...
    First check it out:
    http://prasadmadhasi.com/2011/12/15/hierarchicalnavigationinobiee11g/
    http://www.rittmanmead.com/2010/10/oracle-bi-ee-11g-navigation-passing-parameters-using-hierarchical-columns/
    I solved it by using Go URL link. I pass value of hierarchy level (whichever level it is). For Year it is 2012, month: 2012-03.
    Now ugly part: in url I pass 2 parameters that refers to the same value : "Time"."Year"="2012", "Time"."Month"="2012"
    In target report I apply filter: "Time"."Year" "Is Prompted" OR "Time"."Month" "Is Prompted"
    This way in target report only one of filters will work : depending from which level you navigated from source report.
    If you decide use this approach be carefoul with URL syntax, remember about double quotes etc. In my case it was:
    Parameter : value
    PortalGo : [LEAVE EMPTY]
    path : %2Fusers%2Fweblogic%2FMIS%20EVAL%2FT_Target
    options : dr
    Action : Navigate
    col1 : "Time"."Year"
    val1 : [SELECT TIME HIERARCHY COLUMN]
    col2 : "Time"."Month"
    val2 : [SELECT TIME HIERARCHY COLUMN]
    Remember to:
    Remove “=” after PortalGo
    Surround value attribute with double quotes - e.g. @val1=”@{6}”
    After you "adjust" your URL text manually (unfortunatelly it won't be done automatically) it should look like:
    http://10.10.10.100:7001/analytics/saw.dll?PortalGo@{1}&path=@{2}&options=@{3}&Action=@{4}&col1=@{5}&val1=”@{6}”&col2=@{7}&val2=”@{8}”

  • Using onFocus method with embedded html

    Hi,
    I have embedded html in a servlet. I am using a text field to call the onFocus method with the following code:
    out.println("<input type='text' name='name' value='0' onFocus='if(this.value=='0')this.value=';'>");
    If I was using straight html with no servlet this works fine. When the user clicks on the field the default value is automatically erased.
    Why will this not work in a servlet?
    I have also tried calling a javascript function. Please note that I successfully use javascript with input type 'button' to render a pop up window with dimensions. So my javascript inside a servlet works elsewhere.
    Thanks VERY MUCH for your time
    Rick

    I don't think it's the same as I'm doing. Essentially, I have a JEditorPane subclass, which just has a few custom tags in it. I don't need them to be recognized by java, since it will be uneditable, but I just need to know how to convert from the getText() locations to the actual displayed text locations.
    Also, when I set the text as text/html, it creates a bunch of extra HTML tags, so it's larger than the original String used to create it.

  • Why not to use static methods - with example

    Hi Everyone,
    I'd like to continue the below thread about "why not to use static methods"
    Why not to use static methods
    with a concrete example.
    In my small application I need to be able to send keystrokes. (java.awt.Robot class is used for this)
    I created the following class for these "operations" with static methods:
    public class KeyboardInput {
         private static Robot r;
         static {
              try {
                   r = new Robot();
              } catch (AWTException e) {
                   throw new RuntimeException(e + "Robot couldn't be initialized.");
         public static void wait(int millis){
              r.delay(millis);
         public static void copy() {
              r.keyPress(KeyEvent.VK_CONTROL);
              r.keyPress(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_CONTROL);
         public static void altTab() {
              r.keyPress(KeyEvent.VK_ALT);
              r.keyPress(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_ALT);
                   // more methods like  paste(), tab(), shiftTab(), rightArrow()
    }Do you thinks it is a good solution? How could it be improved? I've seen something about Singleton vs. static methods somewhere. Would it be better to use Singleton?
    Thanks for any comments in advance,
    lemonboston

    maheshguruswamy wrote:
    lemonboston wrote:
    maheshguruswamy wrote:
    I think a singleton might be a better approach for you. Just kill the public constructor and provide a getInstance method to provide lazy initialization.Thanks maheshguruswamy for advising on the steps to create a singleton from this class.
    Could you maybe advise also about why do you say that it would be better to use singleton? What's behind it? Thanks!In short, it seems to me that a single instance of your class will be able to coordinate actions across your entire application. So a singleton should be enough.But that doesn't answer why he should prefer a singleton instead over a bunch of static methods. Functionally the two are almost identical. In both cases there's only one "thing" on which to call methods--either a single instance of the class, or the class itself.
    To answer the question, the main reason to use a Singleton over a classful of static methods is the same reason the drives a lot of non-static vs. static decisions: Polymorphism.
    If you use a Singleton (and and interface), you can do something like this:
    KeyboardInput kbi = get_some_instance_of_some_class_that_implements_KeyboardInput_somehow_maybe_from_a_factory();And then whatever is calling KBI's public methods only has to know that it has an implementor of that interface, without caring which concrete class it is, and you can substitute whatever implementation is appropriate in a given context. If you don't need to do that, then the static method approach is probably sufficient.
    There are other reasons that may suggest a Singleton--serialization, persistence, use as a JavaBean pop to mind--but they're less common and less compelling in my experience.
    And finally, if this thing maintains any state between method calls, although you can handle that with static member variables, it's more in keeping with the OO paradigm to make them non-static fields of an instance of that class.

Maybe you are looking for

  • LaserJet Pro MFP M125nw - Scan to app All-in-One Remote does not work

    Hi gurus, Basically I have pruchased that super-printer and I am now trying to achieve scan to my mobile devices. I have one iPad 2 on iOS 7, on 2 Android devices (smaller tablet and phone) both running Kitkat 4.4.2 I am trying to submit a scan from

  • Error while trying to access to Displays prefrences

    Hi all, I'm reporting a strange behavior. I don't really know how to deal with it. A few days ago i wanted to adjust the resolution of the external screen i'm using with my 2011 MBP and the Displays preference pane had disappear from the System Prefe

  • HP Laserjet 1300 Manual Double Sided Printing with Windows 7

    I just purchased a new laptop with windows 7, love the interface but have some hiccups here and there.  And the one that is the biggest pain is printing.  I have a HP Laserjet 1300 connected via a linksys print server.  Single sided printing works ju

  • Multivalued metadata properties in XML Form Builder

    I have created some multi-valued properties in KM having their own namespace. When I assign these properties to the XML FB, the values are loaded only if I use a combobox. But my requirement is to selct multiple values, so if I associate a checkbox a

  • Ant for the build.xml file

    when we give the ant command then what the background task perform?.. how ant start parsing the build.xml file ?