Skip to content

Commit f5e1d1d

Browse files
committed
Add Rabbit Listener
1 parent db29e20 commit f5e1d1d

File tree

5 files changed

+24
-34
lines changed

5 files changed

+24
-34
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@
8686
8787
8888
<dependency>
89-
<groupId>com.guicedee.servlets</groupId>
89+
<groupId>com.guicedee</groupId>
9090
<artifactId>guiced-servlets</artifactId>
9191
</dependency>
9292
9393
<dependency>
94-
<groupId>com.guicedee.servlets</groupId>
94+
<groupId>com.guicedee</groupId>
9595
<artifactId>guiced-websockets</artifactId>
9696
</dependency>
9797
-->

src/main/java/com/jwebmp/core/base/ComponentHTMLAttributeBase.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,12 @@ public J cloneComponent()
685685
return (J) cloned;
686686
}
687687

688+
@Override
689+
public boolean hasAttribute(String attribute)
690+
{
691+
return attributes.containsKey(attribute);
692+
}
693+
688694
/**
689695
* Shortcut to adding a style attribute
690696
*

src/main/java/com/jwebmp/core/base/html/Head.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@
7474
*/
7575
public class Head<J extends Head<J>>
7676
extends ComponentHierarchyBase<HeadChildren, NoAttributes, NoFeatures, NoEvents, J>
77-
implements NoIDTag, HtmlChildren, NoClassAttribute, PageChildren, IHead {
77+
implements NoIDTag, HtmlChildren, NoClassAttribute, PageChildren, IHead
78+
{
7879
/**
7980
* Constructs a new Head Tag
8081
*/
81-
public Head() {
82+
public Head()
83+
{
8284
super(ComponentTypes.Head);
8385
}
8486
}

src/main/java/com/jwebmp/core/base/html/Html.java

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -240,24 +240,6 @@ public Head<?> getHead()
240240
return head;
241241
}
242242

243-
/*
244-
* Returns the body object on the HTML Tag
245-
*/
246-
/*public Body<?, ?> getBody()
247-
{
248-
if (body == null)
249-
{
250-
body = new Body<>((IPage) this);
251-
}
252-
return body;
253-
}*/
254-
255-
/* public Body<?, ?> getBody()
256-
{
257-
return body;
258-
}*/
259-
260-
261243
/**
262244
* Sets the body for this class
263245
*
@@ -266,12 +248,7 @@ public Head<?> getHead()
266248
@SuppressWarnings("unchecked")
267249
public J setBody(IBody<?, ?> body)
268250
{
269-
if (getChildren().size() == 2)
270-
{
271-
getChildren().remove(1);
272-
}
273251
this.body = (Body<?, ?>) body;
274-
getChildren().add((C) body);
275252
return (J) this;
276253
}
277254

@@ -284,13 +261,18 @@ public J setBody(IBody<?, ?> body)
284261
@SuppressWarnings("unchecked")
285262
public J setHead(IHead head)
286263
{
287-
if (!getChildren().isEmpty())
288-
{
289-
getChildren().remove(0);
290-
}
291264
this.head = (Head<?>) head;
292-
getChildren().add(0, (C) head);
293265
return (J) this;
294266
}
295267

268+
@Override
269+
protected void init()
270+
{
271+
if (!isInitialized())
272+
{
273+
add((C) head);
274+
add((C) body);
275+
}
276+
super.init();
277+
}
296278
}

src/main/java/module-info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
requires com.fasterxml.jackson.databind;
2727
requires com.fasterxml.jackson.core;
2828

29-
//requires guiced.vertx;
30-
//requires guiced.vertx.sockets;
29+
//requires com.guicedee.vertx;
30+
//requires com.guicedee.vertx.sockets;
3131

3232
//requires jakarta.websocket;
3333
//requires jakarta.websocket.client;

0 commit comments

Comments
 (0)