Auto-deleted Repeated sections - orbeon

I created a Orbeon form that contains repeated sections that are filled in with data saved under form-resources in the source code. As usual, I use the functionality 'calculated value' with a xPath expression to fill in a field.
After I created the form, I made a survey. If I close the form without saving it and reopen it,
then no repeated sections are displayed anymore.
Is there a way to avoid the deletion of repeated sections in this case?
Thanks a lot for your help.
bjn

Related

MS Access Form Text Boxes Freeze

I have a weird situation with my MS Access 2016 split database.
The back-end is a Azure SQL server DB, the front-end are distributed accde files.
I have a form bound to a linked table with several sub-forms in it.
The form is used to edit single records of the main table.
With some records all works fine ("good") but with some other records ("bad") the text boxes freeze, not allowing any edits.
No error messages, they just seem to be locked but the locked property of the text boxes control is set to false. (I've checked this in runtime)
What I've tried so far:
I can edit all records directly in the linked table
The properties of the form and controls in both "good" records and
"bad" records are the same
I can change the values of check and combo boxes and update the "bad"
records
The BIT column has a default value of 0 and nulls are not allowed (no
NULLS in the table for this field)
I'm running out of ideas. Any help will be much appreciated.
I've figured it out, so i'll leave the solution in case someone hits the same issue.
I have a subform with a browser control. All i had to do was to add the following line at the end of the main form loading sequence:
Me.SF_WEB_BROWSER.SetFocus

ListGrid: Need to show icons in an editable field for a many to one relationship

My problem seems simple. But have not been able to solve till now. Any help would be appreciated.
I have a listgrid showing certain records from a datasource. One of the fields is a many to one. When I try to edit any record, I get a dropdown with all the possible values that the record can have. All fine thus far. The issue is that all the dropdown values are displayed as simple text. I wish them to be displayed as shown in this link.
The requirement is to have "A SelectItem with icons" on the listgrid.
Regards
Use ListGridField.setEditorType() to customize the editor shown for a field. This API takes a FormItem, so pass a SelectItem configured similarly to the sample you linked to.

Access 2010 form not displaying query

I'm sure this is an easy fix but I can't seem to find it. I just have a form, that will be a subform of another, that needs to display the results of a query.
The query is simple enough, just displays all fields of records that fall between specified dates. The query works great, but when I attach it to the form as its record source it doesn't display the data. I can see the correct amount of record selectors so I know its understanding the query but its as if all fields are hidden!
I have also tried building a query to the forms record source that was simply Select query.* From query. Oddly I have had this working before but I had to specify every field. What I mean is:
Select title From query
Select type From query
Select date From query
...
And so on for all the fields but this seems foolish, can anyone think of what I may be doing wrong?
Thanks in advance!
Edit, forgot to mention I also tried the foolish solution that I mentioned above and it didn't work so its definitely some issue that I'm not seeing, some property that's probably not appropriately set
#sshekhar well its not really code at the moment I'm using Access 2010. I have a form that needs to display a subform that executes this query of displaying records that have a data field that fall between dates specified by the user. The query works and displays the correct records, but the form that it is attached to only shows the record selectors and all the fields appear to be "hidden." I thought it may be one of the form's properties set incorrectly but I checked on the test form from another database that I used and each have what appears to be identical settings. So I'm at a loss!
So it turns out even though I using a query that holds all the fields it will not display the content unless you go to the Add Existing Fields and add all the the fields you want to see. This seems really silly especially when the results in the query but at least its working now.
I had this problem and discovered that having the property DataEntry set to YES will only display new records. From Microsoft Help:
You can use the DataEntry property to specify whether a bound form
opens to allow data entry only. The Data Entry property doesn't
determine whether records can be added; it only determines whether
existing records are displayed. Read/write Boolean.

smartgwt filter editor problem

i am using Listgrid of smartgwt api. i have set filter editor on the list grid using setShowFilterEditor(). On UI, i can filter out the text from the particular columns using filter editor which is shown on top of listgrid. till this, everything works fine. but problem starts after this. my ListGridRecords are of type ScreenInstanceGridRecord.
I cleared out the filter criteria before getting the ListGridRecord from the ListGrid using method clearCriteria(), so that i can save all the records to database ie. unfiltered records. when i try to get records from the listgrid using getRecordList(), 1000 Dummy records are added on the fly on first iteration, all my populated records are ignored . and i need here is records of ScreenInstanceGridRecord type. but on second iteration, i am getting my populated records which is of ScreenInstanceGridRecord type. why this problem is occurring. i should be getting ScreenInstanceGridRecord on the first iteration itself when i try to get records from the ListGrid using getRecordList(). i am getting no idea about this weird thing. any help from your side is most welcome.. plss
When you say you're getting 1000 Dummy records instead of your loaded records, in fact, your Records are not loaded yet at all. In this case, the ResultSet created by the ListGrid (see docs for ListGrid.fetchData()) is returning a provisional length (defaults to 1000) and returning the loading marker in lieu of Records (see ResultSet.rowIsLoaded()).
Use the DataArrived event to take action once data has been loaded. See ResultSet.lengthIsKnown() for how you can, in general, tell that data is not yet loaded.

Hpricot CSS Class search

I am working on some code that scrapes a page for two css classes on a page. I am simply using the Hpricot search method for this as so:
webpage.search("body").search("div.first_class | div.second_class")
...for each item found i create an object and put it into an array, this works great except for one thing.
The search will go through the entire html page and add an object into an array every time it comes across '.first_class' and then it will go through the document again looking for '.second_class', resulting in the final array containing all of the searched items in the incorrect order in the array, i.e all of the '.first_class' objects, followed by all the '.second_class' objects.
Is there a way i can get this to search the document in one go and add an object into the array each time it comes across one of the specified classes, giving me an array of items that is in the order they are come across in on the page i am scraping?
Any help much appreciated. Thanks
See the section here on "Checking for a Few Attributes":
http://wiki.github.com/why/hpricot/hpricot-challenge
You should be able to stack the elements in the same way as you do attributes. This feature is apparently possible in Hpricot versions after 2006 Mar 17... An example with elements is:
doc.search("[#href][#type]")
Ok so it turned out i was mistaken and this didn't do anything different to what i previously had at all. However, i have come up with a solution, wether it is the most suitable or not i am not sure. It seems like a fairly straight forward for an annoying problem though.
I now perform the search for the two classes above as i mentioned above:
webpage.search("body").search("[#class~='first_class']|[#class~='second_class']")
However this still returned an array firstly containing all the divs with a class of 'first_class' followed by all divs with a class of 'second_class'. So to fix this and get an array of all the items as they appear in order on the page, i simply chain the 'add_class' method with my own custom class e.g. 'foo_bar'. This then allows me to perform another search on the page for all divs with just this one tag, thus returning an array of all the items i am after, in the order they appear on the page.
webpage.search("body").search("[#class~='first_class']|[#class~='second_class']").add_class("foo_bar")
webpage.search("body").search("[#class~='foo_bar']")
Thanks for the tip. I hadn't spotted that in the documentation and also found another page i hadnt seen either. I have fixed this with the following line:
webpage.search("body").search("[#class~='first_class']|[#class~='second_class']")
This now adds an object into the array each time it comes across one of the above classes in the document. Brilliant!

Resources