I have to create a composite component in which there are 3 things.
A text box(1) along with a button(2). And there is a data table(3) below to that text area.
So If user enter something in text area and click button the entered text is added into data table as a new row. So how can I perform this add functionality? And the list which is bind to data table is being passed as attribute in composite component.
What approach I am having currently is to use "componentType" attribute to bind java class to it. But how can I pass this List attribute to get updated?
Related
Condition: I have an NSArrayController in an NSViewController properly bound to a Core Data entity. I have added buttons to add and delete rows (see pic) that are properly connected to the array controller. But, when I add a row, instead of getting the bound variable as the table cell contents, I get the title of the cell.
Information: In the image provided below you see a view controller with a table view and a text field. The text field value is bound to the Array Controller.selection.myvariable, and it properly shows the value of myvariable. The table view column is bound to Array Controller.arrangedObjects.myvalue, but it shows the cell.title ("New Table Cell") rather than myvalue.
Question: What have I missed to get the proper value into the cell. I have not implemented Table View Delegate or Data Source methods. My understanding is that the Cocoa Binding eliminates the needs for such "glue". Why does the textfield work but not the table column? Thanks for helping if you are able.
In Xcode 9.1 you can't bind the tableview column to the attribute, you just bind it to Controller Ket to arrangedObjects and leave the Model Key Path blank. Then bind the text field cell of the column to the Model Key path objectValue.yourvar.
I am using a Dynamic View Panel and would like to create a "Favorites" column in the view. The underlying view has a "Favorites" multivalue names field that contains all users that have flagged the document as a favorite. What I would like to do is to handle this conversion in a "Customizer" bean where I can compare the current user with the stored vales in the "Favorites" column and see if they are in the list. If they are I would present a "Green Star" icon (not a standard Notes icon) else I would present an empty star icon. I would also like to make the star icon live so if you click on the star it would toggle the favorite value in the database on/off.
How do I implement such a feature?
What are the DominoViewCustomizer methods I need to override? (looking at afterCreateColumn)
How do I get and set the column values? (really lost here)
How do I get the column to display a Notes resource image (my stars) or do I need to store it in a directory on server?
How do I make the star icon clickable?
How do I capture that click event?
Using Domino v9.0.1
If you don't have to use a dynamic view panel here's a way of doing it that will work with a view panel, repeat, or data table...
Use a "favorites" document for each user. Have it contain one multi-value item to store the Note IDs of all the documents the user favorited.
When the user logs on read the contents of the multi-value field into a sessionScope variable. Then in your view column all you need to do is check if the NoteID of the current row is in your sessionScope variable and display the appropriate icon.
For the part when a user clicks on a star you would have an event handler on that column that does a lookup to the user's favorites document (create it if it doesn't exist) and add or remove the NoteID then do a partial refresh on the view.
You can probably still do this with a dynamic view panel but I can't speak to the particulars of it since I don't use it much.
I have a Xpage with a repeat control. The index name is set. In the repeat is another custom control. Now a want the index in the nested custom control.
Is the only way to fill out a composite data?
I must unique a div class in the nested custom control. Is that the right way?
Thx
All components in an XPage are loaded initially as a tree hierarchy, the component tree. Any component has access to any element upwards and outwards from that branch. So if a custom control is nested inside a repeat, it has access to the repeat row and the variables relating to that row. So if you define the property indexVar="idex", just as any component on that row will resolve the variable name idex as the current row index, the same is true for a custom control nested in a row.
As long as indexVar has the same variable name in any XPage in which you nest the custom control, you don't have to pass the variable.
Need some help with Gravity forms. I need to have a field, that is a merge of values ,that user has previously selected.
So, if a user has selected 3 different fields wth values of 1)XYY, 2)YYX,3)YYZ I do not need a sum, just a plain merge, in form of XYY.YYX.YYZ, or anything like that.
Could that be acomplised with some merging tags, or dynamically population?
Thanks
Of course;
You should create two different forms.
Collect data with field1-field2-field3, they can be single line text, number, date or anything. In the advanced tab of field settings, write a parameter name for each one, like field1-field2-field3.
In the second form create a single line text, in the advanced tab of field settings check "dynamically populate field" and write your parameters like field1.field2.field3.
In form1 settings->confirmations->redirect URL line, write your form2 page url where you added form2. Select "Pass field data via query string" and add your parameters like field1={fieldname:1}&field2={fieldname:2}&field3={fieldname:3}
When you submit form1, your form2->single line text field will capture the parameters as you wish.
This is possible with Gravity Forms Populate Anything by...
Add whatever type of field you'd like to use to capture the combined.
Set the Default Value to the merge tags of your 3 fields: #{Field A:1}.#{Field B:2}.#{Field C:3}.
That's it.
Edit: Updated screenshot for Gravity Forms 2.5 and updated merge tags to use the # to make them "live".
I am creating a drop down list in datatable using ICEfaces now, I would like that this drop down list can either retrieve data from database, or manually entered data by user at the same time. How can I achieve this?
just use ace:comboBox. this component allows users to manually enter data