Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
s_guodong
gjjs-bd-common
Commits
d2e08146
Commit
d2e08146
authored
Aug 22, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多頁簽
parent
b4221c36
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
179 additions
and
4 deletions
+179
-4
IPanel.java
.../src/main/java/com/brilliance/mda/runtime/mda/IPanel.java
+2
-0
MdaContext.java
...ava/com/brilliance/mda/runtime/mda/driver/MdaContext.java
+46
-4
PanelImpl.java
...n/java/com/brilliance/mda/runtime/mda/impl/PanelImpl.java
+5
-0
PackDocumentBo.java
...ance/mda/runtime/mda/snapshot/bo/pack/PackDocumentBo.java
+3
-0
PackTabBo.java
...rilliance/mda/runtime/mda/snapshot/bo/pack/PackTabBo.java
+24
-0
PackTabboxBo.java
...liance/mda/runtime/mda/snapshot/bo/pack/PackTabboxBo.java
+27
-0
PackTabpanelBo.java
...ance/mda/runtime/mda/snapshot/bo/pack/PackTabpanelBo.java
+24
-0
PackTabpanelsBo.java
...nce/mda/runtime/mda/snapshot/bo/pack/PackTabpanelsBo.java
+24
-0
PackTabsBo.java
...illiance/mda/runtime/mda/snapshot/bo/pack/PackTabsBo.java
+24
-0
No files found.
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/IPanel.java
View file @
d2e08146
...
...
@@ -13,6 +13,8 @@ public interface IPanel extends IBaseObject {
IModule
getModule
();
void
setTitleI18nKey
(
String
tittle
);
String
getTitleI18nKey
();
void
setWindow
(
Object
paramObject
);
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/driver/MdaContext.java
View file @
d2e08146
...
...
@@ -5,6 +5,9 @@ import com.brilliance.mda.runtime.mda.*;
import
com.brilliance.mda.runtime.mda.impl.EnvConfig
;
import
com.brilliance.mda.runtime.mda.snapshot.SnapshotService
;
import
com.brilliance.mda.runtime.mda.snapshot.bo.ValueVo
;
import
com.brilliance.mda.runtime.mda.snapshot.bo.pack.*
;
import
com.brilliance.mda.runtime.mda.snapshot.bo.unpack.DocumentBo
;
import
com.brilliance.mda.runtime.mda.util.XmlUtil
;
import
com.brilliance.mda.runtime.request.BaseVO
;
import
java.util.*
;
...
...
@@ -247,11 +250,50 @@ public class MdaContext implements IContext {
@Override
public
boolean
saveDisplay
(
IPanel
[]
panels
,
String
fileName
)
{
boolean
f
=
false
;
List
<
PackTabpanelBo
>
tabpanelsList
=
new
ArrayList
<>();
List
<
PackTabBo
>
tabList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
valueMap
=
new
HashMap
<>();
for
(
IPanel
panel
:
panels
)
{
f
=
saveDisplay
(
panel
,
fileName
);
// 解析标准模板
DocumentBo
documentBo
=
snapshotService
.
unpackTemplate
(
panel
.
getPath
());
// 获取组装xml的实体
PackDocumentBo
packDocumentBo
=
snapshotService
.
packTemplate
(
documentBo
,
panel
.
getParent
());
PackBorderlayoutBo
borderlayoutBo
=
packDocumentBo
.
getBorderlayoutBo
();
PackTabpanelBo
packTabpanelBo
=
new
PackTabpanelBo
();
packTabpanelBo
.
setBorderlayoutBo
(
borderlayoutBo
);
tabpanelsList
.
add
(
packTabpanelBo
);
// 获取填充值的key
Set
<
ValueVo
>
keySet
=
snapshotService
.
getKeySet
();
// 获取填充的值
valueMap
.
putAll
(
snapshotService
.
getValueMap
(
keySet
,
panel
.
getParent
()));
// 設置頁簽標題
String
titleI18nKey
=
panel
.
getTitleI18nKey
();
PackTabBo
packTabBo
=
new
PackTabBo
();
packTabBo
.
setLabel
(
titleI18nKey
);
tabList
.
add
(
packTabBo
);
}
return
f
;
PackDocumentBo
document
=
new
PackDocumentBo
();
PackTabboxBo
tabbox
=
new
PackTabboxBo
();
document
.
setTabboxBo
(
tabbox
);
// tabs
PackTabsBo
tabs
=
new
PackTabsBo
();
tabs
.
setTabBo
(
tabList
);
tabbox
.
setTabsBo
(
tabs
);
// tabpanels
PackTabpanelsBo
tabpanels
=
new
PackTabpanelsBo
();
tabbox
.
setTabpanelsBo
(
tabpanels
);
tabpanels
.
setTabpanelBos
(
tabpanelsList
);
String
s
=
XmlUtil
.
marshToXmlBinding
(
PackDocumentBo
.
class
,
document
);
String
templateContent
=
s
.
replace
(
"<window>"
,
"<window xmlns=\"http://www.zkoss.org/2005/zul\" xmlns:w=\"http://www.zkoss.org/2005/zk/client\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" height=\"100%\" width=\"100%\" xsi:schemaLocation=\"http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd\">"
);
if
(
this
.
display
!=
null
)
{
return
this
.
display
.
saveDisplay
(
fileName
,
templateContent
,
valueMap
);
}
return
false
;
}
@Override
...
...
@@ -259,7 +301,7 @@ public class MdaContext implements IContext {
IModule
parent
=
panel
.
getParent
();
String
panelPath
=
panel
.
getPath
();
// 获取模板内容
String
templateContent
=
snapshotService
.
getTemplateContent
(
panelPath
,
parent
);
String
templateContent
=
snapshotService
.
getTemplateContent
(
panelPath
,
parent
);
// 获取填充值的key
Set
<
ValueVo
>
keySet
=
snapshotService
.
getKeySet
();
// 获取填充的值
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/impl/PanelImpl.java
View file @
d2e08146
...
...
@@ -50,6 +50,11 @@ public class PanelImpl extends AbstractBaseObject implements IPanel {
return
this
.
parent
;
}
@Override
public
void
setTitleI18nKey
(
String
tittle
)
{
this
.
titleI18nKey
=
tittle
;
}
public
String
getTitleI18nKey
()
{
return
this
.
titleI18nKey
;
}
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackDocumentBo.java
View file @
d2e08146
...
...
@@ -26,4 +26,7 @@ public class PackDocumentBo {
@XmlElement
(
name
=
"borderlayout"
)
private
PackBorderlayoutBo
borderlayoutBo
;
@XmlElement
(
name
=
"tabbox"
)
private
PackTabboxBo
tabboxBo
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackTabBo.java
0 → 100644
View file @
d2e08146
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
pack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlAttribute
;
import
javax.xml.bind.annotation.XmlRootElement
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/22
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"tab"
)
@Data
public
class
PackTabBo
{
@XmlAttribute
(
name
=
"label"
)
private
String
label
;
@XmlAttribute
(
name
=
"sclass"
)
private
String
sclass
=
"savedisplay-tab"
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackTabboxBo.java
0 → 100644
View file @
d2e08146
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
pack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.*
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/22
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"tabbox"
)
@Data
public
class
PackTabboxBo
{
@XmlAttribute
(
name
=
"height"
)
private
String
height
=
"100%"
;
@XmlAttribute
(
name
=
"width"
)
private
String
width
=
"100%"
;
@XmlElement
(
name
=
"tabs"
)
private
PackTabsBo
tabsBo
;
@XmlElement
(
name
=
"tabpanels"
)
private
PackTabpanelsBo
tabpanelsBo
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackTabpanelBo.java
0 → 100644
View file @
d2e08146
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
pack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.*
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/22
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"tabpanel"
)
@Data
public
class
PackTabpanelBo
{
@XmlAttribute
(
name
=
"height"
)
private
String
height
=
"100%"
;
@XmlAttribute
(
name
=
"width"
)
private
String
width
=
"100%"
;
@XmlElement
(
name
=
"borderlayout"
)
private
PackBorderlayoutBo
borderlayoutBo
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackTabpanelsBo.java
0 → 100644
View file @
d2e08146
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
pack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
java.util.List
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/22
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"tabpanels"
)
@Data
public
class
PackTabpanelsBo
{
@XmlElement
(
name
=
"tabpanel"
)
private
List
<
PackTabpanelBo
>
tabpanelBos
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackTabsBo.java
0 → 100644
View file @
d2e08146
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
pack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
import
java.util.List
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/22
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"tabs"
)
@Data
public
class
PackTabsBo
{
@XmlElement
(
name
=
"tab"
)
private
List
<
PackTabBo
>
tabBo
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment