This file contains hidden or 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
import React from "react"; | |
import NextLink, { LinkProps } from "next/link"; | |
/** | |
* Higher Order Component to turn any component with a href into a component that supports `next/link`. | |
* | |
* Pass the component props like this: | |
* @example const Button = withNextLink<ButtonProps>(MuiButton); | |
* TODO: Look into forwarding refs. | |
*/ |
This file contains hidden or 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
package example.wcm.vpscopedaction; | |
import com.ibm.workplace.wcm.api.Category; | |
import com.ibm.workplace.wcm.api.Repository; | |
import com.ibm.workplace.wcm.api.VirtualPortalContext; | |
import com.ibm.workplace.wcm.api.exceptions.WCMException; | |
/** | |
* Hypothetical Portlet that runs the query against a VP to fetch Categories. | |
* This can be a servlet or REST service as well. |
This file contains hidden or 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
<script> | |
/*Get the query string so we can pass it as the input value, to save the user from typing it twice*/ | |
$(document).ready(function() { | |
function gup( name ) | |
{ | |
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regexS = "[\\?&]"+name+"=([^&#]*)"; | |
var regex = new RegExp( regexS ); | |
var results = regex.exec( window.location.href ); | |
if( results == null ) |