Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
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
Muhammad Usman
PERFORMA_REPLICA
Commits
e5f514bb
Commit
e5f514bb
authored
Mar 11, 2019
by
Jay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created PlaceholderOptions static enum
parent
de298607
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
6 deletions
+184
-6
PlaceholderOptions.java
cmsWebApp/src/performa/orm/types/PlaceholderOptions.java
+161
-0
PlaceholderOptions.xml
cmsWebApp/src/performa/orm/types/PlaceholderOptions.xml
+17
-0
editMessageTemplate.jsp
...ebApp/webroot/extensions/performa/editMessageTemplate.jsp
+6
-6
No files found.
cmsWebApp/src/performa/orm/types/PlaceholderOptions.java
0 → 100644
View file @
e5f514bb
package
performa
.
orm
.
types
;
import
java.util.*
;
import
oneit.utils.*
;
/**
* This class was generated using constGen.bat.
* DO NOT MODIFY THIS CODE.
* Edit the associated .xml file, and regenerate this file
* constGen (directory) (file minus extension)
* e.g. constGen C:\...\sql FieldType
*/
public
class
PlaceholderOptions
extends
AbstractEnumerated
{
public
static
final
EnumeratedFactory
FACTORY_PlaceholderOptions
=
new
PlaceholderOptionsFactory
();
public
static
final
PlaceholderOptions
FIRST_NAME
=
new
PlaceholderOptions
(
"FIRST_NAME"
,
"FIRST_NAME"
,
"First Name"
,
false
);
public
static
final
PlaceholderOptions
SURNAME
=
new
PlaceholderOptions
(
"SURNAME"
,
"SURNAME"
,
"Surname"
,
false
);
public
static
final
PlaceholderOptions
EMAIL_ADDRESS
=
new
PlaceholderOptions
(
"EMAIL_ADDRESS"
,
"EMAIL_ADDRESS"
,
"Email Address"
,
false
);
public
static
final
PlaceholderOptions
LOCATION
=
new
PlaceholderOptions
(
"LOCATION"
,
"LOCATION"
,
"Location"
,
false
);
public
static
final
PlaceholderOptions
JOB_TITLE
=
new
PlaceholderOptions
(
"JOB_TITLE"
,
"JOB_TITLE"
,
"Job Title"
,
false
);
public
static
final
PlaceholderOptions
JOB_REFERENCE
=
new
PlaceholderOptions
(
"JOB_REFERENCE"
,
"JOB_REFERENCE"
,
"Job Reference"
,
false
);
private
static
final
PlaceholderOptions
[]
allPlaceholderOptionss
=
new
PlaceholderOptions
[]
{
FIRST_NAME
,
SURNAME
,
EMAIL_ADDRESS
,
LOCATION
,
JOB_TITLE
,
JOB_REFERENCE
};
private
static
PlaceholderOptions
[]
getAllPlaceholderOptionss
()
{
return
allPlaceholderOptionss
;
}
private
transient
String
Placeholder
;
private
PlaceholderOptions
(
String
name
,
String
value
,
String
description
,
boolean
disabled
)
{
super
(
name
,
value
,
description
,
disabled
);
}
public
String
getPlaceholder
()
{
return
Placeholder
;
}
public
static
final
Comparator
COMPARE_BY_POSITION
=
new
CompareEnumByPosition
(
allPlaceholderOptionss
);
static
{
defineAdditionalData
();
}
public
boolean
isEqual
(
PlaceholderOptions
other
)
{
return
this
.
name
.
equals
(
other
.
name
);
}
public
Enumeration
getAllInstances
()
{
return
PlaceholderOptions
.
getAll
();
}
private
Object
readResolve
()
throws
java
.
io
.
ObjectStreamException
{
return
PlaceholderOptions
.
forName
(
this
.
name
);
}
public
EnumeratedFactory
getFactory
()
{
return
FACTORY_PlaceholderOptions
;
}
public
static
PlaceholderOptions
forName
(
String
name
)
{
if
(
name
==
null
)
{
return
null
;
}
PlaceholderOptions
[]
all
=
getAllPlaceholderOptionss
();
int
enumIndex
=
AbstractEnumerated
.
getIndexForName
(
all
,
name
);
return
all
[
enumIndex
];
}
public
static
PlaceholderOptions
forValue
(
String
value
)
{
if
(
value
==
null
)
{
return
null
;
}
PlaceholderOptions
[]
all
=
getAllPlaceholderOptionss
();
int
enumIndex
=
AbstractEnumerated
.
getIndexForValue
(
getAllPlaceholderOptionss
(),
value
);
return
all
[
enumIndex
];
}
public
static
java
.
util
.
Enumeration
getAll
()
{
return
AbstractEnumerated
.
getAll
(
getAllPlaceholderOptionss
());
}
public
static
PlaceholderOptions
[]
getPlaceholderOptionsArray
()
{
return
(
PlaceholderOptions
[])
getAllPlaceholderOptionss
().
clone
();
}
public
static
void
defineAdditionalData
()
{
FIRST_NAME
.
Placeholder
=
"$firstName"
;
SURNAME
.
Placeholder
=
"$surname"
;
EMAIL_ADDRESS
.
Placeholder
=
"$emailAddress"
;
LOCATION
.
Placeholder
=
"$location"
;
JOB_TITLE
.
Placeholder
=
"$jobTitle"
;
JOB_REFERENCE
.
Placeholder
=
"$jobReference"
;
}
static
class
PlaceholderOptionsFactory
implements
EnumeratedFactory
{
public
AbstractEnumerated
getForName
(
String
name
)
{
return
PlaceholderOptions
.
forName
(
name
);
}
public
AbstractEnumerated
getForValue
(
String
name
)
{
return
PlaceholderOptions
.
forValue
(
name
);
}
public
Enumeration
getAll
()
{
return
PlaceholderOptions
.
getAll
();
}
}
public
Map
getAdditionalAttributes
()
{
Map
attribs
=
new
HashMap
();
attribs
.
put
(
"Placeholder"
,
ArrayFormatter
.
toObject
(
getPlaceholder
()));
return
attribs
;
}
}
cmsWebApp/src/performa/orm/types/PlaceholderOptions.xml
0 → 100644
View file @
e5f514bb
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<CONSTANT
package=
"performa.orm.types"
name=
"PlaceholderOptions"
>
<DATA
name=
"Placeholder"
type=
"String"
/>
<VALUE
name=
"FIRST_NAME"
value=
"FIRST_NAME"
description=
"First Name"
Placeholder=
'"$firstName"'
/>
<VALUE
name=
"SURNAME"
value=
"SURNAME"
description=
"Surname"
Placeholder=
'"$surname"'
/>
<VALUE
name=
"EMAIL_ADDRESS"
value=
"EMAIL_ADDRESS"
description=
"Email Address"
Placeholder=
'"$emailAddress"'
/>
<VALUE
name=
"LOCATION"
value=
"LOCATION"
description=
"Location"
Placeholder=
'"$location"'
/>
<VALUE
name=
"JOB_TITLE"
value=
"JOB_TITLE"
description=
"Job Title"
Placeholder=
'"$jobTitle"'
/>
<VALUE
name=
"JOB_REFERENCE"
value=
"JOB_REFERENCE"
description=
"Job Reference"
Placeholder=
'"$jobReference"'
/>
</CONSTANT>
</ROOT>
\ No newline at end of file
cmsWebApp/webroot/extensions/performa/editMessageTemplate.jsp
View file @
e5f514bb
...
@@ -103,13 +103,13 @@
...
@@ -103,13 +103,13 @@
<oneit:skin tagName="button_dropdown" label="Placeholder Variable" class="btn btn-default">
<oneit:skin tagName="button_dropdown" label="Placeholder Variable" class="btn btn-default">
<li><oneit:button value="First Name" cssClass=" " name="firstName" skin="link" onClick="insertAtCaret('$firstName')" /></li>
<%
<li><oneit:button value="Surname" cssClass=" " name="surname" skin="link" onClick="insertAtCaret('$surname')" /></li>
for(PlaceholderOptions option : PlaceholderOptions.getPlaceholderOptionsArray())
<li><oneit:button value="Email Address" cssClass=" " name="emailAddress" skin="link" onClick="insertAtCaret('$emailAddress')" /></li>
{
<li><oneit:button value="Location" cssClass=" " name="location" skin="link" onClick="insertAtCaret('$location')" /></li>
%>
<li><oneit:button value="Job Title" cssClass=" " name="jobTitle" skin="link" onClick="insertAtCaret('$jobTitle')" /></li>
<li><oneit:button value="<%= option.getDescription() %>" cssClass=" " name="<%= option.getDescription() %>" skin="link" onClick="<%=" insertAtCaret('"+ option.getPlaceholder() +"'); return false;"%>" /></li>
<li><oneit:button value="Job Reference" cssClass=" " name="jobReference" skin="link" onClick="insertAtCaret('$jobReference')" /></li>
<% } %>
</oneit:skin>
</oneit:skin>
</oneit:skin>
</oneit:skin>
</oneit:layout_field>
</oneit:layout_field>
...
...
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