HTMLB classlib question...

Hi, I have a question relating to the HTMLB library,
Currently my iView JSP has:
<b><hbj:link
    id="link1"
    text="Link to google"
    reference="http://www.google.com"
    target="_TOP"
    tooltip="this takes you to: http://www.google.com"
    onClick="LinkClick"
    /></b>
If I wanted to add the fontSize attribute, how can I do this?  I know I have to use the java command "setFontSize (LinkFontSize.fontsize)", but where would I do this?  I currently have a JSPDynPage.java that does calls my jsp's is this where I am suppose to put code?
Or do I have to create entire page in Java code(servlet?) or I can create the JSP page, and then in Java use the attribute-changing methods like above?
I am a beginner in all of this and would greatly appreciate any code examples or suggestions you may have. Thank you for your help and patience.
Thank you very much,
Baggett.

Hi Prakash, I'm trying to make the font size 16px, how can I do this? I am trying:
<% LinkFontSize size = new LinkFontSize("16");
link1.setFontSize(size);%>
I see that there is a constructor available but it is protected, how would I be able to use it?
Thanks so much!
Baggett.

Similar Messages

  • Java iview htmlb & jco question

    hello all,
    I am writing an Java iView to pull some data from an
    R/3 table & displaying that as a LINE chart.
    I've already got the portion of getting data from R/3
    by creating a shim function that returns the table.
    Now i want to display that using htmlb.Chart
    I can seet the JCO.Table as my JCOChartModel easily enough
    however the Table returns to me multiple rows
    (data that will be used elsewhere) but there are only
    two rows i want to use as the source for the Chart.
    Is there any way to limit the Chart to those two rows
    or do i need to (in my opinion wastefully) create
    a Vector and duplicate the data from those two
    rows to use for Chart?

    Hi Srivatsan,
    I need to write a java iview to pull some data from an R3 table.  But I dont know how :S
    I did something with jco in EP 5, but now with EP 6 I'm confused with the term JCA. 
    What do you do to connect to R3 ?  Could you share your code ?
    Thanks and regards from Mexico !!!
    Diego

  • HTMLB Tableview: questions..;

    Hello,
    Simply I output my table as follows :
    <htmlb:form>
      <htmlb:tableView id              = "tv1"
                       visibleRowCount = "10"
                       selectionMode   = "lineEdit"
                       table           = "<%=mytable%>"
                       iterator        = "<%=iterator%>" />
    </htmlb:form>
    (NOTE: where iterator is type IF_HTMLB_TABLEVIEW_ITERATOR)
    Ok, its nice, but I need to customize things a bit.  I have 5 fields... and I want 4 uneditable, and the 5th able to be updated and modified back into the SAP table.
    How can I do this?
    Thanks,
    Timothy

    Hello,
    I have read many times the iterator weblogs, especially 830.  I understand most but still have trouble.  Allow me to show you what I have, and please tell me what is wrong.
    My BSP, index.htm:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="EPCOT" >
        <%
      SELECT * FROM ZEPCT002 INTO TABLE epcots
               WHERE ZANNE = anne
               AND   ZPAYS = pays.
        %>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "12"
                           selectionMode   = "lineEdit"
                           table           = "<%= epcots %>"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    For my iterator, I have made the 5th field an input field (CL_HTMLB_INPUTFIELD).  And the 6th field an ICON:
    image2->onclick = 'OnSaveClick'.
            image2->src = cl_bsp_mimes=>sap_icon( `ICON_SYSTEM_SAVE` ).
    I want, when user selects a line, enters text in this 5th field, and then clicks the icon... an event to write/modify directly this change into my table (SAP table I created).  So, for index.htm, in OnInputProcessing, I have:
    DATA: event TYPE REF TO CL_HTMLB_EVENT,
          id type string,
          row type string,
          col type string,
          other type string.
    CLASS cl_htmlb_manager DEFINITION LOAD.
    clear: event, id, row, col, other.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    id = event->id.
    split id at '_' into other row col.
    case col.
    WHEN '6'.
    <b>?????</b>
    endcase.
    My <b>?????</b> is where I have tried many things and just dont get it.  In weblog 830, I see what he is doing, but some things he does don't work for me, like:
    id = htmlb_event->id.
        case htmlb_event->server_event.
          when 'OnUpdateUserClick'.
            data: event1 type ref to cl_htmlb_event_selection.
            event1 ?= htmlb_event.
            read table model->ug_users index i_row assigning <irow>.
    this <b>htmlb_event->id</b>, <b>htmlb_event</b>, and <b>model->ug_users</b>... for these I get syntax errors.
    So, could you tell me what I need to do here?
    Any guidance would be greatly appreciated,
    Thanks,
    Tim

  • Form.addComponent() in JSPDynPage

    Hi,
    I try to generate the HTMLB contents in my iView in 2 way. First to delegate to jsp using the setJspName() method...that works fine. But the second way to add a component by form.addComponent() method. That works not. I want to do this both in the JSPDynPage context.
    Further explanation: I wrote some abstract classes and interfaces for iView development. In a properties file I define iView states and to each iView state a gui.
    E.g. entry in the properties:
    IVIEW_STATE_1=first.jsp
    IVIEW_STATE_2=IGSecond
    if the iview state ends with .jsp the method setJspName() will be invoked. If it ends not with .jsp, I reflect the class IGSecond which implements my GuiGenerator interface. In this class IGSecond I return a htmlb Component. This happens in the processBeforeOutput() in JSPDynPage. The component is delivered correctly, but not shown.
    Now my final question: is it possible to use setJspName() and form.addComponent in a JSPDynPage ?
    Thanks a lot
    Oliver

    ...I solved this...the problem was that I inherited from JSPDynPage. It seems, that the form member is null in this case. So I can not use jsps with htmlb and the htmlb classlib. Now I inherit from DynPage and used the decompiled code to delegate to the jsp. Now it works, I can generate the gui with jsps or htmlb classlib or both in my framework.

  • Getting filtered values from TableView

    Hi,
      We have a TableView whose columns can be sorted. Iwant to select a few rows and make the selected rows editable in another page.
      If it is a unsorted/unfiltered TableView, am able to do it as the ABAP Internal Table and the TableView are the same in terms of record index positions. But am facing problem after i sort/filter the TableView because now the index of the TableView are different from the index of the ABAP Internal Table present in server.
      Anybody who has dealt with this problem earlier and can guide us.
    Thanks,
    Chathia.

    Welcome to SDN.
    Search the forum before you post a question, generally in mose cases you would find a answer, if not you can post a new thread.
    here is a list of threads where your question was discussed. (as others mentioned its about using keyColumn attribute of htmlb:tableview)
    check out these threads, its got code samples as well.
    Re: HTMLB Tableview: questions..;
    Re: pic actual data from a table view
    Re: Error when using Filter and Sort together on a tableview
    Re: Change rendering of the title column...
    Have a great time in SDN.
    Regards
    Raja

  • Event Handling in Abstract Portal Component

    Hi Friends,
    I am using HTMLB Classlib in an Abstract Portal Component to develop a Dropdownlistbox. Now I want to handle the event of change of selection in this dropdown. However, this event is not getting captured. Sample code is as follows:
    public class dropdownsimple extends AbstractPortalComponent
                           public void onClick(Event event)
                           public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
                                                    IPageContext myContext1 = PageContextFactory.createPageContext(request, response);
              Form myForm = myContext1.createFormDocument("CRMForm");
              GridLayout myGrid = new GridLayout();
              DropdownListBox drp = new DropdownListBox("drp");
              drp.addItem("Key 1","Item 1");
              drp.addItem("Key 2","Item 2");
              drp.setOnSelect("onClick");
                                                     myGrid.addComponent(1, 1, drp);
              myForm.addComponent(myGrid);
              myContext1.render();
    I am able to see the dropdown box along with values when I preview the PAR iView created from this component. Please let me know how to capture the event of change of selection in the dropdown?
    Edited by: Shetul Chothani on Jun 21, 2011 6:37 AM

    Hi,
    Change this line
    drp.setOnSelect("onClick");
    to
    drp.setOnSelect("click");
    and leave the line
    public void onClick(Event event)
    as it is, and it should work just fine.
    I.e., if you name your event "fooBar", the event handler should be named "onFooBar"
    Cheers,
    Robin

  • WEB IC tableViewColumn

    Hi ,
    On WebIC, we have following code on a bespoke BSP view
    <htmlb:tableViewColumn columnName="TEMPLATE"
                                       wrapping="TRUE"
                                       width="5%"
                                       title="Request"
                                       onCellClick="GoTrans"/>
    When the user clicks on the "Request" column, 'activity creation' transaction get triggered. The issue/problem is when we click the column with mouse everything works fine. But when the user reaches the appropriate column by pressing 'TAB' and presses 'enter' on the column, 'onCellClick' does not get triggered. Any suggestions on how to go about it ? The requirement is that it should work with enter button as well as with the mouse click.
    Regards,
    Vin

    Hi Vinayak
    You might get a better response if you posted this HTMLB specific question to the HTMLB forum.
    Regards
    Vivek

  • Drowndown list

    Hi,
    i am developing a new bsp page for blackberry.I am using pure HTML not "HTMLB"  my question is,
    how can i get the value of the selected dropdownlist index?I coulnt find anything about this topic posted before.

    Hi ,
    Ok i got ur problem and here is a solution too.
    if the BSP is stateless, create a page attribute called "drop1" and check the Auto checkbox.
    <form method="POST">
    <SELECT NAME="drop1" >
    <OPTION VALUE="1">car</option>
    <OPTION VALUE="2">plane</option>
    <OPTION VALUE="3">train</option>
    </SELECT>
    <INPUT type="submit" value="Go">
    </form>
    </body>
    </html>
    on input processing
    case event_id.
    when 'go'.
    write your code here like move drop1 to varible etc etc.
    endcase.
    hope you have understood it,
    cheers,
    bhavana

  • Question about HTMLB:tableView with nested tag

    Dear experts.
    1. I have one question that can I code like below.
    2. And what is the mean of "$something$". when I run the page I met the error $TVCID$ is no more supported from design2003.
    <htmlb:tableViewColumn  columnName    = "myicon"
                            type          = "user"
                            title         = "Image"
                            horizontalAlignment="center" >
         <htmlb:link         id            = "$TVCID$"
                             onClick       = "$CARRNAME$"
                             tooltip       = "$CARRNAME$">
          <htmlb:image        src           = "$TVCVALUE$"
                              alt           = "$TVCVALUE$"
                              tooltip       = "$CARRNAME$" />
         </htmlb:link>
    </htmlb:tableViewColumn>

    Hi.
    You have more options to solve the problem.
    First you can set your design to 2002.
    <htmlb:content design = "DESIGN2002" >
    or
    you can use an iterator
    or
    you can use the following code
    <htmlb:tableViewColumn columnName = "TVCVALUE"
                           type       = "LINK"
                           linkClickTarget = "ONCLICK" (<- InputProcessing)
                           title      = "Image"
                           horizontalAlignment = "center"
                           tooltip    = "CARRNAME" >
    </htmlb:tableViewColumn>
    Hope this helps
    Greetings
    Claudia

  • HTMLB Link usage, question

    I am new to HTMLB, question
       Button myButton = new Button("submitButton");
       myButton.setOnClick("sendName");
       myButton.setText("Go to Yahoo");
       myButton.setTooltip("Click here to go to Yahoo.");
      the implementation of onSendName
      public void onSendName(Event myName) throws PageException {
               String url = "http://www.yahoo.com";
               Link lk = new Link("mylink", "yahoo");
               lk.setReference("http://www.yahoo.com");
               lk.setTarget("_blank");
                      ??????? now what???
                     //How do I get to the link?
                     Please help fill in, appreciate:
       If this is the not the right way, any other way to achieve this?
    thanks much.
    Dave Wang

    Yes, Eric, thanks for the answer. in this case. I can substitute the button with a link. But
    In another scenario, I have a tableview, then every cell clicked will lead to a url generated based on the content of the table cell,
      for example, cell(1,2)="userABC", onCellClick() funciton will generate a Link to: "http://xxx?userid=userABC". When user clicks cell(1,2), it should go to the generated URL.
    It would be great if I can generate the link then direct the browser to the URL at onCellClick().
    How do I handle this case?
    thanks for any suggestions.
    Dave Wang

  • Question on HTMLB page form Validation

    Hi Group,
    How to validate a HTMLB page?
    Like suppose, I have a few input fields and I hope we can go with using a Java Script in it to validate the form. But, how to do validate?
    Please let me know how to valid some input fields in HTMLB page?
    Thanks in advance.
    Regards,
    Vishnu.

    ok what you are asking is,
    if the check is successfull the form should get submitted and else it should not get submitted and stay on the same page.
    define the htmlb:button with both onclientclick and onclick.
    in on clientclick add your js.
    in that js, if the check fails add the following line
    htmlbevent.cancelSubmit = true;
    sample code.
    onClientClick = "var Check = false; Check = confirm('k2?');if(Check == false){ htmlbevent.cancelSubmit = true; }"
    Regards
    Raja

  • Question on HTMLB

    Hi,
    I have a list of data in a Iterator.
    I want to iterate through it and sisplay the values in grid layout cells within the grid layout.
    For this I need grid layout cells to be created dynamically. So can the rowIndex property be set to say "<% =counter %>" where counter is an incrementing variable during the iteration.
    When I did this I get this error:
    <i>An exception occurred while processing a request for :
    iView : DynOne.DynOne
    Component Name : DynOne.DynOne
    For input string: "".
    Exception id: 03:13_18/09/06_0177_17835450
    See the details for the exception ID in the log file</i>

    Hi,
    Yes the row index can definetely be set to the jsp expression as you said like <%=counter %>.
    I think the counter variable you used is of integer type,try converting it to string and use the string variable bcoz rowIndex property shud be set to string only.
    Hope it works..
    Also Can you post the detailed error?
    Cheers,
    Santhosh

  • How do you use classlib instead of taglib?

    Hi!
    Perhaps a very novice-like question but I just don't know what to do. I'm trying to build a tree and want to use the function where you can click a treenode. The problem is that there is no tag for this but you have to use "setOnNodeClick" in the classlib instead. In the "PDK-portal" see "Examples/HTML Business Controls/" and then "Tree". Choose "Documentation" and in the new window "Tree.jsp". There you will see a complete jsp-file that will work as it is. If you then chose "Control API for Tree" you will see the controls for Tree and another code example for both taglib and classlib. The problem is that they are not complete and don't show how to incorporate the classlib. Is it used in a jsp file what so ever or in the dynPage??? If used in jsp file, is there any equivalent classlib-things to the content and page tags? And the line "Form form=(Form)this.getForm(); naturally renders an error since there is no such method in the example! I would like to see a full example in order to understand this.
    Regards
    Benny

    You can use the classlib functions in either your java code or in the jsp.
    Here is an example of using the classlib in jsp for the button control
    <hbj:form id="myDisplayResultsFormId">
         <hbj:button id="buttonNewSearch"
                text="New Search"
                width="50"
                onClick="onButtonNewSearchClicked"
         >
         <% myDisplayResultsFormId.setDefaultButton(buttonNewSearch);  %>
         </hbj:button>
    </hbj:form>
    note the classlib function comes before the end of the button control but outside the button def.
    Under the htmlb documentation you can access the control API which will list all of the taglib and classlib usages showing the equivalents. there is almost always an equivalent classlib for each taglib but there are lots of classlib methods without equivalent taglib entries.
    Hope this helps

  • Error in HTMLB page

    hi,
    please try to give me a solution to the following error araised in the HTMLB.
    i have designed a jsp page using htmlb with several controls, that is online application form so we have more controls there, till now it worked, but now when trying to create any control after the last control it is giving the error as....
    <b>
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Error in executing a process for compilation, C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/htmlbcon/work/pagelet/_sapportalsjsp_gridlay.java:35: code too large for try statement try { ^ C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/htmlbcon/work/pagelet/_sapportalsjsp_gridlay.java:5506: code too large for try statement } catch(IOException jspioex) {} ^ C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/irj/servletjsp/irj/root/WEB-INF/portal/portalapps/HTMLBcon/work/pagelet/_sapportalsjsp_Gridlay.java:22: code too large public void doContent(IPortalComponentRequest componentRequest, IPortalComponentResponse aResponse) ^ 3 errors .
    Exception id: 10:06_24/06/05_0029_1761750
    See the details for the exception ID in the log file</b>
    this error is not coming only with one control, any code we written after the last control that is checkbox group.
    i don't think it is a controls error or any syntax error.
    is there any code length limit in the jsp pages? if not what might be the problem?
    kindly consider the error.
    Thanks & Regards,
    sireesha.

    Hi Sireesha,
    see code too large for try statement and the link / hints provided there.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers or give some feedback what's your additional question - e.g. in various ways to communicate to the database Thanks in advance!

  • HTML Tags in HTMLB or How to shrink HTMLB ?

    Hi,
    I have a JSP page using HTMLB tags, which works fine in EP5. I am migrated this JSP in EP6 SP6 and now it gives me the following message:
    Error in executing a process for compilation, C:/usr/sap/EP6/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordinputform.java:5262: code too large for try statement } catch(IOException jspioex) {} ^ C:/usr/sap/EP6/JC00/j2ee/cluster/server0/apps/sap.com/irj/servletjsp/irj/root/WEB-INF/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordInputForm.java:4303: code too large for try statement try { ^ ...
    INF/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordInputForm.java:133: code too large for try statement try { ^ C:/usr/sap/EP6/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordinputform.java:22: code too large public void doContent(IPortalComponentRequest componentRequest, IPortalComponentResponse aResponse) ^ 57 errors .
    The error is because of intense use of HTMLB.
    The whole JSP page is one form.
    I did some research and found out that the Servletsize is limited to 65k Byte.
    Indeed, when i removed some HTMLB tags, it was working fine....
    The suggestions was to use the Include Directive
    <@ include page="other.jsp" > This will load the other jsp at Runtime.
    When i did this, the content of the HTMB was not converted to HTML, but it only copied the HTMLB tags directly after the <body>. (I included the <%@ taglib uri="tagLib" prefix="hbj" %>)
    When writing <tr> or <td> directly (to compress the HTML lines) using the JSPWriter (out) instead of the HTMLB tags, my HTML was ignored and did not appear in the HTML output.
    My question is: How can I add HTML in HTML or how can I shrink a huge HTMLB form ?
    Any ideas are welcome...
    Kai

    Hallo Kai,
    Asking about JSP in the BSP forum is about 66% correct. Both have SP in the name. Unfortunately the B is very important for us, and we are shy when it gets to gets about J. BSP is an environment similar to JSP, but based on ABAP. We also have a rendering library called HTMLB. But after that, the similarities stop.
    Unfortunately, we can not help you more, and would recommend any of the Java programming forums.

Maybe you are looking for

  • I can no longer search in the address bar, yahoo, or google. Help

    Not able to search in the address bar, yahoo search, google, and no google mail, or anything that I don't already have a link to in my most visited list or email i have received from them. I can't copy and paste because i'm writing you on my desktop.

  • Photoshop pics not displaying in iphoto 08

    Photoshop pictures are not displaying. Just a black photo appears. However, the photos do appear normal in Apple Preview. Why is this?

  • ZfD3.2, NetWare 6.0, XPsp2, will it work?

    I have a mixed TCP/IPX network. The servers are running NetWare 6.0SP4, ZfD3.2sp2. The workstations are Win2k and WinXP, client 4.83sp2, soon to be 4.90sp2 Expirements with the ZfD remote control show that we cannot make it work at all with Windows X

  • SAP - Cost Center Planning - Version 1

    Dear All Recently we have started to use the cost center planning through KP16 under plan version -1 However we are unable to down the plan data in excel with a cost center break up through KSBP report. We are not using any special ledger System is s

  • Installation Error Report:cpsid_82829s1: "A restart is pending," bootstrapper error has occurred.

    When installing DW CS6 I am getting the above error message. I have tried to restart my computer twice as advised to no avail. I then completed the suggested Registry Edit to no avail. The last action was to delete the InProgress Key which was not th