How to dynamically Set the list of flex contexts based on a condition

Database is in 11i atg rup7 level
first OAF page - shows list of employees under a manager
on clicking an employee record, the second OAF page opens and it shows a set of records from descriptive flexfield. Currently 5 contexts of the same flexfield are enabled for this responsibiltiy using the ContextA||Seg1|Seg2|Seg3||ContextB||Seg1|Seg2||ContextC||Seg1|Seg2|Seg3|Seg4||ContextD||Seg1|Seg|Seg3|Seg4||COntextE||Seg1|Seg2 in the personalisation at responsibility
So 5 sections(one for each context) are shown in the OA page
My requirement is to show only 3 contexts for employee 'A' and 5 contexts for the employee 'B'. Both the employees are under the same manager.So i think i cannot do a simple personalisation at responsibility level.
So assuming ,i have some parameter like person_id , how do i dynamically restrict to 3 or 5 contexts in my controller code?

Hi,
Use this :
OADescriptiveFlexBean descFlexfieldsBean = (OADescriptiveFlexBean)oawebbean.findIndexedChildRecursive("flexitemid");
descFlexfieldsBean.processFlex(oapagecontext);
if(descFlexfieldsBean != null)
descFlexfieldsBean.setFlexContextCode(pageContext,"ContextName");
Thanks,
Gaurav

Similar Messages

  • How to dynamically set the name of the generated PDF file sent by email

    Hello,
    I am using Reports 10g and I managed to send PDF reports by email, specifying the recipient, subject, format etc, using the reports servlet URL.
    But there is one thing that I cannot find a way to do: I want to dynamically set the name of the attached file. It defaults to the name of the RDF file (eg monthly_sales.pdf). I would like it to be something more meaningful (eg monthly_sales_072010.pdf, where 072010 is the month and year passed by parameters).
    Is it possible to do it?
    Thanks
    Luis

    Use System.load(...) instead of System.loadLibrary(...).

  • JSP, DataWebBean: How to dynamically set the where clause of query and display record

    Hi,
    I am reposting this question as per suggestions made by Mr. Dwight.
    I have used ViewCurrentRecord web bean to display records from EMP table. I have to use the Dept_Id_FK from the current
    record of the EMP table to display corresponding records of Dept table. I have a view object called DeptView in my Business
    Components which selects all the records from the Dept table.
    How do I get the value of Dept_Id_FK and use it to display the required records of the Dept table?
    I tried to declare a variable and get the value of Dept_Id_FK but it did not work. My code is as follows:
    <%! String m_DeptId = null; %>
    <jsp:useBean id="RowViewer" class="oracle.jbo.html.databeans.ViewCurrentRecord" scope="request">
    <%
    RowViewer.initialize(pageContext, "EMPApp_EMP_EMPAppModule.EMPView1");
    RowViewer.setReleaseApplicationResources(false);
    RowViewer.getRowSet().next();
    m_DeptId = (String)RowViewer.getRowSet().getCurrentRow().getAttribute("DeptIdFk");
    %>
    </jsp:useBean>
    Thanks.
    null

    First of all, Thank you very much for making use of the new topic format. It is very much appreciated.
    As for your question, I think there are several different ways to accomplish what I think you want to do.
    1. Create a view object that includes both Emp and Dept entities and join them there. In this case, your query would look something like this:
    Select e.empno,e.name,...,d.dname,d.loc from emp e, dept d
    where e.deptno = d.deptno
    You should be able to create a JSP off of this view object that contains both the employee and department information. In this case, BC4J takes care of the foreign key to primary key coordination.
    2. In order to set a dynamic where clause for a view, you need to do the following in your usebean tag:
    rsn.initialize(application,session, request,response,out,"DeptView");
    rsn.getRowSet().getViewObject().setWhereClause("deptno=" &#0124; &#0124; m_DeptId);
    rsn.getRowSet().getViewObject().executeQuery();
    rsn.getRowSet().first();
    You will need to do this in a separate usebean tag from the EmpView, since the usebean can only initialize one view object.
    In other words, you would have your ViewCurrentRecord bean tag for the EmpView, then a separate one for the DeptView where you use the above code to set the where clause to display just the information for the department you want.
    Another option, but one I'm not sure would work as well, is to create a master-detail JSP to do this for you. Usually a master-detail is a one-to-many (one department to many employees). Your request appears to be the reverse, but might still be doable using the same mechanism.
    You set up relationships between views in your BC4J project using View Links. If you used the BC4J project wizard and created default views, some of these links may have been created for you. They are created when BC4J detects a foreign key to primary key relationship in the database.
    You can create your own View Links using the View Link wizard. Select your BC4J project node and choose Create View Link... from the context menu. You will be asked to select a source view (Emp), and a target view (Dept), then select the attribute in each view that related the two of them (deptno).
    Next, you need to reflect this new relationship setting in your application module. Select your app module and choose Edit from the context menu. On the data model page, select the EmpView node in the Selected list. Now select the DeptView node in the available list and shuttle it over. You should see DeptView1 via yourlink appear indented under the EmpView node. Save and rebuild your BC4J project to reflect the changes.
    In your JSP project, you can now have the wizard create a master-detail form for you based on DeptView1.
    Let me know if the above answers your question, or if I have misunderstood what it is you wanted to do.
    null

  • How to dynamic set the X date series...

    Hi,
    I set the X axis date value interval 1 so it can show as a daily "date", however, the chart is good if the data point is within 24 records. However, when I draw 7 days data (around 168 records), the x axis date lable will be messed up and cannot
    view the actual date values.
    Could you advise a formular to evaluate the returned data set, if it is bigger than a variable (e.g 168 or returned data set records is larger than 168 then it will set to auto) ??
    Thanks

    Hi kkcci88888,
    According to your description, you create a chart and many values display on X axis, then you can’t see the actual date value clearly. So you want to make X axis values group on date, right?
    In your scenario, since there are too many records within 7 days, it will have too many date appear on the category (X-axis). However, we could specify the dataset fields group on day values, and make label displays as YYYY-MM_DD using expression. Please
    refer to steps below:
    1. Specify Label with expression Category Group Properties like below:
    =Year(Fields!date.Value)&"-"&Month(Fields!date.Value)&"-"&day(Fields!date.Value)
    2. Specify the Group on expression Category Group Properties like below:
    =day(Fields!date.Value)
    3. Preview the report.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Does SSRS dynamically set the alignment of table cells based on the majority of cell types in the column???

    This is the first time I've run into this, but it appears that SSRS is setting the text-align based on the other cells in the column.  I have cells being set with either a dataset item of type System.Double or to "--" when Is Nothing evaluates
    to true.  I never noticed before that if the majority of the cells in the column are Nothing, then the few that aren't Nothing get aligned to the left along with all of the "--" text items.  And now I also see columns where the opposite
    is also happening, where if the majority of the cells in the column are numeric values, then everything is aligned right, even the few "--" items there.  I'm only using Default TextAlign and VerticalAlign, and no Indent, SpaceAfter or SpaceBefore,
    nor any concatenated text or embedded preserved spaces.
    Has anyone else in the SSRS universe seen this, and does anyone know why or have a good workaround for it?
    Thanks in advance : )

    Are you viewing the report in html format or are you looking in some other format like Excel,CSV etc?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Dynamically setting the vo attribute Update property

    Hi All,
    Can we set the vo attribute update property dynamically.if so please let me know how can we achieve this.
    I have a read only view..But in my process request i need to set the value for that attribute based on some condition.
    How can i achieve this.I cant set at bean level.only row level i need to set.
    Its a dynamically created seeded vo.
    Please help.
    Thanks
    Bharat

    Hi,
    Capture the VO row and then set the value on the view attribute.
    OAViewObject vo = (OAViewObject)am.findViewObject("viewinstance");
    If(vo!=null)
    Row row = (Row)vo.first();
    row.setAttribute("Attribute Name", "Value");
    Thanks,
    Gaurav

  • How can I set the OS to show list view when I open a file in an application.

    So I know you can chose view options in Finder to always show files in list view there. But how do you set the OS to do the same when opening files in an application.

    Okay, cheers, so I guess it's stored in the application prefs. I just installed Snow L last week and it bothered me that everytime I opened a document I had to set my pref again. I wasn't aware that it was storing it for that particular app though cause I'm using so many differnt apps. But you are right, it does store for the individual app. Cheers for the answer!

  • How do you dynamically set the flat file name

    Within my process flow I call a mapping. Within this mapping I have a flat file operator (which creates and writes to a .csv file). All working great.
    From this process flow I want to be able to pass a parameter to the mapping (which I can do), and use the value of this parameter as the file name of the .csv file. But I can’t seem to be able to dynamically set the ‘Default physical file name’ to this parameter value within the mapping.
    Does anyone have any ideas?
    Thanks
    Ansel

    Hi Ansel
    Check out the blog entry here;
    http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$154
    You can use an expression.
    Cheers
    David

  • How do I set the frame size

    I am Making a program for purchasing games, with the basic layout alsot done, except on problem. When the purchase button is pressed, a dialog shows up but nothing is seen until i resize it. How would i set the frame size so that i do not need to resize it each time? below is the code for the files. Many thanks in advance.
    CreditDialog
    import java.awt.*;
    import java.awt.event.*;
    class CreditDialog extends Dialog implements ActionListener { // Begin Class
         private Label creditLabel = new Label("Message space here",Label.RIGHT);
         private String creditMessage;
         private TextField remove = new TextField(20);
         private Button okButton = new Button("OK");
         public CreditDialog(Frame frameIn, String message) { // Begin Public
              super(frameIn); // call the constructor of dialog
              creditLabel.setText(message);
              add("North",creditLabel);
              add("Center",remove);
              add("South",okButton);
              okButton.addActionListener(this);
              setLocation(150,150); // set the location of the dialog box
              setVisible(true); // make the dialog box visible
         } // End Public
         public void actionPerformed(ActionEvent e) { // Begin actionPerformed
    //          dispose(); // close dialog box
         } // End actionPerformed
    } // End Class
    MobileGame
    import java.awt.*;
    import java.awt.event.*;
    class MobileGame extends Panel implements ActionListener { // Begin Class
         The Buttons, Labels, TextFields, TextArea 
         and Panels will be created first.         
         private int noOfGames;
    //     private GameList list;
         private Panel topPanel = new Panel();
         private Panel middlePanel = new Panel();
         private Panel bottomPanel = new Panel();
         private Label saleLabel = new Label ("Java Games For Sale",Label.RIGHT);
         private TextArea saleArea = new TextArea(7, 25);
         private Button addButton = new Button("Add to Basket");
         private TextField add = new TextField(3);
         private Label currentLabel = new Label ("Java Games For Sale",Label.RIGHT);
         private TextArea currentArea = new TextArea(3, 25);
         private Button removeButton = new Button("Remove from Basket");
         private TextField remove = new TextField(3);
         private Button purchaseButton = new Button("Purchase");
         private ObjectList gameList = new ObjectList(20);
         Frame parentFrame; //needed to associate with dialog
         All the above will be added to the interface 
         so that they are visible to the user.        
         public MobileGame (Frame frameIn) { // Begin Constructor
              parentFrame = frameIn;
              topPanel.add(saleLabel);
              topPanel.add(saleArea);
              topPanel.add(addButton);
              topPanel.add(add);
              middlePanel.add(currentLabel);
              middlePanel.add(currentArea);
              bottomPanel.add(removeButton);
              bottomPanel.add(remove);
              bottomPanel.add(purchaseButton);
              this.add("North", topPanel);
              this.add("Center", middlePanel);
              this.add("South", bottomPanel);
              addButton.addActionListener(this);
              removeButton.addActionListener(this);
              purchaseButton.addActionListener(this);
              The following line of code below is 
              needed inorder for the games to be  
              loaded into the SaleArea            
         } // End Constructor
         All the operations which will be performed are  
         going to be written below. This includes the    
         Add, Remove and Purchase.                       
         public void actionPerformed (ActionEvent e) { // Begin actionPerformed
         If the Add to Basket Button is pressed, a       
         suitable message will appear to say if the game 
         was successfully added or not. If not, an       
         ErrorDialog box will appear stateing the error. 
              if(e.getSource() == addButton) { // Begin Add to Basket
    //          GameFileHandler.readRecords(list);
                   try { // Begin Try
                        String gameEntered = add.getText();
                        if (gameEntered.length() == 0 ) {
                             new ErrorDialog (parentFrame,"Feild Blank");
                        } else if (Integer.parseInt(gameEntered)< 0
                                  || Integer.parseInt(gameEntered)>noOfGames) { // Begin Else If
                             new ErrorDialog (parentFrame,"Invalid Game Number");
                        } else { // Begin Else If
                             //ADD GAME
                        } // End Else
                   } catch (NumberFormatException num) { // Begin Catch
                        new ErrorDialog(parentFrame,"Please enter an Integer only");
                   } // End Catch
              } // End Add to Basket
         If the Remove From Basket Button is pressed, a  
         a suitable message will appear to say if the    
         removal was successful or not. If not, an       
         ErrorDialog box will appear stateing the error. 
         if(e.getSource() == removeButton) { // Begin Remove from Basket
              try { // Begin Try
                        String gameEntered = remove.getText();
                        if (gameEntered.length() == 0 ) {
                             new ErrorDialog (parentFrame,"Feild Blank");
                        } else if (Integer.parseInt(gameEntered)< 1
                                  || Integer.parseInt(gameEntered)>noOfGames) { // Begin Else If
                             new ErrorDialog (parentFrame,"Invalid Game Number");
                        } else { // Begin Else If
                             //ADD GAME CODE
                        } // End Else
                   } catch (NumberFormatException num) { // Begin Catch
                        new ErrorDialog(parentFrame,"Please enter an Integer only");
                   } // End Catch
              } // End Remove from Basket
         If the purchase button is pressed, the          
         following is executed. NOTE: nothing is done    
         when the ok button is pressed, the window       
         just closes.                                    
              if(e.getSource() == purchaseButton) { // Begin Purchase
                   String gameEntered = currentArea.getText();
                   if (gameEntered.length() == 0 ) {
                        new ErrorDialog (parentFrame,"Nothing to Purchase");
                   } else { // Begin Else If
                        new CreditDialog(parentFrame,"Cost � 00.00. Please enter Credit Card Number");
                   } // End Else               
              } // End Purchase
         } // End actionPerformed
    } // End Class
    RunMobileGame
    import java.awt.*;
    public class RunMobileGame { // Begin Class
         public static void main (String[] args) { // Begin Main
              EasyFrame frame = new EasyFrame();
              frame.setTitle("Game Purchase for 3G Mobile Phone");
              MobileGame purchase = new MobileGame(frame); //need frame for dialog
              frame.setSize(500,300); // sets frame size
              frame.setBackground(Color.lightGray); // sets frame colour
              frame.add(purchase); // adds frame
              frame.setVisible(true); // makes the frame visible
         } // End Main
    } // End Class
    EasyFrame
    import java.awt.*;
    import java.awt.event.*;
    public class EasyFrame extends Frame implements WindowListener {
    public EasyFrame()
    addWindowListener(this);
    public EasyFrame(String msg)
    super(msg);
    addWindowListener(this);
    public void windowClosing(WindowEvent e)
    dispose();
    public void windowDeactivated(WindowEvent e)
    public void windowActivated(WindowEvent e)
    public void windowDeiconified(WindowEvent e)
    public void windowIconified(WindowEvent e)
    public void windowClosed(WindowEvent e)
    System.exit(0);
    public void windowOpened(WindowEvent e)
    } // end EasyFrame class
    ObjectList
    class ObjectList
    private Object[] object ;
    private int total ;
    public ObjectList(int sizeIn)
    object = new Object[sizeIn];
    total = 0;
    public boolean add(Object objectIn)
    if(!isFull())
    object[total] = objectIn;
    total++;
    return true;
    else
    return false;
    public boolean isEmpty()
    if(total==0)
    return true;
    else
    return false;
    public boolean isFull()
    if(total==object.length)
    return true;
    else
    return false;
    public Object getObject(int i)
    return object[i-1];
    public int getTotal()
    return total;
    public boolean remove(int numberIn)
    // check that a valid index has been supplied
    if(numberIn >= 1 && numberIn <= total)
    {   // overwrite object by shifting following objects along
    for(int i = numberIn-1; i <= total-2; i++)
    object[i] = object[i+1];
    total--; // Decrement total number of objects
    return true;
    else // remove was unsuccessful
    return false;
    ErrorDialog
    import java.awt.*;
    import java.awt.event.*;
    class ErrorDialog extends Dialog implements ActionListener {
    private Label errorLabel = new Label("Message space here",Label.CENTER);
    private String errorMessage;
    private Button okButton = new Button("OK");
    public ErrorDialog(Frame frameIn, String message) {
    /* call the constructor of Dialog with the associated
    frame as a parameter */
    super(frameIn);
    // add the components to the Dialog
              errorLabel.setText(message);
              add("North",errorLabel);
    add("South",okButton);
    // add the ActionListener
    okButton.addActionListener(this);
    /* set the location of the dialogue window, relative to the top
    left-hand corner of the frame */
    setLocation(100,100);
    // use the pack method to automatically size the dialogue window
    pack();
    // make the dialogue visible
    setVisible(true);
    /* the actionPerformed method determines what happens
    when the okButton is pressed */
    public void actionPerformed(ActionEvent e) {
    dispose(); // no other possible action!
    } // end class
    I Know there are alot of files. Any help will be much appreciated. Once again, Many thanks in advance

    setSize (600, 200);orpack ();Kind regards,
      Levi
    PS:
        int i;
    parses to
    int i;
    , but
    [code]    int i;[code[i]]
    parses to
        int i;

  • How do I set the default welcome page for PUBLIC user

    gurus,
    i'm using -
    Oracle 9i Database
    Oracle 9ias Portal Release 2
    QUESTION => how do I set the default welcome page for the PUBLIC user.
    i did the following to achieve this -
    1. logged into portal
    2. clicked on builder
    3. clicked on administer tab
    4. selected PUBLIC user in the Portal User Profile portlet
    5. went to the preferences tab
    6. in the default home page selected a custom page group
    7. logged out of portal
    8. open a new browsere session
    9. type the portal URL and i get the login page ....??
    i'm unable to understand this behavior ... shouldn't i be getting the page group that i set for the PUBLIC user in step 6 above ....
    the second QUESTION is => when the user logs out he/she should see the PUBLIC page set in step 6 above ... but, instead the user sees a page that is as follows -
    Partner Application Name Logout Status [Logout Status]
    Oracle Portal (portal) logout status
    The SSO Server (orasso) checkmark
    buzz.resva.trw.com:7778 checkmark
    infrastructure.happy.resva.trw.com checkmark
    portal1.buzz.resva.trw.com checkmark
    portal2.sylvester.resva.trw.com checkmark
    sylvester.resva.trw.com:7778 checkmark
    so, how can i set the default page for the PUBLIC user and also a page when he user logs out.
    ideas anyone ....?
    thanx a bunch.
    hero

    Hi,
    The sequence of operation you are doing to set the home page for public users is correct. You are getting the login screen as the "custom page group" selected as "home page" has not been granted to public.
    Also, while logging-out, it is normal behaviour to get the screen where it shows the list of partner applications from where user has been logged-out. When you click on "Return" button, you will get to the "home page" set above.
    Hope it clarifies the things.
    Regards,
    Ved

  • How can I set the default line height?

    Greetings,
    I have a report that displays observed behavior in a list format like the one below:
    Behavior Observed:   
        Withdrawn           
        Happy
        Sad
        angry
    There are 5 responses as to the severity of the behavior or it is left blank if the behavior was within normal limits.
    So the output would look like this:  
    Behavior Observed:   
        Withdrawn            (mild)
        Happy
        Sad                      (moderate)
        angry
    The problem is that when this report was designed the details sections were not uniformy formatted and the spacing between data elements is hard to follow from the label to the data field.  I tried to set the details to be uniform by selecting "Arrange Lines",  however when I do this, the data is displayed too close horizontally.  So my question is how do I set the default line height for each field so that they are uniform in distance from each other but not too close due to the font height?
    Does this make sense?
    Thank you,
    Kevin

    I'm confused... How are you associating line height with horizontal field spacing???
    If you have this...
    Behavior Observed:     Severity:
    Withdrawn          (mild)
    Happy
    Sad               (moderate)
    angry
    But want it to look like this...
    Behavior Observed:
    Withdrawn (mild)
    Happy
    Sad (moderate)
    angry
    all you have to do is create a concatenation formula. Something like this...
    {TableName.BehaviorObserved} & " (" & {TableName.Severity} &")"
    Sorry if I've misunderstood what you are trying to do.
    Jason

  • How do I set numbered lists for headings in Pages 5.2, and keep that system of numbered lists saved?

    I have tried to set numbered lists for headings in Pages 5.2 but have not succeeded. I have read similar questions concerning this but this has not helped me...
    When I say numbered lists I mean something extremely important and simple, for instance:
    1. Introduction
    1.1. Background
    1.2. Purpose and Questions
    2. The Legality of Clause X
    2.1. Legality under Article 101.1
    2.2. Legality under Article 101.3
    And so on...
    Heading 1. is selected as "Heading", 1.1 is selected as "Heading 2", and if I had 1.1.1 it would be selected as "Heading 3" and so on...
    I have navigated my way to the Format window, and under the tab "Style" and down to "Bullets & Lists". I have here selected the following: Numbered, Numbers, 1. 2. 3. 4., Tiered Numbers, Continue from previous.
    There are several problems with this currently.
    First, based on the example it becomes "2. Background" when it should be "1.1 Background" instead.
    Second, after writing some body text between the headings and then select a new heading, all the previously selected settings I mentioned above in "Bullets & Lists" have to be reselected.
    So, how do I set numbered lists for headings, or so called sub-headings, in Pages 5.2? And how do I keep that selected system of numbered lists saved so I don't have to retype it for every new heading I type? (e.g. so that Pages knows that every time I choose Heading 2, I want it to number the heading in the way selected)
    Obviously, manually writing the numbers for every heading is not a viable option, as it makes table of contents problematic and is simply tedious. You need an automatic way of doing it, especially if you write long documents where keeping headings in order is absolutely essential.
    Also, reverting back to previous Pages versions (like v. 9 I think?) is not an option as that does not exist on my recently purchased Macbook Pro.
    I need to be able to do this on Pages 5.2 and do it automatically.
    I appreciate any help with this.

    iWork '09 is not "outdated" it still works and works extremely well and whilst not perfect with MsWord it is far far better than Pages 5.2 which has a stream of major issues with exporting. It is also way better and faster to use than Microsoft Office.
    So what is your time and work actually worth? If it is less than $19.99 for 6 months, you may as well just chuck it in and take that job on minimum wages.
    You are assuming things for Office 2014 with absolutely no inside knowledge. Much as we assumed Pages 5 was going to be the long awaited improvement, but ended up being a downgrade to match the iOS version, Microsoft is headed the same way with their mobile versions.
    This is not like getting the "latest" pair of pants where you go with the crowd and throw out your cigarette legs which replaced the flares, which replaced your low cuts which replaced your cigarette legs, which replaced…
    This is work.
    If it does the job and does it well, use it. There is nothing out there to really match what Pages '09 does. Yet.
    LibreOffice can do most but not all, but has a UI that only a mother could love. It's great redemption is that it uses both open formats and the standard Microsoft formats and is under active development. It also opens and saves to just about everything. When they finally work out the Pages formats, I'm sure they will open those as well.
    I use a lot of professional software. Just because the publisher's marketing department says change the product so we can sell more, doesn't mean you have to pay any attention whatsoever. Adobe being a classical example. Most designers are just ignoring their latest subscription based bloatware and getting on with their work.
    Peter

  • How do I set the default text in a bound textbox?

    How do I set the default value of a bound textbox when the AddNewItem button on the MenuStrip is clicked?
     I have the following code (see below), but for some reason it does work when I put the code in the
    AddNewItem_Click event; however, it does work if I put it in the
    Form's Load Event. The statement in question is Me.txtBusUsagePct.Text = 100.
    What am I doing wrong? Why can't I set the default text in the AddNewItem_Click
    event?
       Private Sub BindingNavigatorAddNewItem_Click(sender As Object, e As EventArgs) Handles BindingNavigatorAddNewItem.Click
    Me.txtBusUsagePct.Text = "100"
       End Sub
    BobV365

    Hello,
    Here I am using mocked up data but the important thing is after loading the data. Requires on the form a BindingNavigator and two text boxes.
    Public Class Form1
    WithEvents bsData As New BindingSource
    Private Sub Form1_Load(
    ByVal sender As System.Object,
    ByVal e As System.EventArgs) Handles MyBase.Load
    Using MockedData As New DataTable()
    MockedData.Columns.AddRange(New DataColumn() _
    New DataColumn("PartName", GetType(String)),
    New DataColumn("partqty", GetType(Int32))
    MockedData.Rows.Add(New Object() {"Part A", 100})
    MockedData.Rows.Add(New Object() {"Part 99", 34})
    MockedData.Rows.Add(New Object() {"Part B", 4})
    bsData.DataSource = MockedData
    End Using
    CType(bsData.DataSource, DataTable).AcceptChanges()
    BindingNavigator1.BindingSource = bsData
    TextBox1.DataBindings.Add("Text", bsData, "Partname")
    TextBox2.DataBindings.Add("Text", bsData, "partqty")
    End Sub
    Private Sub bsData_AddingNew(
    ByVal sender As Object,
    ByVal e As System.ComponentModel.AddingNewEventArgs) _
    Handles bsData.AddingNew
    Dim dv As DataView = TryCast(bsData.List, DataView)
    Dim rv As DataRowView = dv.AddNew()
    rv("PartName") = "(new)"
    rv("partqty") = 0
    e.NewObject = rv
    bsData.MoveLast()
    End Sub
    End Class
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile
    but do not reply to forum questions.

  • How can I set the language when sending an e-mail with attachment - 'Html'?

    "Character Broken"
    I made an ALV program, and this convert to "HTML',  and send an e-mail with this.
    Used Process is:
    DATA: gt_abaplist LIKE TABLE OF abaplist,
          gt_html LIKE TABLE OF w3html,
          doc_chng LIKE sodocchgi1,
          objpack LIKE TABLE OF sopcklsti1 WITH HEADER LINE,
          objhead LIKE TABLE OF solisti1 WITH HEADER LINE,
          mail LIKE TABLE OF solisti1 WITH HEADER LINE,
          reclist LIKE TABLE OF somlreci1 WITH HEADER LINE,
          lv_line TYPE i.
    DELETE FROM MEMORY ID '%_LIST'.
    SUBMIT z_template
       AND RETURN EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = gt_abaplist
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
      TABLES
        html       = gt_html
        listobject = gt_abaplist.
    doc_chng-obj_name   = 'URGENT'.
    doc_chng-sensitivty = 'O'.
    doc_chng-obj_descr  = ' '.
    doc_chng-obj_langu  = '3'.
    objhead-line        = ' '.
    APPEND objhead.
    mail[] = gt_html[].
    DESCRIBE TABLE mail LINES lv_line.
    CLEAR: objpack.
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = lv_line.
    objpack-doc_type   = 'htm'.
    objpack-obj_descr  = ' '. 
    objpack-doc_size   = lv_line * 255.
    objpack-obj_langu = '3'.
    APPEND objpack.
    CLEAR: reclist.
    reclist-receiver = 'e-mail address'.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = doc_chng 
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = objpack
        object_header              = objhead
        contents_bin               = mail
        receivers                  = reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        OTHERS                     = 8.
    SUBMIT rsconn01 AND RETURN.
    I want to show  this by "Japanese".
    But the character is broken.
    LIke This:
    u01D1u072C          u0205|            u0205u072C          u0508           QC u04B90m
    How can I set the language?  How can I solve "Charancter Broken" ?
    Plesse, let me know.
    Thank you so much.
    Edited by: Jaime White 999 on Nov 21, 2011 8:45 AM
    Edited by: Jaime White 999 on Nov 21, 2011 8:46 AM

    Hi Jaime,
    Are you saying, you are getting junk characters in the email attachment? Then pls check the following. Since you want to send Japanese fonts, please pass language 'J' in both  objpack-obj_langu = '3' & doc_chng-obj_langu  = '3' instead of '3' please replace it with 'J'.
    Another thing which you may have to check is the SCOT device type. As I understand from my basis colleague, this may also affect your attachment fonts since the emails are sent through SCOT. Go to transaction SCOT-> Settings-> Device types for format conversion. Check whether wrong device type is defined for Japanese there. Hope this helps
    Regards,
    Gokul

  • How do I set the CoreTable sort column in the managed bean?

    I have a CoreTable with two columns, first name and company, from the managed bean in a session scope, how do I set the company column to be the default/selected sort order?
    Or is that done by binding the af:column to a CoreColumn object in the managed bean, which method would I use?
    <af:column sortProperty="company" sortable="true">
    <f:facet name="header">
    <af:outputText value="#{common.labelCompany}"/>
    </f:facet>
    <af:outputText value="#{row.company}"/>
    </af:column>
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, I know, "sortable", see, I even used it in my example. I don't want to disable default sorting.
    What I'm asking is how to have more than one sortProperty. When the user clicks the column heading, I want to sort by "myFirstProperty" AND "mySecondProperty". The sortProperty only seems to allow one sort property.
    One possibility seems to be to programatically add items to the List of SortCriterion objects as in your example, but where would I put this code so that it is executed when the user clicks the column heading, but before the table is sorted.

Maybe you are looking for

  • Licensing of this product has stop working (since uninstall using your uninstaller)

    Since couple of months ago (May be june or July)  i have notifications below when i want to use Adobe Premiere Pro cs4 "Licensing of this product has stop working, This product has has encounter problem which requeire that you restart your computer b

  • PXI-8106 Maximum Hard Drive Size

    I would like to upgrade the hard drive in a PXI-8106 controller. What is the largest hard drive that can be used without problems? Thanks for the help in advance.

  • Synchronizing Contacts with Nokia 6500

    Hello I replaced my old Nokia 6230i with the Nokia 6500. The first time I got it, I immediatly synced my contacts to my new Nokia phone through Isync. Went pretty well, only 3 contacts gave problems. Now after a month on Holiday I tried to update (sy

  • High Priority, Change PO output enhancement / userexit?

    Hello guru's, Will anyone guide me. I have an issue, if i go to change mode of a PO (ME22N) and delete the existing Output Medium (Fax, Printer,IDOC,..) etc,. it shouldn't send any output after saving the Order.  Is there any user exit existing withi

  • Queue Name Configuration

    Hi Team, Scenario: A custom Bdoc is created for replication of Business transaction from CRM to R3 (only 1 way). This is working fine. But when we check transaction SMW01 ( or Bdoc header tables), there is no queue name created. If we take a similar