SetAttribute at calculated attribute at prev next binding

I use JDev version 10.1.2.1.0 (Build 1913). I try to set attribute at calculated attribute.. that all row divide some page using prev next binding. The result was disorder. I think i must set attribute repeat every i click prev next button.. but i don't know where i must overwrite method form prev next binding.. or any other solution... please give me advice.. thank you

Dimitar, thank you for your response.
If I am trying to insert a new row (not update an existing one), I believe I need to create a Managed Property bomEditChild under the Managed Bean bomCRUD, and then set the binding of the af:InputText to +#{bomCRUD.bomEditChild}+ as seen below:
<af:popup id="p1" ... >
<af:dialog id="d2" dialogListener="#{DialogListenerCollection.editDialogListener}" title="BOM Edit">
<af:inputText label="Child" id="it1" binding="#{BomCRUD.bomEditChild}"/>
</af:popup>
From adfc-config.xml
<managed-bean id="__11">
<managed-bean-name id="__9">BomCRUD</managed-bean-name>
<managed-bean-class id="__12">erp.view.framework.BomCRUD</managed-bean-class>
<managed-bean-scope id="__10">request</managed-bean-scope>
<managed-property id="__2">
<property-name id="__3">bomEditChild</property-name>
<property-class>oracle.adf.view.rich.component.rich.input.RichInputText</property-class>
<value id="__1"></value>
</managed-property>
</managed-bean>
However, when I print the value of the String Child variable of the createChildren class, I get the following:
System.out.println("Child: " + Child); // output command gets me the text below
+Child: RichInputText[UIXEditableFacesBeanImpl, id=it1]+
The createChildren method is detailed below in the pages definition file and implemented in the AppModuleImpl class.
<methodAction id="createChildren" ...>
<NamedData NDName="Child" NDValue="#{BomCRUD.bomEditChild}" NDType="java.lang.String"/>
</methodAction>
It appears the value being passed into my createChildren class is the container ID, not the value entered into the container by the customer. The output is the same whether I declare bomEditChild as a Managed Property under the Managed Bean bomCRUD or not. I am still unsure how to grab the value of the inputted text and/or if the managed property is updating before the createChildren method is being called via the editDialogListener.
Any further ideas?

Similar Messages

  • Problem with calculated attribute

    I have created a calculated attribute on an Entity that derives its value from two persistent attributes.
    I am only interested in displaying the calculated attribute and not the attributes it is derived from.
    If I put the calculated attribute in a View object without the other attributes I will get an error ( (oracle.jbo.DMLException) JBO-26080: Error while selecting entity for AccountPosting) when displaying data from the View object.
    This error does not occur if I add the other attributes to the View object and it all works OK.
    Why is this? Surely the calculated attribute is only calculated at the Entity object layer, so what does the View object have to do with this?

    The Java datatype for the two Number attributes is Number
    When I switch to Integer or Long, I get an error but the stack is different.
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for SLEO
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:658)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:5025)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:3386)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:2148)
         at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:2079)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1774)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1032)
         at mypackage2.SLEOImpl.setDETAIL(SLEOImpl.java:113)
         at mypackage2.SLEOImpl.setAttrInvokeAccessor(SLEOImpl.java:144)
         at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:945)
         at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:1241)
         at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:1150)
         at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1111)
         at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:1086)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:833)
         at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
         at oracle.jbo.jbotester.JBOFieldHelper.setDataValue(JBOFieldHelper.java:114)
         at oracle.jbo.jbotester.JBOFieldHelper.applyEdit(JBOFieldHelper.java:175)
         at oracle.jbo.jbotester.JBOFieldHelper.applyEditAndValidate(JBOFieldHelper.java:205)
         at oracle.jbo.jbotester.JBOFieldHelper$DefaultJBOFocusListener.focusLost(JBOFieldHelper.java:239)
         at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:172)
         at java.awt.Component.processFocusEvent(Component.java:5006)
         at java.awt.Component.processEvent(Component.java:4888)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:777)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:497)
         at java.awt.Component.dispatchEventImpl(Component.java:3506)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    ## Detail 0 ##
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]FOR UPDATE cannot be specified on a READ ONLY cursor.
         at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)
         at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:533)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:5025)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:3386)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:2148)
         at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:2079)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1774)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1032)
         at mypackage2.SLEOImpl.setDETAIL(SLEOImpl.java:113)
         at mypackage2.SLEOImpl.setAttrInvokeAccessor(SLEOImpl.java:144)
         at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:945)
         at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:1241)
         at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:1150)
         at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1111)
         at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:1086)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:833)
         at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
         at oracle.jbo.jbotester.JBOFieldHelper.setDataValue(JBOFieldHelper.java:114)
         at oracle.jbo.jbotester.JBOFieldHelper.applyEdit(JBOFieldHelper.java:175)
         at oracle.jbo.jbotester.JBOFieldHelper.applyEditAndValidate(JBOFieldHelper.java:205)
         at oracle.jbo.jbotester.JBOFieldHelper$DefaultJBOFocusListener.focusLost(JBOFieldHelper.java:239)
         at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:172)
         at java.awt.Component.processFocusEvent(Component.java:5006)
         at java.awt.Component.processEvent(Component.java:4888)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:777)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:497)
         at java.awt.Component.dispatchEventImpl(Component.java:3506)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    ----- LEVEL 1: DETAIL 0 -----
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]FOR UPDATE cannot be specified on a READ ONLY cursor.
         at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
         at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)
         at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:533)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:5025)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:3386)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:2148)
         at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:2079)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1774)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:1032)
         at mypackage2.SLEOImpl.setDETAIL(SLEOImpl.java:113)
         at mypackage2.SLEOImpl.setAttrInvokeAccessor(SLEOImpl.java:144)
         at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:945)
         at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:1241)
         at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:1150)
         at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1111)
         at oracle.jbo.server.ViewRowImpl.setAttrInvokeAccessor(ViewRowImpl.java:1086)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:833)
         at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
         at oracle.jbo.jbotester.JBOFieldHelper.setDataValue(JBOFieldHelper.java:114)
         at oracle.jbo.jbotester.JBOFieldHelper.applyEdit(JBOFieldHelper.java:175)
         at oracle.jbo.jbotester.JBOFieldHelper.applyEditAndValidate(JBOFieldHelper.java:205)
         at oracle.jbo.jbotester.JBOFieldHelper$DefaultJBOFocusListener.focusLost(JBOFieldHelper.java:239)
         at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:172)
         at java.awt.Component.processFocusEvent(Component.java:5006)
         at java.awt.Component.processEvent(Component.java:4888)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:777)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:497)
         at java.awt.Component.dispatchEventImpl(Component.java:3506)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

  • BC4J: Updating calculated attributes

    We're working on some web services with BC4J. For querying data, we have various tags which are calculated. I'm looking for the best practice for receiving updates to those calculated values.
    For example, the web service needs to work with the <countyFIPSCode> element, which might have a value of 55043. Internally, that might relate to our county_code = 21.
    It's easy enough to build a BC4J calculated attribute for countyFIPSCode, and that's perfect for queries. But I'm looking for the best approach for handling an update or insert that has a value for countyFIPSCode.
    For example, one way would be to absorb the XML document, find the <countyFIPSCode> element, get the value, call a database function to get my internal county_code, and use it for the update. I can see lots of approaches, though, and I certainly haven't plumbed the depths of what BC4J can do, so I'm wondering what would be best approach.
    -- jim

    If you allow the transient CountyFIPSCode attribute to be updateable, then in the setCountyFIPSCode() method in the view row class (or optionally at the entity level if you want to enable this CountyFIPSCode->NormalCountyCode mapping), just after invoking the setAttributeInternal() method to set the value of the transient attribute, you can remap the value, then invoke the setCountyCode() method with the remapped value.
    How you accomplish the mapping would depend on how many different county-codes there are. If you have an existing stored function that does the mapping, you could just write an expert-mode view object that looks like:
    select yourfunction.map_fips_to_county(:0) as county_code from dualThen you can use this VO to set a value for the zero-th bind variable with the value of the FIPS code, then retrieve the value of the "CountryCode" attribute in the resulting row.

  • Calculated attributes in WDA

    Hi people,
    I'm new in WebDynpro for Abap. Is it possible to declare a calculated attribute like in WebDynpro for Java? I can't find a attribute-property for doing that.
    Is this concept not available in WDA?
    Regards,
    Thomas

    Hi,
    in WD4Java you have the possibility to declare an attribute as "calculated". The framework generates then 2 methodes, a getter and a setter method, which the application developer can use to put in his coding.
    A use case can be the following: You have a Inputfield with a simple value help (i.e. from the domain of the data element). The value you can see, after the selection is the key (of the key-value list). Now I want to show near the inputfield the value of the selected key. In this case I can declare (in WD4Java) a calculated attribute which i bind to a TextView element near the Input field. The getter methode of the attribute (implemented by the application developer) determines the value of the selected key.
    If this wasn't clear enough, visit this [link|http://help.sap.com/erp2005_ehp_03/helpdata/EN/7f/a0384162316532e10000000a1550b0/frameset.htm], where the concept of calculated attributes is described in detail.
    Regards,
    Thomas

  • How recalc buffered value in calculated attribute?

    Hi everyone
    I have created some calculated context attribute and set the Buffer Mode to Buffered. As I understand this means that the value of attribute will calculated once, will buffered in memory and next will recalc "on demand".
    My question is - how can I invalidate the attribute value and call recalc function ?
    P.S. NW CE 7.2

    Hi,
    You can find out more details of [Calculated Context Attribute|http://help.sap.com/saphelp_tm80/helpdata/de/7f/a0384162316532e10000000a1550b0/content.htm] and [Calculated Attributes in Web DynproJava|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e093a9d8-c00e-2b10-7dae-b72c3a8c5536]
    Hope this helps!!
    Regards
    Vijay K

  • Calculated attribute?

    Hi,
    Wat is the actual use of this and also giv me some sample for this..when and wher we use it?
    **Helpful answers will be appreciated...
    GS

    Hi
    The values of context attributes are normally saved in node elements of a controller context at runtime, and with data binding are displayed in the UI using a generic formatting mechanism (for Dictionary-based types).
    In many cases, saved context data should be transferred identically, instead it should be converted before the display. A typical example is displaying an address text based on name and gender. Using the two context attributes Name=’Maier’ and Gender=’male’, the standardized address text 'Dear Mr. Maier!’ should be displayed in the user interface. This text can be saved by defining an additional value attribute Address in the controller context. In multiple context nodes, each individual node element would then have the additional context attribute called Address, where the name would be saved redundantly as part of the address.
    Calculated context attributes are a more elegant way of handling the example. These are not saved specially in the context, they are calculated (read) where necessary by the controller instead. “Where necessary” can mean that UI elements should display the content of a calculated attribute, or that the value is accessed by the program in the controller coding. The calculation method is called automatically by the Web Dynpro runtime environment. A calculated context attribute is calculated in an automatically generated access method using signature
    <CalcAttrType> get<NodeName><CalcAttrName>(<NodeName>Element element).
    For a calculated context attribute called FullNameCalc of type String in node UserData in the context of the FormView view, this results in access method
    java.lang.String getUserDataFullNameCalc(
    IPrivateFormView.IUserDataElement element).
    The calculation method is called automatically where necessary by the Web Dynpro runtime environment. It passes a reference to the node element to which the calculated context attribute refers. If this method were defined in a multiple node with cardinality 0..n, for example, then the access method would be called for each node element that is available in the node at runtime. In this way, the full name of a customer could be displayed in a third table column, consisting of first and last names. The access method would be called for each row (each node element) in the table.
    It is expected that the access method for calculating a calculated context attribute is based on the same node element’s other attributes.
    Within the generated access method for a context attribute, the context attribute to be calculated should not be accessed, as this results in the access method being called recursively. A recursion termination occurs only if you implement a recursion condition.
    According to the Web Dynpro naming convention, calculated context attributes should contain the ending Calc for Calculated in the name, such as SalutationCalc or TotalPriceCalc. This makes the application coding easier to read with respect to the components from the calculated context attributes.
    Regards
    Kalyan

  • How to change sql expression of SQL-Calculated Attribute of view object ?

    Hi
    jdev 11.1.1.5
    I have a view object with a SQL-Calculated Attribute (sumAnalytic) how can I change sql expression of this attribute in runtime?
    for example in application module method??

    Hi Mr Timo
    Thanks for your reply but I do not need dynamic vo because I can not change all of my vo
    I only need to change expression of SQL-Calculated Attribute of view object in run time.
    For this I set expression in view object something like this 'select 2 from dual' and in run time in my AM method I get the vo query and replace 'select 2 from dual' with something like 'selet sum(amnt) over (partition by 1)' and set new query.
    But I think the better solution must exist
    Thanks

  • Prev/Next Buttons

    I am using some paging code to add a previous and next
    buttons to my spry gallery. I am attempting (unsuccessfully) to
    hide the previous button at the beginning of the recordset and the
    next button at the end. I have pasted the code below if anyone has
    any ideas.
    <script language="JavaScript" type="text/javascript">
    <!--
    var pageOffset =0;
    var pageSize = 5;
    var pageStop = pageOffset + pageSize;
    var dsGallery = new Spry.Data.XMLDataSet("images.xml",
    "/gallery/photos/photo", { filterFunc: MyPagingFunc });
    function MyPagingFunc(ds, row, rowNumber)
    if (rowNumber < pageOffset || rowNumber >= pageStop)
    return null;
    return row;
    function UpdatePage(offset)
    var numRows = dsGallery.getUnfilteredData().length;
    if (offset > (numRows - pageSize))
    offset = numRows - pageSize;
    if (offset < 0)
    offset = 0;
    pageOffset = offset;
    pageStop = offset + pageSize;
    // Re-apply our non-destructive filter on dsStates1:
    dsGallery.filter(MyPagingFunc);
    // Tell our 2nd region to update because we've adjusted
    // some of the variables it uses in its spry:if expressions.
    Spry.Data.updateRegion("list2");
    // Change the XPath for the 3rd data set so that the 3rd
    // region updates. Remember, position() starts at one and
    not
    // zero, so we have to add one to our pageOffset and
    pageStop.
    dsGallery.setXPath("/states/state[position() >=" +
    (pageOffset+0) + " and position() < " + (pageStop+1) + "]");
    -->
    </script>
    <input type="button" value="Prev"
    onClick="UpdatePage(pageOffset - pageSize);" />
    <input type="button" value="Next"
    onClick="UpdatePage(pageOffset + pageSize);" />

    why didn't you use Spry Paged View instead of writing your
    own code?
    then you can use
    if ({ds_PageNumber} == 1 ) {
    //disable prev button & enable next
    else if ({ds_PageNumber} == {ds_PageCount} ) {
    //disable next button & enable prev
    else{
    //enable both prev & next button
    you then just have to call this function, every time you do
    navigation or page load (using observer or anything else)

  • Implement paging (prev/next) for jtable data obtained from database

    Hello all, first time poster and relative newbie to java.
    I am trying to learn java and in the process have stumbled upon this issue.
    I have searched through the forum as well as googled my way around for answers. And though I am more informed than I was, I still am a little stumped.
    I would like to implement a table that pulls data from a database (mysql), limits the results, and include prev/next buttons to traverse through the records.
    I think this involves writing my own AbstractTableModel. And I have seen some examples as such. But could use a little more help.
    I will always be pulling 10 rows, but the columns will change depending on query I am using so implementing a more generic set of methods would be great.. To be specific...
    Table: users
    Columns: userid, ufname, ulname, utype, ustatus, etc....
    For selection purposes I only need to show: userid, ufname, ulname. So I figure I write a query like:
    select userid, ulname, ufname from users limit index, 10
    Where index tells the query where to start from then use the results to populate the jtable. I can do this statically but do not quite understand how to implement the next/prev buttons so that the table pulls the next or previous set of data.
    If this can happen without the need to repaint/refresh the frame that would be great.
    sudo code (with comments) would be ok, but a basic working example of this would be even better.
    thank you in advance, if more information is required please let me know.

    tumbleweeds roll by...........

  • Prev & Next Article?

    Hi,
    How to create a Prev & Next artcle link in the detail
    page? is this possible to be made by DW? if not, any ideas how to
    build such a thing easily? I'm not a coder, & My pages are
    generated dynamicly.
    Thanks in advance.
    Dev_Guy

    On Mon, 8 Oct 2007 08:24:11 +0000 (UTC), "Dev_Guy07"
    <[email protected]> wrote:
    >Hi,
    > How to create a Prev & Next artcle link in the
    detail page? is this possible
    >to be made by DW? if not, any ideas how to build such a
    thing easily? I'm not a
    >coder, & My pages are generated dynamicly.
    Without any code knowledge you might find it tricky. However,
    Tom Muck
    has a commercial extension that makes it easy:
    http://www.tom-muck.com/extensions/help/RecordsetNavigationSuite/
    Steve Fleischer
    steve at flyingtigerwebdesign dot com
    Hong Kong

  • 9.0.5 loses ViewObject's Calculated Attributes ?!

    We have an existing BC4J application and we try to migrate from 9.0.3.2 to 9.0.5 Beta.
    When opening a ViewObject under 9.0.5, JDeveloper warns that the object will be migrated.
    However, when doing so, custom calculated attribute's SQL is lost.
    Here is an example: suppose you have a view with
    SELECT EMPNO, PCK_MYFUNCTION.FUG_GET_SOMETHING(EMPNAME) AS CALCULATED_ATTR FROM
    EMPLOYEES as a SQL (Expert mode is irrelevant)
    After 9.0.5 migration, SQL becomes:
    SELECT EMPNO, CALCULATED_ATTR AS CALCULATED_ATTR FROM EMPLOYEES as a SQL
    The aliased name of the attribute becomes also the code for the attribute ! Of course, SQL is wrong and you can detect it straight from the wizard.
    Anyone with such experience, workaround ?
    Best regards, Stephane

    I have 9.0.5.2 up and running and created the classes exactly like I think you have said in 9.0.3. I took the liberty of assuming that the purpose of IFormContext was to return a FormContext object.
    package test;
    import java.io.Serializable;
    public class FormContext implements Serializable {
      public FormContext() {}
    package test;
    import oracle.jbo.ViewObject;
    public interface BaseViewObject extends ViewObject  {
      public void baseVOMethod();
    package test;
    import oracle.jbo.server.ViewObjectImpl;
    public class BaseViewObjectImpl extends ViewObjectImpl  {
    public void baseVOMethod() { }
    package test;
    public interface FormContextView extends BaseViewObject  {
    public void   formContextMethod();
    package test;
    public class FormContextViewImpl extends BaseViewObjectImpl implements FormContextView, IFormContext {
      public void   formContextMethod() { }
      public FormContext getFormContext() {
         return null;
    package test;
    public interface IFormContext  {
        FormContext getFormContext();
    }Then, I created a DeptView and set FormContextViewImpl as its Object class and (OK)'d the wizard.
    When I go back into the wizard, I see:
    test.FormContextView
    test.IFormContext
    in the list of Available interfaces.

  • Lightbox Gallry, works locally, but cannot find prev/next/close button remotely.

    Hi all, I've downloaded the latest Lightbox Gallery from Dreamweaver exchange and was able to make some changes on my own, but still far from being an expert at scripting...HELP!
    Everything worked fine locally, but when I uploaded it to my web host/s FTP, the prev, next and close buttons did not show up.
    In firebox, they just don't show.  In Safari, it shows "?" where the close button should show.
    I checked the FTP and the images are all there.
    Could anyone tell me what I'm doing wrong?
    My website address is:
    julieappelt.com
    Thanx

    It appears you didn't upload a whole folder.  The "lightbox" folder inside the "images" folder does not seem to be there.  Try uploading the files again.

  • PREV - NEXT navigation in ViewStack & Tab Navigation container

    Hi,
    I am using a ViewStack container inside a Tab container. There are 2 tabs.
    In the first tab, I have 3 containers for ViewStack and in the
    Second tab, I have 2 containers.
    I am having a single PREV - NEXT (navigation) buttons for the navigation.On clicking the next (navigation) button, it should select the second viewstack container in the first tab [initially the first view stack container in first tab is selected]
    On clicking next again, it should select the next viewstack container & so on...
    Upon further clicking the next button, it should select the first Viewstack container of the second tab & so on...
    When I place the navigation buttons for the ViewStack container, we can get the ViewStack ID & the selectedIndex, so PREV - NEXT navigation functionality can be done.
    But my requirement is:
    On traversing through the NEXT button and on reaching the last screen of the ViewStack container, it is required to go to the next tab's first ViewStack container. It is basically a PREV - NEXT navigation through all tabs and on each ViewStack in a tab container with a single set of PREV - NEXT navigation buttons
    - Sen

    hi,
    I have put together a sample of navigating through multiple viewstacks, the only real need for this to work is that each viewstack is named after its parent navigators index i.e tabnavigator 0 has a viewstack with id of 'VS0' tbanavigator 1 has a viewstack with id of 'VS1' etc...
    http://gumbo.flashhub.net/stacker/  source code included
    David.

  • Tabbing to "Prev", "Next" and "Submit" buttons in FormsCentral template

    I try to use my mouse as little as possible when entering data in forms.  How does one tab to "Prev", "Next" and "Submit" buttons in FormsCentral template so that all one has to do is press "enter" on the keyboard or spacebar?

    Thanks Roman for your response.  Press Tab or Shift-Tab works fine on my Windows computers but does not appear to work on my IPad.  Maybe it’s an Apple thing.  BTW – loving what I’m seeing so far in FormsCentral.
    Dixie Folzenlogen
    Dixie Folzenlogen
    Project Coordinator
    Striker Land Services Northeastern, L.L.C.
    6801 N Broadway, Ste 310
    Oklahoma City, OK 73116
    330-492-2401 (office)
    405-229-3907 (mobile)

  • Enhanced a new attribute but giving not binding error

    Hi guys;
    I enhanced component "BTPARTNER" with a enhancement set via "BSP WD Workbench"..After that I added a new model attribute the context of view PartnerSelList by giving BOL Object "BuilTerrObj".Finally I run the page , in these fields it says "<# error in metadata" TERR_ID not bound..
    I think I need to do some additional steps after just adding a model attribute.How can i bind these new fields added by the wizard?
    Thanks

    Hi Chand;
    When I go to the "BOL Model Browser" tab from "BSP_WD_CMPWB", there are treeview including
    -- Root Objects
    -- Dependent Objects
    -- Search Objects
    -- Search Result Objects
    -- View Objects
    When I right clicked one BOL object , there is no  options like binding..Moreover I didnt find  BOL object BTQRSPARTDET anywhere.
    Thanks

Maybe you are looking for

  • Itunes music & photos on apple-tv not possible to re-synchronise with imac

    I did buy in the last 2 year, a imac, macbook, apple-tv, copple of iphones, a lot of softwares, etc.... i did buy also in itunes a lot of music,, now my imac hard disk crashes just 1 month out of waranty, but i synchronized all my music and photo's t

  • Using TM to reformat one (FAT32) partition on external HD

    Hi all, I'm wondering what others' experiences have been using TM's reformat feature on only one partition in a drive. In my case, I have a 400GB Seagate external HD that has been partitioned to one half HFS+ and one half FAT32. Now that my data anal

  • [ALSB 3.0] help help about xquery transformation

    Hi all, I should transform a xml doc from <val_date>20081004</val_date> <par> <key>rpp</key> <value>10</value> </par> <par> <key>curry</key> <value>CHF</value> </par> to <val_date>20081004</val_date> <par> <key>rpp</key> <value>10</value> </par> <par

  • Getting the New software 6.0 For blackberry curve

    I would like to get the new software for my curve but i dont know how to. i havent gotten an update and i keep checking. is there any way to put it on by going to a verizon store or off the website?

  • Design View and overwritten methods in subclasses

    Dear all DESIGN VIEW DOESN'T WORK WITH OVERWRITTEN METHODS IN SUBCLASSES I am developing a reasonably large applet-based menu using JDeveloper. Because much of it varies only in small details, I had planned to create a base class to hold all the comm