Skip to Content

Fragments of Fragment Gallery showing Previous saved content in Split Cell Container

Hi All,

I am using a Fragment Gallery component and Split Cell Container to show the comments entered at runtime and came across a scenario where the fragment is holding previous data.

Issue: Fragments in the Fragment Gallery showing the previous content and not the current one.

capture.jpg

Steps I followed:

Step 1. Entered the Title in Inputfield_2

Step2: Entered comments in Iputfield_3 to 8

Step3: Click on Save

Code for Save is as below:

var bookmarksave=Bookmark.PortableFragmentBookmark.saveBookmark("Comment_dashboard",PANEL_3_COMMENTS,INPUTFIELD_2.getValue());
var title =INPUTFIELD_2.getValue();
var content1 =INPUTFIELD_3.getValue();
var content2=INPUTFIELD_4.getValue();
var content3=INPUTFIELD_5.getValue();
var content4 =INPUTFIELD_7.getValue();
var content5 =INPUTFIELD_8.getValue();
TEXT_Title.setText(title);
TEXT_Content.setText(content1+content2+content3+content4+content5);
FRAGMENTGALLERY_1.addItem(bookmarksave);
INPUTFIELD_2.setValue(" ");
INPUTFIELD_3.setValue(" ");
INPUTFIELD_4.setValue(" ");
INPUTFIELD_5.setValue(" ");
INPUTFIELD_7.setValue(" ");
INPUTFIELD_8.setValue(" ");

When I select the first fragment from the FragmentGallery, this does not show the content I have saved, but shows the initial look. Similarly are all other fragments.

--> First comments entered:

comments-entered.jpg

Dragged the fragment to Split Cell container

splitcell-content.jpg

This image shows the fragment with the current title but the previous content.

Could someone please suggest me on this issue.

Thank you.

capture.jpg (50.6 kB)
capture.jpg (50.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 21, 2017 at 07:47 PM

    Hi Poojitha,

    If your script order is exactly as given above please change it's order as to save bookmark after your setting text code. It is because the bookmark is being saved before setting text in the sequence above.

    Another possiblity is....

    I think you may be facing problem in adding the saved book mark to your fragment gallery. Are you getting a new item in fragment gallery every time you save a book mark or always one?

    If always one there may be a problem with the logic? Then try below script to add all the bookmarks to fragment gallery at once.

    FRAGMENTGALLERY_1.addItems(Bookmark.PortableFragmentBookmark.getAllBookmarksByFolder("Folder","Group_identifier"));


    Please let me know if you need any help on this.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded