<commit_before>package to.etc.domuidemo.pages.cddb;

import to.etc.domui.annotations.UIUrlParameter;
import to.etc.domui.component.layout.ContentPanel;
import to.etc.domui.component.misc.ExceptionDialog;
import to.etc.domui.component2.buttons.ButtonBar2;
import to.etc.domui.component2.form4.FormBuilder;
import to.etc.domui.derbydata.db.Album;
import to.etc.domui.derbydata.db.Album_;
import to.etc.domui.dom.html.UrlPage;
import to.etc.domui.state.UIGoto;
import to.etc.domui.themes.Theme;

/**
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * Created on 10-10-18.
 */
public class AlbumEditPage extends UrlPage {
	private Album m_album;

	@Override public String getPageTitle() {
		return m_album.getId() == null ? "New Album" : m_album.getTitle();
	}

	@Override public void createContent() throws Exception {
		ContentPanel cp = new ContentPanel();
		add(cp);

		FormBuilder fb = new FormBuilder(cp);
		fb.property(m_album, Album_.artist()).control();
		fb.property(m_album, Album_.title()).control();

		ButtonBar2 bb = new ButtonBar2();
		add(bb);
		bb.addButton("Save", Theme.BTN_SAVE, a -> save());
	}

	@UIUrlParameter(name = "id")<commit_msg>Add the ChildFragment to the Album list page.<commit_after>package to.etc.domuidemo.pages.cddb;

import to.etc.domui.annotations.UIUrlParameter;
import to.etc.domui.component.layout.ContentPanel;
import to.etc.domui.component.masterchild.ChildFragment;
import to.etc.domui.component.misc.ExceptionDialog;
import to.etc.domui.component.misc.VerticalSpacer;
import to.etc.domui.component2.buttons.ButtonBar2;
import to.etc.domui.component2.form4.FormBuilder;
import to.etc.domui.derbydata.db.Album;
import to.etc.domui.derbydata.db.Album_;
import to.etc.domui.dom.html.UrlPage;
import to.etc.domui.state.UIGoto;
import to.etc.domui.themes.Theme;

/**
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * Created on 10-10-18.
 */
public class AlbumEditPage extends UrlPage {
	private Album m_album;

	@Override public String getPageTitle() {
		return m_album.getId() == null ? "New Album" : m_album.getTitle();
	}

	@Override public void createContent() throws Exception {
		ContentPanel cp = new ContentPanel();
		add(cp);

		FormBuilder fb = new FormBuilder(cp);
		fb.property(m_album, Album_.artist()).control();
		fb.property(m_album, Album_.title()).control();

		add(new VerticalSpacer(10));
		add(new ChildFragment<>(m_album, Album_.trackList()));

		ButtonBar2 bb = new ButtonBar2();
		add(bb);
		bb.addButton("Save", Theme.BTN_SAVE, a -> save());
	}

	@UIUrlParameter(name = "id")
{'fraction_non_alphanumeric': 0.14781237682301931, 'fraction_numerical': 0.010248324793062672, 'mean_word_length': 5.014218009478673, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3875755', 'n_tokens_mistral': 935, 'n_tokens_neox': 883, 'n_words': 167}