How to customize SORT event in the View Form ?

I'm using Jdevelper 9.0.3 with BC4J+UIXML, and I need customize the View Object Query, including "bind variables" as:
SELECT A.COD_CLIENTE,
A.NUM_TESTE,
A.NOM_TESTE
FROM TESTE A
WHERE A.COD_CLIENTE = :1
I create the java class for prepare assign values to View Object as:
//Nome da Package da Tela Detail
package br.com.siadem.siaed.ed00010;
// Importa as Bibliotecas necessárias
import oracle.jbo.ViewObject;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.servlet.event.EventResult;
import oracle.cabo.data.jbo.servlet.bind.*;
import oracle.cabo.ui.data.BoundValue;
import oracle.cabo.ui.data.DataBoundValue;
import br.com.siadem.siaed.util.*;
public class FunPreQuery
public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
TrataDadosSessao varDadosSessao = new TrataDadosSessao();
// Configura os Parametros
String valor1 = varDadosSessao.getCodCliente();
// Cria o objeto ViewObject para a difinição dos parametro na Query
ViewObject view = ServletBindingUtils.getViewObject(context);
// Configura os parametros na query do ViewObject
view.setWhereClauseParam(0,valor1);
// Executa a Query
view.executeQuery();
// Retorna o Resultado para a Página
return new EventResult(page);
This works very well customizing the "Search" event in the View form as:
<event name="search" >
<!-- using the ApplicationModule causes it to be checked out from the
ApplicationPool. It is released using stateful mode. -->
<bc4j:findRootAppModule name="TesteView1AppModule" >
<!-- establish the ViewObject scope -->
<bc4j:findViewObject name="TesteView1" >
<!-- search for the view criteria -->
<bc4j:findByExample>
<bc4j:exampleRow ignoreCase="true" >
<bc4j:exampleAttribute>
<bc4j:nameBinding><bc4j:parameter name="attrName" /></bc4j:nameBinding>
<bc4j:valueBinding><bc4j:parameter name="attrValue" /></bc4j:valueBinding>
</bc4j:exampleAttribute>
</bc4j:exampleRow>
</bc4j:findByExample>
<method class="br.com.siadem.siaed.ed00010.FunPreQuery"
method="FunConfiguraQuery"/>
<!--<bc4j:executeQuery/>-->
<!-- store the current search criteria as page properties -->
<bc4j:setPageProperty name="attrName" >
<bc4j:parameter name="attrName" />
</bc4j:setPageProperty>
<bc4j:setPageProperty name="attrValue" >
<bc4j:parameter name="attrValue" />
</bc4j:setPageProperty>
</bc4j:findViewObject>
</bc4j:findRootAppModule>
</event>
I'm use the sortable columns with <bc4j:sortablecolumn> as:
<bc4j:column attrName="NomTeste">
<columnHeader>
<bc4j:sortableHeader/>
</columnHeader>
<contents>
<bc4j:input readOnly="true"/>
</contents>
</bc4j:column>
But, the "Sort" event does not enable a manual control for call Java Class. When user click in any sortable column, occur the follow error:
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT A.COD_CLIENTE, A.NUM_TESTE, A.NOM_TESTE FROM TESTE A WHERE a.cod_cliente = :1 ORDER BY A.NUM_TESTE ASC
Anybody know to implement this functionality ?

Ok, the solution:
Sort BC4J table with reduced view objects

Similar Messages

  • How Do I Sort Events by Event File Name?

    Hi All,
    Searched the forums extensively and can't seem to find anything on point. I'm trying to sort my events in iMovie appropriately and it's a challenge. Some of my events are recent, imported digital videos. Others are old VHS videos from the 80s and 90s converted through video capture devices. Others are simple videos filmed through my point and shoot camera. Bottom line, they only have a digital tag based on two things: the date they were imported into iMovie (analog stuff brought in through video capture) or actual digital tags from a digital video recorder.
    So they only way to really get these events sorted correctly is to name them in a conventional "year-month-day" naming convention and sort, just like other files.
    My problem is that I can't get iMovie to sort this way even after I successfully rename EVERY event (and there's like 150 events at this point).
    Any ideas? It seems simple. How do I sort events WITHIN the iMovie application by event name?
    Thanks,
    -Ben (San Antonio)

    Did the trick! I'd love it if there were a bit more of an assembly line capability to this, as I needed to change the creation date for 154 clips, which involved attaching, adjusting, removing, attaching, adjusting, removing...
    Lot's of mouse work is all.
    BUT it did the trick!
    Thanks,
    -bh-

  • How to customize and fix permanently the size of web pages (zoom%) in Firefox as in Internet Explorer either: View - Zoom - Custom (percentage).

    How to customize and fix permanently the size of web pages (zoom%) in Firefox as in Internet Explorer either:
    View - Zoom - Custom (percentage).
    Thank you

    This may help you.
    https://support.mozilla.com/en-US/questions/894000

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • How to add page event on the every pdf  footer

    How to add page event on the every pdf footer

    there is an option available in third party tool which you are using for create PDF using java. so read API documentation. if you can also extend/customize any feature using java

  • How do I merge events on the new IPhoto. The old one was simply drag and drop, this one will not.

    How do I merge events on the new IPhoto. The old one was simply drag and drop, this one will not.

    There are no longer events in Photos.  The new Photos for Mac is structuring the Photos Library automatically into Moments based on dates and locations. You cannot change the moments.
    When Photos migrates an iPhoto Library, it will create album for each event in the iPhoto Library, as a substitute, but these album based "events" are a fake, because albums behave differently from events.
    In iPhoto each photo could be only in one event, so you could move photos from one event to another. With albums, dragging a photo from an album to another album will simply add the photo to the other album as well.
    You will have to remove the photo from the original album.

  • How do I stretch (or compress) the viewing time of a video clip in Elements 12?

    How do I stretch (or compress) the viewing time of a video clip in Elements 12?

    oxmox
    What computer operating system is your Premiere Elements 12 running on? For now, assumed Windows 7, 8, or 8.1 64 bit.
    Typically, if you increase the length of a video clip, you will create slow motion. If you decrease the length of a video clip, you will create fast motion effect.
    You can right click the clip on the Timeline, select Time Stretch, and use the Time Stretch dialog's settings to change the video duration.
    See the Adobe document/section on Set Duration of Clip
    Adobe Premiere Elements 11 * Changing clip speed and duration
    ATR
    Add On...As an aside, if you have not done so already, please update 12 to 12.1 Update, using an open project's Help Menu/Update.

  • How to trigger an event in the program

    Hi,
    I have a program. The purpose of the program is to retrieve the data matching the selection criteria and downlod the same to a file.
    In the selection screen, I have a parameter called 'EVENT'. Here, user enters some event name. Generally, they enter the 'Background job processing events'.
    So, my requirement is... once the files are successfully downloaded, the program should trigger the 'EVENT' specified in the selection screen at run time.
    Can someone help me in this regard. How to trigger an EVENT in the program. Is there any Function Module or Method available in SAP which triggers the EVENT at runtime.
    And is there any table available in SAP which stores all the events available in SAP. Because, whenever the user enters an EVENT in the selection screen, we should check whether the event is valid or not. So, if there is any table available which has all the events then, it will be easy I guess. or is there any other way to validate the EVENT name.
    Please help me. Thanks in advance,
    Best Regards,
    Paddu.

    Hello Paddu,
    have a look at tables
    - btcsev, btcsed (system events)
    - btcuev, btcued (user events)
    and use function BP_EVENT_RAISE.
    kind regards
    Walter Habich

  • How do I sort songs in the iTunes store?  You used to be able to click on the column header to sort the column (ie Popularity)?

    How do I sort songs in the iTunes store?  You used to be able to click on the column header to sort the column (ie Popularity)?

    It seems this is a "backwards" upgrade from Apple in their iTunes 11 release....like you, I used to use that function in the iTunes store to sort through and decide which song version to purchase.   (For a large returned list of songs...see all...then sort by any of the headers, including Popularity...this functionality is now gone.)  
    The iPad always suffered from this...was never able to sort on those same column headers with an iPad.   It seems, this new iTunes release killed that functionality on the Mac as well.
    Just one of the few things that went wrong with number 11!
    Better luck next time,

  • How to bring status icons in the Adobe Form.

    Hi Experts,
    I am new to Adobe forms and I need to bring a icon indicating the satus ( For example green icon shoud be displayed if the values exceed our expection ) . Currently if I try to bring an icon in the form it is just displaying the text value corresponding to the icon even though the icon is of data type  ICONTEXT (For Example:Instead of displaying a icon in green it just displaying the corresponding text values like '@@4' ) . When we try to display the same icon in the table view it is displayed in a form of image.
    Kindly let me know how to bring status icon in the adobe forms.
    Thanks in Advance.
    Regards,
    Nandha

    Hi,
    The ADS will not understand this as an icon and create it on the PDF. If you want to insert an icon in the
    PDF you should insert it as an image in the Designer.
    Arun

  • How to add new fields to the system form (Ex.expenses to a/r invoice form)

    hi
    can any one tell me how to add new fields to the system form (Ex.expenses to a/r invoice form)
    i want to add expenses field to system a/r invoice form and connect data base also.
    i used the code of samples\11.system form manipulation(vb.net) but i'm not able to get it....so can any one help with code or concepts.
    reply soon plz..
    thankQ

    If I understood you correctly, you are just trying to add new fields to the invoice form and then use them in your form. you should first go and add the field to your tables, which you would do by going to Tool --> User Defined Fields --> Manage User Fields. There are different documents or categories given. For ex. for invoices, Sales Orders you would add your field under the Marketing Documents. If you want the field to be just one per invoice, add it to the Title, otherwise if you want a field per invoice or Sales Order line, add it to the Rows section. Once you have done that then you can just create a edit box or drop down to represent the field and set the datasource for that to your field. If you want example code to do that, let me know.

  • How to provide security settings for the adobe form using livecycleDesigner

    Hello,
    I am very new to form designing,
    can any one please tell me how to provide security settings for the adobe forms at client side?
    Regards,
    Menaka

    Hi,
    that is a good topic for the ADFS forum.
    ADFS forum - http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=Geneva
    But you could pass the user-agent as incoming claim type Client User agent. User-agents can be manipulated, so if that is an issue you can look into Device Registration and the Device OS type from there. That is also a incoming claim but requires DRS and
    DRS is not available for all plattforms.
    Hth,
    Lutz

  • How do i sort according to the date modified.

    Hi, i have a list of jobs that are created over a period of time. The date/time is stored when the job is created. How do i sort them according to the date/time they are created instead of sorting them by alphabetical order. This is the following code, i have
    public void setupJobPage()
    pageno = 5;
    String theFiles[];
    String directory = new String(nanocadHome + "\\users\\" + user + "\\" + session);
    File toRead = new File(directory);
    PageJobPanel = new Panel();
    PageJobPanel.setLayout(null);
    backToWaltz = new Button("Return to Waltz");
    backToWaltz.addActionListener(this);
    PageJobPanel.add(backToWaltz);
    backToWaltz.setBounds(new Rectangle(40, 5, 200, 20));
    sessionChecksLabel = new Label("   Name");
    sessionChecksLabel2 = new Label("Last Modified");
    sessionChecksLabel.setBackground(new Color(170, 198, 198));
    sessionChecksLabel2.setBackground(new Color(170, 198, 198));
    sessionChecksLabel.setBounds(new Rectangle(15, 30, 100, 20));
    sessionChecksLabel2.setBounds(new Rectangle(115, 30, 200, 20));
    PageJobPanel.add(sessionChecksLabel);
    PageJobPanel.add(sessionChecksLabel2);
    theFiles = toRead.list();
    sessionChecks = new Checkbox[theFiles.length];
    lastModifiedLabels = new Label[theFiles.length];
    sessionCheckGroup = new CheckboxGroup(); 
    for (int i = 0; i < theFiles.length; i++)   
    File temp = new File(directory + "\\" + theFiles);
    Date tempDate = new Date(temp.lastModified());
    lastModifiedLabels[i] = new Label(tempDate.toString());
    sessionChecks[i] = new Checkbox(theFiles[i], sessionCheckGroup, false);
    if ( ((String)sessionChecks[i].getLabel()).equals(session) )
    sessionChecks[i].setState(true);
    PageJobPanel.add(sessionChecks[i]);
    PageJobPanel.add(lastModifiedLabels[i]);
    sessionChecks[i].setBackground(new Color(170, 198, 198));
    lastModifiedLabels[i].setBackground(new Color(170, 198, 198));
    sessionChecks[i].setBounds(new Rectangle(15, 50 + 20 * i, 100, 20));
    lastModifiedLabels[i].setBounds(new Rectangle(115, 50 + 20 * i, 200,20));
    sessionButtonPanel = new Panel();
    sessionButtonPanel.setLayout(null);
    sessionButtonPanel.setBackground(new Color(187, 187, 221));
    createSession = new Button("View Result");
    deleteSession = new Button("Delete");
    createSession.addActionListener(this);
    deleteSession.addActionListener(this);
    sessionButtonPanel.add(createSession);
    sessionButtonPanel.add(deleteSession);
    createSession.setBounds(new Rectangle(40, 5, 85, 20));
    deleteSession.setBounds(new Rectangle(210, 5, 50, 20));
    PageJobPanel.add(sessionButtonPanel);
    sessionButtonPanel.setBounds(new Rectangle(15, 50 + 20 * theFiles.length + 10, 300, 30));
    sessionButtonPanel.repaint();
    PageJobPanel.setSize(400, 50 + 20 * theFiles.length + 40);
    GridBagConstraints c = new GridBagConstraints();
    c.anchor = GridBagConstraints.NORTH;
    c.gridwidth = 1;
    c.gridx = 0;
    c.gridy = GridBagConstraints.RELATIVE;
    c.weightx = 1;
    c.weighty = 1;
    add(PageJobPanel, c);
    Thanks

    Arrays.sort(Object[], java.util.Comparator);

  • How do I sort photos WITHIN folder view?

    Okay, I'll admit, to me, Adobe has always been defined as "too many features and too confusing to me," but I'll give it a shot.
    I looked through help, etc. and I have a seemingly simple question - how do I sort photos, new to old, WITHIN folder view of the browser? I don't WANT to show ALL my photos, just folder by folder, oldest to new, NOT by filename!
    This is a simple right-click context menu in Paint Shop Pro, has been for many versions. Why can't I find how/where to do this in Photoshop Elements? It's the kind of thing that makes simpletons like me keep running away from complex Adobe products.
    Help me, SOMEONE, through this seemingly simple task and... I'll be most appreciative.

    >how do I sort photos, new to old, WITHIN folder view of the browser? I don't WANT to show ALL my photos, just folder by folder, oldest to new, NOT by filename!
    Well since folders are not the primary method of using the Photo Browser in Elements, I don't think that folder view has everything that you want.
    If you want to look at a single folder in this sequence you could use the Instant Tag function to apply the tag to all photos in that folder, then use a Tag search by clicking on the box to the left of the tag that is the folder name and then choose oldest first while displaying just the photo files from that folder. This may sound long, but it takes lees time to do than it takes to type a description.

  • How to open PDF file with the view I wish without many clicks

    I am getting many many scanned files daily and I'd like to able to skim thru each file as fast as possible.
    Since the way each file scanned is consistent, when I open it, I am clicking a button to rotate it counterclock, then click zoom-in a few times to be able to read the top portion to see if the file is of my interest.
    Can we customize the way the files are opened?  I wish that once I open it, it will be rotated (so that I don't have to tilt head to read it), and zoom in big enough for me to read it.
    I did try (I am new to this) "accessabitly settup assistant", but couldn't achieve my desired effect.
    Any suggestions?
    thanks.
    JQ

    Thank you for the suggestions. Appreciated it.
    Actually when I asked whether they could scan it differently, I was told "no" for that type of scanner they have, and they have been reading it the same way as I just start to do, for years.
    Maybe someone knows about what scanners have the feature to do these tricks?
    I tried the preference setting. It's still less manageable. However, I manage to be able to click 3 buttons to get to the top portion to be readable.
    First, I rotate it counterclock (which mess up the view zoom in setting preference).
    Then I click to "show one page" button;
    Then I clcik to make the document to fill the width. (at this point, the zoom in is about 79%).

Maybe you are looking for

  • ITunes won't open in Lion, no error given

    Ever since upgrading to Lion, I've had nothing but problems. Among those, iTunes won't open. It doesn't even give me an error message; I click to try to open the app and get "iTunes quit unexpectedly." I've looked through the forum, but can't seem to

  • Grid with File Preview in Acrobat X Pro

    In the previous version of Acrobat 9 Pro -- there was a layout call Grid with File Preview.  We use it as our primary layout for PDF portfolios, but in version 10 Pro -- I cannot find this layout anywhere. Does anyone have a clue as to where I can se

  • Could you please suggest me the scenario for this requirement ?

    In module booking process we need the following process 1.Student select their interested event package via website. 2.Advisor review the student's event package list.        2.1 In case of REJECT : student need to revise their list        2.2 In cas

  • Replsh Delivery still in status being processed inspite billing completed

    Hi, Delivery created from purchase order has a batch Item Picking , PGI , Billing have been completed The document flow shows completed status expect the delivery still shows as being processed. The billing ststus at item level with qty 0  for the 1s

  • Regarding download option

    Hi Experts, i have a requirement from our client. when we download report in dashboard.on clicking on download we get various option to download in which we get option download data. if possible can we rename it to download dump data. similarly can w