Skip to content

NestTable、仮想プロパティを指定可能にする#1762

Merged
NonakaKazuhiro merged 8 commits into
masterfrom
feature/679-nesttable-virtual
Jun 27, 2025
Merged

NestTable、仮想プロパティを指定可能にする#1762
NonakaKazuhiro merged 8 commits into
masterfrom
feature/679-nesttable-virtual

Conversation

@NonakaKazuhiro

Copy link
Copy Markdown
Contributor

対応内容

fixes #679

AdminConsoleにてView定義のNestTableプロパティ設定にて手動入力したプロパティ(仮想プロパティ)をメタデータ登録して、GEMの画面で利用できるようにする(修正前はプロパティ名を手動入力できるがメタデータ登録はできていなかった)。

動作確認・スクリーンショット(任意)

レビュー観点・補足情報(任意)

@NonakaKazuhiro
NonakaKazuhiro requested a review from Copilot May 7, 2025 01:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables virtual properties (手動入力された仮想プロパティ) to be registered as metadata for NestTable property settings in the AdminConsole and subsequently used in the GEM UI. Key changes include refactoring property definition retrieval to use a common getNestTablePropertyDefinition method, updating multiple JSP pages to use this method, and modifying EntityViewUtil to support conversion for virtual properties.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SearchConditionSection_Nest.jsp Adds a helper method to retrieve NestTable property definitions with exception handling for missing properties.
SearchConditionSection.jsp Replaces direct calls to ed.getProperty(...) with the new getNestTablePropertyDefinition method.
ReferencePropertyEditor_Table.jsp Updates multiple references to property retrieval with the new method and ensures consistency in error messages.
ReferencePropertyEditor_Condition_Nest.jsp Uses the new method for virtual property conversion in condition handling.
EntityViewUtil.java Introduces getNestTablePropertyDefinition to return either an existing property definition or convert a virtual property; adds a private getVirtualPropertyDefinition for conversion.
MetaNestProperty.java Adjusts null handling for property identifiers to allow virtual properties.
ReferencePropertySearchCondition.java & NormalSearchContext.java Updates property retrieval to leverage the new utility method for NestTable properties.
Files not reviewed (1)
  • iplass-gem/src/main/resources/mtp-gem-messages_ja.properties: Language not supported
Comments suppressed due to low confidence (2)

iplass-gem/src/main/resources/jsp/gem/generic/element/section/SearchConditionSection.jsp:261

  • [nitpick] The implementation of getNestTablePropertyDefinition is duplicated across several JSP files. Consider refactoring this method into a shared include or tag library to improve maintainability and reduce code duplication.
PropertyDefinition getNestTablePropertyDefinition(NestProperty np, EntityDefinition ed) {

iplass-gem/src/main/java/org/iplass/mtp/impl/view/generic/editor/MetaNestProperty.java:492

  • [nitpick] Consider renaming the variable 'propertyId' to a more descriptive name such as 'defaultPropertyName' to improve clarity and ensure consistency in identifying properties when ph is null.
String propertyName = (ph != null) ? ph.getName() : propertyId;

definition.setUpdatable(true);
return definition;
// なければ仮想プロパティなのでプロパティ定義に変換する
return getVirtualPropertyDefinition(nestProperty);

Copilot AI May 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that 'nestProperty' is compatible with the expected 'FileItem' type for getVirtualPropertyDefinition or apply an explicit cast if NestProperty extends FileItem. This will prevent potential type mismatch issues at compile time.

Suggested change
return getVirtualPropertyDefinition(nestProperty);
return getVirtualPropertyDefinition((FileItem) nestProperty);

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.iplass.mtp.view.generic.editor.NestPropertyクラスはorg.iplass.mtp.view.generic.element.FileItemインターフェースを実装しているためキャストは不要

@NonakaKazuhiro
NonakaKazuhiro requested a review from KoheiKGYM May 7, 2025 01:07
@NonakaKazuhiro
NonakaKazuhiro merged commit 6170cb2 into master Jun 27, 2025
3 checks passed
@NonakaKazuhiro
NonakaKazuhiro deleted the feature/679-nesttable-virtual branch July 3, 2025 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NestTable、仮想プロパティを指定可能にする

2 participants