forked from wicketstuff/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "WICKET-6287 Switch from json.org to open-json"
This reverts commit f8a6afd.
- Loading branch information
Showing
49 changed files
with
232 additions
and
211 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...va/org/wicketstuff/datatables/demo/infiniteScroll/VirtualScrollDemoResourceReference.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...java/org/wicketstuff/datatables/virtualscroll/AbstractVirtualScrollResourceReference.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
select2-parent/select2/src/main/java/org/wicketstuff/select2/json/JsonBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2012 Igor Vaynberg | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with | ||
* the License. You may obtain a copy of the License in the LICENSE file, or at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package org.wicketstuff.select2.json; | ||
|
||
import org.apache.wicket.ajax.json.JSONWriter; | ||
|
||
/** | ||
* A JSONWriter that writes and allows access to the underlying {@link StringBuilder}. One of the | ||
* advantages of this class is that it can expose Json as a {@link CharSequence} instead of a | ||
* {@link String} so no extra memory allocations are necessary for code that can use a | ||
* {@link CharSequence} . | ||
* | ||
* @author igor | ||
* | ||
*/ | ||
public class JsonBuilder extends JSONWriter | ||
{ | ||
|
||
/** | ||
* Constructs a builder with a new {@link StringBuilder}. | ||
*/ | ||
public JsonBuilder() | ||
{ | ||
this(new StringBuilder()); | ||
} | ||
|
||
/** | ||
* Constructs a builder with an existing {@link StringBuilder}. | ||
* | ||
* @param builder | ||
*/ | ||
public JsonBuilder(StringBuilder builder) | ||
{ | ||
super(new StringBuilderWriter(builder)); | ||
} | ||
|
||
/** | ||
* @return underlying {@link StringBuilder} as a {@link CharSequence}. | ||
*/ | ||
public CharSequence toJson() | ||
{ | ||
return ((StringBuilderWriter)writer).getBuilder(); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
select2-parent/select2/src/main/java/org/wicketstuff/select2/json/JsonFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2012 Igor Vaynberg | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with | ||
* the License. You may obtain a copy of the License in the LICENSE file, or at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package org.wicketstuff.select2.json; | ||
|
||
import org.apache.wicket.ajax.json.JSONString; | ||
|
||
/** | ||
* Represents a Json function. When written out these values are not escaped so its possible to | ||
* write out raw JavaScript. | ||
*/ | ||
public class JsonFunction implements JSONString | ||
{ | ||
private final String value; | ||
|
||
public JsonFunction(String value) | ||
{ | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String toJSONString() | ||
{ | ||
return value; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.