I have two classes FirstViewController and SecondViewController.On FirstViewController i have TableView and UIBarButton named 'Change City' .TableView is showing parsed data from the server. But when i click on Change City ,It flip us on SecondViewController.
On SecondViewController we have also a TableView which shows the cities and done button.After selecting the city we pressed Done then SecondViewController again flip to FirstViewController.
i Stored selected city in appDelegate for accessing it on the FirstViewController.
Here Tableview of FirstViewController should have been refreshed but it showing the same data as it was showing earlier.
Please somebody help me to fix this problem.I am doing this from last 2 days.
you need to add this line- [tableView reloadData]; to the method that is called when the view controller is set back to FirstViewController, which would be the viewWillAppear:/viewDidAppear: methods.Hope this helps...
Related
I created a custom screen in Acumatica. I have a simple table and a grid to add records to it. The Account Mapping grid works (and it is way more complicated). But on the Branch Mapping grid, when I click the “PLUS” icon, the icon goes grey and no new row is available on the grid.
This is what is looks like after clicking the PLUS icon:
The table is very simple.
When a Company is selected, the view for the grid is
public SelectFrom<ICSBranchMapping>
.Where<ICSBranchMapping.organizationID
.IsEqual<ICSSetup.organizationID.FromCurrent>>.View BranchMapping;
The ICSSetup table is even simpler:
If I create a new record in ICSSetup, it lets me add 1 row to the ICSBranchMapping table
But I cannot add another row.
Here is the DAC for the ICSBranchMapping table
The records in the DB all look fine after adding the 1 row it will allow me to enter.
The action button is a dummy. The code has been commented out to ensure it has nothing to do with the issue.
I forgot to mention, I CAN update the existing row.
I’ve been fighting with this for 2 days. If anyone has any suggestions, please help.
Solved. I added the BranchMapping grid using the customization editor.
It did not include this line in the aspx:
That fixed it. It seems like that should be a default in the Screen Editor.
I recently just constructed a new view for a Lotus Notes Application and tested it to be fine.
It was supposed to get field data from 2 nearly identical forms and display into the view. The fields on both forms share the same name.
The formula used in View Selection is
SELECT ContactName; CompanyName; ContactNumber; CarNo; RequestDate
--comment: These are the names used in both forms --
This worked fine yesterday. Also I made sure that each column has selected the correct field to display and I did not change any settings. However, today when I went back to check, the view is all empty.
What seems to be the cause of this?
Your selection formula for the view is not correct. You use the name of the forms in the select statement and then add your fields as column in the view. If we assume that the forms are called FormA and FormB, then your selection formula for the view can look like this:
SELECT Form="FormA":"FormB"
I have 2 custom cell in a grouped style table. The one loaded form xib positions accessory view correctly the one created with storyboard does not, although I think it has more to do with dimensions of the cell. See picture:
EDIT: it is irrelevant if accessory is set in the code or if standard accessory is specified through IB
Any ideas why this could be happening and how to fix it?
In custom cell overwriting layoutSubviews and doing something like this seems to be fixing the issue.
However I am still not clear and what the x offset is supposed to be adding 10 gets it close, but what is it actually supposed to be? How is offset is calculated based on height of the cell?
- (void)layoutSubviews {
[super layoutSubviews];
self.accessoryView.frame = CGRectMake(self.accessoryView.frame.origin.x **+10**,self.accessoryView.frame.origin.y, self.accessoryView.frame.size.width,self.accessoryView.frame.size.height);
}
This might be a straightforward question but I can't see wood for trees at the moment
Problem: I have a typeahead attached to an edit box that looks up values from a view (based on Tim Tripcony's code). When a value is selected, I want other edit boxes on the XPage to be populated with values pulled from the corresponding document.
As an example: A username edit box has a typeahead looking up from the NAB. I select "Joe Bloggs" name from the typeahead list and want the email, phone and location edit boxes to be immediately populated with the values from his NAB entry.
I'm banging my head on the wall over this because I'm sure there's an easy and obvious solution. Thanks.
Selecting a value from the typeahead should trigger any onChange event defined for the edit box. You can set the other fields by updating the data source directly from within that event:
var selectedName = currentDocument.getValue("contactName");
currentDocument.setValue("emailAddress", getEmail(selectedName));
currentDocument.setValue("phoneNumber", getPhone(selectedName));
currentDocument.setValue("location", getLocation(selectedName));
Naturally, the above example assumes those are your field names, and that you have the named functions defined elsewhere.
In my project i want to first view country in combobox then selecting country state should be viewed then city based on state This is done in my project but the problem is that when i am aagain clicking on country then the state corresponding to that country is appended to combobox.. this should not be done the combobox should be refreshed then state should be added I am doing this in J2Me in lwuit can any one help me ??? if any one please help me.
Thank you
It would help if you would explain how you are using combo boxes...
I'm guessing you are using addItem to add lots of items (which is bad) without removing the items.
To replace the existing items just do:
combo.setModel(new DefaultListModel(arrayWithNewData));