How do I find the index of a row of a group in a presentation? - aqualogic.bpm.modeling(Archived)

I am using a BPM Object Presentation for this and the code is in PBL. From a method (triggered by an event) I need to find out the current row, the index within a Group. (In this case I am referring to the Group array widget, not a user group.)
The specific implementation is as follows:
1. Each row of the group has a button named "Edit Topic"
2. The user clicks the button
3. The action for that button calls the method EditTopic()
4. The method EditTopic() needs to know which row it was triggered from.
Thanks in advance. 

Hi,
You can retrieve the zero based value of the row in a Group clicked if you add a method inside of the group (make sure it's inside the group and not in the parent BPM Object).
The presentation's property for the push button inside the group has to be designated as an "action" (vs submit, save or cancel). Name the method associated with the push button in the group something like "getLineClicked()".
The method only needs to have this one line of logic:
lineSelected as Int = orderLines.indexOf(this)
This will give you the zero based index of the row in the group they picked.
Hope this helps,
Dan 

Thank you so very much. Dan, you're a lifesaver.
--
Edited by jimclack at 04/25/2008 9:59 AM
--
Edited by jimclack at 04/25/2008 10:37 AM

Related

Dynamic Picklist content.

Hi all, I would like to have the content of a pick list controlled by the active Page Layout for an object. E.g.
When Role 1 opens the object the field 1 pick list should have values A and B.
When Role 2 opens the object the field 1 pick list should have values C and D.
Is this possible and how?
I was thinking of cascading pick lists but I don't want the user to have to select the parent value. This should be pre selected by the role accessing the object and I guess this could be done in the object page layout connected to the role accessing the object. 
Well we have implemented the below requirement as follows in our project:
We have a read-only custom picklist field 'Role' . The values of the picklist are Role 1 and Role 2. The validation on this field = Jobtitle(). While creating the User, we mention the Job Title same as Ondemand Role.
Now we have created Cascading picklist between Read-only field 'Role' and Action picklist (having values A,B,C,D).
Hope this helps.
Sandy 
Hi Sandy,
Thanks for the tip. I was trying to avoid creating a custom field to control the content, but i seems this is the only way.

Checkbox to be added to HR self service page

Hi
We have a requirement to add a checkbox field to a HR Self service page. After the details are entered and Next button is clicked, the control goes to a Review page where the user clicks the Submit button, which saves the data in the database. The checkbox value needs to be saved in the same table along with other standard data.
The OAF region on which we need to add the checkbox is to be added is based on a VO with SQL query (and not on Entity). Could you please suggest as what would be approach to implement the above requirement.
Appreciate your help.
Thanks 
Hi,
Use vo.getFilteredRow() for selected check box rows are inserted into database.
Thnaks,
Kumar 
Kumar,
Thanks for the update.
The checkbox is an additional field to be added to the Self service page. The requirement is to add this additional field and save the value of it in the same table along with the other standard fields.
Thanks 
Hi,
Assuming the view underlying this table is Entitiy object based.
Give the checked property value of the check box 'Y' and for unchecked property , give "N",
Assign view attribute the checkbox.
It will save in the dtatabase.
Thanks,
Kumar 
The VO is based on a SQL and not on entity.
Thanks 
Hi,
If the VO is not based on entity then you have to exceute "UPDATE" statement to save in the database.
Thanks,
Kumar 
Hi,
Please find below the complerte requirement.
We have a requirement to add a checkbox field to a HR Self service Personal Information Emergency Contacts page. After the details are entered user can select the Next button or 'Save for Later' button. When the Next button is clicked, the data is stored in temporary transaction tables and the control goes to a Review page where the user clicks the Submit button, which saves the data in the actual table in database. The checkbox value needs to be saved in the same table along with other standard data.
The OAF region on which we need to add the checkbox is to be added is based on a VO with SQL query (and not on Entity). Could you please suggest as what would be approach to implement the above requirement.
Thanks 
Hi,
That means the view attributes are saved int he database through TransactionEOVO. Assign the Attirbute column of the table to CheckBox bean and TransactionEOVO will take care of saving the attribute column in database.
If this is not worked then write update statement
like update table per_all_people_f set attribute14 ='Y' where >condiiton> -- if checkbox is clicked.
Thanks,
Kumar 
Where is the value of the checkbox stored ? give me table/column. Also, if its a sql based VO, it will be using an API in all probability. 
also, provide the name of the VO and the API if possible. 
Please find the details below.
The checkbox value needs to be saved to the PERSONAL_FLAG column of the PER_CONTACT_RELATIONSHIPS table.
The OAF region in which we need to add the checkbox is based on the view object oracle.apps.per.selfservice.personalinformation.server.ContactsMainVO
When the user enters the Emergency COntact and checks the checkbox and clicks Next button, the data is stored in temporary transaction table (HR_API_TRANSACTION_VALUES table).
When the user clicks Submit button in the Review page, the pl/sql procedure HR_PROCESS_CONTACT_SS.process_create_contact_api is called to create the record in the PER_CONTACT_RELATIONSHIPS table using the data from the temporary transaction tables.
Thanks 
Hi,
Extend the ContactsMainVO and add column 'N' as personal_flag and assign this attribute to checkbox. when clicked, give the value to 'Y' and otherwise 'N'.
Generally the datastoreed in the tansaction_dcoument column of hr_api_transactions inthe form xml.
Thanks,
Kumar

BPM Object Presentation - array items - (add / delete rows dynamically)

Hi,
We have a BPM Object presentation which uses a 'group' inner object to display ROWS of data. The presentation has an 'array0' created by default to handle the 'group' of rows. It also has the '+' and '-' buttons by default.
There is a field at the upper level which shows the 'sum' of values in individual rows. It needs to 'REFRESH' when an add (+) or deletetion (-) or rows happen.
But we see that all the controls (text boxes etc which are wired to the 'inner' bpm object of the group and the +/- buttons are one unit 'array0'. And the only method if at all, is an 'Event Listner' which is not showing any methods related to BPM Object.
Can anyone help us with a clue as to how to handle the '+' and '-' events or wire the 'array/group' events to code - any clue with 'events'?
This is a little urgent as it is an issue and we need to fix the same. Appreciate any quick responses/clues.
Thanks in advance,
-user8702013. 
The SUM field needs refresh() method to be called to reflect the new value whenever we are adding/deleting rows.
To call this method for to show the reflection we have to declare a method on BPM object level which receives a argument of type ‘Fuego.Util.GroupEvent’, then in this method you can have your logic(here refresh() method is required to show new value on deletion/addition, hence this method is being called). This method can then be wired (it shows up) to the 'Event Listener' of the group/array.
The newly created method will be called whenever a new row is added/deleted (Event will be fired hence method call).

Add Another Row Functionality

Hi,
I have to create records in table Region
After clicking on Add Another Row a Row should be created in table and allow user to enter details and
if he wants to add another row he will click Add Another Row again
So My requirement is what is the Region style preferred
and what is the method return for Add Another Row function
Regards,
Krishna 
Region: Advanced Table
Method Returned: I assume you mean the event in the controller? if so it is "addRows" but the advanced table will handle the insert event for you and unless you specifrically need to have controll of the add row event you might aswell let the framework do it.
See "Advanced Table" in the dev guide for detailed information on how to implement this UI feature.
Keith

Passing current row values as parameter issues.

JDeveloper - 11.1.1.6
JHeadstart - 11.1.1.4.26
Weblogic - 10.3.5
I am having trouble passing parameters from a table to a popup.
I have a master group that contains a detail group, within this detail group I have created a group region. This region is meant to show remarks for the current details table record.
In the details group (table layout) I have specified as the region "depends on" item a textInput field so that when I click the context area I get the popup.
The remarks group (in the popup) has a composite key comprised of three attributes that exist in the detail table. What I need to do is pass these values as parameters to the remarks group.
Here is what I have done so far:
1. Created parameters on the top level remarks group - names match parameters set in region
2. Created a "query bind parameters" string with the necessary VO bind variables.
3. In the detail group where the region exists I have created the parameters that I am trying to pass TO the remarks group.
My problem is that the parameter values that I am trying to pass to the region/remarks group are not being filled correctly. For parameter values I have tried:
#{row.bindings.attributeName.inputValue}
#{bindings.DetailGroupNameAttributeName.inputValue}
#{bindings.DetailGroupNameTableAttributeName.inputValue}
Many, many others
These attributes exist and are editable in the table.
All I want to do is pass these three values from the detail table (per row) to the remarks group. What am I missing? What EL expression will give me the per row values I need? I know there is a lot of material out there on this, but I seem to have tried them all, I don't know where I've gone wrong.
Thanks... 
I think I have figured this out...
I am a bit embarrassed but it turns out that the bindings for the variables I was trying to pass were not being generated. I forced it and now things seem work as expected.
Is there some sort of bug in JHS that would cause the bindings not to be generated? I don't understand because the fields are all visible and update-able in my table. Why would some bindings be created, but not these?
I'd like to understand what where I went wrong.
Thanks! 
There are form value bindings and table attribute bindings.
If the group layout only contains a table page, then by default the form bindings are not generated.
Steven Davelaar,
JHeadstart Team. 
Right, that's what I don't understand. As I mentioned above some of the bindings were being generated, the ones in question were not (table attribute binds).
That's what has me confused.
Thanks...
Edited by: errodr on May 6, 2013 7:42 AM

Categories

Resources